fix workflow redirection in accompanying period work edit

This commit is contained in:
2022-01-31 21:09:00 +01:00
parent ebdcc5a07d
commit 50e722e637
5 changed files with 53 additions and 19 deletions

View File

@@ -251,6 +251,7 @@
relatedEntityClass="Chill\PersonBundle\Entity\AccompanyingPeriod\AccompanyingPeriodWork"
:relatedEntityId="this.work.id"
:workflowsAvailables="this.work.workflows_availables"
@go-to-generate-workflow="goToGenerateWorkflow"
></list-workflow-modal>
</li>
@@ -284,6 +285,7 @@ import OnTheFly from 'ChillMainAssets/vuejs/OnTheFly/components/OnTheFly.vue';
import ListWorkflowModal from 'ChillMainAssets/vuejs/_components/EntityWorkflow/ListWorkflowModal.vue';
import PickWorkflow from 'ChillMainAssets/vuejs/_components/EntityWorkflow/PickWorkflow.vue';
import PersonText from 'ChillPersonAssets/vuejs/_components/Entity/PersonText.vue';
import {buildLinkCreate} from 'ChillMainAssets/lib/entity-workflow/api.js';
const i18n = {
messages: {
@@ -334,7 +336,6 @@ export default {
ListWorkflowModal,
OnTheFly,
PickWorkflow,
OnTheFly,
PersonText,
},
i18n,
@@ -461,6 +462,15 @@ export default {
removeThirdParty(t) {
this.$store.commit('removeThirdParty', t);
},
goToGenerateWorkflow({link}) {
console.log('save before leave to generate workflow')
const callback = (data) => {
window.location.assign(link);
};
return this.$store.dispatch('submit', callback)
.catch(e => { console.log(e); throw e; });
},
submit() {
this.$store.dispatch('submit');
},