Skip to content

Commit

Permalink
Merge pull request #152 from webitel/feature/add-slas-page
Browse files Browse the repository at this point in the history
feature: add router for slas, change locale, base store and component…
  • Loading branch information
Lera24 authored Dec 9, 2024
2 parents bd49c93 + 3b847d8 commit af8c1f0
Show file tree
Hide file tree
Showing 33 changed files with 2,119 additions and 36 deletions.
17 changes: 9 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"@vuelidate/core": "^2.0.3",
"@vuelidate/validators": "^2.0.4",
"@vueuse/core": "^11.0.3",
"@webitel/ui-sdk": "^24.12.8",
"@webitel/ui-sdk": "^24.12.13",
"axios": "^1.7.7",
"deep-equal": "^2.2.1",
"dompurify": "^3.1.2",
Expand All @@ -27,11 +27,7 @@
"vue-i18n": "^9.13.1",
"vue-router": "^4.3.2",
"vuex": "^4.1.0",
"webitel-sdk": "^24.4.16"
},
"optionalDependencies": {
"@rollup/rollup-linux-x64-gnu": "4.9.5",
"@esbuild/darwin-arm64": "^0.24.0"
"webitel-sdk": "^24.10.2"
},
"devDependencies": {
"@vitejs/plugin-vue": "5.1.3",
Expand All @@ -47,5 +43,9 @@
"vite-plugin-node-polyfills": "^0.22.0",
"vite-plugin-svg-sprite": "^0.5.2",
"vitest": "^2.0.5"
},
"optionalDependencies": {
"@esbuild/darwin-arm64": "^0.24.0",
"@rollup/rollup-linux-x64-gnu": "4.9.5"
}
}
36 changes: 23 additions & 13 deletions src/app/css/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,6 @@ body {
min-height: 100%;
}

.wt-page-wrapper {
flex-grow: 1;
display: flex;
max-height: 100%;

:deep(.wt-page-wrapper__main) {
display: flex;
flex-direction: column;
max-height: 100%;
min-height: 0;
}
}

