Skip to content

Commit

Permalink
fix: refactor timeline-row components[WTEL-4418]
Browse files Browse the repository at this point in the history
  • Loading branch information
Lera24 committed Apr 23, 2024
1 parent 68b3549 commit 4d64937
Show file tree
Hide file tree
Showing 18 changed files with 208 additions and 330 deletions.
33 changes: 6 additions & 27 deletions src/app/locale/en/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import ChatGatewayProvider
from '@webitel/ui-sdk/src/enums/ChatGatewayProvider/ChatGatewayProvider.enum';
import AccessMode
from '../../../modules/contacts/modules/permissions/enums/AccessMode.enum';
import TimelineTaskStatusEnum
from '../../../modules/contacts/modules/timeline/enums/TimelineTaskStatus.enum.js';

export default {
crm: 'CRM',
Expand All @@ -18,33 +20,10 @@ export default {
transcription: 'Transcription',
},
status: {
started: 'Started',
missed: 'Missed',
transferred: 'Transferred',
ended: 'Ended',
},
mouth: {
jan: 'January',
feb: 'February',
mar: 'March',
apr: 'April',
may: 'May',
jun: 'June',
jul: 'July',
aug: 'August',
sep: 'September',
oct: 'October',
nov: 'November',
dec: 'December',
},
dayWeek: {
mon: 'Monday',
tue: 'Tuesday',
wed: 'Wednesday',
thu: 'Thursday',
fri: 'Friday',
sat: 'Saturday',
sun: 'Sunday',
[TimelineTaskStatusEnum.STARTED]: 'Started',
[TimelineTaskStatusEnum.MISSED]: 'Missed',
[TimelineTaskStatusEnum.TRANSFERRED]: 'Transferred',
[TimelineTaskStatusEnum.ENDED]: 'Ended',
},
},
communications: {
Expand Down
33 changes: 6 additions & 27 deletions src/app/locale/ru/ru.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import ChatGatewayProvider
from '@webitel/ui-sdk/src/enums/ChatGatewayProvider/ChatGatewayProvider.enum';
import AccessMode
from '../../../modules/contacts/modules/permissions/enums/AccessMode.enum';
import TimelineTaskStatusEnum
from '../../../modules/contacts/modules/timeline/enums/TimelineTaskStatus.enum.js';

export default {
crm: 'CRM',
Expand All @@ -18,33 +20,10 @@ export default {
transcription: 'Транскрипция',
},
status: {
started: 'Початок',
missed: 'Пропущений',
transferred: 'Переведено',
ended: 'Кінець',
},
mouth: {
jan: 'Январь',
feb: 'Февраль',
mar: 'Март',
apr: 'Апрель',
may: 'Май',
jun: 'Июнь',
jul: 'Июль',
aug: 'Август',
sep: 'Сентябрь',
oct: 'Октябрь',
nov: 'Ноябрь',
dec: 'Декабрь',
},
dayWeek: {
mon: 'Понедельник',
tue: 'Вторник',
wed: 'Среда',
thu: 'Четверг',
fri: 'Пятница',
sat: 'Суббота',
syn: 'Воскресенье',
[TimelineTaskStatusEnum.STARTED]: 'Початок',
[TimelineTaskStatusEnum.MISSED]: 'Пропущений',
[TimelineTaskStatusEnum.TRANSFERRED]: 'Переведено',
[TimelineTaskStatusEnum.ENDED]: 'Кінець',
},
},
communications: {
Expand Down
33 changes: 6 additions & 27 deletions src/app/locale/ua/ua.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import ChatGatewayProvider
from '@webitel/ui-sdk/src/enums/ChatGatewayProvider/ChatGatewayProvider.enum';
import AccessMode
from '../../../modules/contacts/modules/permissions/enums/AccessMode.enum';
import TimelineTaskStatusEnum
from '../../../modules/contacts/modules/timeline/enums/TimelineTaskStatus.enum.js';

export default {
crm: 'CRM',
Expand All @@ -18,33 +20,10 @@ export default {
transcription: 'Транскрипція',
},
status: {
started: 'Начало',
missed: 'Пропущен',
transferred: 'Переведено',
ended: 'Конец',
},
mouth: {
jan: 'Січень',
feb: 'Лютий',
mar: 'Березень',
apr: 'квітень',
may: 'Травень',
jun: 'Червень',
jul: 'Липень',
aug: 'Серпень',
sep: 'Вересень',
oct: 'Жовтень',
nov: 'Листопад',
dec: 'Грудень',
},
dayWeek: {
mon: 'Понеділок',
tue: 'Вівторок',
wed: 'Середа',
thu: 'Четвер',
fri: 'П\'ятниця',
sat: 'Субота',
syn: 'Неділя',
[TimelineTaskStatusEnum.STARTED]: 'Начало',
[TimelineTaskStatusEnum.MISSED]: 'Пропущен',
[TimelineTaskStatusEnum.TRANSFERRED]: 'Переведено',
[TimelineTaskStatusEnum.ENDED]: 'Конец',
},
},
communications: {
Expand Down
2 changes: 1 addition & 1 deletion src/modules/contacts/modules/timeline/api/TimelineAPI.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const listHandler = (items) => {
type:!item.type ? 'chat' : item.type,
}))
}));
} return copy;
} return [];
}

const getList = async (params) => {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<template>
<wt-context-menu
:options="options"
@click="$event.option.handler()"
>
<template #activator>
<wt-tooltip>
<template #activator>
<wt-icon-btn
icon="options"
/>
</template>
{{ t('vocabulary.options', 2) }}
</wt-tooltip>
</template>

<template #option="option">
<p>{{ option.text }}</p>
</template>
</wt-context-menu>
</template>
<script setup>
import { computed } from 'vue';
import { useI18n } from 'vue-i18n';
const props = defineProps({
id: {
type: String,
}
})
const { t } = useI18n();
const historyLink = `${import.meta.env.VITE_HISTORY_URL}/${props.id}`;
const options = computed(() => {
const openHistory = {
text: t('contacts.timeline.actions.openInHistory'),
handler: () => window.open(historyLink),
};
return [
openHistory,
];
});
</script>

This file was deleted.

Loading

0 comments on commit 4d64937

Please sign in to comment.