mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-12 13:24:25 +00:00
save/hide form evaluation
This commit is contained in:
parent
71b54622e2
commit
63b820784f
@ -1,15 +1,26 @@
|
||||
<template>
|
||||
<div v-if="hasEvaluation">
|
||||
<div>
|
||||
<div v-for="e in pickedEvaluations" class="item-title">
|
||||
<i class="fa fa-fw fa-times" @click="removeEvaluation(e)"></i>
|
||||
<i class="fa fa-fw fa-pencil" @click="editEvaluation(e)"></i>
|
||||
<div v-for="e in pickedEvaluations">
|
||||
<div class="item-title" @click="removeEvaluation(e)">
|
||||
<i class="fa fa-fw fa-times"></i>
|
||||
{{ e.evaluation.title.fr }}
|
||||
<!--
|
||||
<form-evaluation
|
||||
:key="e.id">
|
||||
</div>
|
||||
<div v-if="!editEvaluation">
|
||||
voit l'évaluation
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<a class="btn btn-sm btn-update" @click="toggleEditEvaluation(e)">{{ $t('action.edit') }}</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div v-if="editEvaluation">
|
||||
<form-evaluation ref="FormEvaluation">
|
||||
</form-evaluation>
|
||||
-->
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<button class="btn btn-sm btn-update" @click="submitForm">{{ $t('action.save') }}</button>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -37,6 +48,7 @@ export default {
|
||||
i18n,
|
||||
data() {
|
||||
return {
|
||||
editEvaluation: false,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -52,8 +64,12 @@ export default {
|
||||
this.$store.commit('removeEvaluation', e);
|
||||
return;
|
||||
},
|
||||
editEvaluation(e) {
|
||||
console.log('edit');
|
||||
toggleEditEvaluation() {
|
||||
this.editEvaluation = !this.editEvaluation;
|
||||
},
|
||||
submitForm() {
|
||||
this.$refs.FormEvaluation.saveEvaluation();
|
||||
this.toggleEditEvaluation();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -172,8 +172,8 @@ export default {
|
||||
})
|
||||
;
|
||||
},
|
||||
submitNewEvaluation() {
|
||||
console.log('submit evaluation');
|
||||
saveEvaluation() {
|
||||
console.log('save evaluation');
|
||||
console.log('dispatch action: post/patch/put evaluation');
|
||||
console.log('commit mutation: update state.mutation');
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user