Skip to content

Commit

Permalink
Merge pull request #191 from webitel/feat/implement-redirect-to-creat…
Browse files Browse the repository at this point in the history
…e-catalog-page

feat: implement redirect to page for create service catalog [WTEL-564…
  • Loading branch information
stanislav-kozak authored Dec 13, 2024
2 parents e4ec70e + e93073b commit 1abe10c
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/app/router/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import CrmSections
from '@webitel/ui-sdk/src/enums/WebitelApplications/CrmSections.enum';
import { createRouter, createWebHistory } from 'vue-router';
import OpenedServiceCatalogs
from '../../modules/configuration/modules/lookups/modules/service-catalogs/components/opened-service-catalogs.vue';
import ContactCommunications
from '../../modules/contacts/components/opened-contact-communications.vue';
import OpenedContact
Expand Down Expand Up @@ -183,6 +185,11 @@ const routes = [
component: TheServiceCatalogs,
// beforeEnter: checkRouteAccess,
},
{
path: 'service-catalogs/:id',
name: `${CrmSections.SERVICE_CATALOGS}-card`,
component: OpenedServiceCatalogs,
},
],
},
],
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<template>
<wt-page-wrapper>
<template #header>
</template>
</wt-page-wrapper>
</template>

<script setup>
</script>

<style scoped lang="scss">
</style>
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
:image="imageEmpty"
:text="textEmpty"
:primary-action-text="primaryActionText"
@click:primary="addNewCatalog"
/>
</div>
</section>
Expand All @@ -36,15 +37,19 @@

<script setup>
import { useClose } from '@webitel/ui-sdk/src/composables/useClose/useClose.js';
import CrmSections from '@webitel/ui-sdk/src/enums/WebitelApplications/CrmSections.enum.js';
import { computed } from 'vue';
import { useI18n } from 'vue-i18n';
import { useTableStore } from '@webitel/ui-sdk/src/modules/TableStoreModule/composables/useTableStore.js';
import { useTableEmpty } from '@webitel/ui-sdk/src/modules/TableComponentModule/composables/useTableEmpty.js';
import { useRouter } from 'vue-router';
import filters from '../../slas/modules/filters/store/filters.js';
const baseNamespace = 'configuration/lookups/catalogs';
const { t } = useI18n();
const router = useRouter();
const path = computed(() => [
{ name: t('crm') },
Expand Down Expand Up @@ -78,4 +83,8 @@ const {
text: textEmpty,
primaryActionText,
} = useTableEmpty({ dataList, filters, error, isLoading });
const addNewCatalog = () => {
router.push({ name: `${CrmSections.SERVICE_CATALOGS}-card`, params: { id: 'new' }})
}
</script>

0 comments on commit 1abe10c

Please sign in to comment.