free table - save to archive

This commit is contained in:
Jan Prochazka
2021-03-14 13:18:29 +01:00
parent 7cd26c4fe4
commit 49337a4112
9 changed files with 152 additions and 10 deletions

View File

@@ -1,4 +1,5 @@
import { openedModals } from '../stores';
import { get } from 'svelte/store';
import uuidv1 from 'uuid/v1';
import _ from 'lodash';
@@ -12,5 +13,10 @@ export function closeModal(modalId) {
}
export function closeCurrentModal() {
openedModals.update(x => _.dropRight(x));
openedModals.update(modals => modals.slice(0, modals.length - 1));
}
export function getActiveModalId() {
const modals = get(openedModals);
return modals[modals.length - 1]?.modalId;
}