diff --git a/client/components/boards/boardBody.js b/client/components/boards/boardBody.js
index 14a5f3ada..784316bb7 100644
--- a/client/components/boards/boardBody.js
+++ b/client/components/boards/boardBody.js
@@ -422,6 +422,45 @@ BlazeComponent.extendComponent({
revertFunc();
}
},
+ select: function(startDate) {
+ const currentBoard = Boards.findOne(Session.get('currentBoard'));
+ const currentUser = Meteor.user();
+ const $modal = $(`
+
+ `);
+ $modal.modal('show');
+ $modal.find('#create-card-button').click(function() {
+ const myTitle = $modal.find('#card-title-input').val();
+ if (myTitle) {
+ const firstList = currentBoard.draggableLists().fetch()[0];
+ const firstSwimlane = currentBoard.swimlanes().fetch()[0];
+ Meteor.call('createCardWithDueDate', currentBoard._id, firstList._id, myTitle, startDate.toDate(), firstSwimlane._id, function(error, result) {
+ if (error) {
+ console.log(error);
+ } else {
+ console.log("Card Created", result);
+ }
+ });
+ $modal.modal('hide');
+ }
+ });
+ },
+ };
};
},
isViewCalendar() {