302 lines
44 KiB
Markdown
302 lines
44 KiB
Markdown
# admin-ui ↔ admin-web parity audit
|
||
|
||
**Goal:** `apps/admin-ui` (React Native / Expo) and `apps/admin-web` (React web) are meant to be mirrors — same screens, sections, copy, behaviour and ordering.
|
||
|
||
**Method:** static read of both apps by four parallel audit passes (shell/home/auth · orders · catalog · users/coupons/settings), then hand-verification of every high-impact claim. Line numbers are from this working tree. `admin-ui:` = `apps/admin-ui/`, `admin-web:` = `apps/admin-web/`.
|
||
|
||
**Types:** `CONTENT` (text/value), `STRUCTURE` (missing/extra/reordered), `BEHAVIOUR` (state, action, refetch, validation, availability), `PLATFORM` (inherent RN-vs-web).
|
||
|
||
**Spot-verified by hand:** `VariantStockDialog` absent on web, image keys vs presigned URLs, web CouponForm missing "First Order Only" (and not round-tripping it), hardcoded "Staff Member" + no staff persistence on web, "Send Welcome Msg" mobile-only, "Load more" web-only on orders/users/coupons/complaints, missing sequence refetch on web, TagForm inline errors web-only, login alert vs inline error, MultiSelect "Clear" button web-only.
|
||
|
||
## Parity baseline (already identical — no action)
|
||
- **Sidebar entries:** all 14 labels in the same order on both sides (Dashboard · Products · Prices Overview · Product Groupings · Dashboard Banners · Slots · Complaints · Manage Orders · Coupons · Vendor Snippets · Stores · User Management · Send Notifications · Logout).
|
||
- **Dashboard home:** same tiles, descriptions, category titles and category order ("Orders", "Products & Inventory", "Marketing & Promotions", "User Management", "Settings & Configuration"); no loading/empty/error states on either side.
|
||
- **Login copy:** "Admin Login", "Staff Name", "Password", "Enter your name", "Enter your password", "Login" / "Logging in...", "Login failed".
|
||
- **Empty/loading/error strings** match across products, tags, groupings, slots, stores, banners, orders, sequences, coupons, complaints, snippets, customize-app.
|
||
|
||
---
|
||
|
||
## 1. Executive summary — the biggest gaps
|
||
|
||
1. **Per-variant stock management exists only on admin-ui.** Web replaces `VariantStockDialog` with a single whole-product toggle and mislabels it: the button reads "Out" when the product is in stock, and web has no "Partial" state and no "{n} of {m} variants are out of stock" view. *Verified.*
|
||
2. **Image storage differs:** admin-ui converts uploads to bucket-relative keys (`toImageKey`) before saving; admin-web saves the raw **presigned URLs** (`images: variantUrls`, `.map((img) => img.url)`), which expire and break product images. *Verified.*
|
||
3. **"First Order Only" is missing from the web coupon form** — no field, no Yup rule, and not round-tripped when editing an existing coupon. *Verified.*
|
||
4. **Staff identity is not persisted on web:** no `staff_session` equivalent, `staff` is null after reload, and the sidebar block is gated on it — so the block shows the hardcoded "Staff Member" and can disappear entirely; admin-ui also shows the region line ("Region #id"/"No region"). *Verified.*
|
||
5. **"Send Welcome Msg" (first-order WhatsApp) exists only on admin-ui**, and only admin-ui passes `isFirstOrder` into `OrderOptionsMenu` from the orders list and the sequences screen. *Verified.*
|
||
6. **List loading differs everywhere:** admin-ui auto-loads on scroll; web adds explicit **"Load more"** buttons (orders, users, coupons, complaints) — web users can think a list is complete.
|
||
7. **Missing refetches on web:** delivery-sequence save/assign (`refetchSequence`/`refetchOrders` on admin-ui only), attach-location after coordinates, review-reply invalidation + form reset, banner slot-empty (no refetch), product-group/slot/store/banner edit invalidations. *Verified for sequences.*
|
||
8. **Feedback mechanism differs wholesale:** native `Alert.alert(title, body)` (+ `window.confirm`-style multi-button confirmations) vs web `window.alert("Title: body")`, `ErrorToast(...)` and browser `window.confirm` (OK/Cancel instead of "No"/"Yes, Cancel", "Cancel"/"Remove", "Cancel"/"Delete"). Every admin confirmation reads differently.
|
||
9. **Destructive confirmations lose their titles/verbs on web** (e.g. "Cancel Order" → `window.confirm('Cancel Order? ...')`, "Remove Delivery Cost" → OK/Cancel).
|
||
10. **Utility-component UX diverges:** web `MultiSelect` shows "N selected" + a **Clear** button and placeholder behaviour; admin-ui `BottomDropdown` joins all labels and has no Clear. Web also renders a label above the trigger where admin-ui doesn't, and in-dialog search placeholder/empty copy differ.
|
||
11. **TagForm validation is invisible on admin-ui** (errors destructured but never rendered) while web shows inline messages under Tag Name/Description. *Verified.*
|
||
12. **A desktop-only dead control on web:** the header hamburger opens an overlay drawer that is `md:hidden`, so on desktop it is a visible no-op.
|
||
|
||
---
|
||
|
||
## 2. Shell / navigation / login / auth
|
||
|
||
### Shell
|
||
- `PLATFORM` `admin-ui: app/(drawer)/_layout.tsx:79-172` ↔ `admin-web: dashboard.tsx:57-70` — icons come from different libraries (MaterialIcons vs lucide); glyphs differ for Products, Banners, Complaints, Coupons (inventory/Package, view-carousel/Images, report-problem/TriangleAlert, local-offer/TicketPercent).
|
||
- `CONTENT` `admin-ui: app/(drawer)/_layout.tsx:64-72` ↔ `admin-web: dashboard.tsx:121-124` — identity block: admin-ui shows the region line (place icon + region name, "Region #<id>", "No region"); admin-web shows the hardcoded "Staff Member" and no region. *Verified.*
|
||
- `CONTENT` `admin-ui: app/(drawer)/_layout.tsx:45` ↔ `admin-web: dashboard.tsx:122` — name fallback "Unknown user" has no web counterpart.
|
||
- `STRUCTURE` `admin-ui: app/(drawer)/_layout.tsx:53-75` ↔ `admin-web: dashboard.tsx:118` — admin-ui always renders the drawer profile header; web renders it only when `staff` is truthy (so it vanishes on reload — see auth).
|
||
- `BEHAVIOUR` `admin-ui: app/(drawer)/_layout.tsx:41-50` ↔ `admin-web: dashboard.tsx:80,122` — admin-ui sources name/region from `trpc.admin.staffUser.me` (server truth, falls back to stored); web uses only in-memory context.
|
||
- `BEHAVIOUR` `admin-ui: app/(drawer)/_layout.tsx:219-222` ↔ `admin-web: dashboard.tsx:155,167-173` — the hamburger opens a real drawer on admin-ui; on web it opens an overlay that is `md:hidden` → desktop no-op at feature roots / on /dashboard.
|
||
- `PLATFORM` `admin-ui: app/(drawer)/_layout.tsx:221` ↔ `admin-web: dashboard.tsx:168` — `router.back()` vs `window.history.back()`.
|
||
- `PLATFORM` `admin-ui: app/(drawer)/_layout.tsx:76-173` ↔ `admin-web: dashboard.tsx:113-114,132-138` — web highlights the active nav entry; admin-ui passes no `focused` so there is no active-item highlight.
|
||
- `BEHAVIOUR` `admin-ui: app/(drawer)/_layout.tsx:78` ↔ `admin-web: dashboard.tsx:105-106` — "Dashboard": `router.dismissTo` (pops) vs `navigate` (pushes).
|
||
- `PLATFORM` `admin-ui: packages/ui/src/lib/refresh-context.tsx:8-11` ↔ `admin-web: src/lib/refresh-context.tsx:13-16` — `refreshAll`: `queryClient.clear()` vs `invalidateQueries()`. (Both header buttons emit REFRESH_EVENT — parity.)
|
||
- `PLATFORM` `admin-ui: app/_layout.tsx:10,35`, `services/notif-service/notif-checker.tsx:37-70` ↔ `admin-web: (none)` — admin-ui-only push-permission dialog: "Notification Permission Denied" / "It seems you have denied notification permissions. Please enable them in your device settings." / "Cancel" + "Settings".
|
||
- `PLATFORM` `admin-ui: app/_layout.tsx:36` ↔ `admin-web: __root.tsx:45` — react-native-toast-message vs sonner.
|
||
- `PLATFORM` `admin-ui: (none)` ↔ `admin-web: __root.tsx:46,51-59` — web always mounts ReactQueryDevtools + TanStackDevtools.
|
||
|
||
### Dashboard home
|
||
- `STRUCTURE` `admin-ui: dashboard/index.tsx:113,31-33` ↔ `admin-web: dashboard.index.tsx:127-135,48-51` — admin-ui sets `testID`/`accessibilityLabel` on tiles (`add-product-menu-item`); web's quick tile and menu button have no `data-testid`.
|
||
- `PLATFORM` `admin-ui: dashboard/index.tsx:248` ↔ `admin-web: dashboard.index.tsx:263` — quick-tile sizing: fixed `calc(25% - 9px)` vs `flex-1`.
|
||
- `PLATFORM` `admin-ui: dashboard/index.tsx:79-201` ↔ `admin-web: dashboard.index.tsx:99-220` — tile/category icon sets differ (library), semantic pairs match.
|
||
- `PLATFORM` `admin-ui: dashboard/index.tsx:224` ↔ `admin-web: dashboard.index.tsx:252` — ScrollView vs div.
|
||
|
||
### Login
|
||
- `PLATFORM`/`BEHAVIOUR` `admin-ui: login.tsx:18` ↔ `admin-web: login.tsx:17-21,68-72` — empty-field validation: `Alert.alert("Error", "Please enter both name and password")` vs inline red text via `setLocalError` (same string). Web's inline slot shows `localError ?? loginError`; admin-ui's only shows server `loginError`. *Verified.*
|
||
- `PLATFORM` `admin-ui: login.tsx:63` ↔ `admin-web: login.tsx:57,63-65` — password masking (`secureTextEntry` vs `type="password"`) and web's Enter-to-submit handler (absent on admin-ui).
|
||
- `PLATFORM` `admin-ui: login.tsx:53,66` ↔ `admin-web: login.tsx:47,60` — field spacing 30px vs 32px (cosmetic).
|
||
|
||
### Auth context / session
|
||
- `BEHAVIOUR` `admin-ui: components/context/staff-auth-context.tsx:64,43`, `src/hooks/useJWT.ts:4,29-45` ↔ `admin-web: components/context/staff-auth-context.tsx:59-62,38-40`, `src/hooks/useJWT.ts:3` — admin-ui persists the staff identity (`staff_session`) and restores it on reload; web saves the JWT only, so `staff` stays null (identity block hidden). *Verified.*
|
||
- `BEHAVIOUR` `admin-ui: components/context/staff-auth-context.tsx:77-78` ↔ `admin-web: components/context/staff-auth-context.tsx:73` — logout clears the staff key on admin-ui; web has none to clear. Both clear the query cache and redirect.
|
||
- `PLATFORM` `admin-ui: components/context/staff-auth-context.tsx:4,86` ↔ `admin-web: components/context/staff-auth-context.tsx:4,81` — `DeviceEventEmitter` vs `EventBus` for force-logout (same event name/string).
|
||
|
||
---
|
||
|
||
## 3. Orders
|
||
|
||
### Orders hub
|
||
- `CONTENT` `admin-ui: manage-orders/index.tsx:46` ↔ `admin-web: dashboard.orders.tsx:52` — flash notice: titled `Alert.alert('Flash Deliveries', 'Flash deliveries do not have delivery sequences. Use the Orders menu to manage flash deliveries.')` vs `window.alert('Flash Deliveries: …')`.
|
||
- `BEHAVIOUR` `admin-ui: manage-orders/index.tsx:56-61` ↔ `admin-web: dashboard.orders.tsx:62-67` — Orders nav: admin-ui pushes `/manage-orders/orders` (drops the selected slot, or `?filter=flash`); web passes `{ filter, slotId }`.
|
||
- `BEHAVIOUR` `admin-ui: manage-orders/index.tsx:49` ↔ `admin-web: dashboard.orders.tsx:55` — Delivery Sequences nav with no slot: admin-ui interpolates `slotId=null` (dead-end "No slot selected" screen); web sends `''` and auto-selects the first slot.
|
||
- `PLATFORM` `admin-ui: manage-orders/index.tsx:90-96` ↔ `admin-web: dashboard.orders.tsx:75-81` — slot picker: `BottomDropdown placeholder="Select Slot"` vs `Dropdown` with no placeholder.
|
||
|
||
### Orders list
|
||
- `BEHAVIOUR` `admin-ui: orders/index.tsx:482` ↔ `admin-web: dashboard.orders.list.tsx:511,529-539` — web reads and applies `slotId` from the URL (`'flash'` or numeric); admin-ui ignores it.
|
||
- `BEHAVIOUR` `admin-ui: orders/index.tsx:549-554,607-614` ↔ `admin-web: dashboard.orders.list.tsx:632-645` — infinite scroll (`onEndReached`, footer spinner + "Loading more...") vs explicit **"Load more"** button. *Verified.*
|
||
- `BEHAVIOUR` `admin-ui: orders/index.tsx:37,41` ↔ `admin-web: dashboard.orders.list.tsx:68,79` — notes result: `Alert.alert('Success','Notes updated successfully')` / `Alert.alert('Error', …)` vs `window.alert('Success: …')` / `ErrorToast(…)`.
|
||
- `BEHAVIOUR` `admin-ui: orders/index.tsx:29-48` ↔ `admin-web: dashboard.orders.list.tsx:58-79` — Save button: never disabled on admin-ui vs `disabled={updateNotesMutation.isPending}` on web.
|
||
- `STRUCTURE` `admin-ui: orders/index.tsx:348-365` ↔ `admin-web: dashboard.orders.list.tsx:379-395` — admin-ui passes `isFirstOrder` into `OrderOptionsMenu`; web omits it.
|
||
- `PLATFORM` `admin-ui: orders/index.tsx:216` ↔ `admin-web: dashboard.orders.list.tsx:244` — checkbox fill gray500 (#717680) vs #6B7280.
|
||
- `PLATFORM` `admin-ui: orders/index.tsx:21-27` ↔ `admin-web: dashboard.orders.list.tsx:49-56` — notes input: RN `TextInput multiline` vs `MyInput numberOfLines={4}`.
|
||
- `PLATFORM` `admin-ui: orders/index.tsx:527-531` ↔ `admin-web: dashboard.orders.list.tsx:559-563` — spinner vs CSS spin ("Loading orders..." identical).
|
||
- `PLATFORM` `admin-ui: orders/index.tsx:156-160` ↔ `admin-web: dashboard.orders.list.tsx:185-191` — web adds `role="button"`, `tabIndex`, Enter key handling, `aria-label="Order options"`.
|
||
- (List emptiness: neither side renders an empty-state message — parity.)
|
||
|
||
### Order details
|
||
- `CONTENT`/`PLATFORM` `admin-ui: order-details/[id].tsx:437-448` ↔ `admin-web: dashboard.orders.$id.tsx:428` — remove delivery cost: `Alert.alert('Remove Delivery Cost', '…', [Cancel, Remove])` vs `window.confirm('Remove Delivery Cost: …')` (OK/Cancel).
|
||
- `CONTENT`/`PLATFORM` `admin-ui: order-details/[id].tsx:46` ↔ `admin-web: dashboard.orders.$id.tsx:62` — success: `Alert.alert("Success","Delivery charge has been removed")` vs `window.alert('Success: …')`.
|
||
- `BEHAVIOUR` `admin-ui: order-details/[id].tsx:40,50,59` ↔ `admin-web: dashboard.orders.$id.tsx:56,66` — mutation errors: `Alert.alert('Error', …)` vs `ErrorToast(…)`.
|
||
- `STRUCTURE` `admin-ui: order-details/[id].tsx:379-383,393-397` ↔ `admin-web: dashboard.orders.$id.tsx:372-374,385-387` — packaging toggle icon: admin-ui swaps to "hourglass-empty" and uses check-box/outline; web uses one Check icon with colour change.
|
||
- `STRUCTURE` `admin-ui: order-details/[id].tsx:163-165` ↔ `admin-web: dashboard.orders.$id.tsx:173-175` — delivery-time row: `bg-brand50` + `text-brand800` vs no background + `text-brand-800`.
|
||
- `PLATFORM` `admin-ui: order-details/[id].tsx:562-564` ↔ `admin-web: dashboard.orders.$id.tsx:538` — bottom bar `absolute` + iOS padding vs `fixed`.
|
||
- `PLATFORM` `admin-ui: order-details/[id].tsx:78` ↔ `admin-web: dashboard.orders.$id.tsx:92` — error "Go Back": `router.back()` vs `window.history.back()`.
|
||
- (Loading/error copy identical: "Loading order details...", "Oops!", "Failed to load order details".)
|
||
|
||
### Delivery sequences
|
||
- `CONTENT`/`PLATFORM` `admin-ui: delivery-sequences/index.tsx:452` ↔ `admin-web: dashboard.orders.sequence.tsx:469` — save: `Alert.alert("Success","Delivery sequence updated successfully")` vs `window.alert('Success: …')`.
|
||
- `BEHAVIOUR` `admin-ui: delivery-sequences/index.tsx:455-456` ↔ `admin-web: dashboard.orders.sequence.tsx:467-470` — admin-ui refetches sequence + orders after save; **web does not** (can show stale rows). *Verified.*
|
||
- `CONTENT`/`PLATFORM` `admin-ui: delivery-sequences/index.tsx:609-612,653-656` ↔ `admin-web: dashboard.orders.sequence.tsx:619-621,661-663` — assign/unassign: "Orders unassigned/assigned successfully" as titled alert vs prefixed `window.alert`.
|
||
- `BEHAVIOUR` `admin-ui: delivery-sequences/index.tsx:614-620,658-664,743-745,758-760` ↔ `admin-web: dashboard.orders.sequence.tsx:623-628,665-671,740-742,755-757` — errors: `Alert.alert` vs `ErrorToast`.
|
||
- `BEHAVIOUR` `admin-ui: delivery-sequences/index.tsx:772-775` ↔ `admin-web: dashboard.orders.sequence.tsx:769` — attach location: admin-ui refetches orders + sequence; web passes a no-op.
|
||
- `STRUCTURE` `admin-ui: delivery-sequences/index.tsx:580-681` ↔ `admin-web: dashboard.orders.sequence.tsx:589-679` — assign control: FAB + `BottomDropdown` labelled "Assign To" vs a persistent panel (w-56) with `SearchableSelect`.
|
||
- `STRUCTURE` `admin-ui: delivery-sequences/index.tsx:713-727` ↔ `admin-web: dashboard.orders.sequence.tsx:711-724` — `isFirstOrder` passed only by admin-ui.
|
||
- `PLATFORM` `admin-ui: delivery-sequences/index.tsx:507-527` ↔ `admin-web: dashboard.orders.sequence.tsx:517-534` — placeholder texts ("Select slot"/"Select user") only on admin-ui dropdowns.
|
||
- `PLATFORM` `admin-ui: delivery-sequences/index.tsx:545-575` ↔ `admin-web: dashboard.orders.sequence.tsx:444-451,554-584` — drag: long-press DraggableFlatList vs dnd-kit PointerSensor (delay 200/tolerance 8).
|
||
- `STRUCTURE` `admin-ui: delivery-sequences/index.tsx:572-574` ↔ `admin-web: dashboard.orders.sequence.tsx:553` — `SlotProgress`: list header (scrolls) vs static block above the list.
|
||
- `PLATFORM` `admin-ui: delivery-sequences/index.tsx:531-542` ↔ `admin-web: dashboard.orders.sequence.tsx:539-546` — spinner style; empty icon assignment-late vs ClipboardList (copy identical).
|
||
|
||
### Rebalance
|
||
- `STRUCTURE` `admin-ui: rebalance-orders/index.tsx:171-175` ↔ `admin-web: dashboard.rebalance.tsx:175-179` — web-only "{n} slot(s) selected".
|
||
- `CONTENT`/`PLATFORM` `admin-ui: rebalance-orders/index.tsx:141,154` ↔ `admin-web: dashboard.rebalance.tsx:146,159` — "Rebalance Complete"/"Rebalancing..." titled alerts vs prefixed `window.alert` (including "Please wait while we rebalance the selected slots.").
|
||
- `CONTENT` `admin-ui: rebalance-orders/index.tsx:106` ↔ `admin-web: dashboard.rebalance.tsx:111` — "+N more" colour: `text-pink1` vs `#2E90FA`.
|
||
- `PLATFORM` `admin-ui: rebalance-orders/index.tsx:198-218` ↔ `admin-web: dashboard.rebalance.tsx:208-232` — FAB absolute + LinearGradient vs fixed + CSS gradient + `aria-label`.
|
||
|
||
### Shared order components
|
||
- `STRUCTURE` `admin-ui: components/OrderOptionsMenu.tsx:309-331` ↔ `admin-web: (no equivalent)` — **"Send Welcome Msg"** ("First order — welcome the customer on WhatsApp"), gated on `order.isFirstOrder` and reading the `welcomeMessage` region constant, exists only on admin-ui. *Verified.*
|
||
- `BEHAVIOUR` `admin-ui: components/OrderOptionsMenu.tsx:168-218` ↔ `admin-web: components/OrderOptionsMenu.tsx:150-184` — toggle rows: single responder View vs a Checkbox nested inside a button that also has `onClick` (one click can fire the handler twice).
|
||
- `CONTENT`/`PLATFORM` `admin-ui: components/OrderOptionsMenu.tsx:64-67,79,82,96,103,116,125` ↔ `admin-web: components/OrderOptionsMenu.tsx:67,71,74,86,88,97,106` — attach-location and fallback messages: titled native alerts ("Permission Denied", "Success", "Error", "No phone number found", "No location coordinates available") vs prefixed `window.alert`; WhatsApp via `whatsapp://send?phone=+91…` vs `https://wa.me/91…`.
|
||
- `CONTENT`/`PLATFORM` `admin-ui: components/OrderNotesForm.tsx:24,33,36` ↔ `admin-web: components/OrderNotesForm.tsx:23,32,35` — "Please enter some notes" / "Notes updated successfully" / "Failed to update notes": titled alerts vs prefixed `window.alert`.
|
||
- `PLATFORM` `admin-ui: components/OrderNotesForm.tsx:63-69` ↔ `admin-web: components/OrderNotesForm.tsx:54-60` — Cancel button: `fillColor="gray1"` vs `variant="blue" className="bg-gray-400 hover:bg-gray-500"`.
|
||
- `CONTENT`/`PLATFORM` `admin-ui: components/CancelOrderDialog.tsx:19,23-48` ↔ `admin-web: components/CancelOrderDialog.tsx:17,21-24,35` — confirm: `Alert.alert('Cancel Order','Are you sure you want to cancel this order? This action cannot be undone.',[No, Yes, Cancel])` vs `window.confirm('Cancel Order? …')`; validation/error titled alerts vs `window.alert`.
|
||
- `CONTENT`/`PLATFORM` `admin-ui: components/UserIncidentsView.tsx:26,33,41` ↔ `admin-web: components/UserIncidentsView.tsx:25,32,40` — "Incident added successfully" / "Please enter a comment or negativity score": titled alerts vs prefixed `window.alert`.
|
||
- `ProductListDialog.tsx` and `SnippetOrdersView.tsx`: copy/behaviour identical (only DOM primitives differ).
|
||
|
||
---
|
||
|
||
## 4. Catalog
|
||
|
||
### Products — list
|
||
- `BEHAVIOUR` `admin-ui: products/index.tsx:23-36,186-202` ↔ `admin-web: dashboard.products.tsx:63-71,121-123` — stock aggregation: admin-ui computes per-variant state (In/Partial/Out, IN/OUT counters from the aggregate); web reads only `skus[0]` and renders `{isOut ? 'Out' : 'In'}` (no Partial). *Verified.*
|
||
- `CONTENT` `admin-ui: products/index.tsx:122-124` ↔ `admin-web: dashboard.products.tsx:196-198` — "{skuCount} Variants · {outCount} out" vs "{n} Variants".
|
||
- `STRUCTURE` `admin-ui: products/index.tsx:145-151,320-325` ↔ `admin-web: dashboard.products.tsx:218-227` — action button: "Stock" → `VariantStockDialog` vs a direct whole-product `toggleOutOfStock` with a label that flips "{isOut ? 'Stock' : 'Out'}". *Verified.*
|
||
- `PLATFORM` `admin-ui: products/index.tsx:291` ↔ `admin-web: dashboard.products.tsx:244` — empty icon inventory vs Package.
|
||
- `PLATFORM` `admin-ui: products/index.tsx:313` ↔ `admin-web: dashboard.products.tsx:264,277` — pull-to-refresh vs no refresh control.
|
||
|
||
### Products — create / edit
|
||
- `BEHAVIOUR` `admin-ui: products/add.tsx:12-15,76` + `products/edit.tsx:14-17,150-156` ↔ `admin-web: dashboard.products.new.tsx:68-77` + `dashboard.products.edit.tsx:145-149` — admin-ui stores bucket-relative **keys** (`toImageKey`, "Send keys, not the presigned URLs"); web stores **presigned URLs** (`images: variantUrls`, `.map((img) => img.url)`) which expire. *Verified.*
|
||
- `CONTENT` `admin-ui: products/add.tsx:29,41,49,111,113` ↔ `admin-web: dashboard.products.new.tsx:24,36,44,105,107` — same validation/success strings, titled `Alert.alert` vs title-less `window.alert`.
|
||
- `CONTENT` `admin-ui: products/edit.tsx:97,109,117,195,198,240,242` ↔ `admin-web: dashboard.products.edit.tsx:93,105,113,188,191,232,234` — same messages, titles dropped on web.
|
||
- `STRUCTURE` `admin-ui: products/edit.tsx:246-252` ↔ `admin-web: dashboard.products.edit.tsx:238-246` — global-product branch rendered bare vs wrapped in `AppContainer`.
|
||
|
||
### Products — detail
|
||
- `BEHAVIOUR` `admin-ui: products/detail/[id].tsx:29,79,82-84` ↔ `admin-web: dashboard.products.$id.tsx:77-80` — after a review reply admin-ui invalidates `getProductReviews` and clears the textarea; web does neither. *Verified pattern (same class as the sequence-refetch gap).*
|
||
- `CONTENT` `admin-ui: products/detail/[id].tsx:80,86` ↔ `admin-web: dashboard.products.$id.tsx:77,82` — "Response submitted"/errors: titled vs title-less alerts.
|
||
- `PLATFORM` `admin-ui: products/detail/[id].tsx:32-52,109-114,194-199` ↔ `admin-web: dashboard.products.$id.tsx:41-51,102-109,190-193` — native picker vs `<input type="file">`; carousel prop names differ.
|
||
|
||
### ProductForm / GlobalProductForm
|
||
- `CONTENT` `admin-ui: src/components/ProductForm.tsx:592,639` ↔ `admin-web: src/components/ProductForm.tsx:599,649` — "Duplicate"/"Check your form" alerts: titled vs folded into the message.
|
||
- `PLATFORM` `admin-ui: src/components/ProductForm.tsx:6` ↔ `admin-web: src/components/ProductForm.tsx:5,56-71` — web re-implements `InfoDialog` locally instead of importing it.
|
||
- `CONTENT` `admin-ui: src/components/GlobalProductForm.tsx:179` ↔ `admin-web: src/components/GlobalProductForm.tsx:146-153` — submit label: always "Save market data" (spinner only) vs label swapped to "Saving...".
|
||
|
||
### VariantStockDialog
|
||
- `STRUCTURE` `admin-ui: src/components/VariantStockDialog.tsx` (whole file; used at `products/index.tsx:320`) ↔ `admin-web: (no equivalent)` — per-variant stock UI is admin-ui-only: title "Stock", "{outCount} of {skus.length} variants are out of stock", "Variants ({selected}/{total})", "Select all"/"Clear all", per-variant In/Out, "Mark out of stock"/"Mark in stock"/"Cancel". *Verified.*
|
||
|
||
### Product groupings
|
||
- `CONTENT` `admin-ui: product-groupings/index.tsx:146-162` ↔ `admin-web: dashboard.product-groupings.tsx:124` — delete: titled alert with Cancel/Delete vs `window.confirm('Are you sure you want to delete this group?')`.
|
||
- `BEHAVIOUR` `admin-ui: components/ProductGroupForm.tsx:72` ↔ `admin-web: src/components/ProductGroupForm.tsx:67` — admin-ui invalidates `getGroups` after save; web does not.
|
||
- `CONTENT` `admin-ui: components/ProductGroupForm.tsx:75` ↔ `admin-web: src/components/ProductGroupForm.tsx:69` — save error: titled alert vs prefixed `window.alert`.
|
||
- `BEHAVIOUR` `admin-ui: components/ProductGroupForm.tsx:134-141` ↔ `admin-web: src/components/ProductGroupForm.tsx:128-133` — admin-ui disables Save while pending; web's Save is a plain div with no disabled state.
|
||
- `PLATFORM` `admin-ui: product-groupings/index.tsx:42-46,102` ↔ `admin-web: dashboard.product-groupings.tsx:37,79-82` — icons; count colour `text-brand500` vs `text-blue-600`.
|
||
|
||
### Product tags
|
||
- `BEHAVIOUR` `admin-ui: product-tags/index.tsx:81,91-95,138-140` ↔ `admin-web: (none)` — admin-ui tag list has pull-to-refresh; web has none.
|
||
- `CONTENT` `admin-ui: src/components/TagForm.tsx:266` ↔ `admin-web: src/components/TagForm.tsx:306-308` — "Long press and drag to reorder • {n} items" vs "Drag to reorder • {n} items".
|
||
- `STRUCTURE` `admin-ui: src/components/TagForm.tsx:157,173-231` ↔ `admin-web: src/components/TagForm.tsx:216-231` — web renders inline validation under Tag Name/Description; admin-ui never renders them (same Yup messages, invisible to native users). *Verified.*
|
||
- `CONTENT` `admin-ui: src/components/TagMenu.tsx:42-53,59,64` ↔ `admin-web: src/components/TagMenu.tsx:42-44,53,58` — delete confirm title inlined on web ("Delete Tag? …"); "Tag deleted successfully" titled vs prefixed.
|
||
- `CONTENT` `admin-ui: product-tags/add.tsx:47-55` ↔ `admin-web: dashboard.product-tags.new.tsx:48-52` — create success: alert with an explicit OK-then-back vs `window.alert` + `history.back()`.
|
||
- `CONTENT` `admin-ui: product-tags/edit/index.tsx:65-73` ↔ `admin-web: dashboard.product-tags.edit.tsx:63-67` — update success/error same pattern.
|
||
- `BEHAVIOUR` `admin-ui: product-tags/edit/index.tsx:64` ↔ `admin-web: (none)` — admin-ui invalidates `getProductTagById` after update; web does not.
|
||
- `CONTENT` `admin-ui: product-tags/order.tsx:167,171` ↔ `admin-web: dashboard.product-tags.order.tsx:165,169` — success/error titles dropped on web.
|
||
- `PLATFORM` `admin-ui: product-tags/index.tsx:65,72,145` ↔ `admin-web: dashboard.product-tags.tsx:67,74,133` — icons; copy identical ("Tag Orders", "Add New Tag", "No tags yet", "Create your first product tag", "Dashboard Tag", "Failed to load tags", "Retry").
|
||
- `PLATFORM` `admin-ui: src/components/TagForm.tsx:8,271-280` ↔ `admin-web: src/components/TagForm.tsx:8-10,312-318` — drag lib, related-stores control (BottomDropdown multiple vs MultiSelect), image picker.
|
||
|
||
### Prices overview
|
||
- `CONTENT` `admin-ui: prices-overview/index.tsx:242,247,252,284,287` ↔ `admin-web: dashboard.prices.tsx:237,242,247,279,282` — "Please enter a valid price/market price/flash price", "Prices updated successfully", "Failed to update prices: …": titled vs title-less.
|
||
- `PLATFORM` `admin-ui: prices-overview/index.tsx:299-306` ↔ `admin-web: dashboard.prices.tsx:294-300` — store filter: BottomDropdown(multiple) vs MultiSelect. Field labels/placeholders match.
|
||
|
||
### Slots
|
||
- `CONTENT` `admin-ui: slots/index.tsx:42-50` ↔ `admin-web: dashboard.slots.tsx:45-52` — capacity toggle: titled alerts vs `window.alert('Success: …')` / `ErrorToast`.
|
||
- `PLATFORM` `admin-ui: slots/index.tsx:272-273` ↔ `admin-web: dashboard.slots.tsx:277-278` — pull-to-refresh vs no refresh affordance on web's MyFlatList.
|
||
- `BEHAVIOUR` `admin-ui: slots/slot-details.tsx:128-137` ↔ `admin-web: dashboard.slots.detail.tsx:126-138` — "Share": native Share sheet vs `navigator.share` else clipboard + extra `window.alert('Link copied to clipboard')`; failure alert vs ErrorToast.
|
||
- `BEHAVIOUR` `admin-ui: components/SlotForm.tsx:90-93` ↔ `admin-web: src/components/SlotForm.tsx:87-90` — admin-ui invalidates the slots query after update; web does not.
|
||
- `CONTENT` `admin-ui: components/SlotForm.tsx:63,68,90,98,107,111` ↔ `admin-web: src/components/SlotForm.tsx:61,66,88,94,103,107` — "Please fill all fields", "Freeze time must be before or equal to delivery time", "Slot created/updated successfully!", "Failed to create/update slot": titles dropped.
|
||
|
||
### Stores
|
||
- `CONTENT` `admin-ui: stores/index.tsx:113-132` ↔ `admin-web: dashboard.stores.tsx:108-115` — delete: titled alert with Cancel/Delete vs `window.confirm('Delete Store: …')`; success/error titles dropped.
|
||
- `CONTENT` `admin-ui: stores/add.tsx:20,24`, `stores/edit.tsx:27-32` ↔ `admin-web: dashboard.stores.new.tsx:24,28`, `dashboard.stores.edit.tsx:30-36` — success/error titles dropped; admin-ui invalidates `getStores` after update, web does not.
|
||
- `CONTENT` `admin-ui: components/StoreForm.tsx:115` ↔ `admin-web: src/components/StoreForm.tsx:109` — upload failure: `Alert.alert('Error','Failed to upload image')` vs `window.alert('Error: …')`.
|
||
- `PLATFORM` `admin-ui: stores/index.tsx:173` ↔ `admin-web: dashboard.stores.tsx:179` — two-column list + RefreshControl vs CSS grid. Copy matches ("Manage your outlets", "{n} Locations", "No stores found", "Get started by adding your first store location.", "Oops!", "We couldn't load the stores. Please try again.", "Retry").
|
||
|
||
### Banners
|
||
- `BEHAVIOUR` `admin-ui: dashboard-banners/index.tsx:152` ↔ `admin-web: dashboard.banners.tsx:160-177` — emptying a slot refetches on admin-ui; web only updates local state (save does refetch).
|
||
- `CONTENT` `admin-ui: dashboard-banners/index.tsx:122-198` ↔ `admin-web: dashboard.banners.tsx:136-202` — same messages, titles dropped/prefixed.
|
||
- `CONTENT` `admin-ui: dashboard-banners/index.tsx:184-187` ↔ `admin-web: dashboard.banners.tsx:195` — delete: titled alert vs `window.confirm('Delete Banner: …')`.
|
||
- `CONTENT` `admin-ui: dashboard-banners/create.tsx:30,46,54` ↔ `admin-web: dashboard.banners.new.tsx:32,48,51` — "Image is required" as alert vs `ErrorToast`; create success alert-with-OK vs `window.alert` + `history.back()`.
|
||
- `BEHAVIOUR` `admin-ui: dashboard-banners/edit/[id].tsx:110` ↔ `admin-web: dashboard.banners.$id.edit.tsx:95-96` — admin-ui invalidates `getBanner` after update; web does not.
|
||
- `CONTENT` `admin-ui: dashboard-banners/edit/[id].tsx:60,65,111,118` ↔ `admin-web: dashboard.banners.$id.edit.tsx:47,52,96,99` — load/success feedback: alert vs ErrorToast/`window.alert`.
|
||
- `CONTENT` `admin-ui: components/BannerForm.tsx:109` ↔ `admin-web: src/components/BannerForm.tsx:99` — upload failure as above.
|
||
- `PLATFORM` `admin-ui: dashboard-banners/index.tsx:237-244` ↔ `admin-web: dashboard.banners.tsx:59-61` — pull-to-refresh vs `useManualRefresh`. Banner slot copy matches.
|
||
|
||
---
|
||
|
||
## 5. Users / coupons / customize-app / notifications / complaints / snippets
|
||
|
||
### Users
|
||
- `STRUCTURE` `admin-ui: user-management/index.tsx:108-126` ↔ `admin-web: dashboard.users.tsx:97-121` — web's list header adds "Refresh"/"Refreshing..." (with refreshing/onRefresh props); admin-ui has only the search bar + "Showing N users".
|
||
- `BEHAVIOUR` `admin-ui: user-management/index.tsx:237-251` ↔ `admin-web: dashboard.users.tsx:233-262` — admin-ui: infinite scroll + pull-to-refresh + sticky header; web: none of these.
|
||
- `STRUCTURE` `admin-ui: user-management/index.tsx:128-135,246` ↔ `admin-web: dashboard.users.tsx:123-139,246-248` — web footer shows a "Load more" button; admin-ui shows only a spinner. *Verified.*
|
||
- `BEHAVIOUR` `admin-ui: user-management/index.tsx:112-116` ↔ `admin-web: dashboard.users.tsx:100-105` — web's SearchBar gets `onSearch` (Enter/submit); admin-ui's doesn't.
|
||
- `STRUCTURE` `admin-ui: user-management/index.tsx:192-194` ↔ `admin-web: dashboard.users.tsx:110-112` — row/order links differ by route naming (same destinations).
|
||
- `PLATFORM` `admin-ui: user-management/index.tsx:214,254` ↔ `admin-web: dashboard.users.tsx:215,251` — icons.
|
||
- `PLATFORM` `admin-ui: user-management/[id].tsx:161,169` ↔ `admin-web: dashboard.users.$id.tsx:157,166` — ScrollView vs div; `router.back()` vs `window.history.back()`. Everything else (fields, "Suspend User", "Prevent user from placing orders", "Order History", "No orders yet", "Registered …") is an exact mirror.
|
||
|
||
### Coupons
|
||
- `STRUCTURE`/`CONTENT` `admin-ui: src/components/CouponForm.tsx:384-396,46,138` + `coupons/edit/[id].tsx:80` ↔ `admin-web: src/components/CouponForm.tsx:42-65` + `dashboard.coupons.$id.edit.tsx:101-114` — **"First Order Only"** toggle (helper "Valid only on the customer's first order") exists only on admin-ui; web has no field, no Yup rule and doesn't round-trip the value on edit. *Verified.*
|
||
- `BEHAVIOUR` `admin-ui: src/components/CouponForm.tsx:50` ↔ `admin-web: src/components/CouponForm.tsx:42-65` — admin-ui validates `skuIds` (array of numbers); web's schema has no rule.
|
||
- `BEHAVIOUR` `admin-ui: src/components/CouponForm.tsx:469-475` ↔ `admin-web: src/components/CouponForm.tsx:483-496` — applicable-users paging: auto `onEndReached` + "Loading..." vs "Load more" button + "Loading...".
|
||
- `CONTENT` `admin-ui: src/components/CouponForm.tsx:547-553` ↔ `admin-web: src/components/CouponForm.tsx:570-574` — submit label: always "Create Coupon" (spinner only) vs "Creating...".
|
||
- `CONTENT` `admin-ui: coupons/index.tsx:265-283` ↔ `admin-web: dashboard.coupons.tsx:266-277` — delete: titled alert with Cancel/Delete + "Coupon deleted successfully" vs `window.confirm('Delete Coupon: …')` + `window.alert('Success: …')`; error alert vs ErrorToast.
|
||
- `STRUCTURE` `admin-ui: coupons/index.tsx:333-358` ↔ `admin-web: dashboard.coupons.tsx:327-356` — web footer has "Loading more..." + "Load more"; admin-ui auto-loads. *Verified.*
|
||
- `CONTENT` `admin-ui: coupons/create.tsx:29-45` ↔ `admin-web: dashboard.coupons.new.tsx:45-59` — "At least one coupon code is required", create success/error: titled alerts vs ErrorToast/`window.alert` + `history.back()`.
|
||
- `CONTENT` `admin-ui: coupons/edit/[id].tsx:38-44` ↔ `admin-web: dashboard.coupons.$id.edit.tsx:71-76` — update success/error same pattern. ("Loading..."/"Coupon not found" match.)
|
||
- `PLATFORM` `admin-ui: coupons/index.tsx:316-331,498-516` ↔ `admin-web: dashboard.coupons.tsx:310-325,500-513` — status filter BottomDropdown vs MultiSelect; swipeable TabView (indicator #F83758) vs plain tab buttons.
|
||
- `PLATFORM` `admin-ui: coupons/index.tsx:288,297,349` ↔ `admin-web: dashboard.coupons.tsx:282,291,347` — icons.
|
||
- `PLATFORM` `admin-ui: src/components/CouponForm.tsx:349` ↔ `admin-web: src/components/CouponForm.tsx:368` — date control DateTimePickerMod vs DateTimeInput; user list FlatList vs overflow-auto list. All other labels/copy match.
|
||
|
||
### Customize app
|
||
- `CONTENT` `admin-ui: customize-app/index.tsx:610-613` ↔ `admin-web: dashboard.customize-app.tsx:596-602` — web-only subtitle "Modify application settings. Changes will take effect immediately.".
|
||
- `CONTENT` `admin-ui: customize-app/index.tsx:443-446` ↔ `admin-web: dashboard.customize-app.tsx:443-446` — bound blurb: "**The** Effective bound (lowest priority) is the one whose settings apply to checkout." vs "Only the effective bound (lowest priority) settings apply to checkout.".
|
||
- `CONTENT` `admin-ui: customize-app/index.tsx:341,349,353,381,389,393` ↔ `admin-web: dashboard.customize-app.tsx:343,351,355,383,391,395` — "No Changes"/"Updated N settings successfully."/"Failed to update settings. Please try again.": titled alerts vs `window.alert`.
|
||
- `CONTENT` `admin-ui: customize-app/popular-items.tsx:164-178,212,216` ↔ `admin-web: dashboard.customize-app.popular.tsx:158,195,199` — remove confirm titled alert with Cancel/Remove vs `window.confirm`; save success/error titled vs plain.
|
||
- `CONTENT` `admin-ui: customize-app/all-items-order.tsx:178,182` ↔ `admin-web: dashboard.customize-app.ordering.tsx:174,178` — save success/error titled vs plain.
|
||
- `PLATFORM` `admin-ui: customize-app/index.tsx:150,171,412,430,506,244` ↔ `admin-web: dashboard.customize-app.tsx:152,172,414,431,496,232-244` — nav glyphs and error/empty icons differ; admin-ui's welcomeMessage input adds `min-h-24`, web's doesn't.
|
||
- `PLATFORM` `admin-ui: customize-app/popular-items.tsx:333,349,401` ↔ `admin-web: dashboard.customize-app.popular.tsx:306,38-68,367` — icons; long-press DraggableFlatList vs dnd-kit handle.
|
||
- `PLATFORM` `admin-ui: customize-app/all-items-order.tsx:231,283` ↔ `admin-web: dashboard.customize-app.ordering.tsx:225,275` — icons; drag implementation.
|
||
|
||
### Notifications
|
||
- `CONTENT` `admin-ui: send-notifications/index.tsx:42,49,62,67,95` ↔ `admin-web: dashboard.notifications.tsx:30,36,49,54,73` — "Notification sent successfully!", "Failed to send notification", "Please enter a title", "Please enter a message": titled alerts vs prefixed `window.alert`.
|
||
- `CONTENT`/`BEHAVIOUR` `admin-ui: send-notifications/index.tsx:74-85` ↔ `admin-web: dashboard.notifications.tsx:60-62` — send-to-all: `Alert.alert('Send to All Users?','This will send the notification to all users with push tokens. Continue?',[Cancel, Send])` vs `window.confirm('Send to All Users? This will send the notification to all users with push tokens. Continue?')`.
|
||
- `PLATFORM` `admin-ui: send-notifications/index.tsx:161-169` ↔ `admin-web: dashboard.notifications.tsx:138-144` — user selector: BottomDropdown("Select Users", placeholder "Select users", multiple) vs MultiSelect (no placeholder) → empty trigger reads "Select users" vs "Select Users".
|
||
|
||
### Complaints
|
||
- `STRUCTURE` `admin-ui: complaints/index.tsx:233-240` ↔ `admin-web: dashboard.complaints.tsx:238-248` — web footer shows "Load more"; admin-ui is spinner-only. *Verified.*
|
||
- `BEHAVIOUR` `admin-ui: complaints/index.tsx:124-125` ↔ `admin-web: dashboard.complaints.tsx:126-250` — admin-ui auto-loads via `onEndReached`; web relies on the button.
|
||
- `CONTENT` `admin-ui: complaints/index.tsx:69,75-78` ↔ `admin-web: dashboard.complaints.tsx:76,82` — "Complaint marked as resolved" / "Failed to resolve complaint": titled alerts vs prefixed `window.alert`.
|
||
- `STRUCTURE` `admin-ui: complaints/index.tsx:174-179` ↔ `admin-web: dashboard.complaints.tsx:266-311` — images: `ImageViewerURI` thumbnails vs plain `<img>` + a bespoke full-screen viewer with ‹/› and an "N / total" counter.
|
||
- `PLATFORM` `admin-ui: complaints/index.tsx:98,156,185,196,223` ↔ `admin-web: dashboard.complaints.tsx:108,159,190,201,228` — icons.
|
||
- Resolve dialog itself is an exact mirror ("Resolve Complaint" / "Add admin notes for this resolution:" / "Resolve" / "Cancel"). No filters/search on either side.
|
||
|
||
### Vendor snippets
|
||
- `BEHAVIOUR` `admin-ui: vendor-snippets/index.tsx:55-67` ↔ `admin-web: dashboard.vendor-snippets.tsx:42-58` — Share: native share sheet (error alert "Failed to share link") vs `navigator.share` else clipboard + an extra `window.alert('Link copied to clipboard')`.
|
||
- `CONTENT` `admin-ui: vendor-snippets/index.tsx:314,317` ↔ `admin-web: dashboard.vendor-snippets.tsx:294,297` — fetch-orders errors titled vs prefixed.
|
||
- `CONTENT` `admin-ui: components/SnippetMenu.tsx:56-67,73` ↔ `admin-web: src/components/SnippetMenu.tsx:63-65,74` — delete confirm titled with Cancel/Delete vs `window.confirm('Delete Snippet? …')`; "No URL available to copy" titled vs prefixed (success toast "URL copied to clipboard" identical).
|
||
- `CONTENT` `admin-ui: components/VendorSnippetForm.tsx:85,88,94` ↔ `admin-web: src/components/VendorSnippetForm.tsx:84,87,93` — updated/created/save-error: titled vs prefixed.
|
||
- `CONTENT` `admin-ui: components/VendorSnippetForm.tsx:172-178` ↔ `admin-web: src/components/VendorSnippetForm.tsx:168-174` — slot dropdown placeholder "Choose a delivery slot" only on admin-ui.
|
||
- `PLATFORM` `admin-ui: vendor-snippets/index.tsx:385` ↔ `admin-web: dashboard.vendor-snippets.tsx:363` — empty icon code-working vs Code2.
|
||
- `PLATFORM` `admin-ui: components/SnippetMenu.tsx:115` ↔ `admin-web: src/components/SnippetMenu.tsx:122` — trigger icon dots-three-vertical vs MoreVertical (menu title/option order identical).
|
||
- `PLATFORM` `admin-ui: components/VendorSnippetForm.tsx:203,149-162` ↔ `admin-web: src/components/VendorSnippetForm.tsx:199,148-158` — date control DatePicker vs DateInput; themed checkbox vs Checkbox component (labels/helpers match).
|
||
- `SnippetOrdersView`: copy-identical; only the icon differs.
|
||
|
||
### Utility components (web has dedicated files; admin-ui uses common-ui)
|
||
- `CONTENT` `admin-ui: packages/ui/src/components/bottom-dropdown.tsx:108-121` ↔ `admin-web: src/components/MultiSelect.tsx:46-53` — trigger text: all selected labels joined with ", " vs "N selected".
|
||
- `BEHAVIOUR` `admin-ui: packages/ui/src/components/bottom-dropdown.tsx:335-345` ↔ `admin-web: src/components/MultiSelect.tsx:130-145` — web dialog has **Clear** + Done; admin-ui has only Done (no way to clear a multi-select in one tap). *Verified.*
|
||
- `CONTENT` `admin-ui: packages/ui/src/components/bottom-dropdown.tsx:223` ↔ `admin-web: src/components/MultiSelect.tsx:92`, `SearchableSelect.tsx:77` — in-dialog search placeholder "Search options..." vs "Search...".
|
||
- `CONTENT` `admin-ui: packages/ui/src/components/bottom-dropdown.tsx:239-244` ↔ `admin-web: src/components/MultiSelect.tsx:126-128`, `SearchableSelect.tsx:104-106` — empty state `No options found for "{query}"` vs "No options found".
|
||
- `BEHAVIOUR` `admin-ui: packages/ui/src/components/bottom-dropdown.tsx:85-92` ↔ `admin-web: src/components/MultiSelect.tsx:94-98`, `SearchableSelect.tsx:79-83` — admin-ui debounces `onSearch` by 2000 ms; web fires per keystroke.
|
||
- `CONTENT` `admin-ui: packages/ui/src/components/bottom-dropdown.tsx:157-164,215` ↔ `admin-web: src/components/MultiSelect.tsx:70-76,90`, `SearchableSelect.tsx:61,75` — web renders a label above the trigger (`topLabel ?? label`) and uses it as the dialog title; admin-ui shows only `topLabel` above the trigger and always titles the dialog with `label`.
|
||
- `PLATFORM` `admin-ui: packages/ui/src/components/date-picker.tsx:25-65` ↔ `admin-web: src/components/DateInput.tsx:18-29` — native `DateTimePicker` + iOS modal (value via `toLocaleDateString()`) vs `<input type="date">` (yyyy-mm-dd); both default "Select Date".
|
||
- `PLATFORM` `admin-ui: packages/ui/src/components/date-time-picker.tsx:66-125` ↔ `admin-web: src/components/DateTimeInput.tsx:24-80` — native pickers vs two native inputs; labels/timeOnly/value-preservation match.
|
||
- `PLATFORM` `admin-ui: packages/ui/src/components/bottom-dropdown.tsx:61-353` ↔ `admin-web: src/components/SearchableSelect.tsx:26-114` — no dedicated admin-ui single-select/searchable component (single selects reuse BottomDropdown); common-ui also ships an unrelated `multi-select.tsx` that is not the web MultiSelect.
|
||
|
||
---
|
||
|
||
## 6. Platform-inherent (expected — do not "fix")
|
||
|
||
- Native `Alert.alert` / `window.confirm` vs `window.alert` / `ErrorToast` / `window.confirm` — the *mechanism* differs by design; the **copy** it carries should still match (that is the `CONTENT` items above).
|
||
- Bottom sheets, bottom dropdowns, native pickers, FlatList/infinite scroll, RefreshControl vs DOM dialogs, `<input type>`, grids, buttons and keyboard/ARIA affordances.
|
||
- Icons: `@expo/vector-icons` vs lucide-react.
|
||
- Mobile-only: push-permission dialog (`.tsx` above), native share sheet.
|
||
- Web-only: devtools panels, active nav highlight, `aria-label`s.
|
||
|
||
---
|
||
|
||
## 7. Suggested fix order
|
||
|
||
1. **`VariantStockDialog` on web** (per-variant In/Out + "N of M variants are out of stock", "Partial" state) — the only whole feature missing.
|
||
2. **Image keys, not presigned URLs** on web product create/edit (`toImageKey`).
|
||
3. **"First Order Only" on the web coupon form** (+ Yup rule + round-trip on edit).
|
||
4. **Persist staff identity on web** (staff key + restore) and replace the hardcoded "Staff Member" with the real name/region line.
|
||
5. **"Send Welcome Msg"** — port to web or remove from mobile (also pass `isFirstOrder` on web).
|
||
6. **Load-more model** — pick one (web buttons vs mobile infinite scroll) across orders, users, coupons, complaints.
|
||
7. **Missing refetches/invalidations on web**: sequence save/assign, attach-location, review reply (+ clear the form), banner slot-empty, product-group/slot/store/banner edit.
|
||
8. **Feedback copy parity**: keep the title/body split everywhere (e.g. "Cancel Order" + "Are you sure…", "Remove Delivery Cost", "Delete Store", "Send to All Users?") so the two apps read identically even if the alert API differs.
|
||
9. **Multi-select parity**: show "N selected" or the joined labels consistently, and add **Clear** to admin-ui's BottomDropdown.
|
||
10. **TagForm inline validation** on admin-ui (render the Yup errors already computed).
|
||
11. **Desktop hamburger** on web: hide it on `md+`, or make it open the sidebar.
|
||
12. **Copy sweep** for the remaining label list (bound blurb wording, "Modify application settings…" subtitle, "Search options..."/"Search...", `No options found for "{q}"`/"No options found", "Choose a delivery slot"/no placeholder, "Select users"/"Select Users", "Creating..." vs spinner-only submit labels).
|