Commit graph

73 commits

Author SHA1 Message Date
Claude
12b2bb9720
Reorganise line fields: Currency moves to row 2, FX rate narrows
Form: Row 1 = Date | Vendor (grow) | FX rate (120px)
      Row 2 = Description (grow) | Currency | Receipt | Amount (120px)
      Base currency header: fixed width (no grow)
PDF:  Same two-row layout with matching column positions

https://claude.ai/code/session_014uUwDBtG5y5FuWcy5zqVD1
2026-05-13 10:15:54 +00:00
9dd09c8ad5
Merge pull request #5 from kbenestad/claude/fix-form-layout-P8uHa
Claude/fix form layout p8u ha
2026-05-13 17:11:43 +07:00
Claude
7bca92bc0b
Stretch base currency dropdown to fill form width
Add grow class to base currency fgrp; add CSS rules so .cdd and its
trigger button fill 100% width when inside a grow container.

https://claude.ai/code/session_014uUwDBtG5y5FuWcy5zqVD1
2026-05-13 10:09:34 +00:00
Claude
ee2ee6df40
PDF dates always YYYY-MM-DD; remove formatDate and date-format config
https://claude.ai/code/session_014uUwDBtG5y5FuWcy5zqVD1
2026-05-13 10:08:41 +00:00
Claude
4a0b755f37
Restore native date pickers; keep formatDate for PDF output only
https://claude.ai/code/session_014uUwDBtG5y5FuWcy5zqVD1
2026-05-13 10:07:54 +00:00
67e1a2a7f1
Merge pull request #4 from kbenestad/claude/fix-form-layout-P8uHa
Claude/fix form layout p8u ha
2026-05-13 17:05:27 +07:00
Claude
67786317d7
Standardise all field labels to szSm-1 in PDF output
Staff/Period/Currency header labels and Explanation were using szSm
while all line field labels used szSm-1, causing inconsistent sizing.

https://claude.ai/code/session_014uUwDBtG5y5FuWcy5zqVD1
2026-05-13 10:01:52 +00:00
Claude
31b5b2e255
Footer left: show 'Reimbursement form' and staff name on second line
https://claude.ai/code/session_014uUwDBtG5y5FuWcy5zqVD1
2026-05-13 10:00:43 +00:00
Claude
0dd4506ed5
PDF: right-align FX rate, use standard font for FX rate and amount
https://claude.ai/code/session_014uUwDBtG5y5FuWcy5zqVD1
2026-05-13 09:59:54 +00:00
Claude
971c1f2fc9
Replace three blue separators before grand total with one double-weight line
The last item divider plus two double-rule lines produced three blue lines.
Removed the item divider and the double-rule pair; replaced with a single
line at thickness 3 (double the standard 1.5).

https://claude.ai/code/session_014uUwDBtG5y5FuWcy5zqVD1
2026-05-13 09:58:17 +00:00
Claude
8f64694115
Fix PDF line separator position and footer bleed-through
- Move inter-line separator from bottom to top of each expense line;
  skip on first line and on page breaks (justBroke flag) so the
  continuation header is never followed immediately by a divider
- Increase needSpace from lh*5 (70pt) to lh*7 (98pt) to match the
  actual line block height (~6lh + 16pt), preventing content from
  overrunning M.bottom and bleeding into the footer area

https://claude.ai/code/session_014uUwDBtG5y5FuWcy5zqVD1
2026-05-13 09:53:46 +00:00
eaff681ab9
Merge pull request #3 from kbenestad/claude/fix-form-layout-P8uHa
Add configurable date-format; replace browser date pickers with text …
2026-05-13 16:47:35 +07:00
Claude
8be37f29fe
Add configurable date-format; replace browser date pickers with text inputs
- New config key date-format (default DD/MM/YYYY) controls date display
  throughout the form and PDF output
- formatDate(iso) converts stored YYYY-MM-DD to the configured display format
- parseDate(str) converts user input back to YYYY-MM-DD for state storage
- All three date inputs (line date, period from/to) switched from type=date
  to type=text with format placeholder, removing browser locale dependency
- PDF line dates, period header, and continuation header all use formatDate()
- Filename stays in YYYY-MM-DD for safe file naming

https://claude.ai/code/session_014uUwDBtG5y5FuWcy5zqVD1
2026-05-13 09:38:27 +00:00
cae6416ffd
Merge pull request #2 from kbenestad/claude/fix-form-layout-P8uHa
Fix crash: state initialized before CFG is loaded
2026-05-13 16:33:40 +07:00
Claude
156c76baae
Fix crash: state initialized before CFG is loaded
state.baseCurrency was set to CFG['currency-base'] at declaration time,
but CFG is only populated after await loadConfig(). Reading a property of
undefined throws synchronously, crashing the script before init() runs.
Move the assignment to after loadConfig() resolves in init().

https://claude.ai/code/session_014uUwDBtG5y5FuWcy5zqVD1
2026-05-13 09:30:22 +00:00
edc9d915e0
Merge pull request #1 from kbenestad/claude/fix-form-layout-P8uHa
Make base currency dynamic and reorganize line item layout
2026-05-13 16:27:32 +07:00
Claude
e1292822f8
FX rate memory per currency and fix item header layout
- Remember the last valid FX rate entered per currency in state.fxRateMemory;
  pre-fill it when staff picks the same currency on a new line.
- Move Remove button to top-right of item header (alongside label);
  Subtotal moves below the name input, right-aligned in its own row.

https://claude.ai/code/session_014uUwDBtG5y5FuWcy5zqVD1
2026-05-13 09:26:14 +00:00
Claude
9eccc0af8b
Fix period default dates shifting by one day in UTC+ timezones
toISOString() converts local midnight to UTC, producing the previous day
in any timezone east of UTC. Format dates using local getFullYear/Month/Date
instead.

https://claude.ai/code/session_014uUwDBtG5y5FuWcy5zqVD1
2026-05-13 09:20:35 +00:00
Claude
9d4533b7a1
Swap Vendor and Description fields in form and PDF output
Vendor moves to row 1 (alongside Date/Currency/FX rate) and Description
moves to row 2 (alongside Receipt/Amount), in both the UI and the PDF layout.

https://claude.ai/code/session_014uUwDBtG5y5FuWcy5zqVD1
2026-05-13 09:17:31 +00:00
Claude
09ceaaf360
Add selectable base currency to form header
Replace static base currency badge with a currency dropdown (makeCDD).
Changing the selection updates state.baseCurrency, re-renders all item/line
blocks so closures capture the new base, and recalculates totals. All
dynamic references to CFG['currency-base'] replaced with state.baseCurrency.

https://claude.ai/code/session_014uUwDBtG5y5FuWcy5zqVD1
2026-05-13 09:15:54 +00:00
Claude
d35429314d
Fix item name and FX rate fields not filling form width
- item-name: change flex:1 to width:100% since it's not in a flex container
- FX rate: add grow class to fgrp and set input width to 100% so it extends to the right edge

https://claude.ai/code/session_014uUwDBtG5y5FuWcy5zqVD1
2026-05-13 09:13:07 +00:00
8b823bba1f First iteration 2026-05-13 01:02:05 +07:00
b2105ae363 Initial commit 2026-05-12 23:46:34 +07:00