Commit Graph

21 Commits

Author SHA1 Message Date
Knee Cola
cbd13cbae3 Add seenByTenant tracking feature
- Add seenByTenant field to BillingLocation interface
- Implement setSeenByTenant function to mark locations as viewed by tenant
  - Checks if flag is already set to avoid unnecessary DB updates
  - Includes TypeDoc documentation
- Update LocationViewPage to call setSeenByTenant when non-owner visits
- Add seenByTenant to fetchAllLocations projection
- Update LocationCard to show "seen by tenant" status indicator
  - Displays in "Monthly statement" fieldset with checkmark icon
  - Shows alongside monthly expense total
- Add localization strings for monthly statement and seen status

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-18 23:51:23 +01:00
Knee Cola
be5d5074fe Refactor: renamed AccountForm to UserSettingsForm and update related actions and translations 2025-11-18 12:52:43 +01:00
Knee Cola
513e78e8f1 Refactor account page to use icon in form title
- Remove redundant page heading from account page
- Add AccountCircle icon to AccountForm title
- Clean up unused account-page translations
- Simplify account page component by moving title to form

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-17 18:44:24 +01:00
Knee Cola
80f4c92755 Add user account settings page with profile management
- Add /account route with profile form (firstName, lastName, address, IBAN)
- Create UserProfile type and MongoDB users collection
- Implement server actions for getting and updating user profile
- Add Account Circle icon to PageHeader linking to /account
- Install Material UI icons for account icon
- Add form input disabling during save with loading spinner
- Add cancel button to discard changes and return home
- Add English and Croatian translations for account page
- Update locale names with flag emojis in language selector

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-17 18:37:59 +01:00
694ec8508b feat: add multilingual support for print preview empty state
Add i18n support for empty state when no barcode data is found:

**English translations:**
- "No Barcode Data Found" 
- "No bills with 2D barcodes found for {yearMonth}"

**Croatian translations:**
- "Nema Podataka o Barkodovima"
- "Nema računa s 2D barkodovima za {yearMonth}"

**Implementation:**
- Add translation keys to messages/en.json and messages/hr.json
- Update server component to fetch empty state translations
- Use proper next-intl parameter passing for yearMonth variable
- Replace hardcoded English text with localized translations

Empty state now displays correct language based on URL locale:
- /en/print/2025/01 → English empty state message
- /hr/print/2025/01 → Croatian empty state message

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-14 22:31:03 +02:00
834444d5c7 fix: resolve next-intl translation parameter error in print footer
Fix IntlError: FORMATTING_ERROR for print footer translation:

- Pass date parameter correctly to t("print-footer") in server component
- Remove manual string replacement in client component 
- Use proper next-intl parameter syntax: t("key", { param: value })

Error was caused by next-intl expecting translation parameters 
to be passed at the translation function call level, not through 
manual string replacement afterward.

Print preview now loads without FORMATTING_ERROR and displays 
localized footer text correctly in both English and Croatian.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-14 22:16:00 +02:00
b205a61cf9 feat: implement US-3 - enhance print layout with professional table design
- Add comprehensive i18n support for all print preview content
- Fix next-intl context error by moving translations to server component
- Implement professional 3-column table layout with proper styling
- Add multilingual table headers (EN: #, Bill Information, 2D Barcode | HR: #, Informacije o Računu, 2D Barkod)
- Center-align index column header and optimize barcode sizing
- Hide print button and header from actual print output
- Fix hydration errors with proper date handling
- Enhanced barcode display with proper padding and sizing

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-14 21:16:33 +02:00
493c2f62fa feat: implement US-2 - create print route with barcode data fetching
- Add Next.js print route at /[locale]/print/[year]/[month]
- Implement fetchBarcodeDataForPrint function with user authentication
- Create PrintPreview component with basic table layout
- Add proper 404 handling with not-found.tsx
- Fix barcode image display with flexible data URL handling
- Filter and sort bills with barcode data for consistent display

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-14 19:57:13 +02:00
e84188baf2 feat: add unauthenticated /share/attachment/[id] route for shared bill attachments
- Add /share/attachment/.* to public pages in middleware.ts
- Create new /share/attachment/[id] route handler for downloading attachments without authentication
- Add custom 404 page for missing shared attachments
- Update ViewBillCard component to use shared attachment route instead of authenticated route

This enables attachment downloads from shared bill pages without requiring user login.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-08 13:57:53 +02:00
4ab61f9917 implementiran share by link 2024-12-13 17:50:12 +01:00
3799baa712 BugFix: attachment route moved under [locale] 2024-03-12 09:05:43 +01:00
a4b687d1f7 implemented webview detection & warning 2024-03-07 13:19:19 +01:00
b66d911e11 fixed SingInButton spacing 2024-02-19 09:32:38 +01:00
cc8c6968f6 BugFix: restored location forms 2024-02-17 09:46:36 +01:00
8145f149aa added opengraph metadata 2024-02-17 08:51:36 +01:00
1c66940287 added language switcher 2024-02-17 08:32:53 +01:00
4f6d31a7c1 moved page under locale 2024-02-17 07:44:22 +01:00
017d52f86e localized login screen 2024-02-16 18:03:28 +01:00
a8e40dd759 attached i18n to html language 2024-02-16 17:21:38 +01:00
d3f9dd3d25 fixed imports of all moved files 2024-02-16 15:52:43 +01:00
ba0934e8cd moved all the pages into [locale] 2024-02-16 15:51:26 +01:00