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