From 7562fc1e1fd5733ef64e6bfc34cb0d28dd726b30 Mon Sep 17 00:00:00 2001 From: Ho Ngoc Hai Date: Tue, 3 Mar 2026 20:02:15 +0700 Subject: [PATCH] feat(web-client-tpos): add receipt print with thermal 80mm layout - Create pos-helpers.js with printPosReceipt JS function - Add PrintReceipt method to CafeDesktop.razor (thermal receipt HTML) - Save receipt items/payment data before cart reset - Register pos-helpers.js in index.html - Inject IJSRuntime for print popup --- .../Pages/Pos/Cafe/CafeDesktop.razor | 60 ++++++++++++++++++- .../WebClientTpos.Client/wwwroot/index.html | 4 ++ .../wwwroot/js/pos-helpers.js | 24 ++++++++ 3 files changed, 87 insertions(+), 1 deletion(-) create mode 100644 apps/web-client-tpos-net/src/WebClientTpos.Client/wwwroot/js/pos-helpers.js diff --git a/apps/web-client-tpos-net/src/WebClientTpos.Client/Pages/Pos/Cafe/CafeDesktop.razor b/apps/web-client-tpos-net/src/WebClientTpos.Client/Pages/Pos/Cafe/CafeDesktop.razor index 63042313..aa92bcf3 100644 --- a/apps/web-client-tpos-net/src/WebClientTpos.Client/Pages/Pos/Cafe/CafeDesktop.razor +++ b/apps/web-client-tpos-net/src/WebClientTpos.Client/Pages/Pos/Cafe/CafeDesktop.razor @@ -10,6 +10,7 @@ @using WebClientTpos.Client.Services @inject AuthService AuthService @inject PosDataService DataService +@inject IJSRuntime JS @* ═══════════════ MAIN CONTENT AREA ═══════════════ *@
@@ -224,7 +225,8 @@
@FormatPrice(_lastOrderTotal)
Mã: @_lastTransactionId
-