diff --git a/btc-UI/src/app/components/sidebar/sidebar.component.css b/btc-UI/src/app/components/sidebar/sidebar.component.css index c93e85a..5edc205 100755 --- a/btc-UI/src/app/components/sidebar/sidebar.component.css +++ b/btc-UI/src/app/components/sidebar/sidebar.component.css @@ -379,24 +379,26 @@ /* View RC Modal Box */ .viewrc-modal-box { - width: 800px; - height: 500px; - background: #fff; - color: black; + width: 1100px; + height: 800px; + background: hsl(210, 100%, 100%); + color: rgb(0, 0, 0); padding: 30px; border-radius: 6px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25); display: flex; flex-direction: column; + } /* View RC Modal Title */ .viewrc-modal-title { text-align: center; font-weight: bold; - font-size: 20px; + font-size: 25px; color: #2980b9; margin-bottom: 20px; + } /* View RC Modal Body */ @@ -408,10 +410,29 @@ flex: 1; margin-bottom: 20px; overflow-y: auto; /* πŸ‘ˆ Adds scroll when needed */ - max-height: 350px; /* πŸ‘ˆ Limit the height to leave space for footer */ + max-height: 700px; /* πŸ‘ˆ Limit the height to leave space for footer */ padding-right: 10px; /* Optional: avoids content touching scrollbar */ + border-radius: 0.6rem; + background-color: rgb(228, 237, 252); } +.new{ + color: #0077b6; + font-size: 1.8rem; + font-weight: bold; +} + +.table_col{ + color: rgb(19, 88, 128); + font-size: 1.5rem; + font-weight: bold; +} + +.table_col1{ + color: #01050f; + font-size: 1.5rem; + font-weight: bold; +} /* View RC Modal Footer */ .viewrc-modal-footer { display: flex; @@ -420,6 +441,17 @@ gap: 10px; } + +h4{ + font-size: 1.6rem; + font-weight: bold; +} + +.top{ + font-size: 1.4rem; + font-weight: bold; +} + .viewrc-cancel-btn, .viewrc-print-btn { flex: 1; diff --git a/btc-UI/src/app/components/sidebar/sidebar.component.html b/btc-UI/src/app/components/sidebar/sidebar.component.html index f017338..f785a2f 100755 --- a/btc-UI/src/app/components/sidebar/sidebar.component.html +++ b/btc-UI/src/app/components/sidebar/sidebar.component.html @@ -205,46 +205,47 @@ +

VIEW RC

-

πŸ“ Venue: {{ raceCardData.Venue }}

-

πŸ“… Date: {{ raceCardData.date }}

+

πŸ“ Venue: {{ raceCardData.Venue }}

+

πŸ“… Date: {{ raceCardData.date }}

πŸ‡ Race Lists

- - + + - - + +
RacesRace NumbersRacesRace Numbers
Race {{ i + 1 }}{{ races.join(', ') }}Race {{ i + 1 }}{{ races.join(' , ') }}
-

🎯 Combo Races

+

🎯Races

- - + + - - + +
PoolRacesPoolRaces
{{ pool }}{{ raceCardData.pools.comboRaces[pool].join(', ') }}{{ pool }}{{ raceCardData.pools.comboRaces[pool].join(' , ') }}
@@ -258,7 +259,6 @@
diff --git a/btc-UI/src/app/components/sidebar/sidebar.component.ts b/btc-UI/src/app/components/sidebar/sidebar.component.ts index 2b6d215..b9596dd 100755 --- a/btc-UI/src/app/components/sidebar/sidebar.component.ts +++ b/btc-UI/src/app/components/sidebar/sidebar.component.ts @@ -65,10 +65,57 @@ export class SidebarComponent { this.payoutTicketNo = ''; } - printPayoutTicket() { - alert(`Printing Payout Ticket No: ${this.payoutTicketNo}`); - this.closePayoutPopup(); - } + //--------------------Printer Logic added here ---------------------------------------------- + + + + +printPayoutTicket() { + console.log("πŸ–¨οΈ Print ticket clicked"); + alert(`Printing Payout Ticket No: ${this.payoutTicketNo}`); + + const TicketNumber = this.payoutTicketNo; + + // πŸ”“ Retrieve userName from localStorage + const userName = localStorage.getItem('userName') || 'Unknown'; + + const printData = { + TicketNumber: TicketNumber, + printedBy: userName, // Optional if you want to show it + Dividend: '10' + + }; + + // πŸ–¨οΈ Actual print request + const payload = { + type: 'payout', + ticketNumber: printData.TicketNumber, + printedBy: printData.printedBy, // Optional + dividend: printData.Dividend + }; + + fetch('http://localhost:9100/print', { + method: 'POST', + headers: { 'Content-Type': 'application/json' }, + body: JSON.stringify(payload) + }) + .then(response => { + if (!response.ok) { + throw new Error(`Printer error: ${response.status}`); + } + return response.text(); + }) + .then(result => { + console.log("βœ… Print successful:", result); + }) + .catch(error => { + console.error("❌ Print failed:", error); + }); + + this.closePayoutPopup(); +} + + openDepositPopup() { this.depositClick.emit();