mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 07:03:49 +00:00
make Address works with household context
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user