Replace billedToTenant boolean with billedTo enum
Migrated from boolean checkbox to enum-based radio buttons for better flexibility and clarity in tracking bill payment responsibility. Changes: - Added BilledTo enum with values 'tenant' and 'landlord' - Replaced Bill.billedToTenant (boolean) with Bill.billedTo (enum) - Updated BillEditForm to use radio buttons instead of checkbox - Updated billActions to handle billedTo enum values - Updated all display filtering to use enum comparison - Updated printActions barcode filtering - Updated translations for radio button labels (en/hr) The billedTo property is optional for backward compatibility - undefined values default to BilledTo.Tenant, maintaining current behavior where only tenant bills are displayed and calculated. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -31,6 +31,11 @@ export interface BillingLocation {
|
||||
notes: string|null;
|
||||
};
|
||||
|
||||
export enum BilledTo {
|
||||
Tenant = "tenant",
|
||||
Landlord = "landlord"
|
||||
}
|
||||
|
||||
/** Bill basic data */
|
||||
export interface Bill {
|
||||
_id: string;
|
||||
@@ -38,8 +43,8 @@ export interface Bill {
|
||||
name: string;
|
||||
/** is the bill paid */
|
||||
paid: boolean;
|
||||
/** true if tenant to cover the bill */
|
||||
billedToTenant: boolean;
|
||||
/** who is billed for the bill */
|
||||
billedTo?: BilledTo;
|
||||
/** payed amount amount in cents */
|
||||
payedAmount?: number | null;
|
||||
/** attached document (optional) */
|
||||
|
||||
Reference in New Issue
Block a user