Commit Graph

178 Commits

Author SHA1 Message Date
SysAdmin Agent
55da366014 Fix GrampsWeb subpath: patch <base href> at container startup (STI-93)
Some checks failed
CI/CD Pipeline / test (push) Has been cancelled
CI/CD Pipeline / deploy (push) Has been cancelled
Code Quality / quality (push) Has been cancelled
The GrampsWeb SPA has <base href="/"> hardcoded at build time, causing
assets to load from / instead of /ahnenforschung/ when behind a reverse
proxy. Instead of relying on nginx sub_filter (which may not be available),
patch the HTML at container startup via GRAMPSWEB_SUBPATH env var.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-24 02:37:53 +00:00
SysAdmin Agent
66ccdc793c Fix compose.dev.yml: declare missing gramps_data_dev volume (STI-93)
Some checks failed
CI/CD Pipeline / test (push) Has been cancelled
CI/CD Pipeline / deploy (push) Has been cancelled
Code Quality / quality (push) Has been cancelled
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-24 01:30:58 +00:00
SysAdmin Agent
cee51ccec2 Fix deploy.sh: auto-update nginx config on deploy (STI-93)
Some checks failed
CI/CD Pipeline / test (push) Has been cancelled
CI/CD Pipeline / deploy (push) Has been cancelled
Code Quality / quality (push) Has been cancelled
deploy.sh was only updating Docker containers but never copying the
nginx config to the host. This meant changes like the sub_filter fix
for GrampsWeb's <base href> rewrite were never applied.

Now diffs deploy-production/nginx.conf against /etc/nginx/sites-enabled/stiftung
and reloads nginx when changed.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-24 00:25:55 +00:00
SysAdmin Agent
951c434ef2 Fix GrampsWeb subpath: use nginx sub_filter for <base href> rewrite (STI-93)
Some checks failed
CI/CD Pipeline / deploy (push) Has been cancelled
CI/CD Pipeline / test (push) Has been cancelled
Code Quality / quality (push) Has been cancelled
GrampsWeb's SPA has <base href="/"> hardcoded at build time. The
GRAMPSWEB_BASE_URL env var is a full URL for API/OIDC, not a path prefix.
This means assets always load from root, hitting Django instead of GrampsWeb.

Fix: nginx sub_filter rewrites <base href="/"> to <base href="/ahnenforschung/">
so the browser resolves all SPA assets under the correct subpath.

Also revert BASE_URL default to a proper URL (not a path).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 23:23:28 +00:00
SysAdmin Agent
b257fc090f Fix GrampsWeb: set BASE_URL default to /ahnenforschung for subpath (STI-93)
Some checks failed
CI/CD Pipeline / deploy (push) Has been cancelled
CI/CD Pipeline / test (push) Has been cancelled
Code Quality / quality (push) Has been cancelled
The SPA needs GRAMPSWEB_BASE_URL=/ahnenforschung to generate correct
asset URLs when served behind nginx at /ahnenforschung/. Without this,
JS/CSS assets load from / instead of /ahnenforschung/, causing a blank page.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 22:11:58 +00:00
SysAdmin Agent
5afa6e0ce1 Fix env-template: GRAMPSWEB_BASE_URL korrekt auf /ahnenforschung setzen (STI-91)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-23 21:10:58 +00:00
SysAdmin Agent
7c7dd6ed1c Fix GrampsWeb dev config: remove broken STATIC_PATH/STATIC_URL (STI-93)
Some checks failed
CI/CD Pipeline / test (push) Has been cancelled
CI/CD Pipeline / deploy (push) Has been cancelled
Code Quality / quality (push) Has been cancelled
Mirror the production fix from fd626a9 in compose.dev.yml. The
GRAMPSWEB_STATIC_PATH was set to a URL path instead of a filesystem path,
causing 404 on all routes. BASE_URL simplified to / (nginx handles subpath).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 21:07:41 +00:00
SysAdmin Agent
fd626a9c66 Fix GrampsWeb: remove broken STATIC_PATH/STATIC_URL config (STI-90)
Some checks failed
CI/CD Pipeline / test (push) Has been cancelled
CI/CD Pipeline / deploy (push) Has been cancelled
Code Quality / quality (push) Has been cancelled
GRAMPSWEB_STATIC_PATH was set to /ahnenforschung/static (a URL path)
instead of a filesystem path, causing GrampsWeb to return 404 on all
routes. Removed STATIC_PATH and STATIC_URL (defaults work correctly)
and simplified BASE_URL to /.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 21:02:01 +00:00
SysAdmin Agent
5807bf85f1 GrampsWeb Phase 1: Production Compose, Reverse Proxy & Deployment (STI-91)
- Fix grampsweb port mapping: 8090:80 → 8090:5000 (gunicorn, not nginx)
- Add full subpath ENV vars: GRAMPSWEB_TREE, BASE_URL, STATIC_PATH, STATIC_URL
- Add Celery/Redis config: broker_url, result_backend, ratelimit storage
- Add GRAMPSWEB_NEW_DB_BACKEND=sqlite
- Add depends_on: redis and restart: unless-stopped
- Add GRAMPS_URL/USERNAME/PASSWORD/API_TOKEN to web service for Django integration
- Add nginx.conf with /ahnenforschung/ reverse proxy route (proxy to localhost:8090)
- Add GRAMPSWEB_STATIC_PATH and GRAMPSWEB_STATIC_URL to env-template.txt

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-21 23:47:52 +00:00
SysAdmin Agent
f893172a2b GrampsWeb Phase 1: Sidebar-Link, Settings-Fix & Env-Template (STI-90)
- Fix GRAMPS_URL default port from 80 to 5000 to match dev compose
- Add "Ahnenforschung" sidebar link in navigation (links to /ahnenforschung/)
- Update env-template with all GRAMPSWEB_* variables for production setup

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-21 23:40:55 +00:00
SysAdmin Agent
4d751d861d DSGVO-Compliance: Einwilligung, Datenschutzerklärung & Consent-Logging im Upload-Portal (STI-89)
Some checks failed
CI/CD Pipeline / test (push) Has been cancelled
Code Quality / quality (push) Has been cancelled
CI/CD Pipeline / deploy (push) Has been cancelled
- Datenschutzerklärung unter /portal/datenschutz/ öffentlich erreichbar
- Link zur Datenschutzerklärung in Nachweis-Aufforderungs-E-Mails (HTML + TXT)
- Einwilligungs-Checkbox vor Upload mit Server-Side-Validierung
- Consent-Logging: einwilligung_erteilt_am auf UploadToken (Art. 7 Abs. 1 DSGVO)
- Regelsatz-Korrektur: 449€→563€ in Onboarding-Template (Stand 01/2024)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-21 22:43:01 +00:00
SysAdmin Agent
f7c122515f Fix MCP config: replace hardcoded token with env-var wrapper script
Some checks failed
CI/CD Pipeline / test (push) Has been cancelled
CI/CD Pipeline / deploy (push) Has been cancelled
Code Quality / quality (push) Has been cancelled
MCP_AUTH_TOKEN was stored in plain text in .mcp.json and thus in git
history. Now connect.sh reads the token from the environment variable
MCP_AUTH_TOKEN — set via export in ~/.bashrc or a secrets manager.

⚠️ Old token is in git history and should be rotated on the server.
Rotate: python manage.py create_agent_token <username>

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-21 22:05:21 +00:00
SysAdmin Agent
5f1a3fd27d Add MCP server for AI-assisted Stiftung data access
Some checks failed
CI/CD Pipeline / test (push) Has been cancelled
CI/CD Pipeline / deploy (push) Has been cancelled
Code Quality / quality (push) Has been cancelled
Provides a Model Context Protocol server exposing read-only tools
for Destinatäre, Ländereien, Pächter, Konten, Transaktionen and more.
Includes SSH-based remote connection config in .mcp.json.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-21 22:02:16 +00:00
SysAdmin Agent
33ca6c0a1c Fix CI/CD: export APP_VERSION before docker-compose build
Ensures APP_VERSION is available as an environment variable
when docker-compose starts, so containers pick up the correct version.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-21 22:02:11 +00:00
SysAdmin Agent
3200ff7563 Add Anrede field to Destinatär model (STI-86)
Adds optional salutation (Herr/Frau/Divers) to the Destinatär model
with migration, form support, admin integration and template display.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-21 22:02:07 +00:00
SysAdmin Agent
fe2c657586 Fix Vorlagen editor: drop Summernote, use code editor for all templates (STI-82)
Some checks failed
CI/CD Pipeline / test (push) Has been cancelled
CI/CD Pipeline / deploy (push) Has been cancelled
Code Quality / quality (push) Has been cancelled
Summernote WYSIWYG was mangling Django template syntax ({{ }}, {% %})
on save, causing content to revert to corrupted state. Switched all
template types to the plain code editor textarea which preserves
content exactly as-is.

Also removed jQuery/Summernote JS dependencies from the editor page,
and fixed getEditorContent reference in preview code.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-21 21:55:17 +00:00
SysAdmin Agent
b8fb35db7a Fix Bestätigung email: send synchronously for immediate error feedback (STI-77)
Some checks failed
CI/CD Pipeline / test (push) Has been cancelled
CI/CD Pipeline / deploy (push) Has been cancelled
Code Quality / quality (push) Has been cancelled
The Bestätigung email was sent via Celery task (fire-and-forget), so the UI
always showed "wird gesendet" even when the task failed silently in the worker.
Now sends synchronously from the web process (matching the working test email
pattern) with proper error display to the user.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-21 21:48:30 +00:00
SysAdmin Agent
d7992558ee Fix Vorlagen preview: use click handler instead of Bootstrap tab event (STI-82)
The shown.bs.tab event never fired, leaving the preview spinner forever.
Switched to a direct click handler with setTimeout for reliability.
Also added explicit credentials and HTTP error handling to the fetch.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-21 21:42:56 +00:00
SysAdmin Agent
31bf348136 fix: Add media_files volume to worker service (STI-84)
Celery worker was missing the media_files:/app/media volume mount,
causing DMS files saved by background tasks (email attachments,
Bestätigungsschreiben PDFs) to land in ephemeral container storage
instead of the persistent named volume. After any container restart,
these files were lost while DB records remained → Http404.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-21 21:36:22 +00:00
SysAdmin Agent
4e9fe816d5 Fix version display: show actual version instead of 'vunknown'
Root cause: Dockerfile build context is ./app/ but VERSION file is at
repo root, so it's excluded from the Docker image. The context processor
tried parent.parent.parent which resolves to / inside the container.

Fix:
- Context processor now checks APP_VERSION env var first, then tries
  multiple file paths (repo root for local dev, app/ dir for Docker)
- Dockerfile accepts APP_VERSION build arg and sets it as ENV
- compose.yml passes APP_VERSION build arg to all service builds

Note: Deploy script needs `export APP_VERSION=$(cat VERSION)` before
docker-compose build for the build arg to pick up the version.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-21 21:11:52 +00:00
SysAdmin Agent
59e05856b4 Improve email test: prominent card, HTML email, 'An mich' button
- Move test email form to a standalone card at the top of the page
  (was buried at the bottom of SMTP settings)
- Add 'An mich' button that fills in the logged-in user's email
- Send HTML + plain text test email (multi-alternative) styled like
  actual Stiftung emails, instead of plain text only
- Include diagnostic info (SMTP server, sender, user) in test email

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-21 21:07:36 +00:00
SysAdmin Agent
0e129ae56a Fix Vorlagen editor: working preview tab and improved layout
- Fix preview bug: preview event handlers were never attached when
  Summernote failed to load (fallback returned early at line 240)
- Restructure layout with Bootstrap tabs (Editor | Vorschau) instead
  of stacked editor+hidden preview
- Preview loads automatically when switching to the Vorschau tab
- Editor content getter works in all modes (Summernote, code, fallback)
- Editor now uses full viewport height for more editing space
- Variables sidebar gets 3 cols (was 4) giving editor 9 cols (was 8)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-21 21:04:30 +00:00
SysAdmin Agent
4ef09750d6 Remove 'Abgeschlossen' from payment pipeline, make 'Überwiesen' the final step
The 'Abgeschlossen' column was redundant after 'Überwiesen' since no further
action occurs after a payment is transferred. The pipeline is now 4 stages:
Offen → Nachweis eingereicht → Freigegeben → Überwiesen.

