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:
2026-04-10 20:37:38 +02:00
parent 968e17c6d6
commit d1ad0e1f89
2 changed files with 13 additions and 1 deletions

View File

@@ -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] })
},