Aufgaben ohne Kunde/Vertrag anlegbar
ContractTask.contractId nullable (Migration). Neuer staff-only Endpoint POST /tasks fuer allgemeine Aufgaben ohne Vertrag/Kunde. Ohne Vertrag gibt es keinen Kunden -> visibleInPortal serverseitig immer false, Portal-Reply 403 bei contractloser Aufgabe, getAllTasks-Portal-Filter schliesst sie automatisch aus (kein contract-Match). Task-Modal (Mitarbeiter): Checkbox "Ohne Kunde (allgemeine Aufgabe)" blendet Kunden-/Vertragsauswahl UND "Im Kundenportal sichtbar" aus. Task-Liste zeigt solche Aufgaben als "Allgemeine Aufgabe (ohne Vertrag)" ohne Vertrags-Link/ Zum-Vertrag-Button. Verifiziert: contractlose Aufgabe -> contractId null, visibleInPortal erzwungen false (auch wenn true geschickt); mit Vertrag weiterhin waehlbar. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -1072,6 +1072,11 @@ export const contractTaskApi = {
|
||||
const res = await api.post<ApiResponse<ContractTask>>(`/contracts/${contractId}/tasks`, data);
|
||||
return res.data;
|
||||
},
|
||||
// Allgemeine Aufgabe ohne Vertrag/Kunde (nur Mitarbeiter).
|
||||
createGeneral: async (data: { title: string; description?: string }) => {
|
||||
const res = await api.post<ApiResponse<ContractTask>>(`/tasks`, data);
|
||||
return res.data;
|
||||
},
|
||||
update: async (taskId: number, data: { title?: string; description?: string; visibleInPortal?: boolean }) => {
|
||||
const res = await api.put<ApiResponse<ContractTask>>(`/tasks/${taskId}`, data);
|
||||
return res.data;
|
||||
|
||||
Reference in New Issue
Block a user