tin-spa 20.14.113 → 20.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/core/index.d.ts +71 -10
  2. package/fesm2022/{tin-spa-accounting.module-Cg4vWaJE.mjs → tin-spa-accounting.module-BILkGXdD.mjs} +77 -89
  3. package/fesm2022/tin-spa-accounting.module-BILkGXdD.mjs.map +1 -0
  4. package/fesm2022/{tin-spa-agent-page.component-DJvMPjCQ.mjs → tin-spa-agent-page.component-Cp4bqg6t.mjs} +2 -2
  5. package/fesm2022/{tin-spa-agent-page.component-DJvMPjCQ.mjs.map → tin-spa-agent-page.component-Cp4bqg6t.mjs.map} +1 -1
  6. package/fesm2022/{tin-spa-agent.component-D0CGGnGZ.mjs → tin-spa-agent.component-B9lNOt77.mjs} +4 -4
  7. package/fesm2022/{tin-spa-agent.component-D0CGGnGZ.mjs.map → tin-spa-agent.component-B9lNOt77.mjs.map} +1 -1
  8. package/fesm2022/{tin-spa-assets.module-qIWNwJ2E.mjs → tin-spa-assets.module-DmJme9IP.mjs} +16 -11
  9. package/fesm2022/tin-spa-assets.module-DmJme9IP.mjs.map +1 -0
  10. package/fesm2022/tin-spa-core.mjs +380 -112
  11. package/fesm2022/tin-spa-core.mjs.map +1 -1
  12. package/fesm2022/{tin-spa-general-erp.module-CoYxceLj.mjs → tin-spa-general-erp.module-XyprAx0S.mjs} +2 -2
  13. package/fesm2022/{tin-spa-general-erp.module-CoYxceLj.mjs.map → tin-spa-general-erp.module-XyprAx0S.mjs.map} +1 -1
  14. package/fesm2022/{tin-spa-hr.module-CKPZ9ZOj.mjs → tin-spa-hr.module-nk3eBN8I.mjs} +2 -2
  15. package/fesm2022/{tin-spa-hr.module-CKPZ9ZOj.mjs.map → tin-spa-hr.module-nk3eBN8I.mjs.map} +1 -1
  16. package/fesm2022/tin-spa-http.mjs +32 -1
  17. package/fesm2022/tin-spa-http.mjs.map +1 -1
  18. package/fesm2022/{tin-spa-inventory.module-DRKAcNau.mjs → tin-spa-inventory.module-Dht0gTeq.mjs} +16 -11
  19. package/fesm2022/tin-spa-inventory.module-Dht0gTeq.mjs.map +1 -0
  20. package/fesm2022/{tin-spa-loans.module-BTDmgrWo.mjs → tin-spa-loans.module-CZrynkhJ.mjs} +2 -2
  21. package/fesm2022/{tin-spa-loans.module-BTDmgrWo.mjs.map → tin-spa-loans.module-CZrynkhJ.mjs.map} +1 -1
  22. package/fesm2022/{tin-spa-manufacturing.module-CHta6oV_.mjs → tin-spa-manufacturing.module-DN8362Ms.mjs} +2 -2
  23. package/fesm2022/{tin-spa-manufacturing.module-CHta6oV_.mjs.map → tin-spa-manufacturing.module-DN8362Ms.mjs.map} +1 -1
  24. package/fesm2022/{tin-spa-payroll.module-CZ_GO1jF.mjs → tin-spa-payroll.module-DLD8XGfX.mjs} +12 -9
  25. package/fesm2022/{tin-spa-payroll.module-CZ_GO1jF.mjs.map → tin-spa-payroll.module-DLD8XGfX.mjs.map} +1 -1
  26. package/fesm2022/{tin-spa-purchasing.module-NCdwquaF.mjs → tin-spa-purchasing.module-D4tSAY7P.mjs} +16 -11
  27. package/fesm2022/tin-spa-purchasing.module-D4tSAY7P.mjs.map +1 -0
  28. package/fesm2022/{tin-spa-sales.module-D0uEGJW7.mjs → tin-spa-sales.module-BoM6453x.mjs} +40 -17
  29. package/fesm2022/tin-spa-sales.module-BoM6453x.mjs.map +1 -0
  30. package/fesm2022/{tin-spa-tenancy-erp.module-GwIv8Wbc.mjs → tin-spa-tenancy-erp.module-BhlUtBMA.mjs} +2 -2
  31. package/fesm2022/{tin-spa-tenancy-erp.module-GwIv8Wbc.mjs.map → tin-spa-tenancy-erp.module-BhlUtBMA.mjs.map} +1 -1
  32. package/fesm2022/{tin-spa-tin-spa-Cqe5hYTr.mjs → tin-spa-tin-spa-Ca9PhXiH.mjs} +2410 -247
  33. package/fesm2022/tin-spa-tin-spa-Ca9PhXiH.mjs.map +1 -0
  34. package/fesm2022/tin-spa.mjs +1 -1
  35. package/http/index.d.ts +3 -1
  36. package/index.d.ts +386 -25
  37. package/package.json +1 -1
  38. package/src/tin-styles.css +27 -0
  39. package/fesm2022/tin-spa-accounting.module-Cg4vWaJE.mjs.map +0 -1
  40. package/fesm2022/tin-spa-assets.module-qIWNwJ2E.mjs.map +0 -1
  41. package/fesm2022/tin-spa-inventory.module-DRKAcNau.mjs.map +0 -1
  42. package/fesm2022/tin-spa-purchasing.module-NCdwquaF.mjs.map +0 -1
  43. package/fesm2022/tin-spa-sales.module-D0uEGJW7.mjs.map +0 -1
  44. package/fesm2022/tin-spa-tin-spa-Cqe5hYTr.mjs.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tin-spa-sales.module-BoM6453x.mjs","sources":["../../../projects/tin-spa/src/lib/pages/sales/sales-orders/sales-orders.component.ts","../../../projects/tin-spa/src/lib/pages/sales/sales/sales.component.ts","../../../projects/tin-spa/src/lib/pages/sales/sales-dashboard/sales-dashboard.component.ts","../../../projects/tin-spa/src/lib/pages/sales/point-of-sale/pos-session.service.ts","../../../projects/tin-spa/src/lib/pages/sales/point-of-sale/pos-tile/pos-tile.component.ts","../../../projects/tin-spa/src/lib/pages/sales/point-of-sale/pos-tile/pos-tile.component.html","../../../projects/tin-spa/src/lib/pages/sales/point-of-sale/pos-wide/pos-wide.component.ts","../../../projects/tin-spa/src/lib/pages/sales/point-of-sale/pos-wide/pos-wide.component.html","../../../projects/tin-spa/src/lib/pages/sales/point-of-sale/pos-tender/pos-tender.component.ts","../../../projects/tin-spa/src/lib/pages/sales/point-of-sale/pos-tender/pos-tender.component.html","../../../projects/tin-spa/src/lib/pages/sales/point-of-sale/pos-compact/pos-compact.component.ts","../../../projects/tin-spa/src/lib/pages/sales/point-of-sale/pos-compact/pos-compact.component.html","../../../projects/tin-spa/src/lib/pages/sales/point-of-sale/pos.component.ts","../../../projects/tin-spa/src/lib/pages/sales/point-of-sale/pos.component.html","../../../projects/tin-spa/src/lib/pages/sales/point-of-sale/point-of-sale.component.ts","../../../projects/tin-spa/src/lib/pages/sales/point-of-sale/point-of-sale.component.html","../../../projects/tin-spa/src/lib/modules/sales/sales-routing.module.ts","../../../projects/tin-spa/src/lib/pages/sales/point-of-sale/pos.module.ts","../../../projects/tin-spa/src/lib/modules/sales/sales.module.ts"],"sourcesContent":["import { Component, inject, OnInit } from '@angular/core';\nimport { PageConfig } from 'tin-spa/core';\nimport { SalesService } from 'tin-spa/core'; // Changed: Use SalesService instead of InventoryService\n\n@Component({\n selector: 'spa-sales-orders',\n template: '<spa-page [config]=\"pageConfig\"></spa-page>',\n standalone: false\n})\nexport class SalesOrdersComponent implements OnInit {\n private salesService = inject(SalesService); // Changed: Use SalesService\n\n ngOnInit(): void { }\n\n pageConfig: PageConfig = {\n title: 'Sales Orders',\n tableConfig: this.salesService.salesOrdersTableConfig // Changed: Use SalesService\n };\n}\n","import { Component, inject } from '@angular/core';\nimport { SalesService } from 'tin-spa/core'; // Changed: Use SalesService instead of InventoryService\nimport { PageConfig } from 'tin-spa/core';\n\n@Component({\n selector: 'app-sales',\n template: '<spa-page [config]=\"config\"></spa-page>',\n standalone: false\n})\nexport class SalesComponent {\n private salesService = inject(SalesService); // Changed: Use SalesService\n\n config: PageConfig = {\n title: 'Sales',\n tableConfig: this.salesService.salesTableConfig // Changed: Use SalesService\n };\n}\n","import { Component } from '@angular/core';\nimport { TileConfig, ChartConfig } from 'tin-spa/core';\nimport { DataServiceLib } from 'tin-spa/core'; // Added (dashboard-alignment 1-D.3): the CapItem source the whole-config security gates read\n\n// Sales module dashboard with revenue tracking and pipeline visibility\n@Component({\n selector: 'spa-sales-dashboard',\n template: `\n <div class=\"dashboard-container\">\n <h4 class=\"dashboard-title\"><mat-icon>point_of_sale</mat-icon> Sales Dashboard</h4>\n <spa-tiles [config]=\"summaryTiles\"></spa-tiles>\n <!-- Changed: Chart tiles for sales visual indicators -->\n <div style=\"margin-top: 16px;\"></div>\n <spa-tiles [config]=\"chartTiles\"></spa-tiles>\n <spa-charts [config]=\"chartConfig\"></spa-charts>\n <!-- Added (dashboard-alignment 1-D.2): MOVED DOWN from the main overview dashboard, which was the only\n page showing it. The module dashboard is the deeper page. -->\n <spa-tiles [config]=\"overviewChartTiles\"></spa-tiles>\n </div>\n `,\n styles: [`\n .dashboard-container { padding: 16px; }\n .dashboard-title { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; color: #333; font-weight: 500; }\n `],\n standalone: false\n})\nexport class SalesDashboardComponent {\n\n constructor(private dataService: DataServiceLib) { }\n\n summaryTiles: TileConfig = {\n tiles: [\n { name: 'salesRevenue', alias: 'Sales Revenue (MTD)', color: '#4caf50', icon: 'attach_money', style: 'icon', info: 'Total sales revenue this month' }, // Changed: Removed prefix\n { name: 'salesCount', alias: 'Sales Count', color: '#2196f3', icon: 'shopping_cart', style: 'icon', info: 'Number of sales this month' },\n { name: 'avgSaleValue', alias: 'Avg Sale Value', color: '#ff9800', icon: 'analytics', style: 'icon', info: 'Average sale value this month' }, // Changed: Removed prefix\n { name: 'creditSalesOutstanding', alias: 'Credit Outstanding', color: '#f44336', icon: 'credit_card', style: 'icon', info: 'Outstanding credit sale amounts' }, // Changed: Removed prefix\n { name: 'topProduct', alias: 'Top Product', color: '#9c27b0', icon: 'star', style: 'icon', info: 'Best selling product this month' },\n ],\n loadAction: { url: 'sales/dashboard-summary/x' }, // Changed: Use module-specific CustomCriteria endpoint\n loadInit: true,\n security: { allow: [this.dataService.capSalesDashboard] } // Added (dashboard-alignment 1-D.3): cap61 (datalib.service.ts:580) — a single-module dashboard, so the gate sits on the whole config\n };\n\n // Changed: Chart-style tiles now use loadAction with dataField for dynamic data\n chartTiles: TileConfig = {\n tiles: [\n { name: 'conversionRate', alias: 'Conversion Rate', color: '#4caf50', chart: { type: 'doughnut', gaugeColor: '#4caf50', height: 130, dataField: 'conversionRate' }, footer: 'Quote to sale conversion', footerIcon: 'swap_horiz' }, // Changed: dataField replaces gaugeValue\n { name: 'salesTrendSpark', alias: 'Sales Trend', color: '#2196f3', chart: { type: 'line', color: '#2196f3', height: 100, dataField: 'salesTrendSpark' }, footer: 'Last 12 months', footerIcon: 'show_chart' }, // Changed: dataField replaces inline data\n { name: 'paymentSplit', alias: 'Payment Methods', color: '#9c27b0', chart: { type: 'doughnut', colors: ['#4caf50', '#2196f3', '#ff9800', '#9c27b0'], height: 130, dataField: 'paymentSplit' }, footer: 'Current distribution', footerIcon: 'payment' }, // Changed: dataField replaces inline data\n ],\n loadAction: { url: 'sales/dashboard-chart-tiles/x' }, // Changed: Load chart tile data from API\n loadInit: true,\n security: { allow: [this.dataService.capSalesDashboard] } // Added (dashboard-alignment 1-D.3): cap61\n };\n\n chartConfig: ChartConfig = {\n charts: [\n { name: 'salesTrend', title: 'Sales Revenue Trend', type: 'line', height: '300px', showPoints: true, tension: 0.4, colors: ['#4caf50', '#2196f3'], showLegend: true }, // Changed: showLegend for line chart\n { name: 'paymentMethods', title: 'Payment Method Breakdown', type: 'doughnut', height: '300px', colors: ['#4caf50', '#2196f3', '#ff9800', '#9c27b0', '#f44336'] },\n { name: 'topProducts', title: 'Top Selling Products', type: 'bar', height: '300px', colors: ['#4caf50', '#66bb6a', '#81c784', '#a5d6a7', '#c8e6c9'] },\n { name: 'orderPipeline', title: 'Sales Order Pipeline', type: 'bar', height: '300px', colors: ['#9e9e9e', '#2196f3', '#4caf50', '#f44336', '#ff9800'] },\n ],\n loadAction: { url: 'sales/dashboard-charts/x' }, // Changed: Use module-specific CustomCriteria endpoint\n loadInit: true,\n columns: 2,\n security: { allow: [this.dataService.capSalesDashboard] } // Added (dashboard-alignment 1-D.3): cap61\n };\n\n // Added (dashboard-alignment 1-D.2): monthlyOrders MOVED here from the main overview dashboard, which was\n // the only page showing it. It keeps its own load endpoint because sales/dashboard-chart-tiles does not\n // carry the key; that endpoint's monthlyOrders is gated on cap61 server-side (TinErp DashboardController,\n // 4b4290b) — the same cap declared here.\n overviewChartTiles: TileConfig = {\n tiles: [\n { name: 'monthlyOrders', alias: 'Monthly Orders', color: '#9c27b0', chart: { type: 'bar', colors: ['#9c27b0', '#ba68c8', '#ce93d8', '#e1bee7', '#9c27b0', '#ba68c8'], height: 100, dataField: 'monthlyOrders' }, footer: 'Last 6 months', footerIcon: 'bar_chart' },\n ],\n loadAction: { url: 'dashboard/overview/chart-tiles' },\n loadInit: true,\n security: { allow: [this.dataService.capSalesDashboard] }\n };\n}\n","import { Injectable, inject } from '@angular/core';\nimport { HttpClient } from '@angular/common/http';\nimport { Observable, from, of } from 'rxjs';\nimport { catchError, map, switchMap } from 'rxjs/operators';\nimport { HttpService } from 'tin-spa/core';\nimport { silentContext } from 'tin-spa/core'; // Added (POS Phase 5): Quiet Loading — see fetchSaleNumber\nimport { PosConfig, PosLine, PosProduct, PosSaleResult, PosTender, PosTotals } from '../../../classes/PosClasses';\n\n// Point of Sale — the shared till core (POS Phase 3).\n//\n// 🔑 THIS SERVICE IS THE WHOLE TILL. Every rule a sale obeys — what is in the cart, what it costs, what tax\n// it carries, what change is due, what gets posted — lives here and ONLY here. Phases 4 and 6 add a wide\n// presentation and a phone presentation; both bind to THIS object. That is what makes the owner's \"do not\n// duplicate code\" requirement structural rather than a promise: there is nowhere else for a second copy of\n// the arithmetic to live, and rotating a tablet mid-sale swaps the template over state that never moved.\n//\n// 🔑 PROVIDED BY THE SHELL, NOT IN ROOT. `spa-pos` lists it in its own `providers`, so the cart belongs to\n// the till page and is destroyed with it. A root-provided cart would survive navigation and hand the next\n// operator the last one's basket.\n//\n// ⚠️ NO ALLOCATING GETTERS. `totals` and `changeDue` are plain FIELDS recomputed on mutation, never getters\n// that build a new object per change-detection pass (template-bound-getters-banned — that pattern caused a\n// real livelock in this library).\n@Injectable()\nexport class PosSessionService {\n\n private httpService = inject(HttpService);\n private http = inject(HttpClient);\n\n // ---------------------------------------------------------------- state\n\n config: PosConfig = {};\n lines: PosLine[] = [];\n\n // Added (POS Phase 4): THE CATALOGUE LIVES HERE, NOT IN THE SHELL. fsd.md:255 puts \"product catalogue +\n // category filter + search/scan resolution\" in this service alongside the cart, and the reason is the same\n // reason the cart is here: rotating a tablet mid-sale swaps the template, and anything held by a\n // presentation component would be rebuilt from nothing on the other side. The operator would lose their\n // category and their half-typed search along with the basket. `filtered` is a plain FIELD recomputed by\n // applyFilter(), never a getter — an allocating getter bound to *ngFor over a catalogue is exactly the\n // pattern that caused a real livelock in this library (template-bound-getters-banned).\n products: PosProduct[] = [];\n categories: string[] = [];\n activeCategory = ''; // '' = every category\n search = '';\n filtered: PosProduct[] = [];\n loadingProducts = false;\n totals: PosTotals = { itemCount: 0, unitCount: 0, subTotal: 0, taxAmount: 0, total: 0, shelfTotal: 0, taxAdded: 0 };\n tender: PosTender = { method: 0, amountTendered: null, reference: '' }; // Changed (POS Phase 5): 0 is Cash in TinWeb's PaymentMethod enum (Sale.cs:17). It was 1, which is BankTransfer — a cash sale was being recorded, and printed, as a transfer\n changeDue = 0;\n customerID: number | null = null;\n notes = '';\n submitting = false;\n lastResult: PosSaleResult | null = null;\n\n // ---------------------------------------------------------------- defaults\n\n // Defaults are read through these rather than written into `config`, so a consumer that supplies a partial\n // config still gets the library's endpoints for everything it left out.\n get submitUrl(): string { return this.config.submitUrl ?? 'sales/pos-sale'; }\n get receiptUrl(): string { return this.config.receiptUrl ?? 'sales/receipt'; }\n get quickCashDenominations(): number[] { return this.config.quickCashDenominations ?? [1, 2, 5, 10, 20, 50, 100]; }\n\n configure(config?: PosConfig) {\n this.config = config ?? {};\n this.tender.method = this.config.defaultPaymentMethod ?? 0; // Changed (POS Phase 5): 0 = Cash (Sale.cs:17), not 1 = BankTransfer\n // Added (POS Phase 5): the configured walk-in customer. See the note on PosConfig.customerID — the server\n // refuses a sale with no customer, so a till with nothing set here cannot record a sale at all.\n this.customerID = this.config.customerID ?? null;\n }\n\n // ---------------------------------------------------------------- catalogue (Phase 4)\n\n // Added (POS Phase 4): seeds the catalogue from a list the host already holds. The shell calls this when a\n // consumer passes [products] directly — the demo/review surfaces and any app that has already loaded its\n // own product list — so nothing has to go to the network twice.\n setProducts(products: PosProduct[]) {\n this.products = products ?? [];\n this.categories = [];\n\n for (const product of this.products) {\n const category = product.category ?? '';\n if (category && this.categories.indexOf(category) < 0) this.categories.push(category);\n }\n\n this.applyFilter();\n }\n\n // Added (POS Phase 4): loads the catalogue once per till session, never per keystroke (fsd.md:431 item 5 —\n // the cart must never wait on the network). Failure leaves the previous catalogue in place and is silent\n // here: a till must not throw an alarming modal at an operator with a customer in front of them\n // (fsd.md:433). The caller decides what, if anything, to say.\n loadProducts(): Observable<boolean> {\n this.loadingProducts = true;\n\n return this.httpService.Get(this.config.productLoadUrl ?? 'products/list/pos').pipe(\n map((response: any) => {\n this.loadingProducts = false;\n const rows = response?.data ?? response ?? [];\n this.setProducts(Array.isArray(rows) ? rows : []);\n return true;\n }),\n catchError(() => {\n this.loadingProducts = false;\n return of(false);\n })\n );\n }\n\n setCategory(category: string) {\n this.activeCategory = category ?? '';\n this.applyFilter();\n }\n\n setSearch(term: string) {\n this.search = term ?? '';\n this.applyFilter();\n }\n\n // Rebuilds `filtered` in one pass. Category AND term, both case-insensitive, matching on name OR code so a\n // keyboard-wedge scanner typing a barcode into the same box narrows the grid to that one product.\n private applyFilter() {\n const term = this.search.trim().toLowerCase();\n const category = this.activeCategory;\n const matched: PosProduct[] = [];\n\n for (const product of this.products) {\n if (category && (product.category ?? '') !== category) continue;\n if (term) {\n const name = (product.name ?? '').toLowerCase();\n const code = (product.code ?? '').toLowerCase();\n if (name.indexOf(term) < 0 && code.indexOf(term) < 0) continue;\n }\n matched.push(product);\n }\n\n this.filtered = matched;\n }\n\n // Exact code match, for the scanner. A wedge scanner ends its burst with Enter, so the caller resolves on\n // submit rather than per keystroke. Returns null when nothing matches — the caller must not guess.\n resolveCode(code: string): PosProduct | null {\n const wanted = (code ?? '').trim().toLowerCase();\n if (!wanted) return null;\n return this.products.find(p => (p.code ?? '').toLowerCase() === wanted) ?? null;\n }\n\n // How many of a product are already on the ticket — what the tile's counter badge shows. A small linear\n // scan over a cart that is single digits long in practice; it is called from the shell's materialisation\n // step, never from a template binding.\n quantityInCart(productID: number): number {\n const line = this.lines.find(l => l.productID != null && l.productID === productID);\n return line ? line.quantity : 0;\n }\n\n // ---------------------------------------------------------------- money\n\n // One rounding helper for the whole till. Cents, half-up, and nothing else rounds anywhere in this file —\n // a second rounding rule is how a receipt total stops matching the drawer.\n private static cents(value: number): number {\n return Math.round((value + Number.EPSILON) * 100) / 100;\n }\n\n // 🔴 THE ONE PIECE OF TAX ARITHMETIC, AND WHY IT EXISTS. TinWeb stores Sale.SubTotal as the sum of\n // Quantity x UnitPrice (SalesController.CalculateSubTotal:183) and defines Sale.TotalAmount as\n // SubTotal + TaxAmount (Sale.cs:137). VERIFIED against the create path: SalesController.OnCreate:307\n // recomputes SubTotal and Discount but NOT TaxAmount, and SaleItemsController does no tax arithmetic on\n // create either — so the client is authoritative on tax and the server adds it on top of whatever\n // UnitPrice it is given. Posting a tax-INCLUSIVE shelf price as UnitPrice would therefore charge the tax\n // TWICE. Inclusive lines are converted to a net unit here, using the same formula\n // InvoiceItemsController.cs:212-220 already uses for invoice lines, so the two documents cannot diverge.\n private priceLine(line: PosLine): PosLine {\n const gross = line.quantity * line.shelfUnitPrice;\n\n if (line.taxRate > 0 && line.isTaxInclusive) {\n line.taxAmount = PosSessionService.cents(gross - (gross / (1 + line.taxRate / 100)));\n line.netAmount = PosSessionService.cents(gross - line.taxAmount);\n } else {\n line.netAmount = PosSessionService.cents(gross);\n line.taxAmount = line.taxRate > 0 ? PosSessionService.cents(line.netAmount * (line.taxRate / 100)) : 0;\n }\n\n // The unit price the SERVER is posted. Left unrounded on purpose: the server recomputes\n // Quantity x UnitPrice and a unit rounded to cents would drift from netAmount on any quantity above 1.\n line.unitPrice = line.quantity !== 0 ? line.netAmount / line.quantity : line.netAmount;\n line.lineTotal = PosSessionService.cents(line.netAmount + line.taxAmount);\n // Added (POS Phase 5): the tile price multiplied out — see the note on PosLine.shelfAmount. Derived from\n // `gross` above rather than recomputed, so it cannot drift from the figure the tax split was taken from.\n line.shelfAmount = PosSessionService.cents(gross);\n return line;\n }\n\n // Recomputes every derived figure. Called by every mutation below — there is no path that changes the cart\n // without going through it.\n private recompute() {\n let subTotal = 0;\n let taxAmount = 0;\n let unitCount = 0;\n let shelfTotal = 0; // Added (POS Phase 5)\n let taxAdded = 0; // Added (POS Phase 5) — tax this till puts ON TOP of the shelf prices\n\n for (const line of this.lines) {\n this.priceLine(line);\n subTotal += line.netAmount;\n taxAmount += line.taxAmount;\n unitCount += line.quantity;\n shelfTotal += line.shelfAmount;\n if (!line.isTaxInclusive) taxAdded += line.taxAmount; // An inclusive line's tax is already inside shelfAmount\n }\n\n this.totals = {\n itemCount: this.lines.length,\n unitCount: PosSessionService.cents(unitCount),\n subTotal: PosSessionService.cents(subTotal),\n taxAmount: PosSessionService.cents(taxAmount),\n total: PosSessionService.cents(subTotal + taxAmount),\n shelfTotal: PosSessionService.cents(shelfTotal),\n taxAdded: PosSessionService.cents(taxAdded)\n };\n\n this.recomputeChange();\n }\n\n // Change is FLOORED AT ZERO, mirroring the server's SalesService.CalculateChangeGiven exactly. An\n // under-tender shows no change at all — never a negative one, which at a counter reads as money owed back.\n private recomputeChange() {\n const tendered = this.tender.amountTendered;\n this.changeDue = tendered == null ? 0 : Math.max(0, PosSessionService.cents(tendered - this.totals.total));\n }\n\n // ---------------------------------------------------------------- cart\n\n // Adding the same product again INCREMENTS its line rather than appending a second one — a till operator\n // scanning four identical tins must see \"4\", not four rows to read past.\n addProduct(product: PosProduct, quantity = 1) {\n if (!product || quantity <= 0) return;\n\n const existing = this.lines.find(l => l.productID != null && l.productID === product.productID);\n if (existing) {\n existing.quantity = PosSessionService.cents(existing.quantity + quantity);\n } else {\n this.lines.push({\n productID: product.productID ?? null,\n name: product.name,\n code: product.code,\n quantity: quantity,\n shelfUnitPrice: product.unitPrice ?? 0,\n unitPrice: product.unitPrice ?? 0,\n taxRate: product.taxRate ?? 0,\n isTaxInclusive: product.isTaxInclusive ?? false,\n netAmount: 0,\n taxAmount: 0,\n lineTotal: 0,\n shelfAmount: 0\n });\n }\n\n this.recompute();\n }\n\n increment(line: PosLine, by = 1) {\n if (!line) return;\n this.setQuantity(line, PosSessionService.cents(line.quantity + by));\n }\n\n // Decrementing the last unit REMOVES the line. Leaving a zero-quantity row on the screen invites the\n // operator to charge for it, and a zero line posted to the server is a line with no meaning.\n decrement(line: PosLine, by = 1) {\n if (!line) return;\n this.setQuantity(line, PosSessionService.cents(line.quantity - by));\n }\n\n setQuantity(line: PosLine, quantity: number) {\n if (!line) return;\n\n if (!(quantity > 0)) {\n this.removeLine(line);\n return;\n }\n\n line.quantity = quantity;\n this.recompute();\n }\n\n removeLine(line: PosLine) {\n const index = this.lines.indexOf(line);\n if (index < 0) return;\n this.lines.splice(index, 1);\n this.recompute();\n }\n\n // Empties the till for the next customer. `lastResult` is deliberately NOT cleared — the sale number of\n // the sale just completed is what the operator reads out and what the receipt button reprints.\n clear() {\n this.lines = [];\n // Changed (POS Phase 5): resets to the CONFIGURED walk-in customer, not to null. Clearing it outright would\n // let the first sale of the day succeed and every one after it be refused with \"Customer is required\" —\n // a failure that would look like an intermittent server fault rather than a cleared field.\n this.customerID = this.config.customerID ?? null;\n this.notes = '';\n this.tender = { method: this.config.defaultPaymentMethod ?? 0, amountTendered: null, reference: '' }; // Changed (POS Phase 5): 0 = Cash\n this.recompute();\n }\n\n // ---------------------------------------------------------------- tender\n\n setTendered(amount: number | null) {\n this.tender.amountTendered = amount == null ? null : PosSessionService.cents(amount);\n this.recomputeChange();\n }\n\n setPaymentMethod(method: number) {\n this.tender.method = method;\n }\n\n // The cart is chargeable when there is something in it worth money. An empty cart, or one whose lines all\n // priced to nothing, must not reach the endpoint — the server would create a zero sale and consume a sale\n // number that a customer never sees.\n get canCharge(): boolean {\n return this.lines.length > 0 && this.totals.total > 0 && !this.submitting;\n }\n\n // The client-side mirror of the server's under-tender gate (SalesController.cs:239), carrying the SAME\n // half-cent tolerance so an exact-amount tender can never be refused here as one cent short while the\n // server would have accepted it. This is a courtesy check for the button state — the server's gate is the\n // real one and it refuses BEFORE anything is created.\n get isTenderSufficient(): boolean {\n const tendered = this.tender.amountTendered;\n return tendered == null || tendered >= this.totals.total - 0.005;\n }\n\n // ---------------------------------------------------------------- submit\n\n // The payload for POST sales/pos-sale.\n //\n // 🔴 `multipleProducts: true` IS LOAD-BEARING AND VERIFIED, not a stylistic choice.\n // SalesController.ProcessCreateEntity:408 branches on it: false routes to\n // SalesService.CreateQuickSingleSale, which reads the NotMapped ProductID/Quantity/UnitPrice trio and\n // ignores Items entirely — a cart posted without this flag would be created as a sale with no lines.\n // Every till sale therefore takes the multi-line base pipeline, one path, whether the basket holds one\n // item or twenty.\n buildPayload(): any {\n return {\n saleDate: new Date(),\n customerID: this.customerID,\n multipleProducts: true,\n paymentMethod: this.tender.method,\n paymentReference: this.tender.reference ?? '',\n taxAmount: this.totals.taxAmount, // The server does NOT recompute this — see priceLine above\n notes: this.notes,\n amountTendered: this.tender.amountTendered,\n items: this.lines.map(l => ({\n productID: l.productID,\n quantity: l.quantity,\n unitPrice: l.unitPrice,\n taxRate: l.taxRate,\n taxAmount: l.taxAmount,\n isTaxInclusive: l.isTaxInclusive,\n itemName: l.name\n }))\n };\n }\n\n // Completes the sale in ONE call, so a flaky counter connection cannot half-complete one.\n //\n // 🔴 A FAILED SUBMIT KEEPS THE CART. This is the single most important behaviour in this service. The\n // customer is standing there with their shopping already scanned; losing the basket on a refusal or a\n // dropped connection means scanning the whole trolley again. The cart is cleared ONLY on a success, and\n // the HTTP error path is caught rather than left to propagate for exactly the same reason.\n submit(): Observable<PosSaleResult> {\n if (this.submitting) return of({ success: false, message: 'A sale is already being completed', saleID: null, changeGiven: null });\n if (this.lines.length === 0) return of({ success: false, message: 'There is nothing to charge', saleID: null, changeGiven: null });\n\n this.submitting = true;\n const expectedChange = this.changeDue;\n\n return this.httpService.Post(this.submitUrl, this.buildPayload()).pipe(\n map((response: any) => {\n this.submitting = false;\n const result: PosSaleResult = {\n success: response?.success === true,\n message: response?.message ?? '',\n saleID: response?.data ?? null,\n saleNumber: response?.saleNumber,\n changeGiven: response?.success === true ? expectedChange : null\n };\n\n this.lastResult = result;\n if (result.success) this.clear(); // Success ONLY — see the note above\n return result;\n }),\n catchError(() => {\n this.submitting = false;\n const result: PosSaleResult = { success: false, message: 'The sale could not be completed. Please try again.', saleID: null, changeGiven: null };\n this.lastResult = result;\n return of(result); // The cart is untouched on this path, deliberately\n })\n );\n }\n\n // Fetches the completed sale's receipt as a PDF blob. Kept here rather than in the tender component so the\n // phone and the wide presentations reprint through the same call. Wiring it to a download is Phase 5's job.\n //\n // ⚠️ A BARE HttpClient WITH responseType 'blob', matching AccountingService.downloadReceiptPdf:1796 — there\n // is deliberately no Post_Blob wrapper on HttpService (it has Get_Blob only, :74), and adding one to a\n // shared HTTP service from a POS chunk is not this phase's call.\n // 🔴 The endpoint answers EITHER the PDF bytes OR a RepoResponse explaining a refusal (voided sale, pending\n // approval, not found) — SalesController.cs:278-285. Both arrive here as a Blob. Branching on that (read\n // the blob as text when its type is not application/pdf) belongs to Phase 5, which owns the download UI.\n fetchReceipt(saleID: number): Observable<Blob> {\n // Silent for the same reason as fetchSaleNumber: the button carries its own \"Preparing receipt\" state, and\n // a full-screen scrim over a finished sale reads as something having gone wrong.\n return this.http.post(`${this.httpService.apiUrl}${this.receiptUrl}?action=x`, { saleID: saleID }, { responseType: 'blob', context: silentContext(true) });\n }\n\n // Added (POS Phase 5): saves the completed sale's receipt to a file the operator can print for the customer.\n //\n // 🔴 THE ENDPOINT ANSWERS TWO DIFFERENT THINGS DOWN ONE PIPE, and this is where that is untangled. On success\n // SalesController.DownloadReceipt returns raw PDF bytes; on a refusal — voided, pending approval, not found —\n // it returns 200 carrying a RepoResponse in JSON (SalesController.cs:278-285). Both arrive as a Blob, so the\n // CONTENT TYPE is the only thing that distinguishes a receipt from an explanation. A client that skipped this\n // check would hand the operator a \"receipt\" that is a JSON error and looks, to them, like a printer fault.\n //\n // Returns the message to show, or null when the file was saved. Nothing is thrown: a receipt that cannot be\n // printed is an inconvenience at the counter, never a reason to alarm an operator about a sale that has\n // already completed and taken the customer's money.\n downloadReceipt(saleID: number, fileName?: string): Observable<string | null> {\n return this.fetchReceipt(saleID).pipe(\n switchMap((blob: Blob) => {\n if (!blob || blob.size === 0) return of('The receipt came back empty. Try again from the sales list.');\n\n // A refusal: read the RepoResponse out of the blob and show ITS message rather than a generic one — the\n // server already knows exactly why (voided, awaiting approval) and the operator needs that reason.\n if (blob.type && blob.type.indexOf('application/pdf') < 0) {\n return from(blob.text()).pipe(\n map(text => {\n try { return JSON.parse(text)?.message || 'The receipt could not be produced.'; }\n catch { return 'The receipt could not be produced.'; }\n })\n );\n }\n\n this.saveBlob(blob, fileName ?? `Receipt_${saleID}.pdf`);\n return of(null);\n }),\n catchError(() => of('The receipt could not be produced. Try again from the sales list.'))\n );\n }\n\n // The blob-to-file step, lifted verbatim from AccountingService.downloadReceiptPdf:1796 — the pattern this\n // library already uses for every PDF it hands a user. It is deliberately NOT reinvented here.\n private saveBlob(blob: Blob, fileName: string) {\n const url = window.URL.createObjectURL(new Blob([blob], { type: 'application/pdf' }));\n const link = document.createElement('a');\n link.href = url;\n link.download = fileName;\n link.click();\n window.URL.revokeObjectURL(url);\n }\n\n // Added (POS Phase 5): fetches the SAL- number of a sale that has just completed.\n //\n // 🔑 WHY THIS EXISTS AT ALL. The one-shot endpoint answers with the sale ID only — SalesController.PosSale\n // sets `response.Data = stored.SaleID` and the base create path returns the same, so there is no sale number\n // anywhere in the submit response. The number is what the operator reads out and what the customer's slip\n // carries, so it is READ BACK from the server rather than composed on the client: SAL-{date}-{NNNN} is issued\n // by NumberSequenceService and a client-side guess at the counter would eventually print a number that\n // belongs to another till.\n //\n // A failure here is silent by design. The sale has already landed and the money has already been taken; a\n // missing number on the confirmation panel is a cosmetic gap, and an error dialog over a completed sale would\n // tell the operator something is wrong when nothing is.\n // 🔴 AND IT ALSO REPLACES THE CHANGE FIGURE WITH THE SERVER'S. `submit()` shows the client's own\n // `changeDue` immediately, because the operator cannot stand at a counter waiting for a second round trip\n // before knowing what to hand back. But the AUTHORITATIVE figure is the server's: SalesController.PosSale\n // derives ChangeGiven from the total it actually STORED (it recomputes SubTotal itself), and that is the\n // number the receipt prints. If the two ever disagree, the drawer must follow the receipt — so the moment\n // the server's figure arrives it replaces the client's estimate rather than sitting beside it.\n fetchSaleNumber(saleID: number): Observable<string | null> {\n // 🔴 SILENT, AND FOUND BY LOOKING AT THE RENDER. An ordinary Get raises the app's global \"Please wait…\"\n // scrim — so a COMPLETED sale, money already taken, sat behind a greyed-out loading overlay while a\n // cosmetic lookup finished. That is precisely the shape fsd.md:433 rules out: a till must never throw an\n // alarming overlay at an operator with a customer in front of them. Quiet Loading's silentContext skips the\n // loader's bookkeeping and changes nothing else about the request.\n return this.httpService.Get(`sales/id/${saleID}`, silentContext(true)).pipe(\n map((response: any) => {\n const sale = response?.data;\n const saleNumber = sale?.saleNumber ?? null;\n\n if (this.lastResult) {\n if (saleNumber) this.lastResult.saleNumber = saleNumber;\n if (sale?.changeGiven != null) this.lastResult.changeGiven = sale.changeGiven;\n }\n\n return saleNumber;\n }),\n catchError(() => of(null))\n );\n }\n}\n","import { Component, EventEmitter, Input, Output } from '@angular/core';\nimport { PosProduct } from '../../../../classes/PosClasses';\n\n// Added (POS Phase 4): spa-pos-tile — one product, as the till operator sees it.\n//\n// 🔑 IT IS A BUTTON, NOT A CARD WITH A CLICK HANDLER. The host element is a real <button type=\"button\">, so it\n// is reachable by Tab, fires on Space and Enter, and announces itself to a screen reader without a single\n// aria-* attribute being invented here. A till is used with a finger AND with a keyboard-wedge scanner, and\n// the operator's hands leave the screen constantly — keyboard reachability is not a nicety at a counter.\n//\n// 🔑 TILE ANATOMY IS THE SHOPIFY ONE (fsd.md:46): heading (name) · subheading (code) · badge (price). Nothing\n// else is on it. The FSD's research is explicit that clutter is the failure mode of a POS grid, so stock,\n// category and image are deliberately absent from the face of the tile.\n//\n// ⚠️ 88px MINIMUM, per fsd.md:48 — WCAG 2.5.8 AAA is 44px and Material is 48dp; the FSD's own floor for a\n// PRODUCT tile is 88px because it is the target the operator hits hundreds of times a day. The size lives in\n// the CSS as min-height/min-width, never as a magic number in a template.\n//\n// This component holds NO state and NO arithmetic. It emits the product; PosSessionService decides what a\n// basket does with it. That is what keeps the wide and phone presentations a layout swap rather than a fork.\n@Component({\n selector: 'spa-pos-tile',\n templateUrl: './pos-tile.component.html',\n styleUrls: ['./pos-tile.component.css'],\n standalone: false\n})\nexport class PosTileComponent {\n\n @Input() product: PosProduct;\n\n // How many of this product are already in the cart. Passed IN rather than read from the service, so the tile\n // stays presentational and the shell keeps the only reference to the session.\n @Input() inCart = 0;\n\n @Input() disabled = false;\n\n @Output() picked = new EventEmitter<PosProduct>();\n\n pick() {\n if (this.disabled || !this.product) return;\n this.picked.emit(this.product);\n }\n}\n","<!-- Added (POS Phase 4): the tile face. A real button, so Tab/Space/Enter work with no scripted key handling. -->\n<button type=\"button\" class=\"pt-tile\" [disabled]=\"disabled\" (click)=\"pick()\"\n [attr.aria-label]=\"product?.name + ', ' + (product?.unitPrice | number:'1.2-2') + ', add to sale'\">\n\n <!-- badge: how many are already on the ticket. Absent at zero — an empty counter on every tile is noise. -->\n <span class=\"pt-count\" *ngIf=\"inCart > 0\" aria-hidden=\"true\">{{ inCart }}</span>\n\n <span class=\"pt-body\">\n <span class=\"pt-name\">{{ product?.name }}</span>\n <span class=\"pt-code\" *ngIf=\"product?.code\">{{ product?.code }}</span>\n </span>\n\n <!-- the price strip: the one figure the operator and the customer both read off the screen -->\n <span class=\"pt-price\">{{ product?.unitPrice | number:'1.2-2' }}</span>\n</button>\n","import { Component, EventEmitter, Input, Output, inject } from '@angular/core';\nimport { PosLine, PosProduct } from '../../../../classes/PosClasses';\nimport { PosSessionService } from '../pos-session.service';\n\n// Added (POS Phase 4): spa-pos-wide — the landscape till (tablet, laptop, counter screen).\n//\n// 🔑 IT OWNS NO STATE THAT MATTERS AND NO ARITHMETIC AT ALL. It injects the SAME PosSessionService instance\n// the shell provides — resolved up the injector tree, not a second copy — and every number it renders is a\n// field the service already computed. The only members declared here are `searchTerm`, which is the text in\n// an input box, and nothing else. If you find yourself about to add a total, a tax rule or a cart mutation to\n// this class, it belongs in PosSessionService: this file and the phone presentation must stay two views of\n// one till, or they will drift and quietly disagree about money (fsd.md:587).\n//\n// 🎨 THE LAYOUT IS THE ONE THE RESEARCH CONVERGES ON (fsd.md:56-69, Dynamics 365 Commerce's canonical zones):\n// scan/search across the top, category tabs and the product grid on the left, the receipt/cart panel and the\n// totals panel on the right, CHARGE at the foot of the totals panel.\n//\n// 🎨 WHERE THE BOLDNESS IS SPENT — one place, deliberately. The owner's steer was \"those numbers usually are\n// big, but it does not mean everything has to be that large\" (REQUESTS 08:51). So exactly three things are\n// oversized: the TOTAL, the CHANGE DUE (Phase 5) and the CHARGE button. Line items, prices, tabs and the\n// search box are all ordinary size. The totals block and CHARGE are fused into a single unit at the foot of\n// the cart rail — the one element the page is remembered by, and the one the operator's eye returns to\n// between every customer.\n@Component({\n selector: 'spa-pos-wide',\n templateUrl: './pos-wide.component.html',\n styleUrls: ['./pos-wide.component.css'],\n standalone: false\n})\nexport class PosWideComponent {\n\n session = inject(PosSessionService);\n\n @Input() title = 'Point of Sale';\n\n // Phase 5 wires this to the tender overlay. Declared now so the shell's contract does not change when it\n // does, and so a host embedding this presentation directly has the seam available.\n @Output() charge = new EventEmitter<void>();\n\n // Presentation-only view state: the raw text in the scan/search box. The FILTERED RESULT is the service's —\n // this is only the characters the operator has typed so far.\n searchTerm = '';\n\n onSearch(term: string) {\n this.searchTerm = term;\n this.session.setSearch(term);\n }\n\n // A keyboard-wedge scanner types the barcode and ends with Enter. On Enter we try an EXACT code match\n // first; if one is found the product is added and the box clears, ready for the next scan. If nothing\n // matches exactly the text is left alone and the grid stays filtered — the operator is mid-typing, and\n // clearing their search under them is worse than doing nothing.\n onSearchEnter() {\n const product = this.session.resolveCode(this.searchTerm);\n if (!product) return;\n this.session.addProduct(product);\n this.onSearch('');\n }\n\n pick(product: PosProduct) {\n this.session.addProduct(product);\n }\n\n // Bound directly in the tile loop. It returns a NUMBER, so the binding is reference-stable across change\n // detection — this is not the banned pattern, which is a getter ALLOCATING a new array or object per pass\n // and feeding it to *ngFor (template-bound-getters-banned). The cart is single digits long at a till.\n countOf(product: PosProduct): number {\n return this.session.quantityInCart(product.productID);\n }\n\n increment(line: PosLine) { this.session.increment(line); }\n decrement(line: PosLine) { this.session.decrement(line); }\n remove(line: PosLine) { this.session.removeLine(line); }\n clear() { this.session.clear(); }\n\n onCharge() {\n if (!this.session.canCharge) return;\n this.charge.emit();\n }\n}\n","<!-- Added (POS Phase 4): the landscape till. Two columns — the catalogue, and the ticket. -->\n\n<div class=\"pw-till\">\n\n <!-- ================= TOP BAR: the scan/search box is the till's home key ================= -->\n <header class=\"pw-bar\">\n <div class=\"pw-scan\">\n <mat-icon class=\"pw-scan-icon\" aria-hidden=\"true\">qr_code_scanner</mat-icon>\n <input #scan class=\"pw-scan-input\" type=\"text\" autocomplete=\"off\" spellcheck=\"false\"\n placeholder=\"Scan a barcode or search by name\" aria-label=\"Scan a barcode or search by name\"\n [value]=\"searchTerm\" (input)=\"onSearch(scan.value)\" (keyup.enter)=\"onSearchEnter()\">\n <button type=\"button\" class=\"pw-scan-clear\" *ngIf=\"searchTerm\" aria-label=\"Clear the search\"\n (click)=\"onSearch(''); scan.value = ''\">\n <mat-icon aria-hidden=\"true\">close</mat-icon>\n </button>\n </div>\n <h1 class=\"pw-title\">{{ title }}</h1>\n </header>\n\n <div class=\"pw-body\">\n\n <!-- ================= LEFT: category tabs + the product grid ================= -->\n <section class=\"pw-catalogue\" aria-label=\"Products\">\n\n <div class=\"pw-tabs\" role=\"tablist\" aria-label=\"Product categories\" *ngIf=\"session.categories.length > 0\">\n <button type=\"button\" class=\"pw-tab\" role=\"tab\" [class.active]=\"session.activeCategory === ''\"\n [attr.aria-selected]=\"session.activeCategory === ''\" (click)=\"session.setCategory('')\">All</button>\n <button type=\"button\" class=\"pw-tab\" role=\"tab\" *ngFor=\"let category of session.categories\"\n [class.active]=\"session.activeCategory === category\"\n [attr.aria-selected]=\"session.activeCategory === category\"\n (click)=\"session.setCategory(category)\">{{ category }}</button>\n </div>\n\n <div class=\"pw-grid\" *ngIf=\"session.filtered.length > 0\">\n <spa-pos-tile *ngFor=\"let product of session.filtered\" [product]=\"product\"\n [inCart]=\"countOf(product)\" (picked)=\"pick($event)\"></spa-pos-tile>\n </div>\n\n <!-- An empty screen is an invitation to act, not a shrug. It says what to do next. -->\n <div class=\"pw-empty\" *ngIf=\"session.filtered.length === 0 && !session.loadingProducts\">\n <mat-icon aria-hidden=\"true\">search_off</mat-icon>\n <p *ngIf=\"searchTerm\">Nothing matches &ldquo;{{ searchTerm }}&rdquo;. Clear the search to see every product.</p>\n <p *ngIf=\"!searchTerm\">No products are available on this till yet.</p>\n </div>\n\n <div class=\"pw-empty\" *ngIf=\"session.loadingProducts\">\n <mat-spinner diameter=\"28\"></mat-spinner>\n <p>Loading products</p>\n </div>\n </section>\n\n <!-- ================= RIGHT: the ticket ================= -->\n <aside class=\"pw-ticket\" aria-label=\"Current sale\">\n\n <div class=\"pw-ticket-head\">\n <span class=\"pw-ticket-title\">Current sale</span>\n <span class=\"pw-ticket-count\" *ngIf=\"session.totals.unitCount > 0\">{{ session.totals.unitCount | number:'1.0-2' }} items</span>\n <button type=\"button\" class=\"pw-clear\" *ngIf=\"session.lines.length > 0\" (click)=\"clear()\">Clear</button>\n </div>\n\n <!-- the receipt panel: one row per line, scrolling inside itself so the plinth below never moves -->\n <div class=\"pw-lines\" *ngIf=\"session.lines.length > 0\">\n <div class=\"pw-line\" *ngFor=\"let line of session.lines\">\n <div class=\"pw-line-text\">\n <span class=\"pw-line-name\">{{ line.name }}</span>\n <!-- Changed (POS Phase 5): the unit line now states the multiplication the extension beside it is\n the answer to, and says when a shelf price already contains its VAT. An operator checking the\n ticket against the counter reads across one row: this price, this many, this much. -->\n <span class=\"pw-line-unit\">\n {{ line.shelfUnitPrice | number:'1.2-2' }} each &times; {{ line.quantity | number:'1.0-2' }}<span *ngIf=\"line.isTaxInclusive && line.taxRate > 0\"> &middot; incl. VAT</span>\n </span>\n </div>\n\n <div class=\"pw-qty\" role=\"group\" [attr.aria-label]=\"line.name + ' quantity'\">\n <button type=\"button\" class=\"pw-step\" [attr.aria-label]=\"'One less ' + line.name\" (click)=\"decrement(line)\">\n <mat-icon aria-hidden=\"true\">remove</mat-icon>\n </button>\n <span class=\"pw-qty-value\" aria-live=\"polite\">{{ line.quantity | number:'1.0-2' }}</span>\n <button type=\"button\" class=\"pw-step\" [attr.aria-label]=\"'One more ' + line.name\" (click)=\"increment(line)\">\n <mat-icon aria-hidden=\"true\">add</mat-icon>\n </button>\n </div>\n\n <!-- 🔴 Changed (POS Phase 5, Arbiter A-0831-23): was line.lineTotal, which is VAT-INCLUSIVE. Sat under\n a VAT-EXCLUSIVE \"36.00 each\" it rendered \"36.00 each\" above \"41.40\" at quantity 1 — correct\n arithmetic that reads as a mistake to the person holding the goods. The extension is now the tile\n price multiplied out, so every line multiplies visibly, and VAT is told once, in the plinth. -->\n <span class=\"pw-line-total\">{{ line.shelfAmount | number:'1.2-2' }}</span>\n\n <button type=\"button\" class=\"pw-remove\" [attr.aria-label]=\"'Remove ' + line.name\" (click)=\"remove(line)\">\n <mat-icon aria-hidden=\"true\">delete_outline</mat-icon>\n </button>\n </div>\n </div>\n\n <div class=\"pw-ticket-empty\" *ngIf=\"session.lines.length === 0\">\n <mat-icon aria-hidden=\"true\">shopping_cart</mat-icon>\n <p>Scan an item or tap a product to start the sale.</p>\n </div>\n\n <!-- ================= THE PLINTH — the one bold element on the page =================\n Quiet subtotal and VAT rows, a hairline, then the TOTAL at full size, fused to the CHARGE bar.\n Everything above it is deliberately ordinary so that this reads as the only thing shouting. -->\n <div class=\"pw-plinth\">\n <!-- Changed (POS Phase 5): these two rows now reconcile with the LINES ABOVE THEM — Subtotal is the sum\n of the extensions on screen and \"VAT added\" is only the tax this till puts on top of them, so\n Subtotal + VAT added = Total exactly, in a mixed basket as well as a plain one. For the ordinary\n all-exclusive basket these are the same two numbers as before. The full VAT breakdown, including\n the tax already inside an inclusive shelf price, is on the printed receipt. -->\n <!-- Changed (Arbiter, smalls batch 2026-08-31): \"Subtotal\" → \"Items\" — the receipt's Subtotal is NET while this\n row is the SHELF value of the goods; one word for two quantities was the collision. Value unchanged. -->\n <div class=\"pw-sum\"><span>Items</span><span class=\"pw-num\">{{ session.totals.shelfTotal | number:'1.2-2' }}</span></div>\n <div class=\"pw-sum\"><span>VAT added</span><span class=\"pw-num\">{{ session.totals.taxAdded | number:'1.2-2' }}</span></div>\n\n <div class=\"pw-total\">\n <span class=\"pw-total-label\">Total</span>\n <span class=\"pw-total-value\" aria-live=\"polite\">{{ session.totals.total | number:'1.2-2' }}</span>\n </div>\n\n <button type=\"button\" class=\"pw-charge\" [disabled]=\"!session.canCharge\" (click)=\"onCharge()\">\n <mat-icon aria-hidden=\"true\">point_of_sale</mat-icon>\n <span>Charge</span>\n </button>\n </div>\n </aside>\n </div>\n</div>\n","import { Component, EventEmitter, OnInit, Output, inject } from '@angular/core';\nimport { PosSessionService } from '../pos-session.service';\n\n// Added (POS Phase 5): spa-pos-tender — take the money, give the change, print the slip.\n//\n// 🔑 IT OWNS NO MONEY ARITHMETIC. Every figure it shows — the amount due, the change, whether the tender is\n// enough — is a field PosSessionService already computed, and the submit is the service's one network call.\n// What this component owns is the KEYSTROKES: the digits the operator has typed so far, and which of the two\n// faces (take the money / the sale is done) is showing. That is the same division Phase 4 drew, and it is what\n// lets Phase 6 hang this exact component in a phone container without a second copy of anything.\n//\n// 🔑 THE SHELL HOSTS IT, NOT THE PRESENTATION. `spa-pos-wide` emits (charge); `spa-pos` opens this over the\n// whole till. So the phone presentation reaches the same overlay by emitting the same event, and the operator\n// who rotates a tablet mid-tender keeps the tender — it is anchored above the swap, not inside it.\n//\n// 🎨 WHERE THE BOLDNESS IS SPENT — one place, and it is not the same place as Phase 4's. The plinth's loud\n// element is the TOTAL; here it is CHANGE DUE, at 64px in the money green this library already ships. And it\n// lives in a FIXED SLOT: the same rectangle reads \"0.00\" before a tender, \"still due 12.40\" when the cash on\n// the counter is short, and the change when it covers. The operator reads one position on the screen all day\n// instead of hunting for whichever number moved.\n@Component({\n selector: 'spa-pos-tender',\n templateUrl: './pos-tender.component.html',\n styleUrls: ['./pos-tender.component.css'],\n standalone: false\n})\nexport class PosTenderComponent implements OnInit {\n\n session = inject(PosSessionService);\n\n // Raised when the operator backs out (nothing charged, cart intact) and when they finish the completed sale.\n // The shell closes the overlay on either; the two are distinct so a host can tell an abandoned tender from a\n // completed one without inspecting the session.\n @Output() cancelled = new EventEmitter<void>();\n @Output() completed = new EventEmitter<void>();\n\n // Presentation-only view state.\n //\n // `entry` is the literal text under the operator's fingers, kept as a STRING rather than a number on purpose:\n // \"20.\" and \"20.0\" are meaningful states mid-typing that a number cannot represent, and parsing on every\n // keystroke would erase the decimal point the moment it was pressed.\n entry = '';\n amountDue = 0; // Snapshotted on open — see ngOnInit\n quickAmounts: number[] = []; // Plain FIELD, computed once (template-bound-getters-banned)\n message = ''; // Why a submit was refused, in the interface's voice\n\n // Added (ARBITER RULING A-0831-29): a REFUSAL IS A STATE, not a line of text under an unchanged screen.\n //\n // 🔴 What it replaced, and why the ruling called it blocking. A refused sale (\"Insufficient inventory\") printed\n // as 13px red text BELOW a still-green CHANGE DUE panel, under a still-enabled green \"Complete sale\" button.\n // Every loud element on the screen still said the sale had gone through. At a counter, with a queue, the\n // operator reads the big green number and hands over change for a sale the server refused.\n //\n // So the refusal TAKES THE SLOT. The fixed rectangle that carries the change is the one thing the operator\n // reads all day, so that is where the bad news has to land — the change readout is hidden outright, not merely\n // out-shouted, and the primary button is disabled. Nothing green is left on the screen.\n //\n // 🔑 IT CANNOT BE RETRIED FROM HERE, AND THAT IS DELIBERATE. The cart is frozen while this overlay is open\n // (ngOnInit snapshots the total), so a second identical submit refuses identically. The only honest way\n // forward is back to the sale, which is the one action the panel offers. `refused` therefore survives keypad\n // and method changes — retendering does not make stock appear.\n refused = false;\n refusalMessage = '';\n\n receiptMessage = ''; // Why a receipt could not be printed\n fetchingReceipt = false;\n\n readonly keys = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '.', '0'];\n\n // 🔴 THE NUMBERS ARE TinWeb's PaymentMethod ENUM, READ OFF Sale.cs:17-25 — NOT GUESSED, AND NOT 1-BASED:\n // Cash = 0, BankTransfer = 1, MobileMoney = 2, Card = 3, Credit = 4, Complementary = 5\n // Measured 2026-08-31: a till sale posted with method 1 came back from the server as\n // `\"paymentMethodName\":\"BankTransfer\"`. A cash sale recorded, and printed on the customer's receipt, as a\n // bank transfer — invisible on screen, wrong in the ledger and wrong at the drawer reconciliation.\n //\n // Credit and Complementary are deliberately absent: a till sale is immediate payment (fsd.md A4), and a\n // complimentary issue is a manager's decision made on the sales ledger, not a cashier's at the counter.\n readonly methods = [\n { value: 0, label: 'Cash', icon: 'payments' },\n { value: 3, label: 'Card', icon: 'credit_card' },\n { value: 2, label: 'Mobile money', icon: 'smartphone' },\n { value: 1, label: 'Bank transfer', icon: 'account_balance' }\n ];\n\n ngOnInit() {\n // The amount due is FROZEN when the overlay opens. The cart cannot change while the tender is on screen —\n // there is nothing behind this surface to tap — and freezing it means the number the operator read out to\n // the customer cannot move underneath them.\n this.amountDue = this.session.totals.total;\n this.quickAmounts = this.buildQuickAmounts();\n }\n\n // Cash is the only method that involves counting notes. Card, mobile money and a transfer settle for the\n // exact amount, so the keypad and the quick-cash row are irrelevant and are not shown — a screen offering\n // \"how much did they hand you?\" for a card tap is a question with no answer.\n get isCash(): boolean { return this.session.tender.method === 0; } // 0 = Cash — see the enum note below\n\n get result() { return this.session.lastResult; }\n\n // The completed face shows once a sale has actually landed. `lastResult` is only ever set by submit(), and a\n // successful one clears the cart — so this cannot show over a live basket.\n get isComplete(): boolean { return this.result?.success === true; }\n\n // The one gate on the primary button. Cash must cover the total; every other method settles exactly, so the\n // only requirement is a chargeable cart. The service's isTenderSufficient carries the server's own half-cent\n // tolerance, so an exact tender can never be refused here as one cent short.\n get canComplete(): boolean {\n if (this.session.submitting) return false;\n if (this.refused) return false; // Changed (A-0831-29): a refused sale cannot be re-submitted against the same frozen cart\n if (!this.isCash) return this.session.lines.length > 0;\n return this.session.isTenderSufficient;\n }\n\n // What is still owed when the cash on the counter does not cover the sale. Zero once it does.\n get shortfall(): number {\n const tendered = this.session.tender.amountTendered;\n if (tendered == null) return 0;\n const short = this.amountDue - tendered;\n return short > 0.005 ? Math.round(short * 100) / 100 : 0;\n }\n\n // ---------------------------------------------------------------- entry\n\n press(key: string) {\n if (key === '.' && this.entry.indexOf('.') >= 0) return; // one decimal point, ever\n if (key === '.' && this.entry === '') { this.entry = '0.'; this.commit(); return; }\n\n // Two decimals is the end of the number — a till has no third. Silently ignoring the keystroke is right\n // here: an error message for a key that simply has nothing left to do would be noise at a counter.\n const dot = this.entry.indexOf('.');\n if (dot >= 0 && this.entry.length - dot > 2) return;\n\n this.entry = this.entry + key;\n this.commit();\n }\n\n backspace() {\n this.entry = this.entry.slice(0, -1);\n this.commit();\n }\n\n clearEntry() {\n this.entry = '';\n this.commit();\n }\n\n // A quick-cash button REPLACES the entry rather than appending to it. Appending would turn a mis-tap into a\n // 20100.00 tender and a catastrophic change figure.\n quick(amount: number) {\n this.entry = amount.toFixed(2);\n this.commit();\n }\n\n // Pushes the typed text into the service, which is where change is derived. An empty box means \"no cash\n // counted yet\" — null, not zero, so the change readout stays quiet rather than claiming the customer is\n // short by the full amount before they have handed anything over.\n private commit() {\n this.message = '';\n const value = parseFloat(this.entry);\n this.session.setTendered(this.entry === '' || isNaN(value) ? null : value);\n }\n\n setMethod(method: number) {\n this.session.setPaymentMethod(method);\n // Switching off cash drops any counted amount: a card sale has no tender and no change, and carrying a\n // stale cash figure into one would put a change instruction on the receipt for money nobody handed over.\n if (!this.isCash) { this.entry = ''; this.session.setTendered(null); }\n this.message = '';\n }\n\n // Rounded-up notes the customer is likely to hand over for THIS total, plus the exact amount as the first\n // and most-used button. Built once on open from the tenant's own denominations (PosConfig.quickCashDeno-\n // minations), so a currency with different notes gets different buttons without a code change.\n private buildQuickAmounts(): number[] {\n const due = this.amountDue;\n const amounts: number[] = [Math.round(due * 100) / 100];\n\n for (const note of this.session.quickCashDenominations) {\n // The next whole multiple of this note at or above the total. Skipping equal values keeps the exact\n // button from being offered twice when the total happens to land on a note.\n const rounded = Math.ceil(due / note) * note;\n const value = Math.round(rounded * 100) / 100;\n if (value > due && amounts.indexOf(value) < 0) amounts.push(value);\n }\n\n amounts.sort((a, b) => a - b);\n return amounts.slice(0, 6); // Six is what fits two rows of large targets without scrolling\n }\n\n // ---------------------------------------------------------------- complete\n\n complete() {\n if (!this.canComplete) return;\n this.message = '';\n\n this.session.submit().subscribe(result => {\n if (!result.success) {\n // The cart is untouched on this path by design (PosSessionService.submit) — the customer is standing\n // there with their shopping already scanned. Say what happened and leave the operator able to retry.\n // Changed (A-0831-29): the refusal takes the change slot and neutralises the primary button. The cart is\n // untouched on this path by design (PosSessionService.submit) — the customer is standing there with their\n // shopping already scanned — so the way out is back to the sale, not another identical submit.\n this.refused = true;\n this.refusalMessage = result.message || 'The sale could not be completed.';\n this.message = '';\n return;\n }\n\n // The sale number is what the operator reads out and what the customer's slip carries. The one-shot\n // endpoint answers with the sale ID only (SalesController.PosSale sets response.Data = SaleID), so it is\n // fetched here rather than guessed. A failure to fetch it is not a failure of the sale — the completed\n // face renders without the number rather than alarming anyone about a sale that has already landed.\n if (result.saleID != null) this.session.fetchSaleNumber(result.saleID).subscribe();\n });\n }\n\n // The receipt is fetched and saved by the SERVICE, so the phone presentation reprints through the identical\n // call. Printing itself is the browser's own print of the PDF (fsd.md A5) — there is no thermal driver in v1.\n downloadReceipt() {\n const saleID = this.result?.saleID;\n if (saleID == null || this.fetchingReceipt) return;\n\n this.fetchingReceipt = true;\n this.receiptMessage = '';\n\n this.session.downloadReceipt(saleID).subscribe(error => {\n this.fetchingReceipt = false;\n if (error) this.receiptMessage = error;\n });\n }\n\n // Ends the completed sale and returns the operator to an empty till. The cart was already cleared by the\n // successful submit; this clears the RESULT, so the next customer's screen carries none of the last one's.\n nextSale() {\n this.session.lastResult = null;\n this.completed.emit();\n }\n\n cancel() {\n if (this.session.submitting) return; // never abandon a sale that is mid-flight\n this.refused = false; // Added (A-0831-29): the refusal ends with the overlay — the operator is going back to fix the cart\n this.refusalMessage = '';\n this.cancelled.emit();\n }\n}\n","<!-- Added (POS Phase 5): the tender surface. Two faces over one frame — take the money, then the sale is done.\n The frame never moves between them, so the primary button stays under the same finger. -->\n\n<div class=\"pt-scrim\" role=\"dialog\" aria-modal=\"true\" [attr.aria-label]=\"isComplete ? 'Sale complete' : 'Take payment'\">\n <div class=\"pt-sheet\">\n\n <!-- ================= FACE 1: taking the money ================= -->\n <ng-container *ngIf=\"!isComplete\">\n\n <header class=\"pt-head\">\n <span class=\"pt-head-title\">Take payment</span>\n <button type=\"button\" class=\"pt-close\" aria-label=\"Back to the sale\" (click)=\"cancel()\">\n <mat-icon aria-hidden=\"true\">close</mat-icon>\n </button>\n </header>\n\n <div class=\"pt-body\">\n\n <!-- LEFT: the readout. Nothing here is typed into; it is what the operator reads to the customer. -->\n <section class=\"pt-readout\" aria-label=\"Payment summary\">\n <div class=\"pt-due\">\n <span class=\"pt-label\">Amount due</span>\n <span class=\"pt-due-value\">{{ amountDue | number:'1.2-2' }}</span>\n </div>\n\n <div class=\"pt-row\" *ngIf=\"isCash\">\n <span class=\"pt-label\">Cash received</span>\n <span class=\"pt-num\">{{ session.tender.amountTendered == null ? '—' : (session.tender.amountTendered | number:'1.2-2') }}</span>\n </div>\n\n <!-- THE FIXED SLOT. One rectangle, four states, always in the same place on the screen.\n Changed (ARBITER RULING A-0831-29): a REFUSAL is the fourth, and it REPLACES the other three\n rather than sitting under them. A green change figure over a sale the server refused is the one\n thing this surface must never show. -->\n <div class=\"pt-change pt-change-refused\" *ngIf=\"refused\" role=\"alert\">\n <span class=\"pt-label\">Sale not completed</span>\n <span class=\"pt-refusal\">{{ refusalMessage }}</span>\n </div>\n\n <ng-container *ngIf=\"!refused\">\n <div class=\"pt-change\" *ngIf=\"isCash\" [class.pt-change-short]=\"shortfall > 0\" [class.pt-change-live]=\"shortfall === 0 && session.tender.amountTendered != null\">\n <span class=\"pt-label\">{{ shortfall > 0 ? 'Still to pay' : 'Change due' }}</span>\n <span class=\"pt-change-value\" aria-live=\"polite\">{{ (shortfall > 0 ? shortfall : session.changeDue) | number:'1.2-2' }}</span>\n </div>\n\n <p class=\"pt-settle\" *ngIf=\"!isCash\">This payment settles the sale exactly. There is no change to give.</p>\n </ng-container>\n\n <!-- The only way forward: the cart is frozen behind this overlay, so a second identical submit refuses\n identically. The button names what happens when it is used. -->\n <button type=\"button\" class=\"pt-secondary pt-back\" *ngIf=\"refused\" (click)=\"cancel()\">\n <mat-icon aria-hidden=\"true\">arrow_back</mat-icon>\n <span>Back to the sale</span>\n </button>\n\n <p class=\"pt-message\" *ngIf=\"message && !refused\" role=\"alert\">{{ message }}</p>\n </section>\n\n <!-- RIGHT: everything the operator touches. -->\n <section class=\"pt-input\" aria-label=\"Payment entry\">\n\n <div class=\"pt-methods\" role=\"group\" aria-label=\"Payment method\">\n <button type=\"button\" class=\"pt-method\" *ngFor=\"let method of methods\"\n [class.active]=\"session.tender.method === method.value\"\n [attr.aria-pressed]=\"session.tender.method === method.value\"\n (click)=\"setMethod(method.value)\">\n <mat-icon aria-hidden=\"true\">{{ method.icon }}</mat-icon>\n <span>{{ method.label }}</span>\n </button>\n </div>\n\n <ng-container *ngIf=\"isCash\">\n <!-- Quick cash first: the exact amount leads, then the notes a customer is likely to hand over.\n One tap settles most sales without the keypad being touched at all. -->\n <div class=\"pt-quick\">\n <button type=\"button\" class=\"pt-cash\" *ngFor=\"let amount of quickAmounts; let first = first\"\n [class.exact]=\"first\" (click)=\"quick(amount)\">\n <span class=\"pt-cash-tag\" *ngIf=\"first\">Exact</span>\n {{ amount | number:'1.2-2' }}\n </button>\n </div>\n\n <div class=\"pt-keypad\" role=\"group\" aria-label=\"Amount keypad\">\n <button type=\"button\" class=\"pt-key\" *ngFor=\"let key of keys\" (click)=\"press(key)\">{{ key }}</button>\n <button type=\"button\" class=\"pt-key pt-key-wide\" aria-label=\"Delete the last digit\" (click)=\"backspace()\">\n <mat-icon aria-hidden=\"true\">backspace</mat-icon>\n </button>\n <button type=\"button\" class=\"pt-key pt-key-clear\" (click)=\"clearEntry()\">Clear</button>\n </div>\n </ng-container>\n </section>\n </div>\n\n <!-- Fused to the foot of the sheet, exactly as CHARGE is fused to the plinth. Same shape, same height,\n same place — the second half of a two-tap sale. -->\n <button type=\"button\" class=\"pt-primary\" [disabled]=\"!canComplete\" (click)=\"complete()\">\n <mat-spinner diameter=\"24\" *ngIf=\"session.submitting\"></mat-spinner>\n <mat-icon aria-hidden=\"true\" *ngIf=\"!session.submitting\">check</mat-icon>\n <span>{{ session.submitting ? 'Completing' : 'Complete sale' }}</span>\n </button>\n </ng-container>\n\n <!-- ================= FACE 2: the sale is done ================= -->\n <ng-container *ngIf=\"isComplete\">\n <header class=\"pt-head pt-head-done\">\n <span class=\"pt-head-title\">Sale complete</span>\n </header>\n\n <div class=\"pt-done\">\n <!-- The change is the only thing that matters in the two seconds after a sale: it is money the operator\n owes the customer from the drawer. It keeps the slot and the size the live readout had. -->\n <div class=\"pt-change pt-change-live\" *ngIf=\"result?.changeGiven\">\n <span class=\"pt-label\">Change due</span>\n <span class=\"pt-change-value\">{{ result?.changeGiven | number:'1.2-2' }}</span>\n </div>\n\n <div class=\"pt-done-note\" *ngIf=\"!result?.changeGiven\">\n <mat-icon aria-hidden=\"true\">check_circle</mat-icon>\n <span>Paid in full. No change to give.</span>\n </div>\n\n <p class=\"pt-sale-number\" *ngIf=\"result?.saleNumber\">Sale {{ result?.saleNumber }}</p>\n\n <p class=\"pt-message\" *ngIf=\"receiptMessage\" role=\"alert\">{{ receiptMessage }}</p>\n\n <div class=\"pt-done-actions\">\n <!-- The label says what actually happens. The receipt arrives as a PDF the operator prints for the\n customer (fsd.md A5 — printing is the browser's print of the PDF, not a thermal driver), and a\n button promising \"Print\" that produces a file in a downloads folder is a small lie the operator\n pays for at the counter. -->\n <button type=\"button\" class=\"pt-secondary\" [disabled]=\"fetchingReceipt\" (click)=\"downloadReceipt()\">\n <mat-spinner diameter=\"20\" *ngIf=\"fetchingReceipt\"></mat-spinner>\n <mat-icon aria-hidden=\"true\" *ngIf=\"!fetchingReceipt\">receipt_long</mat-icon>\n <span>{{ fetchingReceipt ? 'Preparing receipt' : 'Download receipt' }}</span>\n </button>\n </div>\n\n <p class=\"pt-done-hint\">The receipt opens as a PDF. Print it for the customer.</p>\n </div>\n\n <button type=\"button\" class=\"pt-primary\" (click)=\"nextSale()\">\n <mat-icon aria-hidden=\"true\">arrow_forward</mat-icon>\n <span>Next sale</span>\n </button>\n </ng-container>\n </div>\n</div>\n","import { Component, EventEmitter, Input, Output, inject } from '@angular/core';\nimport { PosLine, PosProduct } from '../../../../classes/PosClasses';\nimport { PosSessionService } from '../pos-session.service';\n\n// Added (POS Phase 6): spa-pos-compact — the phone-portrait till. It replaces the Phase 4 holding panel.\n//\n// 🔴 IT OWNS NO CART, AND THAT IS THE WHOLE POINT OF THIS FILE. Phase 4 recorded the anti-pattern this phase\n// was most likely to walk into: two presentations that each hold a basket, with the shell copying state across\n// on a breakpoint change. That reads as working in every test and loses the customer's shopping the first time\n// a rebuild races the copy. The cart survives a rotate because it never moves — it lives in the\n// PosSessionService the SHELL provides, and this component resolves that same instance up the injector tree.\n// The only members declared here are `view` (which of the two screens is showing) and `searchTerm` (the\n// characters under the operator's fingers). Not one figure on this screen is computed in this class.\n//\n// 🔑 IT REACHES THE TENDER BY EMITTING (charge), EXACTLY AS spa-pos-wide DOES. The tender overlay is hosted by\n// the shell, above the presentation swap, so there is no second tender to write and nowhere for one to\n// diverge — and an operator who rotates a phone to landscape mid-tender keeps the tender.\n//\n// ─────────────────────────────────────────────────────────────────────────────────────────────────────────\n// 🎨 THE DESIGN, AND WHY THE REDUCTION IS SHAPED THIS WAY (fsd.md:530-538 asks the Arbiter to judge the CUT)\n//\n// The wide till is two columns side by side: catalogue | ticket. A 390px screen cannot hold both, and the two\n// obvious answers are both wrong at a counter:\n// ✗ Stack them and scroll — the running total leaves the screen while the operator is still adding goods,\n// which is the one number they are asked for out loud (\"how much is that so far?\").\n// ✗ A drag-up cart sheet over the grid — a gesture, mid-sale, one-handed, with a customer waiting.\n//\n// ✅ WHAT SHIPPED IS **TWO VIEWS, ONE PLINTH**. The catalogue and the ticket alternate in the scrolling middle\n// of the screen; the plinth — running total fused to a full-bleed CHARGE bar — is DOCKED at the bottom of both\n// and never moves. So the total is always readable, the operator's thumb has exactly one home, and checking\n// what is in the basket costs one tap in a fixed position rather than a scroll or a gesture.\n//\n// 🎨 THE SIGNATURE IS THE PLINTH, and it is the same object as the wide till's — same fusion of the total to a\n// square-topped 88px CHARGE bar, same tokens, same tabular figures. A shop running a counter screen and a\n// phone must be looking at one product. What is NEW here is that the item-count row is also the DOOR to the\n// ticket: on the wide till the ticket is permanently on screen so no door is needed, and on the phone the\n// count is both the status and the way in. That is structure carrying information rather than decorating it.\n//\n// ✂️ CUT, deliberately (tasks.md Phase 6): the multi-column totals block — Subtotal and \"VAT added\" move into\n// the ticket view where there is room to read them, and the plinth carries TOTAL alone; the page title, which\n// the app chrome above this component already shows (it survives as the region's aria-label); the wide tile\n// grid, down to two columns; and the always-on keypad, which the shared tender already owns and already\n// stacks full-screen below 720px.\n// ✅ KEPT, all of it: scan/search, tap to add, ± quantity, remove, clear, the running total, tender, complete,\n// receipt.\n//\n// ⚠️ NO VIEW-SWITCH ANIMATION, on purpose. An operator crosses this seam dozens of times an hour; a 200ms\n// slide each way is 200ms of nothing, forty times, in front of a customer. The only motion on the page stays\n// the 60ms tile press, which is functional — a capacitive screen gives no travel.\n@Component({\n selector: 'spa-pos-compact',\n templateUrl: './pos-compact.component.html',\n styleUrls: ['./pos-compact.component.css'],\n standalone: false\n})\nexport class PosCompactComponent {\n\n session = inject(PosSessionService);\n\n // Carried for the region's accessible name only — see the CUT note above. A host that renames the till still\n // renames what a screen reader announces.\n @Input() title = 'Point of Sale';\n\n @Output() charge = new EventEmitter<void>();\n\n // Which of the two screens is showing. Presentation-only view state: it is rebuilt as 'catalogue' whenever\n // this component is created, which is correct — after a rotate the operator lands on the products with their\n // basket intact, and the basket is the thing that had to survive.\n view: 'catalogue' | 'ticket' = 'catalogue';\n\n // The raw text in the scan/search box. The FILTERED RESULT is the service's.\n searchTerm = '';\n\n showCatalogue() { this.view = 'catalogue'; }\n\n showTicket() { this.view = 'ticket'; }\n\n // The plinth's count row is the door between the two views, so it toggles rather than only opening — the\n // operator taps the same place to look at the sale and to go back to adding to it.\n toggleView() { this.view = this.view === 'ticket' ? 'catalogue' : 'ticket'; }\n\n onSearch(term: string) {\n this.searchTerm = term;\n this.session.setSearch(term);\n }\n\n // A keyboard-wedge scanner types the barcode and ends with Enter — the same contract spa-pos-wide honours,\n // and phones are paired with bluetooth wedge scanners in exactly this way. An exact code match adds the line\n // and clears the box for the next scan; no match leaves the text alone, because the operator is mid-typing\n // and clearing their search under them is worse than doing nothing.\n onSearchEnter() {\n const product = this.session.resolveCode(this.searchTerm);\n if (!product) return;\n this.session.addProduct(product);\n this.onSearch('');\n }\n\n // Adding from the grid stays on the grid. A phone till's common case is several items in a row, and bouncing\n // to the ticket after each one would cost a tap back for every product in the basket.\n pick(product: PosProduct) {\n this.session.addProduct(product);\n }\n\n // Returns a NUMBER, so the binding is reference-stable across change detection. This is not the banned\n // pattern, which is a getter ALLOCATING a new array or object per pass and feeding it to *ngFor.\n countOf(product: PosProduct): number {\n return this.session.quantityInCart(product.productID);\n }\n\n increment(line: PosLine) { this.session.increment(line); }\n decrement(line: PosLine) { this.session.decrement(line); }\n\n // Removing the last line drops the operator back to the products rather than leaving them staring at an\n // empty ticket with nothing to do on it. An empty screen should be an invitation to act.\n remove(line: PosLine) {\n this.session.removeLine(line);\n if (this.session.lines.length === 0) this.view = 'catalogue';\n }\n\n clear() {\n this.session.clear();\n this.view = 'catalogue';\n }\n\n // The service's own gate is re-checked here rather than trusted from the template, exactly as the shell\n // re-checks it: an empty cart must never reach a surface whose primary button posts a sale.\n onCharge() {\n if (!this.session.canCharge) return;\n this.charge.emit();\n }\n}\n","<!-- Added (POS Phase 6): the phone-portrait till. Two views in the scrolling middle; ONE plinth docked below\n both of them. Nothing outside this file computes a figure on this screen. -->\n\n<div class=\"pc-till\" [attr.aria-label]=\"title\">\n\n <!-- ================= VIEW 1: the catalogue ================= -->\n <ng-container *ngIf=\"view === 'catalogue'\">\n\n <!-- The scan box is the till's home key and it is pinned. On a phone it takes the whole width: there is no\n page title beside it to demote, because the app chrome above already carries one. -->\n <header class=\"pc-bar\">\n <div class=\"pc-scan\">\n <mat-icon class=\"pc-scan-icon\" aria-hidden=\"true\">qr_code_scanner</mat-icon>\n <input #scan class=\"pc-scan-input\" type=\"text\" autocomplete=\"off\" spellcheck=\"false\"\n placeholder=\"Scan or search\" aria-label=\"Scan a barcode or search by name\"\n [value]=\"searchTerm\" (input)=\"onSearch(scan.value)\" (keyup.enter)=\"onSearchEnter()\">\n <button type=\"button\" class=\"pc-scan-clear\" *ngIf=\"searchTerm\" aria-label=\"Clear the search\"\n (click)=\"onSearch(''); scan.value = ''\">\n <mat-icon aria-hidden=\"true\">close</mat-icon>\n </button>\n </div>\n </header>\n\n <!-- Category pills, the same control as the wide till's — but a single row that scrolls sideways rather\n than wrapping. Wrapping six categories on a 390px screen eats three rows of the product grid. -->\n <div class=\"pc-tabs\" role=\"tablist\" aria-label=\"Product categories\" *ngIf=\"session.categories.length > 0\">\n <button type=\"button\" class=\"pc-tab\" role=\"tab\" [class.active]=\"session.activeCategory === ''\"\n [attr.aria-selected]=\"session.activeCategory === ''\" (click)=\"session.setCategory('')\">All</button>\n <button type=\"button\" class=\"pc-tab\" role=\"tab\" *ngFor=\"let category of session.categories\"\n [class.active]=\"session.activeCategory === category\"\n [attr.aria-selected]=\"session.activeCategory === category\"\n (click)=\"session.setCategory(category)\">{{ category }}</button>\n </div>\n\n <section class=\"pc-scroll\" aria-label=\"Products\">\n <div class=\"pc-grid\" *ngIf=\"session.filtered.length > 0\">\n <spa-pos-tile *ngFor=\"let product of session.filtered\" [product]=\"product\"\n [inCart]=\"countOf(product)\" (picked)=\"pick($event)\"></spa-pos-tile>\n </div>\n\n <div class=\"pc-empty\" *ngIf=\"session.filtered.length === 0 && !session.loadingProducts\">\n <mat-icon aria-hidden=\"true\">search_off</mat-icon>\n <p *ngIf=\"searchTerm\">Nothing matches &ldquo;{{ searchTerm }}&rdquo;. Clear the search to see every product.</p>\n <p *ngIf=\"!searchTerm\">No products are available on this till yet.</p>\n </div>\n\n <div class=\"pc-empty\" *ngIf=\"session.loadingProducts\">\n <mat-spinner diameter=\"28\"></mat-spinner>\n <p>Loading products</p>\n </div>\n </section>\n </ng-container>\n\n <!-- ================= VIEW 2: the ticket ================= -->\n <ng-container *ngIf=\"view === 'ticket'\">\n\n <header class=\"pc-bar pc-bar-ticket\">\n <button type=\"button\" class=\"pc-back\" aria-label=\"Back to the products\" (click)=\"showCatalogue()\">\n <mat-icon aria-hidden=\"true\">arrow_back</mat-icon>\n </button>\n <span class=\"pc-bar-title\">Current sale</span>\n <button type=\"button\" class=\"pc-clear\" *ngIf=\"session.lines.length > 0\" (click)=\"clear()\">Clear</button>\n </header>\n\n <section class=\"pc-scroll\" aria-label=\"Current sale\">\n\n <ul class=\"pc-lines\" *ngIf=\"session.lines.length > 0\">\n <li class=\"pc-line\" *ngFor=\"let line of session.lines\">\n <!-- Name across the full width, controls beneath it — the two-row line Phase 4 arrived at by looking\n at the render, and the reason holds harder here: an operator who cannot read what they are\n charging for cannot check it against the goods on the counter. -->\n <!-- 🎨 Changed after looking at the render: the extension sits BESIDE THE NAME, the way a paper slip\n reads — description left, money right. It was under the stepper, which on a 393px screen left a\n ~200px hole of nothing between the \"+\" button and the figure, and separated the two things the\n operator is actually comparing: what it is, and what it costs. -->\n <div class=\"pc-line-text\">\n <span class=\"pc-line-name\">{{ line.name }}</span>\n <!-- The tile price multiplied out (Arbiter A-0831-23), identical to the wide ticket: every line\n multiplies visibly, and VAT is told once, below. -->\n <span class=\"pc-line-total\">{{ line.shelfAmount | number:'1.2-2' }}</span>\n </div>\n\n <div class=\"pc-line-controls\">\n <div class=\"pc-qty\" role=\"group\" [attr.aria-label]=\"line.name + ' quantity'\">\n <button type=\"button\" class=\"pc-step\" [attr.aria-label]=\"'One less ' + line.name\" (click)=\"decrement(line)\">\n <mat-icon aria-hidden=\"true\">remove</mat-icon>\n </button>\n <span class=\"pc-qty-value\" aria-live=\"polite\">{{ line.quantity | number:'1.0-2' }}</span>\n <button type=\"button\" class=\"pc-step\" [attr.aria-label]=\"'One more ' + line.name\" (click)=\"increment(line)\">\n <mat-icon aria-hidden=\"true\">add</mat-icon>\n </button>\n </div>\n\n <span class=\"pc-line-unit\">\n {{ line.shelfUnitPrice | number:'1.2-2' }} each &times; {{ line.quantity | number:'1.0-2' }}<span *ngIf=\"line.isTaxInclusive && line.taxRate > 0\"> &middot; incl. VAT</span>\n </span>\n\n <button type=\"button\" class=\"pc-remove\" [attr.aria-label]=\"'Remove ' + line.name\" (click)=\"remove(line)\">\n <mat-icon aria-hidden=\"true\">delete_outline</mat-icon>\n </button>\n </div>\n </li>\n </ul>\n\n <!-- ✂️ The CUT totals block lands here rather than in the plinth. On the wide till Subtotal and VAT sit\n above the total; on a phone that would push CHARGE up the screen on every screen, for two numbers\n the operator only wants when they are checking the sale — which is precisely this view. -->\n <div class=\"pc-sums\" *ngIf=\"session.lines.length > 0\">\n <!-- Changed (Arbiter, smalls batch 2026-08-31): \"Subtotal\" → \"Items\" — matches pos-wide; the printed receipt keeps\n its NET Subtotal, the screen names the shelf value truthfully. Value unchanged. -->\n <div class=\"pc-sum\"><span>Items</span><span class=\"pc-num\">{{ session.totals.shelfTotal | number:'1.2-2' }}</span></div>\n <div class=\"pc-sum\"><span>VAT added</span><span class=\"pc-num\">{{ session.totals.taxAdded | number:'1.2-2' }}</span></div>\n </div>\n\n <div class=\"pc-empty\" *ngIf=\"session.lines.length === 0\">\n <mat-icon aria-hidden=\"true\">shopping_cart</mat-icon>\n <p>Nothing on this sale yet. Go back and scan or tap an item.</p>\n </div>\n </section>\n </ng-container>\n\n <!-- ================= THE PLINTH — docked, identical in both views =================\n The one fixed object on a screen where everything else scrolls. The count row is also the door to the\n ticket; the total sits beneath it; CHARGE is fused to the foot, square-topped and full-bleed. -->\n <div class=\"pc-plinth\">\n\n <button type=\"button\" class=\"pc-review\" (click)=\"toggleView()\"\n [attr.aria-label]=\"view === 'ticket' ? 'Back to the products' : 'Review the sale'\">\n <span class=\"pc-review-count\">{{ session.totals.itemCount }} {{ session.totals.itemCount === 1 ? 'line' : 'lines' }}<span *ngIf=\"session.totals.unitCount > 0\"> &middot; {{ session.totals.unitCount | number:'1.0-2' }} items</span></span>\n <span class=\"pc-review-action\">{{ view === 'ticket' ? 'Add items' : 'Review sale' }}</span>\n <mat-icon class=\"pc-review-chevron\" aria-hidden=\"true\">{{ view === 'ticket' ? 'expand_more' : 'expand_less' }}</mat-icon>\n </button>\n\n <div class=\"pc-total\">\n <span class=\"pc-total-label\">Total</span>\n <span class=\"pc-total-value\" aria-live=\"polite\">{{ session.totals.total | number:'1.2-2' }}</span>\n </div>\n\n <button type=\"button\" class=\"pc-charge\" [disabled]=\"!session.canCharge\" (click)=\"onCharge()\">\n <mat-icon aria-hidden=\"true\">point_of_sale</mat-icon>\n <span>Charge</span>\n </button>\n </div>\n</div>\n","import { Component, Input, OnDestroy, OnInit, inject } from '@angular/core';\nimport { BreakpointObserver, BreakpointState } from '@angular/cdk/layout';\nimport { Subscription } from 'rxjs';\nimport { PosConfig, PosProduct } from '../../../classes/PosClasses';\nimport { PosSessionService } from './pos-session.service';\n\n// Added (POS Phase 4): spa-pos — the till SHELL, and the single reason the two presentations can never drift.\n//\n// 🔑 THE MECHANISM, STATED PLAINLY. This component does exactly three things: it PROVIDES PosSessionService\n// once, it watches the CDK BreakpointObserver, and it swaps which template renders. It holds no cart, no\n// catalogue, no money and no arithmetic — all of that lives in the service it provides. So when a tablet is\n// rotated mid-sale the component tree beneath this one is torn down and rebuilt while THIS component, and\n// therefore the service instance it owns, is never destroyed. The basket does not survive because something\n// copies it across; it survives because it never moved.\n//\n// 🔴 THE ANTI-PATTERN THIS RULES OUT: two presentation components that each own a cart, with the shell\n// handing state from one to the other on a breakpoint change. That reads as working and loses the basket the\n// first time a rebuild races the copy. fsd.md:587 calls this out as the risk being mitigated. If a rule ever\n// has to differ between wide and phone, it belongs in the service behind a flag — never in a component.\n//\n// 🔑 `providers: [PosSessionService]` IS LOAD-BEARING, and so is the service NOT being providedIn:'root'.\n// The cart belongs to the till page and dies with it; a root cart would survive navigation and hand the next\n// operator the last customer's basket.\n//\n// The breakpoint string is the library's existing \"(max-width: 600px)\" — the same literal nav-menu.component\n// .ts:40, table.component.ts:45, dialog.service.ts:35, agent.component.ts:197 and detailsDialog.component\n// .ts:40 already use. A POS-specific breakpoint is deliberately NOT introduced: the till must flip at the\n// same width as the navigation around it, or the operator gets a phone menu wrapped around a desktop till.\n@Component({\n selector: 'spa-pos',\n templateUrl: './pos.component.html',\n styleUrls: ['./pos.component.css'],\n standalone: false,\n providers: [PosSessionService]\n})\nexport class PosComponent implements OnInit, OnDestroy {\n\n session = inject(PosSessionService);\n private breakpointObserver = inject(BreakpointObserver);\n\n // Consumer configuration. Every field is optional — an app that passes nothing gets the library defaults.\n @Input() posConfig?: PosConfig;\n\n // A catalogue the host already holds. When supplied, the till uses it and makes no request. When absent the\n // shell loads from posConfig.productLoadUrl. Two doors, one destination — setProducts on the service.\n @Input() products?: PosProduct[];\n\n smallScreen = false;\n\n // Added (POS Phase 5): whether the tender surface is showing. It lives HERE rather than in a presentation\n // component so that rotating a tablet mid-tender keeps the tender open over the same session — the identical\n // reason the cart lives in the service this component provides.\n tenderOpen = false;\n\n private sub: Subscription | null = null;\n\n ngOnInit() {\n this.session.configure(this.posConfig);\n\n if (this.products && this.products.length > 0) {\n this.session.setProducts(this.products);\n } else {\n this.session.loadProducts().subscribe();\n }\n\n // Tracked and unsubscribed — the same discipline table.component.ts:45 applies, for the same reason: a\n // till page is opened and closed all day and a leaked breakpoint subscription accumulates per visit.\n this.sub = this.breakpointObserver.observe(['(max-width: 600px)']).subscribe((result: BreakpointState) => {\n this.smallScreen = result.matches;\n });\n\n // Added 2026-08-31: the till claims the bottom-right corner while it is mounted, which lifts the agent FAB\n // clear of the CHARGE button it was sitting on. The class only supplies a CSS variable (tin-styles.css\n // `.spa-page-owns-fab-corner`); it moves nothing on this page. It goes on BODY because spa-agent is mounted\n // by nav-menu and so is not a descendant of this page — a variable set on the page host would never reach it.\n // Set from the SHELL rather than a presentation component for the same reason the cart is: a rotate mid-sale\n // tears down and rebuilds the presentation beneath this component, and the claim must not blink with it.\n document.body.classList.add('spa-page-owns-fab-corner');\n }\n\n ngOnDestroy() {\n this.sub?.unsubscribe();\n\n // Released here, never on a route event — the till is the only thing that claimed it, so the only correct\n // moment to give it back is when the till itself goes away. Mirrors update.service.ts:66.\n document.body.classList.remove('spa-page-owns-fab-corner');\n }\n\n get title(): string { return this.posConfig?.title ?? 'Point of Sale'; }\n\n // Added (POS Phase 5). The service's own gate is re-checked here rather than trusted from the event: a\n // presentation is a template, and an empty cart must never reach a surface whose primary button posts a sale.\n openTender() {\n if (!this.session.canCharge) return;\n this.tenderOpen = true;\n }\n\n // Closes on both outcomes — abandoned and completed. `lastResult` is cleared by the tender's own \"Next sale\"\n // step, not here, so a host that keeps the overlay open on completion still sees the sale it just took.\n closeTender() {\n this.tenderOpen = false;\n }\n}\n","<!-- Added (POS Phase 4): the shell renders ONE of two presentations over the SAME provided PosSessionService.\n Nothing else is here. Anything that appeared outside this switch would have to be duplicated by whichever\n presentation is not showing, which is precisely the fork this component exists to prevent. -->\n\n<div class=\"pos-shell\" [class.pos-small]=\"smallScreen\">\n\n <spa-pos-wide *ngIf=\"!smallScreen\" [title]=\"title\" (charge)=\"openTender()\"></spa-pos-wide>\n\n <!-- Changed (POS Phase 6): the phone presentation. This replaced the Phase 4 HOLDING PANEL, and — exactly as\n that panel's own note predicted — nothing else in this file changed. Both presentations read the SAME\n provided PosSessionService and both reach the tender by emitting the SAME (charge) event, which is why\n a rotate mid-sale is a template swap over state that never moved. -->\n <spa-pos-compact *ngIf=\"smallScreen\" [title]=\"title\" (charge)=\"openTender()\"></spa-pos-compact>\n\n <!-- Added (POS Phase 5): the tender surface is hosted by the SHELL, above the presentation swap, for the same\n reason the cart is: an operator who rotates a tablet mid-tender must keep the tender. It is opened by the\n (charge) event, so the Phase 6 phone presentation reaches this identical component by emitting the same\n event — there is no second tender to write and nowhere for one to diverge. -->\n <spa-pos-tender *ngIf=\"tenderOpen\" (cancelled)=\"closeTender()\" (completed)=\"closeTender()\"></spa-pos-tender>\n</div>\n","import { AfterViewInit, Component, ElementRef, HostListener, NgZone, OnDestroy, inject } from '@angular/core';\nimport { PosConfig } from '../../../classes/PosClasses';\n\n// Added (POS phase 7): the ROUTED till page — what \"home/sales/point-of-sale\" resolves to, and the thing that\n// finally makes the Phase 3-6 component family reachable from a menu instead of only from a dev surface.\n//\n// 🔑 IT IS DELIBERATELY THIN, AND THE THINNESS IS THE POINT. It renders <spa-pos> and nothing else: no header,\n// no card, no padding, no title bar. The till already owns its own top bar, its own accent tokens and its own\n// interior scrolling (Phases 4 and 6), and every wrapper chrome this page could add would be chrome the\n// operator has to look past to reach the scan box. A routed page that adds a heading above a page that already\n// has one is how a till ends up with two.\n//\n// 🔴 SO THIS FILE SOLVES EXACTLY ONE PROBLEM, AND IT IS A REAL ONE: GIVING THE TILL A DEFINITE HEIGHT.\n// `spa-pos` is `height: 100%` (pos.component.css :host) because both presentations scroll INSIDE themselves —\n// a page-level scrollbar at a counter is a defect, since the operator would have to scroll to reach CHARGE\n// with a customer waiting. But `height: 100%` against a parent of AUTO height resolves to auto, and the app\n// shell's `.sm-content` (nav-menu.component.css:458) is `flex: 1` with only a `min-height`, so the till would\n// collapse to its content and the plinth would drift down the page.\n//\n// ⚠️ AND A FIXED `calc(100vh - 56px - …)` IS THE WRONG FIX, which is why this measures instead. The chrome is\n// not one constant: the library ships FOUR navigation layouts ('side', 'side-modern', 'top', 'top-modern'),\n// three of which declare their container padding INLINE in nav-menu.component.html; the top bar is 56px only\n// in side-modern; the footer is present in some layouts and hidden by a media query in others; and under\n// 600px a fixed bottom tab bar takes another 64px plus the safe-area inset via `.has-bottom-tabs`. A single\n// literal would be right in one layout and wrong in three, and the failure mode is the Phase 6 defect all over\n// again — the scan box or the CHARGE button pushed off the screen, on a surface where every measurement still\n// passes.\n//\n// So the height is taken from the PARENT'S OWN CONTENT BOX: whatever room the shell actually left, in\n// whichever layout is running, at whatever width. Nothing here knows what a top bar is.\n@Component({\n selector: 'spa-point-of-sale',\n templateUrl: './point-of-sale.component.html',\n styleUrls: ['./point-of-sale.component.css'],\n standalone: false\n})\nexport class PointOfSaleComponent implements AfterViewInit, OnDestroy {\n\n private host = inject(ElementRef<HTMLElement>);\n private zone = inject(NgZone);\n\n // The library defaults are the endpoints Phases 1, 2 and 7 shipped, so a consumer that wants the stock till\n // configures nothing. This page passes a config object rather than nothing at all only so that the title is\n // named in one obvious place for an app that re-words it.\n posConfig: PosConfig = { title: 'Point of Sale' };\n\n // A plain field, written by measure() — never a getter bound in the template. An allocating getter in a\n // template caused a real livelock in this library (template-bound-getters-banned), and a height getter would\n // be read on every change-detection pass forever.\n // Starts at the floor rather than at zero so the single frame before the first measurement lands renders a\n // till rather than a blank strip.\n height = 480;\n\n private frame = 0;\n\n ngAfterViewInit() {\n // One frame late, deliberately: at ngAfterViewInit the shell's own layout has not necessarily settled (the\n // sidenav animates, and the footer is laid out after us), so measuring now can capture a height that is\n // correct for a page mid-transition and wrong a moment later.\n this.zone.runOutsideAngular(() => {\n this.frame = requestAnimationFrame(() => this.zone.run(() => this.measure()));\n });\n }\n\n ngOnDestroy() {\n if (this.frame) cancelAnimationFrame(this.frame);\n }\n\n // Rotating a tablet, opening the sidenav and the on-screen keyboard appearing all change the room available.\n //\n // 🔴 IT RE-MEASURES ON THE NEXT FRAME, NOT SYNCHRONOUSLY, AND THAT WAS A MEASURED DEFECT, NOT A PRECAUTION.\n // Measuring inside the resize event reads the layout of the frame that is being replaced: the first run of\n // this page kept a 968px till after the viewport dropped to 393x727, so the CHARGE button sat 290px below the\n // bottom of a phone screen — the Phase 6 defect in a new costume, and every touch-target measurement was still\n // green while it was happening.\n @HostListener('window:resize')\n onResize() {\n if (this.frame) cancelAnimationFrame(this.frame);\n this.zone.runOutsideAngular(() => {\n this.frame = requestAnimationFrame(() => this.zone.run(() => this.measure()));\n });\n }\n\n private measure() {\n const element = this.host.nativeElement as HTMLElement;\n const parent = element.parentElement;\n if (!parent) return;\n\n // 🔴 THE TILL IS COLLAPSED TO ZERO BEFORE THE PARENT IS MEASURED, AND WITHOUT THIS THE MEASUREMENT FEEDS\n // ITSELF. The shell's content container grows to fit its children, so once this page has a height the\n // parent's bottom INCLUDES it — measure again and the page grows by whatever it already was, every resize,\n // forever. Collapsing first asks the honest question: how much room is there when I am not in it? Setting\n // the style and then reading getBoundingClientRect forces a synchronous reflow, so the answer is real\n // rather than queued, and the height is restored before the frame is painted.\n const box = element.querySelector('.pos-page') as HTMLElement | null;\n const previous = box ? box.style.height : '';\n if (box) box.style.height = '0px';\n\n // The parent's CONTENT bottom — its border box less its own bottom padding. That padding is what carries\n // the mobile bottom-tab allowance (`.has-bottom-tabs`, 64px + safe-area), so reading it here is what keeps\n // the CHARGE button clear of the tab bar without this file ever mentioning one.\n const paddingBottom = parseFloat(getComputedStyle(parent).paddingBottom) || 0;\n const available = parent.getBoundingClientRect().bottom - paddingBottom - element.getBoundingClientRect().top;\n if (box) box.style.height = previous;\n\n // A floor rather than a raw value: a measurement taken while the shell is animating can come back tiny or\n // negative, and a till that collapses to nothing is worse than one that is briefly too tall.\n this.height = Math.max(480, Math.round(available));\n }\n}\n","<!-- Added (POS phase 7): the whole page. The till owns its own chrome — scan bar, category strip, ticket rail\n and plinth — so a wrapper heading, card or padding here would be a second header above a page that already\n has one, and 12px of padding the operator's thumb has to travel past. The one thing this element supplies\n is the definite height spa-pos needs; see the component for why it is measured rather than calculated. -->\n<div class=\"pos-page\" [style.height.px]=\"height\">\n <spa-pos [posConfig]=\"posConfig\"></spa-pos>\n</div>\n","import { NgModule } from '@angular/core';\nimport { Routes, RouterModule } from '@angular/router';\nimport { SalesOrdersComponent } from '../../pages/sales/sales-orders/sales-orders.component';\nimport { SalesComponent } from '../../pages/sales/sales/sales.component';\nimport { SalesDashboardComponent } from '../../pages/sales/sales-dashboard/sales-dashboard.component';\nimport { PointOfSaleComponent } from '../../pages/sales/point-of-sale/point-of-sale.component'; // Added (POS phase 7)\n\nexport const SALES_ROUTES: Routes = [\n { path: \"point-of-sale\", component: PointOfSaleComponent, data: { capName: \"cap93\", moduleKey: \"sales\" } }, // Added (POS phase 7): the till. capName is INERT metadata exactly like the two rows below — the library deliberately attaches NO guard of its own (spa-home-routing.module.ts) and a consumer opts in by adding capabilityGuard() to its OWN route table. cap93 is Capabilities.PointOfSale, the same cap the menu row (datalib.service.ts capPointOfSale) and the SERVER (SalesController pos-sale/receipt) enforce, so an ungated deep link still cannot record a sale. moduleKey ties it to the `sales` module toggle, so the page goes with EnableSales\n { path: \"orders\", component: SalesOrdersComponent, data: { capName: \"cap39\" } }, // Added (Phase 4): INERT metadata, exactly like data.moduleKey — nothing in this library reads it. It declares which capability the PAGE requires (sales.service.ts:59 gates the grid on capSalesOrders, datalib.service.ts:600), so a consumer that opts in by attaching capabilityGuard() in its OWN route table refuses the deep link; an app that never adds that line is unaffected\n { path: \"sales\", component: SalesComponent },\n { path: \"dashboard\", component: SalesDashboardComponent, data: { capName: \"cap61\" } } // Changed: added INERT capName — cap61 is capSalesDashboard, menu link exactly \"home/sales/dashboard\" (datalib.service.ts:522,524). NOTE: capSalesDashboard deliberately reuses the capSalesModule number (datalib.service.ts:516), so this gate is module-wide, not page-specific — faithful to the menu authority but weaker than a dedicated cap\n];\n\n@NgModule({\n imports: [RouterModule.forChild(SALES_ROUTES)],\n exports: [RouterModule]\n})\nexport class SalesRoutingModule { }\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { LayoutModule } from '@angular/cdk/layout';\nimport { SpaMatModule } from 'tin-spa/core';\nimport { PosComponent } from './pos.component';\nimport { PosWideComponent } from './pos-wide/pos-wide.component';\nimport { PosTileComponent } from './pos-tile/pos-tile.component';\nimport { PosTenderComponent } from './pos-tender/pos-tender.component'; // Added (POS Phase 5)\nimport { PosCompactComponent } from './pos-compact/pos-compact.component'; // Added (POS Phase 6): the phone-portrait presentation, which replaced the Phase 4 holding panel\n\n// Added (POS Phase 4): SpaPosModule — the till component family.\n//\n// 🔑 ITS OWN MODULE, following the SpaDayBookModule precedent in this library and for the same two reasons:\n// the POS family is a page-shaped surface rather than a form control, and tin-spa.module.ts is a file every\n// session touches, so declaring here keeps this work off a contended file. It carries no routes and no\n// providers, so importing it costs a consumer nothing.\n//\n// 🔴 PosSessionService IS DELIBERATELY NOT IN A `providers` ARRAY HERE. It is provided by PosComponent\n// itself, so each till page gets exactly one cart that dies with the page. Listing it at module level would\n// make it a singleton for the whole injector and hand the next operator the last customer's basket — and it\n// would also break the rotate-preserves-cart property this phase exists to deliver, by putting the instance\n// somewhere the shell no longer controls.\n//\n// It imports SpaMatModule (mat-icon, mat-spinner) and CDK LayoutModule (BreakpointObserver) rather than\n// TinSpaModule: the till renders no spa-table and no spa-form, and importing the main module here would\n// create a cycle the moment the main module ever wanted a till.\n@NgModule({\n declarations: [\n PosComponent,\n PosWideComponent,\n PosTileComponent,\n PosTenderComponent,\n PosCompactComponent\n ],\n imports: [\n CommonModule,\n LayoutModule,\n SpaMatModule\n ],\n exports: [\n PosComponent,\n PosWideComponent,\n PosTileComponent,\n PosTenderComponent,\n PosCompactComponent\n ]\n})\nexport class SpaPosModule { }\n","import { NgModule } from '@angular/core';\nimport { SalesRoutingModule } from './sales-routing.module'; // Added (S10-part-1): this domain is now reached by loadChildren, so it carries its own RouterModule.forChild table instead of contributing routes to the eager parent\nimport { CommonModule } from '@angular/common';\nimport { SpaAdminModule } from '../spa-admin.module';\nimport { SalesOrdersComponent } from '../../pages/sales/sales-orders/sales-orders.component';\nimport { SalesComponent } from '../../pages/sales/sales/sales.component';\nimport { SalesDashboardComponent } from '../../pages/sales/sales-dashboard/sales-dashboard.component';\nimport { PointOfSaleComponent } from '../../pages/sales/point-of-sale/point-of-sale.component'; // Added (POS phase 7)\nimport { SpaPosModule } from '../../pages/sales/point-of-sale/pos.module'; // Added (POS phase 7): the till component family — its own module since Phase 4, imported here rather than declared, so nothing about the till leaks into the sales module's own surface\n\n@NgModule({\n declarations: [\n SalesOrdersComponent,\n SalesComponent,\n SalesDashboardComponent,\n PointOfSaleComponent // Added (POS phase 7): the routed page. It is a page, not part of the till family — SpaPosModule owns spa-pos itself\n ],\n imports: [\n SalesRoutingModule,\n CommonModule,\n SpaAdminModule,\n SpaPosModule // Added (POS phase 7): brings <spa-pos> into scope for the routed page's template\n ]\n})\nexport class SalesModule { }\n"],"names":["i1.PageComponent","i2","i3.TilesComponent","i4.ChartsComponent","i1","i3","i4.PosTileComponent","i2.PosWideComponent","i3.PosTenderComponent","i4.PosCompactComponent","i1.PosComponent"],"mappings":";;;;;;;;;;;;;;;;MASa,oBAAoB,CAAA;AALjC,IAAA,WAAA,GAAA;AAMU,QAAA,IAAA,CAAA,YAAY,GAAG,MAAM,CAAC,YAAY,CAAC,CAAC;AAI5C,QAAA,IAAA,CAAA,UAAU,GAAe;AACvB,YAAA,KAAK,EAAE,cAAc;AACrB,YAAA,WAAW,EAAE,IAAI,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,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAW,iBAZpB,oBAAoB;YACpB,cAAc;YACd,uBAAuB;AACvB,YAAA,oBAAoB;qBAGpB,kBAAkB;YAClB,YAAY;YACZ,cAAc;AACd,YAAA,YAAY;;AAGH,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAW,YANpB,kBAAkB;YAClB,YAAY;YACZ,cAAc;AACd,YAAA,YAAY;;;4FAGH,WAAW,EAAA,UAAA,EAAA,CAAA;kBAdvB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE;wBACZ,oBAAoB;wBACpB,cAAc;wBACd,uBAAuB;AACvB,wBAAA,oBAAoB;AACrB,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,kBAAkB;wBAClB,YAAY;wBACZ,cAAc;AACd,wBAAA,YAAY;AACb;AACF,iBAAA;;;;;"}
@@ -4,7 +4,7 @@ import * as i1$2 from '@angular/router';
4
4
  import { RouterModule } from '@angular/router';
5
5
  import * as i1$1 from '@angular/common';
6
6
  import { CommonModule } from '@angular/common';
7
- import { e as SpaAdminModule } from './tin-spa-tin-spa-Cqe5hYTr.mjs';
7
+ import { e as SpaAdminModule } from './tin-spa-tin-spa-Ca9PhXiH.mjs';
8
8
  import * as i1 from 'tin-spa/core';
9
9
  import { redactSecrets } from 'tin-spa/core';
10
10
  import * as i2 from '@angular/material/snack-bar';
@@ -929,4 +929,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
929
929
  }] });
930
930
 
931
931
  export { TENANCY_ERP_ROUTES, TenancyErpModule };
932
- //# sourceMappingURL=tin-spa-tenancy-erp.module-GwIv8Wbc.mjs.map
932
+ //# sourceMappingURL=tin-spa-tenancy-erp.module-BhlUtBMA.mjs.map