Commit Graph

16 Commits

Author SHA1 Message Date
Knee Cola
1605eec5fb 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>
2025-11-17 13:48:28 +01:00
Knee Cola
0ae5140487 Add billedToTenant property to Bill interface with UI support
Added new boolean property to track whether a bill should be paid by the tenant.

Changes:
- Added billedToTenant property to Bill interface in db-types.ts
- Added checkbox UI control in BillEditForm for billedToTenant
- Added state management and change handler for the checkbox
- Added i18n translations (EN: "Billed to tenant", HR: "Plaća podstanar")
- Set default value to true for new bills

Note: Server action implementation pending - property not yet persisted to database.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-17 13:18:15 +01:00
87d6928a97 BugFix: fixing types 2025-01-13 16:32:38 +01:00
103e371d5f mongo projekcija proširena property-em "hasAttachment" 2025-01-13 16:05:15 +01:00
dc8f7e335a bar code imaghe is saved to DB 2024-02-12 15:29:16 +01:00
d627ad757d year & month replaced by yearMonth object 2024-01-09 16:20:49 +01:00
46b65711a8 yearMonth split into year + month 2024-01-09 15:43:01 +01:00
4ffe89fde6 added payedAmount 2024-01-09 10:22:13 +01:00
8a90c58417 multi-user support 2024-01-08 16:32:08 +01:00
3f7b681ab9 implemented location edit 2024-01-05 14:52:32 +01:00
86135199a9 implemented bill deletion + var rename 2024-01-05 13:54:25 +01:00
8b7cd45087 supported attachment upload 2024-01-05 11:55:33 +01:00
79dbe04245 implemented bill update 2024-01-04 16:25:22 +01:00
76ddedf652 Bill Edit Form: dovršen fetch 2024-01-04 15:38:58 +01:00
f11987dd3a dovršen rendering homepage-a 2024-01-04 14:46:31 +01:00
b653ce40bc kreirane komponente 2024-01-04 10:30:43 +01:00