diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 8a12eb997..000000000 --- a/.travis.yml +++ /dev/null @@ -1,12 +0,0 @@ -sudo: required -language: bash -services: - - docker -env: - - DOCKER_IMAGE_NAME=webitel/web -before_install: - - docker login --username=$DOCKER_HUB_USERNAME --password=$DOCKER_HUB_PASSWORD -install: - - docker build --no-cache -t $DOCKER_IMAGE_NAME . -script: - - if [ ! -z "$TRAVIS_TAG" ]; then docker tag $DOCKER_IMAGE_NAME:latest $DOCKER_IMAGE_NAME:$TRAVIS_TAG; fi && docker push $DOCKER_IMAGE_NAME diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index c5be14d25..000000000 --- a/Dockerfile +++ /dev/null @@ -1,14 +0,0 @@ -FROM node:11 as ui-builder -RUN mkdir /usr/src/app -WORKDIR /usr/src/app -ENV PATH /usr/src/app/node_modules/.bin:$PATH -COPY package.json /usr/src/app/package.json -RUN npm install -RUN npm install -g @vue/cli -COPY . /usr/src/app -RUN npm run build -RUN chown -R 1000:1000 /usr/src/app/dist - -FROM linuxserver/letsencrypt -COPY --from=ui-builder /usr/src/app/dist /www -COPY nginx/default /config/nginx/site-confs/default diff --git a/package-lock.json b/package-lock.json index 995163fca..206873c6e 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.30", + "@webitel/ui-sdk": "^23.12.32", "axios": "^0.27.1", "clipboard-copy": "^4.0.1", "cron-validator": "^1.3.1", @@ -28,6 +28,7 @@ "path": "^0.12.7", "query-string": "^7.1.1", "sortablejs": "^1.10.2", + "uuid": "^9.0.1", "vue": "^3.2.47", "vue-i18n": "^9.2.2", "vue-router": "^4.2.5", @@ -1516,9 +1517,9 @@ } }, "node_modules/@webitel/ui-sdk": { - "version": "23.12.30", - "resolved": "https://registry.npmjs.org/@webitel/ui-sdk/-/ui-sdk-23.12.30.tgz", - "integrity": "sha512-qhehtA10lO1VHNf/gLwLdVe/ZR1xsa6FOzPPE0RWxdzH7JFnX9bcP49BnAbLmEB3Tif1psEnns9BceUJufLa5g==", + "version": "23.12.32", + "resolved": "https://registry.npmjs.org/@webitel/ui-sdk/-/ui-sdk-23.12.32.tgz", + "integrity": "sha512-i01YtNho/8N0voOPsPTiPE5r7Q8yz98L3hLfvgcvucw1XYGyGX2++YhnfaJ7fm9NsTj6XBRy9PX+d+Div3li5w==", "dependencies": { "@floating-ui/vue": "^1.0.1", "@vue/compat": "^3.2.47", @@ -7937,6 +7938,18 @@ "version": "1.0.2", "license": "MIT" }, + "node_modules/uuid": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", + "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "bin": { + "uuid": "dist/bin/uuid" + } + }, "node_modules/v8-to-istanbul": { "version": "9.1.3", "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.1.3.tgz", @@ -9722,9 +9735,9 @@ } }, "@webitel/ui-sdk": { - "version": "23.12.30", - "resolved": "https://registry.npmjs.org/@webitel/ui-sdk/-/ui-sdk-23.12.30.tgz", - "integrity": "sha512-qhehtA10lO1VHNf/gLwLdVe/ZR1xsa6FOzPPE0RWxdzH7JFnX9bcP49BnAbLmEB3Tif1psEnns9BceUJufLa5g==", + "version": "23.12.32", + "resolved": "https://registry.npmjs.org/@webitel/ui-sdk/-/ui-sdk-23.12.32.tgz", + "integrity": "sha512-i01YtNho/8N0voOPsPTiPE5r7Q8yz98L3hLfvgcvucw1XYGyGX2++YhnfaJ7fm9NsTj6XBRy9PX+d+Div3li5w==", "requires": { "@floating-ui/vue": "^1.0.1", "@vue/compat": "^3.2.47", @@ -14016,6 +14029,11 @@ "util-deprecate": { "version": "1.0.2" }, + "uuid": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", + "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==" + }, "v8-to-istanbul": { "version": "9.1.3", "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.1.3.tgz", diff --git a/package.json b/package.json index b03db3a62..49dcef943 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.30", + "@webitel/ui-sdk": "^23.12.32", "axios": "^0.27.1", "clipboard-copy": "^4.0.1", "cron-validator": "^1.3.1", @@ -31,6 +31,7 @@ "path": "^0.12.7", "query-string": "^7.1.1", "sortablejs": "^1.10.2", + "uuid": "^9.0.1", "vue": "^3.2.47", "vue-i18n": "^9.2.2", "vue-router": "^4.2.5", diff --git a/src/app/locale/en/en.js b/src/app/locale/en/en.js index f1cd6e24a..1d789fbce 100644 --- a/src/app/locale/en/en.js +++ b/src/app/locale/en/en.js @@ -598,9 +598,15 @@ export default { }, alternativeChannels: { alternativeChannels: 'Alternative Channels', + title: 'Messaging channels', email: 'Email', whatsapp: 'WhatsApp', telegram: 'Telegram', + messenger: 'Messenger', + }, + call: { + title: 'Online call', + url: 'WebSocket Endpoint', }, }, uri: 'URI', diff --git a/src/app/locale/ru/ru.js b/src/app/locale/ru/ru.js index d702d89da..0e770fbca 100644 --- a/src/app/locale/ru/ru.js +++ b/src/app/locale/ru/ru.js @@ -596,11 +596,17 @@ export default { subheadingText: 'Подзаголовок', showDefaultHeading: 'Показать стандартный заголовок и подзаголовок на странице результата', }, + call: { + title: 'Онлайн-звонок', + url: 'WebSocket Endpoint', + }, alternativeChannels: { alternativeChannels: 'Альтернативные каналы', + title: 'Текстовые каналы', email: 'Электронная почта', whatsapp: 'WhatsApp', telegram: 'Telegram', + messenger: 'Messenger', }, }, uri: 'URI', diff --git a/src/app/locale/ua/ua.js b/src/app/locale/ua/ua.js index e6173ca0a..e76ef8fd2 100644 --- a/src/app/locale/ua/ua.js +++ b/src/app/locale/ua/ua.js @@ -597,11 +597,17 @@ export default { subheadingText: 'Підзаголовок', showDefaultHeading: 'Показати стандартний заголовок та підзаголовок на сторінці результату', }, + call: { + title: 'Онлайн-дзвінок', + url: 'WebSocket Endpoint', + }, alternativeChannels: { alternativeChannels: 'Альтернативні канали', + title: 'Текстові канали', email: 'Електронна пошта', whatsapp: 'WhatsApp', telegram: 'Telegram', + messenger: 'Messenger', }, }, uri: 'URI', diff --git a/src/app/store/BaseStoreModules/StoreModuleMixins/BaseOpenedInstanceStoreModuleMixin.js b/src/app/store/BaseStoreModules/StoreModuleMixins/BaseOpenedInstanceStoreModuleMixin.js index 789aab465..e9e97ff5e 100644 --- a/src/app/store/BaseStoreModules/StoreModuleMixins/BaseOpenedInstanceStoreModuleMixin.js +++ b/src/app/store/BaseStoreModules/StoreModuleMixins/BaseOpenedInstanceStoreModuleMixin.js @@ -1,4 +1,5 @@ import deepCopy from 'deep-copy'; +import set from 'lodash/set'; const state = { itemId: 0, @@ -35,8 +36,13 @@ const mutations = { SET_ITEM_ID: (state, id) => { state.itemId = id; }, - SET_ITEM_PROPERTY: (state, { prop, value }) => { - state.itemInstance[prop] = value; + SET_ITEM_PROPERTY: (state, { prop, value, path }) => { + if (path) { + set(state.itemInstance, path, value); + } else { + // DEPRECATED, LEGACY CODE + state.itemInstance[prop] = value; + } }, SET_ITEM: (state, item) => { state.itemInstance = item; diff --git a/src/modules/routing/modules/chat-gateways/api/chatGateways.js b/src/modules/routing/modules/chat-gateways/api/chatGateways.js index 634a84fcd..55fb9b795 100644 --- a/src/modules/routing/modules/chat-gateways/api/chatGateways.js +++ b/src/modules/routing/modules/chat-gateways/api/chatGateways.js @@ -62,6 +62,7 @@ const webchatRequestConverter = (data) => { data.metadata.chat = JSON.stringify(data.metadata.chat); data.metadata.appointment = JSON.stringify(data.metadata.appointment); data.metadata.alternativeChannels = JSON.stringify(data.metadata.alternativeChannels); + data.metadata.call = JSON.stringify(data.metadata.call); data.metadata._btnCodeDirty = data.metadata._btnCodeDirty.toString(); return data; }; @@ -105,6 +106,9 @@ const webChatResponseConverter = (data) => { if (data.metadata.alternativeChannels) { data.metadata.alternativeChannels = JSON.parse(data.metadata.alternativeChannels); } + if (data.metadata.call) { + data.metadata.call = JSON.parse(data.metadata.call); + } data.metadata._btnCodeDirty = (data.metadata._btnCodeDirty === 'true'); return deepmerge(webChatGateway(), data); diff --git a/src/modules/routing/modules/chat-gateways/components/opened-chat-gateway.vue b/src/modules/routing/modules/chat-gateways/components/opened-chat-gateway.vue index 69d090eb8..ee19bbdb0 100644 --- a/src/modules/routing/modules/chat-gateways/components/opened-chat-gateway.vue +++ b/src/modules/routing/modules/chat-gateways/components/opened-chat-gateway.vue @@ -16,6 +16,7 @@ @@ -49,6 +50,7 @@ diff --git a/src/modules/routing/modules/chat-gateways/modules/webchat/components/opened-chat-gateway-webchat-alternative-channels-tab.vue b/src/modules/routing/modules/chat-gateways/modules/webchat/components/opened-chat-gateway-webchat-alternative-channels-tab.vue index b4be74aeb..82825daa8 100644 --- a/src/modules/routing/modules/chat-gateways/modules/webchat/components/opened-chat-gateway-webchat-alternative-channels-tab.vue +++ b/src/modules/routing/modules/chat-gateways/modules/webchat/components/opened-chat-gateway-webchat-alternative-channels-tab.vue @@ -12,36 +12,77 @@ }} -
-
- - - -
-
+
+
+
+ {{ $t('objects.routing.chatGateways.webchat.alternativeChannels.title') }} +
+
+
+ + + +
+
+
+
+
+ {{ $t('objects.routing.chatGateways.webchat.call.title') }} +
+
+ + +
+
+ + +
+
+