fix(SPG-1262): ONLINE BOOKING - Redirect ke antrian jika tidak sama dengan today - seharusnya diarahkan ke halaman login jika invoice tidak sama dengan today

pull/142/head 1.6.25-alpha.2
shancheas 2025-06-25 15:48:59 +07:00
parent 7be4c26ef2
commit 92b54635d0
2 changed files with 20 additions and 20 deletions

View File

@ -51,27 +51,27 @@ export class TicketDataService extends BaseDataService<QueueTicket> {
],
});
if (!order) {
const { customer_name, customer_phone } =
await this.transaction.findOneOrFail({
where: {
id,
},
});
// if (!order) {
// const { customer_name, customer_phone } =
// await this.transaction.findOneOrFail({
// where: {
// id,
// },
// });
const start = moment().startOf('day').valueOf();
const end = moment().endOf('day').valueOf();
const order = this.order.findOneOrFail({
relations: ['tickets'],
where: {
customer: customer_name,
phone: customer_phone,
date: Between(start, end),
},
});
// const start = moment().startOf('day').valueOf();
// const end = moment().endOf('day').valueOf();
// const order = this.order.findOneOrFail({
// relations: ['tickets'],
// where: {
// customer: customer_name,
// phone: customer_phone,
// date: Between(start, end),
// },
// });
return order;
}
// return order;
// }
return order;
}

View File

@ -56,7 +56,7 @@ export class QueueOrchestrator {
return order;
} catch (error) {
throw new UnauthorizedException({
message: 'Invoice tidak ditemukan',
message: 'Invoice tidak ditemukan untuk tanggal hari ini',
error: 'INVOICE_NOT_FOUND',
});
}