feat: add configuration to show estimation queue time

pull/129/head
shancheas 2025-04-03 21:54:35 +07:00
parent eb4da7ccc4
commit dc5e938f75
2 changed files with 3 additions and 1 deletions

View File

@ -144,6 +144,7 @@ export class GenerateQueueManager {
qty: data.qty,
item_id: queue.id,
vip: isVip,
showTime: false,
};
const registerQueueManager = new RegisterQueueManager(
this.bucketService,

View File

@ -43,6 +43,7 @@ export class RegisterQueueManager extends BaseCreateManager<QueueModel> {
async beforeProcess(): Promise<void> {
const vip = this.data.vip ?? false;
const showTime = this.data.showTime ?? true;
const item = await this.getItemMaster();
this.currentItemMaster = item;
const [, end] = await this.queueTime(item.item_queue_id);
@ -56,7 +57,7 @@ export class RegisterQueueManager extends BaseCreateManager<QueueModel> {
Object.assign(this.data, {
status: STATUS.WAITING,
time: end,
time: showTime ? end : undefined,
item_queue_id: item.item_queue_id,
vip,
code,