@revenexx/cover 0.7.0 → 0.10.1

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 (101) hide show
  1. package/app/api/forms.ts +1 -0
  2. package/app/app.config.ts +17 -12
  3. package/app/components/RevenexxForm.vue +80 -12
  4. package/app/components/account/AccountShell.vue +18 -0
  5. package/app/components/account/approvals/AccountPendingApprovals.vue +178 -0
  6. package/app/components/account/orderlists/AccountOrderListDetail.vue +47 -4
  7. package/app/components/account/orders/AccountOrderDetail.vue +186 -1
  8. package/app/components/account/payments/AccountPayments.vue +129 -0
  9. package/app/components/account/quotes/AccountQuoteDetail.vue +48 -16
  10. package/app/components/auth/AuthLoginPanel.vue +131 -15
  11. package/app/components/auth/AuthMagicLinkPanel.vue +70 -0
  12. package/app/components/cart/view/CartSummaryPanel.vue +54 -0
  13. package/app/components/checkout/onepage/CheckoutDeliverySection.vue +13 -1
  14. package/app/components/checkout/onepage/CheckoutGate.vue +8 -7
  15. package/app/components/form/FormPage.vue +40 -0
  16. package/app/components/layout/header/AppBar.vue +7 -1
  17. package/app/components/layout/header/MainNav.vue +23 -1
  18. package/app/components/layout/header/MobileMenu.vue +12 -0
  19. package/app/components/product/detail/ProductDetailPriceRequest.vue +39 -0
  20. package/app/components/product/detail/ProductDetailView.vue +57 -0
  21. package/app/composables/useAccountHold.ts +45 -0
  22. package/app/composables/useAccountPayments.ts +21 -0
  23. package/app/composables/useAccountQuotes.ts +15 -2
  24. package/app/composables/useAuthStore.ts +82 -2
  25. package/app/composables/useAuthoredForms.ts +26 -0
  26. package/app/composables/useAvailableOffers.ts +42 -0
  27. package/app/composables/useGuestOrdering.ts +28 -0
  28. package/app/composables/useMasterDataEditable.ts +22 -7
  29. package/app/composables/useOrderListRules.ts +21 -1
  30. package/app/composables/usePendingApprovals.ts +37 -0
  31. package/app/config/icons.ts +2 -0
  32. package/app/config/navigation.ts +2 -2
  33. package/app/formkit.config.ts +14 -0
  34. package/app/interfaces/account/approvals.ts +37 -0
  35. package/app/interfaces/account/order-list.ts +29 -0
  36. package/app/interfaces/account/order-lists.ts +9 -0
  37. package/app/interfaces/account/payments.ts +48 -0
  38. package/app/interfaces/auth.ts +11 -0
  39. package/app/interfaces/b2b.ts +8 -8
  40. package/app/interfaces/offers.ts +35 -0
  41. package/app/interfaces/shopSettings.ts +77 -0
  42. package/app/plugins/account-hold.client.ts +20 -0
  43. package/app/plugins/shop-settings.ts +27 -12
  44. package/i18n/locales/de/account.json +80 -0
  45. package/i18n/locales/de/auth.json +29 -0
  46. package/i18n/locales/de/cart.json +7 -0
  47. package/i18n/locales/de/checkout.json +2 -1
  48. package/i18n/locales/de/common.json +4 -2
  49. package/i18n/locales/de/forms.json +27 -0
  50. package/i18n/locales/en/account.json +80 -0
  51. package/i18n/locales/en/auth.json +29 -0
  52. package/i18n/locales/en/cart.json +7 -0
  53. package/i18n/locales/en/checkout.json +2 -1
  54. package/i18n/locales/en/common.json +2 -0
  55. package/i18n/locales/en/forms.json +27 -0
  56. package/package.json +2 -1
  57. package/server/api/account/address/[id].delete.ts +1 -1
  58. package/server/api/account/address/[id].put.ts +1 -1
  59. package/server/api/account/address/index.post.ts +1 -1
  60. package/server/api/account/order-lists/[id].get.ts +37 -3
  61. package/server/api/account/orders/[id]/cancel.post.ts +54 -0
  62. package/server/api/account/orders/[id]/messages.get.ts +63 -0
  63. package/server/api/account/orders/[id]/messages.post.ts +44 -0
  64. package/server/api/account/organization.put.ts +1 -1
  65. package/server/api/account/payments.get.ts +54 -0
  66. package/server/api/account/pending-approvals/[id]/approve.post.ts +10 -0
  67. package/server/api/account/pending-approvals/[id]/decline.post.ts +10 -0
  68. package/server/api/account/pending-approvals/index.get.ts +25 -0
  69. package/server/api/account/profile.put.ts +1 -1
  70. package/server/api/account/quotes/[id]/decline.post.ts +35 -6
  71. package/server/api/account/team/[id].put.ts +1 -1
  72. package/server/api/account/team.post.ts +1 -1
  73. package/server/api/auth/magic-link.post.ts +32 -0
  74. package/server/api/auth/magic-link.put.ts +30 -0
  75. package/server/api/auth/otp.post.ts +33 -0
  76. package/server/api/auth/otp.put.ts +28 -0
  77. package/server/api/checkout/profile.get.ts +6 -3
  78. package/server/api/forms/[slug]/submit.post.ts +27 -16
  79. package/server/api/forms/[slug].get.ts +9 -1
  80. package/server/api/forms/index.get.ts +23 -0
  81. package/server/api/orders/index.post.ts +8 -0
  82. package/server/api/promotions/available.post.ts +37 -0
  83. package/server/config/account/organization.json +0 -4
  84. package/server/config/shop/app-settings.json +4 -0
  85. package/server/data/forms/authored.json +337 -0
  86. package/server/interfaces/forms.ts +51 -0
  87. package/server/services/ApiAuthService.ts +10 -0
  88. package/server/services/ApiFormsService.ts +56 -0
  89. package/server/services/MockB2BContextService.ts +1 -5
  90. package/server/services/MockFormsService.ts +63 -0
  91. package/server/utils/accountPayments.ts +45 -0
  92. package/server/utils/appSettings.ts +69 -4
  93. package/server/utils/forms.ts +62 -14
  94. package/server/utils/formsService.ts +29 -0
  95. package/server/utils/liveOrders.ts +26 -0
  96. package/server/utils/masterData.ts +31 -11
  97. package/server/utils/passwordlessSignIn.ts +73 -0
  98. package/server/utils/pendingApprovals.ts +153 -0
  99. package/server/utils/promotionsService.ts +90 -0
  100. package/server/utils/quotesService.ts +15 -0
  101. package/server/utils/shopSettings.ts +35 -4
@@ -54,6 +54,49 @@
54
54
  "deleted": "Adresse erfolgreich gelöscht"
55
55
  }
56
56
  },
57
+ "approvals": {
58
+ "queue": {
59
+ "title": "Wartet auf Ihre Entscheidung",
60
+ "loading": "Wird geladen …",
61
+ "layer": "Stufe {layer}",
62
+ "unnamedRequest": "Anfrage",
63
+ "approve": "Freigeben",
64
+ "decline": "Ablehnen",
65
+ "declineTitle": "Anfrage ablehnen",
66
+ "declineIntro": "Eine Ablehnung beendet die gesamte Anfrage und gibt reserviertes Budget zurück.",
67
+ "declineReason": "Grund",
68
+ "declineReasonPlaceholder": "Damit der Anfragende weiß, wie er es anders stellen kann.",
69
+ "approved": "Freigegeben",
70
+ "declined": "Abgelehnt",
71
+ "failed": "Entscheidung nicht möglich",
72
+ "empty": {
73
+ "title": "Nichts wartet auf Sie",
74
+ "description": "Sobald eine Anfrage Ihre Freigabe braucht, erscheint sie hier."
75
+ }
76
+ }
77
+ },
78
+ "payments": {
79
+ "title": "Zahlungen",
80
+ "description": "Was offen ist, was fällig ist und was bereits bezahlt wurde.",
81
+ "outstanding": "Offener Betrag",
82
+ "overdueTitle": "{count} Zahlung(en) überfällig",
83
+ "overdueDescription": "Bitte begleichen Sie diese Posten oder wenden Sie sich an Ihren Ansprechpartner.",
84
+ "columns": { "order": "Bestellung", "amount": "Betrag", "state": "Status", "due": "Fällig / bezahlt" },
85
+ "states": {
86
+ "open": "Offen",
87
+ "pending": "In Bearbeitung",
88
+ "authorized": "Autorisiert",
89
+ "paid": "Bezahlt",
90
+ "partially_paid": "Teilweise bezahlt",
91
+ "refunded": "Erstattet",
92
+ "failed": "Fehlgeschlagen",
93
+ "overdue": "Überfällig"
94
+ },
95
+ "empty": {
96
+ "title": "Keine Zahlungen",
97
+ "description": "Sobald eine Bestellung abgerechnet wird, erscheint sie hier."
98
+ }
99
+ },
57
100
  "orders": {
58
101
  "title": "Ihre Bestellungen",
59
102
  "description": "Alle Ihre bisherigen Bestellungen im Überblick.",
@@ -97,6 +140,25 @@
97
140
  "refresh": "Aktualisieren",
98
141
  "notFound": "Bestellung nicht gefunden",
99
142
  "searchPlaceholder": "Nach Bestellnummer oder Artikel suchen …",
143
+ "cancel": {
144
+ "action": "Bestellung stornieren",
145
+ "title": "Bestellung {number} stornieren",
146
+ "intro": "Die Bestellung wird vollständig storniert. Solange nichts versendet wurde, ist das möglich.",
147
+ "reason": "Grund (kann erforderlich sein)",
148
+ "reasonPlaceholder": "z. B. doppelt bestellt",
149
+ "confirm": "Verbindlich stornieren",
150
+ "done": "Bestellung storniert",
151
+ "failed": "Stornierung nicht möglich"
152
+ },
153
+ "messages": {
154
+ "title": "Nachrichten zu dieser Bestellung",
155
+ "you": "Sie",
156
+ "merchant": "Unser Team",
157
+ "empty": "Noch keine Nachrichten. Schreiben Sie uns, wenn etwas zu klären ist.",
158
+ "placeholder": "Ihre Nachricht zu dieser Bestellung …",
159
+ "send": "Senden",
160
+ "failed": "Nachricht konnte nicht gesendet werden"
161
+ },
100
162
  "returns": {
101
163
  "requestReturn": "Rücksendung anfragen",
102
164
  "modalTitle": "Rücksendung anfragen",
@@ -176,6 +238,12 @@
176
238
  "accountAriaLabel": "Zum Kundenkonto"
177
239
  },
178
240
  "account": {
241
+ "hold": {
242
+ "title": "Ihr Konto ist vorübergehend gesperrt",
243
+ "everything": "Sie können weiterarbeiten wie bisher. Bitte wenden Sie sich an Ihren Ansprechpartner, damit die Sperre aufgehoben wird.",
244
+ "catalogue": "Sie können weiterhin im Katalog stöbern und Preise sehen, aber nicht bestellen. Bitte wenden Sie sich an Ihren Ansprechpartner.",
245
+ "nothing": "Bis die Sperre aufgehoben ist, steht Ihnen dieser Bereich nicht zur Verfügung. Bitte wenden Sie sich an Ihren Ansprechpartner."
246
+ },
179
247
  "nav": {
180
248
  "groups": {
181
249
  "account": "Konto",
@@ -195,6 +263,7 @@
195
263
  "inquiries": "Anfragen",
196
264
  "quotes": "Angebote",
197
265
  "orders": "Bestellungen",
266
+ "payments": "Zahlungen",
198
267
  "deliveries": "Lieferungen",
199
268
  "subscriptions": "Abos",
200
269
  "downloads": "Downloads",
@@ -405,6 +474,11 @@
405
474
  "title": "Bestelllisten",
406
475
  "description": "Einkaufs- und Etikettenlisten — gespeicherte Positionen, die direkt zurück in den Warenkorb fließen.",
407
476
  "add": "Liste anlegen",
477
+ "missing": {
478
+ "blocked": "{count} Position(en) werden nicht mehr geführt. Bitte entfernen Sie sie aus der Liste, bevor Sie sie übernehmen.",
479
+ "skipped": "{count} Position(en) übernommen, {skipped} entfallen — diese Artikel führen wir nicht mehr.",
480
+ "gone": "Nicht mehr im Sortiment"
481
+ },
408
482
  "limitReached": "Sie haben die maximale Anzahl von {max} Listen erreicht. Löschen Sie eine Liste, um eine neue anzulegen.",
409
483
  "addTitle": "Neue Liste",
410
484
  "editTitle": "Liste bearbeiten",
@@ -606,6 +680,7 @@
606
680
  "open": "Öffnen",
607
681
  "order": "Zum Angebotspreis bestellen ({total})",
608
682
  "orderSelected": "{count} Position(en) bestellen ({total})",
683
+ "declineSelected": "{count} Position(en) ablehnen",
609
684
  "decline": "Angebot ablehnen"
610
685
  },
611
686
  "detail": {
@@ -623,6 +698,11 @@
623
698
  "sellerNote": "Nachricht von uns",
624
699
  "trail": "Verlauf",
625
700
  "onRequest": "auf Anfrage",
701
+ "choice": {
702
+ "order": "Bestellen",
703
+ "decline": "Ablehnen",
704
+ "open": "Offen lassen"
705
+ },
626
706
  "selectPosition": "Position {name} für die Bestellung auswählen",
627
707
  "partialHint": "{remaining} Position(en) bleiben offen und können später separat bestellt werden.",
628
708
  "hint": {
@@ -29,6 +29,8 @@
29
29
  "emailFormat": "Bitte geben Sie eine gültige E-Mail-Adresse ein",
30
30
  "passwordsMismatch": "Passwörter stimmen nicht überein",
31
31
  "registrationDisabled": "Die Registrierung ist derzeit geschlossen. Bitte kontaktieren Sie uns, um ein Konto einzurichten.",
32
+ "emailExists": "Für diese E-Mail-Adresse besteht bereits ein Konto. Bitte melden Sie sich an oder setzen Sie Ihr Passwort zurück.",
33
+ "network": "Server nicht erreichbar. Bitte prüfen Sie Ihre Verbindung und versuchen Sie es erneut.",
32
34
  "unknown": "Etwas ist schiefgelaufen. Bitte versuchen Sie es erneut."
33
35
  },
34
36
  "disabled": {
@@ -106,6 +108,19 @@
106
108
  "heroHighlight": "Ein Konto.",
107
109
  "heroLine1": "Wir vereinen alle Funktionen unter einem zentralen Kundenkonto.",
108
110
  "heroLine2": "Melden Sie sich jetzt an oder registrieren Sie sich für Ihren persönlichen Zugang.",
111
+ "mailed": {
112
+ "alternative": "Oder melden Sie sich ohne Passwort an:",
113
+ "only": "Geben Sie Ihre E-Mail-Adresse ein — wir senden Ihnen den Zugang zu.",
114
+ "requestLink": "Anmeldelink senden",
115
+ "requestCode": "Code senden",
116
+ "sentTitle": "Prüfen Sie Ihr Postfach",
117
+ "sentLink": "Wir haben einen Anmeldelink an {email} gesendet. Er ist nur kurze Zeit gültig.",
118
+ "sentCode": "Wir haben einen Code an {email} gesendet. Geben Sie ihn hier ein.",
119
+ "codePlaceholder": "Code aus der E-Mail",
120
+ "confirmCode": "Anmelden",
121
+ "codeRejected": "Dieser Code ist falsch oder abgelaufen.",
122
+ "startOver": "Andere E-Mail-Adresse verwenden"
123
+ },
109
124
  "passwordDisabled": {
110
125
  "title": "Anmeldung per E-Mail",
111
126
  "magicLink": "Dieser Shop arbeitet ohne Passwort. Bitte fordern Sie einen Anmeldelink per E-Mail an — wenden Sie sich an unser Team, wenn Sie keinen erhalten.",
@@ -167,6 +182,20 @@
167
182
  },
168
183
  "logout": {
169
184
  "success": "Sie wurden abgemeldet"
185
+ },
186
+ "magicLink": {
187
+ "title": "Anmeldung per Link",
188
+ "description": "Wir prüfen Ihren Anmeldelink.",
189
+ "confirming": "Einen Moment, wir melden Sie an …",
190
+ "rejected": {
191
+ "title": "Dieser Link ist nicht mehr gültig",
192
+ "description": "Anmeldelinks gelten nur kurz und nur einmal. Fordern Sie einfach einen neuen an."
193
+ },
194
+ "unavailable": {
195
+ "title": "Wir konnten Sie gerade nicht anmelden",
196
+ "description": "Der Dienst ist im Moment nicht erreichbar. Bitte versuchen Sie es in einigen Minuten erneut."
197
+ },
198
+ "retry": "Neuen Link anfordern"
170
199
  }
171
200
  }
172
201
  }
@@ -213,6 +213,13 @@
213
213
  "popularTitle": "Beliebt im Sortiment",
214
214
  "add": "In den Warenkorb"
215
215
  },
216
+ "offers": {
217
+ "title": "Das könnten Sie noch bekommen",
218
+ "missingValue": "noch {amount}",
219
+ "missingQuantity": "noch {count} Stück",
220
+ "reached": "erreicht",
221
+ "needsCode": "mit Aktionscode"
222
+ },
216
223
  "trust": {
217
224
  "invoice": "Kauf auf Rechnung für Geschäftskunden",
218
225
  "support": "Persönliches Service-Team, werktags 8–17 Uhr"
@@ -121,7 +121,8 @@
121
121
  "change": "Ändern",
122
122
  "noMethod": "Keine Liefermethode ausgewählt",
123
123
  "partialDelivery": "Teillieferung erlauben",
124
- "partialDeliveryHint": "Verfügbare Positionen werden sofort versendet, der Rest folgt."
124
+ "partialDeliveryHint": "Verfügbare Positionen werden sofort versendet, der Rest folgt.",
125
+ "completeDeliveryOnly": "Wir liefern Ihre Bestellung vollständig — Teillieferungen sind bei diesem Händler nicht vorgesehen."
125
126
  },
126
127
  "payment": {
127
128
  "method": "Zahlungsmethode",
@@ -1,5 +1,7 @@
1
1
  {
2
2
  "nav": {
3
+ "openMenu": "Menü öffnen",
4
+ "catalogue": "Katalog",
3
5
  "home": "Startseite",
4
6
  "homeAriaLabel": "Zur Startseite",
5
7
  "cartButton": "Warenkorb öffnen | Warenkorb öffnen, {count} Artikel | Warenkorb öffnen, {count} Artikel",
@@ -63,8 +65,8 @@
63
65
  },
64
66
  "topbar": {
65
67
  "freeShipping": "Versandkostenfrei ab {amount} Bestellwert",
66
- "nextDayDelivery": "Bis {time} bestellt. Am nächsten Tag geliefert.",
67
- "deliveryInDays": "Bis {time} bestellt. Lieferung in {days} Werktagen.",
68
+ "nextDayDelivery": "Bis {time} Uhr bestellt. Am nächsten Tag geliefert.",
69
+ "deliveryInDays": "Bis {time} Uhr bestellt. Lieferung in {days} Werktagen.",
68
70
  "directOrder": "Direktbestellung",
69
71
  "orderOrders": "Bestellungen",
70
72
  "localeSelector": "Deutschland (Deutsch) in €",
@@ -0,0 +1,27 @@
1
+ {
2
+ "forms": {
3
+ "submit": "Absenden",
4
+ "back": "Zurück",
5
+ "continue": "Weiter",
6
+ "step": "Schritt {current} von {total}",
7
+ "success": "Danke — Ihre Nachricht ist angekommen.",
8
+ "error": "Da ist etwas schiefgegangen. Bitte versuchen Sie es noch einmal.",
9
+ "rejected": "Ihre Nachricht ist nicht angekommen. Bitte versuchen Sie es noch einmal oder rufen Sie uns an.",
10
+ "missingTitle": "Dieses Formular ist nicht veröffentlicht",
11
+ "missingDescription": "Es ist im Cockpit angelegt, aber noch nicht live geschaltet.",
12
+ "honeypotLabel": "Dieses Feld bitte leer lassen",
13
+ "contact": {
14
+ "title": "Kontakt",
15
+ "intro": "Fragen zu einem Artikel, einer Bestellung oder einem Preis? Schreiben Sie uns."
16
+ },
17
+ "priceRequest": {
18
+ "title": "Preisanfrage",
19
+ "intro": "Für einen Artikel und eine Frage. Einen ganzen Warenkorb schicken Sie als Angebotsanfrage.",
20
+ "cta": "Preis anfragen"
21
+ },
22
+ "callback": {
23
+ "title": "Rückruf anfordern",
24
+ "intro": "Sagen Sie uns, wann es passt — wir rufen an."
25
+ }
26
+ }
27
+ }
@@ -54,6 +54,49 @@
54
54
  "deleted": "Address deleted successfully"
55
55
  }
56
56
  },
57
+ "approvals": {
58
+ "queue": {
59
+ "title": "Awaiting your decision",
60
+ "loading": "Loading …",
61
+ "layer": "Layer {layer}",
62
+ "unnamedRequest": "Request",
63
+ "approve": "Approve",
64
+ "decline": "Decline",
65
+ "declineTitle": "Decline the request",
66
+ "declineIntro": "A decline ends the whole request and gives any reserved budget back.",
67
+ "declineReason": "Reason",
68
+ "declineReasonPlaceholder": "So the requester knows how to ask differently.",
69
+ "approved": "Approved",
70
+ "declined": "Declined",
71
+ "failed": "The decision could not be recorded",
72
+ "empty": {
73
+ "title": "Nothing is waiting on you",
74
+ "description": "A request needing your approval appears here."
75
+ }
76
+ }
77
+ },
78
+ "payments": {
79
+ "title": "Payments",
80
+ "description": "What is open, what is due and what has already been paid.",
81
+ "outstanding": "Outstanding",
82
+ "overdueTitle": "{count} payment(s) overdue",
83
+ "overdueDescription": "Please settle these items or contact your account manager.",
84
+ "columns": { "order": "Order", "amount": "Amount", "state": "Status", "due": "Due / paid" },
85
+ "states": {
86
+ "open": "Open",
87
+ "pending": "In progress",
88
+ "authorized": "Authorised",
89
+ "paid": "Paid",
90
+ "partially_paid": "Partly paid",
91
+ "refunded": "Refunded",
92
+ "failed": "Failed",
93
+ "overdue": "Overdue"
94
+ },
95
+ "empty": {
96
+ "title": "No payments",
97
+ "description": "An order appears here once it is invoiced."
98
+ }
99
+ },
57
100
  "orders": {
58
101
  "title": "Your orders",
59
102
  "description": "View and track all your past orders.",
@@ -97,6 +140,25 @@
97
140
  "refresh": "Refresh",
98
141
  "notFound": "Order not found",
99
142
  "searchPlaceholder": "Search by order number or item…",
143
+ "cancel": {
144
+ "action": "Cancel order",
145
+ "title": "Cancel order {number}",
146
+ "intro": "The whole order is cancelled. This is possible as long as nothing has shipped.",
147
+ "reason": "Reason (may be required)",
148
+ "reasonPlaceholder": "e.g. ordered twice",
149
+ "confirm": "Cancel the order",
150
+ "done": "Order cancelled",
151
+ "failed": "The order could not be cancelled"
152
+ },
153
+ "messages": {
154
+ "title": "Messages about this order",
155
+ "you": "You",
156
+ "merchant": "Our team",
157
+ "empty": "No messages yet. Write to us if something needs clearing up.",
158
+ "placeholder": "Your message about this order …",
159
+ "send": "Send",
160
+ "failed": "The message could not be sent"
161
+ },
100
162
  "returns": {
101
163
  "requestReturn": "Request return",
102
164
  "modalTitle": "Request a return",
@@ -176,6 +238,12 @@
176
238
  "accountAriaLabel": "Go to your account"
177
239
  },
178
240
  "account": {
241
+ "hold": {
242
+ "title": "Your account is on hold",
243
+ "everything": "You can carry on as before. Please contact your account manager to have the hold lifted.",
244
+ "catalogue": "You can still browse the catalogue and see prices, but not order. Please contact your account manager.",
245
+ "nothing": "This area is unavailable until the hold is lifted. Please contact your account manager."
246
+ },
179
247
  "nav": {
180
248
  "groups": {
181
249
  "account": "Account",
@@ -195,6 +263,7 @@
195
263
  "inquiries": "Inquiries",
196
264
  "quotes": "Quotes",
197
265
  "orders": "Orders",
266
+ "payments": "Payments",
198
267
  "deliveries": "Deliveries",
199
268
  "subscriptions": "Subscriptions",
200
269
  "downloads": "Downloads",
@@ -405,6 +474,11 @@
405
474
  "title": "Order lists",
406
475
  "description": "Shopping and label lists — saved positions that flow straight back into the cart.",
407
476
  "add": "Add list",
477
+ "missing": {
478
+ "blocked": "{count} position(s) are no longer carried. Please remove them from the list before taking it over.",
479
+ "skipped": "{count} position(s) taken over, {skipped} left out — we no longer carry those articles.",
480
+ "gone": "No longer available"
481
+ },
408
482
  "limitReached": "You have reached the maximum of {max} lists. Delete one to create another.",
409
483
  "addTitle": "New list",
410
484
  "editTitle": "Edit list",
@@ -606,6 +680,7 @@
606
680
  "open": "Open",
607
681
  "order": "Order at the quoted price ({total})",
608
682
  "orderSelected": "Order {count} position(s) ({total})",
683
+ "declineSelected": "Decline {count} position(s)",
609
684
  "decline": "Decline quote"
610
685
  },
611
686
  "detail": {
@@ -623,6 +698,11 @@
623
698
  "sellerNote": "Our message",
624
699
  "trail": "History",
625
700
  "onRequest": "on request",
701
+ "choice": {
702
+ "order": "Order",
703
+ "decline": "Decline",
704
+ "open": "Leave open"
705
+ },
626
706
  "selectPosition": "Select position {name} for the order",
627
707
  "partialHint": "{remaining} position(s) stay open and can be ordered separately later.",
628
708
  "hint": {
@@ -29,6 +29,8 @@
29
29
  "emailFormat": "Please enter a valid email address",
30
30
  "passwordsMismatch": "Passwords do not match",
31
31
  "registrationDisabled": "Registration is currently closed. Please contact us to set up an account.",
32
+ "emailExists": "An account with this email address already exists. Please sign in, or reset your password.",
33
+ "network": "Server unreachable. Please check your connection and try again.",
32
34
  "unknown": "Something went wrong. Please try again."
33
35
  },
34
36
  "disabled": {
@@ -106,6 +108,19 @@
106
108
  "heroHighlight": "One account.",
107
109
  "heroLine1": "We unite every function under one central customer account.",
108
110
  "heroLine2": "Sign in now or register for your personal access.",
111
+ "mailed": {
112
+ "alternative": "Or sign in without a password:",
113
+ "only": "Enter your e-mail address — we will send you the way in.",
114
+ "requestLink": "Send a sign-in link",
115
+ "requestCode": "Send a code",
116
+ "sentTitle": "Check your inbox",
117
+ "sentLink": "We sent a sign-in link to {email}. It is valid for a short while only.",
118
+ "sentCode": "We sent a code to {email}. Enter it here.",
119
+ "codePlaceholder": "Code from the e-mail",
120
+ "confirmCode": "Sign in",
121
+ "codeRejected": "This code is wrong or has expired.",
122
+ "startOver": "Use a different e-mail address"
123
+ },
109
124
  "passwordDisabled": {
110
125
  "title": "Signing in by e-mail",
111
126
  "magicLink": "This shop works without a password. Please request a sign-in link by e-mail — contact our team if you do not receive one.",
@@ -167,6 +182,20 @@
167
182
  },
168
183
  "logout": {
169
184
  "success": "You have been logged out"
185
+ },
186
+ "magicLink": {
187
+ "title": "Signing in by link",
188
+ "description": "We are checking your sign-in link.",
189
+ "confirming": "One moment, signing you in …",
190
+ "rejected": {
191
+ "title": "This link is no longer valid",
192
+ "description": "Sign-in links are short-lived and single-use. Just ask for a new one."
193
+ },
194
+ "unavailable": {
195
+ "title": "We could not sign you in just now",
196
+ "description": "The service is unreachable at the moment. Please try again in a few minutes."
197
+ },
198
+ "retry": "Ask for a new link"
170
199
  }
171
200
  }
172
201
  }
@@ -213,6 +213,13 @@
213
213
  "popularTitle": "Popular in the catalog",
214
214
  "add": "Add to cart"
215
215
  },
216
+ "offers": {
217
+ "title": "What you could still get",
218
+ "missingValue": "{amount} to go",
219
+ "missingQuantity": "{count} more to go",
220
+ "reached": "reached",
221
+ "needsCode": "with a code"
222
+ },
216
223
  "trust": {
217
224
  "invoice": "Buy on invoice for business customers",
218
225
  "support": "Personal service team, weekdays 8 am–5 pm"
@@ -121,7 +121,8 @@
121
121
  "change": "Change",
122
122
  "noMethod": "No delivery method selected",
123
123
  "partialDelivery": "Allow partial delivery",
124
- "partialDeliveryHint": "Available items ship immediately, the rest follows."
124
+ "partialDeliveryHint": "Available items ship immediately, the rest follows.",
125
+ "completeDeliveryOnly": "We deliver your order complete — this merchant does not ship in parts."
125
126
  },
126
127
  "payment": {
127
128
  "method": "Payment Method",
@@ -1,5 +1,7 @@
1
1
  {
2
2
  "nav": {
3
+ "openMenu": "Open menu",
4
+ "catalogue": "Catalogue",
3
5
  "home": "Home",
4
6
  "homeAriaLabel": "Go to homepage",
5
7
  "cartButton": "Open cart | Open cart, {count} item | Open cart, {count} items",
@@ -0,0 +1,27 @@
1
+ {
2
+ "forms": {
3
+ "submit": "Submit",
4
+ "back": "Back",
5
+ "continue": "Continue",
6
+ "step": "Step {current} of {total}",
7
+ "success": "Thank you — your message has arrived.",
8
+ "error": "Something went wrong. Please try again.",
9
+ "rejected": "Your message did not arrive. Please try again, or give us a call.",
10
+ "missingTitle": "This form is not published",
11
+ "missingDescription": "It exists in the Cockpit but has not been set live yet.",
12
+ "honeypotLabel": "Please leave this field empty",
13
+ "contact": {
14
+ "title": "Contact",
15
+ "intro": "A question about an article, an order or a price? Write to us."
16
+ },
17
+ "priceRequest": {
18
+ "title": "Price request",
19
+ "intro": "For one article and one question. A whole cart goes out as a quotation request.",
20
+ "cta": "Request a price"
21
+ },
22
+ "callback": {
23
+ "title": "Request a call back",
24
+ "intro": "Tell us when it suits you and we will call."
25
+ }
26
+ }
27
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@revenexx/cover",
3
- "version": "0.7.0",
3
+ "version": "0.10.1",
4
4
  "description": "Cover \u2014 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",
@@ -26,6 +26,7 @@
26
26
  "./composables/*": "./app/composables/*.ts",
27
27
  "./config/*": "./app/config/*.ts",
28
28
  "./interfaces/*": "./app/interfaces/*.ts",
29
+ "./server/interfaces/*": "./server/interfaces/*.ts",
29
30
  "./server/services/*": "./server/services/*.ts",
30
31
  "./server/utils/*": "./server/utils/*.ts",
31
32
  "./shared/*": "./app/shared/*.ts",
@@ -1,7 +1,7 @@
1
1
  import type { AccountAddressListResponse } from "../../../../app/interfaces/account/address-list";
2
2
 
3
3
  export default defineEventHandler(async (event): Promise<AccountAddressListResponse> => {
4
- assertMasterDataEditable("addresses");
4
+ await assertMasterDataEditable(event, "addresses");
5
5
  const id = getRouterParam(event, "id");
6
6
  if (!id) {
7
7
  throw createError({ statusCode: 400, statusMessage: "Missing address id" });
@@ -26,7 +26,7 @@ function requireString(value: unknown, field: string): string {
26
26
  }
27
27
 
28
28
  export default defineEventHandler(async (event): Promise<AccountAddress> => {
29
- assertMasterDataEditable("addresses");
29
+ await assertMasterDataEditable(event, "addresses");
30
30
  const id = getRouterParam(event, "id");
31
31
  if (!id) {
32
32
  throw createError({ statusCode: 400, statusMessage: "Missing address id" });
@@ -4,7 +4,7 @@ import type {
4
4
  } from "../../../../app/interfaces/account/address-list";
5
5
 
6
6
  export default defineEventHandler(async (event): Promise<AccountAddress> => {
7
- assertMasterDataEditable("addresses");
7
+ await assertMasterDataEditable(event, "addresses");
8
8
  const body = await readBody<AccountAddressFormState>(event);
9
9
 
10
10
  const required = [
@@ -1,11 +1,45 @@
1
1
  import type { OrderList } from "../../../../app/interfaces/account/order-lists";
2
2
 
3
- /** Single order list (own or organization-public). */
3
+ /**
4
+ * Single order list (own or organization-public), with each position told
5
+ * against the catalogue.
6
+ *
7
+ * A list outlives the catalogue it was written from — somebody decided once which
8
+ * seal fits which machine, and everybody has ordered from that decision since. So
9
+ * a part on it may simply be gone, and the buyer who maintains the list is the one
10
+ * who needs to know. Asked here rather than when the list reaches the cart,
11
+ * because by then it is too late to fix the list.
12
+ *
13
+ * Fails soft: an unanswerable catalogue leaves every position unmarked. Claiming a
14
+ * part is discontinued because a call failed would send somebody looking for a
15
+ * replacement they do not need.
16
+ */
17
+ async function withAvailability(event: Parameters<typeof getOffers>[0], list: OrderList): Promise<OrderList> {
18
+ const positions = list.positions ?? [];
19
+ if (positions.length === 0) {
20
+ return list;
21
+ }
22
+ try {
23
+ const offers = await getOffers(
24
+ event,
25
+ positions.map(p => ({ id: p.id, ...(p.sku ? { sku: p.sku } : {}) })),
26
+ );
27
+ return {
28
+ ...list,
29
+ positions: positions.map(p => ({ ...p, available: offers.has(p.id) })),
30
+ };
31
+ }
32
+ catch (err) {
33
+ getLogService().error("Order list availability check failed", toErrorContext(err));
34
+ return list;
35
+ }
36
+ }
37
+
4
38
  export default defineEventHandler(async (event) => {
5
39
  const id = getRouterParam(event, "id") ?? "";
6
40
 
7
41
  if (resolveOrderListServiceKey(event) === "api") {
8
- return await getOrderList(event, id);
42
+ return await withAvailability(event, await getOrderList(event, id));
9
43
  }
10
44
 
11
45
  const user = await getAuthService(event).me(event);
@@ -18,5 +52,5 @@ export default defineEventHandler(async (event) => {
18
52
  if (!list) {
19
53
  throw createError({ statusCode: 404, message: "List not found" });
20
54
  }
21
- return list;
55
+ return await withAvailability(event, list);
22
56
  });
@@ -0,0 +1,54 @@
1
+ /**
2
+ * The buyer calls an order off.
3
+ *
4
+ * Their own order only: the history is already scoped to them and this reads the
5
+ * same way round, so an id belonging to somebody else is a 404 rather than a
6
+ * refusal that confirms it exists.
7
+ *
8
+ * The reason travels where the buyer gave one, and the merchant may require it —
9
+ * `cancel_requires_reason` is theirs to set, and the app answers 400 without one.
10
+ * The shop asks for it up front instead, because a form that could have said so is
11
+ * better than an error that has to.
12
+ */
13
+ export default defineEventHandler(async (event): Promise<{ ok: true }> => {
14
+ const number = getRouterParam(event, "id") ?? "";
15
+ const body = await readBody<{ reason?: string }>(event).catch(() => ({} as { reason?: string }));
16
+
17
+ const user = await getAuthService(event).me(event);
18
+ if (!user) {
19
+ throw createError({ statusCode: 401, message: "Unauthorized" });
20
+ }
21
+ if (resolveOrderServiceKey(event) !== "api") {
22
+ throw createError({ statusCode: 501, message: "This storefront does not cancel orders on demo data" });
23
+ }
24
+
25
+ const order = await getLiveOrderByNumber(number);
26
+ if (!order) {
27
+ throw createError({ statusCode: 404, message: "Order not found" });
28
+ }
29
+ // The same question the history answered, asked again here: a stale page must
30
+ // not be able to cancel what has meanwhile shipped.
31
+ if (!mapLiveOrderToAccount(order).cancellable) {
32
+ throw createError({ statusCode: 422, message: "This order can no longer be cancelled" });
33
+ }
34
+
35
+ const reason = body?.reason?.trim();
36
+ try {
37
+ await useRevenexxSdk().orders.ordersCancel({
38
+ id: order.id,
39
+ ...(reason ? { reason } : {}),
40
+ ...(user.name ? { cancelledBy: user.name } : {}),
41
+ });
42
+ return { ok: true };
43
+ }
44
+ catch (err) {
45
+ // 400 is the merchant requiring a reason the buyer did not give; 422 is the
46
+ // order having moved on since the page was drawn. Both are the buyer's to
47
+ // read, neither is an outage.
48
+ if (err instanceof RevenexxException && [400, 422].includes(err.code)) {
49
+ throw createError({ statusCode: 422, message: err.message });
50
+ }
51
+ getLogService().error(`Cancelling order ${number} failed`, apiErrorContext(err));
52
+ throw createError({ statusCode: 502, message: "Order service unavailable" });
53
+ }
54
+ });