.table-wrapper {
flex-grow: 1;
display: flex;
Expand Down Expand Up @@ -78,3 +65,26 @@ a {
text-decoration: none;
color: #000;
}


.wt-page-wrapper {
width: 100%;

&__main {
flex-grow: 1;
display: flex;
max-height: 100%;
}

.main-container {
display: flex;
flex-direction: column;
width: 100%;

& > section {
display: flex;
flex-direction: column;
height: 100%;
}
}
}
22 changes: 20 additions & 2 deletions src/app/locale/en/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import AccessMode
from '../../../modules/contacts/modules/permissions/enums/AccessMode.enum.js';
import TimelineTaskStatusEnum
from '../../../modules/contacts/modules/timeline/enums/TimelineTaskStatus.enum.js';
import TypesSourcesEnum
from '../../../modules/configuration/modules/lookups/modules/sources/enums/TypesSources.enum.js';

export default {
crm: 'CRM',
Expand Down Expand Up @@ -93,7 +95,7 @@ export default {
name: 'Contacts',
text: 'In this section, you can work with your contacts: clients, customers etc.',
},
'configuration': {
configuration: {
name: 'Configuration',
text: 'In this section, you will set up the Case management process.',
},
Expand All @@ -103,9 +105,25 @@ export default {

slas: {
slas: 'SLA | SLAs',
conditions: 'Condition | Conditions',
reactionTime: 'Reaction time',
resolutionTime: 'Resolution time',
validFrom: 'Valid from',
validTo: 'Valid to',
},
sources: {
sources: 'Case source | Case sources',
types: {
[TypesSourcesEnum.CALL]: 'Call',
[TypesSourcesEnum.CHAT]: 'Chat',
[TypesSourcesEnum.SOCIAL_MEDIA]: 'Social Media',
[TypesSourcesEnum.EMAIL]: 'Email',
[TypesSourcesEnum.API]: 'API',
[TypesSourcesEnum.MANUAL]: 'Manual',
}
},

[CrmSections.CONTACT_GROUPS]: 'Contact groups',
[CrmSections.STATUSES]: 'Statuses',
[CrmSections.SOURCES]: 'Sources',
},
};
22 changes: 20 additions & 2 deletions src/app/locale/ru/ru.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import { WebitelContactsTimelineEventType } from 'webitel-sdk';
import ChatGatewayProvider
from '@webitel/ui-sdk/src/enums/ChatGatewayProvider/ChatGatewayProvider.enum.js';
import CrmSections from '@webitel/ui-sdk/src/enums/WebitelApplications/CrmSections.enum';
import TypesSourcesEnum
from '../../../modules/configuration/modules/lookups/modules/sources/enums/TypesSources.enum.js';
import AccessMode
from '../../../modules/contacts/modules/permissions/enums/AccessMode.enum.js';
import TimelineTaskStatusEnum
Expand Down Expand Up @@ -92,7 +94,7 @@ export default {
name: 'Контакты',
text: 'В этом разделе вы можете работать с Контактами: клиентами, партнерами и т.д.',
},
'configuration': {
configuration: {
name: 'Конфигурация',
text: 'Здесь вы можете просматривать Обращения, зарегистрированные в системе.',
},
Expand All @@ -102,9 +104,25 @@ export default {

slas: {
slas: 'SLA | SLAs',
conditions: 'Условие | Условия',
reactionTime: 'Плановое время реакции',
resolutionTime: 'Плановое время решения',
validFrom: 'Действителен с',
validTo: 'Действителен до',
},

sources: {
sources: 'Источник обращений | Источники обращений',
types: {
[TypesSourcesEnum.CALL]: 'Звонок',
[TypesSourcesEnum.CHAT]: 'Чат',
[TypesSourcesEnum.SOCIAL_MEDIA]: 'Социальная сеть',
[TypesSourcesEnum.EMAIL]: 'Письмо',
[TypesSourcesEnum.API]: 'API',
[TypesSourcesEnum.MANUAL]: 'Созданное вручную',
},
},
[CrmSections.CONTACT_GROUPS]: 'Группы контактов',
[CrmSections.STATUSES]: 'Статусы',
[CrmSections.SOURCES]: 'Источники',
},
};
22 changes: 20 additions & 2 deletions src/app/locale/ua/ua.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import { WebitelContactsTimelineEventType } from 'webitel-sdk';
import ChatGatewayProvider
from '@webitel/ui-sdk/src/enums/ChatGatewayProvider/ChatGatewayProvider.enum.js';
import CrmSections from '@webitel/ui-sdk/src/enums/WebitelApplications/CrmSections.enum';
import TypesSourcesEnum
from '../../../modules/configuration/modules/lookups/modules/sources/enums/TypesSources.enum.js';
import AccessMode
from '../../../modules/contacts/modules/permissions/enums/AccessMode.enum.js';
import TimelineTaskStatusEnum
Expand Down Expand Up @@ -92,7 +94,7 @@ export default {
name: 'Контакти',
text: 'У цьому розділі ви можете працювати з Контактами: клієнтами, партнерами тощо.',
},
'configuration': {
configuration: {
name: 'Конфігурація',
text: 'Тут ви можете переглядати Звернення, зареєстровані у системі.',
},
Expand All @@ -102,10 +104,26 @@ export default {

slas: {
slas: 'SLA | SLAs',
conditions: 'Умова | Умови',
reactionTime: 'Плановий час реакції',
resolutionTime: 'Плановий час вирішення',
validFrom: 'Дійсний з',
validTo: 'Дійсний до',
},

sources: {
sources: 'Джерело звернень | Джерела звернень',

types: {
[TypesSourcesEnum.CALL]: 'Дзвінок',
[TypesSourcesEnum.CHAT]: 'Чат',
[TypesSourcesEnum.SOCIAL_MEDIA]: 'Соціальна мережа',
[TypesSourcesEnum.EMAIL]: 'Лист',
[TypesSourcesEnum.API]: 'API',
[TypesSourcesEnum.MANUAL]: 'Створене вручну',
},
},
[CrmSections.CONTACT_GROUPS]: 'Групи контактів',
[CrmSections.STATUSES]: 'Статуси',
[CrmSections.SOURCES]: 'Джерела',
},
};
52 changes: 51 additions & 1 deletion src/app/router/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,18 @@ import AccessDenied from '../components/utils/access-denied-component.vue';
import TheStartPage
from '../../modules/start-page/components/the-start-page.vue';
import TheContacts from '../../modules/contacts/components/the-contacts.vue';

import TheSlas
from '../../modules/configuration/modules/lookups/modules/slas/components/the-slas.vue';
import OpenedSla from '../../modules/configuration/modules/lookups/modules/slas/components/opened-sla.vue';
import OpenedSlaGeneral from '../../modules/configuration/modules/lookups/modules/slas/components/opened-sla-general.vue';
import TheSources
from '../../modules/configuration/modules/lookups/modules/sources/components/the-sources.vue';
import OpenedSource
from '../../modules/configuration/modules/lookups/modules/sources/components/opened-source.vue';
import OpenedSourceGeneral
from '../../modules/configuration/modules/lookups/modules/sources/components/opened-source-general.vue';
import OpenedSlaConditions
from '../../modules/configuration/modules/lookups/modules/slas/modules/conditions/components/opened-sla-conditions.vue';

import store from '../store';
import TheConfiguration from '../../modules/configuration/components/the-configuration.vue';
Expand Down Expand Up @@ -124,6 +135,45 @@ const routes = [
{
path: 'slas',
name: CrmSections.SLAS,
component: TheSlas,
// beforeEnter: checkRouteAccess,
},
{
path: 'slas/:id',
name: `${CrmSections.SLAS}-card`,
component: OpenedSla,
redirect: { name: `${CrmSections.SLAS}-general` },
children: [
{
path: 'general',
name: `${CrmSections.SLAS}-general`,
component: OpenedSlaGeneral,
},
{
path: 'conditions/:conditionId?',
name: `${CrmSections.SLAS}-conditions`,
component: OpenedSlaConditions,
},
],
},
{
path: 'sources',
name: CrmSections.SOURCES,
component: TheSources,
// beforeEnter: checkRouteAccess,
},
{
path: 'sources/:id',
name: `${CrmSections.SOURCES}-card`,
component: OpenedSource,
redirect: { name: `${CrmSections.SOURCES}-general` },
children: [
{
path: 'general',
name: `${CrmSections.SOURCES}-general`,
component: OpenedSourceGeneral,
},
],
},
],
},
Expand Down
3 changes: 2 additions & 1 deletion src/app/store/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import contacts from '../../modules/contacts/store/contacts';
import userinfo from '../../modules/userinfo/store/userinfo';
import appearance from '../../modules/appearance/store/appearance';
import instance from '../api/instance';
// import configuration from '../../modules/configuration/store/configuration';
import configuration from '../../modules/configuration/store/configuration';

export default createStore({
state: {
Expand All @@ -23,5 +23,6 @@ export default createStore({
contacts,
userinfo,
appearance,
configuration,
},
});
2 changes: 1 addition & 1 deletion src/modules/configuration/components/the-configuration.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const nav = [
subNav: [
{
value: CrmSections.SOURCES,
name: t('lookups.sources'),
name: t('lookups.sources.sources', 2),
route: 'lookups/sources',
},
{
Expand Down
Loading

0 comments on commit af8c1f0

Please sign in to comment.