@revenexx/cover 0.7.1 → 0.11.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.
Files changed (175) hide show
  1. package/app/api/account.ts +4 -0
  2. package/app/api/forms.ts +1 -0
  3. package/app/app.config.ts +17 -12
  4. package/app/assets/css/cover.css +9 -0
  5. package/app/components/RevenexxForm.vue +84 -12
  6. package/app/components/account/AccountShell.vue +18 -0
  7. package/app/components/account/AccountSidebar.vue +2 -5
  8. package/app/components/account/approvals/AccountPendingApprovals.vue +178 -0
  9. package/app/components/account/dashboard/AccountDashboardKpis.vue +74 -34
  10. package/app/components/account/dashboard/AccountDashboardQuickActions.vue +24 -6
  11. package/app/components/account/orderlists/AccountOrderListDetail.vue +47 -4
  12. package/app/components/account/orders/AccountOrderDetail.vue +186 -1
  13. package/app/components/account/organization/AccountOrganization.vue +3 -1
  14. package/app/components/account/payments/AccountPayments.vue +129 -0
  15. package/app/components/account/quotes/AccountQuoteDetail.vue +48 -16
  16. package/app/components/account/team/AccountTeam.vue +32 -7
  17. package/app/components/auth/AuthForgotPasswordPanel.vue +9 -4
  18. package/app/components/auth/AuthLoginPanel.vue +136 -18
  19. package/app/components/auth/AuthMagicLinkPanel.vue +70 -0
  20. package/app/components/cart/actions/CartSaveToListModal.vue +5 -0
  21. package/app/components/cart/item/CartItem.vue +17 -75
  22. package/app/components/cart/position/CartPosition.vue +17 -30
  23. package/app/components/cart/quote/CartQuoteRequestModal.vue +9 -1
  24. package/app/components/cart/view/CartSummaryPanel.vue +54 -0
  25. package/app/components/category/view/GridView.vue +10 -1
  26. package/app/components/category/view/ListView.vue +10 -1
  27. package/app/components/checkout/confirmation/CheckoutConfirmationActions.vue +2 -0
  28. package/app/components/checkout/onepage/CheckoutAddressSection.vue +4 -4
  29. package/app/components/checkout/onepage/CheckoutDeliverySection.vue +31 -3
  30. package/app/components/checkout/onepage/CheckoutGate.vue +10 -7
  31. package/app/components/checkout/onepage/CheckoutOnePageView.vue +1 -1
  32. package/app/components/checkout/onepage/CheckoutPaymentSection.vue +10 -0
  33. package/app/components/checkout/onepage/CheckoutSummarySection.vue +7 -1
  34. package/app/components/form/FormPage.vue +40 -0
  35. package/app/components/layout/Region.vue +13 -0
  36. package/app/components/layout/footer/Footer.vue +8 -0
  37. package/app/components/layout/header/AppBar.vue +11 -4
  38. package/app/components/layout/header/MainNav.vue +26 -4
  39. package/app/components/layout/header/MobileMenu.vue +12 -0
  40. package/app/components/listing/ListingResults.vue +3 -1
  41. package/app/components/product/card/Compact.vue +10 -1
  42. package/app/components/product/detail/ProductDetailAddToCart.vue +51 -18
  43. package/app/components/product/detail/ProductDetailIdentity.vue +1 -1
  44. package/app/components/product/detail/ProductDetailPriceRequest.vue +39 -0
  45. package/app/components/product/detail/ProductDetailSaveToList.vue +10 -0
  46. package/app/components/product/detail/ProductDetailView.vue +57 -0
  47. package/app/composables/useAccountDashboard.ts +0 -10
  48. package/app/composables/useAccountHold.ts +45 -0
  49. package/app/composables/useAccountNavigation.ts +35 -0
  50. package/app/composables/useAccountPayments.ts +21 -0
  51. package/app/composables/useAccountQuotes.ts +15 -2
  52. package/app/composables/useAuthStore.ts +84 -2
  53. package/app/composables/useAuthoredForms.ts +26 -0
  54. package/app/composables/useAvailableOffers.ts +42 -0
  55. package/app/composables/useCategoryListing.ts +6 -0
  56. package/app/composables/useCheckoutOnePage.ts +21 -2
  57. package/app/composables/useGuestOrdering.ts +28 -0
  58. package/app/composables/useMasterDataEditable.ts +45 -7
  59. package/app/composables/useOrderListRules.ts +21 -1
  60. package/app/composables/usePendingApprovals.ts +37 -0
  61. package/app/composables/useProductCard.ts +29 -2
  62. package/app/composables/useProductListing.ts +79 -0
  63. package/app/composables/useQuantityStepper.ts +90 -0
  64. package/app/composables/useQuickActions.ts +35 -0
  65. package/app/composables/useRoleGrants.ts +32 -0
  66. package/app/composables/useSearchListing.ts +4 -0
  67. package/app/composables/useThemeEvents.ts +144 -0
  68. package/app/config/accountDashboard.ts +26 -0
  69. package/app/config/icons.ts +2 -0
  70. package/app/config/navigation.ts +2 -2
  71. package/app/config/quickActions.ts +40 -5
  72. package/app/formkit.config.ts +14 -0
  73. package/app/interfaces/account/approvals.ts +37 -0
  74. package/app/interfaces/account/dashboard.ts +2 -0
  75. package/app/interfaces/account/order-list.ts +29 -0
  76. package/app/interfaces/account/order-lists.ts +9 -0
  77. package/app/interfaces/account/payments.ts +48 -0
  78. package/app/interfaces/auth.ts +24 -2
  79. package/app/interfaces/b2b.ts +8 -8
  80. package/app/interfaces/offers.ts +35 -0
  81. package/app/interfaces/quantity-stepper.ts +17 -0
  82. package/app/interfaces/shopSettings.ts +77 -0
  83. package/app/layouts/default.vue +19 -10
  84. package/app/layouts/focus.vue +28 -7
  85. package/app/middleware/checkout-guard.ts +7 -1
  86. package/app/pages/punchout/transfer.vue +22 -0
  87. package/app/plugins/account-hold.client.ts +20 -0
  88. package/app/plugins/shop-settings.ts +27 -12
  89. package/app/plugins/theme-events.client.ts +132 -0
  90. package/app/shared/themeEvents.ts +445 -0
  91. package/i18n/locales/de/account.json +87 -0
  92. package/i18n/locales/de/auth.json +30 -0
  93. package/i18n/locales/de/cart.json +9 -1
  94. package/i18n/locales/de/checkout.json +4 -2
  95. package/i18n/locales/de/common.json +4 -0
  96. package/i18n/locales/de/cover.json +44 -0
  97. package/i18n/locales/de/editor.json +47 -1
  98. package/i18n/locales/de/forms.json +27 -0
  99. package/i18n/locales/en/account.json +87 -0
  100. package/i18n/locales/en/auth.json +30 -0
  101. package/i18n/locales/en/cart.json +9 -1
  102. package/i18n/locales/en/checkout.json +4 -2
  103. package/i18n/locales/en/common.json +4 -0
  104. package/i18n/locales/en/cover.json +44 -0
  105. package/i18n/locales/en/editor.json +47 -1
  106. package/i18n/locales/en/forms.json +27 -0
  107. package/nuxt.config.ts +15 -1
  108. package/package.json +6 -2
  109. package/server/api/account/address/[id].delete.ts +1 -1
  110. package/server/api/account/address/[id].put.ts +1 -1
  111. package/server/api/account/address/index.post.ts +1 -1
  112. package/server/api/account/order-lists/[id].get.ts +37 -3
  113. package/server/api/account/orders/[id]/cancel.post.ts +54 -0
  114. package/server/api/account/orders/[id]/messages.get.ts +63 -0
  115. package/server/api/account/orders/[id]/messages.post.ts +44 -0
  116. package/server/api/account/orders/[id]/return.post.ts +1 -0
  117. package/server/api/account/orders/[id].get.ts +1 -1
  118. package/server/api/account/organization.put.ts +1 -1
  119. package/server/api/account/payments.get.ts +54 -0
  120. package/server/api/account/pending-approvals/[id]/approve.post.ts +10 -0
  121. package/server/api/account/pending-approvals/[id]/decline.post.ts +10 -0
  122. package/server/api/account/pending-approvals/index.get.ts +26 -0
  123. package/server/api/account/profile.get.ts +3 -1
  124. package/server/api/account/profile.put.ts +1 -1
  125. package/server/api/account/quotes/[id]/decline.post.ts +35 -6
  126. package/server/api/account/team/[id].put.ts +1 -1
  127. package/server/api/account/team.post.ts +1 -1
  128. package/server/api/auth/login.post.ts +6 -0
  129. package/server/api/auth/magic-link.post.ts +32 -0
  130. package/server/api/auth/magic-link.put.ts +35 -0
  131. package/server/api/auth/otp.post.ts +33 -0
  132. package/server/api/auth/otp.put.ts +33 -0
  133. package/server/api/carts/[id]/activate.post.ts +1 -0
  134. package/server/api/carts/[id]/index.delete.ts +1 -0
  135. package/server/api/carts/[id]/index.put.ts +1 -0
  136. package/server/api/carts/[id]/items.post.ts +1 -0
  137. package/server/api/checkout/profile.get.ts +6 -3
  138. package/server/api/forms/[slug]/submit.post.ts +27 -16
  139. package/server/api/forms/[slug].get.ts +9 -1
  140. package/server/api/forms/index.get.ts +23 -0
  141. package/server/api/orders/index.post.ts +41 -0
  142. package/server/api/promotions/available.post.ts +37 -0
  143. package/server/api/quick-actions.get.ts +6 -38
  144. package/server/config/account/organization.json +0 -4
  145. package/server/config/shop/app-settings.json +4 -0
  146. package/server/data/forms/authored.json +337 -0
  147. package/server/interfaces/forms.ts +51 -0
  148. package/server/middleware/buyer-principal.ts +18 -0
  149. package/server/routes/punchout/start.get.ts +2 -2
  150. package/server/services/ApiAddressBookService.ts +43 -1
  151. package/server/services/ApiAuthService.ts +101 -10
  152. package/server/services/ApiCartService.ts +3 -10
  153. package/server/services/ApiFormsService.ts +56 -0
  154. package/server/services/ApiOrganizationService.ts +7 -2
  155. package/server/services/ApiTeamService.ts +93 -21
  156. package/server/services/MockB2BContextService.ts +1 -5
  157. package/server/services/MockFormsService.ts +63 -0
  158. package/server/utils/accountPayments.ts +45 -0
  159. package/server/utils/appSettings.ts +69 -4
  160. package/server/utils/buyerIdentity.ts +168 -0
  161. package/server/utils/cartOwnership.ts +27 -0
  162. package/server/utils/forms.ts +62 -14
  163. package/server/utils/formsService.ts +29 -0
  164. package/server/utils/liveOrderLists.ts +50 -23
  165. package/server/utils/liveOrders.ts +65 -24
  166. package/server/utils/livePrices.ts +7 -15
  167. package/server/utils/masterData.ts +60 -11
  168. package/server/utils/passwordlessSignIn.ts +82 -0
  169. package/server/utils/pendingApprovals.ts +175 -0
  170. package/server/utils/procurementCheckout.ts +2 -0
  171. package/server/utils/promotionsService.ts +90 -0
  172. package/server/utils/quickActionCatalogue.ts +53 -0
  173. package/server/utils/quotesService.ts +15 -0
  174. package/server/utils/revenexxSdk.ts +116 -2
  175. package/server/utils/shopSettings.ts +35 -4
@@ -121,6 +121,23 @@ const incentiveProgress = computed(() => {
121
121
  return Math.min(100, Math.round((subtotalAmount.value / openIncentive.value.threshold) * 100));
122
122
  });
123
123
 
124
+ /* ---- offers this buyer could still reach ------------------------------- */
125
+
126
+ /**
127
+ * What the merchant is offering that this cart has not earned yet.
128
+ *
129
+ * The incentives above are the shop's own two thresholds. These are the
130
+ * merchant's promotions, and the difference is the one the promotions app makes
131
+ * itself: a shop that can only say what a cart IS owed can only mention a
132
+ * discount once it has already been earned. Here each offer says how far away it
133
+ * is, and "12 € more" is the sentence that raises an order value.
134
+ *
135
+ * Nothing is shown where the merchant has none, and nothing is invented: a code
136
+ * offer says a code is needed without ever naming one.
137
+ */
138
+ const itemCount = computed(() => cart.items.reduce((n, item) => n + item.quantity, 0));
139
+ const { offers: availableOffers, nearest: nearestOffer } = useAvailableOffers(subtotalAmount, itemCount);
140
+
124
141
  /**
125
142
  * The promises that close B2B orders — and promises are merchant-specific. A
126
143
  * storefront switches off what its own terms do not cover; a shop with three
@@ -189,6 +206,43 @@ const trustItems = computed(() => {
189
206
  </template>
190
207
  </div>
191
208
 
209
+ <!-- What this cart has not earned yet. Nearest first, because the top of
210
+ a list is what a buyer acts on. -->
211
+ <div
212
+ v-if="availableOffers.length"
213
+ class="pt-3 border-t border-(--ui-border) space-y-1.5"
214
+ >
215
+ <p class="text-xs font-semibold text-highlighted">
216
+ {{ t('cart.offers.title') }}
217
+ </p>
218
+ <div
219
+ v-for="offer in availableOffers.slice(0, 3)"
220
+ :key="offer.id"
221
+ class="flex items-start gap-1.5 text-xs"
222
+ :class="offer.reached ? 'text-success' : 'text-muted'"
223
+ >
224
+ <UIcon
225
+ :name="icon(offer.reached ? 'success' : 'offer')"
226
+ class="size-4 shrink-0 mt-px"
227
+ />
228
+ <span>
229
+ {{ offer.name }}
230
+ <template v-if="offer.missing">
231
+ —
232
+ {{ offer.missing.kind === 'value'
233
+ ? t('cart.offers.missingValue', { amount: formatCurrency(offer.missing.amount) })
234
+ : t('cart.offers.missingQuantity', { count: offer.missing.amount }) }}
235
+ </template>
236
+ <template v-else-if="offer.reached">
237
+ — {{ t('cart.offers.reached') }}
238
+ </template>
239
+ <template v-if="offer.needsCode">
240
+ · {{ t('cart.offers.needsCode') }}
241
+ </template>
242
+ </span>
243
+ </div>
244
+ </div>
245
+
192
246
  <!--
193
247
  Promotion codes. Entering one recalculates the cart, because what
194
248
  a code is worth is the promotions app's answer and depends on the
@@ -7,6 +7,10 @@ const props = withDefaults(defineProps<{
7
7
  showOrderIcon?: boolean;
8
8
  /** Look of the order button when the product can't be bought. */
