Commit Graph

346 Commits

Author SHA1 Message Date
Agent Zero a4560344c9 feat: phase 5 - mail plugin RBAC integration with delegate access levels (read/write/delete/full) 2026-07-16 00:34:36 +02:00
Agent Zero bb6466b53d feat: phase 4 - frontend groups UI, permission-matrix, usePermission hook, field-level permissions tab, authStore permissions 2026-07-15 23:27:11 +02:00
Agent Zero beaca24480 feat: phase 3 - field-level permissions with plugin field definitions, service-layer filtering, 20 core field definitions 2026-07-15 23:02:30 +02:00
Agent Zero 08fd3ab72c feat: phase 2 - migrate all route guards to require_permission (75 guards, 21 files) 2026-07-15 22:35:50 +02:00
Agent Zero 8ca6dfee88 fix: migration 0019 - add missing updated_at and deleted_at columns to roles table 2026-07-15 22:18:48 +02:00
Agent Zero ada5594ce5 fix: migration 0019 - remove updated_at from roles INSERT (roles table has no updated_at column) 2026-07-15 22:13:55 +02:00
Agent Zero 23e5cf1e15 fix: migration 0019 - use CAST(:perms AS jsonb) to avoid SQLAlchemy bind param collision with ::jsonb cast 2026-07-15 22:10:14 +02:00
Agent Zero 7bb0eb1941 fix: migration 0019 - use sa.text() with bindparams to avoid SQLAlchemy interpreting JSON colons as bind parameters 2026-07-15 22:06:24 +02:00
Agent Zero b490a62322 feat: granular RBAC system with user groups, deny-list, permission registry, system-admin, self-mod prevention 2026-07-15 21:59:45 +02:00
Agent Zero 905bc9b744 fix: correct migration 0018 revision id 2026-07-15 21:19:08 +02:00
Agent Zero 21f47b91dc fix: add missing created_at and deleted_at columns to notification_preferences
- Remove duplicate updated_at from NotificationPreference model (inherited from TimestampMixin)
- Add migration 0018 to add created_at and deleted_at columns
- Fixes 500 error on GET /notifications/types and /preferences
2026-07-15 21:13:32 +02:00
Agent Zero b0e987f790 feat: notification preferences system with plugin registry
- Add NotificationType and NotificationPreference models
- Add get_notification_types() to BasePlugin for plugin registration
- Add sync_notification_types() to PluginRegistry
- Update create_notification() to check user preferences (returns Notification|None)
- Add API endpoints: GET /types, GET /preferences, PATCH /preferences/{type_key}
- Add NotificationPreferenceUpdate schema
- Mail plugin registers 10 notification types with metadata
- Add Alembic migration 0017 for new tables + seed data
- Frontend: SettingsNotifications page with toggle switches
- Frontend: Settings tab, route, hooks for notification preferences
- i18n: notification settings keys (de/en)
2026-07-15 21:00:32 +02:00
Agent Zero c4d0ec6f7f feat: mail notification integration - 10 notification types
- mail_new: new mails during sync (max 10, then summary)
- mail_error: IMAP connection failure
- mail_auth: IMAP login failure
- mail_quota: mailbox quota >80% / >95% critical
- mail_sync_error: general sync failure per account
- mail_sent: mail sent confirmation
- mail_send_error: SMTP send failure
- mail_draft: draft saved confirmation
- mail_account: account inactive warning
- mail_folder: folder created/deleted confirmation
- All notifications non-critical (try/except wrapped)
- Import create_notification from app.core.notifications
2026-07-15 20:41:57 +02:00
Agent Zero f1a12092a0 feat: mail phase 4 - IMAP folder create/delete + auto-sync
- Add imap_create_folder() and imap_delete_folder() service functions
- Call IMAP CREATE/DELETE in folder create/delete endpoints
- Add auto_sync_all_accounts() background task (every 5 min)
- Start auto-sync loop on plugin activation via asyncio.create_task
- Frontend: working sync button with isSyncing state and toast feedback
- i18n: syncSuccess, syncFailed, syncing, autoSyncEnabled keys (de/en)
2026-07-15 20:28:11 +02:00
Agent Zero 4e100e9d33 feat: mail phase 3 - sorting (date/from/subject, asc/desc)
- Add sort_by and sort_order query params to list_mails endpoint
- Add deleted_at IS NULL filter to exclude soft-deleted mails
- Frontend: sort state in Mail.tsx, sort header bar in MailList
- Sort dropdown (Datum/Absender/Betreff) + asc/desc toggle
- fetchMails API accepts optional sortBy/sortOrder params
- i18n: 6 new sort keys (de/en)
2026-07-15 20:17:27 +02:00
Agent Zero ed1eec87dc feat: mail phase 2 - delete, move, drafts
- Add deleted_at field to Mail/MailAccount/MailFolder models
- Add DELETE /{mail_id} endpoint (soft-delete + IMAP EXPUNGE)
- Add POST /{mail_id}/move endpoint (IMAP UID MOVE + folder_id update)
- Add POST /drafts and PUT /drafts/{id} endpoints (save/edit drafts)
- Add imap_delete_mail() and imap_move_mail() service functions
- Add save_draft() and update_draft() service functions
- Frontend: deleteMail, moveMail, saveDraft, updateDraft API functions
- ComposeModal: draft mode with Save Draft button
- MailDetail: delete/move buttons, edit-draft for drafts
- Mail.tsx: bulk delete/move, move dropdown, draft handlers
- i18n: 13 new keys (de/en)
2026-07-15 19:44:46 +02:00
Agent Zero df83cee10c feat: mail phase 1 - HTML iframe display, bulk read/unread, IMAP flag sync
- Fix FlagUpdatePayload field names to match backend schema (is_seen/is_flagged)
- Replace dangerouslySetInnerHTML with sandboxed iframe (srcDoc, sandbox="")
- Add bulk mark read/unread with checkbox selection in MailList
- Add floating bulk action bar in Mail.tsx
- Add imap_sync_mail_flags() to push Seen/Flagged flags to IMAP server
- Call IMAP flag sync in PATCH /flags endpoint
- Add i18n keys for bulk actions (de/en)
2026-07-15 19:26:37 +02:00
Agent Zero 2108bdb9c2 feat: mail attachment support — sync, display, download, upload 2026-07-15 18:43:38 +02:00
Agent Zero de74429f4e feat: mobile-responsive mail plugin UI 2026-07-15 17:53:56 +02:00
Agent Zero 57b6df5357 fix: IMAP hierarchical folder sync, deduplication, folder tree display, resizable panel 2026-07-15 15:59:04 +02:00
Agent Zero e0975f4044 fix: mail UI German labels, multi-folder sync, account management, resizable panel fix 2026-07-15 14:36:45 +02:00
Agent Zero 0409a08002 feat(mail): resizable columns, account in folder tree, mail settings in CRM settings
- Add ResizablePanel component (components/ui/ResizablePanel.tsx) with
  drag-to-resize via mouse events, no external dependencies
