mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-12 21:34:25 +00:00
add modal to confirm delete action + delete button changed
This commit is contained in:
parent
d40b0e88ed
commit
6016038813
@ -21,18 +21,17 @@
|
|||||||
<dd v-if="evaluation.warningInterval">{{ evaluation.warningInterval }}</dd>
|
<dd v-if="evaluation.warningInterval">{{ evaluation.warningInterval }}</dd>
|
||||||
|
|
||||||
<template v-if="evaluation.documents.length > 0">
|
<template v-if="evaluation.documents.length > 0">
|
||||||
<dt>{{ $t('documents') }} :</dt>
|
<dt>{{ $t('documents') }} :</dt>
|
||||||
<dd>
|
<dd>
|
||||||
<ul>
|
<ul>
|
||||||
<li v-for="d in evaluation.documents">
|
<li v-for="d in evaluation.documents">
|
||||||
{{ d.template.name.fr }}
|
{{ d.template.name.fr }}
|
||||||
<a :href="buildEditLink(d.storedObject)" class="btn btn-action btn-sm">
|
<a :href="buildEditLink(d.storedObject)" class="btn btn-action btn-sm">
|
||||||
<i class="fa fa-edit"></i>
|
<i class="fa fa-edit"></i>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</dd>
|
</dd>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
</dl>
|
</dl>
|
||||||
@ -40,9 +39,9 @@
|
|||||||
|
|
||||||
<dt v-if="evaluation.comment">{{ $t('comment') }} :</dt>
|
<dt v-if="evaluation.comment">{{ $t('comment') }} :</dt>
|
||||||
<dd v-if="evaluation.comment">
|
<dd v-if="evaluation.comment">
|
||||||
<blockquote class="chill-user-quote">
|
<blockquote class="chill-user-quote">
|
||||||
{{ evaluation.comment }}
|
{{ evaluation.comment }}
|
||||||
</blockquote>
|
</blockquote>
|
||||||
</dd>
|
</dd>
|
||||||
|
|
||||||
</dl>
|
</dl>
|
||||||
@ -50,6 +49,9 @@
|
|||||||
<li>
|
<li>
|
||||||
<a class="btn btn-sm btn-update" @click="toggleEditEvaluation(e)">{{ $t('action.edit') }}</a>
|
<a class="btn btn-sm btn-update" @click="toggleEditEvaluation(e)">{{ $t('action.edit') }}</a>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<a class="btn btn-sm btn-delete" @click="modal.showModal = true">{{ $t('action.delete') }}</a>
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="evaluation.editEvaluation">
|
<div v-if="evaluation.editEvaluation">
|
||||||
@ -60,11 +62,28 @@
|
|||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<teleport to="body">
|
||||||
|
<modal v-if="modal.showModal" :modalDialogClass="modal.modalDialogClass" @close="modal.showModal = false">
|
||||||
|
<template v-slot:header>
|
||||||
|
<h2 class="modal-title">{{ $t('delete.sure') }}</h2>
|
||||||
|
</template>
|
||||||
|
<template v-slot:body>
|
||||||
|
<p>{{ $t('delete.sure_description') }}</p>
|
||||||
|
</template>
|
||||||
|
<template v-slot:footer>
|
||||||
|
<button class="btn btn-danger" @click="removeEvaluation(evaluation)">
|
||||||
|
{{ $t('delete.ok') }}
|
||||||
|
</button>
|
||||||
|
</template>
|
||||||
|
</modal>
|
||||||
|
</teleport>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import FormEvaluation from './FormEvaluation.vue';
|
import FormEvaluation from './FormEvaluation.vue';
|
||||||
|
import Modal from 'ChillMainAssets/vuejs/_components/Modal';
|
||||||
|
|
||||||
const i18n = {
|
const i18n = {
|
||||||
messages: {
|
messages: {
|
||||||
@ -78,6 +97,11 @@ const i18n = {
|
|||||||
warningInterval: "Rappel (jours)",
|
warningInterval: "Rappel (jours)",
|
||||||
comment: "Note publique",
|
comment: "Note publique",
|
||||||
documents: "Documents",
|
documents: "Documents",
|
||||||
|
delete: {
|
||||||
|
sure: "Êtes-vous sûr?",
|
||||||
|
sure_description: "Cette évaluation sera supprimée de cette action d'accompagnement",
|
||||||
|
ok: "Supprimer"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -85,12 +109,18 @@ const i18n = {
|
|||||||
export default {
|
export default {
|
||||||
name: "AddEvaluation",
|
name: "AddEvaluation",
|
||||||
components: {
|
components: {
|
||||||
FormEvaluation
|
FormEvaluation,
|
||||||
|
Modal
|
||||||
},
|
},
|
||||||
props: ['evaluation'],
|
props: ['evaluation'],
|
||||||
i18n,
|
i18n,
|
||||||
data() {
|
data() {
|
||||||
return {};
|
return {
|
||||||
|
modal: {
|
||||||
|
showModal: false,
|
||||||
|
modalDialogClass: "modal-dialog-centered modal-md"
|
||||||
|
}
|
||||||
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
pickedEvaluations() {
|
pickedEvaluations() {
|
||||||
@ -99,7 +129,6 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
removeEvaluation(e) {
|
removeEvaluation(e) {
|
||||||
console.log(e);
|
|
||||||
this.$store.commit('removeEvaluation', e);
|
this.$store.commit('removeEvaluation', e);
|
||||||
return;
|
return;
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user