@7365admin1/layer-common 4.97.1-staging.576 → 4.97.1-staging.577
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.
|
@@ -28,6 +28,14 @@
|
|
|
28
28
|
class="ml-2"
|
|
29
29
|
style="max-width: 250px"
|
|
30
30
|
/>
|
|
31
|
+
<v-autocomplete
|
|
32
|
+
v-model="filterByCategory"
|
|
33
|
+
:items="categoryFilterItems"
|
|
34
|
+
label="Filter by category"
|
|
35
|
+
hide-details
|
|
36
|
+
class="ml-2"
|
|
37
|
+
style="max-width: 250px"
|
|
38
|
+
/>
|
|
31
39
|
<v-text-field
|
|
32
40
|
v-model="startDate"
|
|
33
41
|
:value="standardFormatDate(startDate)"
|
|
@@ -684,6 +692,7 @@ const pageRange = ref("-- - -- of --");
|
|
|
684
692
|
const items = ref<Array<Record<string, any>>>([]);
|
|
685
693
|
|
|
686
694
|
const filterByStatus = ref("All");
|
|
695
|
+
const filterByCategory = ref("All");
|
|
687
696
|
const getPast30DaysDate = (): Date => {
|
|
688
697
|
const today = new Date();
|
|
689
698
|
const past30Days = new Date(today);
|
|
@@ -715,9 +724,10 @@ const {
|
|
|
715
724
|
dateTo: moment(endDate.value, "DD/MM/YYYY").endOf("day"),
|
|
716
725
|
search: searchText.value,
|
|
717
726
|
status: filterByStatus.value == "All" ? "" : filterByStatus.value,
|
|
727
|
+
category: filterByCategory.value == "All" ? "" : filterByCategory.value,
|
|
718
728
|
}),
|
|
719
729
|
{
|
|
720
|
-
watch: [filterByStatus, searchText, page, startDate, endDate],
|
|
730
|
+
watch: [filterByStatus, filterByCategory, searchText, page, startDate, endDate],
|
|
721
731
|
}
|
|
722
732
|
);
|
|
723
733
|
|
|
@@ -1068,6 +1078,12 @@ const subjectOptions = computed(() => {
|
|
|
1068
1078
|
});
|
|
1069
1079
|
});
|
|
1070
1080
|
|
|
1081
|
+
// Same categories as the create form, plus "All" (default: nothing hidden).
|
|
1082
|
+
const categoryFilterItems = computed(() => [
|
|
1083
|
+
"All",
|
|
1084
|
+
...subjectOptions.value.map((item) => item.title),
|
|
1085
|
+
]);
|
|
1086
|
+
|
|
1071
1087
|
const isFileUploading = ref<boolean>(false);
|
|
1072
1088
|
type TFile = {
|
|
1073
1089
|
name: string;
|
|
@@ -73,6 +73,7 @@ export default function useFeedback() {
|
|
|
73
73
|
provider = "",
|
|
74
74
|
service = "",
|
|
75
75
|
userId = "",
|
|
76
|
+
category = "",
|
|
76
77
|
}: {
|
|
77
78
|
page?: number;
|
|
78
79
|
limit?: number;
|
|
@@ -85,6 +86,8 @@ export default function useFeedback() {
|
|
|
85
86
|
provider?: string | any;
|
|
86
87
|
service?: string;
|
|
87
88
|
userId?: string;
|
|
89
|
+
/** Optional: one category (the feedback subject) or a comma list. Empty = all. */
|
|
90
|
+
category?: string;
|
|
88
91
|
} = {}) {
|
|
89
92
|
try {
|
|
90
93
|
return useNuxtApp().$api<Record<string, any>>("/api/feedbacks2", {
|
|
@@ -100,6 +103,7 @@ export default function useFeedback() {
|
|
|
100
103
|
status,
|
|
101
104
|
provider,
|
|
102
105
|
service,
|
|
106
|
+
...(category && { category }),
|
|
103
107
|
...(currentUser.value?.type != "site" && {
|
|
104
108
|
userId,
|
|
105
109
|
}),
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@7365admin1/layer-common",
|
|
3
3
|
"license": "MIT",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"version": "4.97.1-staging.
|
|
5
|
+
"version": "4.97.1-staging.577",
|
|
6
6
|
"author": "7365admin1",
|
|
7
7
|
"main": "./nuxt.config.ts",
|
|
8
8
|
"//files": "What a consumer extending this layer actually loads. Without this npm ships the whole working tree - the changesets, the CI workflows, the render harness in tools/ and any scratch directory that happened to exist at publish time. Nuxt resolves a layer by directory, so every runtime directory below has to stay listed; adding a new top-level runtime directory means adding it here too.",
|