Card Details, description edit is now saved at popup

This commit is contained in:
Martin Filser 2021-10-18 16:32:57 +02:00
parent 125c84b6b5
commit fb66b84b58
5 changed files with 36 additions and 11 deletions

View file

@ -1,4 +1,25 @@
Utils = {
getCurrentCardId() {
let ret = Session.get('currentCard');
if (!ret) {
ret = Utils.getPopupCardId();
}
return ret;
},
getPopupCardId() {
const ret = Session.get('popupCard');
return ret;
},
getCurrentCard() {
const cardId = Utils.getCurrentCardId();
const ret = Cards.findOne(cardId);
return ret;
},
getPopupCard() {
const cardId = Utils.getPopupCardId();
const ret = Cards.findOne(cardId);
return ret;
},
reload () {
// we move all window.location.reload calls into this function
// so we can disable it when running tests.