Rename 'town' to 'ownerTown' in UserSettings with 27 character max length

Changes:
- Updated UserSettings interface: town -> ownerTown
- Updated userSettingsActions.ts:
  - Changed State type to use ownerTown
  - Added max length validation (27 characters) to FormSchema
  - Updated validation refinement to check ownerTown
  - Updated form data parsing to read ownerTown
  - Updated database write operations to use ownerTown
- Updated UserSettingsForm.tsx:
  - Changed state tracking to use ownerTown
  - Updated validation check to reference ownerTown
  - Updated input field: id, name, maxLength={27}
- Updated ViewLocationCard.tsx to use ownerTown instead of town
- Updated English translations:
  - town-label -> owner-town-label: "Your Postal Code and Town"
  - town-placeholder -> owner-town-placeholder
  - town-required -> owner-town-required
- Updated Croatian translations with corresponding ownerTown keys

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Knee Cola
2025-11-22 22:40:12 +01:00
parent 387b7e0256
commit e6adb10689
6 changed files with 29 additions and 28 deletions

View File

@@ -30,7 +30,7 @@ export const ViewLocationCard:FC<ViewLocationCardProps> = ({location, userSettin
SjedistePlatitelja: tenantTown ?? "",
Primatelj: userSettings?.ownerName ?? "",
AdresaPrimatelja: userSettings?.ownerStreet ?? "",
SjedistePrimatelja: userSettings?.town ?? "",
SjedistePrimatelja: userSettings?.ownerTown ?? "",
IBAN: userSettings?.iban ?? "",
ModelPlacanja: "HR00",
PozivNaBroj: `${yearMonth.year}-${yearMonth.month.toString().padStart(2,"0")}`,