Skip to content

Commit

Permalink
refactor: now id transfers to popup by props [WTEL-4001]
Browse files Browse the repository at this point in the history
  • Loading branch information
VladimirBeria committed Nov 10, 2023
1 parent 42e678e commit 4fc9b15
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
</template>

<script setup>
import { useCardStore } from '@webitel/ui-sdk/src/modules/CardStoreModule/composables/useCardStore';
import { useI18n } from 'vue-i18n';
import RolesAPI from '../api/RolesAPI';
Expand All @@ -40,15 +39,18 @@ const props = defineProps({
required: true,
type: Object,
},
id: {
required: true,
type: String,
}
});
const emit = defineEmits(['input']);
const { t } = useI18n();
const baseNamespace = 'contacts';
const { id } = useCardStore(baseNamespace);
const loadRoles = (params) => RolesAPI.getList(id.value, { ...params, fields: ['id', 'name', 'user'] });
const loadRoles = (params) => RolesAPI.getList(props.id, { ...params, fields: ['id', 'name', 'user'] });
</script>

<style lang="scss" scoped>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
</template>
<template v-slot:main>
<grantee-select
:id="id"
:value="grantee"
@input="grantee = $event"
></grantee-select>
Expand All @@ -30,9 +31,10 @@
</template>

<script setup>
import { ref } from 'vue';
import { useVuelidate } from '@vuelidate/core';
import { required } from '@vuelidate/validators';
import { useCardStore } from '@webitel/ui-sdk/src/modules/CardStoreModule/composables/useCardStore';
import { ref } from 'vue';
import { useI18n } from 'vue-i18n';
import GranteeSelect from './grantee-select.vue';
Expand All @@ -48,6 +50,9 @@ const emit = defineEmits([
const { t } = useI18n();
const baseNamespace = 'contacts';
const { id } = useCardStore(baseNamespace);
const grantee = ref({});
const isLoading = ref(false);
Expand Down

0 comments on commit 4fc9b15

Please sign in to comment.