fix: align frontend status types with API string enum serialization
ASP.NET serializes C# enums as strings by default ("Pending", "Active"),
but frontend types used numeric values (0, 1). Changed WorkTaskStatus and
NoteType to string values matching API output.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -5,7 +5,7 @@ import type { TaskNote } from '../types'
|
||||
export function useCreateNote() {
|
||||
const qc = useQueryClient()
|
||||
return useMutation({
|
||||
mutationFn: ({ taskId, content, type }: { taskId: number; content: string; type: number }) =>
|
||||
mutationFn: ({ taskId, content, type }: { taskId: number; content: string; type: string }) =>
|
||||
request<TaskNote>({ method: 'POST', url: `/tasks/${taskId}/notes`, data: { content, type } }),
|
||||
onSuccess: () => qc.invalidateQueries({ queryKey: ['tasks'] }),
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user