@webitel/ui-datalist 26.12.4 → 26.12.6

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.
Files changed (54) hide show
  1. package/Readme.md +18 -0
  2. package/package.json +4 -4
  3. package/src/index.ts +5 -2
  4. package/src/modules/filters/modules/filterConfig/components/flow-type/flow-type-filter-value-field.vue +77 -0
  5. package/src/modules/filters/modules/filterConfig/components/flow-type/flow-type-filter-value-preview.vue +34 -0
  6. package/src/modules/filters/modules/filterConfig/components/grantee/index.ts +1 -1
  7. package/src/modules/filters/modules/filterConfig/components/index.ts +14 -0
  8. package/src/modules/filters/modules/filterConfig/components/tags/index.ts +17 -1
  9. package/src/modules/filters/modules/filterConfig/components/tags/tags-filter-value-field.vue +12 -2
  10. package/src/modules/filters/modules/filterConfig/components/trigger-job-state/trigger-job-state-filter-value-field.vue +87 -0
  11. package/src/modules/filters/modules/filterConfig/components/trigger-job-state/trigger-job-state-filter-value-preview.vue +42 -0
  12. package/src/modules/filters/modules/filterConfig/composables/useFlowTypeOptions.ts +21 -0
  13. package/src/modules/filters/modules/filterConfig/enums/FilterOption.ts +3 -0
  14. package/src/modules/filters/modules/filterConfig/index.ts +6 -1
  15. package/src/modules/permissions/components/_internal/permissions-role-row.vue +25 -0
  16. package/src/modules/permissions/components/_internal/permissions-role-select.vue +35 -0
  17. package/src/modules/permissions/components/_internal/permissions-tab-content.vue +161 -0
  18. package/src/modules/permissions/components/_internal/permissions-tab-role-popup.vue +94 -0
  19. package/src/modules/{permissions-page → permissions}/components/permissions-tab.vue +5 -5
  20. package/src/modules/permissions/composables/useAccessModeOptions.ts +48 -0
  21. package/src/modules/permissions/index.ts +40 -0
  22. package/src/modules/permissions/stores/_internals/headers.ts +52 -0
  23. package/src/modules/{permissions-page → permissions}/stores/createPermissionsStore.ts +19 -44
  24. package/src/modules/{permissions-page → permissions}/types/Permission.types.ts +2 -2
  25. package/src/modules/permissions/types/PermissionsUserAccess.ts +10 -0
  26. package/types/.tsbuildinfo +1 -1
  27. package/types/index.d.ts +2 -2
  28. package/types/modules/filter-presets/stores/createFilterPresetsStore.d.ts +1 -1
  29. package/types/modules/filters/modules/filterConfig/components/flow-type/flow-type-filter-value-field.vue.d.ts +18 -0
  30. package/types/modules/filters/modules/filterConfig/components/flow-type/flow-type-filter-value-preview.vue.d.ts +6 -0
  31. package/types/modules/filters/modules/filterConfig/components/grantee/index.d.ts +1 -1
  32. package/types/modules/filters/modules/filterConfig/components/index.d.ts +6 -2
  33. package/types/modules/filters/modules/filterConfig/components/tags/index.d.ts +32 -0
  34. package/types/modules/filters/modules/filterConfig/components/trigger-job-state/trigger-job-state-filter-value-field.vue.d.ts +18 -0
  35. package/types/modules/filters/modules/filterConfig/components/trigger-job-state/trigger-job-state-filter-value-preview.vue.d.ts +6 -0
  36. package/types/modules/filters/modules/filterConfig/composables/useFlowTypeOptions.d.ts +7 -0
  37. package/types/modules/filters/modules/filterConfig/enums/FilterOption.d.ts +3 -0
  38. package/types/modules/filters/modules/filterConfig/index.d.ts +2 -1
  39. package/types/modules/permissions/components/_internal/permissions-role-row.vue.d.ts +17 -0
  40. package/types/modules/permissions/components/_internal/permissions-role-select.vue.d.ts +11 -0
  41. package/types/modules/permissions/components/_internal/permissions-tab-content.vue.d.ts +32 -0
  42. package/types/modules/permissions/components/_internal/permissions-tab-role-popup.vue.d.ts +10 -0
  43. package/types/modules/{permissions-page → permissions}/components/permissions-tab.vue.d.ts +1 -1
  44. package/types/modules/permissions/composables/useAccessModeOptions.d.ts +22 -0
  45. package/types/modules/permissions/index.d.ts +17 -0
  46. package/types/modules/permissions/stores/_internals/headers.d.ts +22 -0
  47. package/types/modules/{permissions-page → permissions}/stores/createPermissionsStore.d.ts +5 -3
  48. package/types/modules/{permissions-page → permissions}/types/Permission.types.d.ts +2 -2
  49. package/types/modules/permissions/types/PermissionsUserAccess.d.ts +3 -0
  50. package/src/modules/permissions-page/index.ts +0 -23
  51. package/src/modules/permissions-page/scripts/PermissionsApiModule.ts +0 -57
  52. package/src/modules/permissions-page/scripts/__tests__/PermissionsApiModule.spec.ts +0 -31
  53. package/types/modules/permissions-page/index.d.ts +0 -7
  54. package/types/modules/permissions-page/scripts/PermissionsApiModule.d.ts +0 -9
