Merge branch 'test' of https://gitea.verdnatura.es/verdnatura/salix into dev
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Joan Sanchez 2022-05-09 16:09:17 +02:00
commit 7365143eac
3 changed files with 10 additions and 5 deletions

View File

@ -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: {
@ -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);
}

View File

@ -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) {

View File

@ -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
}
}
};