Skip to content

Commit

Permalink
fix:input param in useCheckingUnsavedChanges[WTEL-3904]
Browse files Browse the repository at this point in the history
  • Loading branch information
Lera24 committed Jan 29, 2024
1 parent 01ec4bc commit bafe9a8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
4 changes: 1 addition & 3 deletions src/app/composables/useCheckingUnsavedChanges.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@ import { useStore } from 'vuex';
import getNamespacedState
from '@webitel/ui-sdk/src/store/helpers/getNamespacedState';

export const useCheckingUnsavedChanges = (namespace) => {
const store = useStore();
const itemInstance = computed(() => getNamespacedState(store.state, namespace).itemInstance);
export const useCheckingUnsavedChanges = (itemInstance) => {
const isConfirmationUnsavedChangesPopup = ref(false);

function showConfirmationPopup(e) {
Expand Down
8 changes: 6 additions & 2 deletions src/modules/routing/modules/flow/components/opened-flow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,13 @@
</template>

<script>
import { computed } from 'vue';
import { mapActions, useStore } from 'vuex';
import { useVuelidate } from '@vuelidate/core';
import { required } from '@vuelidate/validators';
import WtSaveFailedPopup from '@webitel/ui-sdk/src/components/on-demand/wt-save-failed-popup/wt-save-failed-popup.vue';
import saveAsJSON from '@webitel/ui-sdk/src/scripts/saveAsJSON';
import { mapActions } from 'vuex';
import getNamespacedState from '@webitel/ui-sdk/src/store/helpers/getNamespacedState';
import openedObjectMixin from '../../../../../app/mixins/objectPagesMixins/openedObjectMixin/openedObjectMixin';
import JsonSchema from '../modules/code/components/opened-flow-code.vue';
import Diagram from '../modules/diagram/components/opened-flow-diagram.vue';
Expand All @@ -82,14 +84,16 @@ export default {
setup () {
const v$ = useVuelidate();
const store = useStore();
const itemInstance = computed(() => getNamespacedState(store.state, namespace).itemInstance);
const {
isConfirmationUnsavedChangesPopup,
displayConfirmationPopup,
addCheckingUnsavedChanges,
removeCheckingUnsavedChanges,
toggleIsConfirmationUnsavedChangesPopup,
} = useCheckingUnsavedChanges(namespace);
} = useCheckingUnsavedChanges(itemInstance);
return {
v$,
Expand Down

0 comments on commit bafe9a8

Please sign in to comment.