Freigabe #4

Merged
bjoernpoettker merged 23 commits from Freigabe into main 2026-06-16 14:49:23 +00:00
Owner
No description provided.
bjoernpoettker added 23 commits 2026-06-16 14:49:17 +00:00
Adds a dedicated approval view for PM_Freigabe users to release documents
for payment by setting Paperless custom field 15 to a predefined value.

- Backend: VIEW_FREIGABE permission mapped to PM_Freigabe OIDC group
- Backend: FreigabeErforderlich flag on DocumentType entity (auto-migrated)
- Backend: FreigabeModule with endpoints to list documents, fetch field
  options dynamically from Paperless, and set the approval custom field
- Frontend: /freigabe route with filter (default: nicht freigegeben),
  paginated table, and modal to select approval value
- Frontend: Settings checkbox to mark document types as requiring approval
- Frontend: Freigabe menu item visible only to PM_Freigabe/PM_Admin users

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Merge remote-tracking branch 'origin/main' into Freigabe
Build and Push Multi-Platform Images / build-and-push (push) Successful in 34s
a0d67c7d1b
fix: handle object-format select_options from Paperless for Freigabe field
Build and Push Multi-Platform Images / build-and-push (push) Successful in 36s
d5bc1bcee0
Paperless may return extra_data.select_options as an array of objects
{id, label} instead of plain strings. This caused React error #31
when Ant Design tried to render an object as a child in the Select and
Table components.

- Backend: coerce option items to {id: string, label: string} regardless
  of whether Paperless returns strings or objects
- Frontend: normalize cf.value to a plain string before rendering or
  storing in state, guarding against object-typed values

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
fix: use manual res.json() in getNextJob to prevent double-response on 204
Build and Push Multi-Platform Images / build-and-push (push) Successful in 31s
4016802c1e
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
fix: import documents without buchungsDatum instead of skipping them
Build and Push Multi-Platform Images / build-and-push (push) Successful in 32s
036d135109
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
fix: load all correspondents instead of first 100 in Paperless API
Build and Push Multi-Platform Images / build-and-push (push) Successful in 31s
b4dd959b4a
Raised page_size from 100 to 9999 on GET /api/paperless/correspondents
so the FreigabePage can resolve all correspondent IDs to names.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
fix: correct polling conditions for eingangsDatum and buchungsDatum
Build and Push Multi-Platform Images / build-and-push (push) Successful in 38s
1698eba968
- Only set eingangsDatum when belegNummer is present
- Import documents when buchungsDatum is set (revert inverted condition)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
feat: tag documents as Posteingang when AM entry is missing during upload check
Build and Push Multi-Platform Images / build-and-push (push) Successful in 37s
e6436b2b9c
- Add agrarmonitor_tag_posteingang setting (default empty)
- When a document is not found in Agrarmonitor, move it back to Posteingang
  tag instead of skipping (if tagPosteingang is configured)
- Expose tagPosteingang in polling config API and settings UI

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
feat: skip documents still in Agrarmonitor Dateieingang during upload check
Build and Push Multi-Platform Images / build-and-push (push) Successful in 31s
55b30f1f39
- Before moving a document back to Posteingang, check if it's still
  waiting in the Agrarmonitor Dateieingang
