save attachment from email in customer data and - or contracts

This commit is contained in:
2026-02-03 23:58:00 +01:00
parent 9a014c100b
commit 97b4670643
8 changed files with 1037 additions and 11 deletions
+18
View File
@@ -158,6 +158,24 @@ router.get(
cachedEmailController.downloadAttachment
);
// Verfügbare Dokumenten-Ziele für Anhänge (zum Speichern)
// GET /api/emails/:id/attachment-targets
router.get(
'/emails/:id/attachment-targets',
authenticate,
requirePermission('customers:read'),
cachedEmailController.getAttachmentTargets
);
// Anhang in Dokumentenfeld speichern
// POST /api/emails/:id/attachments/:filename/save-to { entityType, entityId?, targetKey }
router.post(
'/emails/:id/attachments/:filename/save-to',
authenticate,
requirePermission('customers:update'),
cachedEmailController.saveAttachmentTo
);
// ==================== VERTRAGSZUORDNUNG ====================
// E-Mail Vertrag zuordnen