Commit Graph

962 Commits

Author SHA1 Message Date
0a07ce01bf Merge branch 'release/1.61.0' 2025-10-15 13:47:46 +02:00
0071293ea6 Merge branch 'feature/fixing-print' into develop 2025-10-15 13:46:19 +02:00
cd3b2ef16d fix: expand cell padding in print layout to fit 6 bills per A4 page
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>
2025-10-15 13:45:55 +02:00
05b8d38a17 chore: remove obsolete .mcp copy.json configuration file 2025-10-15 13:36:50 +02:00
b5028ada52 fix: update QR code print layout to show payedAmount instead of yearMonth
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>
2025-10-15 13:36:41 +02:00
a5d6d7c9e6 Merge branch 'hotfix/1.60.1' 2025-09-14 22:59:46 +02:00
3e6c7a6c21 Merge branch 'hotfix/1.60.1' into develop 2025-09-14 22:59:46 +02:00
94a1bcaf36 fix: adjust padding for print content in PrintPreview component 2025-09-14 22:59:39 +02:00
a5da2cf74e Merge branch 'release/1.60.0' 2025-09-14 22:48:59 +02:00
3c424db3a2 Merge branch 'feature/sprint-01-barcode-print' into develop 2025-09-14 22:46:21 +02:00
fdfa23e67d fix: resolve MongoDB ObjectId serialization error in client components
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>
2025-09-14 22:45:14 +02: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
397b4845d6 docs: add improved sprint framework based on Sprint 01 lessons learned
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>
2025-09-14 22:03:23 +02:00
29e0fe5334 refactor: remove unnecessary print container padding for improved layout 2025-09-14 21:56:56 +02:00
615dd4e20c Merge branch 'feature/adding-ai-framework' into sprint-01-merge 2025-09-14 21:48:42 +02:00
5743807d48 docs: complete Sprint 01 - mark all user stories and DoD items as done
- 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>
2025-09-14 21:45:03 +02:00
9a02124e18 feat: implement US-4 - complete print optimization with CSS media queries
- 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>
2025-09-14 21:44:04 +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
ecea10e805 feat: implement US-1 - add print button to MonthCard with i18n support
- Add PrintButton component with card styling matching AddLocationButton
- Integrate print button next to "Add a new realestate" with centered layout
- Add English/Croatian translations for print tooltips and labels
- Implement click handler to open print preview in new tab
- Create Sprint Playbook for barcode print functionality

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-14 09:08:40 +02:00
d8c3ad7228 plan: add support for printing 2D barcode images with UI enhancements 2025-09-14 08:29:41 +02:00
941ad70567 feat: add Sprint Playbook Template and Implementation Guidelines for AI agents 2025-09-14 08:01:43 +02:00
76435d3441 Merge branch 'release/1.59.0' 2025-09-08 14:02:06 +02:00
addeb312b8 Merge branch 'release/1.59.0' into develop 2025-09-08 14:02:06 +02:00
f86d2e2404 chore: update package version to 1.59.0 in package.json and package-lock.json 2025-09-08 14:00:44 +02:00
ecc33f988d 1.58.0 2025-09-08 13:59:35 +02:00
71444a779a Merge branch 'feature/allowing-download-for-shared' into develop 2025-09-08 13:58:35 +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
cd2d8f5ab9 feat: add MCP server configuration for Serena and Context7 2025-09-08 13:22:49 +02:00
5317848646 supporting non-swarm mode 2025-09-07 12:11:15 +02:00
d748a1c332 Merge branch 'hotfix/update-removed-attachment' into develop 2025-08-29 22:37:06 +02:00
3ed40c05e6 Merge branch 'hotfix/update-removed-attachment' 2025-08-29 22:37:06 +02:00
6c7a315966 fix: prevent empty file from overwriting existing bill attachments
Improve file attachment handling by:
- Adding fileSize === 0 check to prevent empty files from being processed
- Simplifying attachment logic by moving size validation to serializeAttachment function
- Ensuring null is returned for empty/invalid files to preserve existing attachments

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-29 22:32:07 +02:00
3d7d5ed009 feat: configure MCP servers for Serena, Context7 and Git integration
Add comprehensive MCP server configuration including:
- Serena AI assistant with web dashboard disabled
- Context7 documentation server for library lookups
- Git server with repository access permissions

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-29 22:31:28 +02:00
9c7bf82449 feat: add GitHub MCP server configuration 2025-08-29 22:19:30 +02:00
85c69756b7 feat: add MCP configuration for Serena and Context7 servers 2025-08-29 22:19:08 +02:00
55f64ebca5 chore: add Serena AI assistant entries to .gitignore
Add .serena/ directory and *.serena-memory files to prevent
tracking of AI assistant configuration and memory files.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-29 22:17:55 +02:00
8b845261d2 fix: prevent empty file from overwriting existing bill attachments
Fix updateOrAddBill to check file size before processing attachment,
preventing empty blob files from overwriting existing attachments
when updating bill properties.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-29 22:12:23 +02:00
71631ba7ce Merge branch 'master' into develop 2025-08-29 21:45:15 +02:00
044645a1ca restore: replace dual flags with single --do-pre-backup=true/false parameter 2025-08-24 08:54:45 +00:00
b4a6b8d4d3 restore: add interactive pre-backup prompt with automation flags 2025-08-24 08:49:21 +00:00
99f65b1433 restore: store pre-restore safety backups in backups/ directory 2025-08-24 08:46:22 +00:00
9c29838092 backup/restore: use MONGO_SERVICE variable for service name 2025-08-24 08:29:01 +00:00
64496b8cd8 restore: add restore.sh script to restore mongo backups by timestamp 2025-08-24 08:22:23 +00:00
dda78da815 backup: write backups to backups/ and rotate (keep 7), gitignore backups/ 2025-08-24 08:13:57 +00:00
8c46cd5e47 gitignore: ignore mongo-volume backup tarballs 2025-08-24 08:10:52 +00:00
e7ce372e5d backup: append timestamp to mongo-volume backup filename 2025-08-24 08:08:40 +00:00
3e3b03fb45 Merge branch 'hotfix/1.37.1' into develop 2025-08-11 14:19:38 +02:00
4fd65fe3a7 Merge branch 'hotfix/1.37.1' 2025-08-11 14:19:38 +02:00