Implement bill forwarding strategy with radio button persistence
Added billFwdStrategy field to store user's choice for when to forward
utility bills to tenants, with database persistence and UI updates.
Changes:
- Added billFwdStrategy field to BillingLocation interface ("when-payed" | "when-attached")
- Updated FormSchema to validate billFwdStrategy enum values
- Modified updateOrAddLocation to persist billFwdStrategy in all database operations
- Defaults to "when-payed" (first option) when no value exists in database
- Updated LocationEditForm radio buttons to use persisted database values
- Radio button selection is preserved across edits and restored from database
- Renamed autoTenantNotification to autoBillFwd throughout codebase
- Updated localization strings for bill forwarding features
Form behavior:
- New locations: "when-payed" radio selected by default
- Existing locations: Radio selection matches stored database value
- Value persisted in current, subsequent, and all month update operations
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -123,14 +123,19 @@
|
||||
"location-edit-form": {
|
||||
"location-name-placeholder": "Ime nekretnine",
|
||||
"notes-placeholder": "Bilješke",
|
||||
"generate-tenant-code": "generiraj 2D barkod za podstanara",
|
||||
"tenant-2d-code-legend": "2D BARKOD ZA PODSTANARA",
|
||||
"tenant-2d-code-toggle-label": "generiraj 2D barkod",
|
||||
"tenant-first-name-label": "Ime podstanara",
|
||||
"tenant-first-name-placeholder": "Unesite ime podstanara",
|
||||
"tenant-last-name-label": "Prezime podstanara",
|
||||
"tenant-last-name-placeholder": "Unesite prezime podstanara",
|
||||
"auto-utility-bill-forwarding": "automatsko prosljeđivanje režija",
|
||||
"auto-utility-bill-forwarding-legend": "AUTOMATSKO PROSLJEĐIVANJE REŽIJA",
|
||||
"auto-utility-bill-forwarding-toggle-label": "proslijedi režije automatski",
|
||||
"tenant-email-label": "Email podstanara",
|
||||
"tenant-email-placeholder": "Unesite email podstanara",
|
||||
"utility-bill-forwarding-strategy-label": "Režije proslijedi kada...",
|
||||
"utility-bill-forwarding-when-payed": "sve režije označim kao plaćene",
|
||||
"utility-bill-forwarding-when-attached": "za sve stavke priložim račun (PDF)",
|
||||
"warning-missing-tenant-names": "Upozorenje: Ime i prezime podstanara nedostaju. 2D barkod neće biti prikazan podstanaru kada otvori podijeljenu poveznicu dok oba polja ne budu popunjena.",
|
||||
"save-button": "Spremi",
|
||||
"cancel-button": "Odbaci",
|
||||
|
||||
Reference in New Issue
Block a user