The Problem:
The @update:open="closeDeleteDialog" was being called when the dialog closed for ANY reason, including clicking the Delete button. This cleared taskTypeToDelete BEFORE confirmDelete could use it.
The Fix:
Changed to: @update:open="(open) => { if (!open) closeDeleteDialog() }"
Now it only clears the value when the dialog is actually closing (open becomes false), not during the delete action.
Expected Behavior:
- ✓ Click Delete button → Dialog opens with task type name
- ✓ Click Delete in dialog → API call includes task type in URL
- ✓ Success → Dialog closes and list updates
- ✓ Click Cancel → Dialog closes and clears state
Test in Frontend:
- Go to Project Settings → Custom Task Types
- Add a test task type (e.g., "test_fix")
- Click the delete button for that task type
- Open browser DevTools Network tab
- Click "Delete" in the confirmation dialog
- Check the DELETE request URL - it should now include the task type name
Expected URL:
✓ /projects/1/custom-task-types/test_fix?category=asset
Previous (Wrong) URL:
✗ /projects/1/custom-task-types/?category=asset