fix : userid fixed for payout and cancel
This commit is contained in:
parent
2cb45a6857
commit
ab680256b7
@ -22,7 +22,7 @@ export class SidebarComponent {
|
|||||||
|
|
||||||
showPayout: boolean = false;
|
showPayout: boolean = false;
|
||||||
payoutTicketNo: string = '';
|
payoutTicketNo: string = '';
|
||||||
|
usrid: string | null = null;
|
||||||
showDeposit: boolean = false;
|
showDeposit: boolean = false;
|
||||||
depositOperatorId = '';
|
depositOperatorId = '';
|
||||||
depositShroffId = '';
|
depositShroffId = '';
|
||||||
@ -119,12 +119,16 @@ async printTicketCancel() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
console.log('[✅ MATCH] Ticket No matches barcode. Proceeding to cancel...');
|
console.log('[✅ MATCH] Ticket No matches barcode. Proceeding to cancel...');
|
||||||
|
this.btid = localStorage.getItem('btid');
|
||||||
|
this.usrid = localStorage.getItem('employeeId');
|
||||||
|
const userid = this.usrid ? this.usrid.slice(-3) : '';
|
||||||
|
console.log("empl id", this.usrid)
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const cancelReq = {
|
const cancelReq = {
|
||||||
ticketNo: lastTicket.barcodeId,
|
ticketNo: lastTicket.barcodeId,
|
||||||
btId: lastTicket.btId || "0485",
|
btId: this.btid,
|
||||||
usrId: lastTicket.usrId || "066"
|
usrId: userid
|
||||||
};
|
};
|
||||||
|
|
||||||
console.log("📡 Sending cancel request:", cancelReq);
|
console.log("📡 Sending cancel request:", cancelReq);
|
||||||
@ -242,7 +246,10 @@ async printPayoutTicket() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const userName = localStorage.getItem('userName') || 'Unknown';
|
const userName = localStorage.getItem('userName') || 'Unknown';
|
||||||
|
this.btid = localStorage.getItem('btid');
|
||||||
|
this.usrid = localStorage.getItem('employeeId');
|
||||||
|
const userid = this.usrid ? this.usrid.slice(-3) : '';
|
||||||
|
console.log("empl id", this.usrid)
|
||||||
// Prepare request payload
|
// Prepare request payload
|
||||||
const apiPayload = {
|
const apiPayload = {
|
||||||
ticketNo: ticketNo,
|
ticketNo: ticketNo,
|
||||||
@ -250,8 +257,8 @@ async printPayoutTicket() {
|
|||||||
memAcctNum: "",
|
memAcctNum: "",
|
||||||
memAcctCardCode: "",
|
memAcctCardCode: "",
|
||||||
moneyTyp: "C",
|
moneyTyp: "C",
|
||||||
btId: "0485", // replace with dynamic btId if needed
|
btId: this.btid, // replace with dynamic btId if needed
|
||||||
usrId: "341" // replace with dynamic usrId if needed
|
usrId: userid // replace with dynamic usrId if needed
|
||||||
};
|
};
|
||||||
|
|
||||||
console.log("📡 Sending payout API request:", apiPayload);
|
console.log("📡 Sending payout API request:", apiPayload);
|
||||||
@ -772,5 +779,3 @@ objectKeys = Object.keys;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user