button added to add contact to personne morale (styling not correct yet) + opening of onTheFly thirdparty, but conditions and parameters not yet correct

This commit is contained in:
Julie Lenaerts 2022-01-12 17:38:24 +01:00
parent c1232037a9
commit ea66fb4c37
3 changed files with 126 additions and 94 deletions

View File

@ -39,6 +39,16 @@
</on-the-fly-thirdparty>
</template>
<template v-slot:body v-else-if="action === 'addContact'">
<on-the-fly-thirdparty
:parent="parent"
type="thirdparty"
action="create"
kind="child"
ref="castThirdparty">
</on-the-fly-thirdparty>
</template>
<template v-slot:body v-else>
<on-the-fly-create
v-bind:action="action"
@ -78,7 +88,7 @@ export default {
OnTheFlyThirdparty,
OnTheFlyCreate
},
props: ['type', 'id', 'action', 'buttonText', 'displayBadge'],
props: ['type', 'id', 'action', 'buttonText', 'displayBadge', 'parent'],
emits: ['saveFormOnTheFly'],
data() {
return {
@ -98,6 +108,8 @@ export default {
return 'btn-update';
case 'create':
return 'btn-create';
case 'addContact':
return 'btn-create';
}
},
titleAction() {

View File

@ -23,6 +23,11 @@
:entity="item.result"
:options="{ displayLong: true }">
</badge-entity>
<on-the-fly
type="thirdparty"
action="create"
:parent="item.result"
></on-the-fly>
<on-the-fly
type="thirdparty"
v-bind:id="item.result.id"

View File

@ -21,7 +21,7 @@
</div>
</div>
<div v-else-if="action === 'edit' || action === 'create'">
{{ action }}
<div class="form-floating mb-3" v-if="thirdparty.kind !== 'child'">
<div class="form-check">
<input class="form-check-input mt-0" type="radio" v-model="kind" value="company" id="tpartyKindInstitution">
@ -44,7 +44,22 @@
</div>
<div v-else>
<p>Contact de&nbsp;:</p>
<third-party-render-box :thirdparty="thirdparty.parent"
<third-party-render-box v-if="thirdparty.parent"
:thirdparty="thirdparty.parent"
:options="{
addInfo: true,
addEntity: false,
addAltNames: true,
addId: false,
addLink: false,
addAge: false,
hLevel: 4,
addCenter: false,
addNoData: true,
isMultiline: false
}"></third-party-render-box>
<third-party-render-box v-else
:thirdparty="parent"
:options="{
addInfo: true,
addEntity: false,