mirror of
https://github.com/wekan/wekan.git
synced 2026-01-06 09:38:49 +01:00
Merge pull request #6052 from Chostakovitch/6048-dnd-lists
Merge list component methods with same name
This commit is contained in:
commit
6c9e8a4aa8
2 changed files with 275 additions and 476 deletions
File diff suppressed because it is too large
Load diff
|
|
@ -481,7 +481,7 @@ Meteor.methods({
|
|||
throw new Meteor.Error('list-not-found', 'List not found');
|
||||
}
|
||||
|
||||
const validUpdateFields = ['sort', 'swimlaneId'];
|
||||
const validUpdateFields = ['sort', 'swimlaneId', 'updatedAt', 'modifiedAt'];
|
||||
Object.keys(updateData).forEach(field => {
|
||||
if (!validUpdateFields.includes(field)) {
|
||||
throw new Meteor.Error('invalid-field', `Field ${field} is not allowed`);
|
||||
|
|
@ -934,7 +934,7 @@ Lists.helpers({
|
|||
hasMovedFromOriginalPosition() {
|
||||
const history = this.getOriginalPosition();
|
||||
if (!history) return false;
|
||||
|
||||
|
||||
const currentSwimlaneId = this.swimlaneId || null;
|
||||
return history.originalPosition.sort !== this.sort ||
|
||||
history.originalSwimlaneId !== currentSwimlaneId;
|
||||
|
|
@ -946,9 +946,9 @@ Lists.helpers({
|
|||
getOriginalPositionDescription() {
|
||||
const history = this.getOriginalPosition();
|
||||
if (!history) return 'No original position data';
|
||||
|
||||
const swimlaneInfo = history.originalSwimlaneId ?
|
||||
` in swimlane ${history.originalSwimlaneId}` :
|
||||
|
||||
const swimlaneInfo = history.originalSwimlaneId ?
|
||||
` in swimlane ${history.originalSwimlaneId}` :
|
||||
' in default swimlane';
|
||||
return `Original position: ${history.originalPosition.sort || 0}${swimlaneInfo}`;
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue