Button in vue edit

This commit is contained in:
Lucas Silva 2023-04-27 16:01:35 +02:00
parent 71e8e2baee
commit 1a66a08142

View File

@ -103,6 +103,11 @@
<div class="item-row">
<div class="item-col">
<ul class="record_actions" >
<li>
<button class="btn btn-notify" @click="goToGenerateDocumentNotification(d)">
</button>
</li>
<li v-if="d.workflows_availables.length > 0">
<list-workflow-modal
:workflows="d.workflows"
@ -390,6 +395,14 @@ export default {
return this.$store.dispatch('submit', callback)
.catch(e => { console.log(e); throw e; });
},
goToGenerateDocumentNotification(document){
const callback = (data) => {
let evaluation = data.accompanyingPeriodWorkEvaluations.find(e => e.key === this.evaluation.key);
window.location.assign(`/fr/notification/create?entityClass=Chill\\PersonBundle\\Entity\\AccompanyingPeriod\\AccompanyingPeriodWorkEvaluationDocument&entityId=${document.id}&returnPath=/fr/person/accompanying-period/work/${evaluation.id}/edit`)
};
return this.$store.dispatch('submit', callback)
.catch(e => {console.log(e); throw e});
}
},
}
</script>