@shopbite-de/storefront 1.31.2 → 2.0.0
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/.github/workflows/ci.yaml +54 -0
- package/.nuxtrc +1 -1
- package/CLAUDE.md +23 -8
- package/app/app.vue +10 -6
- package/app/assets/css/main.css +100 -61
- package/app/components/AddToWishlist.vue +15 -25
- package/app/components/Address/Card.vue +6 -11
- package/app/components/Address/Detail.vue +23 -23
- package/app/components/Address/Fields.vue +175 -73
- package/app/components/Address/Form.vue +107 -106
- package/app/components/Cart/Bar.vue +6 -9
- package/app/components/Cart/Item.vue +48 -63
- package/app/components/Cart/QuickView.vue +38 -25
- package/app/components/Cart/Upsell.vue +24 -62
- package/app/components/Category/Breadcrumb.vue +29 -3
- package/app/components/Category/FilterGroup.vue +20 -41
- package/app/components/Category/Listing.vue +100 -130
- package/app/components/Category/SearchInput.vue +22 -19
- package/app/components/Checkout/DeliveryTimeSelect.vue +55 -77
- package/app/components/Checkout/LoginOrRegister.vue +28 -29
- package/app/components/Checkout/PaymentAndDelivery.vue +114 -86
- package/app/components/Checkout/Summary.vue +90 -60
- package/app/components/Checkout/VoucherInput.vue +40 -27
- package/app/components/Contact/Form.vue +164 -192
- package/app/components/DemoBanner.vue +5 -5
- package/app/components/Footer/StoreStatus.vue +2 -2
- package/app/components/Footer.vue +125 -57
- package/app/components/Header.vue +283 -18
- package/app/components/Home/Categories.vue +116 -0
- package/app/components/Home/Facts.vue +71 -0
- package/app/components/Home/Faq.vue +34 -16
- package/app/components/Home/Hero.vue +172 -0
- package/app/components/Home/Highlights.vue +29 -37
- package/app/components/Home/Restaurant.vue +102 -0
- package/app/components/Menu/BonCard.vue +180 -0
- package/app/components/Menu/CartPanel.vue +24 -0
- package/app/components/Menu/CategoryIndex.vue +54 -0
- package/app/components/Menu/OrderMode.vue +20 -0
- package/app/components/Menu/SectionHeader.vue +38 -0
- package/app/components/Navigation/MobileTop.vue +23 -15
- package/app/components/Order/Confirmation.vue +119 -0
- package/app/components/Order/Detail.vue +80 -88
- package/app/components/Product/CardSkeleton.vue +8 -12
- package/app/components/Product/Configurator.vue +8 -16
- package/app/components/Product/CrossSelling.vue +75 -83
- package/app/components/Product/DeselectIngredient.vue +17 -22
- package/app/components/Product/Detail.vue +35 -27
- package/app/components/Product/QuickView.vue +80 -51
- package/app/components/SalesChannelSwitch.vue +14 -28
- package/app/components/Sb/Button.vue +70 -0
- package/app/components/Sb/Checkbox.vue +73 -0
- package/app/components/Sb/Chip.vue +51 -0
- package/app/components/Sb/ChoiceGroup.vue +82 -0
- package/app/components/Sb/ConfirmDialog.vue +60 -0
- package/app/components/Sb/Field.vue +77 -0
- package/app/components/Sb/Icon.vue +66 -0
- package/app/components/Sb/IconButton.vue +55 -0
- package/app/components/Sb/Input.vue +23 -0
- package/app/components/Sb/SegmentedControl.vue +34 -0
- package/app/components/Sb/Select.vue +49 -0
- package/app/components/Sb/Sheet.vue +83 -0
- package/app/components/Sb/Stars.vue +60 -0
- package/app/components/Sb/StatusPill.vue +38 -0
- package/app/components/Sb/Stepper.vue +72 -0
- package/app/components/User/AccountHeader.vue +16 -0
- package/app/components/User/AuthPanel.vue +41 -0
- package/app/components/User/Detail.vue +32 -29
- package/app/components/User/LoginForm.vue +92 -98
- package/app/components/User/RegistrationForm.vue +285 -249
- package/app/components/Wishlist.vue +55 -155
- package/app/composables/useCartMutations.ts +9 -27
- package/app/composables/useCheckoutMethodGuard.ts +2 -24
- package/app/composables/useContactForm.ts +66 -0
- package/app/composables/useHomeMenuCategories.ts +41 -0
- package/app/composables/useNavigation.ts +10 -2
- package/app/composables/useOrderMode.ts +65 -0
- package/app/composables/useRegistrationForm.ts +161 -0
- package/app/composables/useRestaurantSchema.ts +1 -1
- package/app/composables/useShareLink.ts +3 -13
- package/app/composables/useSortingSelection.ts +13 -0
- package/app/composables/useThemePreset.ts +15 -0
- package/app/composables/useVoucherCode.ts +7 -16
- package/app/composables/useWishlistActions.ts +0 -51
- package/app/error.vue +31 -9
- package/app/layouts/account.vue +45 -50
- package/app/layouts/default.vue +2 -3
- package/app/layouts/listing.vue +3 -5
- package/app/pages/[...all].vue +8 -4
- package/app/pages/account/recover/password/index.vue +113 -80
- package/app/pages/anmelden.vue +11 -10
- package/app/pages/bestellung/[id]/erfolg.vue +1 -15
- package/app/pages/bestellung/[id]/fehler.vue +63 -51
- package/app/pages/bestellung/[id]/index.vue +3 -85
- package/app/pages/bestellung/kasse.vue +29 -0
- package/app/pages/bestellung.vue +8 -60
- package/app/pages/index.vue +12 -52
- package/app/pages/kontakt.vue +27 -7
- package/app/pages/konto/adressen.vue +106 -102
- package/app/pages/konto/bestellung/[id].vue +9 -43
- package/app/pages/konto/bestellungen.vue +55 -33
- package/app/pages/konto/index.vue +47 -62
- package/app/pages/konto/profil.vue +162 -100
- package/app/pages/maintenance.vue +8 -6
- package/app/pages/merkliste.vue +7 -8
- package/app/pages/passwort-vergessen.vue +92 -75
- package/app/pages/registrierung/bestaetigen.vue +20 -48
- package/app/pages/registrierung/index.vue +16 -7
- package/app/pages/suche.vue +94 -95
- package/app/plugins/theme-preset.ts +9 -0
- package/app/utils/highlight.ts +25 -0
- package/app/utils/product.ts +9 -0
- package/app/validation/registrationSchema.ts +1 -1
- package/docs/notes/2026-10-07-issue-434-property-group-projection.md +27 -0
- package/docs/notes/2026-10-07-listing-payload.md +38 -0
- package/docs/notes/2026-10-07-nuxt-4.6-inline-error-rendering.md +31 -0
- package/modules/theme.ts +115 -0
- package/nuxt.config.ts +27 -15
- package/package.json +6 -8
- package/playwright.config.ts +11 -0
- package/server/api/listing/[categoryId].get.ts +10 -11
- package/server/api/product/[productId].get.ts +4 -2
- package/server/api/product/variant.get.ts +1 -2
- package/server/api/search.get.ts +7 -12
- package/shared/theme/presets.ts +303 -0
- package/test/a11y/presets.test.ts +225 -0
- package/test/nuxt/AccountPagesPreset.test.ts +191 -0
- package/test/nuxt/AuthPagesPreset.test.ts +87 -0
- package/test/nuxt/CartCheckoutPreset.test.ts +154 -0
- package/test/nuxt/CartItem.test.ts +18 -3
- package/test/nuxt/CartUpsell.test.ts +1 -2
- package/test/nuxt/CheckoutFormsPreset.test.ts +120 -0
- package/test/nuxt/CheckoutOnePage.test.ts +115 -0
- package/test/nuxt/CheckoutSummary.test.ts +6 -6
- package/test/nuxt/CheckoutVoucherInput.test.ts +20 -32
- package/test/nuxt/ContactFormPreset.test.ts +115 -0
- package/test/nuxt/FooterStoreStatus.test.ts +2 -2
- package/test/nuxt/HeaderFooterPreset.test.ts +134 -0
- package/test/nuxt/HomeFaq.test.ts +3 -2
- package/test/nuxt/MenuBonCard.test.ts +122 -0
- package/test/nuxt/OrderPagesPreset.test.ts +132 -0
- package/test/nuxt/PaymentAndDelivery.test.ts +0 -4
- package/test/nuxt/ProductCrossSelling.test.ts +2 -1
- package/test/nuxt/ProductDeselectIngredient.test.ts +5 -3
- package/test/nuxt/ProductSheetPreset.test.ts +105 -0
- package/test/nuxt/RegisterConfirmPage.test.ts +0 -8
- package/test/nuxt/RegistrationForm.test.ts +89 -270
- package/test/nuxt/SbBaseComponents.test.ts +170 -0
- package/test/nuxt/SbStars.test.ts +25 -0
- package/test/nuxt/useCartMutations.test.ts +3 -17
- package/test/nuxt/useCartUpsell.test.ts +1 -1
- package/test/nuxt/useCheckoutMethodGuard.test.ts +0 -27
- package/test/nuxt/useShareLink.test.ts +1 -9
- package/test/nuxt/useWishlistActions.test.ts +3 -26
- package/test/unit/highlight.spec.ts +31 -0
- package/test/unit/product.spec.ts +12 -0
- package/test/unit/themePresets.spec.ts +61 -0
- package/app/app.config.ts +0 -19
- package/app/components/AnimatedSection.vue +0 -74
- package/app/components/BottomNavi.vue +0 -70
- package/app/components/Category/Header.vue +0 -48
- package/app/components/Checkout/PaymentMethod.vue +0 -30
- package/app/components/Checkout/ShippingMethod.vue +0 -30
- package/app/components/Cta.vue +0 -30
- package/app/components/Feature/Card.vue +0 -121
- package/app/components/Features.vue +0 -42
- package/app/components/Footer/Contact.vue +0 -82
- package/app/components/Header/Body.vue +0 -82
- package/app/components/Header/Right.vue +0 -187
- package/app/components/Header/Title.vue +0 -10
- package/app/components/Hero.vue +0 -233
- package/app/components/Home/MenuCategories.vue +0 -148
- package/app/components/ImageGallery.vue +0 -63
- package/app/components/Loading.vue +0 -29
- package/app/components/Navigation/DesktopLeft.vue +0 -39
- package/app/components/Product/Card.vue +0 -177
- package/app/components/Product/CardCompact.vue +0 -72
- package/app/components/Product/CardDietBadges.vue +0 -43
- package/app/components/Product/CardIngredients.vue +0 -35
- package/app/components/Product/CardKitchen.vue +0 -34
- package/app/components/Product/Category.vue +0 -160
- package/app/components/Product/SearchBar.vue +0 -95
- package/app/components/PublicAnnouncement.vue +0 -17
- package/app/pages/bestellung/bestaetigen.vue +0 -16
- package/app/pages/bestellung/warenkorb.vue +0 -49
- package/app/pages/bestellung/zahlung-versand.vue +0 -25
- package/test/nuxt/AddressFields.test.ts +0 -222
- package/test/nuxt/AnimatedSection.test.ts +0 -67
- package/test/nuxt/ContactForm.test.ts +0 -207
- package/test/nuxt/FooterContact.test.ts +0 -102
- package/test/nuxt/HeaderRight.test.ts +0 -142
- package/test/nuxt/Hero.test.ts +0 -126
- package/test/nuxt/HomeMenuCategories.test.ts +0 -94
- package/test/nuxt/LoginForm.test.ts +0 -159
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import type { Schemas } from "#shopware";
|
|
3
|
-
|
|
4
|
-
// Compact card for horizontal rows (top sellers, #327): cover or placeholder,
|
|
5
|
-
// number, name, price and a plus. The whole card opens the quick view.
|
|
6
|
-
const props = defineProps<{
|
|
7
|
-
product: Schemas["Product"];
|
|
8
|
-
}>();
|
|
9
|
-
|
|
10
|
-
const emit = defineEmits<{
|
|
11
|
-
select: [product: Schemas["Product"]];
|
|
12
|
-
}>();
|
|
13
|
-
|
|
14
|
-
const { getFormattedPrice } = useCommercePrice();
|
|
15
|
-
|
|
16
|
-
const coverMedia = computed(() => props.product.cover?.media);
|
|
17
|
-
const name = computed(
|
|
18
|
-
() => props.product.translated?.name ?? props.product.name,
|
|
19
|
-
);
|
|
20
|
-
</script>
|
|
21
|
-
|
|
22
|
-
<template>
|
|
23
|
-
<article
|
|
24
|
-
class="flex w-44 shrink-0 cursor-pointer snap-start flex-col overflow-hidden rounded-xl bg-default shadow-md ring ring-default transition-shadow hover:shadow-lg hover:ring-primary/40 focus-visible:outline-2 focus-visible:outline-primary"
|
|
25
|
-
role="button"
|
|
26
|
-
tabindex="0"
|
|
27
|
-
aria-haspopup="dialog"
|
|
28
|
-
:aria-label="`${name} auswählen`"
|
|
29
|
-
@click="emit('select', product)"
|
|
30
|
-
@keydown.enter.prevent="emit('select', product)"
|
|
31
|
-
@keydown.space.prevent="emit('select', product)"
|
|
32
|
-
>
|
|
33
|
-
<img
|
|
34
|
-
v-if="coverMedia?.url"
|
|
35
|
-
:src="coverMedia.url"
|
|
36
|
-
:srcset="mediaSrcSet(coverMedia)"
|
|
37
|
-
sizes="176px"
|
|
38
|
-
:width="mediaSize(coverMedia)?.width"
|
|
39
|
-
:height="mediaSize(coverMedia)?.height"
|
|
40
|
-
:alt="name"
|
|
41
|
-
loading="lazy"
|
|
42
|
-
decoding="async"
|
|
43
|
-
class="h-28 w-full object-cover"
|
|
44
|
-
/>
|
|
45
|
-
<div
|
|
46
|
-
v-else
|
|
47
|
-
class="flex h-28 w-full items-center justify-center bg-gradient-to-b from-brand-100 to-brand-200 text-brand-600"
|
|
48
|
-
aria-hidden="true"
|
|
49
|
-
>
|
|
50
|
-
<UIcon name="i-lucide-utensils-crossed" class="size-8" />
|
|
51
|
-
</div>
|
|
52
|
-
<div class="flex flex-1 flex-col gap-1.5 p-3">
|
|
53
|
-
<span class="text-xs font-semibold text-primary">
|
|
54
|
-
#{{ product.productNumber }}
|
|
55
|
-
</span>
|
|
56
|
-
<span class="line-clamp-2 text-base leading-5 font-bold text-highlighted">
|
|
57
|
-
{{ name }}
|
|
58
|
-
</span>
|
|
59
|
-
<div class="mt-auto flex items-center justify-between pt-1">
|
|
60
|
-
<span class="font-bold text-highlighted">
|
|
61
|
-
{{ getFormattedPrice(product.calculatedPrice.totalPrice) }}
|
|
62
|
-
</span>
|
|
63
|
-
<span
|
|
64
|
-
class="flex size-8 items-center justify-center rounded-full bg-primary/10 text-primary ring ring-inset ring-primary/25"
|
|
65
|
-
aria-hidden="true"
|
|
66
|
-
>
|
|
67
|
-
<UIcon name="i-lucide-plus" class="size-4" />
|
|
68
|
-
</span>
|
|
69
|
-
</div>
|
|
70
|
-
</div>
|
|
71
|
-
</article>
|
|
72
|
-
</template>
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import type { Schemas } from "#shopware";
|
|
3
|
-
|
|
4
|
-
const props = withDefaults(
|
|
5
|
-
defineProps<{
|
|
6
|
-
sortedProperties: Schemas["PropertyGroup"][] | undefined;
|
|
7
|
-
// `chip` sits in the ingredient row, `overlay` on the cover image (#325).
|
|
8
|
-
variant?: "chip" | "overlay";
|
|
9
|
-
}>(),
|
|
10
|
-
{ variant: "chip" },
|
|
11
|
-
);
|
|
12
|
-
|
|
13
|
-
const badges = computed(() => {
|
|
14
|
-
const diets = getDiets(props.sortedProperties);
|
|
15
|
-
return [
|
|
16
|
-
{
|
|
17
|
-
label: "Vegetarisch",
|
|
18
|
-
icon: "i-lucide-leaf",
|
|
19
|
-
show: diets.includes("vegetarian"),
|
|
20
|
-
},
|
|
21
|
-
{ label: "Vegan", icon: "i-lucide-vegan", show: diets.includes("vegan") },
|
|
22
|
-
].filter((badge) => badge.show);
|
|
23
|
-
});
|
|
24
|
-
|
|
25
|
-
// Static spans with the UBadge classes, see CardIngredients.vue.
|
|
26
|
-
const badgeClass = computed(() =>
|
|
27
|
-
props.variant === "overlay"
|
|
28
|
-
? "rounded-md bg-default ring ring-inset ring-success/50"
|
|
29
|
-
: "rounded-full bg-success/10",
|
|
30
|
-
);
|
|
31
|
-
</script>
|
|
32
|
-
|
|
33
|
-
<template>
|
|
34
|
-
<span
|
|
35
|
-
v-for="badge in badges"
|
|
36
|
-
:key="badge.label"
|
|
37
|
-
class="inline-flex items-center gap-1 px-2 py-1 text-xs font-medium text-success"
|
|
38
|
-
:class="badgeClass"
|
|
39
|
-
>
|
|
40
|
-
<UIcon :name="badge.icon" class="size-4 shrink-0" />
|
|
41
|
-
{{ badge.label }}
|
|
42
|
-
</span>
|
|
43
|
-
</template>
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import type { Schemas } from "#shopware";
|
|
3
|
-
|
|
4
|
-
const props = defineProps<{
|
|
5
|
-
sortedProperties: Schemas["PropertyGroup"][] | undefined;
|
|
6
|
-
withDietBadges: boolean;
|
|
7
|
-
}>();
|
|
8
|
-
|
|
9
|
-
const mainIngredients = computed(() =>
|
|
10
|
-
getMainIngredients(props.sortedProperties),
|
|
11
|
-
);
|
|
12
|
-
</script>
|
|
13
|
-
|
|
14
|
-
<template>
|
|
15
|
-
<!-- Plain spans with the UBadge "soft" classes: a listing hydrates up to
|
|
16
|
-
ten cards with several chips each, and every UBadge instance costs a
|
|
17
|
-
tailwind-variants merge (#325). -->
|
|
18
|
-
<div
|
|
19
|
-
v-if="withDietBadges || mainIngredients.length > 0"
|
|
20
|
-
class="flex flex-wrap gap-1.5"
|
|
21
|
-
>
|
|
22
|
-
<ProductCardDietBadges
|
|
23
|
-
v-if="withDietBadges"
|
|
24
|
-
:sorted-properties="sortedProperties"
|
|
25
|
-
variant="chip"
|
|
26
|
-
/>
|
|
27
|
-
<span
|
|
28
|
-
v-for="ingredient in mainIngredients"
|
|
29
|
-
:key="ingredient.id"
|
|
30
|
-
class="inline-flex items-center rounded-full bg-elevated px-2 py-1 text-xs font-medium text-default"
|
|
31
|
-
>
|
|
32
|
-
{{ ingredient.translated.name }}
|
|
33
|
-
</span>
|
|
34
|
-
</div>
|
|
35
|
-
</template>
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import type { Schemas } from "#shopware";
|
|
3
|
-
|
|
4
|
-
const props = defineProps<{
|
|
5
|
-
sortedProperties: Schemas["PropertyGroup"][] | undefined;
|
|
6
|
-
}>();
|
|
7
|
-
|
|
8
|
-
const kitchen = computed<
|
|
9
|
-
{ name: string; mediaUrl?: string; isImage: boolean } | undefined
|
|
10
|
-
>(() => {
|
|
11
|
-
const group = props.sortedProperties?.find(
|
|
12
|
-
(propertyGroup) => propertyGroup.translated.name === "Küche",
|
|
13
|
-
);
|
|
14
|
-
|
|
15
|
-
const option = group?.options?.[0];
|
|
16
|
-
if (!option) return undefined;
|
|
17
|
-
|
|
18
|
-
return {
|
|
19
|
-
name: option.translated.name,
|
|
20
|
-
mediaUrl: option.media?.url,
|
|
21
|
-
isImage: (group?.displayType ?? group?.translated.displayType) === "media",
|
|
22
|
-
};
|
|
23
|
-
});
|
|
24
|
-
</script>
|
|
25
|
-
|
|
26
|
-
<template>
|
|
27
|
-
<NuxtImg
|
|
28
|
-
v-if="kitchen?.isImage && kitchen.mediaUrl"
|
|
29
|
-
:src="kitchen.mediaUrl"
|
|
30
|
-
:alt="kitchen.name"
|
|
31
|
-
class="h-4 w-4 object-contain"
|
|
32
|
-
/>
|
|
33
|
-
<span v-else-if="kitchen">{{ kitchen.name }}</span>
|
|
34
|
-
</template>
|
|
@@ -1,160 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import type { Schemas } from "#shopware";
|
|
3
|
-
import ProductCard from "~/components/Product/Card.vue";
|
|
4
|
-
|
|
5
|
-
const props = defineProps({
|
|
6
|
-
category: {
|
|
7
|
-
type: Object as () => Schemas["Category"],
|
|
8
|
-
required: true,
|
|
9
|
-
},
|
|
10
|
-
});
|
|
11
|
-
|
|
12
|
-
const category = toRef(props.category);
|
|
13
|
-
const { apiClient } = useShopwareContext();
|
|
14
|
-
const categoryProducts = ref<Schemas["Product"][]>([]);
|
|
15
|
-
const quickView = useProductQuickView(categoryProducts);
|
|
16
|
-
const isLoading = ref(true);
|
|
17
|
-
|
|
18
|
-
const fetchCategoryProducts = async () => {
|
|
19
|
-
isLoading.value = true;
|
|
20
|
-
try {
|
|
21
|
-
const { data } = await apiClient.invoke("readProduct post /product", {
|
|
22
|
-
body: {
|
|
23
|
-
filter: [
|
|
24
|
-
{
|
|
25
|
-
type: "equals",
|
|
26
|
-
field: "categoryTree",
|
|
27
|
-
value: category.value.id,
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
type: "equals",
|
|
31
|
-
field: "parentId",
|
|
32
|
-
value: null,
|
|
33
|
-
},
|
|
34
|
-
],
|
|
35
|
-
includes: {
|
|
36
|
-
product: [
|
|
37
|
-
"id",
|
|
38
|
-
"productNumber",
|
|
39
|
-
"name",
|
|
40
|
-
"description",
|
|
41
|
-
"calculatedPrice",
|
|
42
|
-
"translated",
|
|
43
|
-
"categories",
|
|
44
|
-
"properties",
|
|
45
|
-
"propertyIds",
|
|
46
|
-
"options",
|
|
47
|
-
"optionIds",
|
|
48
|
-
"configuratorSettings",
|
|
49
|
-
"children",
|
|
50
|
-
"parentId",
|
|
51
|
-
"sortedProperties",
|
|
52
|
-
"cover",
|
|
53
|
-
],
|
|
54
|
-
property: ["id", "name", "translated", "options"],
|
|
55
|
-
property_group_option: ["id", "name", "translated", "group"],
|
|
56
|
-
product_configurator_setting: [
|
|
57
|
-
"id",
|
|
58
|
-
"optionId",
|
|
59
|
-
"option",
|
|
60
|
-
"productId",
|
|
61
|
-
],
|
|
62
|
-
product_option: ["id", "groupId", "name", "translated", "group"],
|
|
63
|
-
},
|
|
64
|
-
sort: [
|
|
65
|
-
{
|
|
66
|
-
field: "productNumber",
|
|
67
|
-
order: "ASC",
|
|
68
|
-
},
|
|
69
|
-
],
|
|
70
|
-
associations: {
|
|
71
|
-
cover: {
|
|
72
|
-
associations: {
|
|
73
|
-
media: {},
|
|
74
|
-
},
|
|
75
|
-
},
|
|
76
|
-
categories: {},
|
|
77
|
-
properties: {
|
|
78
|
-
associations: {
|
|
79
|
-
group: {},
|
|
80
|
-
},
|
|
81
|
-
},
|
|
82
|
-
options: {
|
|
83
|
-
associations: {
|
|
84
|
-
group: {},
|
|
85
|
-
},
|
|
86
|
-
},
|
|
87
|
-
configuratorSettings: {
|
|
88
|
-
associations: {
|
|
89
|
-
option: {
|
|
90
|
-
associations: {
|
|
91
|
-
group: {},
|
|
92
|
-
},
|
|
93
|
-
},
|
|
94
|
-
},
|
|
95
|
-
},
|
|
96
|
-
children: {
|
|
97
|
-
associations: {
|
|
98
|
-
properties: {
|
|
99
|
-
associations: {
|
|
100
|
-
group: {},
|
|
101
|
-
},
|
|
102
|
-
},
|
|
103
|
-
options: {
|
|
104
|
-
associations: {
|
|
105
|
-
group: {},
|
|
106
|
-
},
|
|
107
|
-
},
|
|
108
|
-
},
|
|
109
|
-
},
|
|
110
|
-
},
|
|
111
|
-
},
|
|
112
|
-
});
|
|
113
|
-
|
|
114
|
-
if (data?.elements) {
|
|
115
|
-
categoryProducts.value = data.elements;
|
|
116
|
-
}
|
|
117
|
-
} catch (error) {
|
|
118
|
-
console.error(`[category-products][${category.value.id}]`, error);
|
|
119
|
-
} finally {
|
|
120
|
-
isLoading.value = false;
|
|
121
|
-
}
|
|
122
|
-
};
|
|
123
|
-
|
|
124
|
-
// Fetch products when the component is mounted
|
|
125
|
-
onMounted(() => {
|
|
126
|
-
fetchCategoryProducts();
|
|
127
|
-
});
|
|
128
|
-
</script>
|
|
129
|
-
<template>
|
|
130
|
-
<div
|
|
131
|
-
v-if="!isLoading && categoryProducts.length > 0"
|
|
132
|
-
:id="category.name ?? ''"
|
|
133
|
-
class="flex flex-col"
|
|
134
|
-
>
|
|
135
|
-
<CategoryHeader :category="category" />
|
|
136
|
-
<div v-if="category.childCount > 0" class="grid grid-cols-1 gap-4">
|
|
137
|
-
<ProductCategory
|
|
138
|
-
v-for="child in category.children"
|
|
139
|
-
:key="child.id"
|
|
140
|
-
:category="child"
|
|
141
|
-
/>
|
|
142
|
-
</div>
|
|
143
|
-
<div v-else class="grid grid-cols-1 gap-4 xl:grid-cols-2">
|
|
144
|
-
<ProductCard
|
|
145
|
-
v-for="product in categoryProducts"
|
|
146
|
-
:key="product.id"
|
|
147
|
-
:product="product"
|
|
148
|
-
:with-favorite-button="true"
|
|
149
|
-
:selectable="true"
|
|
150
|
-
@select="quickView.show"
|
|
151
|
-
/>
|
|
152
|
-
</div>
|
|
153
|
-
<LazyProductQuickView
|
|
154
|
-
v-if="quickView.mounted.value"
|
|
155
|
-
v-model:open="quickView.open.value"
|
|
156
|
-
:product="quickView.product.value"
|
|
157
|
-
/>
|
|
158
|
-
</div>
|
|
159
|
-
<div v-else-if="isLoading" class="flex flex-col" />
|
|
160
|
-
</template>
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { ref } from "vue";
|
|
3
|
-
import { onClickOutside, useDebounceFn, useFocus } from "@vueuse/core";
|
|
4
|
-
|
|
5
|
-
withDefaults(
|
|
6
|
-
defineProps<{
|
|
7
|
-
searchInProgress?: boolean;
|
|
8
|
-
}>(),
|
|
9
|
-
{
|
|
10
|
-
searchInProgress: false,
|
|
11
|
-
},
|
|
12
|
-
);
|
|
13
|
-
|
|
14
|
-
const emit =
|
|
15
|
-
defineEmits<(e: "update:searchInProgress", value: boolean) => void>();
|
|
16
|
-
|
|
17
|
-
const { searchTerm, search, getProducts, loading } = useProductSearchSuggest();
|
|
18
|
-
const { onProductAdded } = useProductEvents();
|
|
19
|
-
|
|
20
|
-
const searchContainer = ref(null);
|
|
21
|
-
const searchInput = ref();
|
|
22
|
-
const minSearchLength = 1;
|
|
23
|
-
|
|
24
|
-
const active = ref(false);
|
|
25
|
-
|
|
26
|
-
// Clear search when product is added to cart
|
|
27
|
-
onProductAdded(() => {
|
|
28
|
-
typingQuery.value = "";
|
|
29
|
-
active.value = false;
|
|
30
|
-
});
|
|
31
|
-
|
|
32
|
-
watch(active, (value) => {
|
|
33
|
-
const { focused } = useFocus(searchInput);
|
|
34
|
-
|
|
35
|
-
focused.value = value;
|
|
36
|
-
});
|
|
37
|
-
|
|
38
|
-
// String the user has typed in the search field
|
|
39
|
-
const typingQuery = ref("");
|
|
40
|
-
|
|
41
|
-
watch(typingQuery, (value) => {
|
|
42
|
-
if (value.length >= minSearchLength) {
|
|
43
|
-
performSuggestSearch(value);
|
|
44
|
-
emit("update:searchInProgress", true);
|
|
45
|
-
} else {
|
|
46
|
-
emit("update:searchInProgress", false);
|
|
47
|
-
}
|
|
48
|
-
});
|
|
49
|
-
|
|
50
|
-
// Defer the search request to prevent the search from being triggered too after typing
|
|
51
|
-
const performSuggestSearch = useDebounceFn((value) => {
|
|
52
|
-
searchTerm.value = value;
|
|
53
|
-
search();
|
|
54
|
-
}, 500);
|
|
55
|
-
|
|
56
|
-
if (import.meta.client) {
|
|
57
|
-
onClickOutside(searchContainer, () => {
|
|
58
|
-
active.value = false;
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
const showSuggest = computed(() => {
|
|
63
|
-
return typingQuery.value.length >= minSearchLength && active.value;
|
|
64
|
-
});
|
|
65
|
-
|
|
66
|
-
defineExpose({
|
|
67
|
-
showSuggest,
|
|
68
|
-
products: getProducts,
|
|
69
|
-
loading,
|
|
70
|
-
});
|
|
71
|
-
</script>
|
|
72
|
-
|
|
73
|
-
<template>
|
|
74
|
-
<UInput
|
|
75
|
-
v-model="typingQuery"
|
|
76
|
-
name="search"
|
|
77
|
-
class="w-full my-2"
|
|
78
|
-
size="xl"
|
|
79
|
-
:loading="loading"
|
|
80
|
-
placeholder="Suche..."
|
|
81
|
-
:ui="{}"
|
|
82
|
-
@input="active = true"
|
|
83
|
-
>
|
|
84
|
-
<template v-if="typingQuery?.length" #trailing>
|
|
85
|
-
<UButton
|
|
86
|
-
color="neutral"
|
|
87
|
-
variant="link"
|
|
88
|
-
size="sm"
|
|
89
|
-
icon="i-lucide-circle-x"
|
|
90
|
-
aria-label="Clear input"
|
|
91
|
-
@click="typingQuery = ''"
|
|
92
|
-
/>
|
|
93
|
-
</template>
|
|
94
|
-
</UInput>
|
|
95
|
-
</template>
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { ExclamationTriangleIcon } from "@heroicons/vue/24/outline";
|
|
3
|
-
|
|
4
|
-
defineProps<{
|
|
5
|
-
message?: string;
|
|
6
|
-
}>();
|
|
7
|
-
</script>
|
|
8
|
-
|
|
9
|
-
<template>
|
|
10
|
-
<div
|
|
11
|
-
v-if="message"
|
|
12
|
-
class="bg-red-100 z-50 text-blackish flex p-8 gap-4 shadow-md rounded-md my-4"
|
|
13
|
-
>
|
|
14
|
-
<ExclamationTriangleIcon class="w-14 h-14 min-w-12" />
|
|
15
|
-
<div>{{ message }}</div>
|
|
16
|
-
</div>
|
|
17
|
-
</template>
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
useSeoMeta({
|
|
3
|
-
title: "Prüfen & Bestellen",
|
|
4
|
-
robots: "noindex, nofollow",
|
|
5
|
-
});
|
|
6
|
-
|
|
7
|
-
const { isLoggedIn, isGuestSession } = useUser();
|
|
8
|
-
|
|
9
|
-
if (!isLoggedIn.value && !isGuestSession.value) {
|
|
10
|
-
await navigateTo("/bestellung/warenkorb");
|
|
11
|
-
}
|
|
12
|
-
</script>
|
|
13
|
-
|
|
14
|
-
<template>
|
|
15
|
-
<CheckoutSummary />
|
|
16
|
-
</template>
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
useSeoMeta({
|
|
3
|
-
title: "Warenkorb",
|
|
4
|
-
robots: "noindex, nofollow",
|
|
5
|
-
});
|
|
6
|
-
|
|
7
|
-
const { isLoggedIn, isGuestSession } = useUser();
|
|
8
|
-
const { isEmpty } = useCart();
|
|
9
|
-
|
|
10
|
-
const isCustomerAvailable = computed<boolean>(() => {
|
|
11
|
-
return isLoggedIn.value || isGuestSession.value;
|
|
12
|
-
});
|
|
13
|
-
</script>
|
|
14
|
-
|
|
15
|
-
<template>
|
|
16
|
-
<div class="grid grid-cols-1 lg:grid-cols-2 gap-8 py-8">
|
|
17
|
-
<div class="flex flex-col gap-4">
|
|
18
|
-
<h2 class="text-lg font-semibold">
|
|
19
|
-
{{ isCustomerAvailable ? "Deine Daten" : "Anmelden oder registrieren" }}
|
|
20
|
-
</h2>
|
|
21
|
-
<CheckoutLoginOrRegister v-if="!isLoggedIn && !isGuestSession" />
|
|
22
|
-
<UserDetail v-else :with-edit-button="true" />
|
|
23
|
-
</div>
|
|
24
|
-
|
|
25
|
-
<div class="flex flex-col gap-4">
|
|
26
|
-
<h2 class="text-lg font-semibold">Warenkorb</h2>
|
|
27
|
-
<UCard>
|
|
28
|
-
<CartQuickView />
|
|
29
|
-
</UCard>
|
|
30
|
-
<UButton
|
|
31
|
-
v-if="!isEmpty && isCustomerAvailable"
|
|
32
|
-
label="Zahlungs- und Versandart auswählen"
|
|
33
|
-
size="xl"
|
|
34
|
-
block
|
|
35
|
-
trailing-icon="i-lucide-arrow-right"
|
|
36
|
-
to="/bestellung/zahlung-versand"
|
|
37
|
-
/>
|
|
38
|
-
<UButton
|
|
39
|
-
v-if="isEmpty"
|
|
40
|
-
label="Zur Speisekarte"
|
|
41
|
-
size="xl"
|
|
42
|
-
block
|
|
43
|
-
variant="outline"
|
|
44
|
-
icon="i-lucide-arrow-left"
|
|
45
|
-
to="/speisekarte"
|
|
46
|
-
/>
|
|
47
|
-
</div>
|
|
48
|
-
</div>
|
|
49
|
-
</template>
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
useSeoMeta({
|
|
3
|
-
title: "Zahlung & Versand",
|
|
4
|
-
robots: "noindex, nofollow",
|
|
5
|
-
});
|
|
6
|
-
|
|
7
|
-
const { isLoggedIn, isGuestSession } = useUser();
|
|
8
|
-
|
|
9
|
-
if (!isLoggedIn.value && !isGuestSession.value) {
|
|
10
|
-
await navigateTo("/bestellung/warenkorb");
|
|
11
|
-
}
|
|
12
|
-
</script>
|
|
13
|
-
|
|
14
|
-
<template>
|
|
15
|
-
<div class="flex flex-col gap-8 py-8">
|
|
16
|
-
<CheckoutPaymentAndDelivery />
|
|
17
|
-
<UButton
|
|
18
|
-
label="Weiter zu Prüfen & Bestellen"
|
|
19
|
-
trailing-icon="i-lucide-arrow-right"
|
|
20
|
-
size="xl"
|
|
21
|
-
block
|
|
22
|
-
to="/bestellung/bestaetigen"
|
|
23
|
-
/>
|
|
24
|
-
</div>
|
|
25
|
-
</template>
|