Existing 'abgeschlossen' records are merged into the 'Überwiesen' column.
Financial reports and queries are unaffected as they already include both statuses.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-21 20:59:42 +00:00
SysAdmin Agent
7c7bd73404 Add vendor static files for Vorlagen editor (jQuery, Summernote)
Some checks failed
CI/CD Pipeline / test (push) Has been cancelled
CI/CD Pipeline / deploy (push) Has been cancelled
Code Quality / quality (push) Has been cancelled
These are required for the WYSIWYG template editor to work.
Without them, Summernote doesn't load and the preview button is non-functional.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-21 09:28:12 +00:00
SysAdmin Agent
aed540fe4b Add Vorlagen editor, upload portal, onboarding, and participant import command
Some checks failed
CI/CD Pipeline / test (push) Has been cancelled
CI/CD Pipeline / deploy (push) Has been cancelled
Code Quality / quality (push) Has been cancelled
- Dokument-Vorlagen-Editor: create/edit/reset document templates (admin)
- Upload-Portal: public portal for Nachweis uploads via token
- Onboarding: invite Destinatäre via email with multi-step wizard
- Bestätigungsschreiben: preview and send confirmation letters
- Email settings: SMTP configuration UI
- Management command: import_veranstaltung_teilnehmer for bulk participant import

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-21 09:25:18 +00:00
SysAdmin Agent
fdf078fa10 Add MCP tools for Veranstaltung participant management
Some checks failed
CI/CD Pipeline / test (push) Has been cancelled
CI/CD Pipeline / deploy (push) Has been cancelled
Code Quality / quality (push) Has been cancelled
- veranstaltungen_anzeigen: list events with participant counts
- veranstaltung_teilnehmer_anzeigen: list participants by event
- veranstaltung_teilnehmer_anlegen: add single participant
- veranstaltung_teilnehmer_importieren: bulk import via JSON array

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-21 09:15:35 +00:00
SysAdmin Agent
e0b377014c v4.1.0: DMS email documents, category-specific Nachweis linking, version system
Some checks failed
CI/CD Pipeline / test (push) Has been cancelled
CI/CD Pipeline / deploy (push) Has been cancelled
Code Quality / quality (push) Has been cancelled
- Save cover email body as DMS document with new 'email' context type
- Show email body separately from attachments in email detail view
- Add per-category DMS document assignment in quarterly confirmation
  (Studiennachweis, Einkommenssituation, Vermögenssituation)
- Add VERSION file and context processor for automatic version display
- Add MCP server, agent system, import/export, and new migrations
- Update compose files and production environment template

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-15 18:48:52 +00:00
SysAdmin Agent
faeb7c1073 Implement modular report system with 6 report types and composer UI
Some checks failed
CI/CD Pipeline / test (push) Has been cancelled
CI/CD Pipeline / deploy (push) Has been cancelled
Code Quality / quality (push) Has been cancelled
Refactors the Berichte section from a single hardcoded Jahresbericht into
a modular report-building system. Jahresbericht now uses PDFGenerator for
corporate identity (logo, colors, headers/footers, cover page). 8 reusable
section templates can be freely combined. 6 predefined report templates
(Jahres-, Destinatär-, Grundstücks-, Finanz-, Förder-, Pachtbericht) with
HTML preview and PDF export. New Bericht-Baukasten UI lets users compose
custom reports from individual sections.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-14 20:55:31 +00:00
SysAdmin Agent
042114b1e7 Fix OGC API URL: Items → items (lowercase)
Some checks failed
CI/CD Pipeline / test (push) Has been cancelled
CI/CD Pipeline / deploy (push) Has been cancelled
Code Quality / quality (push) Has been cancelled
The OGC API endpoint is case-sensitive and requires lowercase 'items'.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 22:56:07 +00:00
SysAdmin Agent
cb3a75a5a8 Add ALKIS Kennzeichen field to land edit form template
The field was in the Django form but not rendered in the template.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 22:17:56 +00:00
SysAdmin Agent
dccd5e974f Add ALKIS Flurstückskennzeichen field for direct cadastre links
When an ALKIS identifier is set on a Land record, the button links to
ogc-api.nrw.de detail view instead of the imprecise TIM-Online search.
Falls back to TIM-Online when no ALKIS number is present.

