summaryrefslogtreecommitdiffstats
path: root/client/components
diff options
context:
space:
mode:
authorSam X. Chen <sam.xi.chen@gmail.com>2019-08-15 14:29:02 -0400
committerSam X. Chen <sam.xi.chen@gmail.com>2019-08-15 14:29:02 -0400
commitf3147af2f75701b08c5464f8a7a2ab10a3d7d7a5 (patch)
treea34b4998b94909c88b7d81b06315f1a850e43018 /client/components
parent86d686fe1d008835b9db07e93cbe434ce34eb659 (diff)
parentc882ebe030ebc747a00a1b43768daf13c1645407 (diff)
downloadwekan-f3147af2f75701b08c5464f8a7a2ab10a3d7d7a5.tar.gz
wekan-f3147af2f75701b08c5464f8a7a2ab10a3d7d7a5.tar.bz2
wekan-f3147af2f75701b08c5464f8a7a2ab10a3d7d7a5.zip
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'client/components')
-rw-r--r--client/components/boards/boardBody.jade4
-rw-r--r--client/components/cards/cardDetails.js31
2 files changed, 33 insertions, 2 deletions
diff --git a/client/components/boards/boardBody.jade b/client/components/boards/boardBody.jade
index fd094a93..76a85d87 100644
--- a/client/components/boards/boardBody.jade
+++ b/client/components/boards/boardBody.jade
@@ -7,8 +7,8 @@ template(name="board")
+boardBody
else
//-- XXX We need a better error message in case the board has been archived
- //-- +message(label="board-not-found")
- | {{goHome}}
+ +message(label="board-not-found")
+ //-- | {{goHome}}
else
+spinner
diff --git a/client/components/cards/cardDetails.js b/client/components/cards/cardDetails.js
index 781967ae..cd8813f5 100644
--- a/client/components/cards/cardDetails.js
+++ b/client/components/cards/cardDetails.js
@@ -117,6 +117,37 @@ BlazeComponent.extendComponent({
},
onRendered() {
+ if (Meteor.settings.public.CARD_OPENED_WEBHOOK_ENABLED) {
+ // Send Webhook but not create Activities records ---
+ const card = this.currentData();
+ const userId = Meteor.userId();
+ //console.log(`userId: ${userId}`);
+ //console.log(`cardId: ${card._id}`);
+ //console.log(`boardId: ${card.boardId}`);
+ //console.log(`listId: ${card.listId}`);
+ //console.log(`swimlaneId: ${card.swimlaneId}`);
+ const params = {
+ userId,
+ cardId: card._id,
+ boardId: card.boardId,
+ listId: card.listId,
+ user: Meteor.user().username,
+ url: '',
+ };
+ //console.log('looking for integrations...');
+ const integrations = Integrations.find({
+ boardId: card.boardId,
+ type: 'outgoing-webhooks',
+ enabled: true,
+ activities: { $in: ['CardDetailsRendered', 'all'] },
+ }).fetch();
+ //console.log(`Investigation length: ${integrations.length}`);
+ if (integrations.length > 0) {
+ Meteor.call('outgoingWebhooks', integrations, 'CardSelected', params);
+ }
+ //-------------
+ }
+
if (!Utils.isMiniScreen()) {
Meteor.setTimeout(() => {
$('.card-details').mCustomScrollbar({