# Test Delete Dialog Fix

# Delete Dialog Fix Verification

### 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:

1. Go to Project Settings → Custom Task Types
2. Add a test task type (e.g., "test_fix")
3. Click the delete button for that task type
4. Open browser DevTools Network tab
5. Click "Delete" in the confirmation dialog
6. 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