diff --git a/package-lock.json b/package-lock.json index 87253413e..38e0774f8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,7 +13,7 @@ "@vuelidate/validators": "^2.0.0", "@vueuse/core": "^10.3.0", "@webitel/flow-ui-sdk": "^0.1.14", - "@webitel/ui-sdk": "^23.12.92", + "@webitel/ui-sdk": "^23.12.101", "axios": "^0.27.1", "clipboard-copy": "^4.0.1", "cron-validator": "^1.3.1", @@ -33,7 +33,7 @@ "vue-router": "^4.2.5", "vue2-dropzone": "^3.6.0", "vuex": "^4.1.0", - "webitel-sdk": "^23.9.8" + "webitel-sdk": "^23.12.8" }, "devDependencies": { "@vitejs/plugin-vue": "^4.4.0", @@ -1372,9 +1372,9 @@ } }, "node_modules/@webitel/ui-sdk": { - "version": "23.12.92", - "resolved": "https://registry.npmjs.org/@webitel/ui-sdk/-/ui-sdk-23.12.92.tgz", - "integrity": "sha512-oZO19Y++PuX3UnAVYEnRBdEVccP2l26+NinISRbCFRXIATWN39czVI12CqWxu/wyRL76sn2kNW+vxuO18LJX7A==", + "version": "23.12.101", + "resolved": "https://registry.npmjs.org/@webitel/ui-sdk/-/ui-sdk-23.12.101.tgz", + "integrity": "sha512-h1TVzt0++OpCeyPSFaSmuUPDd1RjVTb6XRvr9r0gBw4PTSS+zyRyIEm6GtzUKJLpfPSFsSJbcSgojuSqB07d1A==", "dependencies": { "@floating-ui/vue": "^1.0.1", "@vuelidate/core": "^2.0.3", @@ -8207,9 +8207,9 @@ } }, "node_modules/webitel-sdk": { - "version": "23.9.8", - "resolved": "https://registry.npmjs.org/webitel-sdk/-/webitel-sdk-23.9.8.tgz", - "integrity": "sha512-AA/4F9+1fD0gxk7TX5h6Yi87iVnbAQk0kr+dn8ePVS4b42LCHGK3vow769UieeEfREa+ykJtMfb3nCZZltUcVA==", + "version": "23.12.8", + "resolved": "https://registry.npmjs.org/webitel-sdk/-/webitel-sdk-23.12.8.tgz", + "integrity": "sha512-oX20+ES1ln89b6oJ2+wjn+uryqpMVTRjvh29EOwM7YGnvdp7RaFWjXe+uxPLQ7HPtJxRq0QHjThwirJy8xFIrA==", "dependencies": { "@types/webrtc": "0.0.26", "deep-copy": "1.4.2", @@ -9252,9 +9252,9 @@ } }, "@webitel/ui-sdk": { - "version": "23.12.92", - "resolved": "https://registry.npmjs.org/@webitel/ui-sdk/-/ui-sdk-23.12.92.tgz", - "integrity": "sha512-oZO19Y++PuX3UnAVYEnRBdEVccP2l26+NinISRbCFRXIATWN39czVI12CqWxu/wyRL76sn2kNW+vxuO18LJX7A==", + "version": "23.12.101", + "resolved": "https://registry.npmjs.org/@webitel/ui-sdk/-/ui-sdk-23.12.101.tgz", + "integrity": "sha512-h1TVzt0++OpCeyPSFaSmuUPDd1RjVTb6XRvr9r0gBw4PTSS+zyRyIEm6GtzUKJLpfPSFsSJbcSgojuSqB07d1A==", "requires": { "@floating-ui/vue": "^1.0.1", "@vuelidate/core": "^2.0.3", @@ -13882,9 +13882,9 @@ "dev": true }, "webitel-sdk": { - "version": "23.9.8", - "resolved": "https://registry.npmjs.org/webitel-sdk/-/webitel-sdk-23.9.8.tgz", - "integrity": "sha512-AA/4F9+1fD0gxk7TX5h6Yi87iVnbAQk0kr+dn8ePVS4b42LCHGK3vow769UieeEfREa+ykJtMfb3nCZZltUcVA==", + "version": "23.12.8", + "resolved": "https://registry.npmjs.org/webitel-sdk/-/webitel-sdk-23.12.8.tgz", + "integrity": "sha512-oX20+ES1ln89b6oJ2+wjn+uryqpMVTRjvh29EOwM7YGnvdp7RaFWjXe+uxPLQ7HPtJxRq0QHjThwirJy8xFIrA==", "requires": { "@types/webrtc": "0.0.26", "deep-copy": "1.4.2", diff --git a/package.json b/package.json index 0b71a7309..b312e7970 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "@vuelidate/validators": "^2.0.0", "@vueuse/core": "^10.3.0", "@webitel/flow-ui-sdk": "^0.1.14", - "@webitel/ui-sdk": "^23.12.92", + "@webitel/ui-sdk": "^23.12.101", "axios": "^0.27.1", "clipboard-copy": "^4.0.1", "cron-validator": "^1.3.1", @@ -36,7 +36,7 @@ "vue-router": "^4.2.5", "vue2-dropzone": "^3.6.0", "vuex": "^4.1.0", - "webitel-sdk": "^23.9.8" + "webitel-sdk": "^23.12.8" }, "devDependencies": { "@vitejs/plugin-vue": "^4.4.0", diff --git a/src/modules/system/modules/configuration/api/configuration.js b/src/modules/system/modules/configuration/api/configuration.js index 428f32b9f..414aa3a05 100644 --- a/src/modules/system/modules/configuration/api/configuration.js +++ b/src/modules/system/modules/configuration/api/configuration.js @@ -116,6 +116,41 @@ const deleteItem = async ({ id }) => { } }; +const getObjectsList = async (params) => { + const { + page, + size, + search, + sort, + fields, + } = applyTransform(params, [ + merge(getDefaultGetParams()), + starToSearch('search'), + ]); + + try { + const response = await service.searchAvailableSystemSetting( + page, + size, + search, + sort, + fields, + ); + const { items, next } = applyTransform(response.data, [ + snakeToCamel(), + merge(getDefaultGetListResponse()), + ]); + return { + items, + next, + }; + } catch (err) { + throw applyTransform(err, [ + notify, + ]); + } +}; + const ConfigurationAPI = { getList, get, @@ -123,6 +158,7 @@ const ConfigurationAPI = { update, delete: deleteItem, getLookup, + getObjectsList, }; export default ConfigurationAPI; diff --git a/src/modules/system/modules/configuration/components/configuration-popup.vue b/src/modules/system/modules/configuration/components/configuration-popup.vue index 4c02271da..33ddd401b 100644 --- a/src/modules/system/modules/configuration/components/configuration-popup.vue +++ b/src/modules/system/modules/configuration/components/configuration-popup.vue @@ -152,16 +152,10 @@ export default { this.$emit('close'); }, async loadParameterList(params) { - const response = await ConfigurationAPI.getLookup({ ...params, size: 5000 }); - - response.items = Object.values(EngineSystemSettingName) - .filter((name) => ( - response.items.every((item) => item.name !== name) - )); - return response; + return await ConfigurationAPI.getObjectsList({ ...params, size: 5000 }); }, setParameterName(event) { - this.setItemProp({ prop: 'name', value: event }); + this.setItemProp({ prop: 'name', value: event.name }); if (this.valueType === 'boolean') this.setItemProp({ prop: 'value', value: false }); if (this.valueType === 'number') this.setItemProp({ prop: 'value', value: 0 }); },