Commit Graph

29 Commits

Author SHA1 Message Date
Knee Cola
c5fe184f9c Rename autoTenantNotification to autoBillFwd and update related references in forms and translations 2025-11-18 09:38:04 +01:00
Knee Cola
93cf159c44 Add auto tenant notification toggle to LocationEditForm
Added toggle to control automatic tenant notifications with conditional
email field visibility based on the toggle state.

Changes:
- Added autoTenantNotification field to BillingLocation interface
- Updated LocationEditForm with "Notify tenant automatically" toggle
- Email field now only visible when autoTenantNotification is enabled
- Toggle appears after tenant name fields (when generateTenantCode is active)
- Updated updateOrAddLocation action to persist autoTenantNotification flag
- Added localization strings for toggle (Croatian/English)

Field visibility hierarchy:
1. Generate 2D code toggle (always visible)
2. Tenant name fields (visible when #1 is ON)
3. Auto notification toggle (visible when #1 is ON)
4. Email field (visible when #1 AND #3 are ON)

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-18 09:24:18 +01:00
Knee Cola
9ae023cc94 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>
2025-11-18 08:23:08 +01:00
a6d0cc77ac add update scope options for location editing
- Added radio button group to LocationEditForm with three update modes:
  1. Current month only (default) - updates specific location
  2. Current and all future months - updates current and subsequent months
  3. All months - updates all locations with same name across all time periods
- Enhanced updateOrAddLocation action with smart update logic based on scope
- Uses name-based matching to find related locations across months
- Added compact radio button styling with reduced spacing and indentation
- Added translations for update scope options in Croatian and English
- Maintains backward compatibility with existing single-location updates

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-11 11:42:48 +02:00
78a6c18ba5 add option to create location in all subsequent months
- Added toggle in LocationEditForm for adding locations to future months (disabled by default)
- Modified updateOrAddLocation action to support batch creation across subsequent months
- Only creates locations in months where no location with same name exists
- Added translations for toggle text in Croatian and English
- Fixed unused variable warning in deleteLocationById
- Improved auth.ts development comments for clarity

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-11 10:27:31 +02:00
160c4f00f5 BugFix: delete button did not use locale path prefix 2024-02-19 10:21:25 +01:00
d30bd50e1a enabled i18n for all components 2024-02-16 21:56:41 +01:00
cebe5a7239 delete forms were not wrapped in <Main> 2024-02-15 15:52:27 +01:00
a96998baad Location Edit / Add / Delete migrated to client-side rendering 2024-02-08 14:23:01 +01:00
0bb4c12061 LocationEditForm: migrated to client-side rendering 2024-02-08 13:50:48 +01:00
9a83d48e68 removing legacy code 2024-02-06 15:42:10 +01:00
79e8e1279c BugFix: saving location did not redirect user 2024-02-06 15:07:52 +01:00
4ef2330ad4 Added suspense to LocationAddPage and LocationDetelePage 2024-02-06 14:48:19 +01:00
8aaf2a0dea "Cancel" buttons replaced with <Link> 2024-02-06 14:29:58 +01:00
cf97b3d4b5 <suspense> added to LocationEditPage 2024-02-06 14:16:31 +01:00
a1d1db2a0c BugFix: cancel button on LocationEditForm did not work when adding new 2024-02-02 10:25:21 +01:00
2261e83715 refactoring: changing param list of a fn 2024-02-01 15:07:30 +01:00
a1abc450bf forms: gotoHome activating previously active month 2024-02-01 14:38:26 +01:00
0eb11e7d02 form action redirects user to tjhe appropriate year 2024-01-17 15:47:55 +01:00
4c6292b6c6 fixed form with on mobile 2024-01-16 14:28:10 +01:00
226beb974f header & footer 2024-01-16 10:24:21 +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
8112c9765d refactoring: actions moved to seprate dir 2024-01-09 15:00:26 +01:00
2413ab9240 completed location deletion 2024-01-05 15:19:15 +01:00
94fee6f775 adding new billing location completed 2024-01-05 15:13:15 +01:00
3f7b681ab9 implemented location edit 2024-01-05 14:52:32 +01:00
b168e6086f pojednostavljeni edit form-ovi 2024-01-04 11:31:35 +01:00
b653ce40bc kreirane komponente 2024-01-04 10:30:43 +01:00