9
9
  disabledOrderStyle?: "default" | "muted";
10
+ /** The list this card is shown in, reported when it is opened. */
11
+ listId?: string;
12
+ /** 1-based position in that list. */
13
+ listPosition?: number;
10
14
  }>(), {
11
15
  showOrderIcon: true,
12
16
  disabledOrderStyle: "default",
@@ -14,7 +18,10 @@ const props = withDefaults(defineProps<{
14
18
 
15
19
  const { t } = useI18n();
16
20
  const { icon } = useIcons();
17
- const { url } = useProductCard(() => props.product);
21
+ const { url, select } = useProductCard(
22
+ () => props.product,
23
+ () => ({ listId: props.listId, position: props.listPosition }),
24
+ );
18
25
  const { isOutOfStock, hasPrice, addToCart } = useProductCardActions(() => props.product);
19
26
 
20
27
  const orderDisabled = computed(() => isOutOfStock.value || !hasPrice.value);
@@ -40,6 +47,7 @@ const orderButtonClass = computed(() => {
40
47
  <template #header>
41
48
  <NuxtLink
42
49
  :to="url"
50
+ @click="select"
43
51
  :aria-label="`View ${product.name}`"
44
52
  tabindex="0"
45
53
  class="block focus-visible:outline-none focus-visible:ring-2
@@ -57,6 +65,7 @@ const orderButtonClass = computed(() => {
57
65
  <div class="flex flex-col gap-2">
58
66
  <NuxtLink
59
67
  :to="url"
68
+ @click="select"
60
69
  tabindex="0"
61
70
  class="text-m font-medium text-highlighted leading-snug
62
71
  hover:text-(--ui-primary) transition-colors"
@@ -3,10 +3,17 @@ import type { ProductList } from "../../../interfaces/product-list";
3
3
 
4
4
  const props = defineProps<{
5
5
  product: ProductList;
6
+ /** The list this card is shown in, reported when it is opened. */
7
+ listId?: string;
8
+ /** 1-based position in that list. */
9
+ listPosition?: number;
6
10
  }>();
7
11
 
8
12
  const { t } = useI18n();
9
- const { url } = useProductCard(() => props.product);
13
+ const { url, select } = useProductCard(
14
+ () => props.product,
15
+ () => ({ listId: props.listId, position: props.listPosition }),
16
+ );
10
17
  const { isOutOfStock, hasPrice, addToCart } = useProductCardActions(() => props.product);
11
18
  </script>
12
19
 
@@ -18,6 +25,7 @@ const { isOutOfStock, hasPrice, addToCart } = useProductCardActions(() => props.
18
25
  <div class="flex flex-row items-center gap-4 p-4">
19
26
  <NuxtLink
20
27
  :to="url"
28
+ @click="select"
21
29
  :aria-label="`View ${product.name}`"
22
30
  tabindex="0"
23
31
  class="shrink-0 focus-visible:outline-none focus-visible:ring-2
@@ -34,6 +42,7 @@ const { isOutOfStock, hasPrice, addToCart } = useProductCardActions(() => props.
34
42
  <div class="flex-1 min-w-0 flex flex-col gap-1">
35
43
  <NuxtLink
36
44
  :to="url"
45
+ @click="select"
37
46
  tabindex="0"
38
47
  class="text-base font-medium text-highlighted leading-snug
39
48
  hover:text-(--ui-primary) transition-colors truncate"
@@ -34,6 +34,7 @@ function continueShopping() {
34
34
  <UButton
35
35
  color="primary"
36
36
  size="lg"
37
+ class="min-h-11 lg:min-h-0"
37
38
  tabindex="0"
38
39
  :label="t('confirmation.continueShopping')"
39
40
  :trailing-icon="icon('arrow-right')"
@@ -44,6 +45,7 @@ function continueShopping() {
44
45
  color="neutral"
45
46
  variant="outline"
46
47
  size="lg"
48
+ class="min-h-11 lg:min-h-0"
47
49
  tabindex="0"
48
50
  :label="type === 'requisition' ? t('confirmation.viewRequisition') : t('confirmation.viewOrder')"
49
51
  :to="detailLink"
@@ -34,12 +34,12 @@ function changeBilling() {
34
34
  <!-- Shipping + billing side by side -->
35
35
  <div class="grid grid-cols-1 sm:grid-cols-2 gap-4">
36
36
  <!-- Shipping address -->
37
- <div class="space-y-2">
37
+ <div class="flex flex-col gap-2">
38
38
  <p class="text-sm font-medium text-muted">
39
39
  {{ t('onepage.address.shipping') }}
40
40
  </p>
41
41
  <div
42
- class="flex items-start justify-between gap-4 p-4 rounded-lg h-full
42
+ class="flex-1 flex items-start justify-between gap-4 p-4 rounded-lg
43
43
  border border-(--ui-border) bg-(--ui-bg-elevated)"
44
44
  >
45
45
  <!-- Loading skeleton -->
@@ -92,12 +92,12 @@ function changeBilling() {
92
92
  </div>
93
93
 
94
94
  <!-- Billing address -->
95
- <div class="space-y-2">
95
+ <div class="flex flex-col gap-2">
96
96
  <p class="text-sm font-medium text-muted">
97
97
  {{ t('onepage.address.billing') }}
98
98
  </p>
99
99
  <div
100
- class="flex items-start justify-between gap-4 p-4 rounded-lg h-full
100
+ class="flex-1 flex items-start justify-between gap-4 p-4 rounded-lg
101
101
  border border-(--ui-border) bg-(--ui-bg-elevated)"
102
102
  >
103
103
  <!-- Loading skeleton -->
@@ -1,13 +1,32 @@
1
1
  <script setup lang="ts">
2
2
  import CheckoutSectionTitle from "./CheckoutSectionTitle.vue";
3
3
 
4
- import type { DeliveryOption } from "../../../interfaces/delivery";
4
+ import type { DeliveryMethod, DeliveryOption } from "../../../interfaces/delivery";
5
+ import { cartEcommerce } from "../../../shared/themeEvents";
5
6
 
6
7
  const { icon } = useIcons();
7
8
  const { t, locale } = useI18n();
9
+ // Whether this merchant ships in parts at all — the orders app's answer.
10
+ const { orders } = useShopSettings();
11
+ const partialShipmentAllowed = computed(() => (orders.value?.partialShipment ?? "allowed") === "allowed");
8
12
  const { form, profile, profileLoading, fieldErrors, validateField } = useCheckoutOnePage();
9
13
  const { formatCurrency } = useCartSummaryFormatting();
10
14
  const cartStore = useCartStore();
15
+ const themeEvents = useThemeEvents();
16
+
17
+ /**
18
+ * The buyer chose how it is delivered. Reported as `add_shipping_info` on the
19
+ * buyer's own choice only — never for the default the section preselects.
20
+ */
21
+ function selectDelivery(method: DeliveryMethod): void {
22
+ const changed = form.value.deliveryMethod !== method;
23
+ form.value.deliveryMethod = method;
24
+ if (changed && cartStore.items.length) {
25
+ themeEvents.emit("add_shipping_info", {
26
+ ecommerce: cartEcommerce(cartStore.items, { shipping_tier: String(method).slice(0, 64) }),
27
+ });
28
+ }
29
+ }
11
30
 
12
31
  // "How can THIS order ship?" — the BFF resolves it (live: shipping app
13
32
  // incl. matrix pricing/free-above/country restrictions; mock: the demo
@@ -141,7 +160,7 @@ watch([deliveryOptions, () => form.value.deliveryMethod], ([options, selected])
141
160
  ? 'border-(--ui-primary) bg-primary/5 ring-1 ring-(--ui-primary)'
142
161
  : 'border-(--ui-border) hover:border-(--ui-border-accented)'"
143
162
  :aria-pressed="form.deliveryMethod === option.method"
144
- @click="form.deliveryMethod = option.method"
163
+ @click="selectDelivery(option.method)"
145
164
  >
146
165
  <div class="flex items-start justify-between gap-3">
147
166
  <div class="min-w-0">
@@ -218,11 +237,20 @@ watch([deliveryOptions, () => form.value.deliveryMethod], ([options, selected])
218
237
  </div>
219
238
  </div>
220
239
 
221
- <!-- Partial delivery -->
240
+ <!-- Partial delivery. Only where the merchant ships in parts at all: where
241
+ they do not, the orders app refuses such a shipment and the question has
242
+ an answer already, so asking it would be a choice with one outcome. -->
222
243
  <UCheckbox
244
+ v-if="partialShipmentAllowed"
223
245
  v-model="form.partialDelivery"
224
246
  :label="t('onepage.delivery.partialDelivery')"
225
247
  :description="t('onepage.delivery.partialDeliveryHint')"
226
248
  />
249
+ <p
250
+ v-else
251
+ class="text-xs text-muted"
252
+ >
253
+ {{ t('onepage.delivery.completeDeliveryOnly') }}
254
+ </p>
227
255
  </div>
228
256
  </template>
@@ -1,8 +1,12 @@
1
1
  <script setup lang="ts">
2
2
  /**
3
- * Checkout entry for signed-out visitors: sign in to use the account
4
- * checkout, or continue as a business/private guest — each guest path
5
- * individually enabled per organization (settings.checkout.guestOrdering).
3
+ * Checkout entry for signed-out visitors: sign in to use the account checkout,
4
+ * or continue as a business or private guest.
5
+ *
6
+ * Which of the two guest paths is open is the orders app's answer, not this
7
+ * shop's — and it has to be, because the app refuses a placement it does not
8
+ * allow. A gate offering a path that ends in a refusal wastes the buyer's whole
9
+ * checkout.
6
10
  */
7
11
  const emit = defineEmits<{
8
12
  (e: "signedIn"): void;
@@ -10,11 +14,8 @@ const emit = defineEmits<{
10
14
 
11
15
  const { icon } = useIcons();
12
16
  const { t } = useI18n();
13
- const { settings } = useB2BContext();
14
17
  const { customerType } = useCheckoutOnePage();
15
-
16
- const guestB2b = computed(() => settings.value?.checkout.guestOrdering.b2b ?? false);
17
- const guestB2c = computed(() => settings.value?.checkout.guestOrdering.b2c ?? false);
18
+ const { b2b: guestB2b, b2c: guestB2c } = useGuestOrdering();
18
19
  </script>
19
20
 
20
21
  <template>
@@ -46,6 +47,7 @@ const guestB2c = computed(() => settings.value?.checkout.guestOrdering.b2c ?? fa
46
47
  color="neutral"
47
48
  variant="outline"
48
49
  block
50
+ class="min-h-11 lg:min-h-0"
49
51
  tabindex="0"
50
52
  :icon="icon('company')"
51
53
  :label="t('onepage.gate.guestBusiness')"
@@ -56,6 +58,7 @@ const guestB2c = computed(() => settings.value?.checkout.guestOrdering.b2c ?? fa
56
58
  color="neutral"
57
59
  variant="outline"
58
60
  block
61
+ class="min-h-11 lg:min-h-0"
59
62
  tabindex="0"
60
63
  :icon="icon('user')"
61
64
  :label="t('onepage.gate.guestPrivate')"
@@ -54,7 +54,7 @@ async function onSignedIn(): Promise<void> {
54
54
  </h1>
55
55
  </div>
56
56
 
57
- <div class="grid lg:grid-cols-[1fr_360px] xl:grid-cols-[1fr_420px] gap-8 items-start">
57
+ <div class="grid grid-cols-1 lg:grid-cols-[1fr_360px] xl:grid-cols-[1fr_420px] gap-8 items-start">
58
58
  <!-- Left: form sections -->
59
59
  <div class="space-y-6">
60
60
  <CheckoutGuestDetailsSection v-if="isGuest" />
@@ -2,6 +2,7 @@
2
2
  import CheckoutSectionTitle from "./CheckoutSectionTitle.vue";
3
3
 
4
4
  import type { PaymentMethod, PaymentOption } from "../../../interfaces/payment";
5
+ import { cartEcommerce } from "../../../shared/themeEvents";
5
6
 
6
7
  const { icon } = useIcons();
7
8
  const { t, locale } = useI18n();
@@ -85,7 +86,16 @@ const costCenterOptions = computed(() =>
85
86
  })) ?? [],
86
87
  );
87
88
 
89
+ const themeEvents = useThemeEvents();
90
+
88
91
  function selectMethod(method: PaymentMethod) {
92
+ // `add_payment_info` on the buyer's own choice — not for the default the
93
+ // section reconciles to on its own (the watch above).
94
+ if (form.value.paymentMethod !== method && cartStore.items.length) {
95
+ themeEvents.emit("add_payment_info", {
96
+ ecommerce: cartEcommerce(cartStore.items, { payment_type: String(method).slice(0, 64) }),
97
+ });
98
+ }
89
99
  form.value.paymentMethod = method;
90
100
  if (method !== "po_number") {
91
101
  form.value.poNumber = "";
@@ -153,8 +153,12 @@ async function handlePlaceOrder() {
153
153
  v-model="form.promoCode"
154
154
  :placeholder="t('onepage.summary.promoCodePlaceholder')"
155
155
  class="flex-1"
156
+ :ui="{ base: 'min-h-11 lg:min-h-0' }"
156
157
  />
157
- <UButton variant="outline">
158
+ <UButton
159
+ variant="outline"
160
+ class="min-h-11 lg:min-h-0"
161
+ >
158
162
  {{ t('onepage.summary.applyPromo') }}
159
163
  </UButton>
160
164
  </div>
@@ -189,6 +193,7 @@ async function handlePlaceOrder() {
189
193
  <!-- Place order / submit requisition -->
190
194
  <UButton
191
195
  block
196
+ class="min-h-11 lg:min-h-0"
192
197
  :disabled="isRequester ? submitting : !canSubmit"
193
198
  :loading="submitting"
194
199
  @click="handlePlaceOrder"
@@ -199,6 +204,7 @@ async function handlePlaceOrder() {
199
204
  <!-- Back to cart -->
200
205
  <UButton
201
206
  block
207
+ class="min-h-11 lg:min-h-0"
202
208
  variant="ghost"
203
209
  color="neutral"
204
210
  :to="to('/cart')"
@@ -0,0 +1,40 @@
1
+ <script setup lang="ts">
2
+ /**
3
+ * A page whose content is one authored form — contact, price request, return
4
+ * request. The shell is here so a storefront's page stays what a page should be:
5
+ * the slug it renders, the words above it, and nothing else.
6
+ *
7
+ * <FormPage slug="contact" :title="t('forms.contact.title')" />
8
+ *
9
+ * `context` pre-fills fields by name, which is how an article or an order number
10
+ * arrives from the page that linked here.
11
+ */
12
+ const props = defineProps<{
13
+ /** The form's slug, as published in the Cockpit. */
14
+ slug: string;
15
+ title: string;
16
+ intro?: string;
17
+ context?: Record<string, unknown>;
18
+ }>();
19
+
20
+ useHead({ title: props.title });
21
+ </script>
22
+
23
+ <template>
24
+ <UContainer class="max-w-xl py-10 lg:py-14">
25
+ <h1 class="text-2xl font-semibold text-highlighted mb-2">
26
+ {{ title }}
27
+ </h1>
28
+ <p
29
+ v-if="intro"
30
+ class="text-muted mb-8"
31
+ >
32
+ {{ intro }}
33
+ </p>
34
+
35
+ <RevenexxForm
36
+ :slug="slug"
37
+ :context="context"
38
+ />
39
+ </UContainer>
40
+ </template>
@@ -0,0 +1,13 @@
1
+ <script setup lang="ts">
2
+ /**
3
+ * A named layout extension point (`header`, `footer`). The design system
4
+ * renders its default content — the slot — unchanged; a theme layer overrides
5
+ * this component (same path) to add tenant-authored content before or after
6
+ * it, or to replace it (ADR-0111).
7
+ */
8
+ defineProps<{ name: string }>();
9
+ </script>
10
+
11
+ <template>
12
+ <slot />
13
+ </template>
@@ -143,6 +143,14 @@ const year = new Date().getFullYear();
143
143
  >
144
144
  {{ t(link.label) }}
145
145
  </NuxtLink>
146
+ <!-- Reopens the cookie choice (Consent Manager). Renders nothing in
147
+ the editor, where no banner is shown either. -->
148
+ <ConsentPreferencesLink
149
+ class="text-xs text-dimmed dark:text-white/70 cursor-pointer
150
+ hover:text-default dark:hover:text-white transition-colors"
151
+ >
152
+ {{ t('footer.cookieSettings') }}
153
+ </ConsentPreferencesLink>
146
154
  </nav>
147
155
 
148
156
  <!-- Social icons -->
@@ -9,11 +9,12 @@ const { t } = useI18n();
9
9
  const localePath = useLocalePath();
10
10
  const isMenuOpen = ref(false);
11
11
 
12
- // Symmetric grid: flexible side columns keep the wide search column truly
13
- // centered in the header, independent of logo/action widths.
12
+ // Symmetric flexible side columns keep the search truly centered in the
13
+ // header; their max-content minimum means the logo and actions (labels at xl)
14
+ // can never be squeezed — the search column gives way first on tablet.
14
15
  const headerUi = {
15
16
  container: [
16
- "grid grid-cols-[1fr_minmax(0,46rem)_1fr] items-center gap-4 lg:gap-6",
17
+ "grid grid-cols-[minmax(max-content,1fr)_minmax(0,46rem)_minmax(max-content,1fr)] items-center gap-4 lg:gap-6",
17
18
  "h-(--ui-header-height)",
18
19
  "px-4 sm:px-6 lg:px-8",
19
20
  "max-w-(--ui-container) mx-auto w-full",
@@ -45,7 +46,13 @@ const { navigateToSearch } = useSearch();
45
46
  <template>
46
47
  <UHeader
47
48
  v-model:open="isMenuOpen"
48
- :toggle="{ color: 'primary', class: 'md:hidden' }"
49
+ :toggle="{
50
+ color: 'primary',
51
+ class: 'md:hidden',
52
+ // Nuxt UI labels this 'Open menu' in English whatever the shop speaks,
53
+ // which is what a screen reader on a German storefront was reading out.
54
+ 'aria-label': t('nav.openMenu'),
55
+ }"
49
56
  :ui="headerUi"
50
57
  >
51
58
  <template #left>
@@ -16,7 +16,29 @@ const PANEL_CLOSE_DELAY_MS = 180;
16
16
  const appConfig = useAppConfig();
17
17
  const liveMain = useState<typeof defaultMainNav | null>("cover:nav:mainNavigation", () => null);
18
18
  const liveSecondary = useState<typeof defaultSecondaryNav | null>("cover:nav:mainNavigationSecondary", () => null);
19
- const mainNavigation = computed(() => liveMain.value ?? (appConfig.mainNavigation as typeof defaultMainNav | undefined) ?? defaultMainNav);
19
+ const configuredMain = computed(() => liveMain.value ?? (appConfig.mainNavigation as typeof defaultMainNav | undefined) ?? defaultMainNav);
20
+
21
+ /**
22
+ * The way into the catalogue, which every shop needs and one kept forgetting.
23
+ *
24
+ * The panel itself is built from the tenant's own category tree and works in any
25
+ * storefront — but it only opens from a navigation entry that asks for it, and a
26
+ * storefront writing its own navigation has no reason to know that. The result was
27
+ * a shop whose catalogue was reachable from the home page and the search field
28
+ * alone, for months, without anything going red.
29
+ *
30
+ * So the layer adds the entry where the navigation carries none. A storefront that
31
+ * genuinely does not want it sets `catalogueMenu: false` — which is a decision,
32
+ * where the old silence was an oversight.
33
+ */
34
+ const mainNavigation = computed(() => {
35
+ const items = configuredMain.value;
36
+ const wanted = (appConfig.catalogueMenu as boolean | undefined) !== false;
37
+ if (!wanted || items.some(item => item.panel === "categories")) {
38
+ return items;
39
+ }
40
+ return [{ labelKey: "nav.catalogue", to: "/search", panel: "categories" as const }, ...items];
41
+ });
20
42
  const mainNavigationSecondary = computed(() => liveSecondary.value ?? (appConfig.mainNavigationSecondary as typeof defaultSecondaryNav | undefined) ?? defaultSecondaryNav);
21
43
 
22
44
  const { icon } = useIcons();
@@ -78,11 +100,11 @@ function isActive(to: string): boolean {
78
100
  >
79
101
  <div
80
102
  class="px-4 sm:px-6 lg:px-8 max-w-(--ui-container) mx-auto w-full
81
- py-3 flex items-center gap-8"
103
+ py-3 flex items-center gap-4 lg:gap-8"
82
104
  >
83
105
  <ul
84
106
  role="list"
85
- class="flex-1 flex items-center gap-6 lg:gap-8"
107
+ class="flex-1 flex items-center gap-4 lg:gap-8"
86
108
  >
87
109
  <!--
88
110
  A panel item's trigger is a button, not a link: its job is the
@@ -125,7 +147,7 @@ function isActive(to: string): boolean {
125
147
  </ul>
126
148
  <ul
127
149
  role="list"
128
- class="hidden md:flex items-center gap-6"
150
+ class="hidden md:flex items-center gap-4 lg:gap-6"
129
151
  >
130
152
  <li
131
153
  v-for="item in mainNavigationSecondary"
@@ -4,6 +4,10 @@ import { mainNavigation as defaultMainNav } from "../../../config/navigation";
4
4
  const { icon } = useIcons();
5
5
 
6
6
  const { categoryNavItems } = useCategories();
7
+ // Searching is the way into a B2B catalogue, and on a phone this drawer was
8
+ // the only place it could live — the header's own field is desktop-only, so a
9
+ // buyer on a phone had no way to search at all.
10
+ const { navigateToSearch } = useSearch();
7
11
  const auth = useAuthStore();
8
12
  const toast = useToast();
9
13
  const { t } = useI18n();
@@ -37,6 +41,14 @@ const onLogout = async () => {
37
41
 
38
42
  <template>
39
43
  <div class="flex flex-col gap-4 pb-4">
44
+ <!-- The search, first: on a phone the header has no room for the field, and
45
+ without it here a buyer cannot reach the catalogue by article number at
46
+ all — which is how most of them reach it. -->
47
+ <UiFormsSearchInput
48
+ class="w-full"
49
+ @search="navigateToSearch"
50
+ />
51
+
40
52
  <UNavigationMenu
41
53
  :items="mainNavItems"
42
54
  orientation="vertical"
@@ -68,9 +68,11 @@ const cardProps = computed(() => viewMode.value === "list"
68
68
  >
69
69
  <component
70
70
  :is="productComponent"
71
- v-for="product in listing.products.value"
71
+ v-for="(product, index) in listing.products.value"
72
72
  :key="product.id"
73
73
  :product="product"
74
+ :list-id="listing.listId?.()"
75
+ :list-position="(listing.page.value - 1) * listing.perPage + index + 1"
74
76
  v-bind="cardProps"
75
77
  />
76
78
  </div>
@@ -23,6 +23,10 @@ const props = withDefaults(defineProps<{
23
23
  * no stock; `info` always links to the detail page.
24
24
  */
25
25
  action?: "order" | "info";
26
+ /** The list this card is shown in, reported when it is opened. */
27
+ listId?: string;
28
+ /** 1-based position in that list. */
29
+ listPosition?: number;
26
30
  }>(), {
27
31
  action: "order",
28
32
  });
@@ -34,7 +38,10 @@ const { public: { locale } } = useRuntimeConfig();
34
38
  const { taxIncludedPrices } = useShopSettings();
35
39
  const currency = useDisplayCurrency();
36
40
 
37
- const { url } = useProductCard(() => props.product);
41
+ const { url, select } = useProductCard(
42
+ () => props.product,
43
+ () => ({ listId: props.listId, position: props.listPosition }),
44
+ );
38
45
  const { isOutOfStock, hasPrice, addToCart } = useProductCardActions(() => props.product);
39
46
 
40
47
  const canOrder = computed(() =>
@@ -63,6 +70,7 @@ function formatPrice(price: number): string {
63
70
  <div class="group flex h-full flex-col rounded-lg border border-(--ui-border) p-3 transition-colors hover:border-primary/60">
64
71
  <NuxtLink
65
72
  :to="url"
73
+ @click="select"
66
74
  tabindex="-1"
67
75
  aria-hidden="true"
68
76
  class="block"
@@ -84,6 +92,7 @@ function formatPrice(price: number): string {
84
92
 
85
93
  <NuxtLink
86
94
  :to="url"
95
+ @click="select"
87
96
  class="mt-2 block text-sm leading-snug line-clamp-2 text-highlighted group-hover:text-primary"
88
97
  >
89
98
  {{ props.product.name }}