workflows in entity: other vue component call workflow modal

This commit is contained in:
Mathieu Jaumotte 2022-01-30 13:53:51 +01:00
parent 84a76d2c76
commit 0add020e57
3 changed files with 15 additions and 17 deletions

View File

@ -242,16 +242,15 @@
</div>
<ul class="record_actions sticky-form-buttons">
<!--
FAIT REPETER tout le template de App.vue plusieurs fois
<li>
<pick-workflow
<list-workflow-modal
:workflows="this.work.workflows"
:allowCreate="true"
relatedEntityClass="Chill\PersonBundle\Entity\AccompanyingPeriod\AccompanyingPeriodWork"
:relatedEntityId="this.work.id"
:workflows="this.workflows"
></pick-workflow>
:workflowsAvailables="this.work.workflows_availables"
></list-workflow-modal>
</li>
-->
<li v-if="!isPosting">
<button class="btn btn-save" @click="submit">
@ -280,7 +279,7 @@ import AddressRenderBox from 'ChillMainAssets/vuejs/_components/Entity/AddressRe
import ThirdPartyRenderBox from 'ChillThirdPartyAssets/vuejs/_components/Entity/ThirdPartyRenderBox.vue';
import PickTemplate from 'ChillDocGeneratorAssets/vuejs/_components/PickTemplate.vue';
import OnTheFly from 'ChillMainAssets/vuejs/OnTheFly/components/OnTheFly.vue';
import PickWorkflow from 'ChillMainAssets/vuejs/_components/EntityWorkflow/PickWorkflow.vue';
import ListWorkflowModal from 'ChillMainAssets/vuejs/_components/EntityWorkflow/ListWorkflowModal.vue';
const i18n = {
messages: {
@ -328,7 +327,7 @@ export default {
AddressRenderBox,
ThirdPartyRenderBox,
PickTemplate,
PickWorkflow,
ListWorkflowModal,
OnTheFly
},
i18n,

View File

@ -9,12 +9,16 @@
<ul class="record_actions">
<li v-if="evaluation.workflows_availables.length > 0">
<pick-workflow
<list-workflow-modal
:workflows="evaluation.workflows"
:allowCreate="true"
relatedEntityClass="faked"
:relatedEntityId="evaluation.id"
:workflowsAvailables="evaluation.workflows_availables"
@goToGenerateWorkflow="goToGenerateWorkflow"
></pick-workflow>
></list-workflow-modal>
</li>
<li>
<a class="btn btn-delete" @click="modal.showModal = true" :title="$t('action.delete')"></a>
@ -43,7 +47,7 @@
<script>
import FormEvaluation from './FormEvaluation.vue';
import Modal from 'ChillMainAssets/vuejs/_components/Modal';
import PickWorkflow from 'ChillMainAssets/vuejs/_components/EntityWorkflow/PickWorkflow.vue';
import ListWorkflowModal from 'ChillMainAssets/vuejs/_components/EntityWorkflow/ListWorkflowModal.vue';
import {buildLinkCreate} from 'ChillMainAssets/lib/entity-workflow/api.js';
const i18n = {
@ -72,7 +76,7 @@ export default {
components: {
FormEvaluation,
Modal,
PickWorkflow,
ListWorkflowModal,
},
props: ['evaluation'],
i18n,

View File

@ -12,11 +12,6 @@
<div class="accompanying_course_work-edit">
<h1>{{ block('title') }}</h1>
<div id="accompanying_course_work_edit"></div>
{% set workflows_frame = chill_entity_workflow_list('Chill\\PersonBundle\\Entity\\AccompanyingPeriod\\AccompanyingPeriodWork', work.id) %}
{% if workflows_frame is not empty %}
{{ workflows_frame|raw }}
{% endif %}
</div>
{% endblock %}