@webitel/ui-datalist 26.8.17 → 26.8.18
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 +1 -1
- package/src/modules/filters/components/column/column-filter-preview.vue +2 -1
- package/src/modules/filters/components/column/column-filter.vue +8 -1
- package/src/modules/filters/components/config/static-view/__tests__/static-filter-field.spec.ts +6 -6
- package/src/modules/filters/components/filters-actions-menu.vue +7 -1
- package/src/modules/filters/components/table-filters-panel.vue +7 -1
- package/src/modules/filters/composables/useFilterValuePreview.ts +9 -3
- package/src/modules/filters/modules/filterConfig/components/_custom/filterConfig.ts +4 -8
- package/src/modules/filters/modules/filterConfig/components/_custom/type-extension-filter-value-field.vue +2 -2
- package/src/modules/filters/modules/filterConfig/components/agent/agent-filter-value-field.vue +10 -4
- package/src/modules/filters/modules/filterConfig/components/agent/index.ts +22 -0
- package/src/modules/filters/modules/filterConfig/components/auditor/auditor-filter-value-field.vue +7 -1
- package/src/modules/filters/modules/filterConfig/components/auditor/index.ts +3 -6
- package/src/modules/filters/modules/filterConfig/components/bucket/bucket-filter-value-field.vue +7 -1
- package/src/modules/filters/modules/filterConfig/components/bucket/index.ts +3 -6
- package/src/modules/filters/modules/filterConfig/components/case-assignee/case-assignee-filter-value-field.vue +7 -1
- package/src/modules/filters/modules/filterConfig/components/case-assignee/filterConfig.ts +9 -4
- package/src/modules/filters/modules/filterConfig/components/case-author/case-author-filter-value-field.vue +9 -2
- package/src/modules/filters/modules/filterConfig/components/case-author/index.ts +22 -0
- package/src/modules/filters/modules/filterConfig/components/case-close-reason-groups/case-close-reason-groups-filter-value-field.vue +16 -8
- package/src/modules/filters/modules/filterConfig/components/case-close-reason-groups/filterConfig.ts +44 -0
- package/src/modules/filters/modules/filterConfig/components/case-close-reason-groups/index.ts +10 -0
- package/src/modules/filters/modules/filterConfig/components/case-impacted/case-impacted-filter-value-field.vue +9 -2
- package/src/modules/filters/modules/filterConfig/components/case-impacted/index.ts +23 -0
- package/src/modules/filters/modules/filterConfig/components/case-priority/case-priority-filter-value-field.vue +9 -2
- package/src/modules/filters/modules/filterConfig/components/case-priority/index.ts +26 -0
- package/src/modules/filters/modules/filterConfig/components/case-reporter/case-reporter-filter-value-field.vue +9 -2
- package/src/modules/filters/modules/filterConfig/components/case-reporter/index.ts +23 -0
- package/src/modules/filters/modules/filterConfig/components/case-service/case-service-filter-value-field.vue +18 -5
- package/src/modules/filters/modules/filterConfig/components/case-service/filterConfig.ts +33 -0
- package/src/modules/filters/modules/filterConfig/components/case-service/index.ts +10 -0
- package/src/modules/filters/modules/filterConfig/components/case-sla/case-sla-filter-value-field.vue +9 -2
- package/src/modules/filters/modules/filterConfig/components/case-sla/index.ts +22 -0
- package/src/modules/filters/modules/filterConfig/components/case-sla-condition/case-sla-condition-filter-value-field.vue +14 -5
- package/src/modules/filters/modules/filterConfig/components/case-sla-condition/filterConfig.ts +38 -0
- package/src/modules/filters/modules/filterConfig/components/case-sla-condition/index.ts +10 -0
- package/src/modules/filters/modules/filterConfig/components/case-source/case-source-filter-value-field.vue +9 -2
- package/src/modules/filters/modules/filterConfig/components/case-source/index.ts +22 -0
- package/src/modules/filters/modules/filterConfig/components/case-status/case-status-filter-value-field.vue +14 -8
- package/src/modules/filters/modules/filterConfig/components/case-status/filterConfig.ts +40 -0
- package/src/modules/filters/modules/filterConfig/components/case-status/index.ts +10 -0
- package/src/modules/filters/modules/filterConfig/components/contact/contact-filter-value-field.vue +9 -2
- package/src/modules/filters/modules/filterConfig/components/contact/index.ts +22 -0
- package/src/modules/filters/modules/filterConfig/components/contact-group/contact-group-filter-value-field.vue +10 -2
- package/src/modules/filters/modules/filterConfig/components/contact-group/index.ts +7 -2
- package/src/modules/filters/modules/filterConfig/components/contact-label/contact-label-filter-value-field.vue +8 -2
- package/src/modules/filters/modules/filterConfig/components/contact-label/index.ts +6 -4
- package/src/modules/filters/modules/filterConfig/components/contact-owner/contact-owner-filter-value-field.vue +7 -1
- package/src/modules/filters/modules/filterConfig/components/contact-owner/index.ts +3 -6
- package/src/modules/filters/modules/filterConfig/components/gateway/gateway-filter-value-field.vue +8 -10
- package/src/modules/filters/modules/filterConfig/components/gateway/index.ts +31 -0
- package/src/modules/filters/modules/filterConfig/components/grantee/grantee-filter-value-field.vue +9 -2
- package/src/modules/filters/modules/filterConfig/components/grantee/index.ts +22 -0
- package/src/modules/filters/modules/filterConfig/components/index.ts +38 -64
- package/src/modules/filters/modules/filterConfig/components/queue/index.ts +3 -6
- package/src/modules/filters/modules/filterConfig/components/queue/queue-filter-value-field.vue +7 -1
- package/src/modules/filters/modules/filterConfig/components/rated-by/index.ts +22 -0
- package/src/modules/filters/modules/filterConfig/components/rated-by/rated-by-filter-value-field.vue +8 -3
- package/src/modules/filters/modules/filterConfig/components/region/index.ts +3 -6
- package/src/modules/filters/modules/filterConfig/components/region/region-filter-value-field.vue +7 -1
- package/src/modules/filters/modules/filterConfig/components/skill/index.ts +3 -6
- package/src/modules/filters/modules/filterConfig/components/skill/skill-filter-value-field.vue +7 -1
- package/src/modules/filters/modules/filterConfig/components/supervisor/index.ts +6 -6
- package/src/modules/filters/modules/filterConfig/components/supervisor/supervisor-filter-value-field.vue +7 -1
- package/src/modules/filters/modules/filterConfig/components/tags/index.ts +3 -6
- package/src/modules/filters/modules/filterConfig/components/tags/tags-filter-value-field.vue +7 -1
- package/src/modules/filters/modules/filterConfig/components/team/index.ts +3 -6
- package/src/modules/filters/modules/filterConfig/components/team/team-filter-value-field.vue +7 -1
- package/src/modules/filters/modules/filterConfig/components/user/index.ts +22 -0
- package/src/modules/filters/modules/filterConfig/components/user/user-filter-value-field.vue +8 -3
- package/src/modules/filters/modules/filterConfig/composables/useFilterReadAccess.ts +55 -0
- package/src/modules/filters/scripts/canLoadPreviewRecords.ts +35 -0
- package/types/.tsbuildinfo +1 -1
- package/types/modules/filters/components/column/column-filter-preview.vue.d.ts +2 -0
- package/types/modules/filters/components/column/column-filter.vue.d.ts +2 -0
- package/types/modules/filters/components/filters-actions-menu.vue.d.ts +2 -0
- package/types/modules/filters/components/table-filters-panel.vue.d.ts +3 -0
- package/types/modules/filters/modules/filterConfig/components/agent/agent-filter-value-field.vue.d.ts +2 -2
- package/types/modules/filters/modules/filterConfig/components/agent/index.d.ts +29 -0
- package/types/modules/filters/modules/filterConfig/components/auditor/index.d.ts +1 -4
- package/types/modules/filters/modules/filterConfig/components/bucket/index.d.ts +1 -4
- package/types/modules/filters/modules/filterConfig/components/case-author/case-author-filter-value-field.vue.d.ts +2 -0
- package/types/modules/filters/modules/filterConfig/components/case-author/index.d.ts +29 -0
- package/types/modules/filters/modules/filterConfig/components/case-close-reason-groups/case-close-reason-groups-filter-value-field.vue.d.ts +2 -0
- package/types/modules/filters/modules/filterConfig/components/case-close-reason-groups/filterConfig.d.ts +48 -0
- package/types/modules/filters/modules/filterConfig/components/case-close-reason-groups/index.d.ts +5 -0
- package/types/modules/filters/modules/filterConfig/components/case-impacted/case-impacted-filter-value-field.vue.d.ts +2 -0
- package/types/modules/filters/modules/filterConfig/components/case-impacted/index.d.ts +29 -0
- package/types/modules/filters/modules/filterConfig/components/case-priority/case-priority-filter-value-field.vue.d.ts +2 -0
- package/types/modules/filters/modules/filterConfig/components/case-priority/index.d.ts +29 -0
- package/types/modules/filters/modules/filterConfig/components/case-reporter/case-reporter-filter-value-field.vue.d.ts +2 -0
- package/types/modules/filters/modules/filterConfig/components/case-reporter/index.d.ts +29 -0
- package/types/modules/filters/modules/filterConfig/components/case-service/case-service-filter-value-field.vue.d.ts +7 -2
- package/types/modules/filters/modules/filterConfig/components/case-service/filterConfig.d.ts +29 -0
- package/types/modules/filters/modules/filterConfig/components/case-service/index.d.ts +5 -0
- package/types/modules/filters/modules/filterConfig/components/case-sla/case-sla-filter-value-field.vue.d.ts +2 -0
- package/types/modules/filters/modules/filterConfig/components/case-sla/index.d.ts +29 -0
- package/types/modules/filters/modules/filterConfig/components/case-sla-condition/case-sla-condition-filter-value-field.vue.d.ts +2 -0
- package/types/modules/filters/modules/filterConfig/components/case-sla-condition/filterConfig.d.ts +48 -0
- package/types/modules/filters/modules/filterConfig/components/case-sla-condition/index.d.ts +5 -0
- package/types/modules/filters/modules/filterConfig/components/case-source/case-source-filter-value-field.vue.d.ts +2 -0
- package/types/modules/filters/modules/filterConfig/components/case-source/index.d.ts +29 -0
- package/types/modules/filters/modules/filterConfig/components/case-status/case-status-filter-value-field.vue.d.ts +2 -0
- package/types/modules/filters/modules/filterConfig/components/case-status/filterConfig.d.ts +49 -0
- package/types/modules/filters/modules/filterConfig/components/case-status/index.d.ts +5 -0
- package/types/modules/filters/modules/filterConfig/components/contact/contact-filter-value-field.vue.d.ts +2 -0
- package/types/modules/filters/modules/filterConfig/components/contact/index.d.ts +29 -0
- package/types/modules/filters/modules/filterConfig/components/contact-owner/index.d.ts +1 -4
- package/types/modules/filters/modules/filterConfig/components/gateway/gateway-filter-value-field.vue.d.ts +1 -1
- package/types/modules/filters/modules/filterConfig/components/gateway/index.d.ts +29 -0
- package/types/modules/filters/modules/filterConfig/components/grantee/grantee-filter-value-field.vue.d.ts +2 -0
- package/types/modules/filters/modules/filterConfig/components/grantee/index.d.ts +29 -0
- package/types/modules/filters/modules/filterConfig/components/index.d.ts +409 -77
- package/types/modules/filters/modules/filterConfig/components/queue/index.d.ts +1 -4
- package/types/modules/filters/modules/filterConfig/components/rated-by/index.d.ts +29 -0
- package/types/modules/filters/modules/filterConfig/components/rated-by/rated-by-filter-value-field.vue.d.ts +1 -1
- package/types/modules/filters/modules/filterConfig/components/region/index.d.ts +1 -4
- package/types/modules/filters/modules/filterConfig/components/skill/index.d.ts +1 -4
- package/types/modules/filters/modules/filterConfig/components/supervisor/index.d.ts +1 -4
- package/types/modules/filters/modules/filterConfig/components/tags/index.d.ts +1 -4
- package/types/modules/filters/modules/filterConfig/components/team/index.d.ts +1 -4
- package/types/modules/filters/modules/filterConfig/components/user/index.d.ts +29 -0
- package/types/modules/filters/modules/filterConfig/components/user/user-filter-value-field.vue.d.ts +1 -1
- package/types/modules/filters/modules/filterConfig/composables/useFilterReadAccess.d.ts +19 -0
- package/types/modules/filters/scripts/canLoadPreviewRecords.d.ts +3 -0
- package/src/modules/filters/modules/filterConfig/components/agent/config.js +0 -3
- package/src/modules/filters/modules/filterConfig/components/case-author/config.js +0 -3
- package/src/modules/filters/modules/filterConfig/components/case-close-reason-groups/config.js +0 -8
- package/src/modules/filters/modules/filterConfig/components/case-impacted/config.js +0 -3
- package/src/modules/filters/modules/filterConfig/components/case-priority/config.js +0 -3
- package/src/modules/filters/modules/filterConfig/components/case-reporter/config.js +0 -3
- package/src/modules/filters/modules/filterConfig/components/case-service/config.js +0 -4
- package/src/modules/filters/modules/filterConfig/components/case-sla/config.js +0 -3
- package/src/modules/filters/modules/filterConfig/components/case-sla-condition/config.js +0 -4
- package/src/modules/filters/modules/filterConfig/components/case-source/config.js +0 -3
- package/src/modules/filters/modules/filterConfig/components/case-status/config.js +0 -8
- package/src/modules/filters/modules/filterConfig/components/contact/config.js +0 -3
- package/src/modules/filters/modules/filterConfig/components/gateway/config.js +0 -3
- package/src/modules/filters/modules/filterConfig/components/grantee/config.js +0 -3
- package/src/modules/filters/modules/filterConfig/components/rated-by/config.js +0 -3
- package/src/modules/filters/modules/filterConfig/components/user/config.js +0 -3
- package/types/modules/filters/modules/filterConfig/components/agent/config.d.ts +0 -7
- package/types/modules/filters/modules/filterConfig/components/case-author/config.d.ts +0 -7
- package/types/modules/filters/modules/filterConfig/components/case-close-reason-groups/config.d.ts +0 -16
- package/types/modules/filters/modules/filterConfig/components/case-impacted/config.d.ts +0 -7
- package/types/modules/filters/modules/filterConfig/components/case-priority/config.d.ts +0 -7
- package/types/modules/filters/modules/filterConfig/components/case-reporter/config.d.ts +0 -7
- package/types/modules/filters/modules/filterConfig/components/case-service/config.d.ts +0 -14
- package/types/modules/filters/modules/filterConfig/components/case-sla/config.d.ts +0 -7
- package/types/modules/filters/modules/filterConfig/components/case-sla-condition/config.d.ts +0 -16
- package/types/modules/filters/modules/filterConfig/components/case-source/config.d.ts +0 -7
- package/types/modules/filters/modules/filterConfig/components/case-status/config.d.ts +0 -17
- package/types/modules/filters/modules/filterConfig/components/contact/config.d.ts +0 -7
- package/types/modules/filters/modules/filterConfig/components/gateway/config.d.ts +0 -7
- package/types/modules/filters/modules/filterConfig/components/grantee/config.d.ts +0 -4
- package/types/modules/filters/modules/filterConfig/components/rated-by/config.d.ts +0 -7
- package/types/modules/filters/modules/filterConfig/components/user/config.d.ts +0 -7
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import {
|
|
2
|
+
CaseStatusConditionsAPI,
|
|
3
|
+
CaseStatusesAPI as CaseStatusesApi,
|
|
4
|
+
} from '@webitel/api-services/api';
|
|
5
|
+
import { WtObject } from '@webitel/ui-sdk/enums';
|
|
6
|
+
|
|
7
|
+
import {
|
|
8
|
+
type FilterConfigBaseParams,
|
|
9
|
+
type FilterConfigSearchRequestParams,
|
|
10
|
+
WtSysTypeFilterConfig,
|
|
11
|
+
} from '../../classes/FilterConfig';
|
|
12
|
+
import { gateFilterSearch } from '../../composables/useFilterReadAccess';
|
|
13
|
+
import { FilterOption } from '../../enums/FilterOption';
|
|
14
|
+
import CaseStatusFilterValueField from './case-status-filter-value-field.vue';
|
|
15
|
+
import CaseStatusFilterValuePreview from './case-status-filter-value-preview.vue';
|
|
16
|
+
|
|
17
|
+
class CaseStatusFilterConfig extends WtSysTypeFilterConfig {
|
|
18
|
+
readonly name = FilterOption.CaseStatus;
|
|
19
|
+
valueInputComponent = CaseStatusFilterValueField;
|
|
20
|
+
valuePreviewComponent = CaseStatusFilterValuePreview;
|
|
21
|
+
|
|
22
|
+
searchStatuses = gateFilterSearch(WtObject.Status, CaseStatusesApi.getLookup);
|
|
23
|
+
searchConditions = gateFilterSearch(
|
|
24
|
+
WtObject.Status,
|
|
25
|
+
CaseStatusConditionsAPI.getLookup,
|
|
26
|
+
);
|
|
27
|
+
|
|
28
|
+
async searchRecords(params: FilterConfigSearchRequestParams) {
|
|
29
|
+
const value = params.id;
|
|
30
|
+
return this.searchConditions({
|
|
31
|
+
parentId: value?.selection,
|
|
32
|
+
id: value?.conditions,
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export type { CaseStatusFilterConfig };
|
|
38
|
+
|
|
39
|
+
export const createCaseStatusFilterConfig = (params?: FilterConfigBaseParams) =>
|
|
40
|
+
new CaseStatusFilterConfig(params);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import CaseStatusFilterValueField from './case-status-filter-value-field.vue';
|
|
2
|
+
import CaseStatusFilterValuePreview from './case-status-filter-value-preview.vue';
|
|
3
|
+
import { createCaseStatusFilterConfig } from './filterConfig';
|
|
4
|
+
|
|
5
|
+
export type * from './filterConfig';
|
|
6
|
+
export {
|
|
7
|
+
CaseStatusFilterValueField,
|
|
8
|
+
CaseStatusFilterValuePreview,
|
|
9
|
+
createCaseStatusFilterConfig,
|
|
10
|
+
};
|
package/src/modules/filters/modules/filterConfig/components/contact/contact-filter-value-field.vue
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<wt-multi-select
|
|
3
3
|
:label="t('webitelUI.filters.filterValue')"
|
|
4
|
-
:
|
|
4
|
+
:disabled="!hasReadAccess"
|
|
5
|
+
:search-method="lookupSearchMethod"
|
|
5
6
|
:model-value="model"
|
|
6
7
|
:v="!disableValidation && v$.model"
|
|
7
8
|
option-value="id"
|
|
@@ -13,14 +14,17 @@
|
|
|
13
14
|
import { useVuelidate } from '@vuelidate/core';
|
|
14
15
|
import { required } from '@vuelidate/validators';
|
|
15
16
|
import { WtMultiSelect } from '@webitel/ui-sdk/components';
|
|
17
|
+
import { WtObject } from '@webitel/ui-sdk/enums';
|
|
16
18
|
import { computed, watch } from 'vue';
|
|
17
19
|
import { useI18n } from 'vue-i18n';
|
|
18
20
|
|
|
19
|
-
import {
|
|
21
|
+
import { WtSysTypeFilterConfig } from '../../classes/FilterConfig';
|
|
22
|
+
import { useFilterReadAccess } from '../../composables/useFilterReadAccess';
|
|
20
23
|
|
|
21
24
|
type ModelValue = number[];
|
|
22
25
|
|
|
23
26
|
const props = defineProps<{
|
|
27
|
+
filterConfig: WtSysTypeFilterConfig;
|
|
24
28
|
disableValidation?: boolean;
|
|
25
29
|
}>();
|
|
26
30
|
|
|
@@ -33,6 +37,9 @@ const emit = defineEmits<{
|
|
|
33
37
|
}>();
|
|
34
38
|
const { t } = useI18n();
|
|
35
39
|
|
|
40
|
+
const { hasReadAccess, gateSearch } = useFilterReadAccess(WtObject.Contact);
|
|
41
|
+
const lookupSearchMethod = gateSearch(props.filterConfig.searchRecords);
|
|
42
|
+
|
|
36
43
|
const v$ = useVuelidate(
|
|
37
44
|
computed(() => ({
|
|
38
45
|
model: {
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ContactsAPI } from '@webitel/api-services/api';
|
|
2
|
+
import { WtObject } from '@webitel/ui-sdk/enums';
|
|
3
|
+
|
|
4
|
+
import {
|
|
5
|
+
type FilterConfigBaseParams,
|
|
6
|
+
WtSysTypeFilterConfig,
|
|
7
|
+
} from '../../classes/FilterConfig';
|
|
8
|
+
import { gateFilterSearch } from '../../composables/useFilterReadAccess';
|
|
9
|
+
import { FilterOption } from '../../enums/FilterOption';
|
|
10
|
+
import ContactFilterValueField from './contact-filter-value-field.vue';
|
|
11
|
+
import ContactFilterValuePreview from './contact-filter-value-preview.vue';
|
|
12
|
+
|
|
13
|
+
class ContactFilterConfig extends WtSysTypeFilterConfig {
|
|
14
|
+
readonly name = FilterOption.Contact;
|
|
15
|
+
valueInputComponent = ContactFilterValueField;
|
|
16
|
+
valuePreviewComponent = ContactFilterValuePreview;
|
|
17
|
+
|
|
18
|
+
searchRecords = gateFilterSearch(WtObject.Contact, ContactsAPI.getLookup);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export const createContactFilterConfig = (params?: FilterConfigBaseParams) =>
|
|
22
|
+
new ContactFilterConfig(params);
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<wt-multi-select
|
|
3
|
+
v-bind="$attrs"
|
|
3
4
|
:label="labelValue"
|
|
4
|
-
:
|
|
5
|
+
:disabled="!hasReadAccess"
|
|
6
|
+
:search-method="searchMethod"
|
|
5
7
|
:v="!disableValidation && vList"
|
|
6
8
|
:model-value="value.list"
|
|
7
9
|
data-key="id"
|
|
8
10
|
option-value="id"
|
|
9
|
-
v-bind="$attrs"
|
|
10
11
|
@update:model-value="changeListValue"
|
|
11
12
|
/>
|
|
12
13
|
<wt-checkbox
|
|
@@ -22,9 +23,11 @@
|
|
|
22
23
|
import { useVuelidate } from '@vuelidate/core';
|
|
23
24
|
import { requiredIf } from '@vuelidate/validators';
|
|
24
25
|
import { WtCheckbox, WtMultiSelect } from '@webitel/ui-sdk/components';
|
|
26
|
+
import { WtObject } from '@webitel/ui-sdk/enums';
|
|
25
27
|
import { computed, onMounted, watch } from 'vue';
|
|
26
28
|
import { useI18n } from 'vue-i18n';
|
|
27
29
|
|
|
30
|
+
import { useFilterReadAccess } from '../../composables/useFilterReadAccess';
|
|
28
31
|
import { IContactGroupFilterConfig } from './index';
|
|
29
32
|
|
|
30
33
|
type ModelValue = {
|
|
@@ -79,6 +82,11 @@ const emit = defineEmits<{
|
|
|
79
82
|
|
|
80
83
|
const { t } = useI18n();
|
|
81
84
|
|
|
85
|
+
const { hasReadAccess, gateSearch } = useFilterReadAccess(
|
|
86
|
+
WtObject.ContactGroup,
|
|
87
|
+
);
|
|
88
|
+
const searchMethod = gateSearch(props.filterConfig.searchRecords);
|
|
89
|
+
|
|
82
90
|
const labelValue = computed(() =>
|
|
83
91
|
props?.hideLabel ? undefined : t('webitelUI.filters.filterValue'),
|
|
84
92
|
);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ContactGroupsAPI as contactGroups } from '@webitel/api-services/api';
|
|
2
|
+
import { WtObject } from '@webitel/ui-sdk/enums';
|
|
2
3
|
|
|
3
4
|
import {
|
|
4
5
|
type FilterConfigBaseParams,
|
|
@@ -7,6 +8,7 @@ import {
|
|
|
7
8
|
type IWtSysTypeFilterConfig,
|
|
8
9
|
WtSysTypeFilterConfig,
|
|
9
10
|
} from '../../classes/FilterConfig';
|
|
11
|
+
import { gateFilterSearch } from '../../composables/useFilterReadAccess';
|
|
10
12
|
import { FilterOption } from '../../enums/FilterOption';
|
|
11
13
|
import ContactGroupFilterValueField from './contact-group-filter-value-field.vue';
|
|
12
14
|
import ContactGroupFilterValuePreview from './contact-group-filter-value-preview.vue';
|
|
@@ -28,7 +30,7 @@ class ContactGroupFilterConfig extends WtSysTypeFilterConfig {
|
|
|
28
30
|
}
|
|
29
31
|
}
|
|
30
32
|
|
|
31
|
-
searchRecords(
|
|
33
|
+
async searchRecords(
|
|
32
34
|
params: FilterConfigSearchRequestParams,
|
|
33
35
|
{ filterValue }: FilterConfigSearchFilterContext = {},
|
|
34
36
|
): Promise<{
|
|
@@ -48,7 +50,10 @@ class ContactGroupFilterConfig extends WtSysTypeFilterConfig {
|
|
|
48
50
|
const idsCount = Array.isArray(id) ? id.length : 10;
|
|
49
51
|
const size = idsCount || params.size;
|
|
50
52
|
|
|
51
|
-
return
|
|
53
|
+
return gateFilterSearch(
|
|
54
|
+
WtObject.ContactGroup,
|
|
55
|
+
contactGroups.getLookup,
|
|
56
|
+
)({
|
|
52
57
|
...params,
|
|
53
58
|
id,
|
|
54
59
|
size,
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<wt-multi-select
|
|
3
|
+
v-bind="$attrs"
|
|
3
4
|
:label="labelValue"
|
|
4
|
-
:
|
|
5
|
+
:disabled="!hasReadAccess"
|
|
6
|
+
:search-method="searchMethod"
|
|
5
7
|
:v="!disableValidation && v$?.model"
|
|
6
8
|
:model-value="model"
|
|
7
9
|
option-label="label"
|
|
8
10
|
data-key="label"
|
|
9
|
-
v-bind="$attrs"
|
|
10
11
|
@update:model-value="handleInput"
|
|
11
12
|
/>
|
|
12
13
|
</template>
|
|
@@ -15,10 +16,12 @@
|
|
|
15
16
|
import { useVuelidate } from '@vuelidate/core';
|
|
16
17
|
import { required } from '@vuelidate/validators';
|
|
17
18
|
import { WtMultiSelect } from '@webitel/ui-sdk/components';
|
|
19
|
+
import { WtObject } from '@webitel/ui-sdk/enums';
|
|
18
20
|
import { computed, onMounted, watch } from 'vue';
|
|
19
21
|
import { useI18n } from 'vue-i18n';
|
|
20
22
|
|
|
21
23
|
import { WtSysTypeFilterConfig } from '../../classes/FilterConfig';
|
|
24
|
+
import { useFilterReadAccess } from '../../composables/useFilterReadAccess';
|
|
22
25
|
|
|
23
26
|
const props = defineProps<{
|
|
24
27
|
filterConfig: WtSysTypeFilterConfig;
|
|
@@ -37,6 +40,9 @@ const emit = defineEmits<{
|
|
|
37
40
|
}>();
|
|
38
41
|
const { t } = useI18n();
|
|
39
42
|
|
|
43
|
+
const { hasReadAccess, gateSearch } = useFilterReadAccess(WtObject.Contact);
|
|
44
|
+
const searchMethod = gateSearch(props.filterConfig.searchRecords);
|
|
45
|
+
|
|
40
46
|
const labelValue = computed(() =>
|
|
41
47
|
props?.hideLabel ? undefined : t('webitelUI.filters.filterValue'),
|
|
42
48
|
);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { LabelsAPI as contactLabels } from '@webitel/api-services/api';
|
|
2
|
+
import { WtObject } from '@webitel/ui-sdk/enums';
|
|
2
3
|
|
|
3
4
|
import {
|
|
4
5
|
type FilterConfigBaseParams,
|
|
@@ -6,6 +7,7 @@ import {
|
|
|
6
7
|
type FilterConfigSearchRequestParams,
|
|
7
8
|
WtSysTypeFilterConfig,
|
|
8
9
|
} from '../../classes/FilterConfig';
|
|
10
|
+
import { gateFilterSearch } from '../../composables/useFilterReadAccess';
|
|
9
11
|
import { FilterOption } from '../../enums/FilterOption';
|
|
10
12
|
import ContactLabelFilterValueField from './contact-label-filter-value-field.vue';
|
|
11
13
|
import ContactLabelFilterValuePreview from './contact-label-filter-value-preview.vue';
|
|
@@ -15,7 +17,7 @@ class ContactLabelFilterConfig extends WtSysTypeFilterConfig {
|
|
|
15
17
|
valueInputComponent = ContactLabelFilterValueField;
|
|
16
18
|
valuePreviewComponent = ContactLabelFilterValuePreview;
|
|
17
19
|
|
|
18
|
-
searchRecords(
|
|
20
|
+
async searchRecords(
|
|
19
21
|
params: FilterConfigSearchRequestParams,
|
|
20
22
|
{
|
|
21
23
|
filterValue,
|
|
@@ -32,11 +34,11 @@ class ContactLabelFilterConfig extends WtSysTypeFilterConfig {
|
|
|
32
34
|
// For label preview component no need to call the API, so we return filterValue back to the searchRecords method and display it
|
|
33
35
|
|
|
34
36
|
if (filterValue)
|
|
35
|
-
return
|
|
37
|
+
return {
|
|
36
38
|
items: filterValue,
|
|
37
|
-
}
|
|
39
|
+
};
|
|
38
40
|
|
|
39
|
-
return contactLabels.getLookup(params);
|
|
41
|
+
return gateFilterSearch(WtObject.Contact, contactLabels.getLookup)(params);
|
|
40
42
|
}
|
|
41
43
|
}
|
|
42
44
|
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<wt-multi-select
|
|
3
3
|
:label="t('webitelUI.filters.filterValue')"
|
|
4
|
-
:
|
|
4
|
+
:disabled="!hasReadAccess"
|
|
5
|
+
:search-method="searchMethod"
|
|
5
6
|
:v="!disableValidation && v$.model"
|
|
6
7
|
:model-value="model"
|
|
7
8
|
option-value="id"
|
|
@@ -13,10 +14,12 @@
|
|
|
13
14
|
import { useVuelidate } from '@vuelidate/core';
|
|
14
15
|
import { required } from '@vuelidate/validators';
|
|
15
16
|
import { WtMultiSelect } from '@webitel/ui-sdk/components';
|
|
17
|
+
import { WtObject } from '@webitel/ui-sdk/enums';
|
|
16
18
|
import { computed, watch } from 'vue';
|
|
17
19
|
import { useI18n } from 'vue-i18n';
|
|
18
20
|
|
|
19
21
|
import { WtSysTypeFilterConfig } from '../../classes/FilterConfig';
|
|
22
|
+
import { useFilterReadAccess } from '../../composables/useFilterReadAccess';
|
|
20
23
|
|
|
21
24
|
const props = defineProps<{
|
|
22
25
|
filterConfig: WtSysTypeFilterConfig;
|
|
@@ -34,6 +37,9 @@ const emit = defineEmits<{
|
|
|
34
37
|
}>();
|
|
35
38
|
const { t } = useI18n();
|
|
36
39
|
|
|
40
|
+
const { hasReadAccess, gateSearch } = useFilterReadAccess(WtObject.User);
|
|
41
|
+
const searchMethod = gateSearch(props.filterConfig.searchRecords);
|
|
42
|
+
|
|
37
43
|
const v$ = useVuelidate(
|
|
38
44
|
computed(() => ({
|
|
39
45
|
model: {
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { UsersAPI } from '@webitel/api-services/api';
|
|
2
|
+
import { WtObject } from '@webitel/ui-sdk/enums';
|
|
2
3
|
|
|
3
4
|
import {
|
|
4
5
|
type FilterConfigBaseParams,
|
|
5
6
|
WtSysTypeFilterConfig,
|
|
6
7
|
} from '../../classes/FilterConfig';
|
|
8
|
+
import { gateFilterSearch } from '../../composables/useFilterReadAccess';
|
|
7
9
|
import { FilterOption } from '../../enums/FilterOption';
|
|
8
10
|
import ContactOwnerFilterValueField from './contact-owner-filter-value-field.vue';
|
|
9
11
|
import ContactOwnerFilterValuePreview from './contact-owner-filter-value-preview.vue';
|
|
@@ -13,12 +15,7 @@ class ContactOwnerFilterConfig extends WtSysTypeFilterConfig {
|
|
|
13
15
|
valueInputComponent = ContactOwnerFilterValueField;
|
|
14
16
|
valuePreviewComponent = ContactOwnerFilterValuePreview;
|
|
15
17
|
|
|
16
|
-
searchRecords(
|
|
17
|
-
items: unknown[];
|
|
18
|
-
next?: boolean;
|
|
19
|
-
}> {
|
|
20
|
-
return UsersAPI.getLookup(params);
|
|
21
|
-
}
|
|
18
|
+
searchRecords = gateFilterSearch(WtObject.User, UsersAPI.getLookup);
|
|
22
19
|
}
|
|
23
20
|
|
|
24
21
|
export const createContactOwnerFilterConfig = (
|
package/src/modules/filters/modules/filterConfig/components/gateway/gateway-filter-value-field.vue
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<wt-multi-select
|
|
3
3
|
:label="labelValue"
|
|
4
|
-
:
|
|
4
|
+
:disabled="!hasReadAccess"
|
|
5
|
+
:search-method="lookupSearchMethod"
|
|
5
6
|
:v="!disableValidation && v$.model"
|
|
6
7
|
:model-value="model"
|
|
7
8
|
option-value="id"
|
|
@@ -13,18 +14,19 @@
|
|
|
13
14
|
import { useVuelidate } from '@vuelidate/core';
|
|
14
15
|
import { required } from '@vuelidate/validators';
|
|
15
16
|
import { WtMultiSelect } from '@webitel/ui-sdk/components';
|
|
17
|
+
import { WtObject } from '@webitel/ui-sdk/enums';
|
|
16
18
|
import { computed, onMounted, watch } from 'vue';
|
|
17
19
|
import { useI18n } from 'vue-i18n';
|
|
18
20
|
|
|
19
21
|
import { WtSysTypeFilterConfig } from '../../classes/FilterConfig';
|
|
20
|
-
import {
|
|
22
|
+
import { useFilterReadAccess } from '../../composables/useFilterReadAccess';
|
|
21
23
|
|
|
22
24
|
type ModelValue = number[];
|
|
23
25
|
|
|
24
26
|
const model = defineModel<ModelValue>();
|
|
25
27
|
|
|
26
28
|
const props = defineProps<{
|
|
27
|
-
filterConfig
|
|
29
|
+
filterConfig: WtSysTypeFilterConfig;
|
|
28
30
|
disableValidation?: boolean;
|
|
29
31
|
}>();
|
|
30
32
|
|
|
@@ -35,6 +37,8 @@ const emit = defineEmits<{
|
|
|
35
37
|
}>();
|
|
36
38
|
const { t } = useI18n();
|
|
37
39
|
|
|
40
|
+
const { hasReadAccess, gateSearch } = useFilterReadAccess(WtObject.Gateway);
|
|
41
|
+
|
|
38
42
|
const labelValue = computed(() => {
|
|
39
43
|
const value = props?.filterConfig?.showFilterName
|
|
40
44
|
? props?.filterConfig.name
|
|
@@ -60,13 +64,7 @@ onMounted(() => {
|
|
|
60
64
|
if (!props.disableValidation) v$.value.$touch();
|
|
61
65
|
});
|
|
62
66
|
|
|
63
|
-
const
|
|
64
|
-
return params.search
|
|
65
|
-
? await searchMethod({
|
|
66
|
-
name: params.search,
|
|
67
|
-
})
|
|
68
|
-
: await searchMethod(params);
|
|
69
|
-
};
|
|
67
|
+
const lookupSearchMethod = gateSearch(props.filterConfig.searchRecords);
|
|
70
68
|
|
|
71
69
|
watch(
|
|
72
70
|
() => v$.value.$invalid,
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { GatewaysAPI } from '@webitel/api-services/api';
|
|
2
|
+
import { WtObject } from '@webitel/ui-sdk/enums';
|
|
3
|
+
|
|
4
|
+
import {
|
|
5
|
+
type FilterConfigBaseParams,
|
|
6
|
+
type FilterConfigSearchRequestParams,
|
|
7
|
+
WtSysTypeFilterConfig,
|
|
8
|
+
} from '../../classes/FilterConfig';
|
|
9
|
+
import { gateFilterSearch } from '../../composables/useFilterReadAccess';
|
|
10
|
+
import { FilterOption } from '../../enums/FilterOption';
|
|
11
|
+
import GatewayFilterValueField from './gateway-filter-value-field.vue';
|
|
12
|
+
import GatewayFilterValuePreview from './gateway-filter-value-preview.vue';
|
|
13
|
+
|
|
14
|
+
class GatewayFilterConfig extends WtSysTypeFilterConfig {
|
|
15
|
+
readonly name = FilterOption.Gateway;
|
|
16
|
+
valueInputComponent = GatewayFilterValueField;
|
|
17
|
+
valuePreviewComponent = GatewayFilterValuePreview;
|
|
18
|
+
|
|
19
|
+
searchRecords = gateFilterSearch(
|
|
20
|
+
WtObject.Gateway,
|
|
21
|
+
(params: FilterConfigSearchRequestParams) =>
|
|
22
|
+
params.search
|
|
23
|
+
? GatewaysAPI.getLookup({
|
|
24
|
+
name: params.search,
|
|
25
|
+
})
|
|
26
|
+
: GatewaysAPI.getLookup(params),
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export const createGatewayFilterConfig = (params?: FilterConfigBaseParams) =>
|
|
31
|
+
new GatewayFilterConfig(params);
|
package/src/modules/filters/modules/filterConfig/components/grantee/grantee-filter-value-field.vue
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<wt-multi-select
|
|
3
3
|
:label="t('webitelUI.filters.filterValue')"
|
|
4
|
-
:
|
|
4
|
+
:disabled="!hasReadAccess"
|
|
5
|
+
:search-method="lookupSearchMethod"
|
|
5
6
|
:model-value="model"
|
|
6
7
|
:v="!disableValidation && v$.model"
|
|
7
8
|
option-value="id"
|
|
@@ -13,14 +14,17 @@
|
|
|
13
14
|
import { useVuelidate } from '@vuelidate/core';
|
|
14
15
|
import { required } from '@vuelidate/validators';
|
|
15
16
|
import { WtMultiSelect } from '@webitel/ui-sdk/components';
|
|
17
|
+
import { WtObject } from '@webitel/ui-sdk/enums';
|
|
16
18
|
import { computed, watch } from 'vue';
|
|
17
19
|
import { useI18n } from 'vue-i18n';
|
|
18
20
|
|
|
19
|
-
import {
|
|
21
|
+
import { WtSysTypeFilterConfig } from '../../classes/FilterConfig';
|
|
22
|
+
import { useFilterReadAccess } from '../../composables/useFilterReadAccess';
|
|
20
23
|
|
|
21
24
|
type ModelValue = number[];
|
|
22
25
|
|
|
23
26
|
const props = defineProps<{
|
|
27
|
+
filterConfig: WtSysTypeFilterConfig;
|
|
24
28
|
disableValidation?: boolean;
|
|
25
29
|
}>();
|
|
26
30
|
|
|
@@ -33,6 +37,9 @@ const emit = defineEmits<{
|
|
|
33
37
|
}>();
|
|
34
38
|
const { t } = useI18n();
|
|
35
39
|
|
|
40
|
+
const { hasReadAccess, gateSearch } = useFilterReadAccess(WtObject.Role);
|
|
41
|
+
const lookupSearchMethod = gateSearch(props.filterConfig.searchRecords);
|
|
42
|
+
|
|
36
43
|
const v$ = useVuelidate(
|
|
37
44
|
computed(() => ({
|
|
38
45
|
model: {
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import RolesAPI from '@webitel/ui-sdk/api/clients/roles/roles';
|
|
2
|
+
import { WtObject } from '@webitel/ui-sdk/enums';
|
|
3
|
+
|
|
4
|
+
import {
|
|
5
|
+
type FilterConfigBaseParams,
|
|
6
|
+
WtSysTypeFilterConfig,
|
|
7
|
+
} from '../../classes/FilterConfig';
|
|
8
|
+
import { gateFilterSearch } from '../../composables/useFilterReadAccess';
|
|
9
|
+
import { FilterOption } from '../../enums/FilterOption';
|
|
10
|
+
import GranteeFilterValueField from './grantee-filter-value-field.vue';
|
|
11
|
+
import GranteeFilterValuePreview from './grantee-filter-value-preview.vue';
|
|
12
|
+
|
|
13
|
+
class GranteeFilterConfig extends WtSysTypeFilterConfig {
|
|
14
|
+
readonly name = FilterOption.Grantee;
|
|
15
|
+
valueInputComponent = GranteeFilterValueField;
|
|
16
|
+
valuePreviewComponent = GranteeFilterValuePreview;
|
|
17
|
+
|
|
18
|
+
searchRecords = gateFilterSearch(WtObject.Role, RolesAPI.getLookup);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export const createGranteeFilterConfig = (params?: FilterConfigBaseParams) =>
|
|
22
|
+
new GranteeFilterConfig(params);
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import type { Component } from 'vue';
|
|
2
2
|
|
|
3
|
-
import type { FilterConfigSearchMethodParams } from '../classes/FilterConfig';
|
|
4
3
|
import { FilterOption } from '../enums/FilterOption';
|
|
5
4
|
import DateTimeOptionsFilterValueField from './_shared/date-time-filter/date-time-options/date-time-options-filter-value-field.vue';
|
|
6
5
|
import DateTimeOptionsFilterValuePreview from './_shared/date-time-filter/date-time-options/date-time-options-filter-value-preview.vue';
|
|
7
6
|
import StringFilterValueField from './_shared/string-filter/string-filter-value-field.vue';
|
|
8
7
|
import StringFilterValuePreview from './_shared/string-filter/string-filter-value-preview.vue';
|
|
8
|
+
import { createAgentFilterConfig } from './agent';
|
|
9
9
|
import AgentFilter from './agent/agent-filter-value-field.vue';
|
|
10
10
|
import AgentFilterPreview from './agent/agent-filter-value-preview.vue';
|
|
11
|
-
import { searchMethod as agentSearchMethod } from './agent/config';
|
|
12
11
|
import AgentStatusFilter from './agent-status/agent-status-filter-value-field.vue';
|
|
13
12
|
import AgentStatusFilterPreview from './agent-status/agent-status-filter-value-preview.vue';
|
|
14
13
|
import AmdResultFilter from './amd-result/amd-result-filter-value-field.vue';
|
|
@@ -28,41 +27,41 @@ import CaseActualReactionTimeFilterValuePreview from './case-actual-reaction-tim
|
|
|
28
27
|
import CaseActualResolutionTimeFilterValueField from './case-actual-resolution-time/case-actual-resolution-time-filter-value-field.vue';
|
|
29
28
|
import CaseActualResolutionTimeFilterValuePreview from './case-actual-resolution-time/case-actual-resolution-time-filter-value-preview.vue';
|
|
30
29
|
import { createCaseAssigneeFilterConfig } from './case-assignee';
|
|
30
|
+
import { createCaseAuthorFilterConfig } from './case-author';
|
|
31
31
|
import CaseAuthorFilterValueField from './case-author/case-author-filter-value-field.vue';
|
|
32
32
|
import CaseAuthorFilterValuePreview from './case-author/case-author-filter-value-preview.vue';
|
|
33
|
-
import {
|
|
33
|
+
import { createCaseCloseReasonGroupsFilterConfig } from './case-close-reason-groups';
|
|
34
34
|
import CaseCloseReasonGroupsFilterValueField from './case-close-reason-groups/case-close-reason-groups-filter-value-field.vue';
|
|
35
35
|
import CaseCloseReasonGroupsFilterValuePreview from './case-close-reason-groups/case-close-reason-groups-filter-value-preview.vue';
|
|
36
|
-
import {
|
|
36
|
+
import { createCaseImpactedFilterConfig } from './case-impacted';
|
|
37
37
|
import CaseImpactedFilterValueField from './case-impacted/case-impacted-filter-value-field.vue';
|
|
38
38
|
import CaseImpactedFilterValuePreview from './case-impacted/case-impacted-filter-value-preview.vue';
|
|
39
|
-
import {
|
|
39
|
+
import { createCasePriorityFilterConfig } from './case-priority';
|
|
40
40
|
import CasePriorityFilterValueField from './case-priority/case-priority-filter-value-field.vue';
|
|
41
41
|
import CasePriorityFilterValuePreview from './case-priority/case-priority-filter-value-preview.vue';
|
|
42
|
-
import { searchMethod as casePrioritySearchMethod } from './case-priority/config';
|
|
43
42
|
import CaseReactionTimeFilterValueField from './case-reaction-time/case-reaction-time-filter-value-field.vue';
|
|
44
43
|
import CaseReactionTimeFilterValuePreview from './case-reaction-time/case-reaction-time-filter-value-preview.vue';
|
|
44
|
+
import { createCaseReporterFilterConfig } from './case-reporter';
|
|
45
45
|
import CaseReporterFilterValueField from './case-reporter/case-reporter-filter-value-field.vue';
|
|
46
46
|
import CaseReporterFilterValuePreview from './case-reporter/case-reporter-filter-value-preview.vue';
|
|
47
|
-
import { searchMethod as caseReporterSearchMethod } from './case-reporter/config';
|
|
48
47
|
import CaseResolutionTimeFilterValueField from './case-resolution-time/case-resolution-time-filter-value-field.vue';
|
|
49
48
|
import CaseResolutionTimeFilterValuePreview from './case-resolution-time/case-resolution-time-filter-value-preview.vue';
|
|
49
|
+
import { createCaseServiceFilterConfig } from './case-service';
|
|
50
50
|
import CaseServiceFilterValueField from './case-service/case-service-filter-value-field.vue';
|
|
51
51
|
import CaseServiceFilterValuePreview from './case-service/case-service-filter-value-preview.vue';
|
|
52
|
-
import {
|
|
52
|
+
import { createCaseSlaFilterConfig } from './case-sla';
|
|
53
53
|
import CaseSlaFilterValueField from './case-sla/case-sla-filter-value-field.vue';
|
|
54
54
|
import CaseSlaFilterValuePreview from './case-sla/case-sla-filter-value-preview.vue';
|
|
55
|
-
import {
|
|
55
|
+
import { createCaseSlaConditionFilterConfig } from './case-sla-condition';
|
|
56
56
|
import CaseSlaConditionFilterValueField from './case-sla-condition/case-sla-condition-filter-value-field.vue';
|
|
57
57
|
import CaseSlaConditionFilterValuePreview from './case-sla-condition/case-sla-condition-filter-value-preview.vue';
|
|
58
|
-
import {
|
|
58
|
+
import { createCaseSourceFilterConfig } from './case-source';
|
|
59
59
|
import CaseSourceFilterValueField from './case-source/case-source-filter-value-field.vue';
|
|
60
60
|
import CaseSourceFilterValuePreview from './case-source/case-source-filter-value-preview.vue';
|
|
61
|
-
import {
|
|
61
|
+
import { createCaseStatusFilterConfig } from './case-status';
|
|
62
62
|
import CaseStatusFilterValueField from './case-status/case-status-filter-value-field.vue';
|
|
63
63
|
import CaseStatusFilterValuePreview from './case-status/case-status-filter-value-preview.vue';
|
|
64
|
-
import {
|
|
65
|
-
import { searchMethod as contactSearchMethod } from './contact/config';
|
|
64
|
+
import { createContactFilterConfig } from './contact';
|
|
66
65
|
import ContactFilter from './contact/contact-filter-value-field.vue';
|
|
67
66
|
import ContactFilterPreview from './contact/contact-filter-value-preview.vue';
|
|
68
67
|
import { createContactGroupFilterConfig } from './contact-group';
|
|
@@ -74,10 +73,10 @@ import ContactLabelFilterPreview from './contact-label/contact-label-filter-valu
|
|
|
74
73
|
import { createContactOwnerFilterConfig } from './contact-owner';
|
|
75
74
|
import ContactOwnerFilter from './contact-owner/contact-owner-filter-value-field.vue';
|
|
76
75
|
import ContactOwnerFilterPreview from './contact-owner/contact-owner-filter-value-preview.vue';
|
|
77
|
-
import {
|
|
76
|
+
import { createGatewayFilterConfig } from './gateway';
|
|
78
77
|
import GatewayFilter from './gateway/gateway-filter-value-field.vue';
|
|
79
78
|
import GatewayFilterPreview from './gateway/gateway-filter-value-preview.vue';
|
|
80
|
-
import {
|
|
79
|
+
import { createGranteeFilterConfig } from './grantee';
|
|
81
80
|
import GranteeFilter from './grantee/grantee-filter-value-field.vue';
|
|
82
81
|
import GranteeFilterPreview from './grantee/grantee-filter-value-preview.vue';
|
|
83
82
|
import HangupCauseFilterValueField from './hangup-cause/hangup-cause-filter-value-field.vue';
|
|
@@ -99,7 +98,7 @@ import QueuePeriodFilter from './queue-period/queue-period-filter-value-field.vu
|
|
|
99
98
|
import QueuePeriodFilterPreview from './queue-period/queue-period-filter-value-preview.vue';
|
|
100
99
|
import QueueTypeFilter from './queue-type/queue-type-filter-value-field.vue';
|
|
101
100
|
import QueueTypeFilterPreview from './queue-type/queue-type-filter-value-preview.vue';
|
|
102
|
-
import {
|
|
101
|
+
import { createRatedByFilterConfig } from './rated-by';
|
|
103
102
|
import RatedByFilter from './rated-by/rated-by-filter-value-field.vue';
|
|
104
103
|
import RatedByFilterPreview from './rated-by/rated-by-filter-value-preview.vue';
|
|
105
104
|
import RatingFromToFilter from './rating/rating-from-to-filter-value-field.vue';
|
|
@@ -129,7 +128,7 @@ import TeamFilter from './team/team-filter-value-field.vue';
|
|
|
129
128
|
import TeamFilterPreview from './team/team-filter-value-preview.vue';
|
|
130
129
|
import TotalDurationFilter from './total-duration/total-duration-filter-value-field.vue';
|
|
131
130
|
import TotalDurationFilterPreview from './total-duration/total-duration-filter-value-preview.vue';
|
|
132
|
-
import {
|
|
131
|
+
import { createUserFilterConfig } from './user';
|
|
133
132
|
import UserFilter from './user/user-filter-value-field.vue';
|
|
134
133
|
import UserFilterPreview from './user/user-filter-value-preview.vue';
|
|
135
134
|
import UtilizationProgressFilter from './utilization-progress/utilization-progress-filter-value-field.vue';
|
|
@@ -371,58 +370,33 @@ export const FilterOptionToPreviewComponentMap: Record<
|
|
|
371
370
|
[FilterOption.HasAttachment]: HasAttachmentFilterPreview,
|
|
372
371
|
};
|
|
373
372
|
|
|
374
|
-
export const FilterOptionToPreviewApiSearchMethodMap: Record<
|
|
375
|
-
FilterOption,
|
|
376
|
-
(...params: FilterConfigSearchMethodParams) => Promise<{
|
|
377
|
-
items: unknown[];
|
|
378
|
-
next?: boolean;
|
|
379
|
-
}>
|
|
380
|
-
> = {
|
|
381
|
-
[FilterOption.Agent]: agentSearchMethod,
|
|
382
|
-
[FilterOption.Gateway]: gatewaySearchMethod,
|
|
383
|
-
[FilterOption.Grantee]: granteeSearchMethod,
|
|
384
|
-
[FilterOption.RatedBy]: ratedBySearchMethod,
|
|
385
|
-
[FilterOption.CaseReporter]: caseReporterSearchMethod,
|
|
386
|
-
[FilterOption.CaseSla]: caseSlaSearchMethod,
|
|
387
|
-
[FilterOption.CaseService]: servicesSearchMethod,
|
|
388
|
-
[FilterOption.CaseSource]: caseSourceSearchMethod,
|
|
389
|
-
[FilterOption.CaseStatus]: ({ id: value }) =>
|
|
390
|
-
caseStatusConditionsSearchMethod({
|
|
391
|
-
parentId: value?.selection,
|
|
392
|
-
id: value?.conditions,
|
|
393
|
-
}),
|
|
394
|
-
[FilterOption.User]: userSearchMethod,
|
|
395
|
-
[FilterOption.CaseAuthor]: caseAuthorSearchMethod,
|
|
396
|
-
[FilterOption.CasePriority]: casePrioritySearchMethod,
|
|
397
|
-
[FilterOption.CaseImpacted]: caseImpactedSearchMethod,
|
|
398
|
-
[FilterOption.Contact]: contactSearchMethod,
|
|
399
|
-
[FilterOption.CaseCloseReasonGroups]: ({ id: value, ...rest }) => {
|
|
400
|
-
return caseCloseReasonsSearchMethod({
|
|
401
|
-
parentId: value?.selection,
|
|
402
|
-
id: value?.conditions,
|
|
403
|
-
...rest,
|
|
404
|
-
});
|
|
405
|
-
},
|
|
406
|
-
[FilterOption.CaseSlaCondition]: ({ id: value, ...rest }) => {
|
|
407
|
-
return slasConditionsSearchMethod({
|
|
408
|
-
parentId: value?.selection,
|
|
409
|
-
id: value?.conditions,
|
|
410
|
-
...rest,
|
|
411
|
-
});
|
|
412
|
-
},
|
|
413
|
-
};
|
|
414
|
-
|
|
415
373
|
export const FilterOptionToFilterConfigCreatorMap = {
|
|
374
|
+
[FilterOption.Agent]: createAgentFilterConfig,
|
|
375
|
+
[FilterOption.Auditor]: createAuditorFilterConfig,
|
|
376
|
+
[FilterOption.Bucket]: createBucketFilterConfig,
|
|
416
377
|
[FilterOption.CaseAssignee]: createCaseAssigneeFilterConfig,
|
|
378
|
+
[FilterOption.CaseAuthor]: createCaseAuthorFilterConfig,
|
|
379
|
+
[FilterOption.CaseCloseReasonGroups]: createCaseCloseReasonGroupsFilterConfig,
|
|
380
|
+
[FilterOption.CaseImpacted]: createCaseImpactedFilterConfig,
|
|
381
|
+
[FilterOption.CasePriority]: createCasePriorityFilterConfig,
|
|
382
|
+
[FilterOption.CaseReporter]: createCaseReporterFilterConfig,
|
|
383
|
+
[FilterOption.CaseService]: createCaseServiceFilterConfig,
|
|
384
|
+
[FilterOption.CaseSla]: createCaseSlaFilterConfig,
|
|
385
|
+
[FilterOption.CaseSlaCondition]: createCaseSlaConditionFilterConfig,
|
|
386
|
+
[FilterOption.CaseSource]: createCaseSourceFilterConfig,
|
|
387
|
+
[FilterOption.CaseStatus]: createCaseStatusFilterConfig,
|
|
388
|
+
[FilterOption.Contact]: createContactFilterConfig,
|
|
389
|
+
[FilterOption.ContactGroup]: createContactGroupFilterConfig,
|
|
417
390
|
[FilterOption.ContactLabel]: createContactLabelFilterConfig,
|
|
418
391
|
[FilterOption.ContactOwner]: createContactOwnerFilterConfig,
|
|
419
|
-
[FilterOption.
|
|
420
|
-
[FilterOption.
|
|
392
|
+
[FilterOption.Gateway]: createGatewayFilterConfig,
|
|
393
|
+
[FilterOption.Grantee]: createGranteeFilterConfig,
|
|
421
394
|
[FilterOption.Queue]: createQueueFilterConfig,
|
|
395
|
+
[FilterOption.QueueTags]: createQueueTagsFilterConfig,
|
|
396
|
+
[FilterOption.RatedBy]: createRatedByFilterConfig,
|
|
397
|
+
[FilterOption.Region]: createRegionFilterConfig,
|
|
422
398
|
[FilterOption.Skill]: createSkillFilterConfig,
|
|
423
399
|
[FilterOption.Supervisor]: createSupervisorFilterConfig,
|
|
424
|
-
[FilterOption.
|
|
425
|
-
[FilterOption.
|
|
426
|
-
[FilterOption.Bucket]: createBucketFilterConfig,
|
|
427
|
-
[FilterOption.QueueTags]: createQueueTagsFilterConfig,
|
|
400
|
+
[FilterOption.Team]: createTeamFilterConfig,
|
|
401
|
+
[FilterOption.User]: createUserFilterConfig,
|
|
428
402
|
};
|