Commit Graph

36 Commits

Author SHA1 Message Date
6c791efb06 feat(ssr): subtle fade-in on wizard step cards
§3 animations: the migrated wizard step cards had no transition, so step→step
swaps and modal open were flat. The old mm/* slide system was deleted in Phase
11 (and its classes purged from CSS), and the transaction-edit "reference" uses
an undefined `last-modal-step` no-op — so there was no clean slide to restore.

Apply the codebase's existing `fade-in transition-opacity duration-300`
primitive (`.htmx-added .fade-in` in input.css) to all three wizard step cards
(new-invoice basic-details + accounts, vendor step-card, client step-card). Each
card now fades in on open and on every step swap. Verified live: cards always
settle to opacity 1 (never stuck invisible) on both open and step navigation.

Richer directional (forward/back) slide transitions are left for a design pass.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-27 13:26:13 -07:00
74f1a49a10 fix(ssr): repair New Invoice + Transaction Edit 500s and broken modal sizes
Three regressions from the SSR rendering-modernization migration, all verified
live via agent-browser:

- BUG A — New Invoice: choosing a client 500'd from /invoice/new/due-date
  (ClassCastException: DateTime cannot be cast to java.util.Date). `due-date`
  and `scheduled-payment-date` called `coerce/from-date` on values already
  decoded to clj-time DateTimes. Drop the coerce; use the decoded dates.

- BUG C — Transaction Edit: any whole-form swap (mode toggle, vendor change,
  add/remove row) 500'd whenever the txn had >=1 autopay-invoice match
  (ClassCastException at links-body*: PersistentVector cannot be cast to Named).
  The autopay link-panel's hidden `action` input was missing `:form ""`, so it
  serialized alongside the main `action` hidden, producing a duplicate param
  that Ring collapsed to a vector. Add `:form ""` to match the unpaid/rule panels.

- Modal sizes: Vendor/Client/Invoice-Pay modals ballooned to full width because
  resources/public/output.css was missing their arbitrary Tailwind size classes.
  Root cause: tailwind.config.js `content` never scanned resources/templates/**/*.html
  (46 Selmer templates the migration introduced), so a rebuild also dropped
  template-only classes like md:w-[950px]. Add the templates glob and rebuild;
  all modal size classes now present, no working modal regressed.

