mirror of
https://github.com/wekan/wekan.git
synced 2025-04-24 14:08:31 -04:00
Merge pull request #4923 from DimDz/master
Fix for the Create Card at Calendar
This commit is contained in:
commit
2d683ea198
2 changed files with 22 additions and 0 deletions
|
@ -328,6 +328,7 @@ BlazeComponent.extendComponent({
|
|||
id: 'calendar-view',
|
||||
defaultView: 'agendaDay',
|
||||
editable: true,
|
||||
selecatble: true,
|
||||
timezone: 'local',
|
||||
weekNumbers: true,
|
||||
header: {
|
||||
|
|
|
@ -2943,6 +2943,27 @@ function cardCreation(userId, doc) {
|
|||
});
|
||||
}
|
||||
|
||||
Meteor.methods({
|
||||
createCardWithDueDate: function(boardId, listId, title, dueDate, swimlaneId) {
|
||||
check(boardId, String);
|
||||
check(listId, String);
|
||||
check(title, String);
|
||||
check(dueDate, Date);
|
||||
check(swimlaneId, String);
|
||||
const card = {
|
||||
title,
|
||||
listId,
|
||||
boardId,
|
||||
swimlaneId,
|
||||
createdAt: new Date(),
|
||||
dueAt: dueDate,
|
||||
sort: 0,
|
||||
};
|
||||
const cardId = Cards.insert(card);
|
||||
return cardId;
|
||||
},
|
||||
});
|
||||
|
||||
function cardRemover(userId, doc) {
|
||||
ChecklistItems.remove({
|
||||
cardId: doc._id,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue