Skip to content

Commit

Permalink
Merge pull request #362 from webitel/feature/add-locale-and-default-i…
Browse files Browse the repository at this point in the history
…mg-in-use-table-empty

feature: add locale and default img in useTableEmpty[WTEL-5284](https…
  • Loading branch information
dlohvinov authored Nov 20, 2024
2 parents b675734 + 57835ce commit cbf90f9
Show file tree
Hide file tree
Showing 7 changed files with 63 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@webitel/ui-sdk",
"version": "24.12.0",
"version": "24.12.1",
"private": false,
"scripts": {
"dev": "vite",
Expand Down
6 changes: 6 additions & 0 deletions src/locale/en/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,12 @@ export default {
dummy: {
text: 'There are no records yet',
},
empty: {
text: {
empty: 'No results were found',
filters: 'No results for the filters',
},
},
agentStatusSelect: {
pauseCausePopup: {
title: 'Select a pause cause',
Expand Down
6 changes: 6 additions & 0 deletions src/locale/ru/ru.js
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,12 @@ export default {
dummy: {
text: 'Записи в разделе еще не созданы',
},
empty: {
text: {
empty: 'Поиск не дал результата',
filters: 'Нет результатов по фильтрам',
},
},
agentStatusSelect: {
pauseCausePopup: {
title: 'Выберите причину паузы',
Expand Down
6 changes: 6 additions & 0 deletions src/locale/ua/ua.js
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,12 @@ export default {
dummy: {
text: 'Записи у розділі ще не створені',
},
empty: {
text: {
empty: 'Пошук не дав результату',
filters: 'Немає результатів за фільтрами',
},
},
agentStatusSelect: {
pauseCausePopup: {
title: 'Виберіть причину паузи',
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 6 additions & 4 deletions src/modules/TableComponentModule/composables/useTableEmpty.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import { useStore } from 'vuex';
import { isEmpty } from '../../../scripts/index.js';
import EmptyTableDark from '../_internals/assets/empty-table-dark.svg';
import EmptyTableLight from '../_internals/assets/empty-table-light.svg';
import EmptyFiltersDark from '../_internals/assets/empty-filters-dark.svg';
import EmptyFiltersLight from '../_internals/assets/empty-filters-light.svg';

export const useTableEmpty = ({ dataList, filters, error, isLoading }, overrides = {}) => {
const store = useStore();
Expand All @@ -14,8 +16,8 @@ export const useTableEmpty = ({ dataList, filters, error, isLoading }, overrides
const defaults = computed(() => ({
image: {
filters: {
dark: EmptyTableDark,
light: EmptyTableLight,
dark: EmptyFiltersDark,
light: EmptyFiltersLight,
},
error: {
dark: EmptyTableDark,
Expand All @@ -37,9 +39,9 @@ export const useTableEmpty = ({ dataList, filters, error, isLoading }, overrides
empty: t(''),
},
text: {
filters: t('web'),
filters: t('webitelUI.empty.text.filters'),
error: t(''),
empty: t(''),
empty: t('webitelUI.empty.text.empty'),
},
primaryActionText: {
filters: t(''),
Expand Down

0 comments on commit cbf90f9

Please sign in to comment.