Commit Graph
366 Commits
Author SHA1 Message Date
Christian Vidal WolfandClaude Fable 5 b42dd32cda feat(pricing): source EMCO Compliant live from Business Central
EMCO Compliant is maintained manually in BC, so the pricing column now
fetches it from the new /api/bc-empco endpoint (items API, field
empCOCompliant) on every app load instead of reading the Dropbox matrix.
One fetch per page load, cached across tab switches; sorting uses the
live map.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-08 16:45:45 +02:00
Christian Vidal WolfandClaude Fable 5 0c152a4742 feat(pricing): add EMCO Compliant column next to CategorizationCode
Read-only Yes/No badge sourced from the matrix EmpCO_Compliant column
(detected dynamically by header; shows '-' until the new matrix layout
is live in Dropbox). Sortable, pinnable and resizable like the rest.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-08 16:36:13 +02:00
Christian Vidal WolfandClaude Fable 5 0d50fce790 feat(matrix): support new matrix layout with 4 added columns
- Update default column indices to July 2026 layout (EmpCO_Compliant,
  Comments, Categorisation Code, Ingredients added; PM Classification
  removed; downstream columns shifted)
- Seed internal Categorisation Code from the new Excel column while
  keeping app-side edits as the source of truth
- Guard legacy CPNP index-77 fallbacks: only trusted when the current
  layout still holds CPNP there (new layout stores Item To Root Units)
- Use resolved column index for forced zero stock instead of static one

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-08 13:28:47 +02:00
Christian Vidal Wolf 633f523fc8 feat(bc): sync categorization code 2026-07-02 15:49:52 +02:00
Christian Vidal Wolf 9e19a8cace chore(backup): disable scheduled backups 2026-05-29 11:02:52 +02:00
Christian Vidal Wolf 97130003d8 fix(bc): sync all pending queue items 2026-05-27 11:14:24 +02:00
Christian Vidal Wolf 8ea63f60c8 fix(auth): resolve concurrent session token refresh and state syncing issues to prevent frequent logouts 2026-05-26 12:49:22 +02:00
Christian Vidal Wolf 070da5ad0f fix(auth): reduce forced logout 2026-05-26 11:36:11 +02:00
Christian Vidal Wolf 178d34bc45 refactor(ui): remove excel export buttons 2026-05-26 11:30:12 +02:00
Christian Vidal Wolf 4037f7924a feat(bc): sync 40hc pricing 2026-05-26 10:34:11 +02:00
Christian Vidal Wolf 74d4d37769 feat(bc): sync pricing units2 2026-05-26 10:25:37 +02:00
Christian Vidal WolfandClaude Sonnet 4.6 c64ce84e44 fix(dashboard): enable scroll on small screens in Control Dashboard
Removed h-full and overflow-auto from the root grid div. h-full was
constraining the grid to the viewport height, causing CSS grid to
shrink rows to fit instead of overflowing. Parent <main> already has
overflow-auto, so removing the height constraint lets content expand
naturally and scroll correctly on small screens.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
2026-05-26 09:51:23 +02:00
Christian Vidal Wolf 5537fea03e fix(pricing): edit units inline 2026-05-25 16:24:28 +02:00
Christian Vidal Wolf 9c3e26c523 fix(dropbox): use direct raw fallback 2026-05-21 14:08:41 +02:00
Christian Vidal Wolf 290b298544 fix(sync): harden Dropbox loading 2026-05-21 13:58:52 +02:00
Christian Vidal Wolf fa998ec9bf fix(dev): restore Dropbox file proxy 2026-05-21 13:56:13 +02:00
Christian Vidal Wolf cffd16acc7 fix(sync): pin Dropbox source 2026-05-21 13:53:12 +02:00
Christian Vidal Wolf 9c0a7d18a0 fix(sync): trust Dropbox data 2026-05-21 13:37:12 +02:00
Christian Vidal Wolf 972fbffc1c fix: update dropbox-sync API to merge non-editable fields, fix setCors crash and update fallback asset 2026-05-21 11:10:43 +02:00
Christian Vidal Wolf efe51c7f62 fix: disable capacity columns override and fix Supabase service key fallback in API endpoints 2026-05-21 10:41:20 +02:00
Christian Vidal WolfandClaude Sonnet 4.6 295f9d3060 fix(dropbox): use authenticated API to bypass CDN cache on file download
The proxy was calling getAccessToken() but discarding the result, then
downloading via the public sharing link which is CDN-cached. Updated
data in Dropbox could take minutes/hours to propagate through the CDN,
causing all fields in the Matrix view to show stale values.

Now attempts download via /2/sharing/get_shared_link_file with Bearer
auth (no CDN cache), falling back to the sharing link if credentials
are not configured.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
2026-05-21 10:28:46 +02:00
Christian Vidal Wolf ab7dceb81f update bundled data matrix fallback 2026-05-20 15:16:14 +02:00
Christian Vidal Wolf d40bc9fa9c restore legacy cpnp history index 2026-05-20 15:12:36 +02:00
Christian Vidal Wolf 528d859742 restore cosmetic cpnp merge logic 2026-05-20 15:06:12 +02:00
Christian Vidal Wolf 1d5f918a0a show all cosmetic items by cpnp filter 2026-05-20 15:02:48 +02:00
Christian Vidal Wolf 39a3588078 improve cpnp history restore 2026-05-20 15:00:26 +02:00
Christian Vidal Wolf cb913b9d72 restore cpnp values from history 2026-05-20 14:56:55 +02:00
Christian Vidal Wolf d17db2761b fix user validation fallback 2026-05-20 14:04:02 +02:00
Christian Vidal Wolf 396ff23d49 fix dropbox load fallback 2026-05-20 13:59:35 +02:00
Christian Vidal Wolf e8d05069f3 fix vercel load errors 2026-05-20 13:57:11 +02:00
Christian Vidal Wolf 88dc894050 fix(vercel): remove manual rewrites, rely on Vercel auto-detection of /api/ functions 2026-05-20 13:48:08 +02:00
Christian Vidal Wolf 4612f13968 feat(dev): support Vercel serverless API handlers locally in Vite dev server 2026-05-20 13:40:51 +02:00
Christian Vidal Wolf b2c6bce8eb fix(vercel): add leading slashes to rewrite destinations 2026-05-20 13:38:19 +02:00
Christian Vidal Wolf 47b9303202 feat: implement manual user validation and user deletion flow 2026-05-20 13:33:37 +02:00
Christian Vidal Wolf 1d105e19ae feat(topbar): add Discard button to BC sync queue dropdown 2026-05-15 13:52:47 +02:00
Christian Vidal Wolf 6d664c26f1 feat(history): add Discard selected button to cancel pending BC syncs 2026-05-15 13:45:44 +02:00
Christian Vidal Wolf 143f655f3c fix: commit all BC sync files missing from repo 2026-05-15 11:00:21 +02:00
Christian Vidal Wolf 85794b4b52 fix: add missing SyncStatusPill component to repo 2026-05-15 10:57:39 +02:00
Christian Vidal Wolf cf92b85d17 fix(ui): remove SyncStatusPill from ProductDescriptions SKU column 2026-05-15 10:53:46 +02:00
Christian Vidal Wolf 2944e6958c fix(history): paginate all records, number oldest=1 newest=N, display newest first 2026-05-15 10:51:01 +02:00
Christian Vidal Wolf f66295f07b feat: schedule 6h backup via GitHub Actions instead of Vercel cron 2026-05-15 08:10:39 +02:00
Christian Vidal Wolf b911ada50b feat: add 6h automated backup to Dropbox via Vercel cron 2026-05-15 08:06:54 +02:00
Christian Vidal Wolf cf531cfa40 fix(ui): remove yellow/red row backgrounds in PricingView 2026-05-14 20:27:53 +02:00
Christian Vidal Wolf e89f31d9b3 fix(ui): remove yellow/red row backgrounds, keep green only 2026-05-14 20:21:01 +02:00
Christian Vidal Wolf 008a10502b feat(history): add user filter dropdown 2026-05-14 20:15:34 +02:00
Christian Vidal Wolf 7dd899dae6 fix(history): number records oldest=1, newest=N 2026-05-14 18:37:07 +02:00
Christian Vidal Wolfandclaude-flow ca8a98c6c2 feat(history): add record numbering and column names to Change History
- Show total record count and filtered count in subtitle
- Add #N global number to each history entry row
- Add # column index inside each change detail table
- Column header already shown via headers[i] — now labeled "Column"

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-05-14 18:33:07 +02:00
Christian Vidal Wolfandclaude-flow 9b5932920e feat: add Business Central CPNP sync and expand history access
- Add bc-proxy and bc-export serverless API handlers
- Add businessCentral service with updateCpnpNoInBC and downloadBusinessCentralItemsExcel
- Sync cpnpNo to BC on save (CosmeticItemsView and handleSaveAll)
- Parallelize handleSaveAll with Promise.all
- Fix array index key, a11y click/keyboard handlers, autoFocus
- Grant Change History and Pending Validation access to jingying.shi@craze-group.com

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-05-14 17:17:10 +02:00
Christian Vidal Wolfandclaude-flow 2961d3f86a fix: persist CPNP No. across refreshes by saving as 'edited' and restoring in merge
- saveRowToSupabase now accepts optional status param (default 'pending')
- CosmeticItemsView saves CPNP with status 'edited' so resetAllPendingRows
  does not affect it and it survives the startup merge
- Re-added CPNP_NO to editableColumns so the merge restores it from Supabase

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-05-12 16:03:12 +02:00
Christian Vidal Wolfandclaude-flow a0b793b797 fix: save CPNP No. directly to Supabase on confirm, no Save All required
Bypasses the pending queue timing issue by calling saveRowToSupabase
directly after onSaveRow. Shows a spinner while saving. Alert on error.

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-05-12 15:59:17 +02:00