Persist uploaded order CSVs across app restarts #1

Closed
randy wants to merge 0 commits from feature/csv-upload-persistence into develop
Owner

Uploaded CSVs previously lived only in memory; reloading the app reset the
order list to the embedded SEED_ORDERS_CSV. Now every upload is written to a
new IndexedDB store so inspectors keep their order list after closing/reopening
the PWA.

  • db.js: bump DB_VERSION to 4, add object store ordersCsv (keyPath 'id'),
    saveOrdersCsv(csvText) and loadOrdersCsv().
  • csvLoader.js: loadOrdersFromUpload returns { text, orders } so the handler
    can persist the raw text alongside the parsed result.
  • main.js: init() prefers the stored CSV, falls back to SEED_ORDERS_CSV. The
    upload handler persists the CSV before re-rendering.
Uploaded CSVs previously lived only in memory; reloading the app reset the order list to the embedded SEED_ORDERS_CSV. Now every upload is written to a new IndexedDB store so inspectors keep their order list after closing/reopening the PWA. - db.js: bump DB_VERSION to 4, add object store `ordersCsv` (keyPath 'id'), saveOrdersCsv(csvText) and loadOrdersCsv(). - csvLoader.js: loadOrdersFromUpload returns { text, orders } so the handler can persist the raw text alongside the parsed result. - main.js: init() prefers the stored CSV, falls back to SEED_ORDERS_CSV. The upload handler persists the CSV before re-rendering.
randy added 1 commit 2026-04-15 15:48:13 +02:00
92ad6a92e3 Persist uploaded order CSVs across app restarts
Uploaded CSVs previously lived only in memory; reloading the app reset the
order list to the embedded SEED_ORDERS_CSV. Now every upload is written to a
new IndexedDB store so inspectors keep their order list after closing/reopening
the PWA.

- db.js: bump DB_VERSION to 4, add object store `ordersCsv` (keyPath 'id'),
  saveOrdersCsv(csvText) and loadOrdersCsv().
- csvLoader.js: loadOrdersFromUpload returns { text, orders } so the handler
  can persist the raw text alongside the parsed result.
- main.js: init() prefers the stored CSV, falls back to SEED_ORDERS_CSV. The
  upload handler persists the CSV before re-rendering.
randy closed this pull request 2026-04-15 15:49:02 +02:00

Pull request closed

Sign in to join this conversation.
No reviewers
No Label
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: randy/duimstok.prorail.nl#1
No description provided.