@revenexx/cover 0.2.17 → 0.2.19

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 (53) hide show
  1. package/app/components/account/address/AccountAddressView.vue +433 -0
  2. package/app/components/account/dashboard/AccountDashboard.vue +10 -330
  3. package/app/components/account/dashboard/AccountDashboardBudgets.vue +71 -0
  4. package/app/components/account/dashboard/AccountDashboardGreeting.vue +17 -0
  5. package/app/components/account/dashboard/AccountDashboardKpis.vue +71 -0
  6. package/app/components/account/dashboard/AccountDashboardQuickActions.vue +36 -0
  7. package/app/components/account/dashboard/AccountDashboardRecentOrders.vue +70 -0
  8. package/app/components/account/dashboard/AccountDashboardRequisitions.vue +60 -0
  9. package/app/components/account/profile/AccountPasswordForm.vue +155 -0
  10. package/app/components/account/profile/AccountProfileForm.vue +159 -0
  11. package/app/components/auth/AuthLoginTeaser.vue +1 -1
  12. package/app/components/auth/AuthRegisterPanel.vue +123 -119
  13. package/app/components/cart/position/CartPosition.vue +26 -17
  14. package/app/components/cart/recommend/CartReorderStrip.vue +27 -12
  15. package/app/components/cart/view/CartView.vue +1 -8
  16. package/app/components/checkout/confirmation/CheckoutConfirmationActions.vue +52 -0
  17. package/app/components/checkout/confirmation/CheckoutConfirmationHero.vue +41 -0
  18. package/app/components/checkout/confirmation/CheckoutConfirmationNextSteps.vue +60 -0
  19. package/app/components/checkout/confirmation/CheckoutConfirmationOrderRecap.vue +102 -0
  20. package/app/components/checkout/confirmation/CheckoutConfirmationView.vue +30 -265
  21. package/app/components/listing/ListingActiveFilters.vue +59 -0
  22. package/app/components/listing/ListingFilterBar.vue +24 -0
  23. package/app/components/listing/ListingFilterDrawer.vue +72 -0
  24. package/app/components/listing/ListingFilterRail.vue +23 -0
  25. package/app/components/listing/ListingResults.vue +88 -0
  26. package/app/components/listing/ListingToolbar.vue +46 -0
  27. package/app/components/listing/ListingView.vue +14 -204
  28. package/app/components/product/detail/ProductDetailIdentity.vue +44 -0
  29. package/app/components/product/detail/ProductDetailPrice.vue +39 -0
  30. package/app/components/search/filter/SearchFacets.vue +12 -102
  31. package/app/components/search/filter/SearchFacetsBar.vue +161 -0
  32. package/app/composables/useAccountDashboard.ts +112 -0
  33. package/app/composables/useCategoryListing.ts +92 -0
  34. package/app/composables/useCheckoutConfirmation.ts +63 -0
  35. package/app/composables/useFacetFilters.ts +122 -0
  36. package/app/composables/useProduct.ts +11 -0
  37. package/app/composables/useProductListing.ts +5 -1
  38. package/app/composables/useSearchListing.ts +71 -0
  39. package/app/interfaces/checkout.ts +27 -0
  40. package/i18n/locales/de/auth.json +1 -1
  41. package/i18n/locales/de/editor.json +33 -0
  42. package/i18n/locales/en/editor.json +33 -0
  43. package/package.json +1 -1
  44. package/server/data/media/60794300.jpg +0 -0
  45. package/server/data/media/aussen-rueckwaertsdrehen.jpg +0 -0
  46. package/server/data/media/bohrtiefe-8.jpg +0 -0
  47. package/server/data/media/dummy-brw-image.png +0 -0
  48. package/server/data/media/feindrehen.jpg +0 -0
  49. package/server/data/media/header-aktuelles.jpg +0 -0
  50. package/server/data/media/sternsiebeinsatz-gr-3-000028480.stp +19039 -0
  51. package/server/data/media/zaehnezahl-z4.jpg +0 -0
  52. package/server/data/media/zaehnezahl-z6.jpg +0 -0
  53. package/server/services/ApiProductService.ts +4 -1
@@ -60,7 +60,7 @@ const availabilityColor = computed(() => {
60
60
  switch (availability.value?.state) {
61
61
  case "in-stock": return "bg-success";
62
62
  case "partial": return "bg-warning";
63
- default: return "bg-error";
63
+ default: return "bg-[oklch(0.88_0.2_98.38)]";
64
64
  }
65
65
  });
