@shopbite-de/storefront 1.2.3 → 1.2.4
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/app/components/Category/Listing.vue +29 -5
- package/content/index.yml +16 -2
- package/package.json +1 -1
|
@@ -7,7 +7,7 @@ const props = defineProps<{
|
|
|
7
7
|
|
|
8
8
|
const { id: categoryId } = toRefs(props);
|
|
9
9
|
|
|
10
|
-
const
|
|
10
|
+
const searchCriteria = {
|
|
11
11
|
includes: {
|
|
12
12
|
product: [
|
|
13
13
|
"id",
|
|
@@ -76,6 +76,20 @@ const query = {
|
|
|
76
76
|
},
|
|
77
77
|
} as operations["searchPage post /search"]["body"];
|
|
78
78
|
|
|
79
|
+
const defaultSorting = {
|
|
80
|
+
sort: [
|
|
81
|
+
{
|
|
82
|
+
field: "productNumber",
|
|
83
|
+
order: "ASC",
|
|
84
|
+
},
|
|
85
|
+
],
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
const searchCriteriaWithSorting = {
|
|
89
|
+
...searchCriteria,
|
|
90
|
+
...defaultSorting,
|
|
91
|
+
} as operations["searchPage post /search"]["body"];
|
|
92
|
+
|
|
79
93
|
const {
|
|
80
94
|
resetFilters,
|
|
81
95
|
loading,
|
|
@@ -90,7 +104,7 @@ const {
|
|
|
90
104
|
} = useListing({
|
|
91
105
|
listingType: "categoryListing",
|
|
92
106
|
categoryId: props.id,
|
|
93
|
-
defaultSearchCriteria:
|
|
107
|
+
defaultSearchCriteria: searchCriteria,
|
|
94
108
|
});
|
|
95
109
|
|
|
96
110
|
const { search: categorySearch } = useCategorySearch();
|
|
@@ -135,20 +149,30 @@ const selectedListingFilters = computed<ShortcutFilterParam[]>(() => {
|
|
|
135
149
|
});
|
|
136
150
|
|
|
137
151
|
await useAsyncData(`listing${categoryId.value}`, async () => {
|
|
138
|
-
await search(
|
|
152
|
+
await search(searchCriteriaWithSorting);
|
|
139
153
|
});
|
|
140
154
|
|
|
141
155
|
watch(selectedListingFilters, () => {
|
|
142
|
-
|
|
156
|
+
if (selectedListingFilters.value[0]?.value == "") {
|
|
157
|
+
handleFilterRest();
|
|
158
|
+
} else {
|
|
159
|
+
setCurrentFilters(selectedListingFilters.value);
|
|
160
|
+
}
|
|
143
161
|
});
|
|
144
162
|
|
|
145
163
|
watch(currentSorting, () => {
|
|
146
|
-
|
|
164
|
+
const q = {
|
|
165
|
+
query: getCurrentFilters.value?.search,
|
|
166
|
+
properties: getCurrentFilters.value?.properties?.join("|"),
|
|
167
|
+
};
|
|
168
|
+
|
|
169
|
+
changeCurrentSortingOrder(currentSorting.value as string, q);
|
|
147
170
|
});
|
|
148
171
|
|
|
149
172
|
async function handleFilterRest() {
|
|
150
173
|
await resetFilters();
|
|
151
174
|
selectedPropertyFilters.value = [];
|
|
175
|
+
currentSorting.value = "number-asc";
|
|
152
176
|
}
|
|
153
177
|
|
|
154
178
|
const moreThanOneFilterAndOption = computed<boolean>(
|
package/content/index.yml
CHANGED
|
@@ -55,7 +55,7 @@ marquee:
|
|
|
55
55
|
title: Das lieben unsere Kunden
|
|
56
56
|
description: Kundenbilder
|
|
57
57
|
headline: SHOPBITE
|
|
58
|
-
|
|
58
|
+
items:
|
|
59
59
|
gallery:
|
|
60
60
|
title: Restaurant
|
|
61
61
|
description: Genießen Sie leckeres Essen in einem rustikalen und gemütlichen Ambiente.
|
|
@@ -66,7 +66,21 @@ gallery:
|
|
|
66
66
|
color: primary
|
|
67
67
|
variant: subtle
|
|
68
68
|
trailingIcon: i-lucide-phone
|
|
69
|
-
|
|
69
|
+
images:
|
|
70
|
+
- image: https://shopware.shopbite.de/media/71/2a/1a/1762465670/restaurant1.webp
|
|
71
|
+
alt: La Fattoria Restaurant Innenbereich 1
|
|
72
|
+
- image: https://shopware.shopbite.de/media/61/ea/77/1762465670/restaurant2.webp
|
|
73
|
+
alt: La Fattoria Restaurant Innenbereich 2
|
|
74
|
+
- image: https://shopware.shopbite.de/media/6d/ac/ca/1762465670/restaurant3.webp
|
|
75
|
+
alt: La Fattoria Restaurant Innenbereich 3
|
|
76
|
+
- image: https://shopware.shopbite.de/media/af/d6/da/1762465670/restaurant4.webp
|
|
77
|
+
alt: La Fattoria Restaurant Innenbereich 4
|
|
78
|
+
- image: https://shopware.shopbite.de/media/6a/ff/e2/1762465670/restaurant5.webp
|
|
79
|
+
alt: La Fattoria Restaurant Innenbereich 5
|
|
80
|
+
- image: https://shopware.shopbite.de/media/80/76/d0/1762465670/restaurant6.webp
|
|
81
|
+
alt: La Fattoria Restaurant Innenbereich 6
|
|
82
|
+
- image: https://nbg1.your-objectstorage.com/lafattoria-public/media/30/f7/76/1763383122/restaurant10.webp
|
|
83
|
+
alt: La Fattoria Restaurant Innenbereich 10
|
|
70
84
|
cta:
|
|
71
85
|
title: Jetzt bestellen!
|
|
72
86
|
description: Genieße die italienische Küche, frisch zubereitet und direkt zu dir geliefert oder vor Ort genießen.
|