fix(SPG-1262): ONLINE BOOKING - Redirect ke antrian jika tidak sama dengan today - seharusnya diarahkan ke halaman login jika invoice tidak sama dengan today
parent
7be4c26ef2
commit
92b54635d0
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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',
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue