Compare commits
No commits in common. "a8b3f67d1b739f4a11052e7dd1d1606fb72027cd" and "bef9f99f1320418993818217c9f6c4e98d1fc842" have entirely different histories.
a8b3f67d1b
...
bef9f99f13
|
@ -73,14 +73,13 @@ export class LoginAdminQueueManager extends BaseCustomManager<UserEntity> {
|
||||||
message: `Akun anda sudah login di item "${hasLoginAsQueue?.item_name}"`,
|
message: `Akun anda sudah login di item "${hasLoginAsQueue?.item_name}"`,
|
||||||
error: 'Unauthorized',
|
error: 'Unauthorized',
|
||||||
});
|
});
|
||||||
|
} else if (itemLogin && itemLogin.user_id !== this.userLogin.id) {
|
||||||
|
throw new UnauthorizedException({
|
||||||
|
statusCode: HttpStatus.UNAUTHORIZED,
|
||||||
|
message: `"${userLoginItem.name}" masih login sebagai admin antrian `,
|
||||||
|
error: 'Unauthorized',
|
||||||
|
});
|
||||||
}
|
}
|
||||||
// else if (itemLogin && itemLogin.user_id !== this.userLogin.id) {
|
|
||||||
// throw new UnauthorizedException({
|
|
||||||
// statusCode: HttpStatus.UNAUTHORIZED,
|
|
||||||
// message: `"${userLoginItem.name}" masih login sebagai admin antrian `,
|
|
||||||
// error: 'Unauthorized',
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
|
|
||||||
// * Disini untuk isi token
|
// * Disini untuk isi token
|
||||||
const tokenData = {
|
const tokenData = {
|
||||||
|
|
|
@ -144,7 +144,6 @@ export class GenerateQueueManager {
|
||||||
qty: data.qty,
|
qty: data.qty,
|
||||||
item_id: queue.id,
|
item_id: queue.id,
|
||||||
vip: isVip,
|
vip: isVip,
|
||||||
showTime: false,
|
|
||||||
};
|
};
|
||||||
const registerQueueManager = new RegisterQueueManager(
|
const registerQueueManager = new RegisterQueueManager(
|
||||||
this.bucketService,
|
this.bucketService,
|
||||||
|
|
|
@ -43,7 +43,6 @@ export class RegisterQueueManager extends BaseCreateManager<QueueModel> {
|
||||||
|
|
||||||
async beforeProcess(): Promise<void> {
|
async beforeProcess(): Promise<void> {
|
||||||
const vip = this.data.vip ?? false;
|
const vip = this.data.vip ?? false;
|
||||||
const showTime = this.data.showTime ?? true;
|
|
||||||
const item = await this.getItemMaster();
|
const item = await this.getItemMaster();
|
||||||
this.currentItemMaster = item;
|
this.currentItemMaster = item;
|
||||||
const [, end] = await this.queueTime(item.item_queue_id);
|
const [, end] = await this.queueTime(item.item_queue_id);
|
||||||
|
@ -57,7 +56,7 @@ export class RegisterQueueManager extends BaseCreateManager<QueueModel> {
|
||||||
|
|
||||||
Object.assign(this.data, {
|
Object.assign(this.data, {
|
||||||
status: STATUS.WAITING,
|
status: STATUS.WAITING,
|
||||||
time: showTime ? end : undefined,
|
time: end,
|
||||||
item_queue_id: item.item_queue_id,
|
item_queue_id: item.item_queue_id,
|
||||||
vip,
|
vip,
|
||||||
code,
|
code,
|
||||||
|
|
Loading…
Reference in New Issue