• 1.2.2 2dd7f64f2b

    Fetch-request source types, glass-pane create page, date formatting (#18)

    aetos released this 2026-08-24 20:28:18 +00:00 | 0 commits to main since this release

    MR: Fetch-request source types, glass-pane create page, date formatting

    Branch: xlsx-statement-supportmain
    Commits: 1af0a6b231869d (6 commits)

    Summary

    Three related strands of UI work on the fetch-request flow, plus library-level improvements in react-openapi:

    1. Source types — the create form now offers Pdf / Xlsx / Csv / Email sources (spec-driven); legacy generic file is no longer offered for new fetch requests, and a per-request trust_fallback (amount | balance) can be set at creation.
    2. Create page redesign — the flat single-column form is now two equal-height frosted "glass" panes over a subtle brand-indigo gradient backdrop: Source & Account (account/bank above the expanding source field) and Window & Policy (start/end/pipeline/trusted). Recent fetch-request rows share the same glass recipe.
    3. Date formatting — all dates/datetimes across lists, details and display-format templates render as "24 Aug 2026" / "24 Aug 2026, 09:07" instead of raw ISO strings; datetime fields can opt into editing as a plain date picker while storing midnight.

    Changes

    react-openapi (library)

    • src/utils/datetime.ts (new) — zero-dep formatDate / formatDateTime (en-IN via Intl). Only ISO-shaped strings are rewritten; DD-MM-YYYY expense strings and non-dates pass through untouched. Exported from the package index.
    • Display wiring: ListCellRenderer catch-all + inline-dialog cells, InlineRefField, and applyDisplayFormat template interpolation (ISO-shaped values auto-format).
    • x-edit-as mechanism: new FieldConfig.editAs; DateField renders a date-time field with x-edit-as: date as a plain date input, normalizes inbound values to YYYY-MM-DD, and submits T00:00:00. Routing sites unchanged.

    App

    • fetch-requests.models.ts: SourceType gains "csv", new CsvSource, create-side union drops FileSource.
    • FetchRequestCreate.tsx: two-pane grid layout (explicit field partitioning, grid stretch for equal heights), fixed backdrop layer, local GlassPanel helper, list rows restyled; created_at pinned right before row actions.
    • ReportList.tsx: generated date right-aligned before action buttons; outer row no longer wraps.
    • ReportViewer.tsx: header timestamp formatted via exported formatDateTime.

    Verification

    • tsc -b clean at every commit.
    • Formatter behavior spot-checked: 2026-08-24T09:07:25.16800024 Aug 2026, 09:07; 01-05-2026 unchanged; Z-suffixed UTC converts to local wall time.

    Deploy notes

    • Pairs with the khata-app MR (same branch name): backend supplies the Source oneOf (pdf/xlsx/csv/email), trust_fallback, and x-edit-as annotations consumed here.
    • No dependency changes; no API changes client-side beyond honoring existing spec extensions.

    Reviewed-on: #18
    Co-authored-by: Vishesh 'ironeagle' Bangotra aetoskia@gmail.com
    Co-committed-by: Vishesh 'ironeagle' Bangotra aetoskia@gmail.com

    Downloads