66
66
 
@@ -115,7 +115,7 @@ const hintColor = (type: string) =>
115
115
  />
116
116
  </div>
117
117
 
118
- <div class="flex items-start gap-3">
118
+ <div class="flex flex-wrap md:flex-nowrap items-start gap-3">
119
119
  <!-- Selector + drag handle -->
120
120
  <div
121
121
  v-if="!readonly"
@@ -178,6 +178,18 @@ const hintColor = (type: string) =>
178
178
  class="text-xs text-muted"
179
179
  >{{ item.name2 }}</span>
180
180
 
181
+ <!-- Delivery / availability -->
182
+ <span
183
+ v-if="availability"
184
+ class="inline-flex items-center gap-1.5 text-xs text-muted"
185
+ >
186
+ <span
187
+ class="size-2 rounded-full"
188
+ :class="availabilityColor"
189
+ />
190
+ {{ t(`cart.availability.${availability.state}`, { count: availability.availableQuantity, days: availability.deliveryDays ?? 0 }) }}
191
+ </span>
192
+
181
193
  <!-- Cost center: shown and edited right at the position -->
182
194
  <button
183
195
  v-if="showCostCenter && !readonly"
@@ -260,8 +272,14 @@ const hintColor = (type: string) =>
260
272
  </button>
261
273
  </div>
262
274
 
263
- <!-- Quantity + availability -->
264
- <div class="flex flex-col items-end gap-1.5 shrink-0">
275
+ <!-- Forces quantity/price/functions onto their own row below 768px -->
276
+ <div
277
+ class="basis-full md:hidden"
278
+ aria-hidden="true"
279
+ />
280
+
281
+ <!-- Quantity -->
282
+ <div class="flex items-center shrink-0">
265
283
  <div
266
284
  v-if="!readonly"
267
285
  class="flex items-center gap-1"
@@ -300,22 +318,13 @@ const hintColor = (type: string) =>
300
318
  <span
301
319
  v-else
302
320
  class="text-sm text-highlighted"
303
- >{{ line?.adjustedQuantity ?? item.quantity }}</span>
304
- <span class="text-xs text-muted">{{ item.unit ?? t('cart.position.defaultUnit') }}</span>
305
- <span
306
- v-if="availability"
307
- class="inline-flex items-center gap-1.5 text-xs text-muted"
308
321
  >
309
- <span
310
- class="size-2 rounded-full"
311
- :class="availabilityColor"
312
- />
313
- {{ t(`cart.availability.${availability.state}`, { count: availability.availableQuantity, days: availability.deliveryDays ?? 0 }) }}
322
+ {{ line?.adjustedQuantity ?? item.quantity }}
314
323
  </span>
315
324
  </div>
316
325
 
317
326
  <!-- Price block -->
318
- <div class="flex flex-col items-end gap-0.5 w-32 shrink-0">
327
+ <div class="flex flex-col items-end gap-0.5 w-44 shrink-0 ms-auto md:ms-0">
319
328
  <template v-if="line?.priceLabel">
320
329
  <UBadge
321
330
  color="neutral"
@@ -328,12 +337,12 @@ const hintColor = (type: string) =>
328
337
  {{ formatCurrency(line?.lineTotal ?? item.price * item.quantity) }}
329
338
  </span>
330
339
  <span class="text-xs text-muted">
331
- {{ t('cart.position.perUnit', { price: formatCurrency(line?.unitPrice ?? item.price) }) }}
340
+ {{ formatCurrency(line?.unitPrice ?? item.price) }} / {{ item.unit ?? t('cart.position.defaultUnit') }}
332
341
  </span>
333
342
  <span
334
343
  v-for="surcharge in line?.surcharges ?? []"
335
344
  :key="surcharge.name"
336
- class="text-xs text-dimmed"
345
+ class="text-xs text-muted text-right whitespace-nowrap"
337
346
  >
338
347
  + {{ surcharge.name }} {{ formatCurrency(surcharge.amountPerUnit) }}
339
348
  </span>
