@revenexx/cover 0.2.40 → 0.2.42
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app/api/account.ts +6 -0
- package/app/app.config.ts +9 -0
- package/app/components/account/quotes/AccountQuoteDetail.vue +428 -0
- package/app/components/account/quotes/AccountQuotesTable.vue +157 -0
- package/app/components/cart/quote/CartQuoteRequestModal.vue +146 -0
- package/app/components/cart/view/CartSummaryPanel.vue +27 -0
- package/app/components/cart/view/CartView.vue +28 -1
- package/app/composables/useAccountQuotes.ts +75 -0
- package/app/config/navigation.ts +1 -1
- package/app/config/quickActions.ts +1 -0
- package/app/interfaces/account/quotes.ts +107 -0
- package/app/interfaces/cart-calculation.ts +6 -0
- package/i18n/locales/de/account.json +95 -0
- package/i18n/locales/de/cart.json +21 -0
- package/i18n/locales/en/account.json +95 -0
- package/i18n/locales/en/cart.json +21 -0
- package/package.json +1 -1
- package/server/api/account/quotes/[id]/decline.post.ts +39 -0
- package/server/api/account/quotes/[id]/order.post.ts +153 -0
- package/server/api/account/quotes/[id].get.ts +11 -0
- package/server/api/account/quotes.get.ts +26 -0
- package/server/api/quotes/request.post.ts +176 -0
- package/server/data/account/quotes.json +34 -0
- package/server/utils/quotesService.ts +274 -0
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
/**
|
|
3
|
+
* Send the cart in as a quotation request (RX-783).
|
|
4
|
+
*
|
|
5
|
+
* Opened from a cart message that carries the `request-quote` action — a
|
|
6
|
+
* consignment over the parcel limit is the case that brought it in. The buyer
|
|
7
|
+
* picks where the goods go and where the invoice goes, from their own address
|
|
8
|
+
* book: the carriage is priced for that address, and the order the quote
|
|
9
|
+
* becomes goes to the same one. Selection only — which addresses exist is the
|
|
10
|
+
* merchant's master data.
|
|
11
|
+
*/
|
|
12
|
+
const open = defineModel<boolean>("open", { default: false });
|
|
13
|
+
const props = defineProps<{
|
|
14
|
+
/** Why the cart is being quoted, carried onto the request. */
|
|
15
|
+
reason?: string;
|
|
16
|
+
}>();
|
|
17
|
+
|
|
18
|
+
const { icon } = useIcons();
|
|
19
|
+
const { t } = useI18n();
|
|
20
|
+
const localePath = useLocalePath();
|
|
21
|
+
const toast = useToast();
|
|
22
|
+
const cart = useCartStore();
|
|
23
|
+
const { request, submitting } = useQuoteRequest();
|
|
24
|
+
const { data: profile, status: profileStatus } = useCheckoutProfileSource();
|
|
25
|
+
|
|
26
|
+
const shippingAddressId = ref("");
|
|
27
|
+
const billingAddressId = ref("");
|
|
28
|
+
const note = ref("");
|
|
29
|
+
|
|
30
|
+
watch(profile, (p) => {
|
|
31
|
+
if (!p) return;
|
|
32
|
+
shippingAddressId.value ||= p.defaultShippingAddressId || p.addresses[0]?.id || "";
|
|
33
|
+
billingAddressId.value ||= p.defaultBillingAddressId || p.addresses[0]?.id || "";
|
|
34
|
+
}, { immediate: true });
|
|
35
|
+
|
|
36
|
+
const addressItems = computed(() => (profile.value?.addresses ?? []).map(a => ({
|
|
37
|
+
value: a.id,
|
|
38
|
+
label: [a.companyName, a.street, `${a.postalCode} ${a.city}`.trim(), a.country].filter(Boolean).join(", "),
|
|
39
|
+
})));
|
|
40
|
+
|
|
41
|
+
const canSubmit = computed(() => Boolean(shippingAddressId.value && billingAddressId.value) && !cart.isEmpty);
|
|
42
|
+
|
|
43
|
+
async function submit(): Promise<void> {
|
|
44
|
+
try {
|
|
45
|
+
const result = await request({
|
|
46
|
+
items: cart.items.filter(i => !i.requisitionId).map(i => ({
|
|
47
|
+
id: String(i.id),
|
|
48
|
+
sku: i.sku,
|
|
49
|
+
name: i.name,
|
|
50
|
+
quantity: i.quantity,
|
|
51
|
+
price: i.price,
|
|
52
|
+
...(i.image ? { image: i.image } : {}),
|
|
53
|
+
})),
|
|
54
|
+
shippingAddressId: shippingAddressId.value,
|
|
55
|
+
billingAddressId: billingAddressId.value,
|
|
56
|
+
...(note.value.trim() ? { note: note.value.trim() } : {}),
|
|
57
|
+
...(props.reason ? { reason: props.reason } : {}),
|
|
58
|
+
});
|
|
59
|
+
// The server handed the cart over to the quote; the local copy follows.
|
|
60
|
+
cart.clearCart();
|
|
61
|
+
open.value = false;
|
|
62
|
+
toast.add({
|
|
63
|
+
title: t("cart.quote.success", { number: result.number }),
|
|
64
|
+
description: t("cart.quote.successDescription"),
|
|
65
|
+
color: "success",
|
|
66
|
+
icon: icon("success"),
|
|
67
|
+
});
|
|
68
|
+
await navigateTo(localePath(`/account/quotes/${result.id}`));
|
|
69
|
+
}
|
|
70
|
+
catch (err) {
|
|
71
|
+
const message = (err as { data?: { message?: string } })?.data?.message;
|
|
72
|
+
toast.add({ title: t("cart.quote.failed"), description: message, color: "error", icon: icon("error") });
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
</script>
|
|
76
|
+
|
|
77
|
+
<template>
|
|
78
|
+
<UModal
|
|
79
|
+
v-model:open="open"
|
|
80
|
+
:title="t('cart.quote.title')"
|
|
81
|
+
:description="t('cart.quote.description')"
|
|
82
|
+
>
|
|
83
|
+
<template #body>
|
|
84
|
+
<USkeleton
|
|
85
|
+
v-if="profileStatus === 'pending'"
|
|
86
|
+
class="h-32 w-full"
|
|
87
|
+
/>
|
|
88
|
+
<div
|
|
89
|
+
v-else
|
|
90
|
+
class="space-y-4"
|
|
91
|
+
>
|
|
92
|
+
<UFormField
|
|
93
|
+
:label="t('cart.quote.shippingAddress')"
|
|
94
|
+
:hint="t('cart.quote.shippingAddressHint')"
|
|
95
|
+
required
|
|
96
|
+
>
|
|
97
|
+
<USelect
|
|
98
|
+
v-model="shippingAddressId"
|
|
99
|
+
:items="addressItems"
|
|
100
|
+
class="w-full"
|
|
101
|
+
/>
|
|
102
|
+
</UFormField>
|
|
103
|
+
<UFormField
|
|
104
|
+
:label="t('cart.quote.billingAddress')"
|
|
105
|
+
required
|
|
106
|
+
>
|
|
107
|
+
<USelect
|
|
108
|
+
v-model="billingAddressId"
|
|
109
|
+
:items="addressItems"
|
|
110
|
+
class="w-full"
|
|
111
|
+
/>
|
|
112
|
+
</UFormField>
|
|
113
|
+
<UFormField :label="t('cart.quote.note')">
|
|
114
|
+
<UTextarea
|
|
115
|
+
v-model="note"
|
|
116
|
+
class="w-full"
|
|
117
|
+
:rows="3"
|
|
118
|
+
:placeholder="t('cart.quote.notePlaceholder')"
|
|
119
|
+
/>
|
|
120
|
+
</UFormField>
|
|
121
|
+
<ul class="text-xs text-muted space-y-1 list-disc ps-4">
|
|
122
|
+
<li>{{ t('cart.quote.steps.price') }}</li>
|
|
123
|
+
<li>{{ t('cart.quote.steps.notify') }}</li>
|
|
124
|
+
<li>{{ t('cart.quote.steps.order') }}</li>
|
|
125
|
+
</ul>
|
|
126
|
+
</div>
|
|
127
|
+
</template>
|
|
128
|
+
<template #footer>
|
|
129
|
+
<div class="flex items-center justify-end gap-2 w-full">
|
|
130
|
+
<UButton
|
|
131
|
+
color="neutral"
|
|
132
|
+
variant="ghost"
|
|
133
|
+
:label="t('cart.quote.cancel')"
|
|
134
|
+
@click="open = false"
|
|
135
|
+
/>
|
|
136
|
+
<UButton
|
|
137
|
+
color="primary"
|
|
138
|
+
:loading="submitting"
|
|
139
|
+
:disabled="!canSubmit"
|
|
140
|
+
:label="t('cart.quote.submit')"
|
|
141
|
+
@click="submit"
|
|
142
|
+
/>
|
|
143
|
+
</div>
|
|
144
|
+
</template>
|
|
145
|
+
</UModal>
|
|
146
|
+
</template>
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import CartApprovalsPanel from "./CartApprovalsPanel.vue";
|
|
3
3
|
import CartWorkflowPickerModal from "../actions/CartWorkflowPickerModal.vue";
|
|
4
4
|
import PunchoutTransferAction from "../../punchout/action/PunchoutTransferAction.vue";
|
|
5
|
+
import CartQuoteRequestModal from "../quote/CartQuoteRequestModal.vue";
|
|
5
6
|
|
|
6
7
|
/**
|
|
7
8
|
* Cart summary 2.0: the calculated totals block in document order, the
|
|
@@ -40,6 +41,12 @@ const totals = computed(() =>
|
|
|
40
41
|
const isRequester = computed(() => role.value === "requester");
|
|
41
42
|
const orderable = computed(() => calculation.value?.orderable ?? true);
|
|
42
43
|
|
|
44
|
+
// A cart the shop cannot order as it is, but can quote (RX-783): the checkout
|
|
45
|
+
// button becomes the quotation request, because that is the one way on.
|
|
46
|
+
const quoteMessage = computed(() =>
|
|
47
|
+
(calculation.value?.messages ?? []).find(message => message.action === "request-quote") ?? null);
|
|
48
|
+
const quoteOpen = ref(false);
|
|
49
|
+
|
|
43
50
|
/* ---- CTA (spec 5 / 5a) -------------------------------------------- */
|
|
44
51
|
const workflowModalOpen = ref(false);
|
|
45
52
|
const noWorkflowModalOpen = ref(false);
|
|
@@ -228,6 +235,26 @@ const trustItems = computed(() => {
|
|
|
228
235
|
<CartApprovalsPanel :limits="calculation?.approvalLimits ?? []" />
|
|
229
236
|
|
|
230
237
|
<PunchoutTransferAction v-if="isPunchout" />
|
|
238
|
+
<template v-else-if="quoteMessage">
|
|
239
|
+
<UButton
|
|
240
|
+
color="primary"
|
|
241
|
+
variant="solid"
|
|
242
|
+
size="lg"
|
|
243
|
+
class="w-full justify-center mt-2"
|
|
244
|
+
:icon="icon('file')"
|
|
245
|
+
:loading="pending"
|
|
246
|
+
:label="t('cart.quote.action')"
|
|
247
|
+
tabindex="0"
|
|
248
|
+
@click="quoteOpen = true"
|
|
249
|
+
/>
|
|
250
|
+
<p class="text-xs text-muted text-center">
|
|
251
|
+
{{ t('cart.quote.ctaHint') }}
|
|
252
|
+
</p>
|
|
253
|
+
<CartQuoteRequestModal
|
|
254
|
+
v-model:open="quoteOpen"
|
|
255
|
+
:reason="quoteMessage.code"
|
|
256
|
+
/>
|
|
257
|
+
</template>
|
|
231
258
|
<template v-else>
|
|
232
259
|
<UButton
|
|
233
260
|
color="primary"
|
|
@@ -9,6 +9,7 @@ import CartSaveToListModal from "../actions/CartSaveToListModal.vue";
|
|
|
9
9
|
import AccountDirectOrder from "../../account/directorder/AccountDirectOrder.vue";
|
|
10
10
|
import CartQuickAdd from "../quickadd/CartQuickAdd.vue";
|
|
11
11
|
import CartCrossSell from "../recommend/CartCrossSell.vue";
|
|
12
|
+
import CartQuoteRequestModal from "../quote/CartQuoteRequestModal.vue";
|
|
12
13
|
import CartReorderStrip from "../recommend/CartReorderStrip.vue";
|
|
13
14
|
import CartRequisitionGroup from "../requisition/CartRequisitionGroup.vue";
|
|
14
15
|
import CartListHeader from "./CartListHeader.vue";
|
|
@@ -60,6 +61,25 @@ const itemsByRequisition = computed(() => {
|
|
|
60
61
|
watch(items, () => selection.prune(), { deep: true });
|
|
61
62
|
|
|
62
63
|
const quickAddOpen = ref(false);
|
|
64
|
+
const quoteOpen = ref(false);
|
|
65
|
+
const quoteReason = ref<string | undefined>(undefined);
|
|
66
|
+
|
|
67
|
+
/** The button a message carries, when it carries one. */
|
|
68
|
+
function messageActions(message: { code: string; action?: string }) {
|
|
69
|
+
if (message.action !== "request-quote") {
|
|
70
|
+
return undefined;
|
|
71
|
+
}
|
|
72
|
+
return [{
|
|
73
|
+
label: t("cart.quote.action"),
|
|
74
|
+
color: "primary" as const,
|
|
75
|
+
variant: "solid" as const,
|
|
76
|
+
icon: icon("file"),
|
|
77
|
+
onClick: () => {
|
|
78
|
+
quoteReason.value = message.code;
|
|
79
|
+
quoteOpen.value = true;
|
|
80
|
+
},
|
|
81
|
+
}];
|
|
82
|
+
}
|
|
63
83
|
|
|
64
84
|
/* ---- loadable requisitions (orderer side, spec: hinzufügen) -------- */
|
|
65
85
|
const canLoadRequisitions = computed(() =>
|
|
@@ -126,8 +146,10 @@ const messageColor = (severity: string) =>
|
|
|
126
146
|
:key="message.code"
|
|
127
147
|
:color="messageColor(message.severity)"
|
|
128
148
|
variant="soft"
|
|
129
|
-
:icon="icon(message.severity === 'error' ? 'error' : 'warning')"
|
|
149
|
+
:icon="icon(message.severity === 'error' ? 'error' : message.severity === 'info' ? 'info' : 'warning')"
|
|
130
150
|
:title="t(message.messageKey, message.params ?? {})"
|
|
151
|
+
:actions="messageActions(message)"
|
|
152
|
+
orientation="horizontal"
|
|
131
153
|
/>
|
|
132
154
|
</div>
|
|
133
155
|
|
|
@@ -327,5 +349,10 @@ const messageColor = (severity: string) =>
|
|
|
327
349
|
/>
|
|
328
350
|
</template>
|
|
329
351
|
</UModal>
|
|
352
|
+
|
|
353
|
+
<CartQuoteRequestModal
|
|
354
|
+
v-model:open="quoteOpen"
|
|
355
|
+
:reason="quoteReason"
|
|
356
|
+
/>
|
|
330
357
|
</UContainer>
|
|
331
358
|
</template>
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { accountApi } from "../api/account";
|
|
2
|
+
import type {
|
|
3
|
+
AccountQuote,
|
|
4
|
+
AccountQuoteListResponse,
|
|
5
|
+
QuoteOrderPayload,
|
|
6
|
+
QuoteOrderResult,
|
|
7
|
+
QuoteRequestPayload,
|
|
8
|
+
QuoteRequestResult,
|
|
9
|
+
} from "../interfaces/account/quotes";
|
|
10
|
+
|
|
11
|
+
/** The buyer's quotes, newest first (RX-783). */
|
|
12
|
+
export const useAccountQuotes = () => {
|
|
13
|
+
const { data, status, error, refresh } = useFetch<AccountQuoteListResponse>(accountApi.quotes(), {
|
|
14
|
+
key: "account-quotes",
|
|
15
|
+
default: () => ({ quotes: [] as AccountQuote[], total: 0 }),
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
const quotes = computed(() => data.value.quotes);
|
|
19
|
+
/** Priced and waiting on the buyer — what the dashboard and the menu point at. */
|
|
20
|
+
const waiting = computed(() => quotes.value.filter(q => q.canOrder));
|
|
21
|
+
|
|
22
|
+
return { quotes, waiting, status, error, refresh };
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
/** One quote, with the two answers a buyer can give. */
|
|
26
|
+
export const useAccountQuote = (id: string) => {
|
|
27
|
+
const { data: quote, status, error, refresh } = useFetch<AccountQuote>(accountApi.quote(id), {
|
|
28
|
+
key: `account-quote:${id}`,
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
const ordering = ref(false);
|
|
32
|
+
const declining = ref(false);
|
|
33
|
+
|
|
34
|
+
async function order(payload: QuoteOrderPayload): Promise<QuoteOrderResult> {
|
|
35
|
+
ordering.value = true;
|
|
36
|
+
try {
|
|
37
|
+
const result = await $fetch<QuoteOrderResult>(accountApi.quoteOrder(id), { method: "POST", body: payload });
|
|
38
|
+
await refresh();
|
|
39
|
+
return result;
|
|
40
|
+
}
|
|
41
|
+
finally {
|
|
42
|
+
ordering.value = false;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
async function decline(reason?: string): Promise<void> {
|
|
47
|
+
declining.value = true;
|
|
48
|
+
try {
|
|
49
|
+
await $fetch(accountApi.quoteDecline(id), { method: "POST", body: reason ? { reason } : {} });
|
|
50
|
+
await refresh();
|
|
51
|
+
}
|
|
52
|
+
finally {
|
|
53
|
+
declining.value = false;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
return { quote, status, error, refresh, order, decline, ordering, declining };
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
/** Send the active cart in as a quotation request. */
|
|
61
|
+
export const useQuoteRequest = () => {
|
|
62
|
+
const submitting = ref(false);
|
|
63
|
+
|
|
64
|
+
async function request(payload: QuoteRequestPayload): Promise<QuoteRequestResult> {
|
|
65
|
+
submitting.value = true;
|
|
66
|
+
try {
|
|
67
|
+
return await $fetch<QuoteRequestResult>(accountApi.quoteRequest(), { method: "POST", body: payload });
|
|
68
|
+
}
|
|
69
|
+
finally {
|
|
70
|
+
submitting.value = false;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
return { request, submitting };
|
|
75
|
+
};
|
package/app/config/navigation.ts
CHANGED
|
@@ -145,7 +145,7 @@ export const accountNavigation: AccountNavGroup[] = [
|
|
|
145
145
|
labelKey: "account.nav.groups.orders",
|
|
146
146
|
links: [
|
|
147
147
|
{ labelKey: "account.nav.inquiries", icon: "mail", to: "/account/inquiries" },
|
|
148
|
-
{ labelKey: "account.nav.quotes", icon: "file", to: "/account/quotes" },
|
|
148
|
+
{ labelKey: "account.nav.quotes", icon: "file", to: "/account/quotes", implemented: true },
|
|
149
149
|
{ labelKey: "account.nav.orders", icon: "orders", to: "/account/orders", implemented: true },
|
|
150
150
|
{ labelKey: "account.nav.deliveries", icon: "delivery", to: "/account/deliveries" },
|
|
151
151
|
{ labelKey: "account.nav.subscriptions", icon: "calendar", to: "/account/subscriptions" },
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import type { Address } from "../address";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* A quote as the buyer's account shows it (RX-783).
|
|
5
|
+
*
|
|
6
|
+
* The quotes app keeps the merchant's side too — owner, internal notes,
|
|
7
|
+
* revisions — none of which a buyer reads, so this contract is the customer's
|
|
8
|
+
* reading only. Amounts are net; the order the quote becomes adds the tax.
|
|
9
|
+
*/
|
|
10
|
+
export type AccountQuoteStatus =
|
|
11
|
+
| "requested"
|
|
12
|
+
| "in_review"
|
|
13
|
+
| "quoted"
|
|
14
|
+
| "accepted"
|
|
15
|
+
| "partially_accepted"
|
|
16
|
+
| "declined"
|
|
17
|
+
| "rejected"
|
|
18
|
+
| "expired";
|
|
19
|
+
|
|
20
|
+
export interface AccountQuoteLine {
|
|
21
|
+
id: string;
|
|
22
|
+
productId: string | null;
|
|
23
|
+
sku: string;
|
|
24
|
+
name: string;
|
|
25
|
+
quantity: number;
|
|
26
|
+
unit: string | null;
|
|
27
|
+
/** Catalogue price when asked; kept beside the quoted one. */
|
|
28
|
+
listPrice: number | null;
|
|
29
|
+
/** The negotiated price, once the merchant set one. */
|
|
30
|
+
quotedPrice: number | null;
|
|
31
|
+
/** What this line costs per unit now: quoted, else list. */
|
|
32
|
+
unitPrice: number | null;
|
|
33
|
+
lineTotal: number;
|
|
34
|
+
taxRate: number | null;
|
|
35
|
+
decision: "open" | "accepted" | "declined";
|
|
36
|
+
orderId: string | null;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/** One entry of the trail the customer may read. */
|
|
40
|
+
export interface AccountQuoteNote {
|
|
41
|
+
kind: string;
|
|
42
|
+
actor: string | null;
|
|
43
|
+
body: string | null;
|
|
44
|
+
at: string;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export interface AccountQuote {
|
|
48
|
+
id: string;
|
|
49
|
+
number: string;
|
|
50
|
+
status: AccountQuoteStatus;
|
|
51
|
+
createdAt: string;
|
|
52
|
+
quotedAt: string | null;
|
|
53
|
+
validUntil: string | null;
|
|
54
|
+
currency: string;
|
|
55
|
+
listTotal: number;
|
|
56
|
+
/** The goods at the prices that apply. */
|
|
57
|
+
goodsTotal: number;
|
|
58
|
+
/** Quoted carriage, net; null while the merchant has not priced it. */
|
|
59
|
+
shippingAmount: number | null;
|
|
60
|
+
shippingTaxRate: number | null;
|
|
61
|
+
/** Goods + carriage, net. */
|
|
62
|
+
grandTotal: number;
|
|
63
|
+
reason: string | null;
|
|
64
|
+
buyerNote: string | null;
|
|
65
|
+
sellerNote: string | null;
|
|
66
|
+
shippingAddress: Partial<Address> | null;
|
|
67
|
+
billingAddress: Partial<Address> | null;
|
|
68
|
+
lines: AccountQuoteLine[];
|
|
69
|
+
trail: AccountQuoteNote[];
|
|
70
|
+
/** Orders placed out of this quote. */
|
|
71
|
+
orderIds: string[];
|
|
72
|
+
/** Priced, still valid, something left to accept. */
|
|
73
|
+
canOrder: boolean;
|
|
74
|
+
canDecline: boolean;
|
|
75
|
+
expired: boolean;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export interface AccountQuoteListResponse {
|
|
79
|
+
quotes: AccountQuote[];
|
|
80
|
+
total: number;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/** What the cart sends to turn itself into a quotation request. */
|
|
84
|
+
export interface QuoteRequestPayload {
|
|
85
|
+
items: Array<{ id: string; sku?: string; name?: string; quantity: number; price?: number; image?: string }>;
|
|
86
|
+
shippingAddressId: string;
|
|
87
|
+
billingAddressId: string;
|
|
88
|
+
note?: string;
|
|
89
|
+
/** Why the cart could not be ordered as it is, e.g. "shipping-on-request". */
|
|
90
|
+
reason?: string;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export interface QuoteRequestResult {
|
|
94
|
+
id: string;
|
|
95
|
+
number: string;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export interface QuoteOrderPayload {
|
|
99
|
+
/** The buyer's own order reference. */
|
|
100
|
+
customerOrderNumber?: string;
|
|
101
|
+
orderNote?: string;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export interface QuoteOrderResult {
|
|
105
|
+
orderId: string;
|
|
106
|
+
orderNumber: string;
|
|
107
|
+
}
|
|
@@ -96,6 +96,12 @@ export interface CartMessage {
|
|
|
96
96
|
/** i18n key into the cart namespace. */
|
|
97
97
|
messageKey: string;
|
|
98
98
|
params?: Record<string, string | number>;
|
|
99
|
+
/**
|
|
100
|
+
* What the buyer can do about it, rendered as a button on the message.
|
|
101
|
+
* `request-quote` sends the cart in as a quotation request instead of
|
|
102
|
+
* ordering it (RX-783) — a consignment the shop cannot price as it is.
|
|
103
|
+
*/
|
|
104
|
+
action?: "request-quote";
|
|
99
105
|
}
|
|
100
106
|
|
|
101
107
|
export interface CartCalculationRequest {
|
|
@@ -246,6 +246,7 @@
|
|
|
246
246
|
"directOrder": { "title": "Schnellerfassung", "description": "Artikelnummern direkt erfassen" },
|
|
247
247
|
"orderLists": { "description": "Wiederkehrende Bedarfe" },
|
|
248
248
|
"orders": { "description": "Status & Nachbestellung" },
|
|
249
|
+
"quotes": { "description": "Angebote ansehen und bestellen" },
|
|
249
250
|
"cart": { "description": "Zur Kasse" },
|
|
250
251
|
"dashboard": { "description": "Ihr Konto auf einen Blick" },
|
|
251
252
|
"carts": { "description": "Gespeicherte Warenkörbe" },
|
|
@@ -566,5 +567,99 @@
|
|
|
566
567
|
"title": "Keine Benutzer",
|
|
567
568
|
"description": "Laden Sie über „Benutzer einladen“ den ersten Benutzer ein."
|
|
568
569
|
}
|
|
570
|
+
},
|
|
571
|
+
"quotes": {
|
|
572
|
+
"title": "Angebote",
|
|
573
|
+
"description": "Ihre Angebotsanfragen und die Angebote, die wir Ihnen dazu gemacht haben.",
|
|
574
|
+
"searchPlaceholder": "Angebotsnummer suchen",
|
|
575
|
+
"errorTitle": "Angebote konnten nicht geladen werden",
|
|
576
|
+
"errorDescription": "Bitte versuchen Sie es später erneut.",
|
|
577
|
+
"notFound": "Dieses Angebot gibt es nicht (mehr).",
|
|
578
|
+
"shippingPending": "Fracht wird kalkuliert",
|
|
579
|
+
"filter": {
|
|
580
|
+
"waiting": "Wartet auf Sie"
|
|
581
|
+
},
|
|
582
|
+
"columns": {
|
|
583
|
+
"number": "Angebot",
|
|
584
|
+
"date": "Angefragt am",
|
|
585
|
+
"status": "Status",
|
|
586
|
+
"validUntil": "Gültig bis",
|
|
587
|
+
"total": "Gesamt (netto)"
|
|
588
|
+
},
|
|
589
|
+
"status": {
|
|
590
|
+
"requested": "Angefragt",
|
|
591
|
+
"in_review": "In Bearbeitung",
|
|
592
|
+
"quoted": "Angebot liegt vor",
|
|
593
|
+
"partially_accepted": "Teilweise bestellt",
|
|
594
|
+
"accepted": "Bestellt",
|
|
595
|
+
"declined": "Abgelehnt",
|
|
596
|
+
"rejected": "Nicht angeboten",
|
|
597
|
+
"expired": "Abgelaufen"
|
|
598
|
+
},
|
|
599
|
+
"empty": {
|
|
600
|
+
"title": "Noch keine Angebote",
|
|
601
|
+
"description": "Wenn ein Warenkorb nicht direkt bestellbar ist – etwa weil die Sendung das Paketmaß überschreitet –, können Sie im Warenkorb ein Angebot anfordern."
|
|
602
|
+
},
|
|
603
|
+
"actions": {
|
|
604
|
+
"review": "Ansehen & bestellen",
|
|
605
|
+
"open": "Öffnen",
|
|
606
|
+
"order": "Zum Angebotspreis bestellen ({total})",
|
|
607
|
+
"decline": "Angebot ablehnen"
|
|
608
|
+
},
|
|
609
|
+
"detail": {
|
|
610
|
+
"requestedAt": "Angefragt am",
|
|
611
|
+
"validUntil": "Gültig bis",
|
|
612
|
+
"total": "Gesamt (netto)",
|
|
613
|
+
"positions": "Positionen",
|
|
614
|
+
"goods": "Ware",
|
|
615
|
+
"carriage": "Fracht",
|
|
616
|
+
"totalNet": "Gesamt (netto)",
|
|
617
|
+
"taxHint": "Zzgl. gesetzlicher Mehrwertsteuer. Die Bestellung weist die Steuer aus.",
|
|
618
|
+
"shippingAddress": "Lieferadresse",
|
|
619
|
+
"billingAddress": "Rechnungsadresse",
|
|
620
|
+
"buyerNote": "Ihre Nachricht",
|
|
621
|
+
"sellerNote": "Nachricht von uns",
|
|
622
|
+
"trail": "Verlauf",
|
|
623
|
+
"onRequest": "auf Anfrage",
|
|
624
|
+
"hint": {
|
|
625
|
+
"ready": "Ihr Angebot liegt vor. Sie können es bis zum {date} zu diesen Konditionen bestellen.",
|
|
626
|
+
"pending": "Wir kalkulieren die Fracht für Ihre Sendung und melden uns per E-Mail, sobald das Angebot vorliegt.",
|
|
627
|
+
"expired": "Dieses Angebot ist abgelaufen. Fordern Sie bei Bedarf ein neues an.",
|
|
628
|
+
"rejected": "Wir können hierzu leider kein Angebot machen: {reason}",
|
|
629
|
+
"ordered": "Dieses Angebot wurde bestellt."
|
|
630
|
+
}
|
|
631
|
+
},
|
|
632
|
+
"trail": {
|
|
633
|
+
"requested": "Angefragt",
|
|
634
|
+
"quoted": "Angebot erstellt",
|
|
635
|
+
"accepted": "Angenommen",
|
|
636
|
+
"partially_accepted": "Teilweise angenommen",
|
|
637
|
+
"declined": "Abgelehnt",
|
|
638
|
+
"rejected": "Nicht angeboten",
|
|
639
|
+
"ordered": "Bestellt",
|
|
640
|
+
"expired": "Abgelaufen",
|
|
641
|
+
"note": "Nachricht"
|
|
642
|
+
},
|
|
643
|
+
"order": {
|
|
644
|
+
"title": "Angebot {number} bestellen",
|
|
645
|
+
"intro": "Sie bestellen alle Positionen zu den angebotenen Preisen inklusive Fracht – insgesamt {total} netto, an die Lieferadresse aus dem Angebot. Bezahlt wird per Rechnung.",
|
|
646
|
+
"customerOrderNumber": "Ihre Bestellnummer (optional)",
|
|
647
|
+
"customerOrderNumberPlaceholder": "z. B. PO-2026-0815",
|
|
648
|
+
"note": "Anmerkung zur Bestellung (optional)",
|
|
649
|
+
"terms": "Mit Ihrer Bestellung gelten unsere AGB.",
|
|
650
|
+
"cancel": "Abbrechen",
|
|
651
|
+
"submit": "Verbindlich bestellen",
|
|
652
|
+
"success": "Bestellung {number} aufgegeben",
|
|
653
|
+
"failed": "Bestellung fehlgeschlagen"
|
|
654
|
+
},
|
|
655
|
+
"decline": {
|
|
656
|
+
"title": "Angebot ablehnen",
|
|
657
|
+
"reason": "Warum? (optional)",
|
|
658
|
+
"reasonPlaceholder": "Hilft uns, Ihnen beim nächsten Mal ein passendes Angebot zu machen.",
|
|
659
|
+
"cancel": "Abbrechen",
|
|
660
|
+
"submit": "Ablehnen",
|
|
661
|
+
"success": "Angebot abgelehnt",
|
|
662
|
+
"failed": "Ablehnen fehlgeschlagen"
|
|
663
|
+
}
|
|
569
664
|
}
|
|
570
665
|
}
|
|
@@ -215,6 +215,27 @@
|
|
|
215
215
|
"delivery": "Bis 16:00 Uhr bestellt – am nächsten Werktag geliefert",
|
|
216
216
|
"invoice": "Kauf auf Rechnung für Geschäftskunden",
|
|
217
217
|
"support": "Persönliches Service-Team, werktags 8–17 Uhr"
|
|
218
|
+
},
|
|
219
|
+
"quote": {
|
|
220
|
+
"action": "Angebot anfordern",
|
|
221
|
+
"ctaHint": "Versand auf Anfrage – wir kalkulieren die Fracht, bestellt wird anschließend aus Ihrem Kundenkonto.",
|
|
222
|
+
"title": "Angebot anfordern",
|
|
223
|
+
"description": "Wir kalkulieren die Fracht für Ihre Sendung und schicken Ihnen ein Angebot.",
|
|
224
|
+
"shippingAddress": "Lieferadresse",
|
|
225
|
+
"shippingAddressHint": "Dafür kalkulieren wir die Fracht",
|
|
226
|
+
"billingAddress": "Rechnungsadresse",
|
|
227
|
+
"note": "Nachricht an uns (optional)",
|
|
228
|
+
"notePlaceholder": "z. B. gewünschter Liefertermin, Anlieferung mit Hebebühne …",
|
|
229
|
+
"steps": {
|
|
230
|
+
"price": "Wir kalkulieren die Fracht und erstellen Ihnen ein Angebot.",
|
|
231
|
+
"notify": "Sie erhalten eine E-Mail, sobald das Angebot vorliegt.",
|
|
232
|
+
"order": "Sie bestellen es in Ihrem Kundenkonto unter „Angebote“ mit einem Klick."
|
|
233
|
+
},
|
|
234
|
+
"cancel": "Abbrechen",
|
|
235
|
+
"submit": "Angebot anfordern",
|
|
236
|
+
"success": "Anfrage {number} ist bei uns",
|
|
237
|
+
"successDescription": "Ihr Warenkorb wurde in die Anfrage übernommen.",
|
|
238
|
+
"failed": "Anfrage fehlgeschlagen"
|
|
218
239
|
}
|
|
219
240
|
},
|
|
220
241
|
"calc": {
|