fix: refresh assignable persons list after assignment and keep dialog open
Invalidate assignable-persons query cache in useAssignPersonToShift onSuccess so the list reflects the new assignment immediately. Keep the dialog open after assigning a person to allow sequential assignments, showing a brief success snackbar instead of closing. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -140,6 +140,7 @@ export function useAssignPersonToShift(eventId: Ref<string>) {
|
||||
},
|
||||
onSuccess: () => {
|
||||
queryClient.invalidateQueries({ queryKey: ['shift-assignments', eventId.value] })
|
||||
queryClient.invalidateQueries({ queryKey: ['assignable-persons'] })
|
||||
queryClient.invalidateQueries({ queryKey: ['shifts'] })
|
||||
queryClient.invalidateQueries({ queryKey: ['persons', eventId.value] })
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user