@webitel/ui-datalist 26.8.17 → 26.8.19
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/_shared/has-options/__tests__/has-option-filter-value-field.spec.ts +1 -1
- 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/has-user/has-user-filter-value-field.vue +2 -3
- 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/has-user/has-user-filter-value-field.vue.d.ts +1 -2
- 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
|
@@ -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
|
};
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { QueuesAPI } 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 QueueFilterValueField from './queue-filter-value-field.vue';
|
|
9
11
|
import QueueFilterValuePreview from './queue-filter-value-preview.vue';
|
|
@@ -13,12 +15,7 @@ class QueueFilterConfig extends WtSysTypeFilterConfig {
|
|
|
13
15
|
valueInputComponent = QueueFilterValueField;
|
|
14
16
|
valuePreviewComponent = QueueFilterValuePreview;
|
|
15
17
|
|
|
16
|
-
searchRecords(
|
|
17
|
-
items: unknown[];
|
|
18
|
-
next?: boolean;
|
|
19
|
-
}> {
|
|
20
|
-
return QueuesAPI.getLookup(params);
|
|
21
|
-
}
|
|
18
|
+
searchRecords = gateFilterSearch(WtObject.Queue, QueuesAPI.getLookup);
|
|
22
19
|
}
|
|
23
20
|
|
|
24
21
|
export const createQueueFilterConfig = (params?: FilterConfigBaseParams) =>
|
package/src/modules/filters/modules/filterConfig/components/queue/queue-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="searchMethod"
|
|
5
6
|
:model-value="model"
|
|
6
7
|
:v="!disableValidation && v$.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, onMounted, 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
|
type ModelValue = number[];
|
|
22
25
|
|
|
@@ -34,6 +37,9 @@ const emit = defineEmits<{
|
|
|
34
37
|
}>();
|
|
35
38
|
const { t } = useI18n();
|
|
36
39
|
|
|
40
|
+
const { hasReadAccess, gateSearch } = useFilterReadAccess(WtObject.Queue);
|
|
41
|
+
const searchMethod = gateSearch(props.filterConfig.searchRecords);
|
|
42
|
+
|
|
37
43
|
const labelValue = computed(() =>
|
|
38
44
|
t(
|
|
39
45
|
`webitelUI.filters.${
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { UsersAPI } 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 RatedByFilterValueField from './rated-by-filter-value-field.vue';
|
|
11
|
+
import RatedByFilterValuePreview from './rated-by-filter-value-preview.vue';
|
|
12
|
+
|
|
13
|
+
class RatedByFilterConfig extends WtSysTypeFilterConfig {
|
|
14
|
+
readonly name = FilterOption.RatedBy;
|
|
15
|
+
valueInputComponent = RatedByFilterValueField;
|
|
16
|
+
valuePreviewComponent = RatedByFilterValuePreview;
|
|
17
|
+
|
|
18
|
+
searchRecords = gateFilterSearch(WtObject.User, UsersAPI.getLookup);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export const createRatedByFilterConfig = (params?: FilterConfigBaseParams) =>
|
|
22
|
+
new RatedByFilterConfig(params);
|
package/src/modules/filters/modules/filterConfig/components/rated-by/rated-by-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
|
:model-value="model"
|
|
6
7
|
:v="!disableValidation && v$.model"
|
|
7
8
|
option-value="id"
|
|
@@ -13,16 +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
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 props = defineProps<{
|
|
25
|
-
filterConfig
|
|
27
|
+
filterConfig: WtSysTypeFilterConfig;
|
|
26
28
|
disableValidation?: boolean;
|
|
27
29
|
}>();
|
|
28
30
|
|
|
@@ -35,6 +37,9 @@ const emit = defineEmits<{
|
|
|
35
37
|
}>();
|
|
36
38
|
const { t } = useI18n();
|
|
37
39
|
|
|
40
|
+
const { hasReadAccess, gateSearch } = useFilterReadAccess(WtObject.User);
|
|
41
|
+
const lookupSearchMethod = gateSearch(props.filterConfig.searchRecords);
|
|
42
|
+
|
|
38
43
|
const labelValue = computed(() => {
|
|
39
44
|
const value = props?.filterConfig?.showFilterName
|
|
40
45
|
? props?.filterConfig.name
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { RegionsAPI } 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 RegionFilterValueField from './region-filter-value-field.vue';
|
|
9
11
|
import RegionFilterValuePreview from './region-filter-value-preview.vue';
|
|
@@ -12,12 +14,7 @@ class RegionFilterConfig extends WtSysTypeFilterConfig {
|
|
|
12
14
|
readonly name = FilterOption.Region;
|
|
13
15
|
valueInputComponent = RegionFilterValueField;
|
|
14
16
|
valuePreviewComponent = RegionFilterValuePreview;
|
|
15
|
-
searchRecords(
|
|
16
|
-
items: unknown[];
|
|
17
|
-
next?: boolean;
|
|
18
|
-
}> {
|
|
19
|
-
return RegionsAPI.getLookup(params);
|
|
20
|
-
}
|
|
17
|
+
searchRecords = gateFilterSearch(WtObject.Region, RegionsAPI.getLookup);
|
|
21
18
|
}
|
|
22
19
|
|
|
23
20
|
export const createRegionFilterConfig = (params?: FilterConfigBaseParams) =>
|
package/src/modules/filters/modules/filterConfig/components/region/region-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="searchMethod"
|
|
5
6
|
:model-value="model"
|
|
6
7
|
:v="!disableValidation && v$.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, onMounted, 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
|
type ModelValue = number[];
|
|
22
25
|
|
|
@@ -34,6 +37,9 @@ const emit = defineEmits<{
|
|
|
34
37
|
}>();
|
|
35
38
|
const { t } = useI18n();
|
|
36
39
|
|
|
40
|
+
const { hasReadAccess, gateSearch } = useFilterReadAccess(WtObject.Region);
|
|
41
|
+
const searchMethod = gateSearch(props.filterConfig.searchRecords);
|
|
42
|
+
|
|
37
43
|
const labelValue = computed(() =>
|
|
38
44
|
t(
|
|
39
45
|
`webitelUI.filters.${
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { SkillsAPI } 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 SkillFilterValueField from './skill-filter-value-field.vue';
|
|
9
11
|
import SkillFilterValuePreview from './skill-filter-value-preview.vue';
|
|
@@ -13,12 +15,7 @@ class SkillFilterConfig extends WtSysTypeFilterConfig {
|
|
|
13
15
|
valueInputComponent = SkillFilterValueField;
|
|
14
16
|
valuePreviewComponent = SkillFilterValuePreview;
|
|
15
17
|
|
|
16
|
-
searchRecords(
|
|
17
|
-
items: unknown[];
|
|
18
|
-
next?: boolean;
|
|
19
|
-
}> {
|
|
20
|
-
return SkillsAPI.getLookup(params);
|
|
21
|
-
}
|
|
18
|
+
searchRecords = gateFilterSearch(WtObject.Skill, SkillsAPI.getLookup);
|
|
22
19
|
}
|
|
23
20
|
|
|
24
21
|
export const createSkillFilterConfig = (params?: FilterConfigBaseParams) =>
|
package/src/modules/filters/modules/filterConfig/components/skill/skill-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="searchMethod"
|
|
5
6
|
:model-value="model"
|
|
6
7
|
:v="!disableValidation && v$.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, onMounted, 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
|
type ModelValue = number[];
|
|
22
25
|
|
|
@@ -34,6 +37,9 @@ const emit = defineEmits<{
|
|
|
34
37
|
}>();
|
|
35
38
|
const { t } = useI18n();
|
|
36
39
|
|
|
40
|
+
const { hasReadAccess, gateSearch } = useFilterReadAccess(WtObject.Skill);
|
|
41
|
+
const searchMethod = gateSearch(props.filterConfig.searchRecords);
|
|
42
|
+
|
|
37
43
|
const labelValue = computed(() =>
|
|
38
44
|
t(
|
|
39
45
|
`webitelUI.filters.${
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { AgentsAPI } 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 SupervisorFilterValueField from './supervisor-filter-value-field.vue';
|
|
9
11
|
import SupervisorFilterValuePreview from './supervisor-filter-value-preview.vue';
|
|
@@ -13,12 +15,10 @@ class SupervisorFilterConfig extends WtSysTypeFilterConfig {
|
|
|
13
15
|
valueInputComponent = SupervisorFilterValueField;
|
|
14
16
|
valuePreviewComponent = SupervisorFilterValuePreview;
|
|
15
17
|
|
|
16
|
-
searchRecords
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
return AgentsAPI.getSupervisorOptions(params);
|
|
21
|
-
}
|
|
18
|
+
searchRecords = gateFilterSearch(
|
|
19
|
+
WtObject.Agent,
|
|
20
|
+
AgentsAPI.getSupervisorOptions,
|
|
21
|
+
);
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
export const createSupervisorFilterConfig = (params?: FilterConfigBaseParams) =>
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<wt-multi-select
|
|
3
3
|
:label="labelValue"
|
|
4
|
-
:
|
|
4
|
+
:disabled="!hasReadAccess"
|
|
5
|
+
:search-method="searchMethod"
|
|
5
6
|
:model-value="model"
|
|
6
7
|
:v="!disableValidation && v$.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, onMounted, 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
|
type ModelValue = number[];
|
|
22
25
|
|
|
@@ -34,6 +37,9 @@ const emit = defineEmits<{
|
|
|
34
37
|
}>();
|
|
35
38
|
const { t } = useI18n();
|
|
36
39
|
|
|
40
|
+
const { hasReadAccess, gateSearch } = useFilterReadAccess(WtObject.Agent);
|
|
41
|
+
const searchMethod = gateSearch(props.filterConfig.searchRecords);
|
|
42
|
+
|
|
37
43
|
const labelValue = computed(() =>
|
|
38
44
|
t(
|
|
39
45
|
`webitelUI.filters.${
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { QueuesAPI } 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 TagsFilterValueField from './tags-filter-value-field.vue';
|
|
9
11
|
import TagsFilterValuePreview from './tags-filter-value-preview.vue';
|
|
@@ -13,12 +15,7 @@ class QueueTagsFilterConfig extends WtSysTypeFilterConfig {
|
|
|
13
15
|
valueInputComponent = TagsFilterValueField;
|
|
14
16
|
valuePreviewComponent = TagsFilterValuePreview;
|
|
15
17
|
|
|
16
|
-
searchRecords(
|
|
17
|
-
items: unknown[];
|
|
18
|
-
next?: boolean;
|
|
19
|
-
}> {
|
|
20
|
-
return QueuesAPI.getQueuesTags(params);
|
|
21
|
-
}
|
|
18
|
+
searchRecords = gateFilterSearch(WtObject.Queue, QueuesAPI.getQueuesTags);
|
|
22
19
|
}
|
|
23
20
|
|
|
24
21
|
export const createQueueTagsFilterConfig = (params?: FilterConfigBaseParams) =>
|
package/src/modules/filters/modules/filterConfig/components/tags/tags-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="searchMethod"
|
|
5
6
|
:model-value="selectedOptions"
|
|
6
7
|
:v="!disableValidation && v$.model"
|
|
7
8
|
chips-view
|
|
@@ -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
|
/**
|
|
24
27
|
* Queue tags are free-form strings, so the filter stores names rather than ids
|
|
@@ -44,6 +47,9 @@ const emit = defineEmits<{
|
|
|
44
47
|
}>();
|
|
45
48
|
const { t } = useI18n();
|
|
46
49
|
|
|
50
|
+
const { hasReadAccess, gateSearch } = useFilterReadAccess(WtObject.Queue);
|
|
51
|
+
const searchMethod = gateSearch(props.filterConfig.searchRecords);
|
|
52
|
+
|
|
47
53
|
const labelValue = computed(() =>
|
|
48
54
|
t(
|
|
49
55
|
`webitelUI.filters.${
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { TeamsAPI } 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 TeamFilterValueField from './team-filter-value-field.vue';
|
|
9
11
|
import TeamFilterValuePreview from './team-filter-value-preview.vue';
|
|
@@ -13,12 +15,7 @@ class TeamFilterConfig extends WtSysTypeFilterConfig {
|
|
|
13
15
|
valueInputComponent = TeamFilterValueField;
|
|
14
16
|
valuePreviewComponent = TeamFilterValuePreview;
|
|
15
17
|
|
|
16
|
-
searchRecords(
|
|
17
|
-
items: unknown[];
|
|
18
|
-
next?: boolean;
|
|
19
|
-
}> {
|
|
20
|
-
return TeamsAPI.getLookup(params);
|
|
21
|
-
}
|
|
18
|
+
searchRecords = gateFilterSearch(WtObject.Team, TeamsAPI.getLookup);
|
|
22
19
|
}
|
|
23
20
|
|
|
24
21
|
export const createTeamFilterConfig = (params?: FilterConfigBaseParams) =>
|
package/src/modules/filters/modules/filterConfig/components/team/team-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="searchMethod"
|
|
5
6
|
:model-value="model"
|
|
6
7
|
:v="!disableValidation && v$.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, onMounted, 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.Team);
|
|
41
|
+
const searchMethod = gateSearch(props.filterConfig.searchRecords);
|
|
42
|
+
|
|
37
43
|
const v$ = useVuelidate(
|
|
38
44
|
computed(() => ({
|
|
39
45
|
model: {
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { UsersAPI } 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 UserFilterValueField from './user-filter-value-field.vue';
|
|
11
|
+
import UserFilterValuePreview from './user-filter-value-preview.vue';
|
|
12
|
+
|
|
13
|
+
class UserFilterConfig extends WtSysTypeFilterConfig {
|
|
14
|
+
readonly name = FilterOption.User;
|
|
15
|
+
valueInputComponent = UserFilterValueField;
|
|
16
|
+
valuePreviewComponent = UserFilterValuePreview;
|
|
17
|
+
|
|
18
|
+
searchRecords = gateFilterSearch(WtObject.User, UsersAPI.getLookup);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export const createUserFilterConfig = (params?: FilterConfigBaseParams) =>
|
|
22
|
+
new UserFilterConfig(params);
|