Docs: add 2026-06-27 QA findings + resumable fix task list; cross-link from the
migration plan. Remaining (per the new plan): Vendor/Client inner step-body
overflow, wizard step animations, bulk-edit empty-selection 500, footer EDN leak.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-27 13:11:09 -07:00
5502f4c4a2 refactor(ssr): Phase 8 — migrate New/Edit Invoice onto the engine (conditional :next)
The hardest modal in the app: one wizard that both creates and edits invoices,
with a conditional middle step (basic-details → [accounts] → next-steps, where
the expense-accounts step is skipped on the default-accounts path). Migrated off
mm/* + form-cursor + the EDN snapshot onto the session-backed engine (wizard2).

Finding: the OLD basic-details "Save" was broken. It hx-puts /invoice/new/navigate,
whose `[:to {:optional true} …]` query-schema 500s on empty query-params — Ring's
wrap-params yields {} for a no-query PUT, and main-transformer's parse-empty-as-nil
decodes {} → nil, which the bare [:map] rejects. Production uses the identical
wrap-params, so it was broken there too. So e2e/invoice-new.spec.ts is an ACCEPTANCE
gate (red on the old code, green on the engine, whose submit is a POST with no
query-schema): the migration fixes a latent bug. Create semantics (default → vendor
default account, location-spread; customize → posted grid; edit → prefill + updated
row) were pinned at the REPL.

What changed:
- defrecord 4 → 0 (NewWizard2 / BasicDetailsStep / AccountsStep / NextSteps), mm/ 0,
  fc/ cursor refs 0, step-params[…] field names 0.
- Conditional `:next` `(if (= :customize …) :accounts :done)` replaces mm/CustomNext +
  the broken 308-to-submit. Dual-purpose new+edit = one :init-fn branching on a route
  :db/id; create-wizard! seeds :init-data as per-step step-data so edit opens populated.
- The broken new-wizard-navigate route is deleted; the genuine async helpers
  (account-prediction, due/scheduled-payment-date, location-select, expense total/balance,
  add-row) remain but read the posted flat form (+ ws/get-all for the cross-step total).
- next-steps becomes the done-fn's returned modal (Pay now / Add another / Close).
- Dates ride as java.util.Date (#inst) in step-data so it's EDN-safe across the
  non-terminal step (clj-time DateTimes break the cookie store).

Verification: full e2e suite 61/61 (58 prior + 3 new); maybe-spread-locations unit
test 6/6; create semantics + edit prefill confirmed at the REPL. Skill fed
(scorecard Phase 8, gotchas {}→nil 500 + #inst dates, form-vs-wizard conditional
:next + dual-purpose).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-25 22:05:01 -07:00
ba87805d4c Add vendor pre-population for bulk code and individual edit forms
- Add vendor-changed HTMX handlers for both bulk code and individual edit
- Pre-populate default account at 100% when vendor is selected and no accounts exist
- Fix render-accounts-section to render from step-params correctly
- Change bulk code vendor-changed from hx-get to hx-post to include form data
- Add routes for vendor-changed endpoints
- Update e2e tests to cover vendor pre-population
- Run lein cljfmt fix across codebase
2026-05-21 14:45:19 -07:00
fcb46bf756 msot 2025-03-10 15:04:39 -07:00
956d233fe1 bulk edit is now possible 2025-01-20 21:18:52 -08:00
d534b9e10f Merge branch 'master' into wip-ledger-investigate 2024-11-18 20:00:36 -08:00
c39b3d936e Invoices can be renamed 2024-11-18 20:00:29 -08:00
48d575fe70 create manual ledger experience 2024-10-28 15:18:07 -07:00
6fd609be3e Adds new ledger import page 2024-08-26 20:53:21 -07:00
f4fc82da05 If search index cant be updated, don't throw exception 2024-05-04 18:34:19 -07:00
e3b17e50e2 Sales nearly ready 2024-04-30 22:38:21 -07:00
Bryce
2fb49d3331 QOL items 2024-04-11 11:42:44 -07:00
Bryce
1493b03ba3 makes it possible to add new vendors. 2024-04-10 10:27:08 -07:00
7c4e3d52f1 applied feedback 2024-04-04 21:18:47 -07:00
dfccbf35cd Makes editing work correctly for non-admins 2024-04-03 20:08:46 -07:00
d2ed08f6f9 Editing works. 2024-04-03 12:55:37 -07:00
179e3b219b Tweaks for editing invoices 2024-04-02 20:52:40 -07:00
Bryce
a8e1a15393 Prevents errors from multiple dialogs open 2024-03-29 11:14:30 -07:00
Bryce
d34e125b6f Updates page as needed. 2024-03-29 10:43:15 -07:00
Bryce
6496eea485 Warns when an account is unusable 2024-03-28 19:39:47 -07:00
Bryce
0d75df522d keyboard navigation 2024-03-27 15:57:03 -07:00
Bryce
13a083e053 Streamlines more user interface 2024-03-27 11:36:41 -07:00
Bryce
5c2d3d4487 Slightly better UX 2024-03-27 09:21:25 -07:00
Bryce
d193691963 Applying feedback 2024-03-26 23:55:47 -07:00
Bryce
5b1f824ded Supports spreading cents. 2024-03-26 22:32:13 -07:00
506c075846 adds general ledger links, allows starting new. 2024-03-25 21:02:35 -07:00
ea7ad57da2 Proper validations and total row. 2024-03-25 20:26:04 -07:00
3683d58232 Validations for new invoices 2024-03-25 17:06:30 -07:00
1ac90804b8 Nearly able to create invoices manually 2024-03-24 22:07:17 -07:00
ede4d756af automatically set scheduled payment 2024-03-24 14:26:30 -07:00
Bryce
20cc195197 improvements. 2024-03-23 15:42:11 -07:00
Bryce
9d2b4ba646 new invoice progress 2024-03-22 20:56:22 -07:00
Bryce
5596848cfc modal 2024-03-21 22:33:05 -07:00
Bryce
9cf81f6d15 improvements. 2024-03-21 22:24:28 -07:00
Bryce
87952b79d1 simplifies alpine for syncing props. 2024-03-21 21:09:18 -07:00