1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
<template>
<StudipDialog
:title="title"
:confirmText="$gettext('Speichern')"
confirmClass="accept"
:confirmDisabled="!changed"
:closeText="$gettext('Schließen')"
closeClass="cancel"
height="600"
width="800"
@close="$emit('close')"
@confirm="confirm"
>
<template #dialogContent>
<ProcessCreateForm :configuration="process.attributes.configuration" custom @update="updateConfiguration" />
</template>
</StudipDialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { $gettext, $gettextInterpolate } from '../../../../../assets/javascripts/lib/gettext';
import StudipDialog from '../../../StudipDialog.vue';
import ProcessCreateForm from './ProcessCreateForm.vue';
import { defaultConfiguration, ProcessConfiguration } from './process-configuration';
export default {
components: { ProcessCreateForm, StudipDialog },
props: ['process'],
data: () => ({
changed: false,
configuration: defaultConfiguration(),
}),
computed: {
...mapGetters({
relatedTaskGroups: 'courseware-task-groups/related',
}),
title() {
const taskGroup = this.relatedTaskGroups({ parent: this.process, relationship: 'task-group' });
return $gettextInterpolate($gettext('Peer-Review-Prozess anlegen zur Aufgabe "%{title}"'), {
title: taskGroup.attributes.title,
});
},
},
methods: {
confirm() {
this.$emit('update', {
process: this.process,
configuration: { ...this.configuration },
});
},
updateConfiguration(configuration) {
this.changed = true;
this.configuration = configuration;
},
},
};
</script>
<style scoped>
header {
margin-block-end: 2rem;
}
</style>
|