Commit Graph

999 Commits

Author SHA1 Message Date
419d91e292 Merge branch 'hotfix/2.21.3'
All checks were successful
Build and Push Docker Image / build_web_app__check_image_version (push) Successful in 13s
Build and Push Docker Image / build_web_app (push) Successful in 5m49s
2026-01-09 19:42:14 +01:00
a428a77eb1 (ver) web-app: version bump 2026-01-09 19:42:06 +01:00
16eaa5bfa1 (bugfix) Fix hosts file configuration by using extra_hosts at runtime
Docker overwrites /etc/hosts at container runtime, so copying it during
build (COPY command) or mounting it as volume doesn't work reliably.
Moved to extra_hosts in docker-compose files for both standalone and
swarm deployments.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-09 19:41:33 +01:00
2cff1ec18b Merge branch 'release/2.21.2'
All checks were successful
Build and Push Docker Image / build_web_app__check_image_version (push) Successful in 14s
Build and Push Docker Image / build_web_app (push) Successful in 5m57s
2026-01-09 19:18:29 +01:00
3366e85950 Merge branch 'feature/hotfix-hosts-file' into develop 2026-01-09 19:17:58 +01:00
5cb0210668 (ver) web-app: version bump 2026-01-09 19:17:53 +01:00
2ddff15497 (bugfix) Dockerfile: hosts file was copied in wrong step 2026-01-09 19:17:31 +01:00
0492469ed6 (refactor) dockerfile: modified default port 2026-01-09 19:17:01 +01:00
0ecae68c63 Merge branch 'release/2.21.1'
All checks were successful
Build and Push Docker Image / build_web_app__check_image_version (push) Successful in 15s
Build and Push Docker Image / build_web_app (push) Successful in 6m6s
2026-01-09 18:52:07 +01:00
42d1f6276a Merge branch 'feature/fixing-deploy-path' into develop 2026-01-09 18:51:48 +01:00
d17efdc156 (ver) web-app: version bump 2026-01-09 18:51:40 +01:00
de97ce744f (refactor) Move hosts file copy from volume mount to Dockerfile
Bake the custom hosts file into the Docker image instead of mounting it as a volume. This simplifies deployment configuration and makes the image more self-contained.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-09 18:51:05 +01:00
c9cc32b811 (config) Convert docker-compose paths to absolute for Portainer compatibility
Changed relative volume paths to absolute paths and updated image reference to use full registry path. This enables deployment via Portainer which doesn't have working directory context.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-09 18:49:00 +01:00
bc5f5e051f Merge branch 'release/2.21.0'
All checks were successful
Build and Push Docker Image / build_web_app__check_image_version (push) Successful in 13s
Build and Push Docker Image / build_web_app (push) Successful in 6m22s
2026-01-09 18:38:11 +01:00
528c433fce (ver) web-app: version bump 2026-01-09 18:34:59 +01:00
50238b4e90 Merge branch 'feature/gitea-workflow' into develop 2026-01-09 18:33:09 +01:00
5773156222 Add Gitea CI/CD workflows for automated Docker builds
Implements automated Docker image building and publishing to registry:

- build.yml: Main workflow that builds and pushes Docker images to registry
  - Triggers on push to master branch
  - Only builds when image with current version doesn't exist
  - Uses Docker BuildKit with layer caching for faster builds
  - Tags images with both version number and 'latest'

- check_image_version.yml: Reusable workflow to verify image existence
  - Reads version from package.json
  - Uses lightweight manifest inspection (no image download)
  - Returns image_exists and version as outputs

- check_package_version.yml: Reusable workflow to detect version changes
  - Compares version between commits
  - Handles edge cases (first commit, missing package.json)
  - Includes validation for version extraction failures

All workflows include proper error handling and clear logging.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-09 18:32:48 +01:00
a3ec20544c (refactor) Move generateShareId to locationActions and apply to LocationCard
- Moved generateShareId from shareChecksum.ts to locationActions.ts as a server action
- Updated LocationCard to use shareID with checksum for proof of payment download link
- Replaced Link with AsyncLink to handle async shareID generation
- Commented out debug console.log in Pdf417Barcode

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-09 18:18:17 +01:00
e318523887 (bugfix) Fix proof of payment download URL to use shareID with checksum
Fixed bug where proof of payment download links used raw locationID instead
of shareID (locationID + checksum), causing link validation to fail. Added
AsyncLink component to handle async shareID generation gracefully.

