From 0e5f9ccd7b0533792a4ec6d447651f332aef7e15 Mon Sep 17 00:00:00 2001 From: "s.esmaeili" Date: Tue, 15 Sep 2026 01:34:30 +0330 Subject: [PATCH] user-app: extend the redesign across the account screens MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Phase 2, completing the app-wide rollout of the home/product-detail design language (LESS colour tokens, BEM class names, hairline-bordered cards, SectionHead, dashed empty states) onto the account side: dashboard, orders, transactions, profile, login and register. Reuse over re-implementation: the dashboard's live rate block is now components/home/RateStrip.vue rather than a second hand-built strip, and every screen uses components/ui/PageBar.vue for its chrome. OrderCard and OrderItemCard are restyled to match. OrderItemCard drops its always-empty note row: our OrderItem schema has no note field (legacy's per-item note was a real column there; ours is not), so it could only ever print a dash. OrdersView swaps ant Tabs for the same scrolling chip rail the rest of the redesign uses, and its full-screen Modal with hand-written CSS overrides for a bottom Drawer, matching how every other detail surface opens. Deleted AppHeader.vue, orphaned once every screen moved to PageBar. Its shutter animation was driven by transitionFlag, which nothing reads any more — the router afterEach comment claiming otherwise is corrected rather than left asserting something untrue, and the now-inert half is flagged in place. ScrollFetchSearch loses its isFav prop: it gated two empty-state branches that rendered the identical image, and its only caller (FavoritesView) now renders its own. Behaviour is preserved throughout. Orders still reads GET /customers/:id/orders and filters client-side; transactions still reads GET /customers/:id/ledger-entries with legacy's CREDIT/DEBIT colour meaning intact; profile stays read-only over real fields; login keeps the real customer lookup plus the documented OTP stub; register stays stubbed with copy that does not claim an account was created. Verified in a real browser against the running API and native database: dashboard 4 tiles with a real balance, orders 1 real order card, profile 4 real spec rows, transactions the correct empty state for a customer with no ledger rows, and login/register confirmed with the session cleared (the guard bounces a signed-in user away from /login, which is why they needed a separate pass). No console errors, no horizontal overflow. vue-tsc and vite build both clean. Co-Authored-By: Claude Opus 5 --- apps/user-app/src/components/AppHeader.vue | 58 -- .../src/components/product/OrderCard.vue | 176 +++++- .../src/components/product/OrderItemCard.vue | 148 ++++- .../src/components/ui/ScrollFetchSearch.vue | 16 +- apps/user-app/src/router/index.ts | 18 +- .../user-app/src/views/user/DashboardView.vue | 477 ++++++++++++--- apps/user-app/src/views/user/LoginView.vue | 300 ++++++--- apps/user-app/src/views/user/OrdersView.vue | 579 ++++++++++++------ apps/user-app/src/views/user/ProfileView.vue | 243 ++++++-- apps/user-app/src/views/user/RegisterView.vue | 200 ++++-- .../src/views/user/TransactionsView.vue | 352 ++++++++--- 11 files changed, 1853 insertions(+), 714 deletions(-) delete mode 100644 apps/user-app/src/components/AppHeader.vue diff --git a/apps/user-app/src/components/AppHeader.vue b/apps/user-app/src/components/AppHeader.vue deleted file mode 100644 index 3c9ca95..0000000 --- a/apps/user-app/src/components/AppHeader.vue +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - diff --git a/apps/user-app/src/components/product/OrderCard.vue b/apps/user-app/src/components/product/OrderCard.vue index 880c1be..f378652 100644 --- a/apps/user-app/src/components/product/OrderCard.vue +++ b/apps/user-app/src/components/product/OrderCard.vue @@ -1,49 +1,165 @@ - + + + diff --git a/apps/user-app/src/components/product/OrderItemCard.vue b/apps/user-app/src/components/product/OrderItemCard.vue index e73c1bb..7058002 100644 --- a/apps/user-app/src/components/product/OrderItemCard.vue +++ b/apps/user-app/src/components/product/OrderItemCard.vue @@ -1,42 +1,57 @@ + + diff --git a/apps/user-app/src/components/ui/ScrollFetchSearch.vue b/apps/user-app/src/components/ui/ScrollFetchSearch.vue index 483ef2b..2a8a5d9 100644 --- a/apps/user-app/src/components/ui/ScrollFetchSearch.vue +++ b/apps/user-app/src/components/ui/ScrollFetchSearch.vue @@ -1,10 +1,12 @@ @@ -32,7 +33,6 @@ withDefaults( loading: boolean flag: boolean padding?: string - isFav?: boolean }>(), {}, ) diff --git a/apps/user-app/src/router/index.ts b/apps/user-app/src/router/index.ts index 1338545..db0c2bc 100644 --- a/apps/user-app/src/router/index.ts +++ b/apps/user-app/src/router/index.ts @@ -64,12 +64,18 @@ router.beforeEach((to) => { else nav.setPgaTransition(undefined); }); -// Ported from legacy router/index.ts:273-286. This hook is what actually -// drives two animations, and its absence was why neither ran: -// 1. cycling transitionFlag false->true replays AppHeader's "shutter" enter -// animation on every navigation; -// 2. setActiveLink moves the bottom-nav GSAP notch + bubble to the current -// tab (it is the ONLY caller of setActiveLink in the whole app). +// Ported from legacy router/index.ts:273-286. +// +// setActiveLink moves the bottom-nav GSAP notch + bubble to the current tab, +// and this hook is its ONLY caller in the whole app — that part is live. +// +// The transitionFlag cycling below used to replay AppHeader's "shutter" enter +// animation. AppHeader was deleted when every screen moved to the redesigned +// components/ui/PageBar.vue, and nothing reads transitionFlag any more, so +// that half is currently inert. It is left in place rather than ripped out +// because transitionStore is still the shared home for this kind of +// page-transition state; flagged here so the next reader doesn't assume it +// still drives a visible animation. router.afterEach((to) => { const nav = useNavStore(); const transition = useTransitionStore(); diff --git a/apps/user-app/src/views/user/DashboardView.vue b/apps/user-app/src/views/user/DashboardView.vue index 4433b19..1c3d4c7 100644 --- a/apps/user-app/src/views/user/DashboardView.vue +++ b/apps/user-app/src/views/user/DashboardView.vue @@ -1,110 +1,122 @@ + + diff --git a/apps/user-app/src/views/user/LoginView.vue b/apps/user-app/src/views/user/LoginView.vue index b15df48..1d359b9 100644 --- a/apps/user-app/src/views/user/LoginView.vue +++ b/apps/user-app/src/views/user/LoginView.vue @@ -1,94 +1,93 @@ - + + diff --git a/apps/user-app/src/views/user/OrdersView.vue b/apps/user-app/src/views/user/OrdersView.vue index 4e0ed20..e5fdb66 100644 --- a/apps/user-app/src/views/user/OrdersView.vue +++ b/apps/user-app/src/views/user/OrdersView.vue @@ -1,126 +1,166 @@ - diff --git a/apps/user-app/src/views/user/ProfileView.vue b/apps/user-app/src/views/user/ProfileView.vue index 31fd624..e9cb607 100644 --- a/apps/user-app/src/views/user/ProfileView.vue +++ b/apps/user-app/src/views/user/ProfileView.vue @@ -1,70 +1,74 @@ - diff --git a/apps/user-app/src/views/user/RegisterView.vue b/apps/user-app/src/views/user/RegisterView.vue index d0f0571..fb699ea 100644 --- a/apps/user-app/src/views/user/RegisterView.vue +++ b/apps/user-app/src/views/user/RegisterView.vue @@ -1,78 +1,84 @@