Repository navigation
v1.0.25 — offline reads (catalog + customers)
Fix: offline reads were broken
v1.0.24 hardened the offline write queue but reads still hit the network cold. When the driver lost signal mid-route, InvoiceForm rendered an empty catalog + empty customer list — effectively unusable offline.
Changes
- api/item.ts
listMine/detail/priceFor— network-first with cache write-through;NetworkError/offline → cached rows.detail()now stores full doc (uoms + price_list_rate) intoitem_cacheso offline addLine has UOMs and prices. - api/customer.ts
listMine— same pattern. Search filters cache locally on name/mobile when offline. - offline/warm.ts (new) — eager warmup called on Dashboard mount + offline→online transition (App.vue watch). Rate-limited to once per 10 min via kv timestamp so no API spam.
Result
Driver logs in online → catalog + customers cached. Loses signal mid-route → InvoiceForm still loads, addLine still works, invoice queues. Comes back online → caches refresh automatically.