Post work PR #1743

This commit is contained in:
maziggy
2026-06-26 14:59:29 +02:00
parent 3ddf8d847e
commit 6f727d300a
5 changed files with 112 additions and 5 deletions
+4 -1
View File
@@ -953,7 +953,10 @@ export function HMSErrorModal({ printerName, errors, onClose, printerId, hasPerm
job_id: data.job_id,
}),
onSuccess: () => {
queryClient.invalidateQueries({ queryKey: ['printerStatus'] });
// Scope the invalidation to THIS printer. The prefix form
// `['printerStatus']` would refresh every printer card on the page,
// which is wasteful when only one printer's state actually changed.
queryClient.invalidateQueries({ queryKey: ['printerStatus', printerId] });
showToast(t('hmsErrors.actionSuccess', 'Action sent to printer'), 'success');
onClose();
},