- If yes: skip silently (upload is pending processing)
- If no: move to Posteingang tag as before
- Handle 401/403 by clearing the session and aborting the check

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
refactor: rename tagPosteingang to tagManuell for missing AM entries
Build and Push Multi-Platform Images / build-and-push (push) Successful in 34s
2444821c9e
- Renamed setting agrarmonitor_tag_posteingang → agrarmonitor_tag_manuell
- Documents not found in AM are now tagged as "Manuell bearbeiten"
  instead of being moved back to Posteingang

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
fix: also set tag 19 (Von AM zurück) when marking document as manual
Build and Push Multi-Platform Images / build-and-push (push) Successful in 32s
029d5b351f
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
feat: add daily digest email notification module
Build and Push Multi-Platform Images / build-and-push (push) Successful in 50s
52438ee11f
- New DailyDigestModule with scheduled summary email for open dashboard items
- Extract StatsService from StatsController for reuse in digest
- Add DailyDigestEnabled, UserEmail, UserPreferredUsername to UserSettings entity
- Sync email/username from OIDC token on each get/update call
- Add dailyDigestEnabled to UserSettingsDto and update API
- Notifications tab in UserSettingsPage with enable toggle and "Jetzt senden" button

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
feat: add clickable links to daily digest emails via APP_URL
Build and Push Multi-Platform Images / build-and-push (push) Successful in 34s
184ac3f5cc
- Read APP_URL and AGRARMONITOR_BASE_URL from config
- Render dashboard entries as clickable links in HTML digest email
- Add APP_URL and DAILY_DIGEST_CRON to .env.example and docker-compose.yml

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
fix: strip trailing slashes from APP_URL and AGRARMONITOR_BASE_URL
Build and Push Multi-Platform Images / build-and-push (push) Successful in 54s
15e06bd60f
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
feat: redesign daily digest email with card layout and timezone fix
Build and Push Multi-Platform Images / build-and-push (push) Successful in 33s
2747b0046a
- Replace table layout with modern card-based design per dashboard area
- Add icon, color accent, badge and "Öffnen" link per card
- Show summary bar with total open items count
- Fix cron timezone to Europe/Berlin

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
feat: filter digest tiles by user permissions and add import progress status
Build and Push Multi-Platform Images / build-and-push (push) Successful in 42s
4c75a1ded2
- Store UserGroups from OIDC in UserSettings entity, sync on each request
- Filter daily digest tiles based on user's permission groups
- Add in-memory job status tracking to EmailImportService
- Poll import job status in MailImportWizard and show progress in Spin tip

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
chore: apply ESLint auto-fix across entire backend
Build and Push Multi-Platform Images / build-and-push (push) Successful in 41s
dad0136365
Reformats code style (line breaks, indentation, type annotations)
without changing logic. Also includes minor feature additions bundled
in the same lint run (stats service, user-settings groups, agrarmonitor
polling improvements).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
feat: add Steuertags concept to separate workflow from content tags
Build and Push Multi-Platform Images / build-and-push (push) Successful in 38s
d96e06e86d
- New steuertag_ids setting to mark tags as workflow-only (not editable)
- DocumentEditModal shows only content tags (non-Steuertags) as editable chips
- Backend preserves Steuertags when saving document tag changes
- ManuellBearbeitenPage renders content tag chips under document title
- New Steuertags settings tab with multi-select and color preview

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Backend 958→0 errors, frontend 98→0 errors. Builds and tsc clean.

Echte Fixes:
- Auth: AuthenticatedUser/AuthenticatedRequest, JwtStrategy + alle 5
  Controller von `@Request() req: any` auf typisierten Request umgestellt
- Error-Handling: neuer getErrorMessage/Stack/Code/getResponseData-Helper;
  alle 50 `catch (err: any)`-Blöcke auf `unknown` + Helper umgestellt
- 24 echte Bugs: require-await, require-imports→ES-Imports, useless-escape,
  misused-promises, tote Imports/Vars, leere catch-Blöcke kommentiert
- document-pipeline: OCR-Ergebnis wird nicht gespeichert (als TODO markiert)

Pragmatisch auf warn herabgestuft (untypisierte Paperless-NGX-API):
no-unsafe-*, restrict-template-expressions, no-base-to-string,
no-explicit-any (FE), react-refresh/only-export-components

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
feat: auto-move imported emails to IMAP folder and add 90-day cleanup
Build and Push Multi-Platform Images / build-and-push (push) Successful in 41s
b1b30fe1dd
- New ImapFolderService moves emails to configurable "importiert" folder
  after successful import, creating the folder if it doesn't exist
- Daily cron at 03:00 moves emails older than 90 days to trash and empties it
- Extract createImapClient() helper in EmailDownloadService
- Add ensurePageCache() with in-flight deduplication to BarcodeScannerService
- InboxService regenerates page cache on-demand when image file is missing
- IMAP_IMPORTED_FOLDER and IMAP_TRASH_FOLDER added to .env.example and docker-compose

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This reverts commit b1b30fe1dd.
Revert "fix: resolve all ESLint errors in backend and frontend"
Build and Push Multi-Platform Images / build-and-push (push) Successful in 19s
66aeab282c
This reverts commit 07dfd7e840.
ci: add manual build workflow with custom image tag
Build and Push Multi-Platform Images / build-and-push (push) Successful in 11s
ef7813f9f9
New workflow_dispatch workflow to build & push backend/frontend images
with a manually chosen tag and service selection (both/backend/frontend).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
bjoernpoettker merged commit c665451abf into main 2026-06-16 14:49:23 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: bjoernpoettker/paperlessmanager#4