add basic on-the-fly sub-components, to show/edit/create person/thirdparty

This commit is contained in:
2021-05-31 19:25:37 +02:00
parent 158b572879
commit 718d6c2375
7 changed files with 151 additions and 8 deletions

View File

@@ -15,11 +15,29 @@
<template v-slot:header>
<h3 class="modal-title">{{ $t(titleModal) }}</h3>
</template>
<template v-slot:body>
{{ action }}
{{ type }}
{{ id }}
<template v-slot:body v-if="type === 'person'">
<on-the-fly-person
v-bind:id="id"
v-bind:type="type"
v-bind:action="action">
</on-the-fly-person>
</template>
<template v-slot:body v-else-if="type === 'thirdparty'">
<on-the-fly-thirdparty
v-bind:id="id"
v-bind:type="type"
v-bind:action="action">
</on-the-fly-thirdparty>
</template>
<template v-slot:body v-else>
<on-the-fly-create
v-bind:action="action">
</on-the-fly-create>
</template>
<template v-slot:footer>
<button class="sc-button bt-save"> <!-- @click.prevent="$emit('..', ..)" -->
{{ $t('action.save')}}
@@ -33,11 +51,17 @@
<script>
import Modal from 'ChillMainAssets/vuejs/_components/Modal';
import OnTheFlyPerson from './OnTheFly/Person.vue';
import OnTheFlyThirdparty from './OnTheFly/ThirdParty.vue';
import OnTheFlyCreate from './OnTheFly/Create.vue';
export default {
name: 'OnTheFly',
components: {
Modal
Modal,
OnTheFlyPerson,
OnTheFlyThirdparty,
OnTheFlyCreate
},
props: ['type', 'id', 'action', 'buttonText'],
data() {