Closes STI-57

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 21:57:27 +00:00
SysAdmin Agent
f1358d0131 Improve deploy.sh: show commit details, warn if unpushed
Some checks failed
CI/CD Pipeline / test (push) Has been cancelled
CI/CD Pipeline / deploy (push) Has been cancelled
Code Quality / quality (push) Has been cancelled
- Display current branch, local/remote main commit with message
- Warn if local main is ahead of Gitea remote
- Show last 5 commits on main before deploying
- Update server address to deployment@217.154.84.225

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 14:25:26 +00:00
SysAdmin Agent
7e42b50d5b Extend backup verification to include Vision 2026 tables
Add DokumentDatei, EmailEingang, Verwaltungskosten, and
GeschichteSeite to post-restore verification table checks.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 12:04:35 +00:00
SysAdmin Agent
7a9dc533c3 Show linked DMS documents on Verwaltungskosten edit page
- Display linked PDFs/documents in the edit form with download links
- Fix "Details ansehen" button to link to detail page
- Redirect edit save to detail page instead of list

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 11:46:58 +00:00
SysAdmin Agent
781d410f88 Fix DMS edit FieldError: use pachtbeginn instead of vertragsbeginn
LandVerpachtung model uses pachtbeginn, not vertragsbeginn.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 11:36:34 +00:00
SysAdmin Agent
d84421ea38 Add Verwaltungskosten detail view with linked documents and emails
- New detail view at /geschaeftsfuehrung/verwaltungskosten/<pk>/
  showing invoice data, status, linked DMS documents, and emails
- Status change form in sidebar for quick workflow updates
- Link Verwaltungskosten list items to detail page
- Update email detail to link to VK detail instead of edit

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 11:21:04 +00:00
SysAdmin Agent
5c9db56158 Fix DMS entity assignment and Geschichte document linking
- DMS edit view: add Destinatär, Land, Pächter, Verpachtung dropdowns
  so documents can be assigned to entities after upload
- Geschichte: add M2M dokumente field on GeschichteSeite model
- Geschichte form: checkboxes to select/link Stiftungsgeschichte docs
- Geschichte detail: show linked documents in sidebar with download

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 10:40:46 +00:00
SysAdmin Agent
e6f4c5ba1b Generalize email system with invoice workflow and Stiftungsgeschichte category
- Rename DestinataerEmailEingang → EmailEingang with category support
  (destinataer, rechnung, land_pacht, stiftungsgeschichte, allgemein)
- Add invoice capture workflow: create Verwaltungskosten from email,
  link DMS documents as invoice attachments, track payment status
- Add Stiftungsgeschichte email category with auto-detection patterns
  (Ahnenforschung, Genealogie, Chronik, etc.) and DMS integration
- Update poll_emails task with category detection and DMS context mapping
- Show available history documents in Geschichte editor sidebar
- Consolidate DMS views, remove legacy dokument templates
- Update all detail/form templates for DMS document linking
- Add deploy.sh script and streamline compose.yml

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 10:17:14 +00:00
SysAdmin Agent
f4fc512ad3 Fix email-Destinatär document linking and add email delete
- When manually assigning an email to a Destinatär, also update
  associated DokumentLink records so attachments appear in the
  Destinatär's Dokumente tab
