@webitel/ui-sdk 24.10.87 → 24.10.89

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webitel/ui-sdk",
3
- "version": "24.10.87",
3
+ "version": "24.10.89",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "dev": "vite",
@@ -15,6 +15,7 @@ const catalogService = new CatalogApiFactory(configuration, '', instance);
15
15
 
16
16
  const getChatMessagesList = async ({ chatId }) => {
17
17
  const mergeMessagesData = ({ messages, peers }) => {
18
+ if (!messages) return [];
18
19
  return messages.map(({ from, ...message }) => {
19
20
  return {
20
21
  ...message,
@@ -18,9 +18,9 @@ const AdminSections = Object.freeze({
18
18
  COMMUNICATIONS: 'communications', // scope: lookups
19
19
  PAUSE_CAUSE: 'pause-cause', // scope: lookups
20
20
  MEDIA: 'media', // scope: media_file
21
- // SHIFT_TEMPLATES: 'shift-templates', // scope: shift_templates
22
- // PAUSE_TEMPLATES: 'pause-templates', //scope: pause_templates
23
- // WORKING_CONDITIONS: 'working-conditions', //scope: working_conditions
21
+ SHIFT_TEMPLATES: 'shift-templates', // scope: shift_templates
22
+ PAUSE_TEMPLATES: 'pause-templates', //scope: pause_templates
23
+ WORKING_CONDITIONS: 'working-conditions', //scope: working_conditions
24
24
 
25
25
  // CONTACT CENTER
26
26
  SKILLS: 'skills', // scope: lookups
@@ -87,7 +87,8 @@ export default {
87
87
  },
88
88
 
89
89
  async setFrom(value) {
90
- const filterValue = { from: value, to: this.value.to };
90
+ const from = value ? value : null; // if value is empty, set it to null
91
+ const filterValue = { from, to: this.value.to };
91
92
  await this.setValue({ filter: this.filterQuery, value: filterValue });
92
93
  await this.setValueToQuery({
93
94
  filterQuery: `${this.filterQuery}From`,
@@ -96,7 +97,8 @@ export default {
96
97
  },
97
98
 
98
99
  async setTo(value) {
99
- const filterValue = { from: this.value.from, to: value };
100
+ const to = value ? value : null; // if value is empty, set it to null
101
+ const filterValue = { from: this.value.from, to };
100
102
  await this.setValue({ filter: this.filterQuery, value: filterValue });
101
103
  await this.setValueToQuery({
102
104
  filterQuery: `${this.filterQuery}To`,
@@ -102,18 +102,18 @@ const applicationsAccess = (value = true) => ({
102
102
  _enabled: value,
103
103
  _locale: `WebitelApplications.${WebitelApplications.ADMIN}.sections.${AdminSections.MEDIA}`,
104
104
  },
105
- // [AdminSections.SHIFT_TEMPLATES]: {
106
- // _enabled: value,
107
- // _locale: `WebitelApplications.${WebitelApplications.ADMIN}.sections.${AdminSections.SHIFT_TEMPLATES}`,
108
- // },
109
- // [AdminSections.PAUSE_TEMPLATES]: {
110
- // _enabled: value,
111
- // _locale: `WebitelApplications.${WebitelApplications.ADMIN}.sections.${AdminSections.PAUSE_TEMPLATES}`,
112
- // },
113
- // [AdminSections.WORKING_CONDITIONS]: {
114
- // _enabled: value,
115
- // _locale: `WebitelApplications.${WebitelApplications.ADMIN}.sections.${AdminSections.WORKING_CONDITIONS}`,
116
- // },
105
+ [AdminSections.SHIFT_TEMPLATES]: {
106
+ _enabled: value,
107
+ _locale: `WebitelApplications.${WebitelApplications.ADMIN}.sections.${AdminSections.SHIFT_TEMPLATES}`,
108
+ },
109
+ [AdminSections.PAUSE_TEMPLATES]: {
110
+ _enabled: value,
111
+ _locale: `WebitelApplications.${WebitelApplications.ADMIN}.sections.${AdminSections.PAUSE_TEMPLATES}`,
112
+ },
113
+ [AdminSections.WORKING_CONDITIONS]: {
114
+ _enabled: value,
115
+ _locale: `WebitelApplications.${WebitelApplications.ADMIN}.sections.${AdminSections.WORKING_CONDITIONS}`,
116
+ },
117
117
  [AdminSections.AGENTS]: {
118
118
  _enabled: value,
119
119
  _locale: `WebitelApplications.${WebitelApplications.ADMIN}.sections.${AdminSections.AGENTS}`,