Changes:
- BillEditForm: Generate shareID using generateShareId server action
- BillEditForm: Use AsyncLink to prevent broken links during async load
- AsyncLink: New reusable component for links that need async data
- Updated download URL from locationID-billID to shareID-billID format

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-09 18:16:53 +01:00
37f617683e (refactor + bugfix) Improve data structure and handle empty database edge cases
Refactored months data structure from object to array for better performance
and cleaner iteration. Fixed crash when availableYears array is empty by
adding proper guards and fallback to current year.

Changes:
- MonthLocationList: Changed months prop from object to array type
- HomePage: Refactored reduce logic to build array instead of object
- HomePage: Added empty database handling in year selection logic
- HomePage: Added early returns for invalid year params in empty DB

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-09 17:36:10 +01:00
1ca55ae820 Merge branch 'master' into develop 2026-01-05 16:08:17 +01:00
0e3e41e064 2.20.3 2026-01-05 16:03:44 +01:00
488c771a09 (fix) ParamsYearInvalidMessage moved to client-side component so that it can use useEffect 2026-01-05 16:03:38 +01:00
0b8c8ae6c4 Merge branch 'master' into develop 2026-01-05 15:57:31 +01:00
1076797c89 (bugfix) HomePage: if current year was not found in DB containing data the app would crash.
This would happen at in January after user hasn't touched the app since the previous year and he did not create any records in the next (now current) year
2026-01-05 15:57:10 +01:00
Knee Cola
7a526c5a85 Merge branch 'feature/email-confirm-unsubscribe' into develop 2025-12-29 23:31:25 +01:00
Knee Cola
f42366c00b feat: add git diff command to permissions in settings 2025-12-29 23:31:09 +01:00
Knee Cola
4dc2df4a12 security: add server-side validation for email status transitions
Implement strict validation to prevent unauthorized email status changes:
- Force status to Unverified when email address changes
- Only allow client to reset status to Unverified (via reset button)
- Block client from upgrading status (Unverified→Verified, etc.)
- All status upgrades must happen server-side via verification links

This prevents attackers from:
- Submitting new emails with fake "verified" status
- Bypassing email verification by modifying client requests
- Escalating email status without proper verification flow

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-29 23:21:49 +01:00
Knee Cola
fe98a63594 feat: add persistence for tenant email status field
- Add tenantEmailStatus hidden field to LocationEditForm
- Update locationActions to persist email status across all scopes
- Add reset button for unsubscribed email status
- Improve email status display with new/modified indicators
- Update translations for email status messages

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-29 23:05:57 +01:00
Knee Cola
b20d68405c refactor: improve email status display and messaging
LocationCard:
- Include email status in card info section display condition
- Remove emoji suffixes (icons already convey status visually)

LocationEditForm:
- Enable autoBillFwd and rentDueNotification toggles
- Only show email status when displayed email matches saved email
- Show unverified status when email is changed or for new emails
- Remove emoji suffixes from status messages
- Add left margin to status display

Messages (EN/HR):
- More descriptive email status messages in both languages
- LocationCard: "tenant email not verified" vs "Email not verified"
- LocationEditForm: Clearer explanations like "this e-mail address
  will need to be verified by the tenant"

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-29 21:58:02 +01:00
Knee Cola
fea0f48cec fix: include tenantEmail and tenantEmailStatus in fetchAllLocations projection
Added tenantEmail and tenantEmailStatus fields to the MongoDB projection
in fetchAllLocations() so LocationCard can display email status indicators.

Previously these fields were always undefined in LocationCard because they
weren't included in the aggregation pipeline's $project stage.

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-29 21:11:07 +01:00
Knee Cola
db9c57472d feat: add email status check to verify page
Security Enhancement:
- Server-side validation of email status before allowing verification
- Only allow verifying emails in VerificationPending state
- Show "Action not possible" message for invalid states
- Extract and validate share-id on server side
- Return 404 for invalid share-ids or missing tenant emails

Implementation:
- Convert page.tsx to async server component
- Fetch location and check tenantEmailStatus
- Pass isPending prop to client component
- Add bilingual "not-allowed" translations (same as unsubscribe page)

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-29 20:54:14 +01:00
Knee Cola
ff6f8890c5 refactor: simplify unsubscribe "not-allowed" message
Make error message more generic and less specific:
- Change title from "Action Not Allowed" to "Action not possible"
- Simplify message to cover broader error cases
- Fix typo: "performe" → "performed"
- Apply same changes to Croatian version

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-29 20:44:58 +01:00
Knee Cola
5d1602df7f feat: add email verification check to unsubscribe page
Security Enhancement:
- Server-side validation of email status before allowing unsubscribe
- Only allow unsubscribing from verified emails
- Show "Action Not Allowed" message for unverified/unsubscribed emails
- Extract and validate share-id on server side
- Return 404 for invalid share-ids or missing tenant emails

