diff --git a/src/components/RuleItem.vue b/src/components/RuleItem.vue index c1d53a8d..a979922a 100644 --- a/src/components/RuleItem.vue +++ b/src/components/RuleItem.vue @@ -314,7 +314,7 @@ async function archiveRule() { try { await RuleService.updateRule(rule, props.rule.ruleId) - await store.dispatch('rule/archiveRule', { rule }) + await store.dispatch('rule/fetchRules', { ruleGroupId: props.rule.ruleGroupId }) showToast(translate("Rule archived successfully.")) alertController.dismiss() } catch(err: any) { diff --git a/src/store/modules/rule/actions.ts b/src/store/modules/rule/actions.ts index 94267ffb..67f7e7aa 100644 --- a/src/store/modules/rule/actions.ts +++ b/src/store/modules/rule/actions.ts @@ -91,16 +91,6 @@ const actions: ActionTree = { commit(types.RULE_RULES_UPDATED, { list: payload.rules, total: payload.rules.length}); }, - archiveRule({ commit, state }, { rule }) { - const rules = JSON.parse(JSON.stringify(state.rules.list)) - - const index = rules.findIndex((currRule: any) => currRule.ruleId === rule.ruleId); - if (index !== -1) { - rules.splice(index, 1); - } - commit(types.RULE_RULES_UPDATED, { list: rules, total: state.rules.total - 1 }); - }, - async clearRuleState({ commit }) { commit(types.RULE_CLEARED) }, diff --git a/src/views/SafetyStock.vue b/src/views/SafetyStock.vue index 734de027..9d04f3ee 100644 --- a/src/views/SafetyStock.vue +++ b/src/views/SafetyStock.vue @@ -8,11 +8,11 @@ -
- +
+ -
+
diff --git a/src/views/Shipping.vue b/src/views/Shipping.vue index 269dfac3..4ff188d5 100644 --- a/src/views/Shipping.vue +++ b/src/views/Shipping.vue @@ -21,11 +21,11 @@
-