package/Readme.md CHANGED
@@ -24,6 +24,7 @@ This package contains:
24
24
  * card page tools (store, components, etc)
25
25
  * table filters (store, components, etc)
26
26
  * table filter presets (store, components, etc)
27
+ * permissions tab (store, components, etc)
27
28
 
28
29
  ## Exports
29
30
 
@@ -85,6 +86,23 @@ import {
85
86
  } from '@webitel/ui-datalist/card';
86
87
  ```
87
88
 
89
+ ### Permissions tools
90
+
91
+ Object ACL tab of an entity card. See docs: `pages/packages/ui-datalist/permissions`.
92
+
93
+ #### Import
94
+
95
+ ```ts
96
+ import {
97
+ createPermissionsStore, // pinia store factory, takes the entity api (getPermissionsList / patchPermissions)
98
+ PermissionsTab, // ready tab: register it in the router, pass store / access / parentId
99
+ headersWithCreate, // columns with "create" (x), for ACLs that have it
100
+ PermissionsRoleRow, // role with its role / user icon
101
+ PermissionsRoleSelect, // roles select
102
+ useAccessModeOptions, // access mode options + rows with localized rule names
103
+ } from '@webitel/ui-datalist/permissions';
104
+ ```
105
+
88
106
  ## Versions
89
107
 
90
108
  // TODO: describe new major/minor versions, if will be needed
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webitel/ui-datalist",
3
- "version": "26.12.4",
3
+ "version": "26.12.6",
4
4
  "description": "Toolkit for building data lists in webitel ui system",
5
5
  "scripts": {
6
6
  "build:types": "vue-tsc -b tsconfig.build.json",
@@ -96,9 +96,9 @@
96
96
  "types": "./types/modules/card/index.d.ts",
97
97
  "import": "./src/modules/card/index.ts"
98
98
  },
99
- "./permissions-page": {
100
- "types": "./types/modules/permissions-page/index.d.ts",
101
- "import": "./src/modules/permissions-page/index.ts"
99
+ "./permissions": {
100
+ "types": "./types/modules/permissions/index.d.ts",
101
+ "import": "./src/modules/permissions/index.ts"
102
102
  }
103
103
  }
104
104
  }
package/src/index.ts CHANGED
@@ -1,6 +1,9 @@
1
1
  import { useNestedTableList } from './modules/table/composables/useNestedTableList';
2
2
  import { createTableStore } from './modules/table/createTableStore.store';
3
- import type { DatalistTableHeader } from './modules/types/tableStore.types';
3
+ import type {
4
+ DatalistTableHeader,
5
+ PatchItemPropertyParams,
6
+ } from './modules/types/tableStore.types';
4
7
 
5
- export type { DatalistTableHeader };
8
+ export type { DatalistTableHeader, PatchItemPropertyParams };
6
9
  export { createTableStore, useNestedTableList };
@@ -0,0 +1,77 @@
1
+ <template>
2
+ <wt-multi-select
3
+ :label="labelValue"
4
+ :options="options"
5
+ v-model:model-value="model"
6
+ :v="!disableValidation && v$.model"
7
+ data-key="value"
8
+ option-label="label"
9
+ option-value="value"
10
+ />
11
+ </template>
12
+
13
+ <script lang="ts" setup>
14
+ import { useVuelidate } from '@vuelidate/core';
15
+ import { required } from '@vuelidate/validators';
16
+ import { WtMultiSelect } from '@webitel/ui-sdk/components';
17
+ import { computed, onMounted, watch } from 'vue';
18
+ import { useI18n } from 'vue-i18n';
19
+ import { WtSysTypeFilterConfig } from '../../classes/FilterConfig';
20
+ import { useFlowTypeOptions } from '../../composables/useFlowTypeOptions';
21
+
22
+ const model = defineModel<string[]>();
23
+ const { t } = useI18n();
24
+
25
+ const props = defineProps<{
26
+ filterConfig?: WtSysTypeFilterConfig;
27
+ disableValidation?: boolean;
28
+ }>();
29
+
30
+ const v$ = useVuelidate(
31
+ computed(() => ({
32
+ model: {
33
+ required,
34
+ },
35
+ })),
36
+ {
37
+ model,
38
+ },
39
+ {
40
+ $autoDirty: true,
41
+ },
42
+ );
43
+
44
+ const emit = defineEmits<{
45
+ 'update:invalid': [
46
+ boolean,
47
+ ];
48
+ }>();
49
+
50
+ const labelValue = computed(() =>
51
+ t(
52
+ `webitelUI.filters.${
53
+ props?.filterConfig?.showFilterName
54
+ ? props?.filterConfig.name
55
+ : 'filterValue'
56
+ }`,
57
+ ),
58
+ );
59
+
60
+ const { options } = useFlowTypeOptions();
61
+
62
+ onMounted(() => {
63
+ if (!props?.disableValidation) v$.value.$touch();
64
+ });
65
+
66
+ watch(
67
+ () => v$.value.$invalid,
68
+ (invalid) => {
69
+ emit('update:invalid', invalid);
70
+ },
71
+ {
72
+ immediate: true,
73
+ },
74
+ );
75
+ </script>
76
+
77
+ <style scoped></style>
@@ -0,0 +1,34 @@
1
+ <template>
2
+ <ul>
3
+ <li
4
+ v-for="(label, index) of arrayValues"
5
+ :key="index"
6
+ >
7
+ {{ label }}
8
+ </li>
9
+ </ul>
10
+ </template>
11
+
12
+ <script lang="ts" setup>
13
+ import { computed } from 'vue';
14
+ import { useFlowTypeOptions } from '../../composables/useFlowTypeOptions';
15
+
16
+ const props = defineProps<{
17
+ value: string[];
18
+ }>();
19
+
20
+ const { options } = useFlowTypeOptions();
21
+
22
+ const arrayLabels = computed(() =>
23
+ options.value.reduce<Record<string, string>>((acc, { value, label }) => {
24
+ acc[value] = label;
25
+ return acc;
26
+ }, {}),
27
+ );
28
+
29
+ const arrayValues = computed(() =>
30
+ (props.value ?? []).map((v) => arrayLabels.value[v] || v),
31
+ );
32
+ </script>
33
+
34
+ <style scoped></style>
@@ -1,4 +1,4 @@
1
- import RolesAPI from '@webitel/ui-sdk/api/clients/roles/roles';
1
+ import { RolesAPI } from '@webitel/api-services/api';
2
2
  import { WtObject } from '@webitel/ui-sdk/enums';
3
3
 
4
4
  import {
@@ -75,6 +75,8 @@ import ContactLabelFilterPreview from './contact-label/contact-label-filter-valu
75
75
  import { createContactOwnerFilterConfig } from './contact-owner';
76
76
  import ContactOwnerFilter from './contact-owner/contact-owner-filter-value-field.vue';
77
77
  import ContactOwnerFilterPreview from './contact-owner/contact-owner-filter-value-preview.vue';
78
+ import FlowTypeFilter from './flow-type/flow-type-filter-value-field.vue';
79
+ import FlowTypeFilterPreview from './flow-type/flow-type-filter-value-preview.vue';
78
80
  import { createGatewayFilterConfig } from './gateway';
79
81
  import GatewayFilter from './gateway/gateway-filter-value-field.vue';
80
82
  import GatewayFilterPreview from './gateway/gateway-filter-value-preview.vue';
@@ -133,6 +135,8 @@ import TeamFilter from './team/team-filter-value-field.vue';
133
135
  import TeamFilterPreview from './team/team-filter-value-preview.vue';
134
136
  import TotalDurationFilter from './total-duration/total-duration-filter-value-field.vue';
135
137
  import TotalDurationFilterPreview from './total-duration/total-duration-filter-value-preview.vue';
138
+ import TriggerJobStateFilter from './trigger-job-state/trigger-job-state-filter-value-field.vue';
139
+ import TriggerJobStateFilterPreview from './trigger-job-state/trigger-job-state-filter-value-preview.vue';
136
140
  import { createUserFilterConfig } from './user';
137
141
  import UserFilter from './user/user-filter-value-field.vue';
138
142
  import UserFilterPreview from './user/user-filter-value-preview.vue';
@@ -195,6 +199,8 @@ export {
195
199
  ContactOwnerFilter,
196
200
  ContactOwnerFilterPreview,
197
201
  DateTimeOptionsFilterValueField,
202
+ FlowTypeFilter,
203
+ FlowTypeFilterPreview,
198
204
  GatewayFilter,
199
205
  GatewayFilterPreview,
200
206
  GranteeFilter,
@@ -243,6 +249,8 @@ export {
243
249
  TeamFilterPreview,
244
250
  TotalDurationFilter,
245
251
  TotalDurationFilterPreview,
252
+ TriggerJobStateFilter,
253
+ TriggerJobStateFilterPreview,
246
254
  UserFilter,
247
255
  UserFilterPreview,
248
256
  UtilizationProgressFilter,
@@ -269,6 +277,7 @@ export const FilterOptionToValueComponentMap: Record<FilterOption, Component> =
269
277
  [FilterOption.HangupCause]: HangupCauseFilterValueField,
270
278
  [FilterOption.Queue]: QueueFilter,
271
279
  [FilterOption.QueueType]: QueueTypeFilter,
280
+ [FilterOption.FlowType]: FlowTypeFilter,
272
281
  [FilterOption.QueuePeriod]: QueuePeriodFilter,
273
282
  [FilterOption.RatedBy]: RatedByFilter,
274
283
  [FilterOption.HasFile]: HasFileFilter,
@@ -286,6 +295,7 @@ export const FilterOptionToValueComponentMap: Record<FilterOption, Component> =
286
295
  [FilterOption.JoinedAt]: DateTimeOptionsFilterValueField,
287
296
  [FilterOption.LeavingAt]: DateTimeOptionsFilterValueField,
288
297
  [FilterOption.OfferingAt]: DateTimeOptionsFilterValueField,
298
+ [FilterOption.StartedAt]: DateTimeOptionsFilterValueField,
289
299
  [FilterOption.Bucket]: BucketFilter,
290
300
  [FilterOption.StopCause]: StopCauseFilter,
291
301
  [FilterOption.MemberPriority]: RatingFromToFilter,
@@ -294,6 +304,7 @@ export const FilterOptionToValueComponentMap: Record<FilterOption, Component> =
294
304
  [FilterOption.MemberName]: StringFilterValueField,
295
305
  [FilterOption.MemberDestination]: StringFilterValueField,
296
306
  [FilterOption.CallReportingResult]: CallReportingResultFilter,
307
+ [FilterOption.TriggerJobState]: TriggerJobStateFilter,
297
308
  [FilterOption.Action]: ActionFilter,
298
309
  [FilterOption.Object]: ObjectFilter,
299
310
  [FilterOption.CaseStatus]: CaseStatusFilterValueField,
@@ -324,6 +335,7 @@ export const FilterOptionToPreviewComponentMap: Record<
324
335
  [FilterOption.JoinedAt]: DateTimeOptionsFilterValuePreview,
325
336
  [FilterOption.LeavingAt]: DateTimeOptionsFilterValuePreview,
326
337
  [FilterOption.OfferingAt]: DateTimeOptionsFilterValuePreview,
338
+ [FilterOption.StartedAt]: DateTimeOptionsFilterValuePreview,
327
339
  [FilterOption.Bucket]: BucketFilterPreview,
328
340
  [FilterOption.StopCause]: StopCauseFilterPreview,
329
341
  [FilterOption.MemberPriority]: RatingFromToFilterPreview,
@@ -332,6 +344,7 @@ export const FilterOptionToPreviewComponentMap: Record<
332
344
  [FilterOption.MemberName]: StringFilterValuePreview,
333
345
  [FilterOption.MemberDestination]: StringFilterValuePreview,
334
346
  [FilterOption.CallReportingResult]: CallReportingResultFilterPreview,
347
+ [FilterOption.TriggerJobState]: TriggerJobStateFilterPreview,
335
348
  [FilterOption.Action]: ActionFilterPreview,
336
349
  [FilterOption.Object]: ObjectFilterPreview,
337
350
  [FilterOption.Agent]: AgentFilterPreview,
@@ -350,6 +363,7 @@ export const FilterOptionToPreviewComponentMap: Record<
350
363
  [FilterOption.HangupCause]: HangupCauseFilterValuePreview,
351
364
  [FilterOption.Queue]: QueueFilterPreview,
352
365
  [FilterOption.QueueType]: QueueTypeFilterPreview,
366
+ [FilterOption.FlowType]: FlowTypeFilterPreview,
353
367
  [FilterOption.QueuePeriod]: QueuePeriodFilterPreview,
354
368
  [FilterOption.RatedBy]: RatedByFilterPreview,
355
369
  [FilterOption.HasFile]: HasFileFilterPreview,
@@ -1,4 +1,4 @@
1
- import { QueuesAPI } from '@webitel/api-services/api';
1
+ import { FlowsAPI, QueuesAPI } from '@webitel/api-services/api';
2
2
  import { WtObject } from '@webitel/ui-sdk/enums';
3
3
 
4
4
  import {
@@ -20,3 +20,19 @@ class QueueTagsFilterConfig extends WtSysTypeFilterConfig {
20
20
 
21
21
  export const createQueueTagsFilterConfig = (params?: FilterConfigBaseParams) =>
22
22
  new QueueTagsFilterConfig(params);
23
+
24
+ /**
25
+ * [Claude] Flow tags share the queue tags shape and the `tags` request param, so
26
+ * this config keeps the same name and components and swaps only the search.
27
+ * It isn't in the name → creator map (that slot is queue tags): create it directly.
28
+ */
29
+ class FlowTagsFilterConfig extends WtSysTypeFilterConfig {
30
+ readonly name = FilterOption.QueueTags;
31
+ valueInputComponent = TagsFilterValueField;
32
+ valuePreviewComponent = TagsFilterValuePreview;
33
+
34
+ searchRecords = gateFilterSearch(WtObject.Flow, FlowsAPI.getFlowTags);
35
+ }
36
+
37
+ export const createFlowTagsFilterConfig = (params?: FilterConfigBaseParams) =>
38
+ new FlowTagsFilterConfig(params);
@@ -21,7 +21,10 @@ import { computed, onMounted, watch } from 'vue';
21
21
  import { useI18n } from 'vue-i18n';
22
22
 
23
23
  import { WtSysTypeFilterConfig } from '../../classes/FilterConfig';
24
- import { useFilterReadAccess } from '../../composables/useFilterReadAccess';
24
+ import {
25
+ type GatedFilterSearch,
26
+ useFilterReadAccess,
27
+ } from '../../composables/useFilterReadAccess';
25
28
 
26
29
  /**
27
30
  * Queue tags are free-form strings, so the filter stores names rather than ids
@@ -47,7 +50,14 @@ const emit = defineEmits<{
47
50
  }>();
48
51
  const { t } = useI18n();
49
52
 
50
- const { hasReadAccess, gateSearch } = useFilterReadAccess(WtObject.Queue);
53
+ // [Claude] the access object comes from the config's gated search, so flow tags reuse this field
54
+ const accessObject =
55
+ (
56
+ props.filterConfig.searchRecords as Partial<
57
+ GatedFilterSearch<unknown[], unknown>
58
+ >
59
+ ).accessObject ?? WtObject.Queue;
60
+ const { hasReadAccess, gateSearch } = useFilterReadAccess(accessObject);
51
61
  const searchMethod = gateSearch(props.filterConfig.searchRecords);
52
62
 
53
63
  const labelValue = computed(() =>
@@ -0,0 +1,87 @@
1
+ <template>
2
+ <wt-multi-select
3
+ :label="labelValue"
4
+ :options="options"
5
+ v-model:model-value="model"
6
+ :v="!disableValidation && v$.model"
7
+ chips-view
8
+ data-key="value"
9
+ option-label="label"
10
+ option-value="value"
11
+ />
12
+ </template>
13
+
14
+ <script lang="ts" setup>
15
+ import { useVuelidate } from '@vuelidate/core';
16
+ import { required } from '@vuelidate/validators';
17
+ import { EngineTriggerJobState } from '@webitel/api-services/gen/models';
18
+ import { WtMultiSelect } from '@webitel/ui-sdk/components';
19
+ import { computed, onMounted, watch } from 'vue';
20
+ import { useI18n } from 'vue-i18n';
21
+
22
+ import { WtSysTypeFilterConfig } from '../../classes/FilterConfig';
23
+
24
+ const model = defineModel<string[]>();
25
+ const { t } = useI18n();
26
+
27
+ const props = defineProps<{
28
+ filterConfig?: WtSysTypeFilterConfig;
29
+ disableValidation?: boolean;
30
+ }>();
31
+
32
+ const v$ = useVuelidate(
33
+ computed(() => ({
34
+ model: {
35
+ required,
36
+ },
37
+ })),
38
+ {
39
+ model,
40
+ },
41
+ {
42
+ $autoDirty: true,
43
+ },
44
+ );
45
+
46
+ v$.value.$touch();
47
+
48
+ const emit = defineEmits<{
49
+ 'update:invalid': [
50
+ boolean,
51
+ ];
52
+ }>();
53
+
54
+ const labelValue = computed(() =>
55
+ t(
56
+ `webitelUI.filters.${
57
+ props?.filterConfig?.showFilterName
58
+ ? props?.filterConfig.name
59
+ : 'filterValue'
60
+ }`,
61
+ ),
62
+ );
63
+
64
+ /** [Claude] the states a trigger run ends up in, for the trigger logs' result filter */
65
+ const options = computed(() =>
66
+ Object.values(EngineTriggerJobState).map((value) => ({
67
+ value,
68
+ label: t(`objects.triggerJobState.${value}`),
69
+ })),
70
+ );
71
+
72
+ onMounted(() => {
73
+ if (!props?.disableValidation) v$.value.$touch();
74
+ });
75
+
76
+ watch(
77
+ () => v$.value.$invalid,
78
+ (invalid) => {
79
+ emit('update:invalid', invalid);
80
+ },
81
+ {
82
+ immediate: true,
83
+ },
84
+ );
85
+ </script>
86
+
87
+ <style scoped></style>
@@ -0,0 +1,42 @@
1
+ <template>
2
+ <ul>
3
+ <li
4
+ v-for="(label, index) of arrayValues"
5
+ :key="index"
6
+ >
7
+ {{ label }}
8
+ </li>
9
+ </ul>
10
+ </template>
11
+
12
+ <script lang="ts" setup>
13
+ import { EngineTriggerJobState } from '@webitel/api-services/gen/models';
14
+ import { computed } from 'vue';
15
+ import { useI18n } from 'vue-i18n';
16
+
17
+ const props = defineProps<{
18
+ value?: string[];
19
+ }>();
20
+
21
+ const { t } = useI18n();
22
+
23
+ const options = computed(() =>
24
+ Object.values(EngineTriggerJobState).map((value) => ({
25
+ value,
26
+ label: t(`objects.triggerJobState.${value}`),
27
+ })),
28
+ );
29
+
30
+ const arrayLabels = computed(() =>
31
+ options.value.reduce<Record<string, string>>((acc, { value, label }) => {
32
+ acc[value] = label;
33
+ return acc;
34
+ }, {}),
35
+ );
36
+
37
+ const arrayValues = computed(() =>
38
+ (props.value ?? []).map((v) => arrayLabels.value[v] || v),
39
+ );
40
+ </script>
41
+
42
+ <style scoped></style>
@@ -0,0 +1,21 @@
1
+ import { EngineRoutingSchemaType } from '@webitel/api-services/gen/models';
2
+ import { computed } from 'vue';
3
+ import { useI18n } from 'vue-i18n';
4
+
5
+ /** [Claude] every flow type but "default" — the flows API adds it to any type filter itself */
6
+ export function useFlowTypeOptions() {
7
+ const { t } = useI18n();
8
+
9
+ const options = computed(() =>
10
+ Object.values(EngineRoutingSchemaType)
11
+ .filter((value) => value !== EngineRoutingSchemaType.Default)
12
+ .map((value) => ({
13
+ value,
14
+ label: t(`objects.flow.type.${value}`),
15
+ })),
16
+ );
17
+
18
+ return {
19
+ options,
20
+ };
21
+ }
@@ -43,6 +43,7 @@ export const FilterOption = {
43
43
  HasAttachment: 'hasAttachment',
44
44
  HasUser: 'hasUser',
45
45
  QueueType: 'queueType',
46
+ FlowType: 'flowType',
46
47
  QueuePeriod: 'queuePeriod',
47
48
  AgentStatus: 'agentStatus',
48
49
  Skill: 'skill',
@@ -54,6 +55,7 @@ export const FilterOption = {
54
55
  JoinedAt: 'joinedAt',
55
56
  LeavingAt: 'leavingAt',
56
57
  OfferingAt: 'offeringAt',
58
+ StartedAt: 'startedAt',
57
59
  UploadedAt: 'uploadedAt',
58
60
  StopCause: 'stopCause',
59
61
  MemberPriority: 'memberPriority',
@@ -61,6 +63,7 @@ export const FilterOption = {
61
63
  MemberName: 'name',
62
64
  MemberDestination: 'destination',
63
65
  CallReportingResult: 'result' /** queue attempt CallReportingStatus */,
66
+ TriggerJobState: 'triggerJobState',
64
67
  Action: 'action',
65
68
  Object: 'object',
66
69
  Date: 'date',
@@ -4,5 +4,10 @@ export * from './types/FilterConfigDefinition';
4
4
 
5
5
  import { createFilterConfig } from './classes/createFilterConfig';
6
6
  import { createDateRangeFilterConfig } from './components/_shared/date-time-filter/filterConfig';
7
+ import { createFlowTagsFilterConfig } from './components/tags';
7
8
 
8
- export { createDateRangeFilterConfig, createFilterConfig };
9
+ export {
10
+ createDateRangeFilterConfig,
11
+ createFilterConfig,
12
+ createFlowTagsFilterConfig,
13
+ };
@@ -0,0 +1,25 @@
1
+ <template>
2
+ <div class="permissions-role-row">
3
+ <wt-icon :icon="role.user ? 'user' : 'role'" />
4
+ <slot>
5
+ {{ role.name }}
6
+ </slot>
7
+ </div>
8
+ </template>
9
+
10
+ <script setup lang="ts">
11
+ import type { PermissionGrantee } from '../../types/Permission.types';
12
+
13
+ defineProps<{
14
+ role: PermissionGrantee;
15
+ }>();
16
+ </script>
17
+
18
+ <style lang="scss" scoped>
19
+ .permissions-role-row {
20
+ display: grid;
21
+ grid-template-columns: var(--icon-md-size) 1fr;
22
+ align-items: center;
23
+ gap: var(--spacing-sm);
24
+ }
25
+ </style>
@@ -0,0 +1,35 @@
1
+ <template>
2
+ <wt-single-select
3
+ class="permissions-role-select"
4
+ option-label="name"
5
+ v-bind="attrs"
6
+ v-model:model-value="model"
7
+ >
8
+ <template #value="{ value, getOptionLabel }">
9
+ <permissions-role-row :role="value">
10
+ {{ getOptionLabel(value) || value }}
11
+ </permissions-role-row>
12
+ </template>
13
+
14
+ <template #option="{ option, getOptionLabel }">
15
+ <permissions-role-row :role="option">
16
+ {{ getOptionLabel(option) || option }}
17
+ </permissions-role-row>
18
+ </template>
19
+ </wt-single-select>
20
+ </template>
21
+
22
+ <script setup lang="ts">
23
+ import { useAttrs } from 'vue';
24
+
25
+ import type { PermissionGrantee } from '../../types/Permission.types';
26
+ import PermissionsRoleRow from './permissions-role-row.vue';
27
+
28
+ const attrs = useAttrs();
29
+
30
+ const model = defineModel<PermissionGrantee | null>({
31
+ required: true,
32
+ });
33
+ </script>
34
+
35
+ <style lang="scss" scoped></style>