Confirm post request, change state step and hide components

This commit is contained in:
2021-05-20 11:45:29 +02:00
parent 050c325195
commit ae1146c79c
5 changed files with 67 additions and 30 deletions

View File

@@ -2,18 +2,18 @@
<div class="vue-component">
<h3>
{{ $t('confirm.title') }}
<span v-if="accompanyingCourse.step !== 'DRAFT'"
class="badge badge-pill badge-primary">
{{ $t('course.step.active') }}
</span>
<span v-else class="badge badge-pill badge-secondary">
{{ $t('course.step.draft') }}
</span>
</h3>
<p v-if="accompanyingCourse.step === 'DRAFT'">
{{ $t('confirm.text_draft') }}
</p>
<div>
<p>
{{ $t('confirm.text_draft') }}
<span class="badge badge-pill badge-secondary">{{ $t('course.step.draft') }}</span>
</p>
<p>
{{ $t('confirm.text_active') }}
<span class="badge badge-pill badge-primary">{{ $t('course.step.active') }}</span>
</p>
</div>
<dl v-if="accompanyingCourse.closingDate">
<dt>{{ $t('course.closing_date') }}</dt>
@@ -44,8 +44,15 @@ export default {
},
methods: {
confirmCourse() {
console.log('confirmCourse');
console.log('@@ CLICK confirmCourse');
this.$store.dispatch('confirmAccompanyingCourse');
}
}
}
</script>
<style lang="scss" scoped>
div.vue-component > div {
margin: 1em;
}
</style>