Commit Graph

40 Commits

Author SHA1 Message Date
8885c55817 lat and long 2026-07-27 12:09:41 +05:30
6a6221f9f3 Auto-geocode tenant/store address into latitude/longitude on onboarding
Both the tenant onboarding and store/branch forms only had free-text
address fields with no coordinates captured, even though the backend
already accepts and stores latitude/longitude on both tenants and
tenantlocations. Wires in the existing keyless AddressAutocomplete
(Nominatim) component used by UsersPanel so picking an address also
geocodes it, and threads latitude/longitude through both create payloads.
2026-07-27 11:34:35 +05:30
Suriya
02b5258000 Fix product import defaulting to 1 in stock, allowing orders with zero real inventory
Quick-import buttons hardcoded quantity:1, which the backend writes straight
to the stock ledger as an "in" entry — letting one order go through for a
product that was never actually stocked. Default to 0 instead, and fix a
fallback path that was silently coercing an explicit 0 back to 1 via `|| 1`.
2026-07-23 16:25:34 +05:30
92165b986c inventory page 2026-07-23 16:05:38 +05:30
c6649c9c8f Show the store's scannable QR code right after onboarding
The consumer app resolves a storefront by scanning a QR that encodes
{tenantid, locationid}. Store Onboarding was creating the location but never
surfacing its QR, so operators had to hunt for it later in the store detail
view. Now that the backend returns the created location's locationid in the
onboarding response, render the existing StoreQRView component directly in
the "Store Branch Active!" success panel (both onboarding UI variants) so the
printable QR is available the moment the branch is created.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-23 11:09:09 +05:30
d196d56929 user login 2026-07-22 17:42:09 +05:30
58c42d9013 Fix app_users.configid mismatch blocking Staff/Rider first login
UsersPanel.tsx was sending configid: 15 (Staff) / 6 (Rider) when creating
users, copied from an unrelated Hasura "role config" convention. Every
login call (auth.ts) queries app_users with configid: 1, so any account
created with 15/6 could never be found on login and was stuck before it
even reached the password-setup step. Both create paths and the
CreateUserInput default now consistently use configid: 1.

Also fixes getRiderLogs() calling riders/getriderlogs, which 404s since
the backend only registers this route under /partners.
2026-07-22 17:35:07 +05:30
Suriya
bbcf987488 Skip the pointless password prompt before first-time password setup
checkEmailRequest only checked whether the account existed, so a
first-login account (no password set yet) was still sent to the
normal "enter your password" screen before the backend revealed there
was no password to check against — only then did it route to the
create-password step. checkEmailRequest now detects the same
setup-required signal PasswordSetupRequiredError does and skips
straight to it.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-21 17:14:14 +05:30
Suriya
f029c09dd7 Fix missing Primary Outlet Name field on the Super Admin tenant form
AdminConsole renders the Tenant Onboarding form twice (embedded vs.
showHeader standalone) from two separate JSX blocks. The Primary
Outlet Name / Business Category fields added earlier only landed in
the embedded block, so the showHeader block SuperAdminPage actually
renders had no way to fill tenantForm.locationname — the required-
field check on submit failed unconditionally, no matter what was
filled in.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-21 16:56:02 +05:30
Suriya
498f1f4e4f Fix catalogue API base URL missing /web segment
catalogueApi.ts's fallback base URL ("/live/api/v1") was one path
segment short of where the routes actually live ("/live/api/v1/web"),
unlike every other service file's fallback. Any build without
VITE_FIESTA_URL set (it's gitignored, never committed) 404'd on every
catalogue call — browse, brands, categories, and import.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-21 16:48:52 +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
f62668e54e reponsived the website and login fix done 2026-07-21 16:26:45 +05:30
407574d62a dispatch testing 2026-07-20 18:54:09 +05:30
Suriya
6b154997fb Fix Super Admin page content rendering under the fixed header
Header is position: fixed (h-16) and SuperAdminPage never offset its
content for that, so the onboarding form rendered underneath the
purple header bar. Add pt-16 to match how the rest of the app already
compensates for this same fixed header, and constrain content width
instead of stretching full-viewport.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-16 21:14:23 +05:30
Suriya
ecbae9d8fc Add Super Admin login routing and wire tenant onboarding to auto-create a location
super_admin is now a real LoginRole, derived from the server's
issuperadmin flag (not a client-guessable roleid) — routes exclusively
to a new minimal SuperAdminPage, never the merchant console.

That page reuses the existing tenant/store/rider onboarding wizard
(AdminConsole) rather than duplicating it — its Tenant tab was already
calling the right composite endpoint but had nowhere to send location
data, and was never actually reachable from anywhere in the app. Now
it collects a primary outlet name + business category and sends a
nested tenantlocations object, so one submit provisions tenant +
active location + admin user instead of leaving the tenant
locationless. createTenantUser also moves off the mob API base onto
the web one, matching where this is actually called from.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-16 20:46:07 +05:30
Suriya
186546f1fe Make subcategory optional, source category picker from real tenant data
Matches the backend: subcategory is no longer a required field in the
import modal (defaults to none/0 instead of blocking submission), and
the Category dropdown now comes from GET gettenantcategories (what
this tenant's own products actually use) instead of the global
categories list, which was missing categoryid 2 despite it being the
category tenant 1135 actually needs.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-16 18:19:41 +05:30
Suriya
32291cddbe Fix Global Catalogue browsing and import
Removes InventoryView's broken duplicate Global Catalogue tab, which
misused createproductlocation with catalogue ids that never match real
product ids (imports silently failed to land) and showed fabricated
Math.random() pricing/ratings. "Import Product" now routes to the
already-correct CatalogueBrowser instead.

Also fixes catalogueApi's product_count field mismatch (brand chip
counts were always blank), a pagination bug that capped the catalogue
at 100 of ~237 products with no way to see the rest, and replaces
ImportProductModal's free-text category id input with a real dropdown
scoped to the tenant's own categories, filtering subcategories to match.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-16 17:31:29 +05:30
11baf732b7 import product catalogue 2026-07-16 17:05:06 +05:30
8a1527cef8 new changes in api base url 2026-07-09 15:50:04 +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
c6a3ea51da developed ui for pos 2026-06-26 10:37:20 +05:30
93df333df1 implemented the sales and revenue report 2026-06-23 19:18:01 +05:30
8707004405 changes on global catalogue 2026-06-20 18:45:25 +05:30
2e9ffb15bb udpates on the ui changes on theprodut catalogs 2026-06-16 20:12:45 +05:30
a0586dc11c udpates on the dockerfile and nginx changes regarding secret key 2026-06-15 19:57:08 +05:30
f907926855 Hasura proxy updated 2026-06-15 19:45:17 +05:30
61a9373399 updates on the nginx config file 2026-06-15 19:37:18 +05:30
00d893a86e udpates on the dockerfile 2026-06-15 19:32:34 +05:30
66ae87bac7 updates on the dockerfile 2026-06-15 19:30:41 +05:30
0c747711c6 config added 2026-06-15 19:28:12 +05:30
Gokul
01685f14c2 e2e testing 2026-06-15 19:17:13 +05:30
Gokul
896561245d weekend update 2026-06-12 18:04:10 +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
d8c1517239 update on the user page regardinga the dispatch and order page and the deliveries page 2026-06-09 16:01:26 +05:30
Gokul
9f25c5f60a udpates on the ui changesand api integration 2026-06-09 11:25:29 +05:30
Suriya
7dbae96b5f feat(merchant): premium UI redesign of Reports, Inventory, Stocks, Settings, and Team Access views 2026-06-04 13:04:11 +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