Skip to content

Commit

Permalink
update modal function
Browse files Browse the repository at this point in the history
Signed-off-by: Vinzenz Rosenkranz <[email protected]>
  • Loading branch information
v1r0x committed Oct 9, 2023
1 parent b420a3c commit e23d47d
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions resources/js/helpers/modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -759,18 +759,16 @@ export function showEditAttribute(aid, etid, metadata) {

export function showMultiEditAttribute(entityIds, attributes) {
const uid = `MultiEditAttribute-${getTs()}`;
store.getters.vfm.show({
const modal = useModal({
component: MultiEditAttribute,
bind: {
attrs: {
name: uid,
entityIds: entityIds,
attributes: attributes,
},
on: {
closing(e) {
store.getters.vfm.hide(uid);
onClosing(e) {
modal.destroy();
},
confirm(e) {
onConfirm(e) {
const values = e.values;
const entries = [];
for(let v in values) {
Expand All @@ -783,7 +781,7 @@ export function showMultiEditAttribute(entityIds, attributes) {
}
multieditAttributes(entityIds, entries).then(_ => {
store.dispatch("unsetTreeSelectionMode");
store.getters.vfm.hide(uid);
modal.destroy();
const title = t('main.entity.tree.multiedit.toast.saved.title');
const msg = t('main.entity.tree.multiedit.toast.saved.msg', {
attr_cnt: entries.length,
Expand All @@ -794,8 +792,9 @@ export function showMultiEditAttribute(entityIds, attributes) {
});
});
}
}
},
});
modal.open();
}

export function showRemoveAttribute(etid, aid, id, metadata, onDeleted) {
Expand Down

0 comments on commit e23d47d

Please sign in to comment.