Skip to content

Commit

Permalink
fix: webchat call configuration disable on disabled [WTEL-4004]
Browse files Browse the repository at this point in the history
  • Loading branch information
dlohvinov committed Nov 7, 2023
1 parent 419816f commit 6960761
Show file tree
Hide file tree
Showing 10 changed files with 66 additions and 71 deletions.
18 changes: 0 additions & 18 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@
callback: () => deleteData(selectedRows),
})"
/>

</wt-table-actions>
</div>
</header>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
<template>
<section>
<header class="content-header">
<h3 class="content-title">{{ $t('objects.generalInfo') }}</h3>
<h3 class="content-title">
{{ $t('objects.generalInfo') }}
</h3>
</header>
<div class="object-input-grid object-input-grid__1-col object-input-grid__w50">
<wt-select
Expand All @@ -13,31 +15,31 @@
:value="itemInstance.name"
required
@input="setItemProp({ prop: 'type', value: $event })"
></wt-select>
/>
<wt-input
:disabled="disableUserInput"
:label="$t('objects.integrations.singleSignOn.clientId')"
:v="v.itemInstance.clientId"
:value="itemInstance.clientId"
required
@input="setItemProp({ prop: 'clientId', value: $event })"
></wt-input>
/>
<wt-input
:disabled="disableUserInput"
:label="$t('objects.integrations.singleSignOn.clientSecret')"
:v="v.itemInstance.clientSecret"
:value="itemInstance.clientSecret"
required
@input="setItemProp({ prop: 'clientSecret', value: $event })"
></wt-input>
/>
<wt-input
:disabled="disableUserInput"
:label="$t('objects.integrations.singleSignOn.discoveryUrl')"
:v="v.itemInstance.discoveryUrl"
:value="itemInstance.discoveryUrl"
required
@input="setItemProp({ prop: 'discoveryUrl', value: $event })"
></wt-input>
/>
</div>
</section>
</template>
Expand All @@ -48,7 +50,7 @@ import openedTabComponentMixin
import SingleSignOnAPI from '../api/singleSignOn';
export default {
name: 'opened-single-sign-on-general',
name: 'OpenedSingleSignOnGeneral',
mixins: [openedTabComponentMixin],
methods: {
loadFlows(params) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,32 +1,35 @@
<template>
<wt-page-wrapper :actions-panel="false">
<template v-slot:header>
<template #header>
<wt-page-header
:hide-primary="!hasSaveActionAccess"
:primary-action="save"
:primary-disabled="disabledSave"
:primary-text="saveText"
:secondary-action="close"
>
<wt-headline-nav :path="path"></wt-headline-nav>
<wt-headline-nav :path="path" />
</wt-page-header>
</template>

<template v-slot:main>
<template #main>
<form
class="main-container"
@submit.prevent="save"
>
<wt-tabs
v-model="currentTab"
:tabs="tabs"
></wt-tabs>
/>
<component
:is="currentTab.value"
:namespace="namespace"
:v="v$"
></component>
<input type="submit" hidden> <!-- submit form on Enter -->
/>
<input
type="submit"
hidden
> <!-- submit form on Enter -->
</form>
</template>
</wt-page-wrapper>
Expand All @@ -39,16 +42,16 @@ import openedObjectMixin from '../../../../../app/mixins/objectPagesMixins/opene
import General from './opened-single-sign-on-general.vue';
export default {
name: 'opened-single-sign-on',
mixins: [openedObjectMixin],
name: 'OpenedSingleSignOn',
components: { General },
data: () => ({
namespace: 'integrations/singleSignOn',
}),
mixins: [openedObjectMixin],
setup: () => ({
v$: useVuelidate(),
}),
data: () => ({
namespace: 'integrations/singleSignOn',
}),
validations: {
itemInstance: {
name: { required },
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<template>
<wt-page-wrapper :actions-panel="false">
<template v-slot:header>
<template #header>
<wt-page-header
:hide-primary="!hasCreateAccess"
:primary-action="create"
>
<wt-headline-nav :path="path"></wt-headline-nav>
<wt-headline-nav :path="path" />
</wt-page-header>
</template>

<template v-slot:main>
<template #main>
<delete-confirmation-popup
v-show="isDeleteConfirmationPopup"
:delete-count="deleteCount"
Expand All @@ -29,7 +29,7 @@
@enter="loadList"
@input="setSearch"
@search="loadList"
></wt-search-bar>
/>
<wt-table-actions
:icons="['refresh']"
@input="tableActionsHandler"
Expand All @@ -42,12 +42,12 @@
deleted: selectedRows,
callback: () => deleteData(selectedRows),
})"
></delete-all-action>
/>
</wt-table-actions>
</div>
</header>

<wt-loader v-show="!isLoaded"></wt-loader>
<wt-loader v-show="!isLoaded" />
<div
v-show="dataList.length && isLoaded"
class="table-wrapper"
Expand All @@ -59,23 +59,23 @@
sortable
@sort="sort"
>
<template v-slot:name="{ item }">
<template #name="{ item }">
<wt-item-link :link="editLink(item)">
{{ item.name }}
</wt-item-link>
</template>
<template v-slot:state="{ item }">
<template #state="{ item }">
<wt-switcher
:disabled="!hasEditAccess"
:value="item.enabled"
></wt-switcher>
/>
</template>
<template v-slot:actions="{ item }">
<template #actions="{ item }">
<wt-icon-action
v-if="hasEditAccess"
action="edit"
@click="edit(item)"
></wt-icon-action>
/>
<wt-icon-action
v-if="hasDeleteAccess"
action="delete"
Expand All @@ -84,7 +84,7 @@
deleted: [item],
callback: () => deleteData(item),
})"
></wt-icon-action>
/>
</template>
</wt-table>
<wt-pagination
Expand All @@ -96,7 +96,7 @@
@input="setSize"
@next="nextPage"
@prev="prevPage"
></wt-pagination>
/>
</div>
</section>
</template>
Expand All @@ -111,7 +111,7 @@ import DeleteConfirmationPopup
import { useDeleteConfirmationPopup } from '@webitel/ui-sdk/src/modules/DeleteConfirmationPopup/composables/useDeleteConfirmationPopup';
export default {
name: 'the-single-sign-on',
name: 'TheSingleSignOn',
components: { DeleteConfirmationPopup },
mixins: [tableComponentMixin],
setup() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,14 +146,6 @@ export default {
DeleteConfirmationPopup,
},
mixins: [openedObjectTableTabMixin, objectTableAccessControlMixin],
data: () => ({
namespace: 'lookups/skills',
subNamespace: 'agents',
tableObjectRouteName: RouteNames.AGENTS, // this.editLink() computing
agentSkillPopup: false,
isAddSkillToAgentPopup: false,
}),
setup() {
const {
isVisible: isDeleteConfirmationPopup,
Expand All @@ -173,6 +165,14 @@ export default {
closeDelete,
};
},
data: () => ({
namespace: 'lookups/skills',
subNamespace: 'agents',
tableObjectRouteName: RouteNames.AGENTS, // this.editLink() computing
agentSkillPopup: false,
isAddSkillToAgentPopup: false,
}),
mounted() {
this.handlePatchInput = debounce(this.handlePatchInput);
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ export default {
name: 'OpenedChatGatewayWhatsappTab',
components: { DeleteConfirmationPopup },
mixins: [openedObjectTableTabMixin],
inject: ['$eventBus'],
setup() {
const {
isVisible: isDeleteConfirmationPopup,
Expand All @@ -112,7 +113,6 @@ export default {
closeDelete,
};
},
inject: ['$eventBus'],
data: () => ({
subNamespace: 'whatsapp',
}),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,14 @@
</div>
<div class=" object-input-grid object-input-grid__1-col">
<wt-input
:disabled="disableUserInput"
:disabled="disableUserInput || !itemInstance.metadata.call.enabled"
:label="$t('objects.routing.chatGateways.webchat.call.url')"
:v="v.itemInstance.metadata.call.url"
:value="itemInstance.metadata.call.url"
@input="setItemProp({ path: 'metadata.call.url', value: $event })"
/>
<wt-select
:disabled="disableUserInput"
:disabled="disableUserInput || !itemInstance.metadata.call.enabled"
:label="$t('objects.routing.flow.flow', 1)"
:search-method="loadCallFlows"
:v="v.itemInstance.metadata.call.flow"
Expand Down
Loading

0 comments on commit 6960761

Please sign in to comment.