You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
willaengine/resources/js/Global/store/modules/modal/getters.js

21 lines
867 B

export default {
isModal: (state, getters, rootState) => modal => {
let modalArray = modal.split("/");
if (modalArray.length == 2) {
return rootState[modalArray[0]]["modal"][modalArray[1]];
} else {
return rootState.modal[modalArray[0]];
}
5 years ago
},
getDialogProperties:(state) => state.dialogProperties,
getDialogType:(state) => state.dialogType,
5 years ago
getActiveModal:(state) => state.modals[state.modals.length],
getModalsName:(state) => state.modals.map(x => x.name),
getModals:(state) => state.modals.map(x => x.name),
getModal:(state) => (name) => state.modals[state.modals.findIndex(x => x.name == name)],
isActiveModal:(state) => (name) => state.modals[state.modals.length].name == name,
isInModals:(state) => (name) => state.modals.findIndex(x => x.name == name) != -1 ,
};