- Replace fixed-width columns in Mail.tsx with ResizablePanel for all
  three panes (folder tree, mail list, mail detail)
- Remove account-select toolbar item from Mail.tsx; account selection
  is now integrated into the folder tree
- Restructure MailFolderTree to show mail accounts as top-level nodes
  with folders nested underneath, built from flat list via parent_id
- Add expand/collapse chevrons for accounts and folders with children
- Load folders for ALL accounts (not just selected one) so multi-account
  tree works
- Derive selectedAccountId from selected folder instead of separate
  account selector
- Add Mail tab to CRM Settings page (Settings.tsx) with 📧 icon
- Add /settings/mail route pointing to MailSettingsPage
- Update settings link in mail toolbar to point to /settings/mail
- Update no-accounts empty state link to /settings/mail
2026-07-15 13:37:22 +02:00
Agent Zero 5693fe1c3a fix: stabilize store functions with selectors to prevent infinite loop
- Use usePluginToolbarStore((s) => s.registerItems) selector pattern
- Remove store functions from useEffect dependency array
- Store functions are stable references from zustand selectors
2026-07-15 13:10:27 +02:00
Agent Zero 1f01f2182a fix: React infinite loop - use primitive deps for toolbar registration
- Replace selectedMail object with selectedMailId and selectedMailFlagged primitives
- Prevents useEffect infinite re-render loop
2026-07-15 13:03:36 +02:00
Agent Zero d82ca27fdc feat: move reply/forward/flag/event buttons to plugin toolbar
- Toolbar now includes context-aware mail action buttons
- Reply, Forward, Flag, Create Event disabled when no mail selected
- Buttons grouped: account | search | compose | mail-actions | tools
2026-07-15 12:55:41 +02:00
Agent Zero 56f624a073 feat: plugin ribbon toolbar + mail response fixes
- Add pluginToolbarStore for plugin toolbar item registration
- Add PluginToolbar component (slim ribbon bar under TopBar)
- Update AppShell to render PluginToolbar between TopBar and content
- Mail page registers toolbar items (account select, search, compose, sync, settings)
- Remove old mail top bar, use plugin toolbar instead
- Fix mail response: arrays for addresses, add from_name/body_html/sanitized_html/date
2026-07-15 12:22:14 +02:00
Agent Zero 6b6408fd25 fix: mail response fields - arrays for addresses, add from_name/body_html/sanitized_html/date
- to_addresses/cc_addresses/bcc_addresses now returned as arrays
- Added from_name, body_html, sanitized_html, date fields for frontend compatibility
2026-07-15 08:42:37 +02:00
Agent Zero be8a95995b fix: IMAP sync response parsing - extract bytearray from response lines
- aioimaplib returns bytes/bytearray lines, not tuples
- Find bytearray line containing the raw email data
2026-07-15 02:20:02 +02:00
Agent Zero 78478db625 fix: IMAP sync uid_fetch and response parsing
- Replace client.uid_fetch() with client.uid("fetch", ...) (aioimaplib API)
- Fix response parsing for aioimaplib Response object structure
2026-07-15 02:14:01 +02:00
Agent Zero 0d882eaca5 fix: mail plugin CSRF token handling and trailing slash
- Add CSRF token storage in sessionStorage (persists across reloads)
- Send X-CSRF-Token header on POST/PATCH/DELETE requests
- Store CSRF token on login, clear on logout
- Fix trailing slash in mail list API call (/mail/ -> /mail)
2026-07-15 01:54:11 +02:00
leocrm-bot a75665c1e6 docs: update test_report.md 2026-07-14 20:09:18 +02:00
leocrm-bot 6710480527 feat: report_generator core plugin — Jinja2 templates, CSV/Excel/JSON output, 8 API endpoints 2026-07-08 23:50:59 +02:00
leocrm-bot bb4b0ce514 feat: Core Plugin system — is_core flag, topological sort dependency resolution, deactivation protection 2026-07-07 07:44:02 +02:00
leocrm-bot 1694b14c55 docs: Core Plugin & Dependency concept — is_core flag, topological sort, report_generator, ERP roadmap 2026-07-07 07:16:11 +02:00
leocrm-bot ee4b16d98b fix: remove Users and Settings from sidebar navigation 2026-07-07 07:15:02 +02:00
leocrm-bot 02a0fde2e8 fix: use admin@media-on.de instead of .local (invalid TLD for email-validator) 2026-07-04 19:39:36 +02:00
leocrm-bot 6aa955a228 chore: update project_state.json — deployment verified healthy 2026-07-04 18:22:03 +02:00
leocrm-bot 047b59a1f3 fix: remove broken service re-exports from __init__.py — fixes ImportError on startup 2026-07-04 18:14:30 +02:00
Leopoldadmin 1c059369fc Fix: 0015 RLS migration idempotent — DROP POLICY IF EXISTS before CREATE POLICY 2026-07-04 08:12:39 +00:00
Leopoldadmin 7a42cf3457 i18n: Fix en.json — full content with address type keys, address UI labels, currencies/taxes/sequences add+confirmDelete 2026-07-04 07:19:36 +00:00
Leopoldadmin cbb67dac09 i18n: Fix de.json — full content with address type keys, address UI labels, currencies/taxes/sequences add+confirmDelete 2026-07-04 07:18:36 +00:00
Leopoldadmin fdf4ea4213 A: Remove address fields from ContactForm — addresses now via AddressList in detail view 2026-07-04 07:17:08 +00:00
Leopoldadmin 039a3e5a26 A: Remove address fields from CompanyForm — addresses now via AddressList in detail view 2026-07-04 07:17:07 +00:00
Leopoldadmin 49dca39511 i18n: Add address type keys, address UI labels, currencies/taxes/sequences add+confirmDelete to en.json 2026-07-04 07:17:07 +00:00
Leopoldadmin 15a1175bcb i18n: Add address type keys, address UI labels, currencies/taxes/sequences add+confirmDelete to de.json 2026-07-04 07:17:06 +00:00
Leopoldadmin bfd65af978 A: Fix hooks.ts — add address hooks (useAddresses, useCreateAddress, useUpdateAddress, useDeleteAddress), useUpdateSequence, useDeleteSequence, fix audit-log endpoint URL 2026-07-04 01:44:51 +00:00
Leopoldadmin e3f8543102 Update frontend/src/api/hooks.ts 2026-07-04 01:42:12 +00:00
Leopoldadmin a61531ca19 A: Add AddressList tab to ContactDetail.tsx 2026-07-04 01:42:11 +00:00
Leopoldadmin afb9e86c50 A: Add AddressList tab to CompanyDetail.tsx 2026-07-04 01:42:11 +00:00
Leopoldadmin d0375a990e A: Remove address fields from contact_service — dict, create, update 2026-07-04 01:42:11 +00:00