@@ -84,7 +84,7 @@ function add(suggestion: (typeof suggestions.value)[number]): void {
84
84
  <template>
85
85
  <section
86
86
  v-if="suggestions.length"
87
- class="print:hidden"
87
+ class="print:hidden mb-11"
88
88
  >
89
89
  <h2 class="flex items-center gap-2 text-sm font-semibold text-highlighted mb-3">
90
90
  <UIcon
@@ -93,16 +93,31 @@ function add(suggestion: (typeof suggestions.value)[number]): void {
93
93
  />
94
94
  {{ t('cart.boost.reorderTitle') }}
95
95
  </h2>
96
- <div class="flex gap-3 overflow-x-auto pb-2 -mx-1 px-1">
97
- <CartRecommendCard
98
- v-for="suggestion in suggestions"
99
- :key="suggestion.id"
100
- :name="suggestion.name"
101
- :image="suggestion.image"
102
- :sku="suggestion.sku"
103
- :price="suggestion.price"
104
- @add="add(suggestion)"
105
- />
106
- </div>
96
+ <UCarousel
97
+ :items="suggestions"
98
+ arrows
99
+ dots
100
+ align="start"
101
+ :ui="{
102
+ item: 'basis-auto',
103
+ dot: 'rounded-none bg-primary/30 data-[state=active]:bg-primary',
104
+ arrows: 'hidden md:block',
105
+ prev: 'size-11 justify-center start-2 sm:start-2 disabled:text-dimmed disabled:ring-default',
106
+ next: 'size-11 justify-center end-2 sm:end-2 disabled:text-dimmed disabled:ring-default',
107
+ }"
108
+ :prev="{ color: 'primary' }"
109
+ :next="{ color: 'primary' }"
110
+ class="px-0 md:px-16 pb-8"
111
+ >
112
+ <template #default="{ item }">
113
+ <CartRecommendCard
114
+ :name="item.name"
115
+ :image="item.image"
116
+ :sku="item.sku"
117
+ :price="item.price"
118
+ @add="add(item)"
119
+ />
120
+ </template>
121
+ </UCarousel>
107
122
  </section>
108
123
  </template>
@@ -36,7 +36,7 @@ onMounted(() => {
36
36
  hydrated.value = true;
37
37
  });
38
38
 
39
- const { items, requisitions, isEmpty, itemCount } = storeToRefs(cart);
39
+ const { items, requisitions, isEmpty } = storeToRefs(cart);
40
40
 
41
41
  const freeItems = computed(() => items.value.filter(i => !i.requisitionId));
42
42
  const itemsByRequisition = computed(() => {
@@ -54,10 +54,6 @@ const itemsByRequisition = computed(() => {
54
54
  // Keep the selection in sync when positions leave the cart.
55
55
  watch(items, () => selection.prune(), { deep: true });
56
56
 
57
- const cartItemCount = computed(() =>
58
- t("cart.page.itemCount", itemCount.value, { count: itemCount.value }),
59
- );
60
-
61
57
  const quickAddOpen = ref(false);
62
58
 
63
59
  /* ---- loadable requisitions (orderer side, spec: hinzufügen) -------- */
@@ -262,9 +258,6 @@ const messageColor = (severity: string) =>
262
258
  </section>
263
259
 
264
260
  <aside class="lg:col-span-4 lg:sticky lg:top-24">
265
- <p class="text-xs text-muted mb-2">
266
- {{ cartItemCount }}
267
- </p>
268
261
  <CartSummaryPanel />
269
262
  </aside>
270
263
  </div>
@@ -0,0 +1,52 @@
1
+ <script setup lang="ts">
2
+ import type { ConfirmationType } from "../../../interfaces/checkout";
3
+
4
+ /**
5
+ * The confirmation actions: continue shopping (resets the checkout and
6
+ * returns home) and — when a recap was loaded — a link to the order or
7
+ * requisition detail page.
8
+ */
9
+ const props = defineProps<{
10
+ type: ConfirmationType;
11
+ recordId: string;
12
+ hasRecap: boolean;
13
+ }>();
14
+
15
+ const { icon } = useIcons();
16
+ const { t } = useI18n();
17
+ const localePath = useLocalePath();
18
+ const { to } = useAppUrl();
19
+ const checkout = useCheckoutOnePage();
20
+
21
+ const detailLink = computed(() =>
22
+ props.type === "requisition"
23
+ ? localePath(`/account/requisitions/${props.recordId}`)
24
+ : localePath(`/account/orders/${props.recordId}`));
25
+
26
+ function continueShopping() {
27
+ checkout.reset();
28
+ void navigateTo(to("/"));
29
+ }
30
+ </script>
31
+
32
+ <template>
33
+ <div class="flex flex-wrap items-center gap-3">
34
+ <UButton
35
+ color="primary"
36
+ size="lg"
37
+ tabindex="0"
38
+ :label="t('confirmation.continueShopping')"
39
+ :trailing-icon="icon('arrow-right')"
40
+ @click="continueShopping"
41
+ />
42
+ <UButton
43
+ v-if="hasRecap"
44
+ color="neutral"
45
+ variant="outline"
46
+ size="lg"
47
+ tabindex="0"
48
+ :label="type === 'requisition' ? t('confirmation.viewRequisition') : t('confirmation.viewOrder')"
49
+ :to="detailLink"
50
+ />
51
+ </div>
52
+ </template>
@@ -0,0 +1,41 @@
1
+ <script setup lang="ts">
2
+ import type { ConfirmationType } from "../../../interfaces/checkout";
3
+
4
+ /**
5
+ * The confirmation hero: thank-you eyebrow, outcome title, the record id
6
+ * ("order received") line, and — for the approval outcome — the approvers note.
7
+ */
8
+ defineProps<{
9
+ type: ConfirmationType;
10
+ recordId: string;
11
+ approvers: string[];
12
+ }>();
13
+
14
+ const { t } = useI18n();
15
+ </script>
16
+
17
+ <template>
18
+ <div class="max-w-xl">
19
+ <p class="text-base font-semibold text-primary">
20
+ {{ t('confirmation.thanks') }}
21
+ </p>
22
+ <h1 class="mt-2 text-4xl sm:text-5xl font-bold tracking-tight text-highlighted">
23
+ {{ t(`confirmation.${type}.title`) }}
24
+ </h1>
25
+ <i18n-t
26
+ :keypath="`confirmation.${type}.received`"
27
+ tag="p"
28
+ class="mt-3 text-base text-muted"
29
+ >
30
+ <template #id>
31
+ <span class="font-semibold text-highlighted">{{ recordId }}</span>
32
+ </template>
33
+ </i18n-t>
34
+ <p
35
+ v-if="type === 'approval' && approvers.length"
36
+ class="mt-2 text-sm text-warning font-medium"
37
+ >
38
+ {{ t('confirmation.approval.approvers', { names: approvers.join(', ') }) }}
39
+ </p>
40
+ </div>
41
+ </template>
@@ -0,0 +1,60 @@
1
+ <script setup lang="ts">
2
+ import type { ConfirmationType } from "../../../interfaces/checkout";
3
+
4
+ /**
5
+ * The "what happens next" steps for the given outcome — three cards driven
6
+ * by the localized `confirmation.steps.<type>` copy and the per-type icons.
7
+ */
8
+ interface NextStep { title: string; text: string }
9
+
10
+ const props = defineProps<{
11
+ type: ConfirmationType;
12
+ }>();
13
+
14
+ const { icon } = useIcons();
15
+ const { tm, rt, t } = useI18n();
16
+
17
+ const nextSteps = computed<NextStep[]>(() =>
18
+ (tm(`confirmation.steps.${props.type}`) as unknown[]).map(step => ({
19
+ title: rt((step as Record<string, never>).title),
20
+ text: rt((step as Record<string, never>).text),
21
+ })));
22
+
23
+ const stepIcons: Record<ConfirmationType, string[]> = {
24
+ order: ["mail", "package", "delivery"],
25
+ approval: ["shield", "package", "delivery"],
26
+ requisition: ["route", "cart", "eye"],
27
+ };
28
+ </script>
29
+
30
+ <template>
31
+ <section>
32
+ <h2 class="text-xs font-semibold uppercase tracking-wide text-muted">
33
+ {{ t('confirmation.nextSteps') }}
34
+ </h2>
35
+ <ol class="mt-4 grid grid-cols-1 sm:grid-cols-3 border border-(--ui-border) rounded-xl overflow-hidden">
36
+ <li
37
+ v-for="(step, index) in nextSteps"
38
+ :key="step.title"
39
+ class="relative p-4 sm:p-5 border-(--ui-border)
40
+ max-sm:not-first:border-t sm:not-first:border-l"
41
+ >
42
+ <span class="flex items-center gap-2.5">
43
+ <span
44
+ class="flex size-8 shrink-0 items-center justify-center rounded-full
45
+ bg-primary/10"
46
+ >
47
+ <UIcon
48
+ :name="icon(stepIcons[type][index] ?? 'check')"
49
+ class="size-4 text-primary"
50
+ />
51
+ </span>
52
+ <span class="text-sm font-semibold text-highlighted">{{ step.title }}</span>
53
+ </span>
54
+ <p class="mt-2.5 text-sm text-muted">
55
+ {{ step.text }}
56
+ </p>
57
+ </li>
58
+ </ol>
59
+ </section>
60
+ </template>
@@ -0,0 +1,102 @@
1
+ <script setup lang="ts">
2
+ import type { ConfirmationRecap } from "../../../interfaces/checkout";
3
+
4
+ /**
5
+ * The order/requisition recap for signed-in customers: positions with
6
+ * images and pricing, the delivery/billing/payment summary, and the total.
7
+ */
8
+ defineProps<{
9
+ recap: ConfirmationRecap;
10
+ }>();
11
+
12
+ const { t } = useI18n();
13
+ const { getImage } = useProductImage();
14
+ const { formatCurrency } = useCartSummaryFormatting();
15
+ </script>
16
+
17
+ <template>
18
+ <section>
19
+ <h2 class="text-xs font-semibold uppercase tracking-wide text-muted">
20
+ {{ t('confirmation.summaryTitle') }}
21
+ </h2>
22
+ <div class="mt-4 border border-(--ui-border) rounded-xl overflow-hidden">
23
+ <ul class="divide-y divide-(--ui-border) px-4 sm:px-5">
24
+ <li
25
+ v-for="line in recap.lines"
26
+ :key="line.id"
27
+ class="flex items-center gap-4 py-4"
28
+ >
29
+ <span
30
+ class="size-16 shrink-0 flex items-center justify-center rounded-lg
31
+ bg-elevated/60 ring-1 ring-(--ui-border) p-1.5"
32
+ >
33
+ <img
34
+ v-if="line.image"
35
+ :src="getImage(line.image)"
36
+ :alt="line.name"
37
+ class="max-h-full max-w-full object-contain"
38
+ >
39
+ </span>
40
+ <div class="min-w-0 flex-1">
41
+ <p class="text-sm font-medium text-highlighted truncate">
42
+ {{ line.name }}
43
+ </p>
44
+ <p class="text-xs text-muted">
45
+ {{ line.sku }} · {{ line.quantity }}× {{ formatCurrency(line.unitPrice) }}
46
+ </p>
47
+ </div>
48
+ <span class="text-sm tabular-nums text-highlighted shrink-0">
49
+ {{ formatCurrency(line.lineTotal) }}
50
+ </span>
51
+ </li>
52
+ </ul>
53
+
54
+ <dl
55
+ v-if="recap.deliveryLines.length || recap.billingLines.length || recap.paymentMethod"
56
+ class="grid grid-cols-1 sm:grid-cols-3 gap-x-6 gap-y-5 px-4 sm:px-5 py-5
57
+ border-t border-(--ui-border) text-sm"
58
+ >
59
+ <div v-if="recap.deliveryLines.length">
60
+ <dt class="font-medium text-highlighted">
61
+ {{ t('orders.deliveryAddress') }}
62
+ </dt>
63
+ <dd class="mt-2 text-muted">
64
+ <span
65
+ v-for="line in recap.deliveryLines"
66
+ :key="line"
67
+ class="block"
68
+ >{{ line }}</span>
69
+ </dd>
70
+ </div>
71
+ <div v-if="recap.billingLines.length">
72
+ <dt class="font-medium text-highlighted">
73
+ {{ t('orders.detail.billingAddress') }}
74
+ </dt>
75
+ <dd class="mt-2 text-muted">
76
+ <span
77
+ v-for="line in recap.billingLines"
78
+ :key="line"
79
+ class="block"
80
+ >{{ line }}</span>
81
+ </dd>
82
+ </div>
83
+ <div v-if="recap.paymentMethod">
84
+ <dt class="font-medium text-highlighted">
85
+ {{ t('orders.detail.paymentMethodLabel') }}
86
+ </dt>
87
+ <dd class="mt-2 text-muted">
88
+ {{ t(`paymentMethods.${recap.paymentMethod}`) }}
89
+ </dd>
90
+ </div>
91
+ </dl>
92
+
93
+ <div
94
+ class="flex justify-between px-4 sm:px-5 py-4 border-t border-(--ui-border)
95
+ text-sm font-semibold text-highlighted"
96
+ >
97
+ <span>{{ t('orders.card.total') }}</span>
98
+ <span class="tabular-nums">{{ formatCurrency(recap.total) }}</span>
99
+ </div>
100
+ </div>
101
+ </section>
102
+ </template>