From b13f52672664c98415bf19020ff47304dc1fe3b0 Mon Sep 17 00:00:00 2001 From: joan Date: Tue, 12 Apr 2022 13:01:34 +0200 Subject: [PATCH 1/4] Notify to group with for user with busy status --- back/methods/chat/sendCheckingPresence.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/back/methods/chat/sendCheckingPresence.js b/back/methods/chat/sendCheckingPresence.js index 5c27d72fd..c9254aeb8 100644 --- a/back/methods/chat/sendCheckingPresence.js +++ b/back/methods/chat/sendCheckingPresence.js @@ -46,7 +46,7 @@ module.exports = Self => { const {data} = await Self.getUserStatus(recipient.name); if (data) { - if (data.status === 'offline') { + if (data.status === 'offline' || data.status === 'busy') { // Send message to department room const workerDepartment = await models.WorkerDepartment.findById(recipientId, { include: { From 62daa6b38dd4e3d025cacb304c54b445ae2ebee5 Mon Sep 17 00:00:00 2001 From: joan Date: Tue, 12 Apr 2022 14:44:32 +0200 Subject: [PATCH 2/4] Send to user when no department channel is specified --- back/methods/chat/sendCheckingPresence.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/back/methods/chat/sendCheckingPresence.js b/back/methods/chat/sendCheckingPresence.js index c9254aeb8..6560240c6 100644 --- a/back/methods/chat/sendCheckingPresence.js +++ b/back/methods/chat/sendCheckingPresence.js @@ -58,6 +58,8 @@ module.exports = Self => { if (channelName) return Self.send(ctx, `#${channelName}`, `@${recipient.name} ➔ ${message}`); + else + return Self.send(ctx, `@${recipient.name}`, message); } else return Self.send(ctx, `@${recipient.name}`, message); } From 165af44d8518e2aca0775213d2942705ac3f9d7d Mon Sep 17 00:00:00 2001 From: alexm Date: Tue, 26 Apr 2022 09:49:18 +0200 Subject: [PATCH 3/4] fix(zone_delivery-days): await zone.Events.show() --- modules/zone/front/delivery-days/index.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/modules/zone/front/delivery-days/index.js b/modules/zone/front/delivery-days/index.js index e4d5e72e9..71e8c8ab7 100644 --- a/modules/zone/front/delivery-days/index.js +++ b/modules/zone/front/delivery-days/index.js @@ -73,15 +73,14 @@ class Controller extends Section { for (let event of $events) zoneIds.push(event.zoneFk); - this.$.zoneEvents.show($event.target); - const params = { zoneIds: zoneIds, date: day }; this.$http.post(`Zones/getZoneClosing`, params) - .then(res => this.zoneClosing = res.data); + .then(res => this.zoneClosing = res.data) + .then(() => this.$.zoneEvents.show($event.target)); } preview(zone) { From 3f074007058b3b83f45008b4ad50819271133896 Mon Sep 17 00:00:00 2001 From: alexm Date: Mon, 2 May 2022 12:28:17 +0200 Subject: [PATCH 4/4] fix(delivery-note): type not required --- print/templates/reports/delivery-note/delivery-note.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/print/templates/reports/delivery-note/delivery-note.js b/print/templates/reports/delivery-note/delivery-note.js index adda6e756..f9dba0578 100755 --- a/print/templates/reports/delivery-note/delivery-note.js +++ b/print/templates/reports/delivery-note/delivery-note.js @@ -7,6 +7,10 @@ const fs = require('fs-extra'); module.exports = { name: 'delivery-note', + created() { + if (!this.type) + this.type = 'deliveryNote'; + }, async serverPrefetch() { this.client = await this.fetchClient(this.ticketId); this.ticket = await this.fetchTicket(this.ticketId); @@ -129,7 +133,7 @@ module.exports = { }, type: { type: String, - required: true + required: false } } };