Commit Graph
23 Commits
Author SHA1 Message Date
bjoernpoettkerandClaude Opus 5.5 df50470e53 fix(paperless): documents.checksum für SHA-256 verbreitern
Build and Push Multi-Platform Images / build-and-push (push) Successful in 28s
Paperless-NGX ≥ 3.0 liefert original_checksum als SHA-256 (64 Zeichen).
Die lokale Spiegeltabelle documents hatte nur varchar(32), wodurch die
Nachbearbeitung mit „Data too long for column 'checksum'“ abbrach – nach
dem Setzen von Notizen, aber vor Fertig=1. Der Task wurde dadurch jede
Minute erneut verarbeitet und erzeugte doppelte Notizen.

- documents.checksum auf varchar(64) (Entity + Migration)
- Sync der Spiegeltabelle ist nicht mehr fatal: Fehler werden als
  Warnung geloggt, der Task wird trotzdem abgeschlossen

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 13:35:45 +01:00
bjoernpoettkerandClaude Opus 5.5 4f34855c12 fix(paperless): Anpassung an Paperless-NGX 3.4 (API v10)
Build and Push Multi-Platform Images / build-and-push (push) Successful in 31s
- Task-Status: getTask() normalisiert die paginierte v10-Antwort
  (status klein, result_data, related_document_ids). Bisher wurde jede
  Task als „nicht gefunden“ gelöscht, ohne Nachbearbeitung.
- Checksummen: Paperless ≥ 3.0 nutzt SHA-256 statt MD5. Duplikatprüfung
  umgestellt; Migration verbreitert Attachments.Checksum und berechnet
  Bestandswerte per SHA2() neu.
- Custom-Field-Suche über custom_field_query, der alte Filter wurde von
  Paperless ignoriert.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 20:15:01 +01:00
bjoernpoettkerandClaude Opus 5.5 797cbb9b71 fix(mail): Duplikate auch bei neu erzeugten PDFs erkennen
Build and Push Multi-Platform Images / build-and-push (push) Successful in 45s
Absender erzeugen PDFs beim erneuten Versand oft neu (andere
Erstellungszeit/Dokument-ID), dadurch unterscheidet sich die Checksumme
und die Duplikatprüfung griff nicht (z.B. Mail 7071 vs. 7072).

- Neuer Text-Fingerprint (SHA-256 über normalisierten PDF-Text via
  pdf-parse) in Attachments.ContentFingerprint, inkl. Migration und Index
- Wird beim Mail-Abruf berechnet; Altbestand füllt ein Hintergrund-
  Backfill beim Start auf, fehlende Werte werden bei Bedarf nachberechnet
- Duplikatprüfung und Import-Sperre berücksichtigen Anhänge mit gleichem
  Inhalt, die importiert sind oder gerade importiert werden
- Jest braucht für pdf-parse --experimental-vm-modules (test-Skripte)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-25 12:27:31 +02:00
bjoernpoettkerandClaude Opus 5 b7b65c64ae fix: Berechtigungen der Tagesübersicht, WebDAV-Ausbau, Tests instand gesetzt
Build and Push Multi-Platform Images / build-and-push (push) Successful in 55s
Die tägliche E-Mail-Zusammenfassung zeigte Nutzern Bereiche, für die sie
keine Berechtigung haben. Zwei unabhängige Ursachen:

- Das Backend prüfte weiterhin die Altgruppe PM_Belege. Die Umbenennung
  zu PM_Buchhaltung (ca1d371) war nur im Frontend angekommen, weshalb
  der Digest "Manuell bearbeiten" und "In Agrarmonitor" anbot, während
  die Oberfläche beide Bereiche sperrte.
- Der Cron-Versand wertet die Gruppen aus user_settings aus. Diese Spalte
  wurde nur beim Aufruf der Benutzereinstellungen gefüllt; entzogene
  Berechtigungen erreichten den Digest daher unter Umständen nie.

Behoben durch Angleichen des Gruppen-Mappings und den neuen
UserIdentitySyncService, der E-Mail, Benutzername und Gruppen bei jedem
authentifizierten Request aus dem Token spiegelt – ohne den Request zu
blockieren und ohne DB-Zugriff, solange sich das Token nicht ändert. Die
doppelte Identitätspflege im UserSettingsService entfällt.

WebDAV wird nicht eingesetzt und ist entfernt; Export-Ziele bieten nur
noch FTP. Damit verschwindet das ESM-Paket webdav, an dem zwei
Jest-Suites bereits beim Parsen scheiterten.

Veraltete Tests instand gesetzt: email.controller und settings.controller
mockten weniger Abhängigkeiten, als die Klassen inzwischen haben;
postprocessing.service.spec beschrieb noch das alte Regelmodell mit
Einzelfeldern statt FilterJson und ist gegen die heutige Filter-Engine
neu geschrieben (AND/OR, verschachtelte Gruppen, Fehlerprotokollierung).

Enthält außerdem den Arbeitsstand der E-Rechnungs-Mandantenzuordnung, da
sich beide Änderungen dieselben Dateien teilen (SettingsPage, package.json).

98 Tests in 12 Suites grün, Backend- und Frontend-Build sauber.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-01 00:06:50 +02:00
bjoernpoettkerandClaude Opus 4.8 9718d6888a feat: Webhook-Warteschlange in Datenbank persistieren
Build and Push Multi-Platform Images / build-and-push (push) Successful in 31s
Die Warteschlange liegt nicht mehr im Speicher, sondern in der neuen Tabelle
webhook_queue (Entity WebhookQueueItem, documentId als Primärschlüssel). So
überstehen ausstehende IDs einen Neustart und werden nach dem Boot
weiterverarbeitet.

- Neue Entity + Migration (CreateWebhookQueue); in data-source.ts/Barrel
  registriert. Dev: synchronize legt die Tabelle an; Prod: migrationsRun.
- enqueue nutzt INSERT IGNORE (atomar, race-sicher) -> Dedup über den PK.
- processQueue holt FIFO (createdAt ASC), entfernt die Zeile vor der
  Verarbeitung, arbeitet sequenziell (isProcessing-Guard).
- getStatus/queueSize lesen die DB-Anzahl. Controller awaitet enqueue.
- Unit-Test mit simuliertem FIFO-Repo: Dedup, Remove-on-start, Re-Enqueue,
  No-Parallel (deterministisch).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-29 17:54:16 +02:00
bjoernpoettkerandClaude Opus 4.8 41eed1871e fix: Produktions-Crash durch TypeORM-synchronize beheben
Build and Push Multi-Platform Images / build-and-push (push) Successful in 44s
NODE_ENV=production deaktiviert synchronize (zerstörerischer ADD/DROP-COLUMN-
Churn auf MariaDB, der die 8126-Byte-Zeilengröße sprengte) und aktiviert
migrationsRun. Neue data-source.ts als einzige Konfigquelle (Laufzeit + CLI),
Migrations-Workflow (generate/run/revert) inkl. dotenv ergänzt.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-18 09:27:04 +02:00
bjoernpoettkerandClaude Sonnet 4.6 dad0136365 chore: apply ESLint auto-fix across entire backend
Build and Push Multi-Platform Images / build-and-push (push) Successful in 41s
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>
2026-06-08 09:02:02 +02:00
bjoernpoettkerandClaude Sonnet 4.6 4c75a1ded2 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
- 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>
2026-06-05 16:29:56 +02:00
bjoernpoettkerandClaude Sonnet 4.6 52438ee11f feat: add daily digest email notification module
Build and Push Multi-Platform Images / build-and-push (push) Successful in 50s
- 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>
2026-05-28 15:57:10 +02:00
bjoernpoettkerandClaude Sonnet 4.6 37ffc6c13b feat: implement Freigabesystem for payment approval workflow
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>
2026-05-25 21:54:09 +02:00
bjoernpoettker f4131ebcf0 feat: add AgrarmonitorBetriebId to Client entity 2026-05-23 14:36:23 +02:00
bjoernpoettker 1ed3afd2e2 feat: add database indexes, implement CORS configuration, and lazy-load frontend routes
Build and Push Multi-Platform Images / build-and-push (push) Successful in 35s
2026-05-10 22:21:01 +02:00
bjoernpoettker aa4c181b0c perf: add database indexes, implement caching, enforce permission guards, and sanitize external URLs
Build and Push Multi-Platform Images / build-and-push (push) Successful in 48s
2026-05-10 22:01:06 +02:00
bjoernpoettker 351938aa5c feat: add email recipient history to user settings and implement management in InboxDetailPage
Build and Push Multi-Platform Images / build-and-push (push) Successful in 36s
2026-05-10 21:32:19 +02:00
bjoernpoettker 0318fe8e7a feat: add default label template setting and apply it to print dialog selection
Build and Push Multi-Platform Images / build-and-push (push) Successful in 35s
2026-05-09 12:41:05 +02:00
bjoernpoettker af2af83709 fix: change json column types to simple-json in barcode template and print job entities
Build and Push Multi-Platform Images / build-and-push (push) Successful in 29s
2026-05-09 06:47:19 +02:00
bjoernpoettker 80f862a0c0 feat: implement backend label print agent system for remote label rendering and job management
Build and Push Multi-Platform Images / build-and-push (push) Successful in 33s
2026-05-07 22:46:29 +02:00
bjoernpoettker d19fd266c7 feat: add configurable sender name and allow users to choose between system and personal SMTP accounts when sending emails
Build and Push Multi-Platform Images / build-and-push (push) Successful in 34s
2026-05-06 20:49:09 +02:00
bjoernpoettker 8212f733ab feat: implement AES-256-GCM encryption for SMTP passwords with environment-based key support
Build and Push Multi-Platform Images / build-and-push (push) Successful in 27s
2026-05-06 20:10:20 +02:00
bjoernpoettker a000e0f5c6 feat: add debug logging for SMTP configuration and detailed mail delivery status
Build and Push Multi-Platform Images / build-and-push (push) Failing after 34s
2026-05-06 19:48:29 +02:00
bjoernpoettker 13b07dfa71 feat: add functionality to manually split documents at specific pages via the UI and API
Build and Push Multi-Platform Images / build-and-push (push) Successful in 33s
2026-05-05 17:51:53 +02:00
bjoernpoettker 9a1095ad6e feat: implement region-based QR code scanning for inbox documents
Build and Push Multi-Platform Images / build-and-push (push) Successful in 33s
2026-05-04 21:39:32 +02:00
bjoernpoettker effdc5d59f Initial commit with Email Import Wizard and Task Processor updates 2026-05-04 08:02:11 +02:00