Email-Anhänge als Vertragsdokumente + Rechnungen für alle Vertragstypen
Der SaveAttachmentModal hat jetzt drei Modi (wenn E-Mail einem Vertrag zugeordnet ist): 1. Als Dokument – in feste Slots (Kündigungsschreiben etc.), unverändert 2. Als Vertragsdokument – NEU: flexible ContractDocument-Tabelle mit Typ-Dropdown (Auftragsformular, Lieferbestätigung, Vertragsunterlagen, Vollmacht, Widerrufsbelehrung, Preisblatt, Sonstiges) + optionalen Notizen 3. Als Rechnung – jetzt für ALLE Vertragstypen (vorher nur Strom/Gas) Backend: - Neuer Endpoint POST /api/emails/:id/attachments/:filename/save-as-contract-document - saveAttachmentAsInvoice + saveEmailAsInvoice: ELECTRICITY/GAS-Einschränkung entfernt, nutzt jetzt addInvoiceByContract als Fallback für Nicht-Energie-Verträge Frontend: - cachedEmailApi.saveAttachmentAsContractDocument hinzugefügt - SaveAttachmentModal: neuer Mode 'contractDocument' mit Typ+Notizen - Mode-Toggle zeigt jetzt alle drei Optionen wenn Vertrag zugeordnet Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -203,6 +203,15 @@ router.post(
|
||||
cachedEmailController.saveAttachmentAsInvoice
|
||||
);
|
||||
|
||||
// Anhang als Vertragsdokument speichern
|
||||
// POST /api/emails/:id/attachments/:filename/save-as-contract-document { documentType, notes? }
|
||||
router.post(
|
||||
'/emails/:id/attachments/:filename/save-as-contract-document',
|
||||
authenticate,
|
||||
requirePermission('contracts:update'),
|
||||
cachedEmailController.saveAttachmentAsContractDocument
|
||||
);
|
||||
|
||||
// ==================== VERTRAGSZUORDNUNG ====================
|
||||
|
||||
// E-Mail Vertrag zuordnen
|
||||
|
||||
Reference in New Issue
Block a user