mirror of
https://github.com/wekan/wekan.git
synced 2026-02-28 10:54:07 +01:00
Move every Cards.find(idOrFirstObjectSelector, options) to the ReactiveCache (directory client/)
This commit is contained in:
parent
66c2140911
commit
7673c77c57
11 changed files with 38 additions and 34 deletions
|
|
@ -977,10 +977,11 @@ BlazeComponent.extendComponent({
|
|||
cards() {
|
||||
const currentId = Utils.getCurrentCardId();
|
||||
if (this.parentBoard.get()) {
|
||||
return Cards.find({
|
||||
const ret = ReactiveCache.getCards({
|
||||
boardId: this.parentBoard.get(),
|
||||
_id: { $ne: currentId },
|
||||
});
|
||||
return ret;
|
||||
} else {
|
||||
return [];
|
||||
}
|
||||
|
|
@ -1023,7 +1024,7 @@ BlazeComponent.extendComponent({
|
|||
'click .js-delete': Popup.afterConfirm('cardDelete', function () {
|
||||
Popup.close();
|
||||
// verify that there are no linked cards
|
||||
if (Cards.find({ linkedId: this._id }).count() === 0) {
|
||||
if (ReactiveCache.getCards({ linkedId: this._id }).length === 0) {
|
||||
Cards.remove(this._id);
|
||||
} else {
|
||||
// TODO: Maybe later we can list where the linked cards are.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue