WFDASH-WEBAPP/public/pos
Dave 076e80ecb4 feat(pos): add FA icons to catalog, matched by category
Each stock item now renders a Font Awesome icon in the catalog grid
in place of the generic '?' initials. The icon comes from the item's
category, set on the categories collection's new 'icon' field (e.g.
'fa-solid fa-bolt' for Fasteners). All 10 active categories seeded
with sensible defaults; can be edited per-row in PB admin.

Match logic lives in pos-service.listActiveStockCatalog: it pulls the
categories matcher table, then assigns each item by:
  1. category.match_brands (against item text or supplier's supply_tags)
  2. category.match_supplier_tags
  3. category.match_keywords (longest first so 'hydraulic hose' beats 'hose')
  4. the 'Unknown / Other' catch-all is excluded from matching — anything
     with no match simply gets the initials fallback

The matcher table is in PB (the existing match_keywords/match_supplier_tags
/match_brands fields on categories), so admins can tune coverage without
a deploy. Two keyword additions to Fasteners (allen cap, set screw) and
Cutting Tools (tap, drill, chuck) lifted the live match rate from 67% to
71% (298/418 items across 8 categories).

FA 6.5.2 Free, solid only, bundled under public/pos/fa/ (256KB total:
100KB CSS + 156KB solid woff2). Both the CSS and the woff2 are in the
service worker APP_SHELL so icons render offline. No CDN dependency.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-08-31 16:40:02 +02:00
..
fa feat(pos): add FA icons to catalog, matched by category 2026-08-31 16:40:02 +02:00
cashup.html feat(pos): rewire cashup.html to /api/v1/pos/sales 2026-08-31 01:46:26 +02:00
history.html feat(pos): rewire history.html to /api/v1/pos/sales 2026-08-31 01:45:43 +02:00
index.html feat(pos): rewire index.html product count to /api/v1/pos/catalog 2026-08-31 01:44:55 +02:00
manifest.json chore(pos): bump SW cache to v13, skip /api/ caching, scope manifest to /pos/ 2026-08-31 01:48:49 +02:00
pos-app.js feat(pos): add FA icons to catalog, matched by category 2026-08-31 16:40:02 +02:00
pos-config.js feat(pos): replace hardcoded PB superuser creds with POS_API_KEY config 2026-08-31 01:42:24 +02:00
pos.html feat(pos): add FA icons to catalog, matched by category 2026-08-31 16:40:02 +02:00
receipt.html feat(pos): delivery-note slip shows company name and optional prices 2026-08-31 01:48:22 +02:00
sw.js feat(pos): add FA icons to catalog, matched by category 2026-08-31 16:40:02 +02:00
theme.js chore(pos): copy WFSALES POS mockup into public/pos/ (unwired) 2026-08-31 01:41:54 +02:00