Add tenant information fields to LocationEditForm
Added optional tenant fields (first name, last name, email) to billing locations with a toggle to enable/disable 2D barcode generation for tenants. Changes: - Added generateTenantCode, tenantFirstName, tenantLastName, and tenantEmail fields to BillingLocation interface - Updated LocationEditForm with toggle control and conditional tenant fields - Implemented conditional validation: tenant names required when generateTenantCode is true - Updated updateOrAddLocation action to persist tenant data across all update operations - Added localization strings for tenant fields and validation messages (Croatian/English) The generateTenantCode flag is persisted in the database and controls visibility of tenant name fields. When enabled, both first and last names become mandatory. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -124,6 +124,14 @@
|
||||
"location-edit-form": {
|
||||
"location-name-placeholder": "Realestate name",
|
||||
"notes-placeholder": "Notes",
|
||||
"generate-tenant-code": "Generate 2D code for tenant",
|
||||
"tenant-first-name-label": "Tenant First Name",
|
||||
"tenant-first-name-placeholder": "Enter tenant's first name",
|
||||
"tenant-last-name-label": "Tenant Last Name",
|
||||
"tenant-last-name-placeholder": "Enter tenant's last name",
|
||||
"tenant-email-label": "Tenant Email",
|
||||
"tenant-email-placeholder": "Enter tenant's email",
|
||||
"warning-missing-tenant-names": "Warning: Tenant first and last name are missing. The 2D barcode will not be displayed to the tenant when they open the shared link until both fields are filled in.",
|
||||
"save-button": "Save",
|
||||
"cancel-button": "Cancel",
|
||||
"delete-tooltip": "Delete realestate",
|
||||
@@ -133,7 +141,10 @@
|
||||
"update-subsequent-months": "current and all future months",
|
||||
"update-all-months": "all months",
|
||||
"validation": {
|
||||
"location-name-required": "Relaestate name is required"
|
||||
"location-name-required": "Relaestate name is required",
|
||||
"tenant-first-name-required": "tenant first name is missing",
|
||||
"tenant-last-name-required": "tenant last name is missing",
|
||||
"validation-failed": "Validation failed. Please check the form and try again."
|
||||
}
|
||||
},
|
||||
"account-form": {
|
||||
|
||||
@@ -123,6 +123,14 @@
|
||||
"location-edit-form": {
|
||||
"location-name-placeholder": "Ime nekretnine",
|
||||
"notes-placeholder": "Bilješke",
|
||||
"generate-tenant-code": "Generiraj 2D barkod za podstanara",
|
||||
"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",
|
||||
"tenant-email-label": "Email podstanara",
|
||||
"tenant-email-placeholder": "Unesite email podstanara",
|
||||
"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",
|
||||
"delete-tooltip": "Brisanje nekretnine",
|
||||
@@ -132,7 +140,10 @@
|
||||
"update-subsequent-months": "trenutni i svi budući mjeseci",
|
||||
"update-all-months": "svi mjeseci",
|
||||
"validation": {
|
||||
"location-name-required": "Ime nekretnine je obavezno"
|
||||
"location-name-required": "Ime nekretnine je obavezno",
|
||||
"tenant-first-name-required": "nedostaje ime podstanara",
|
||||
"tenant-last-name-required": "nedostaje prezime podstanara",
|
||||
"validation-failed": "Validacija nije uspjela. Molimo provjerite formu i pokušajte ponovno."
|
||||
}
|
||||
},
|
||||
"account-form": {
|
||||
|
||||
Reference in New Issue
Block a user