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": {
|
||||
|
||||
Reference in New Issue
Block a user