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) {
|
// if (!order) {
|
||||||
const { customer_name, customer_phone } =
|
// const { customer_name, customer_phone } =
|
||||||
await this.transaction.findOneOrFail({
|
// await this.transaction.findOneOrFail({
|
||||||
where: {
|
// where: {
|
||||||
id,
|
// id,
|
||||||
},
|
// },
|
||||||
});
|
// });
|
||||||
|
|
||||||
const start = moment().startOf('day').valueOf();
|
// const start = moment().startOf('day').valueOf();
|
||||||
const end = moment().endOf('day').valueOf();
|
// const end = moment().endOf('day').valueOf();
|
||||||
const order = this.order.findOneOrFail({
|
// const order = this.order.findOneOrFail({
|
||||||
relations: ['tickets'],
|
// relations: ['tickets'],
|
||||||
where: {
|
// where: {
|
||||||
customer: customer_name,
|
// customer: customer_name,
|
||||||
phone: customer_phone,
|
// phone: customer_phone,
|
||||||
date: Between(start, end),
|
// date: Between(start, end),
|
||||||
},
|
// },
|
||||||
});
|
// });
|
||||||
|
|
||||||
return order;
|
// return order;
|
||||||
}
|
// }
|
||||||
|
|
||||||
return order;
|
return order;
|
||||||
}
|
}
|
||||||
|
|
|
@ -56,7 +56,7 @@ export class QueueOrchestrator {
|
||||||
return order;
|
return order;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
throw new UnauthorizedException({
|
throw new UnauthorizedException({
|
||||||
message: 'Invoice tidak ditemukan',
|
message: 'Invoice tidak ditemukan untuk tanggal hari ini',
|
||||||
error: 'INVOICE_NOT_FOUND',
|
error: 'INVOICE_NOT_FOUND',
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue