Commit Graph

19 Commits

Author SHA1 Message Date
31d5535b72 pos implemented 2026-08-10 18:14:52 +05:30
ac6dbd7671 pricing update 2026-08-06 10:58:34 +05:30
13db63e219 console update 2026-08-03 15:36:34 +05:30
8deaf8513b Fix the empty rider dropdown and notify riders on assign
The assign dropdown was empty on open. Two faults compounded: riders were
queried by tenantid, and the source list defaulted to a tab that could
never match.

/partners/getriders returns nothing for any tenant, because a rider record
leaves app_users.tenantid unset — riders belong to a partner and an
app-location. Scoping by applocationid returns them, so both Orders and
Deliveries now take the app-location from the rows they are showing and
fall back to the caller's.

The second fault was the "Store Fleet" default, which filtered for
partnerid === 0. Every on-duty rider has a partnerid, so the default tab
was always empty even once the query returned rows. It is now On Duty /
This Partner, the latter enabled only when the orders name a partner.

Dropped the getallusers?roleid=5 "own fleet" list it merged in. There is no
rider role: app_roles defines 1-6 as Super admin / Operations / Admin /
Manager per configid, and riders are identified by configid=6 inside
getriders. roleid=5 matched a single user with two deliveries in the
platform's history, while the users actually driving deliveries carry
roleid 0.

/partners/getriders is already a presence query rather than a roster — it
requires status Active, onduty=1 and a riderlog dated today with
logstatus=0 — so the list is riders working right now, and it carries the
userfcmtoken needed to reach them. Added a refetch so someone logging off
mid-shift drops out of the list.

Riders are now notified. The push runs after the write and is reported
separately: the deliveries are committed by then, so a failed push must not
read as a failed assignment, but it must still be visible because a rider
who was never told has work sitting unseen. A missing token is reported as
a rider with no device registered rather than as a transport failure, since
the remedy is different.

Deliveries gains the rider actions its placeholder promised: change rider,
notify, and send-cancellation carrying data.type=cancel. Change-rider is
offered only while a delivery is pending, accepted or arrived, because
reassigning resets orderstatus to pending and would otherwise rewind a
journey already completed.

reassignDeliveries was posting to /riders/reassigndeliveries, which is not
registered on the backend and answers 404. It had no callers, so the
failure had never been observed. It now goes through updatedelivery, one
call per delivery, tolerating partial failure.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-31 12:48:57 +05:30
eb6e750b6a main stocks update 2026-07-27 19:00:09 +05:30
92165b986c inventory page 2026-07-23 16:05:38 +05:30
Suriya
fef75a1cc2 Add first-login password setup flow
Accounts created by tenant/store onboarding (createtenantuser,
createtenantlocation) have no password set. Previously the login form
treated the backend's "please setup a password" response as a
successful login instead of prompting for one. Now auth.ts recognizes
it (PasswordSetupRequiredError) and LoginView routes to a create-
password step, then signs in immediately with the new password.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-21 16:46:07 +05:30
407574d62a dispatch testing 2026-07-20 18:54:09 +05:30
11baf732b7 import product catalogue 2026-07-16 17:05:06 +05:30
4ef9cd9085 new changes in api base url 2026-07-09 15:49:45 +05:30
7cd0ae85ef stock request 2026-07-04 17:46:30 +05:30
93df333df1 implemented the sales and revenue report 2026-06-23 19:18:01 +05:30
2e9ffb15bb udpates on the ui changes on theprodut catalogs 2026-06-16 20:12:45 +05:30
Gokul
01685f14c2 e2e testing 2026-06-15 19:17:13 +05:30
0519e3b19c api integration on the dispatch page 2026-06-12 15:24:05 +05:30
Gokul
5378f2df1f dispatch page 2026-06-12 14:45:06 +05:30
Gokul
9f25c5f60a udpates on the ui changesand api integration 2026-06-09 11:25:29 +05:30
Gokul
a11a859761 new changes 2026-06-04 11:40:06 +05:30
Suriya
6eaeb5c4a7 feat: relocate orders and deliveries to store console & polish store cover images 2026-06-03 18:20:43 +05:30