fix: whatsapp notification not show
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/tag Build is passing Details

pull/119/head 1.4.2-alpha.1
shancheas 2024-12-22 09:33:22 +07:00
parent 26a6af2044
commit 903b7cfd18
1 changed files with 3 additions and 3 deletions

View File

@ -24,7 +24,7 @@ export class RegisterQueueManager extends BaseCreateManager<QueueModel> {
super(); super();
} }
private currentItemMaster; private currentItemMaster: ItemModel;
async averageTime(): Promise<number> { async averageTime(): Promise<number> {
const item = await this.getItemMaster(); const item = await this.getItemMaster();
@ -66,7 +66,7 @@ export class RegisterQueueManager extends BaseCreateManager<QueueModel> {
async getItemMaster(): Promise<ItemModel> { async getItemMaster(): Promise<ItemModel> {
const queueItem: QueueItemModel = await this.dataService.item.findOne({ const queueItem: QueueItemModel = await this.dataService.item.findOne({
relations: ['item'], relations: ['item', 'item.item_queue'],
where: { where: {
id: this.data.item_id, id: this.data.item_id,
}, },
@ -79,7 +79,7 @@ export class RegisterQueueManager extends BaseCreateManager<QueueModel> {
const notificationService = new WhatsappService(); const notificationService = new WhatsappService();
const item = this.currentItemMaster ?? (await this.getItemMaster()); const item = this.currentItemMaster ?? (await this.getItemMaster());
if (!item.use_notification) return; if (!item.item_queue.use_notification) return;
const queueTicket = await this.dataService.queueTicket(this.result.id); const queueTicket = await this.dataService.queueTicket(this.result.id);