From 5cd7792701c2d389c477950d960778e95389abea Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 28 Dec 2025 18:05:29 +0000 Subject: [PATCH] Fix callback order and restore isConfirming flag Co-authored-by: katosdev <7927609+katosdev@users.noreply.github.com> --- frontend/components/WipeInventoryDialog.vue | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/frontend/components/WipeInventoryDialog.vue b/frontend/components/WipeInventoryDialog.vue index c4264fe5..fe082cef 100644 --- a/frontend/components/WipeInventoryDialog.vue +++ b/frontend/components/WipeInventoryDialog.vue @@ -82,12 +82,14 @@ const wipeLabels = ref(false); const wipeLocations = ref(false); const wipeMaintenance = ref(false); + const isConfirming = ref(false); registerOpenDialogCallback(DialogID.WipeInventory, () => { dialog.value = true; wipeLabels.value = false; wipeLocations.value = false; wipeMaintenance.value = false; + isConfirming.value = false; }); watch( @@ -103,7 +105,7 @@ ); function handleOpenChange(open: boolean) { - if (!open) { + if (!open && !isConfirming.value) { close(); } } @@ -114,12 +116,13 @@ } function confirm() { + isConfirming.value = true; const result = { wipeLabels: wipeLabels.value, wipeLocations: wipeLocations.value, wipeMaintenance: wipeMaintenance.value, }; - dialog.value = false; closeDialog(DialogID.WipeInventory, result); + dialog.value = false; }