mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 15:13:50 +00:00
improve addAddress
This commit is contained in:
@@ -11,7 +11,13 @@
|
||||
{{ $t(getSuccessText) }}
|
||||
</div>
|
||||
|
||||
<address-render-box v-if="!onlyButton" :address="address"></address-render-box>
|
||||
<div v-if="noAddressWithStickyActions" class="mt-5">
|
||||
<p class="chill-no-data-statement">
|
||||
{{ $t('not_yet_address') }}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<address-render-box v-if="!hideAddress" :address="address"></address-render-box>
|
||||
|
||||
<action-buttons
|
||||
:options="this.options"
|
||||
@@ -72,7 +78,7 @@ export default {
|
||||
return (this.context.edit) ? this.defaultz.button.text.edit : this.defaultz.button.text.create;
|
||||
},
|
||||
getSuccessText() {
|
||||
switch (this.context.entity.name) {
|
||||
switch (this.context.target.name) {
|
||||
/*
|
||||
case 'household':
|
||||
return (this.context.edit) ? 'household_address_edit_success' : 'household_address_move_success';
|
||||
@@ -83,9 +89,12 @@ export default {
|
||||
return (this.context.edit) ? 'address_edit_success' : 'address_new_success';
|
||||
}
|
||||
},
|
||||
onlyButton() {
|
||||
return (typeof this.options.onlyButton !== 'undefined') ?
|
||||
this.options.onlyButton : this.defaultz.onlyButton;
|
||||
hideAddress() {
|
||||
return (typeof this.options.hideAddress !== 'undefined') ?
|
||||
this.options.hideAddress : this.defaultz.hideAddress;
|
||||
},
|
||||
noAddressWithStickyActions() {
|
||||
return !this.context.edit && !this.address.id && this.options.stickyActions;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
Reference in New Issue
Block a user