Stripe-style UI overhaul + Expenses feed with month grouping #15

Merged
aetos merged 10 commits from stripe-ui into main 2026-08-18 13:51:33 +00:00

10 Commits

Author SHA1 Message Date
806bd42673 dropped amount sign from CurrencyField.tsx 2026-08-18 19:15:55 +05:30
62dd06c226 expense list: month accordions + month-year selector; drop unused x-data-grid
- make each month a card-sized accordion (single-open, first month
  expanded by default) instead of a sticky header over flat rows
- turn the floating pill into a month-year selector: opens a menu of
  all months and expands + scrolls to the chosen month
- remove tags from expense rows again until a placement is settled
- remove unused @mui/x-data-grid@7, which pulled @mui/system@7 over
  material's v5 and caused the createTheme runtime crash
2026-08-18 15:24:26 +05:30
8e9a13dd19 expense list: replace accordion with flat Stripe-style rows
- drop the per-row accordion and delete ExpenseDetail (was only used
  for the expanded view); rows are now static bordered cards with a
  hover highlight
- row layout: logo | name/date + account chip | amount
- tag chips were added to the row during iteration but removed for
  now until a better placement is settled
2026-08-18 13:44:06 +05:30
537aef94ff resolve relative media URLs against the API base in react-openapi
- add resolveMediaUrl() in fields/utils.ts: prefixes /uploads/... and
  other relative paths with the configured baseApiUrl, leaves absolute
  http/data/blob URLs untouched
- use it for every image render: ListCellRenderer, DetailFieldRenderer,
  ImageField form preview, and FileUploadField preview/href (which
  hardcoded /uploads/<value>)
- drop the Expense-side resolveLogoUrl hack and logo pre-normalization;
  the Expenses page now renders logos through the same react-openapi
  path as the admin entity list
2026-08-18 13:01:55 +05:30
47d799fe5f expense list: clickable month pill + fix scroll-to-month
- make the floating month pill interactive (button role, hover,
  focus ring) and jump to the active month's header on click/Enter
- scroll via a non-sticky month anchor + window.scrollTo instead of
  scrollIntoView, which no-ops on sticky headers that are always
  already in view
2026-08-17 20:38:28 +05:30
cc940ee6e3 expense list: split month totals, sticky headers + month pill
- show spent and income totals separately per month header
  (debits red, credits green) instead of a single net amount
- pin the current month header below the navbar while scrolling
  its section (glass backdrop, divider), Stripe-style grouping
- add a floating month pill that updates via scroll-spy so the
  active month stays visible across long feeds
2026-08-17 20:15:39 +05:30
e8c585bdb8 fix expenses grouping to parse occurred_at as DD-MM-YYYY strictly
occurred_at comes from the backend as a DD-MM-YYYY string, which
new Date() cannot parse (NaN), so most transactions fell into an
"unknown" bucket and month sorting was broken.

- add parseOccurredAt() that only accepts DD-MM-YYYY, day-first,
  and throws on any other format or invalid date
- monthKey() now throws instead of returning "unknown"
- add currentMonthKey() for the "this month" stat
- sort groupByMonth/summary by parsed timestamp
2026-08-17 16:43:46 +05:30
3dd833ac2b shared currency field + expenses rendered from react-openapi fields
- add CurrencyField renderer (inherits NumberField for editing) with
  cached Intl formatter; route via uiType "currency" in list/detail/form
- add resourceConfig.fieldTypes override applied in AppProvider, so
  amount becomes currency for both Admin and the Expenses page
- render Expenses page through react-openapi fields (ListCellRenderer,
  DetailFieldRenderer, applyDisplayFormat) instead of custom fields
- resolve relative /uploads entity logos against the API base URL on
  load so entity logos render on the expenses feed
- drop custom avatar, currency/date formatters from the Expense module
2026-08-17 16:27:43 +05:30
d6856a538f fix expenses list performance + dom nesting
- memoize accordion cards and groupByMonth so toggling one
  expense re-renders O(1) cards instead of the whole list
- cache Intl.NumberFormat and date formatters per key (was
  ~2-3 instantiations per item per render)
- unmount collapsed accordion details via unmountOnExit to cut
  initial mount cost and input delay
- restructure Account row in ExpenseDetail so Chip is not nested
  inside <p> (fixes validateDOMNesting warning)
- avoid mutating expenses state array when sorting
2026-08-17 15:22:37 +05:30
9808a1f39b design overhaul + expenses page
- Stripe-style theme: single indigo (#635BFF) brand, 6px radius,
  Inter scale; rewritten themePrimitives + MUI customizations
  (solid primary, near-black secondary, severity-aware Alert)
- Sticky Header (brand-left nav, theme toggle, mobile drawer),
  inline Footer, route fade-in, per-route document.title
- Home hero + feature cards (dead /dashboard,/reports links replaced)
- Split-panel AuthPage with validation and password visibility
- Data pages: PageHeader/EmptyState, breadcrumbed Fetch Request
  pages, admin table polish (numeric alignment, row-hover actions,
  skeletons, empty states), single-accent admin SideMenu
- Global ToastProvider wired into app shell
- New /expenses page: month-grouped feed, single-open accordion
  with inline detail (account, tags, amount, timestamps)
2026-08-17 15:14:57 +05:30