mirror of
https://github.com/wekan/wekan.git
synced 2025-12-16 15:30:13 +01:00
Checklistitems are now inserted always at the end of the checklist
This commit is contained in:
parent
d5ea44a760
commit
e8b6b78dfa
2 changed files with 6 additions and 1 deletions
|
|
@ -111,7 +111,7 @@ BlazeComponent.extendComponent({
|
||||||
title,
|
title,
|
||||||
checklistId: checklist._id,
|
checklistId: checklist._id,
|
||||||
cardId: checklist.cardId,
|
cardId: checklist.cardId,
|
||||||
sort: checklist.itemCount(),
|
sort: Utils.calculateIndexData(checklist.lastItem()).base,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
// We keep the form opened, empty it.
|
// We keep the form opened, empty it.
|
||||||
|
|
|
||||||
|
|
@ -91,6 +91,11 @@ Checklists.helpers({
|
||||||
{ sort: ['sort'] },
|
{ sort: ['sort'] },
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
lastItem() {
|
||||||
|
const allItems = this.items().fetch();
|
||||||
|
const ret = allItems[allItems.length - 1];
|
||||||
|
return ret;
|
||||||
|
},
|
||||||
finishedCount() {
|
finishedCount() {
|
||||||
return ChecklistItems.find({
|
return ChecklistItems.find({
|
||||||
checklistId: this._id,
|
checklistId: this._id,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue