@revenexx/cover 0.15.0 → 0.16.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 (84) hide show
  1. package/app/api/account.ts +1 -0
  2. package/app/components/RevenexxForm.vue +183 -19
  3. package/app/components/account/address/AccountAddressCard.vue +8 -2
  4. package/app/components/account/address/AccountAddressView.vue +5 -1
  5. package/app/components/account/carts/AccountCartsTable.vue +85 -3
  6. package/app/components/account/dashboard/AccountDashboardBudgets.vue +2 -1
  7. package/app/components/account/dashboard/AccountDashboardRecentOrders.vue +2 -1
  8. package/app/components/account/dashboard/AccountDashboardRequisitions.vue +2 -1
  9. package/app/components/account/directorder/AccountDirectOrder.vue +100 -12
  10. package/app/components/account/governance/AccountApprovalLimitsTable.vue +124 -8
  11. package/app/components/account/governance/AccountCostCenterDetail.vue +3 -2
  12. package/app/components/account/governance/AccountCostCentersTable.vue +133 -6
  13. package/app/components/account/governance/AccountRequisitionDetail.vue +2 -1
  14. package/app/components/account/governance/AccountRequisitionsTable.vue +102 -6
  15. package/app/components/account/governance/AccountWorkflowDetail.vue +3 -2
  16. package/app/components/account/governance/AccountWorkflowsTable.vue +76 -1
  17. package/app/components/account/governance/GovernanceApprovalLimitModal.vue +8 -0
  18. package/app/components/account/governance/GovernanceCostCenterModal.vue +7 -0
  19. package/app/components/account/governance/GovernanceWorkflowModal.vue +7 -0
  20. package/app/components/account/orderlists/AccountOrderListDetail.vue +14 -4
  21. package/app/components/account/orderlists/AccountOrderListsTable.vue +115 -7
  22. package/app/components/account/orders/AccountOrderDetail.vue +67 -3
  23. package/app/components/account/orders/AccountOrderPay.vue +211 -0
  24. package/app/components/account/orders/AccountOrdersTable.vue +119 -10
  25. package/app/components/account/organization/AccountOrganization.vue +6 -0
  26. package/app/components/account/profile/AccountPasswordForm.vue +2 -0
  27. package/app/components/account/profile/AccountProfileForm.vue +4 -0
  28. package/app/components/account/quotes/AccountQuoteDetail.vue +7 -10
  29. package/app/components/account/team/AccountTeam.vue +91 -0
  30. package/app/components/auth/AuthLoginTeaser.vue +1 -1
  31. package/app/components/auth/AuthRegisterPanel.vue +22 -3
  32. package/app/components/cart/manage/CartNameModal.vue +4 -0
  33. package/app/components/checkout/onepage/CheckoutAddressSection.vue +5 -1
  34. package/app/components/checkout/onepage/CheckoutGuestDetailsSection.vue +9 -1
  35. package/app/components/checkout/onepage/CheckoutSummarySection.vue +6 -1
  36. package/app/components/form/FormPage.vue +7 -4
  37. package/app/components/layout/footer/Footer.vue +15 -2
  38. package/app/components/ui/forms/PasswordInput.vue +2 -0
  39. package/app/components/ui/table/TableCardList.vue +69 -0
  40. package/app/components/ui/table/TableSortButton.vue +1 -1
  41. package/app/components/ui/table/TableToolbar.vue +2 -0
  42. package/app/components/withdrawal/WithdrawalDeclaration.vue +286 -0
  43. package/app/composables/useCheckoutOnePage.ts +22 -0
  44. package/app/composables/useMobileTableSort.ts +82 -0
  45. package/app/config/forms.ts +8 -0
  46. package/app/config/navigation.ts +8 -0
  47. package/app/formkit.config.ts +21 -0
  48. package/app/interfaces/account/order-list.ts +11 -0
  49. package/app/interfaces/account/quotes.ts +7 -3
  50. package/app/pages/punchout/transfer.vue +36 -1
  51. package/app/pages/widerruf.vue +33 -0
  52. package/app/shared/addressLines.ts +66 -0
  53. package/app/shared/checkoutAddressRefusal.ts +63 -0
  54. package/i18n/locales/de/account.json +13 -1
  55. package/i18n/locales/de/cart.json +1 -0
  56. package/i18n/locales/de/checkout.json +1 -1
  57. package/i18n/locales/de/common.json +7 -0
  58. package/i18n/locales/de/withdrawal.json +34 -0
  59. package/i18n/locales/en/account.json +13 -1
  60. package/i18n/locales/en/cart.json +1 -0
  61. package/i18n/locales/en/checkout.json +1 -1
  62. package/i18n/locales/en/common.json +7 -0
  63. package/i18n/locales/en/withdrawal.json +34 -0
  64. package/nuxt.config.ts +3 -0
  65. package/package.json +1 -1
  66. package/server/api/account/orders/[id]/pay.post.ts +100 -0
  67. package/server/api/account/orders/[id].get.ts +5 -1
  68. package/server/api/account/quotes/[id]/order.post.ts +22 -22
  69. package/server/api/forms/[slug].get.ts +1 -3
  70. package/server/api/orders/index.post.ts +33 -50
  71. package/server/api/punchout/return.post.ts +3 -1
  72. package/server/data/forms/authored.json +69 -8
  73. package/server/dev/errorHandler.ts +47 -0
  74. package/server/interfaces/punchout.ts +5 -0
  75. package/server/middleware/missing-media.ts +35 -0
  76. package/server/middleware/punchout-hand-back-csp.ts +17 -0
  77. package/server/plugins/vue-devtools-sink.ts +28 -0
  78. package/server/services/MockFormsService.ts +3 -1
  79. package/server/utils/addressRefusal.ts +63 -0
  80. package/server/utils/country.ts +23 -0
  81. package/server/utils/forms.ts +23 -1
  82. package/server/utils/liveOrders.ts +44 -2
  83. package/server/utils/orderPayment.ts +155 -0
  84. package/server/utils/punchoutFormAction.ts +44 -0
@@ -0,0 +1,82 @@
1
+ import type { MaybeRefOrGetter, Ref } from "vue";
2
+
3
+ export interface TableSortState {
4
+ id: string;
5
+ desc: boolean;
6
+ }
7
+
8
+ /**
9
+ * One sortable column as the mobile card list offers it. `kind` picks the
10
+ * wording: text sorts A–Z / Z–A, numbers highest / lowest first, dates
11
+ * newest / oldest first.
12
+ */
13
+ export interface MobileSortColumn<T> {
14
+ id: string;
15
+ label: string;
16
+ kind: "text" | "number" | "date";
17
+ value: (row: T) => string | number;
18
+ }
19
+
20
+ export interface MobileSortItem {
21
+ value: string;
22
+ label: string;
23
+ }
24
+
25
+ /**
26
+ * Below md the data tables turn into card lists (datatable-ux); the cards
27
+ * cannot carry clickable column headers, so a select stands in for them.
28
+ * This drives that select from the table's own TanStack `sorting` ref, so
29
+ * table and cards always agree, and returns the rows in that order.
30
+ */
31
+ export function useMobileTableSort<T>(
32
+ rows: MaybeRefOrGetter<T[]>,
33
+ sorting: Ref<TableSortState[]>,
34
+ columns: MaybeRefOrGetter<MobileSortColumn<T>[]>,
35
+ ) {
36
+ const { t } = useI18n();
37
+
38
+ const labelKeys = {
39
+ text: { asc: "table.sortAsc", desc: "table.sortDesc" },
40
+ number: { asc: "table.sortLow", desc: "table.sortHigh" },
41
+ date: { asc: "table.sortOldest", desc: "table.sortNewest" },
42
+ } as const;
43
+
44
+ const items = computed<MobileSortItem[]>(() =>
45
+ toValue(columns).flatMap(({ id, label, kind }) => {
46
+ const asc = { value: `${id}:asc`, label: t(labelKeys[kind].asc, { column: label }) };
47
+ const desc = { value: `${id}:desc`, label: t(labelKeys[kind].desc, { column: label }) };
48
+ // Numbers and dates read best biggest / newest first.
49
+ return kind === "text" ? [asc, desc] : [desc, asc];
50
+ }),
51
+ );
52
+
53
+ const model = computed({
54
+ get: () => {
55
+ const active = sorting.value[0];
56
+ return active ? `${active.id}:${active.desc ? "desc" : "asc"}` : "";
57
+ },
58
+ set: (value: string) => {
59
+ const [id = "", direction] = value.split(":");
60
+ sorting.value = [{ id, desc: direction === "desc" }];
61
+ },
62
+ });
63
+
64
+ const sorted = computed<T[]>(() => {
65
+ const list = [...toValue(rows)];
66
+ const active = sorting.value[0];
67
+ const column = active && toValue(columns).find(entry => entry.id === active.id);
68
+ if (!active || !column) {
69
+ return list;
70
+ }
71
+ list.sort((a, b) => {
72
+ const left = column.value(a);
73
+ const right = column.value(b);
74
+ return typeof left === "number" && typeof right === "number"
75
+ ? left - right
76
+ : String(left).localeCompare(String(right));
77
+ });
78
+ return active.desc ? list.reverse() : list;
79
+ });
80
+
81
+ return { items, model, sorted };
82
+ }
@@ -0,0 +1,8 @@
1
+ /**
2
+ * The red asterisk after the label of a field the visitor cannot leave out —
3
+ * before it on a checkbox, whose label is a whole sentence. Pseudo-content via
4
+ * a FormKit `label-class` (or `legend-class` on a radio group), so the label
5
+ * text stays as written.
6
+ */
7
+ export const REQUIRED_MARK = "after:content-['*'] after:ml-0.5 after:text-error";
8
+ export const REQUIRED_MARK_LEADING = "before:content-['*'] before:mr-0.5 before:text-error";
@@ -41,6 +41,14 @@ export const footerLinks = {
41
41
  },
42
42
  };
43
43
 
44
+ /**
45
+ * Where a consumer withdraws from a contract (§ 356a BGB). Not one of the
46
+ * `legalLinks`: those are the tenant's to replace, and this entry has to stay
47
+ * reachable on every page whatever a tenant's menu says, so the footer renders
48
+ * it on its own. The order detail page links here with `?order=` pre-filled.
49
+ */
50
+ export const withdrawalPath = "/widerruf";
51
+
44
52
  export const legalLinks = [
45
53
  { label: "Privacy Policy", to: "/legal/privacy" },
46
54
  { label: "Terms of Service", to: "/legal/terms" },
@@ -1,9 +1,25 @@
1
1
  import { de, en } from "@formkit/i18n";
2
2
  import { generateClasses } from "@formkit/themes";
3
+ import type { DefaultConfigOptions } from "@formkit/vue";
4
+
3
5
  import { createInput, defineFormKitConfig } from "@formkit/vue";
4
6
 
5
7
  import FormKitDatePicker from "./components/ui/forms/FormKitDatePicker.vue";
6
8
 
9
+ /**
10
+ * `requiredIf:field,value` — required only while the sibling `field` holds
11
+ * `value`, e.g. the phone number once "answer by phone" is chosen. Runs on an
12
+ * empty value (that is the point); FormKit re-validates when the sibling changes.
13
+ */
14
+ type FormKitValidationRule = NonNullable<DefaultConfigOptions["rules"]>[string];
15
+
16
+ const requiredIf: FormKitValidationRule = (node, field, expected) => {
17
+ const other = node.at(`$parent.${String(field)}`);
18
+ if (String(other?.value ?? "") !== String(expected)) return true;
19
+ return String(node.value ?? "").trim() !== "";
20
+ };
21
+ requiredIf.skipEmpty = false;
22
+
7
23
  /**
8
24
  * FormKit configuration for the cover design system.
9
25
  *
@@ -15,6 +31,10 @@ import FormKitDatePicker from "./components/ui/forms/FormKitDatePicker.vue";
15
31
  export default defineFormKitConfig({
16
32
  locales: { de, en },
17
33
  locale: "de",
34
+ messages: {
35
+ de: { validation: { requiredIf: de.validation.required ?? "Dieses Feld ist erforderlich." } },
36
+ en: { validation: { requiredIf: en.validation.required ?? "This field is required." } },
37
+ },
18
38
  // Custom inputs: `datepicker` wraps Nuxt UI's UCalendar (ISO string value).
19
39
  inputs: {
20
40
  datepicker: createInput(FormKitDatePicker, {
@@ -22,6 +42,7 @@ export default defineFormKitConfig({
22
42
  }),
23
43
  },
24
44
  rules: {
45
+ requiredIf,
25
46
  zip(node) {
26
47
  const v = String(node.value ?? "").trim();
27
48
  if (!/^\d{3,5}$/.test(v)) return false;
@@ -68,6 +68,17 @@ export interface AccountOrder {
68
68
  * than no button.
69
69
  */
70
70
  readonly cancellable?: boolean;
71
+ /**
72
+ * Whether the order waits for the buyer's payment: placed, naming a method,
73
+ * and with no payment on it — as one approved after it was requested is, since
74
+ * the checkout took none. Set on one order's detail only, never in the list.
75
+ */
76
+ readonly payable?: boolean;
77
+ /**
78
+ * ISO country the order is paid from — billing address, else delivery address.
79
+ * What payment methods are offered for, and what the payment is taken under.
80
+ */
81
+ readonly paymentCountry?: string;
71
82
  /** Where cancelling requires the buyer to say why, as the merchant set it. */
72
83
  readonly cancelNeedsReason?: boolean;
73
84
  /**
@@ -1,4 +1,3 @@
1
- import type { Address } from "../address";
2
1
 
3
2
  /**
4
3
  * A quote as the buyer's account shows it (RX-783).
@@ -63,8 +62,13 @@ export interface AccountQuote {
63
62
  reason: string | null;
64
63
  buyerNote: string | null;
65
64
  sellerNote: string | null;
66
- shippingAddress: Partial<Address> | null;
67
- billingAddress: Partial<Address> | null;
65
+ /**
66
+ * As the quotes app answers it: the platform's address type plus the old
67
+ * flat keys (RAD-236). Printed through the shared address lines, never read
68
+ * key by key.
69
+ */
70
+ shippingAddress: Record<string, unknown> | null;
71
+ billingAddress: Record<string, unknown> | null;
68
72
  lines: AccountQuoteLine[];
69
73
  trail: AccountQuoteNote[];
70
74
  /** Orders placed out of this quote. */
@@ -27,6 +27,11 @@ import { cartEcommerce } from "../../shared/themeEvents";
27
27
  * payload is being answered again. It is submitted like any other — a buyer who
28
28
  * pressed back, or a browser that double-submitted, must get the form and not
29
29
  * an error page.
30
+ *
31
+ * The browser only submits to an origin the DOCUMENT's `form-action` allows
32
+ * (PE-994), and the return address is not known until the payload is in hand.
33
+ * So the first hand-back loads this page once more: the server then answers it
34
+ * with the visit's origin allowed, and the replayed payload is submitted.
30
35
  */
31
36
  const { t } = useI18n();
32
37
  const { icon } = useIcons();
@@ -77,6 +82,32 @@ const fields = computed(() => Object.entries(payload.value?.fields ?? {}));
77
82
  */
78
83
  const isBackChannel = computed(() => payload.value !== null && !payload.value.target_url);
79
84
 
85
+ /**
86
+ * The origin this document's `form-action` allows besides 'self' — set by the
87
+ * server when it rendered this page, and unset when the buyer came here by a
88
+ * client-side navigation, whose document carries some other page's policy.
89
+ */
90
+ const allowedOrigin = useState<string | null>("punchout-hand-back-origin", () =>
91
+ (import.meta.server ? useRequestEvent()?.context.punchoutHandBackOrigin : null) ?? null);
92
+
93
+ /** Reloaded once already; a second reload could only loop. */
94
+ const RELOAD_PARAM = "handback";
95
+
96
+ /**
97
+ * Whether the form can be submitted from this document. If not, load the page
98
+ * again — once — so the server answers it with the visit's origin allowed.
99
+ */
100
+ function reloadForFormAction(targetUrl: string): boolean {
101
+ const url = new URL(window.location.href);
102
+ const origin = new URL(targetUrl, url).origin;
103
+ if (origin === url.origin || origin === allowedOrigin.value || url.searchParams.has(RELOAD_PARAM)) {
104
+ return false;
105
+ }
106
+ url.searchParams.set(RELOAD_PARAM, "1");
107
+ window.location.replace(url.toString());
108
+ return true;
109
+ }
110
+
80
111
  onMounted(async () => {
81
112
  try {
82
113
  payload.value = await $fetch<PunchoutReturnPayload>("/api/punchout/return", { method: "POST" });
@@ -91,9 +122,13 @@ onMounted(async () => {
91
122
  return;
92
123
  }
93
124
 
125
+ reportTransfer();
126
+ if (payload.value?.target_url && reloadForFormAction(payload.value.target_url)) {
127
+ return;
128
+ }
129
+
94
130
  // One tick so the form is in the DOM, and a beat so the buyer sees where
95
131
  // they are going rather than a flash of a page they cannot read.
96
- reportTransfer();
97
132
  await nextTick();
98
133
  window.setTimeout(() => form.value?.submit(), 400);
99
134
  });
@@ -0,0 +1,33 @@
1
+ <script setup lang="ts">
2
+ import WithdrawalDeclaration from "../components/withdrawal/WithdrawalDeclaration.vue";
3
+
4
+ /**
5
+ * Withdrawing from a contract (§ 356a BGB) — reached from the footer on every
6
+ * page and from an order's detail page, which hands the order over as
7
+ * `?order=`. Shipped by the layer rather than each storefront, because the
8
+ * obligation is the same for all of them; open to guests, who have the same
9
+ * right as a signed-in buyer.
10
+ */
11
+ const { t } = useI18n();
12
+ const route = useRoute();
13
+
14
+ const orderId = computed(() => {
15
+ const value = route.query.order;
16
+ return typeof value === "string" ? value : undefined;
17
+ });
18
+
19
+ useHead({ title: () => t("withdrawal.title") });
20
+ </script>
21
+
22
+ <template>
23
+ <UContainer class="max-w-xl py-10 lg:py-14">
24
+ <h1 class="text-2xl font-semibold text-highlighted mb-2">
25
+ {{ t('withdrawal.title') }}
26
+ </h1>
27
+ <p class="text-muted mb-8">
28
+ {{ t('withdrawal.intro') }}
29
+ </p>
30
+
31
+ <WithdrawalDeclaration :order-id="orderId" />
32
+ </UContainer>
33
+ </template>
@@ -0,0 +1,66 @@
1
+ /**
2
+ * The lines an address prints as, for an address the orders or quotes app
3
+ * answered (RAD-236).
4
+ *
5
+ * Those apps hold every address to the platform's address type (customers,
6
+ * `contracts/address.schema.json`) and answer the type plus the old flat keys.
7
+ * A placed order also carries `formatted`: the lines frozen when the order took
8
+ * the address over, ending with the country. Those are what the document says,
9
+ * so they are shown as they are. Without them the lines are put together from
10
+ * the type's keys, then from the old flat keys, then from the storefront's own
11
+ * camelCase ones, so an order stored before the move still reads.
12
+ */
13
+
14
+ type AddressLike = Record<string, unknown> | null | undefined;
15
+
16
+ const text = (value: unknown): string => (typeof value === "string" || typeof value === "number")
17
+ ? String(value).trim()
18
+ : "";
19
+
20
+ const first = (a: Record<string, unknown>, ...keys: string[]): string => {
21
+ for (const key of keys) {
22
+ const value = text(a[key]);
23
+ if (value) {
24
+ return value;
25
+ }
26
+ }
27
+ return "";
28
+ };
29
+
30
+ export interface AddressLinesOptions {
31
+ /**
32
+ * Whether the lines put together from the keys end with the country. The
33
+ * frozen `formatted` lines always carry it; this decides only the fallback.
34
+ */
35
+ country?: boolean;
36
+ }
37
+
38
+ export function addressLines(address: AddressLike, options: AddressLinesOptions = {}): string[] {
39
+ if (!address || typeof address !== "object") {
40
+ return [];
41
+ }
42
+ const a = address as Record<string, unknown>;
43
+
44
+ if (Array.isArray(a.formatted)) {
45
+ const printed = a.formatted.map(text).filter(Boolean);
46
+ if (printed.length) {
47
+ return printed;
48
+ }
49
+ }
50
+
51
+ const street = first(a, "address_line1")
52
+ || [text(a.street_name), text(a.house_number), text(a.house_number_addition)].filter(Boolean).join(" ")
53
+ || first(a, "street");
54
+ const postalCode = first(a, "postal_code", "zip", "postalCode");
55
+ const locality = first(a, "locality", "city");
56
+
57
+ return [
58
+ first(a, "organization_name", "company", "companyName"),
59
+ first(a, "recipient_name", "name", "contactName"),
60
+ street,
61
+ first(a, "address_line2", "street2"),
62
+ first(a, "address_line3"),
63
+ `${postalCode} ${locality}`.trim(),
64
+ options.country ? first(a, "country_code", "country") : "",
65
+ ].filter(Boolean);
66
+ }
@@ -0,0 +1,63 @@
1
+ /**
2
+ * Where on the checkout an address refusal from the orders app belongs
3
+ * (RAD-236).
4
+ *
5
+ * The orders app checks postal codes and the rest per country and refuses with
6
+ * one sentence naming the field (`shipping_address.postal_code`). The BFF hands
7
+ * that on as `{ type: "invalid_address", address, key, message }`; this says
8
+ * which of the checkout's field errors carries it.
9
+ */
10
+ export interface CheckoutAddressRefusal {
11
+ address: "billing" | "shipping" | null;
12
+ key: string | null;
13
+ message: string;
14
+ }
15
+
16
+ /** The address type's keys, as the guest form's fields. */
17
+ const GUEST_FIELD: Record<string, string> = {
18
+ organization_name: "companyName",
19
+ recipient_name: "lastName",
20
+ address_line1: "street",
21
+ street_name: "street",
22
+ house_number: "street",
23
+ house_number_addition: "street",
24
+ postal_code: "postalCode",
25
+ locality: "city",
26
+ country_code: "country",
27
+ };
28
+
29
+ /** The refusal the BFF answered, out of a failed `$fetch`, or null for any other failure. */
30
+ export function checkoutAddressRefusalOf(err: unknown): CheckoutAddressRefusal | null {
31
+ const data = (err as { data?: { data?: Record<string, unknown> } } | null)?.data?.data;
32
+ if (!data || data.type !== "invalid_address" || typeof data.message !== "string" || !data.message) {
33
+ return null;
34
+ }
35
+ const address = data.address === "billing" || data.address === "shipping" ? data.address : null;
36
+ return {
37
+ address,
38
+ key: typeof data.key === "string" && data.key ? data.key : null,
39
+ message: data.message,
40
+ };
41
+ }
42
+
43
+ /**
44
+ * The field error key a refusal is shown under.
45
+ *
46
+ * A billing address that is the delivery address is shown on the delivery
47
+ * address, because that is the one the buyer filled in. A signed-in buyer picked
48
+ * the address from the address book, so the sentence goes under the picker; a
49
+ * guest typed it, so it goes under the field itself, or under the first one
50
+ * when the app named only the address.
51
+ */
52
+ export function checkoutAddressFieldOf(
53
+ refusal: CheckoutAddressRefusal,
54
+ options: { guest: boolean; billingSameAsShipping: boolean },
55
+ ): string {
56
+ const billing = refusal.address === "billing" && !options.billingSameAsShipping;
57
+ if (!options.guest) {
58
+ return billing ? "billingAddressId" : "shippingAddressId";
59
+ }
60
+ const form = billing ? "guestBilling" : "guestShipping";
61
+ const field = (refusal.key && GUEST_FIELD[refusal.key]) || "street";
62
+ return `${form}.${field}`;
63
+ }
@@ -150,6 +150,18 @@
150
150
  "done": "Bestellung storniert",
151
151
  "failed": "Stornierung nicht möglich"
152
152
  },
153
+ "pay": {
154
+ "action": "Jetzt bezahlen",
155
+ "title": "Bestellung {number} bezahlen",
156
+ "intro": "Diese Bestellung wartet auf Ihre Zahlung über {amount}.",
157
+ "method": "Zahlungsart",
158
+ "confirm": "{amount} bezahlen",
159
+ "done": "Vielen Dank – die Zahlung ist unterwegs",
160
+ "failed": "Die Zahlung ist nicht durchgegangen",
161
+ "due": "Diese Bestellung wartet auf Ihre Zahlung",
162
+ "unavailable": "Diese Zahlungsart ist für diese Bestellung gerade nicht verfügbar. Bitte kontaktieren Sie uns.",
163
+ "settled": "Diese Bestellung wartet nicht mehr auf eine Zahlung."
164
+ },
153
165
  "messages": {
154
166
  "title": "Nachrichten zu dieser Bestellung",
155
167
  "you": "Sie",
@@ -741,7 +753,7 @@
741
753
  "note": "Anmerkung zur Bestellung (optional)",
742
754
  "terms": "Mit Ihrer Bestellung gelten unsere AGB.",
743
755
  "cancel": "Abbrechen",
744
- "submit": "Verbindlich bestellen",
756
+ "submit": "Zahlungspflichtig bestellen",
745
757
  "success": "Bestellung {number} aufgegeben",
746
758
  "failed": "Bestellung fehlgeschlagen"
747
759
  },
@@ -191,6 +191,7 @@
191
191
  "page": {
192
192
  "title": "Warenkörbe",
193
193
  "description": "Alle Warenkörbe, die Sie gerade befüllen — wechseln, umbenennen oder löschen Sie sie hier.",
194
+ "positionsCount": "{count} Position | {count} Positionen",
194
195
  "searchPlaceholder": "Nach Name suchen …",
195
196
  "columns": {
196
197
  "name": "Name",
@@ -148,7 +148,7 @@
148
148
  "promoCode": "Aktionscode",
149
149
  "promoCodePlaceholder": "Aktionscode",
150
150
  "applyPromo": "Einlösen",
151
- "placeOrder": "Jetzt bestellen",
151
+ "placeOrder": "Zahlungspflichtig bestellen",
152
152
  "backToCart": "Zurück zum Warenkorb",
153
153
  "termsText": "Ich akzeptiere die {link}",
154
154
  "termsLink": "AGB und Datenschutzbestimmungen",
@@ -101,6 +101,13 @@
101
101
  },
102
102
  "table": {
103
103
  "filterAll": "Alle",
104
+ "sortBy": "Sortieren nach",
105
+ "sortAsc": "{column} (A–Z)",
106
+ "sortDesc": "{column} (Z–A)",
107
+ "sortNewest": "{column} (neueste zuerst)",
108
+ "sortOldest": "{column} (älteste zuerst)",
109
+ "sortHigh": "{column} (höchste zuerst)",
110
+ "sortLow": "{column} (niedrigste zuerst)",
104
111
  "noResults": {
105
112
  "title": "Keine Treffer",
106
113
  "description": "Passen Sie Suche oder Filter an, um Ergebnisse zu sehen."
@@ -0,0 +1,34 @@
1
+ {
2
+ "withdrawal": {
3
+ "cta": "Vertrag widerrufen",
4
+ "title": "Vertrag widerrufen",
5
+ "intro": "Hier erklären Sie den Widerruf eines Vertrags, den Sie bei uns geschlossen haben. Sie brauchen dafür kein Kundenkonto und müssen keinen Grund angeben.",
6
+ "requiredHint": "Mit * markierte Felder sind Pflichtfelder.",
7
+ "fields": {
8
+ "name": "Name",
9
+ "email": "E-Mail-Adresse",
10
+ "emailHelp": "An diese Adresse senden wir die Eingangsbestätigung Ihres Widerrufs.",
11
+ "orderId": "Bestellnummer",
12
+ "orderIdHelp": "Steht in Ihrer Bestellbestätigung.",
13
+ "statement": "Ihre Erklärung",
14
+ "statementHelp": "Nennen Sie gern, welche Artikel Sie widerrufen, wenn es nicht die ganze Bestellung ist."
15
+ },
16
+ "defaultStatement": "Hiermit widerrufe ich den von mir abgeschlossenen Vertrag über die Bestellung {order}.",
17
+ "defaultStatementNoOrder": "Hiermit widerrufe ich den von mir abgeschlossenen Vertrag.",
18
+ "confirm": "Widerruf bestätigen",
19
+ "errors": {
20
+ "nameRequired": "Bitte geben Sie Ihren Namen an.",
21
+ "emailRequired": "Bitte geben Sie Ihre E-Mail-Adresse an.",
22
+ "emailInvalid": "Bitte geben Sie eine gültige E-Mail-Adresse an.",
23
+ "orderIdRequired": "Bitte geben Sie die Bestellnummer an.",
24
+ "statementRequired": "Bitte formulieren Sie Ihre Widerrufserklärung.",
25
+ "failed": "Ihr Widerruf konnte nicht übermittelt werden. Bitte versuchen Sie es noch einmal oder erklären Sie den Widerruf per E-Mail an uns.",
26
+ "rejected": "Ihr Widerruf ist nicht angekommen. Bitte versuchen Sie es noch einmal oder erklären Sie den Widerruf per E-Mail an uns."
27
+ },
28
+ "done": {
29
+ "title": "Ihr Widerruf ist eingegangen",
30
+ "receivedAt": "Eingegangen am {date}",
31
+ "intro": "Wir haben Ihre Widerrufserklärung mit folgenden Angaben erhalten. Eine Bestätigung senden wir Ihnen zusätzlich per E-Mail."
32
+ }
33
+ }
34
+ }
@@ -150,6 +150,18 @@
150
150
  "done": "Order cancelled",
151
151
  "failed": "The order could not be cancelled"
152
152
  },
153
+ "pay": {
154
+ "action": "Pay now",
155
+ "title": "Pay order {number}",
156
+ "intro": "This order is waiting for your payment of {amount}.",
157
+ "method": "Payment method",
158
+ "confirm": "Pay {amount}",
159
+ "done": "Thank you — the payment is on its way",
160
+ "failed": "The payment did not go through",
161
+ "due": "This order is waiting for your payment",
162
+ "unavailable": "This payment method cannot be used for this order right now. Please contact us.",
163
+ "settled": "This order is no longer waiting for a payment."
164
+ },
153
165
  "messages": {
154
166
  "title": "Messages about this order",
155
167
  "you": "You",
@@ -741,7 +753,7 @@
741
753
  "note": "Note for the order (optional)",
742
754
  "terms": "Our terms and conditions apply to your order.",
743
755
  "cancel": "Cancel",
744
- "submit": "Place binding order",
756
+ "submit": "Place order and pay",
745
757
  "success": "Order {number} placed",
746
758
  "failed": "Order failed"
747
759
  },
@@ -191,6 +191,7 @@
191
191
  "page": {
192
192
  "title": "Carts",
193
193
  "description": "All carts you are currently filling — switch, rename or delete them here.",
194
+ "positionsCount": "{count} item | {count} items",
194
195
  "searchPlaceholder": "Search by name…",
195
196
  "columns": {
196
197
  "name": "Name",
@@ -148,7 +148,7 @@
148
148
  "promoCode": "Promo Code",
149
149
  "promoCodePlaceholder": "Promo code",
150
150
  "applyPromo": "Apply",
151
- "placeOrder": "Place Order",
151
+ "placeOrder": "Place order and pay",
152
152
  "backToCart": "Back to Cart",
153
153
  "termsText": "I accept the {link}",
154
154
  "termsLink": "Terms & Conditions and Privacy Policy",
@@ -101,6 +101,13 @@
101
101
  },
102
102
  "table": {
103
103
  "filterAll": "All",
104
+ "sortBy": "Sort by",
105
+ "sortAsc": "{column} (A–Z)",
106
+ "sortDesc": "{column} (Z–A)",
107
+ "sortNewest": "{column} (newest first)",
108
+ "sortOldest": "{column} (oldest first)",
109
+ "sortHigh": "{column} (highest first)",
110
+ "sortLow": "{column} (lowest first)",
104
111
  "noResults": {
105
112
  "title": "No matches",
106
113
  "description": "Adjust your search or filters to see results."
@@ -0,0 +1,34 @@
1
+ {
2
+ "withdrawal": {
3
+ "cta": "Withdraw from contract",
4
+ "title": "Withdraw from contract",
5
+ "intro": "Use this page to withdraw from a contract you concluded with us. You do not need a customer account and you do not have to give a reason.",
6
+ "requiredHint": "Fields marked * are required.",
7
+ "fields": {
8
+ "name": "Name",
9
+ "email": "Email address",
10
+ "emailHelp": "We send the confirmation of receipt of your withdrawal to this address.",
11
+ "orderId": "Order number",
12
+ "orderIdHelp": "You find it in your order confirmation.",
13
+ "statement": "Your declaration",
14
+ "statementHelp": "If you are not withdrawing from the whole order, tell us which items it concerns."
15
+ },
16
+ "defaultStatement": "I hereby withdraw from the contract I concluded for order {order}.",
17
+ "defaultStatementNoOrder": "I hereby withdraw from the contract I concluded.",
18
+ "confirm": "Confirm withdrawal",
19
+ "errors": {
20
+ "nameRequired": "Please enter your name.",
21
+ "emailRequired": "Please enter your email address.",
22
+ "emailInvalid": "Please enter a valid email address.",
23
+ "orderIdRequired": "Please enter the order number.",
24
+ "statementRequired": "Please state your declaration of withdrawal.",
25
+ "failed": "Your withdrawal could not be sent. Please try again or declare your withdrawal to us by email.",
26
+ "rejected": "Your withdrawal did not reach us. Please try again or declare your withdrawal to us by email."
27
+ },
28
+ "done": {
29
+ "title": "Your withdrawal has been received",
30
+ "receivedAt": "Received on {date}",
31
+ "intro": "We have received your declaration of withdrawal with the details below. We will also send you a confirmation by email."
32
+ }
33
+ }
34
+ }
package/nuxt.config.ts CHANGED
@@ -188,6 +188,9 @@ export default defineNuxtConfig({
188
188
  if (!useNuxt().options.dev) {
189
189
  return;
190
190
  }
191
+ // Nitro's dev error handler leaks WebAssembly memory per error — see the
192
+ // handler for the full story.
193
+ nitroConfig.errorHandler = resolve(currentDir, "server/dev/errorHandler.ts");
191
194
  nitroConfig.handlers = [
192
195
  ...(nitroConfig.handlers ?? []),
193
196
  ...["seed", "drop", "health"].map(name => ({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@revenexx/cover",
3
- "version": "0.15.0",
3
+ "version": "0.16.0",
4
4
  "description": "Cover — revenexx design system for Nuxt. Distributed as a Nuxt layer: generic UI components, theming tokens and stores shared by the demo shop, custom storefronts and the Blokkli theme.",
5
5
  "type": "module",
6
6
  "main": "./nuxt.config.ts",