mirror of
https://github.com/wekan/wekan.git
synced 2025-12-29 13:48:49 +01:00
Create custom fields creation UI added to Board Menu, Model in progress
This commit is contained in:
parent
43a58c92ac
commit
ade3c02122
13 changed files with 239 additions and 0 deletions
|
|
@ -41,6 +41,9 @@ Activities.helpers({
|
|||
checklistItem() {
|
||||
return Checklists.findOne(this.checklistId).getItem(this.checklistItemId);
|
||||
},
|
||||
customField() {
|
||||
return CustomFields.findOne(this.customFieldId);
|
||||
},
|
||||
});
|
||||
|
||||
Activities.before.insert((userId, doc) => {
|
||||
|
|
@ -57,6 +60,7 @@ if (Meteor.isServer) {
|
|||
Activities._collection._ensureIndex({ boardId: 1, createdAt: -1 });
|
||||
Activities._collection._ensureIndex({ commentId: 1 }, { partialFilterExpression: { commentId: { $exists: true } } });
|
||||
Activities._collection._ensureIndex({ attachmentId: 1 }, { partialFilterExpression: { attachmentId: { $exists: true } } });
|
||||
Activities._collection._ensureIndex({ customFieldId: 1 }, { partialFilterExpression: { customFieldId: { $exists: true } } });
|
||||
});
|
||||
|
||||
Activities.after.insert((userId, doc) => {
|
||||
|
|
@ -123,6 +127,10 @@ if (Meteor.isServer) {
|
|||
const checklistItem = activity.checklistItem();
|
||||
params.checklistItem = checklistItem.title;
|
||||
}
|
||||
if (activity.customFieldId) {
|
||||
const customField = activity.customField();
|
||||
params.customField = customField.name;
|
||||
}
|
||||
if (board) {
|
||||
const watchingUsers = _.pluck(_.where(board.watchers, {level: 'watching'}), 'userId');
|
||||
const trackingUsers = _.pluck(_.where(board.watchers, {level: 'tracking'}), 'userId');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue