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:
@@ -43,6 +43,14 @@ export interface BillingLocation {
|
||||
bills: Bill[];
|
||||
/** (optional) notes */
|
||||
notes: string|null;
|
||||
/** (optional) whether to generate 2D code for tenant */
|
||||
generateTenantCode?: boolean | null;
|
||||
/** (optional) tenant first name */
|
||||
tenantFirstName?: string | null;
|
||||
/** (optional) tenant last name */
|
||||
tenantLastName?: string | null;
|
||||
/** (optional) tenant email */
|
||||
tenantEmail?: string | null;
|
||||
};
|
||||
|
||||
export enum BilledTo {
|
||||
|
||||
Reference in New Issue
Block a user