fix : partialy fixed gui for payout
This commit is contained in:
parent
3e31f5c2dd
commit
148de807f7
@ -534,3 +534,8 @@ strong{
|
|||||||
color: red;
|
color: red;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.print-btn[disabled] {
|
||||||
|
opacity: 0.5;
|
||||||
|
cursor: not-allowed;
|
||||||
|
}
|
||||||
|
|||||||
@ -73,11 +73,25 @@
|
|||||||
<div class="warning-message" *ngIf="payoutWarning">{{ payoutWarning }}</div>
|
<div class="warning-message" *ngIf="payoutWarning">{{ payoutWarning }}</div>
|
||||||
<div class="modal-loading" *ngIf="loadingMessage">{{ loadingMessage }}</div>
|
<div class="modal-loading" *ngIf="loadingMessage">{{ loadingMessage }}</div>
|
||||||
|
|
||||||
<div class="modal-footer">
|
<!-- <div class="modal-footer">
|
||||||
<button class="cancel-btn" (click)="closePayoutPopup()">CANCEL</button>
|
<button class="cancel-btn" (click)="closePayoutPopup()">CANCEL</button>
|
||||||
<button class="erase-btn" (click)="erasePayoutTicket()">ERASE</button>
|
<button class="erase-btn" (click)="erasePayoutTicket()">ERASE</button>
|
||||||
<button class="print-btn" (click)="printPayoutTicket()">PRINT</button>
|
<button class="print-btn" (click)="printPayoutTicket()">PRINT</button>
|
||||||
|
</div> -->
|
||||||
|
<!-- inside PAY-OUT modal-footer -->
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button class="cancel-btn" (click)="closePayoutPopup()">CANCEL</button>
|
||||||
|
<button class="erase-btn" (click)="erasePayoutTicket()" [disabled]="!!loadingMessage">ERASE</button>
|
||||||
|
<!-- safe: coerce to '' before trim -->
|
||||||
|
<button
|
||||||
|
class="print-btn"
|
||||||
|
(click)="printPayoutTicket()"
|
||||||
|
[disabled]="!!loadingMessage || !( (payoutTicketNo || '') .trim() )"
|
||||||
|
>
|
||||||
|
PRINT
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@ -293,14 +293,13 @@ payoutWarning = ''; // show GUI message when payout response is not as expected
|
|||||||
async printPayoutTicket() {
|
async printPayoutTicket() {
|
||||||
console.log("🖨️ Print payout clicked");
|
console.log("🖨️ Print payout clicked");
|
||||||
this.payoutWarning = '';
|
this.payoutWarning = '';
|
||||||
this.loadingMessage = 'Printing cancel ticket — please wait...';
|
|
||||||
const ticketNo = this.payoutTicketNo?.toString().trim();
|
const ticketNo = this.payoutTicketNo?.toString().trim();
|
||||||
if (!ticketNo) {
|
if (!ticketNo) {
|
||||||
console.warn("⚠️ No payout ticket number set.");
|
console.warn("⚠️ No payout ticket number set.");
|
||||||
this.payoutWarning = '❌ No payout ticket number set.';
|
this.payoutWarning = '❌ No payout ticket number set.';
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
this.loadingMessage = 'Printing payout — please wait...';
|
||||||
const userName = localStorage.getItem('userName') || 'Unknown';
|
const userName = localStorage.getItem('userName') || 'Unknown';
|
||||||
this.btid = localStorage.getItem('btid');
|
this.btid = localStorage.getItem('btid');
|
||||||
this.usrid = localStorage.getItem('userid');
|
this.usrid = localStorage.getItem('userid');
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user