mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 15:13:50 +00:00
slot buttons up from actionButtons to addAddress
This commit is contained in:
@@ -11,9 +11,11 @@
|
||||
{{ $t(getSuccessText) }}
|
||||
</div>
|
||||
|
||||
<address-render-box :address="address"></address-render-box>
|
||||
<address-render-box v-if="!onlyButton" :address="address"></address-render-box>
|
||||
|
||||
<action-buttons :flag="this.flag" :options="this.options" :default="this.default">
|
||||
<action-buttons
|
||||
:options="this.options"
|
||||
:defaultz="this.defaultz">
|
||||
<template v-slot:action>
|
||||
<li>
|
||||
<button @click.prevent="$emit('openEditPane')"
|
||||
@@ -40,7 +42,7 @@ export default {
|
||||
props: [
|
||||
'context',
|
||||
'options',
|
||||
'default',
|
||||
'defaultz',
|
||||
'flag',
|
||||
'entity',
|
||||
'errorMsg'
|
||||
@@ -52,10 +54,10 @@ export default {
|
||||
},
|
||||
displayTextButton() {
|
||||
return (typeof this.options.button !== 'undefined' && typeof this.options.button.displayText !== 'undefined') ?
|
||||
this.options.button.displayText : this.default.button.displayText;
|
||||
this.options.button.displayText : this.defaultz.button.displayText;
|
||||
},
|
||||
getClassButton() {
|
||||
let type = (this.context.edit) ? this.default.button.type.edit : this.default.button.type.create;
|
||||
let type = (this.context.edit) ? this.defaultz.button.type.edit : this.defaultz.button.type.create;
|
||||
let size = (typeof this.options.button !== 'undefined' && this.options.button.size !== null) ?
|
||||
`${this.options.button.size} ` : '';
|
||||
return `${size}${type}`;
|
||||
@@ -67,7 +69,7 @@ export default {
|
||||
)) {
|
||||
return (this.context.edit) ? this.options.button.text.edit : this.options.button.text.create;
|
||||
}
|
||||
return (this.context.edit) ? this.default.button.text.edit : this.default.button.text.create;
|
||||
return (this.context.edit) ? this.defaultz.button.text.edit : this.defaultz.button.text.create;
|
||||
},
|
||||
getSuccessText() {
|
||||
switch (this.context.entity.name) {
|
||||
@@ -80,6 +82,10 @@ export default {
|
||||
default:
|
||||
return (this.context.edit) ? 'address_edit_success' : 'address_new_success';
|
||||
}
|
||||
},
|
||||
onlyButton() {
|
||||
return (typeof this.options.onlyButton !== 'undefined') ?
|
||||
this.options.onlyButton : this.defaultz.onlyButton;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
Reference in New Issue
Block a user