Replace fixed top margin with self-center for vertical alignment
in PrintButton, AddLocationButton, and AddMonthButton text labels.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Remove mr-[-3em] from AddLocationButton, AddMonthButton, and PrintButton
to improve visual alignment and spacing consistency.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
The billedTo field indicates payment responsibility (tenant vs landlord),
not viewing permissions. Landlords should see and manage ALL bills.
Changes:
- LocationCard: Display all bills regardless of billedTo value
- LocationCard: Calculate monthlyExpense from all paid bills
- HomePage: Include all paid bills in monthlyExpense aggregation
- printActions: Print all bills with barcodes regardless of billedTo
- locationActions: Add billedTo property to fetchAllLocations result
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Update billActions to redirect with toast messages
- billSaved: when bill is created or updated
- billDeleted: when bill is deleted
- Update locationActions to redirect with toast messages
- locationSaved: when location is created or updated
- locationDeleted: when location is deleted
- Enhance MonthLocationList to check for all toast parameters
- Consolidated success message handling for all operations
- Clean up all URL parameters after showing toast
- Add translations for all success messages (EN and HR)
- Bill saved/deleted messages
- Location saved/deleted messages
User experience: All forms now redirect to home with toast
notifications, providing consistent feedback across the app.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add gotoHomeWithMessage function to navigationActions
- Redirect to home page after successful profile save
- Display success message in toast notification instead of in-form
- Check for profileSaved URL parameter on home page mount
- Clean up URL parameter after showing toast
- Move success message translation to home-page section
- Remove unused success state and message from AccountForm
- Remove useEffect import from AccountForm
User experience: After saving profile, users are redirected to the
familiar home screen and see a toast notification confirming the save.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- 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>
- 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>
Switch from node:24-alpine to gcr.io/distroless/nodejs20-debian12:nonroot
for enhanced security and reduced attack surface. Distroless images contain
only runtime dependencies without shell, package managers, or other utilities.
Changes:
- Use distroless nodejs20-debian12:nonroot base image
- Remove manual user creation (use built-in nonroot user)
- Remove RUN commands for directory creation (incompatible with distroless)
- Update file ownership to nonroot:nonroot
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Changed the layout to display the label and radio buttons in a single
horizontal row for better visual alignment and more compact design.
Before: Label on separate line above radio buttons
After: Label and radio buttons aligned horizontally
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
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>
Updated all components to respect the billedToTenant flag:
- LocationCard: Filter bills display and monthlyExpense calculation
- ViewLocationCard: Filter bills display and monthlyExpense calculation
- HomePage: Update monthlyExpense calculations for month grouping
- printActions: Filter barcode print data to only include tenant bills
All filtering uses (bill.billedToTenant ?? true) for backward
compatibility with existing bills that don't have this property set.
This ensures users only see and calculate expenses for bills that
are the tenant's responsibility.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Added auto-approval for common safe operations:
- Git add and commit commands
- Serena MCP replace_regex tool
This improves workflow efficiency during development.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Implemented full server-side persistence for the billedToTenant property:
- Extract billedToTenant from formData in updateOrAddBill action
- Add to MongoDB $set operations for updating existing bills
- Include in new bill creation with value from form
- Set default value (true) for bills added to subsequent months
- Handle undefined values from existing database records using destructuring defaults
This completes the feature - bills can now track whether they should be
paid by the tenant, with backward compatibility for existing data.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
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>
Increase padding and spacing to fit exactly 6 bills per page (down from 8).
- Increase table cell padding (th: 8px 12px, td: 16px 12px)
- Set barcode image max-height to 85px
- Increase text spacing to 0.5rem in print mode
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Remove billYear and billMonth from second column, add payedAmount as last value.
- Update PrintBarcodeData interface to replace yearMonth with payedAmount
- Modify fetchBarcodeDataForPrint to include bill.payedAmount
- Update PrintPreview display to show payedAmount (formatted from cents)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Fix React serialization warning when passing ObjectIds to client components:
**Problem:**
- MongoDB ObjectIds have toJSON() methods which React rejects in client components
- Error: "Only plain objects can be passed to Client Components from Server Components. Objects with toJSON methods are not supported"
- Occurred when rendering main page with year parameter (?year=2023)
**Solution:**
- Add $addFields stage in fetchAllLocations aggregation pipeline
- Convert location _id and bill _id fields to strings using $toString
- Simplify $project stage to use single "bills": 1 instead of individual field projections
- Ensures only plain objects (strings) are passed to client components
**Technical Details:**
- Modified app/lib/actions/locationActions.ts:268-287
- Added $addFields stage before existing $project stage
- Converted ObjectIds to strings while preserving all other data structures
- Build passes without serialization warnings
ObjectId serialization now handled properly across all client component boundaries.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
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>
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>
Create enhanced versions of sprint framework files incorporating key improvements:
**Sprint Playbook Template (Improved):**
- Add comprehensive status tracking with current focus and complexity estimation
- Enhance quality gates for code, testing, and documentation
- Include proactive risk mitigation strategies with fallback approaches
- Add lessons learned and retrospective sections for continuous improvement
- Define clear communication protocols and success metrics
**How-to-Use Guide (Improved):**
- Implement advanced clarity checking to identify ambiguities before starting
- Add comprehensive project analysis including testing infrastructure assessment
- Enhance story breakdown with Given/When/Then format and dependency tracking
- Include proactive risk management with mitigation strategies
- Define quality gates for automated and manual verification
- Add iterative improvement process for framework refinement
**Implementation Guidelines (Improved):**
- Add structured testing checkpoint protocol with user feedback formats
- Implement iterative refinement process for handling user feedback
- Enhance communication with proactive updates and blocker notifications
- Add advanced error handling with classification and recovery protocols
- Include knowledge transfer and technical decision documentation
- Add continuous quality monitoring with automated checks
These improvements generalize lessons from Sprint 01 successful execution:
- Better user collaboration through structured testing checkpoints
- Enhanced risk management with proactive identification and mitigation
- Comprehensive quality assurance across multiple levels
- Systematic knowledge capture and process optimization
- Clear scope management and change control procedures
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Update Sprint status from 'not started' to 'completed'
- Mark all 4 user stories (US-1 through US-4) as ✅ done
- Complete AI-responsible Definition of Done checklist
- Update barcode specification to reflect final 69.6mm implementation
- Document successful completion of barcode print functionality
Sprint 01 Successfully Completed! 🎉🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add comprehensive CSS print media queries for A4 paper optimization
- Implement 69.6mm barcode width specification (20% larger than original 58mm)
- Apply B&W print color optimization forcing all elements to black/white
- Add page break handling to prevent table rows from splitting across pages
- Fix table cropping issue by removing excessive width and reducing container padding
- Optimize print layout with zero padding for maximum table space utilization
- Ensure header/button elements hidden from print output with proper CSS
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- 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>