feat: modal

UI.notification-modules-changes
Saeid 4 years ago
parent f07abce489
commit 2467a49792

@ -21,17 +21,16 @@ const global = {
...mapActions("modal", [
"$_dialog",
"$_helper",
"openModal",
"__openModal",
"$_closeModal"
]),
$_openModal(name, data) {
$_openModal(name, data = {}) {
if (typeof name == 'object') {
this.openModal(name)
this.__openModal(name)
} else {
this.openModal({...data, ...{name}})
this.__openModal({...data, ...{name}})
}
},
$_can,
$_name,

@ -2,7 +2,7 @@ import $_can from "@Global/policy/can";
export default {
openModal({ state, rootState }, data) { // data: {name, rel, model, form_data, data, modal_pop_data, type}
__openModal({ state, rootState }, data) { // data: {name, rel, model, form_data, data, modal_pop_data, type}
let can = true;
if (data.can) {
can = $_can(data.can);
@ -57,7 +57,7 @@ export default {
$_dialog:({commit, dispatch}, properties) => {
properties['name'] = 'modal_dialog';
dispatch('openModal', properties);
dispatch('__openModal', properties);
commit('SET_DIALOG_TYPE', properties.type);
commit('SET_DIALOG_PROPERTIES', properties);
@ -67,6 +67,6 @@ export default {
let data = {};
data['name'] = 'modal_helper';
data['slug'] = slug;
dispatch('openModal', data);
dispatch('__openModal', data);
},
};

Loading…
Cancel
Save