Skip to content

v1.0.25 — offline reads (catalog + customers)

Choose a tag to compare

@sayanthns sayanthns released this 22 Apr 21:25
· 34 commits to develop since this release

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) into item_cache so 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.