diff --git a/src/views/dashboards/superUserDashboard/InvoicingBillingPeriod/components/InvoicingPeriodObjectTree.vue b/src/views/dashboards/superUserDashboard/InvoicingBillingPeriod/components/InvoicingPeriodObjectTree.vue index 0090c8f7..dca24f89 100644 --- a/src/views/dashboards/superUserDashboard/InvoicingBillingPeriod/components/InvoicingPeriodObjectTree.vue +++ b/src/views/dashboards/superUserDashboard/InvoicingBillingPeriod/components/InvoicingPeriodObjectTree.vue @@ -2046,6 +2046,7 @@ type TreeActionGroup = { type TreeActionRunOptions = { clearSelection?: boolean; + consumedKeys?: any[]; }; const runActionWithPreview = async ( @@ -2092,11 +2093,11 @@ const runActionWithPreview = async ( await Swal.fire({ title: treeText("success.title", "Handling udført"), icon: "success", - timer: 1400, + timer: 600, showConfirmButton: false, }); if (activeSnapshot.value) { - await refreshSnapshotAfterMutation(); + await refreshSnapshotAfterMutation({ consumedKeys: options.consumedKeys ?? [] }); } emit("refresh"); } catch (error: any) { @@ -2570,7 +2571,7 @@ const deleteOrderItems = (ids: any[] = orderItemIds(), options: TreeActionRunOpt } }, true, - options + { ...options, consumedKeys: ids.map((id) => makeNodeId(TREE_NODE_TYPES.ORDER_ITEM, id)) } ); const deleteSelectedOrderItems = () => deleteOrderItems(orderItemIds());