Implementation:
- Convert page.tsx to async server component
- Fetch location and check tenantEmailStatus
- Pass isVerified prop to client component
- Add bilingual "not-allowed" translations

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-29 20:33:16 +01:00
Knee Cola
bc7b28e6e9 refactor: improve email verification/unsubscribe UI and messaging
UI Improvements:
- Add spacing (mb-3) to card titles
- Increase heading font size (text-lg) for better hierarchy

Content Updates:
- Rebrand from "Evidencija Režija" to "rezije.app"
- Clarify success message: "subscribed to receive notifications"
- Improve opt-out description wording
- Fix Croatian grammar and phrasing
- Update unsubscribe page title for clarity

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-29 20:26:35 +01:00
Knee Cola
6eee14d0c3 feat: add email sending test script
Add sent-mail-tester.mjs for testing email functionality

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-29 19:49:28 +01:00
Knee Cola
db92d157c5 feat: create email-server-worker workspace
Initialize workspace for email server worker service
- Polls MongoDB for email status changes
- Sends verification and notification emails
- Updates email statuses
- Runs as standalone background worker

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-29 19:47:13 +01:00
Knee Cola
1666394435 feat: add mailgun-webhook to VSCode workspace
Add new mailgun-webhook folder to workspace configuration

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-29 19:06:22 +01:00
Knee Cola
8eb4aec3b7 fix: remove unused currentLocale variable in LocationCard
Remove unused import to resolve TypeScript warning [6133]

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-29 18:51:45 +01:00
Knee Cola
c81c182806 feat: create mailgun-webhook workspace
Initialize empty workspace for Mailgun webhook handler service
- Processes email verification and status updates
- Communicates with web-app via shared MongoDB
- Handles Mailgun webhook events

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-29 18:51:04 +01:00
Knee Cola
92ecd7f18e feat: add email status indicators to LocationEditForm
- Display all email statuses (Unverified, VerificationPending, Verified, Unsubscribed)
- Show appropriate icons and colors for each status
- Add bilingual translations for status labels
- Use UTF-8 emojis (⚠️   ✉️) alongside Heroicons
- Position indicator before tenantEmail-error div

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-29 18:35:27 +01:00
Knee Cola
8bed381f36 feat: add email status indicators to LocationCard
- Display email status when not Verified
- Show appropriate icons and colors for each status
- Add bilingual translations for status labels
- Use UTF-8 emojis (⚠️  ✉️) alongside Heroicons

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-29 18:33:37 +01:00
Knee Cola
0f06394984 feat: implement email unsubscribe page
- Create /email/unsubscribe/[id] route with page and component
- Add share-id validation and 404 on invalid links
- Add bilingual translations (English/Croatian)
- Implement unsubscribe UI with success/error states
- Call unsubscribeTenantEmail server action on button click

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-29 18:32:04 +01:00
Knee Cola
2bc7bcdc1e feat: implement email verification page
- Create /email/verify/[id] route with page and component
- Add share-id validation and 404 on invalid links
- Add bilingual translations (English/Croatian)
- Implement verification UI with success/error states
- Call verifyTenantEmail server action on button click

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-29 18:16:44 +01:00
Knee Cola
c1d3026f4b feat: implement email verification and unsubscribe DB logic
- Export EmailStatus enum from db-types.ts
- Add verifyTenantEmail server action
- Add unsubscribeTenantEmail server action
- Both actions update current and all subsequent matching locations
- Match criteria: userId, name, tenantEmail, yearMonth >= current
- Share-id validation using existing shareChecksum utilities

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-29 18:13:41 +01:00
Knee Cola
a51476d82b docs: clarify email verification implementation details
- Added DB integration details for external email system
- Clarified share-id validation (404 on invalid)
- Enhanced subsequent matching to include tenantEmail
- Specified exact UI placement for email status indicators
- Fixed typo: EmailStatus.Verifies → EmailStatus.Verified

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-29 18:01:10 +01:00
Knee Cola
1cafe33386 (prompt) written prompt for implementing e-mail confirmation and unsubscribe 2025-12-29 17:37:25 +01:00
Knee Cola
7a0370da9b (refactor) db-types: removed unused e-mail statuses 2025-12-29 17:36:51 +01:00
Knee Cola
ddf83fe0e5 (refactor) InfoBox: setting max width 2025-12-29 13:33:09 +01:00
Knee Cola
52662e0fb3 feat: add email status tracking for tenant emails
Add EmailStatus enum and tracking fields to BillingLocation to support
email delivery monitoring (bounces, complaints, unsubscribes).

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-27 10:41:46 +01:00