make Address works with household context

This commit is contained in:
2021-08-07 17:25:04 +02:00
parent 9f77b84e48
commit 63fbf4b249
8 changed files with 165 additions and 89 deletions

View File

@@ -19,7 +19,7 @@
</div>
<add-address
v-bind:key="addAddress.type"
v-bind:key="context.entity.type"
v-bind:context="context"
v-bind:options="addAddress.options"
v-bind:result="addAddress.result"
@@ -39,40 +39,44 @@ export default {
return {
context: {
edit: window.mode === 'edit',
personId: window.personId,
addressId: window.addressId,
entity: {
type: window.entityType,
id: window.entityId
},
addressId: window.addressId | null,
backUrl: window.backUrl,
},
addAddress: {
options: {
/// Options override default.
/// null value take default component value
/// null value take default component value defined in AddAddress data()
button: {
text: {
/// if create or edit address
create: window.buttonText || null,
edit: window.buttonText || null
},
type: window.button.type || null,
size: window.button.size || null,
display: window.button.display
display: window.button.display //boolean, default: true
},
/// Modal title text if create or edit address (trans chain, see i18n)
title: {
create: window.modalTitle || null,
edit: window.modalTitle || null
},
/// Display each step in page or Modal
bindModal: {
step1: window.binModalStep1,
step2: window.binModalStep2
step1: window.binModalStep1, //boolean, default: true
step2: window.binModalStep2 //boolean, default: true
},
// Options only for root parent component
displayResult: true,
redirectToBackUrl: true
},
type: 'person',
result: null // <== returned from addAddress component
}
}