diff --git a/src/modules/configuration/modules/lookups/modules/slas/modules/conditions/components/opened-sla-condition-popup.vue b/src/modules/configuration/modules/lookups/modules/slas/modules/conditions/components/opened-sla-condition-popup.vue index 30420eed..71525544 100644 --- a/src/modules/configuration/modules/lookups/modules/slas/modules/conditions/components/opened-sla-condition-popup.vue +++ b/src/modules/configuration/modules/lookups/modules/slas/modules/conditions/components/opened-sla-condition-popup.vue @@ -92,7 +92,7 @@ const { const conditionId = computed(() => route.params.conditionId); const isNew = computed(() => conditionId.value === 'new'); -const { close } = useClose( `${CrmSections.SLAS}-conditions`); +const { close } = useClose(`${CrmSections.SLAS}-conditions`); function loadDataList() { emit('load-data'); diff --git a/src/modules/configuration/modules/lookups/modules/slas/modules/conditions/store/conditions.js b/src/modules/configuration/modules/lookups/modules/slas/modules/conditions/store/conditions.js index ddfe6b16..2f69e5ee 100644 --- a/src/modules/configuration/modules/lookups/modules/slas/modules/conditions/store/conditions.js +++ b/src/modules/configuration/modules/lookups/modules/slas/modules/conditions/store/conditions.js @@ -19,6 +19,12 @@ const resetTableState = { const resetCardState = { itemId: '', itemInstance: { + id: '', + name: '', + priorities: [], + reactionTime: 0, + resolutionTime: 0, + slaId: 0, }, }; @@ -26,6 +32,15 @@ const getters = { PARENT_ID: (s, g, rootState) => rootState.configuration.lookups.slas.card.itemId, }; +const actions = { + ADD_ITEM: async (context) => { + await context.dispatch('api/POST_ITEM', { context }); + }, + UPDATE_ITEM: async (context) => { + await context.dispatch('api/UPD_ITEM', { context }); + }, +} + const api = createApiStoreModule({ state: { api: ConditionsAPI, @@ -47,6 +62,7 @@ const table = createTableStoreModule({ const card = createCardStoreModule({ state: { _resettable: resetCardState }, getters, + actions, modules: { api, },