mirror of
https://github.com/maziggy/bambuddy.git
synced 2026-10-18 21:47:39 +02:00
Clear all tag fields when deleting tag from spool
Delete Tag only cleared tag_uid, leaving tray_uuid, tag_type, and data_origin as stale data. Now sends all four fields as null.
This commit is contained in:
@@ -372,7 +372,7 @@ export function SpoolFormModal({
|
||||
|
||||
const deleteTagMutation = useMutation({
|
||||
mutationFn: () =>
|
||||
api.updateSpool(spool!.id, { tag_uid: null } as Parameters<typeof api.updateSpool>[1]),
|
||||
api.updateSpool(spool!.id, { tag_uid: null, tray_uuid: null, tag_type: null, data_origin: null } as Parameters<typeof api.updateSpool>[1]),
|
||||
onSuccess: async () => {
|
||||
await queryClient.invalidateQueries({ queryKey: ['inventory-spools'] });
|
||||
showToast(t('inventory.tagDeleted', 'Tag removed'), 'success');
|
||||
|
||||
Reference in New Issue
Block a user