mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 15:13:50 +00:00
fix workflow redirection in accompanying period work edit
This commit is contained in:
@@ -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');
|
||||
},
|
||||
|
@@ -10,16 +10,16 @@
|
||||
|
||||
<ul class="record_actions">
|
||||
<li v-if="evaluation.workflows_availables.length > 0">
|
||||
|
||||
|
||||
<list-workflow-modal
|
||||
:workflows="evaluation.workflows"
|
||||
:allowCreate="true"
|
||||
relatedEntityClass="faked"
|
||||
relatedEntityClass="Chill\PersonBundle\Entity\AccompanyingPeriod\AccompanyingPeriodWorkEvaluation"
|
||||
:relatedEntityId="evaluation.id"
|
||||
:workflowsAvailables="evaluation.workflows_availables"
|
||||
@goToGenerateWorkflow="goToGenerateWorkflow"
|
||||
@go-to-generate-workflow="goToGenerateWorkflow"
|
||||
></list-workflow-modal>
|
||||
|
||||
|
||||
</li>
|
||||
<li>
|
||||
<a class="btn btn-delete" @click="modal.showModal = true" :title="$t('action.delete')"></a>
|
||||
@@ -106,8 +106,7 @@ export default {
|
||||
this.toggleEditEvaluation();
|
||||
},
|
||||
goToGenerateWorkflow({event, link, workflowName}) {
|
||||
event.preventDefault();
|
||||
console.log(event, link, workflowName);
|
||||
console.log('goToGenerate in evaluation', event, link, workflowName);
|
||||
|
||||
const callback = (data) => {
|
||||
let evaluationId = data.accompanyingPeriodWorkEvaluations.find(e => e.key === this.evaluation.key).id;
|
||||
|
@@ -210,6 +210,7 @@ const store = createStore({
|
||||
editEvaluation: true,
|
||||
workflows_availables: state.work.workflows_availables_evaluation,
|
||||
documents: [],
|
||||
workflows: [],
|
||||
};
|
||||
state.evaluationsPicked.push(e);
|
||||
},
|
||||
|
Reference in New Issue
Block a user