mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
adding button notification in edit view of a work.
This commit is contained in:
parent
67b32341d1
commit
0a2f41c8a0
@ -296,7 +296,13 @@
|
||||
@go-to-generate-workflow="goToGenerateWorkflow"
|
||||
></list-workflow-modal>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<button
|
||||
class="btn btn-notify"
|
||||
@click="goToGenerateNotification"
|
||||
>
|
||||
</button>
|
||||
</li>
|
||||
<li v-if="!isPosting">
|
||||
<button class="btn btn-save" @click="submit">
|
||||
{{ $t('action.save') }}
|
||||
@ -548,6 +554,15 @@ export default {
|
||||
return this.$store.dispatch('submit', callback)
|
||||
.catch(e => { console.log(e); throw e; });
|
||||
},
|
||||
goToGenerateNotification() {
|
||||
console.log('save before leave to notification');
|
||||
const callback = (data) => {
|
||||
window.location.assign(`/fr/notification/create?entityClass=Chill\\PersonBundle\\Entity\\AccompanyingPeriod\\AccompanyingPeriodWork&entityId=${this.work.id}&returnPath=/fr/person/accompanying-period/${this.work.accompanyingPeriod.id}/work`);
|
||||
}
|
||||
|
||||
return this.$store.dispatch('submit', callback)
|
||||
.catch(e => {console.log(e); throw e});
|
||||
},
|
||||
submit() {
|
||||
this.$store.dispatch('submit').catch((error) => {
|
||||
if (error.name === 'ValidationException' || error.name === 'AccessException') {
|
||||
|
Loading…
x
Reference in New Issue
Block a user