@webitel/ui-datalist 1.1.62 → 1.1.64
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/modules/filterConfig/components/_custom/type-extension-filter-value-field.vue +1 -1
- package/src/modules/filters/modules/filterConfig/components/case-assignee/case-assignee-filter-value-field.vue +24 -5
- package/src/modules/filters/modules/filterConfig/components/case-close-reason-groups/case-close-reason-groups-filter-value-field.vue +30 -9
- package/src/modules/filters/modules/filterConfig/components/case-sla-condition/case-sla-condition-filter-value-field.vue +30 -10
- package/src/modules/filters/modules/filterConfig/components/case-status/case-status-filter-value-field.vue +30 -9
- package/src/modules/filters/modules/filterConfig/components/rating/rating-from-to-filter-value-field.vue +20 -15
- package/src/modules/filters/modules/filterConfig/components/score/score-from-to-filter-value-field.vue +16 -11
- package/types/.tsbuildinfo +1 -1
package/package.json
CHANGED
|
@@ -3,15 +3,16 @@
|
|
|
3
3
|
:label="t('webitelUI.filters.filterValue')"
|
|
4
4
|
:search-method="props.filterConfig.searchRecords"
|
|
5
5
|
:v="vList"
|
|
6
|
-
|
|
6
|
+
:model-value="value.list"
|
|
7
7
|
data-key="id"
|
|
8
8
|
option-value="id"
|
|
9
|
+
@update:model-value="handleInput('list', $event)"
|
|
9
10
|
/>
|
|
10
11
|
<wt-checkbox
|
|
11
12
|
:label="t('reusable.showUnassigned')"
|
|
12
|
-
:selected="
|
|
13
|
+
:selected="value.unassigned"
|
|
13
14
|
:v="vUnassigned"
|
|
14
|
-
@update:selected="
|
|
15
|
+
@update:selected="handleInput('unassigned', !!$event)"
|
|
15
16
|
/>
|
|
16
17
|
</template>
|
|
17
18
|
|
|
@@ -36,6 +37,24 @@ const model = defineModel<ModelValue>({
|
|
|
36
37
|
}),
|
|
37
38
|
});
|
|
38
39
|
|
|
40
|
+
const value = computed<ModelValue>(
|
|
41
|
+
() =>
|
|
42
|
+
model.value ?? {
|
|
43
|
+
list: [],
|
|
44
|
+
unassigned: false,
|
|
45
|
+
},
|
|
46
|
+
);
|
|
47
|
+
|
|
48
|
+
const handleInput = <K extends keyof ModelValue>(
|
|
49
|
+
key: K,
|
|
50
|
+
newFieldValue: ModelValue[K],
|
|
51
|
+
) => {
|
|
52
|
+
model.value = {
|
|
53
|
+
...value.value,
|
|
54
|
+
[key]: newFieldValue,
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
|
|
39
58
|
const props = defineProps<{
|
|
40
59
|
filterConfig: CaseAssigneeFilterConfig;
|
|
41
60
|
}>();
|
|
@@ -54,10 +73,10 @@ const v$ = useVuelidate<{
|
|
|
54
73
|
computed(() => ({
|
|
55
74
|
model: {
|
|
56
75
|
list: {
|
|
57
|
-
required: requiredIf(() => !
|
|
76
|
+
required: requiredIf(() => !value.value.unassigned),
|
|
58
77
|
},
|
|
59
78
|
unassigned: {
|
|
60
|
-
required: requiredIf(() => !
|
|
79
|
+
required: requiredIf(() => !value.value.list.length),
|
|
61
80
|
},
|
|
62
81
|
},
|
|
63
82
|
})),
|
|
@@ -5,23 +5,24 @@
|
|
|
5
5
|
:label="t('cases.reason')"
|
|
6
6
|
:search-method="caseCloseReasonsGroupsSearchMethod"
|
|
7
7
|
:v="vSelection"
|
|
8
|
-
:model-value="
|
|
8
|
+
:model-value="value.selection"
|
|
9
9
|
data-key="id"
|
|
10
10
|
option-value="id"
|
|
11
11
|
@update:model-value="updateSelected"
|
|
12
12
|
/>
|
|
13
13
|
|
|
14
14
|
<wt-multi-select
|
|
15
|
-
v-if="
|
|
16
|
-
:key="
|
|
15
|
+
v-if="value.selection"
|
|
16
|
+
:key="value.selection"
|
|
17
17
|
|
|
18
|
-
:disabled="!
|
|
18
|
+
:disabled="!value.selection"
|
|
19
19
|
:label="t('webitelUI.filters.filterValue')"
|
|
20
20
|
:search-method="getConditionList"
|
|
21
21
|
:v="vConditions"
|
|
22
|
-
|
|
22
|
+
:model-value="value.conditions"
|
|
23
23
|
data-key="id"
|
|
24
24
|
option-value="id"
|
|
25
|
+
@update:model-value="handleInput('conditions', $event)"
|
|
25
26
|
/>
|
|
26
27
|
</div>
|
|
27
28
|
</template>
|
|
@@ -50,14 +51,34 @@ const model = defineModel<ModelValue>({
|
|
|
50
51
|
});
|
|
51
52
|
const { t } = useI18n();
|
|
52
53
|
|
|
53
|
-
const
|
|
54
|
-
|
|
55
|
-
|
|
54
|
+
const value = computed<ModelValue>(
|
|
55
|
+
() =>
|
|
56
|
+
model.value ?? {
|
|
57
|
+
selection: '',
|
|
58
|
+
conditions: '',
|
|
59
|
+
},
|
|
60
|
+
);
|
|
61
|
+
|
|
62
|
+
const handleInput = <K extends keyof ModelValue>(
|
|
63
|
+
key: K,
|
|
64
|
+
newFieldValue: ModelValue[K],
|
|
65
|
+
) => {
|
|
66
|
+
model.value = {
|
|
67
|
+
...value.value,
|
|
68
|
+
[key]: newFieldValue,
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
const updateSelected = (selection: string) => {
|
|
73
|
+
model.value = {
|
|
74
|
+
selection,
|
|
75
|
+
conditions: '',
|
|
76
|
+
};
|
|
56
77
|
};
|
|
57
78
|
|
|
58
79
|
const getConditionList = (params: Record<string, unknown>) => {
|
|
59
80
|
return caseCloseReasonsSearchMethod({
|
|
60
|
-
parentId:
|
|
81
|
+
parentId: value.value.selection,
|
|
61
82
|
...params,
|
|
62
83
|
});
|
|
63
84
|
};
|
|
@@ -5,23 +5,23 @@
|
|
|
5
5
|
:label="t('cases.appliedSLA')"
|
|
6
6
|
:search-method="slasSearchMethod"
|
|
7
7
|
:v="vSelection"
|
|
8
|
-
:model-value="
|
|
8
|
+
:model-value="value.selection"
|
|
9
9
|
data-key="id"
|
|
10
10
|
option-value="id"
|
|
11
11
|
@update:model-value="updateSelected"
|
|
12
12
|
/>
|
|
13
13
|
|
|
14
14
|
<wt-multi-select
|
|
15
|
-
v-if="
|
|
16
|
-
:key="
|
|
17
|
-
:disabled="!
|
|
15
|
+
v-if="value.selection"
|
|
16
|
+
:key="value.selection"
|
|
17
|
+
:disabled="!value.selection"
|
|
18
18
|
:label="t('webitelUI.filters.filterValue')"
|
|
19
19
|
:search-method="getConditionList"
|
|
20
20
|
:v="vConditions"
|
|
21
|
-
:model-value="
|
|
21
|
+
:model-value="value.conditions"
|
|
22
22
|
data-key="id"
|
|
23
23
|
option-value="id"
|
|
24
|
-
@update:model-value="
|
|
24
|
+
@update:model-value="handleInput('conditions', $event)"
|
|
25
25
|
/>
|
|
26
26
|
</div>
|
|
27
27
|
</template>
|
|
@@ -47,14 +47,34 @@ const model = defineModel<ModelValue>({
|
|
|
47
47
|
});
|
|
48
48
|
const { t } = useI18n();
|
|
49
49
|
|
|
50
|
-
const
|
|
51
|
-
|
|
52
|
-
|
|
50
|
+
const value = computed<ModelValue>(
|
|
51
|
+
() =>
|
|
52
|
+
model.value ?? {
|
|
53
|
+
selection: '',
|
|
54
|
+
conditions: '',
|
|
55
|
+
},
|
|
56
|
+
);
|
|
57
|
+
|
|
58
|
+
const handleInput = <K extends keyof ModelValue>(
|
|
59
|
+
key: K,
|
|
60
|
+
newFieldValue: ModelValue[K],
|
|
61
|
+
) => {
|
|
62
|
+
model.value = {
|
|
63
|
+
...value.value,
|
|
64
|
+
[key]: newFieldValue,
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
const updateSelected = (selection: string) => {
|
|
69
|
+
model.value = {
|
|
70
|
+
selection,
|
|
71
|
+
conditions: '',
|
|
72
|
+
};
|
|
53
73
|
};
|
|
54
74
|
|
|
55
75
|
const getConditionList = async (params: Record<string, unknown>) => {
|
|
56
76
|
return await slasConditionsSearchMethod({
|
|
57
|
-
parentId:
|
|
77
|
+
parentId: value.value.selection,
|
|
58
78
|
...params,
|
|
59
79
|
});
|
|
60
80
|
};
|
|
@@ -5,22 +5,23 @@
|
|
|
5
5
|
:label="t('cases.status')"
|
|
6
6
|
:search-method="caseStatusesSearchMethod"
|
|
7
7
|
:v="vSelection"
|
|
8
|
-
:model-value="
|
|
8
|
+
:model-value="value.selection"
|
|
9
9
|
data-key="id"
|
|
10
10
|
option-value="id"
|
|
11
11
|
@update:model-value="updateSelected"
|
|
12
12
|
/>
|
|
13
13
|
|
|
14
14
|
<wt-multi-select
|
|
15
|
-
v-if="
|
|
16
|
-
:key="
|
|
17
|
-
:disabled="!
|
|
15
|
+
v-if="value.selection"
|
|
16
|
+
:key="value.selection"
|
|
17
|
+
:disabled="!value.selection"
|
|
18
18
|
:label="t('webitelUI.filters.filterValue')"
|
|
19
19
|
:search-method="getConditionList"
|
|
20
20
|
:v="vConditions"
|
|
21
|
-
|
|
21
|
+
:model-value="value.conditions"
|
|
22
22
|
data-key="id"
|
|
23
23
|
option-value="id"
|
|
24
|
+
@update:model-value="handleInput('conditions', $event)"
|
|
24
25
|
/>
|
|
25
26
|
</div>
|
|
26
27
|
</template>
|
|
@@ -49,14 +50,34 @@ const model = defineModel<ModelValue>({
|
|
|
49
50
|
});
|
|
50
51
|
const { t } = useI18n();
|
|
51
52
|
|
|
52
|
-
const
|
|
53
|
-
|
|
54
|
-
|
|
53
|
+
const value = computed<ModelValue>(
|
|
54
|
+
() =>
|
|
55
|
+
model.value ?? {
|
|
56
|
+
selection: '',
|
|
57
|
+
conditions: '',
|
|
58
|
+
},
|
|
59
|
+
);
|
|
60
|
+
|
|
61
|
+
const handleInput = <K extends keyof ModelValue>(
|
|
62
|
+
key: K,
|
|
63
|
+
newFieldValue: ModelValue[K],
|
|
64
|
+
) => {
|
|
65
|
+
model.value = {
|
|
66
|
+
...value.value,
|
|
67
|
+
[key]: newFieldValue,
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
const updateSelected = (selection: string) => {
|
|
72
|
+
model.value = {
|
|
73
|
+
selection,
|
|
74
|
+
conditions: '',
|
|
75
|
+
};
|
|
55
76
|
};
|
|
56
77
|
|
|
57
78
|
const getConditionList = (params: Record<string, unknown>) => {
|
|
58
79
|
return caseStatusConditionsSearchMethod({
|
|
59
|
-
parentId:
|
|
80
|
+
parentId: value.value.selection,
|
|
60
81
|
...params,
|
|
61
82
|
});
|
|
62
83
|
};
|
|
@@ -1,21 +1,19 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="rating-from-to-filter-value-field">
|
|
3
3
|
<wt-input-number
|
|
4
|
-
v-if="model"
|
|
5
4
|
:label="`${t('reusable.from')}:`"
|
|
6
5
|
:placeholder="t('webitelUI.filters.filterValue')"
|
|
7
6
|
:v="vFrom"
|
|
8
|
-
:model-value="
|
|
7
|
+
:model-value="value.from"
|
|
9
8
|
class="rating-from-to-filter-value-field__input"
|
|
10
9
|
@update:model-value="handleInput('from', $event)"
|
|
11
10
|
/>
|
|
12
11
|
|
|
13
12
|
<wt-input-number
|
|
14
|
-
v-if="model"
|
|
15
13
|
:label="`${t('reusable.to')}:`"
|
|
16
14
|
:placeholder="t('webitelUI.filters.filterValue')"
|
|
17
15
|
:v="vTo"
|
|
18
|
-
:model-value="
|
|
16
|
+
:model-value="value.to"
|
|
19
17
|
class="rating-from-to-filter-value-field__input"
|
|
20
18
|
@update:model-value="handleInput('to', $event)"
|
|
21
19
|
/>
|
|
@@ -39,6 +37,14 @@ const model = defineModel<ModelValue>({
|
|
|
39
37
|
}),
|
|
40
38
|
});
|
|
41
39
|
|
|
40
|
+
const value = computed<ModelValue>(
|
|
41
|
+
() =>
|
|
42
|
+
model.value ?? {
|
|
43
|
+
from: null,
|
|
44
|
+
to: null,
|
|
45
|
+
},
|
|
46
|
+
);
|
|
47
|
+
|
|
42
48
|
const emit = defineEmits<{
|
|
43
49
|
'update:invalid': [
|
|
44
50
|
boolean,
|
|
@@ -53,17 +59,17 @@ const v$ = useVuelidate<{
|
|
|
53
59
|
computed(() => ({
|
|
54
60
|
model: {
|
|
55
61
|
from: {
|
|
56
|
-
required: requiredIf(() => !
|
|
62
|
+
required: requiredIf(() => !value.value.to),
|
|
57
63
|
maxValue: maxValue(
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
?
|
|
64
|
+
value.value.to &&
|
|
65
|
+
value.value.from !== null &&
|
|
66
|
+
value.value.from > value.value.to
|
|
67
|
+
? value.value.to
|
|
62
68
|
: Infinity,
|
|
63
69
|
),
|
|
64
70
|
},
|
|
65
71
|
to: {
|
|
66
|
-
required: requiredIf(() => !
|
|
72
|
+
required: requiredIf(() => !value.value.from),
|
|
67
73
|
},
|
|
68
74
|
},
|
|
69
75
|
})),
|
|
@@ -87,12 +93,11 @@ const vTo = computed(() => {
|
|
|
87
93
|
return modelValidation.to;
|
|
88
94
|
});
|
|
89
95
|
|
|
90
|
-
const handleInput = (key: keyof ModelValue,
|
|
91
|
-
|
|
92
|
-
...
|
|
96
|
+
const handleInput = (key: keyof ModelValue, newFieldValue: number) => {
|
|
97
|
+
model.value = {
|
|
98
|
+
...value.value,
|
|
99
|
+
[key]: newFieldValue,
|
|
93
100
|
};
|
|
94
|
-
newValue[key] = value;
|
|
95
|
-
model.value = newValue;
|
|
96
101
|
};
|
|
97
102
|
|
|
98
103
|
watch(
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="score-from-to-filter-value-field">
|
|
3
3
|
<wt-input-number
|
|
4
|
-
|
|
5
|
-
:model-value="model.from"
|
|
4
|
+
:model-value="value.from"
|
|
6
5
|
:max="props.numberMax"
|
|
7
6
|
:min="0"
|
|
8
7
|
:v="vFrom"
|
|
@@ -14,8 +13,7 @@
|
|
|
14
13
|
/>
|
|
15
14
|
|
|
16
15
|
<wt-input-number
|
|
17
|
-
|
|
18
|
-
:model-value="model.to"
|
|
16
|
+
:model-value="value.to"
|
|
19
17
|
:max="props.numberMax"
|
|
20
18
|
:min="0"
|
|
21
19
|
:v="vTo"
|
|
@@ -45,6 +43,14 @@ const model = defineModel<ModelValue>({
|
|
|
45
43
|
}),
|
|
46
44
|
});
|
|
47
45
|
|
|
46
|
+
const value = computed<ModelValue>(
|
|
47
|
+
() =>
|
|
48
|
+
model.value ?? {
|
|
49
|
+
from: null,
|
|
50
|
+
to: null,
|
|
51
|
+
},
|
|
52
|
+
);
|
|
53
|
+
|
|
48
54
|
const props = withDefaults(
|
|
49
55
|
defineProps<{
|
|
50
56
|
numberMax?: number;
|
|
@@ -68,10 +74,10 @@ const v$ = useVuelidate<{
|
|
|
68
74
|
computed(() => ({
|
|
69
75
|
model: {
|
|
70
76
|
from: {
|
|
71
|
-
required: requiredIf(() => !
|
|
77
|
+
required: requiredIf(() => !value.value.to),
|
|
72
78
|
},
|
|
73
79
|
to: {
|
|
74
|
-
required: requiredIf(() => !
|
|
80
|
+
required: requiredIf(() => !value.value.from),
|
|
75
81
|
},
|
|
76
82
|
},
|
|
77
83
|
})),
|
|
@@ -95,12 +101,11 @@ const vTo = computed(() => {
|
|
|
95
101
|
return modelValidation.to;
|
|
96
102
|
});
|
|
97
103
|
|
|
98
|
-
const handleInput = (key: keyof ModelValue,
|
|
99
|
-
|
|
100
|
-
...
|
|
104
|
+
const handleInput = (key: keyof ModelValue, newFieldValue: number) => {
|
|
105
|
+
model.value = {
|
|
106
|
+
...value.value,
|
|
107
|
+
[key]: newFieldValue,
|
|
101
108
|
};
|
|
102
|
-
newValue[key] = value;
|
|
103
|
-
model.value = newValue;
|
|
104
109
|
};
|
|
105
110
|
|
|
106
111
|
watch(
|