@webitel/ui-sdk 24.12.46 → 24.12.48
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/CHANGELOG.md +13 -0
- package/dist/ui-sdk.js +218 -218
- package/dist/ui-sdk.umd.cjs +2 -2
- package/package.json +1 -1
- package/src/enums/WebitelApplications/CrmSections.enum.js +1 -1
- package/src/modules/Userinfo/classes/ApplicationsAccess.js +5 -0
- package/src/store/new/modules/tableStoreModule/tableStoreModule.js +2 -11
- package/src/store/new/modules/tableStoreModule/useTableStore.js +0 -5
package/package.json
CHANGED
|
@@ -8,7 +8,7 @@ const CrmSections = Object.freeze({
|
|
|
8
8
|
PRIORITIES: 'priorities',
|
|
9
9
|
STATUSES: 'statuses',
|
|
10
10
|
SOURCES: 'sources',
|
|
11
|
-
|
|
11
|
+
CLOSE_REASON_GROUPS: 'close-reason-groups',
|
|
12
12
|
CONTACT_GROUPS: 'contact-groups',
|
|
13
13
|
CASE_SOURCES: 'case-sources',
|
|
14
14
|
CUSTOM_LOOKUPS: 'custom-lookups',
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import deepCopy from 'deep-copy';
|
|
2
2
|
import deepmerge from 'deepmerge';
|
|
3
|
+
|
|
3
4
|
import AdminSections from '../../../enums/WebitelApplications/AdminSections.enum.js';
|
|
4
5
|
import AuditorSections from '../../../enums/WebitelApplications/AuditorSections.enum.js';
|
|
5
6
|
import CrmSections from '../../../enums/WebitelApplications/CrmSections.enum.js';
|
|
@@ -206,6 +207,10 @@ const applicationsAccess = (value = true) => ({
|
|
|
206
207
|
_enabled: value,
|
|
207
208
|
_locale: `WebitelApplications.${WebitelApplications.CRM}.sections.${CrmSections.SERVICE_CATALOGS}`,
|
|
208
209
|
},
|
|
210
|
+
[CrmSections.CLOSE_REASON_GROUPS]: {
|
|
211
|
+
_enabled: value,
|
|
212
|
+
_locale: `WebitelApplications.${WebitelApplications.CRM}.sections.${CrmSections.CLOSE_REASON_GROUPS}`,
|
|
213
|
+
},
|
|
209
214
|
[CrmSections.CONTACT_GROUPS]: {
|
|
210
215
|
_enabled: value,
|
|
211
216
|
_locale: `WebitelApplications.${WebitelApplications.CRM}.sections.${CrmSections.CONTACT_GROUPS}`,
|
|
@@ -148,10 +148,12 @@ const actions = {
|
|
|
148
148
|
|
|
149
149
|
context.commit('SET', { path: 'dataList', value: items });
|
|
150
150
|
context.commit('SET', { path: 'isNextPage', value: next });
|
|
151
|
+
context.commit('SET', { path: 'selected', value: [] });
|
|
151
152
|
} catch (err) {
|
|
152
153
|
context.commit('SET', { path: 'error', value: err });
|
|
153
154
|
throw err;
|
|
154
155
|
} finally {
|
|
156
|
+
|
|
155
157
|
setTimeout(() => {
|
|
156
158
|
context.commit('SET', { path: 'isLoading', value: false });
|
|
157
159
|
}, 100); // why 1s? https://ux.stackexchange.com/a/104782
|
|
@@ -240,21 +242,10 @@ const actions = {
|
|
|
240
242
|
context.dispatch('api/PATCH_ITEM', payload),
|
|
241
243
|
DELETE_ITEM_API: (context, payload) =>
|
|
242
244
|
context.dispatch('api/DELETE_ITEM', payload),
|
|
243
|
-
|
|
244
|
-
RESET_TABLE_STATE: async (context) => {
|
|
245
|
-
context.commit('RESET_TABLE_STATE');
|
|
246
|
-
},
|
|
247
|
-
};
|
|
248
|
-
|
|
249
|
-
const mutations = {
|
|
250
|
-
RESET_TABLE_STATE: (state) => {
|
|
251
|
-
Object.assign(state, deepCopy(state._resettable));
|
|
252
|
-
},
|
|
253
245
|
};
|
|
254
246
|
|
|
255
247
|
export default () => ({
|
|
256
248
|
state: state(),
|
|
257
249
|
getters,
|
|
258
250
|
actions,
|
|
259
|
-
mutations,
|
|
260
251
|
});
|
|
@@ -58,10 +58,6 @@ export const useTableStore = (namespace) => {
|
|
|
58
58
|
return store.dispatch(`${tableNamespace}/SET_SELECTED`, payload);
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
function resetState(payload) {
|
|
62
|
-
return store.dispatch(`${tableNamespace}/RESET_TABLE_STATE`, payload);
|
|
63
|
-
}
|
|
64
|
-
|
|
65
61
|
return {
|
|
66
62
|
namespace: tableNamespace,
|
|
67
63
|
|
|
@@ -78,6 +74,5 @@ export const useTableStore = (namespace) => {
|
|
|
78
74
|
deleteData,
|
|
79
75
|
sort,
|
|
80
76
|
setSelected,
|
|
81
|
-
resetState,
|
|
82
77
|
};
|
|
83
78
|
};
|