- Add email delete functionality (view, URL, buttons in list and detail)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 07:57:25 +00:00
SysAdmin Agent
8c528308bd Redesign Destinataer create/edit form to mirror detail page layout
User requested the create form to look exactly like the detail page.
Now uses the same two-column table-based card layout with matching
card headers, gradient header bar, and field organization as the
Stammdaten tab on the detail page.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 22:11:17 +00:00
SysAdmin Agent
8ae7bff38c Modernize Destinataer create/edit form to match Vision 2026 style
Replace custom CSS (.form-section, gradients, var(--racing-green)) with
standard Bootstrap card-based layout matching the rest of the modernized UI:
dark card headers, responsive grid rows, consistent shadow-sm styling.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 22:06:07 +00:00
SysAdmin Agent
65e025d8c4 Fix Paperless upload: handle async task UUID response
Paperless-ngx post_document returns a task UUID string, not a document
ID directly. The code assumed it was a dict and called .get() on a
string, causing AttributeError. Now polls the task status endpoint to
retrieve the actual integer document ID.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 21:25:55 +00:00
SysAdmin Agent
83cf2798b1 Fix email fetch reliability for large emails with attachments
- Add 120s IMAP socket timeout (was unlimited, could hang on large emails)
- Increase Paperless upload timeout from 60s to 300s for large attachments
- Increase manual poll UI timeout from 60s to 300s
- Show error count in UI when emails fail to process
- Log warning when attachment payload is empty/corrupted

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 21:21:17 +00:00
SysAdmin Agent
2a7c9d8529 Add IMAP configuration UI and sidebar navigation for email inbox
- Email settings page at /administration/email/ with IMAP config form
- Connection test button to verify IMAP connectivity
- Sidebar link "E-Mail Eingang" for quick access
- AppConfiguration model extended with email category and password type
- init_config command includes IMAP default settings
- DB-based IMAP config with env var fallback

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 21:01:05 +00:00
SysAdmin Agent
96204c04dd Fix email poll: search all recent emails (not just UNSEEN) on manual trigger
The manual "Jetzt abrufen" button now runs synchronously and searches all
emails from the last 30 days instead of only unread ones. This fixes the
issue where already-read emails in IMAP were invisible to the poll task.
Duplicate detection (by sender+date+subject) prevents re-imports.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 21:00:50 +00:00
SysAdmin Agent
c3c6755027 Modernize Destinataer detail page: tabbed UI with integrated timeline
Replaces the old multi-card layout (1368 lines) with a compact, modern
tabbed interface (Stammdaten | Nachweise | Zahlungen | Timeline | Dokumente | Notizen).
All information is now accessible from one page without excessive clicking.

- Add timeline events to destinataer_detail view (merged from timeline view logic)
- Compact profile header with avatar initials, status badges, key contact info
- Inline editing preserved with table-based layout for cleaner data display
- Tab state persisted in URL hash for bookmarkable deep links
- Dropdown menu for less-used actions (export, archive, delete)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 20:55:21 +00:00
SysAdmin Agent
8e1db11f8d Fix NoReverseMatch in email_eingang views: add stiftung: namespace prefix
The redirect() calls in email_eingang_poll_trigger and email_eingang_detail
were missing the 'stiftung:' namespace prefix, causing NoReverseMatch errors.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 20:41:12 +00:00
SysAdmin Agent
b47ffd4a3c Fix Verpachtungen list + migrate legacy pacht data to LandVerpachtung
- Add migrate_to_landverpachtung management command that converts
  old Land-level pacht fields (aktueller_paechter, pachtbeginn, etc.)
  into proper LandVerpachtung records
- Fix SyntaxError in system.py (fancy Unicode quotes in f-strings)
- Ran migration: 1 LandVerpachtung record created for Jens Bodden

The old system stored pacht data directly on the Land model.
The new LandVerpachtung model supports multiple leases per Land.
The verpachtung_list view queries LandVerpachtung, which was empty.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 20:36:39 +00:00
SysAdmin Agent
cf127b043d Bug fixes + archive feature for Destinatäre
- Make Destinatär names clickable in list view (link to detail page)
- Nachweis-Board: auto-create missing VierteljahresNachweis records
  for active Destinatäre when viewing a year (fixes missing Q1 2026)
- Add archive/deactivate toggle for Destinatäre (button on detail page)
  with AuditLog entry and confirmation dialog
- Default Destinatär list to show active only (filter preset to "Aktiv")

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 20:07:30 +00:00
SysAdmin Agent
113bd53a3a Fix paechter_workflow FieldError: use correct related_name 'neue_verpachtungen'
The Paechter model's reverse relation from LandVerpachtung uses
related_name='neue_verpachtungen', not the default 'landverpachtung'.
Fixed the annotate() query in top_paechter section of paechter_workflow view.
2026-03-11 13:53:14 +00:00