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