Persist uploaded order CSVs across app restarts #1
Loading…
Reference in New Issue
No description provided.
Delete Branch "feature/csv-upload-persistence"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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.
ordersCsv(keyPath 'id'),saveOrdersCsv(csvText) and loadOrdersCsv().
can persist the raw text alongside the parsed result.
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.Pull request closed