@revenexx/cover 0.2.17 → 0.2.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app/components/account/address/AccountAddressView.vue +433 -0
- package/app/components/account/dashboard/AccountDashboard.vue +10 -330
- package/app/components/account/dashboard/AccountDashboardBudgets.vue +71 -0
- package/app/components/account/dashboard/AccountDashboardGreeting.vue +17 -0
- package/app/components/account/dashboard/AccountDashboardKpis.vue +71 -0
- package/app/components/account/dashboard/AccountDashboardQuickActions.vue +36 -0
- package/app/components/account/dashboard/AccountDashboardRecentOrders.vue +70 -0
- package/app/components/account/dashboard/AccountDashboardRequisitions.vue +60 -0
- package/app/components/account/profile/AccountPasswordForm.vue +155 -0
- package/app/components/account/profile/AccountProfileForm.vue +159 -0
- package/app/components/auth/AuthLoginTeaser.vue +1 -1
- package/app/components/auth/AuthRegisterPanel.vue +123 -119
- package/app/components/cart/position/CartPosition.vue +26 -17
- package/app/components/cart/recommend/CartReorderStrip.vue +27 -12
- package/app/components/cart/view/CartView.vue +1 -8
- package/app/components/checkout/confirmation/CheckoutConfirmationActions.vue +52 -0
- package/app/components/checkout/confirmation/CheckoutConfirmationHero.vue +41 -0
- package/app/components/checkout/confirmation/CheckoutConfirmationNextSteps.vue +60 -0
- package/app/components/checkout/confirmation/CheckoutConfirmationOrderRecap.vue +102 -0
- package/app/components/checkout/confirmation/CheckoutConfirmationView.vue +30 -265
- package/app/components/listing/ListingActiveFilters.vue +59 -0
- package/app/components/listing/ListingFilterBar.vue +24 -0
- package/app/components/listing/ListingFilterDrawer.vue +72 -0
- package/app/components/listing/ListingFilterRail.vue +23 -0
- package/app/components/listing/ListingResults.vue +88 -0
- package/app/components/listing/ListingToolbar.vue +46 -0
- package/app/components/listing/ListingView.vue +14 -204
- package/app/components/product/detail/ProductDetailIdentity.vue +44 -0
- package/app/components/product/detail/ProductDetailPrice.vue +39 -0
- package/app/components/search/filter/SearchFacets.vue +12 -102
- package/app/components/search/filter/SearchFacetsBar.vue +161 -0
- package/app/composables/useAccountDashboard.ts +112 -0
- package/app/composables/useCategoryListing.ts +92 -0
- package/app/composables/useCheckoutConfirmation.ts +63 -0
- package/app/composables/useFacetFilters.ts +122 -0
- package/app/composables/useProduct.ts +11 -0
- package/app/composables/useProductListing.ts +5 -1
- package/app/composables/useSearchListing.ts +71 -0
- package/app/interfaces/checkout.ts +27 -0
- package/i18n/locales/de/auth.json +1 -1
- package/i18n/locales/de/editor.json +33 -0
- package/i18n/locales/en/editor.json +33 -0
- package/package.json +1 -1
- package/server/data/media/60794300.jpg +0 -0
- package/server/data/media/aussen-rueckwaertsdrehen.jpg +0 -0
- package/server/data/media/bohrtiefe-8.jpg +0 -0
- package/server/data/media/dummy-brw-image.png +0 -0
- package/server/data/media/feindrehen.jpg +0 -0
- package/server/data/media/header-aktuelles.jpg +0 -0
- package/server/data/media/sternsiebeinsatz-gr-3-000028480.stp +19039 -0
- package/server/data/media/zaehnezahl-z4.jpg +0 -0
- package/server/data/media/zaehnezahl-z6.jpg +0 -0
- package/server/services/ApiProductService.ts +4 -1
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
/**
|
|
3
|
+
* Account password card — read/edit view of the password fields. Self-contained
|
|
4
|
+
* demo UI: there is no password BFF endpoint yet, so submit is a no-op; the
|
|
5
|
+
* card only toggles between the masked read view and the edit form.
|
|
6
|
+
*/
|
|
7
|
+
const { icon } = useIcons();
|
|
8
|
+
const { t } = useI18n();
|
|
9
|
+
|
|
10
|
+
const isEditing = ref(false);
|
|
11
|
+
|
|
12
|
+
const passwordState = reactive({
|
|
13
|
+
currentPassword: "",
|
|
14
|
+
newPassword: "",
|
|
15
|
+
confirmNewPassword: "",
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
function toggleEdit() {
|
|
19
|
+
if (isEditing.value) {
|
|
20
|
+
passwordState.currentPassword = "";
|
|
21
|
+
passwordState.newPassword = "";
|
|
22
|
+
passwordState.confirmNewPassword = "";
|
|
23
|
+
}
|
|
24
|
+
isEditing.value = !isEditing.value;
|
|
25
|
+
}
|
|
26
|
+
</script>
|
|
27
|
+
|
|
28
|
+
<template>
|
|
29
|
+
<UCard>
|
|
30
|
+
<template #header>
|
|
31
|
+
<div class="flex items-start justify-between">
|
|
32
|
+
<div class="space-y-1">
|
|
33
|
+
<h2 class="text-base font-semibold text-highlighted">
|
|
34
|
+
{{ t('auth.resetPassword.title') }}
|
|
35
|
+
</h2>
|
|
36
|
+
<p class="text-sm text-muted">
|
|
37
|
+
{{ t('auth.resetPassword.description') }}
|
|
38
|
+
</p>
|
|
39
|
+
</div>
|
|
40
|
+
<UTooltip :text="t('actions.edit')">
|
|
41
|
+
<UButton
|
|
42
|
+
:icon="icon('edit')"
|
|
43
|
+
variant="ghost"
|
|
44
|
+
color="primary"
|
|
45
|
+
:aria-label="t('actions.edit')"
|
|
46
|
+
@click="toggleEdit"
|
|
47
|
+
/>
|
|
48
|
+
</UTooltip>
|
|
49
|
+
</div>
|
|
50
|
+
</template>
|
|
51
|
+
|
|
52
|
+
<div
|
|
53
|
+
v-if="!isEditing"
|
|
54
|
+
class="space-y-4"
|
|
55
|
+
>
|
|
56
|
+
<div class="w-full sm:w-1/2 rounded-lg border border-(--ui-border) p-4">
|
|
57
|
+
<dt class="text-xs font-medium uppercase tracking-wide text-muted">
|
|
58
|
+
{{ t('auth.currentPassword.fields.currentPassword') }}
|
|
59
|
+
</dt>
|
|
60
|
+
<dd class="mt-1 text-sm text-highlighted tracking-widest">
|
|
61
|
+
••••••••
|
|
62
|
+
</dd>
|
|
63
|
+
</div>
|
|
64
|
+
<dl class="grid grid-cols-1 sm:grid-cols-2 gap-4">
|
|
65
|
+
<div class="rounded-lg border border-(--ui-border) p-4">
|
|
66
|
+
<dt class="text-xs font-medium uppercase tracking-wide text-muted">
|
|
67
|
+
{{ t('auth.resetPassword.fields.password') }}
|
|
68
|
+
</dt>
|
|
69
|
+
<dd class="mt-1 text-sm text-highlighted tracking-widest">
|
|
70
|
+
••••••••
|
|
71
|
+
</dd>
|
|
72
|
+
</div>
|
|
73
|
+
<div class="rounded-lg border border-(--ui-border) p-4">
|
|
74
|
+
<dt class="text-xs font-medium uppercase tracking-wide text-muted">
|
|
75
|
+
{{ t('auth.resetPassword.fields.passwordConfirm') }}
|
|
76
|
+
</dt>
|
|
77
|
+
<dd class="mt-1 text-sm text-highlighted tracking-widest">
|
|
78
|
+
••••••••
|
|
79
|
+
</dd>
|
|
80
|
+
</div>
|
|
81
|
+
</dl>
|
|
82
|
+
</div>
|
|
83
|
+
<UForm
|
|
84
|
+
v-else
|
|
85
|
+
:state="passwordState"
|
|
86
|
+
class="space-y-4"
|
|
87
|
+
>
|
|
88
|
+
<div class="w-full sm:w-1/2 rounded-lg border border-(--ui-border) p-4">
|
|
89
|
+
<dt class="text-xs font-medium uppercase tracking-wide text-muted">
|
|
90
|
+
{{ t('auth.currentPassword.fields.currentPassword') }}
|
|
91
|
+
<span class="text-error">*</span>
|
|
92
|
+
</dt>
|
|
93
|
+
<dd class="mt-1">
|
|
94
|
+
<UFormField
|
|
95
|
+
name="currentPassword"
|
|
96
|
+
required
|
|
97
|
+
>
|
|
98
|
+
<UiFormsPasswordInput
|
|
99
|
+
v-model="passwordState.currentPassword"
|
|
100
|
+
autocomplete="current-password"
|
|
101
|
+
:placeholder="t('auth.currentPassword.fields.currentPasswordPlaceholder')"
|
|
102
|
+
/>
|
|
103
|
+
</UFormField>
|
|
104
|
+
</dd>
|
|
105
|
+
</div>
|
|
106
|
+
|
|
107
|
+
<dl class="grid grid-cols-1 sm:grid-cols-2 gap-4">
|
|
108
|
+
<div class="rounded-lg border border-(--ui-border) p-4">
|
|
109
|
+
<dt class="text-xs font-medium uppercase tracking-wide text-muted">
|
|
110
|
+
{{ t('auth.resetPassword.fields.password') }}
|
|
111
|
+
<span class="text-error">*</span>
|
|
112
|
+
</dt>
|
|
113
|
+
<dd class="mt-1">
|
|
114
|
+
<UFormField
|
|
115
|
+
name="newPassword"
|
|
116
|
+
required
|
|
117
|
+
>
|
|
118
|
+
<UiFormsPasswordInput
|
|
119
|
+
v-model="passwordState.newPassword"
|
|
120
|
+
autocomplete="new-password"
|
|
121
|
+
:placeholder="t('auth.resetPassword.fields.passwordPlaceholder')"
|
|
122
|
+
/>
|
|
123
|
+
</UFormField>
|
|
124
|
+
</dd>
|
|
125
|
+
</div>
|
|
126
|
+
|
|
127
|
+
<div class="rounded-lg border border-(--ui-border) p-4">
|
|
128
|
+
<dt class="text-xs font-medium uppercase tracking-wide text-muted">
|
|
129
|
+
{{ t('auth.resetPassword.fields.passwordConfirm') }}
|
|
130
|
+
<span class="text-error">*</span>
|
|
131
|
+
</dt>
|
|
132
|
+
<dd class="mt-1">
|
|
133
|
+
<UFormField
|
|
134
|
+
name="confirmNewPassword"
|
|
135
|
+
required
|
|
136
|
+
>
|
|
137
|
+
<UiFormsPasswordInput
|
|
138
|
+
v-model="passwordState.confirmNewPassword"
|
|
139
|
+
autocomplete="new-password"
|
|
140
|
+
:placeholder="t('auth.resetPassword.fields.passwordConfirmPlaceholder')"
|
|
141
|
+
/>
|
|
142
|
+
</UFormField>
|
|
143
|
+
</dd>
|
|
144
|
+
</div>
|
|
145
|
+
</dl>
|
|
146
|
+
|
|
147
|
+
<div class="pt-2 flex justify-end">
|
|
148
|
+
<UButton
|
|
149
|
+
type="submit"
|
|
150
|
+
:label="t('profile.actions.changePassword')"
|
|
151
|
+
/>
|
|
152
|
+
</div>
|
|
153
|
+
</UForm>
|
|
154
|
+
</UCard>
|
|
155
|
+
</template>
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
/**
|
|
3
|
+
* Account profile fields card — read/edit the signed-in user's phone and
|
|
4
|
+
* company. Self-contained: reads the profile via useAccount and persists
|
|
5
|
+
* through updateProfile (PUT /api/account/profile).
|
|
6
|
+
*/
|
|
7
|
+
import type { AccountProfileFormState } from "../../../interfaces/account/profile";
|
|
8
|
+
|
|
9
|
+
const { icon } = useIcons();
|
|
10
|
+
const { t } = useI18n();
|
|
11
|
+
const toast = useToast();
|
|
12
|
+
const { user, updateProfile } = useAccount();
|
|
13
|
+
|
|
14
|
+
const saving = ref(false);
|
|
15
|
+
const saveError = ref<string | null>(null);
|
|
16
|
+
const isEditing = ref(false);
|
|
17
|
+
|
|
18
|
+
const profileState = reactive<AccountProfileFormState>({
|
|
19
|
+
phone: "",
|
|
20
|
+
company: "",
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
watch(user, (value) => {
|
|
24
|
+
profileState.phone = value.phone;
|
|
25
|
+
profileState.company = value.company;
|
|
26
|
+
}, { immediate: true });
|
|
27
|
+
|
|
28
|
+
const profileFields = computed(() => [
|
|
29
|
+
{ key: "name", label: t("profile.fields.name"), value: user.value.name },
|
|
30
|
+
{ key: "email", label: t("profile.fields.email"), value: user.value.email },
|
|
31
|
+
{ key: "phone", label: t("profile.fields.phone"), value: user.value.phone },
|
|
32
|
+
{ key: "company", label: t("profile.fields.company"), value: user.value.company },
|
|
33
|
+
]);
|
|
34
|
+
|
|
35
|
+
function getValue(value: string): string {
|
|
36
|
+
return value.trim() ? value : t("profile.fields.empty");
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
function toggleEdit() {
|
|
40
|
+
if (isEditing.value) {
|
|
41
|
+
profileState.phone = user.value.phone;
|
|
42
|
+
profileState.company = user.value.company;
|
|
43
|
+
saveError.value = null;
|
|
44
|
+
}
|
|
45
|
+
isEditing.value = !isEditing.value;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
async function onSubmit() {
|
|
49
|
+
saving.value = true;
|
|
50
|
+
saveError.value = null;
|
|
51
|
+
|
|
52
|
+
try {
|
|
53
|
+
await updateProfile({
|
|
54
|
+
phone: profileState.phone,
|
|
55
|
+
company: profileState.company,
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
toast.add({
|
|
59
|
+
title: t("profile.success.updated"),
|
|
60
|
+
color: "success",
|
|
61
|
+
icon: icon("success"),
|
|
62
|
+
});
|
|
63
|
+
isEditing.value = false;
|
|
64
|
+
}
|
|
65
|
+
catch (error) {
|
|
66
|
+
const message = (error as { statusMessage?: string }).statusMessage;
|
|
67
|
+
saveError.value = typeof message === "string" ? message : t("auth.login.errors.unknown");
|
|
68
|
+
}
|
|
69
|
+
finally {
|
|
70
|
+
saving.value = false;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
</script>
|
|
74
|
+
|
|
75
|
+
<template>
|
|
76
|
+
<UCard>
|
|
77
|
+
<template #header>
|
|
78
|
+
<div class="flex items-start justify-between">
|
|
79
|
+
<div class="space-y-1">
|
|
80
|
+
<h2 class="text-base font-semibold text-highlighted">
|
|
81
|
+
{{ t('profile.form.title') }}
|
|
82
|
+
</h2>
|
|
83
|
+
<p class="text-sm text-muted">
|
|
84
|
+
{{ t('profile.form.description') }}
|
|
85
|
+
</p>
|
|
86
|
+
</div>
|
|
87
|
+
<UTooltip :text="t('actions.edit')">
|
|
88
|
+
<UButton
|
|
89
|
+
:icon="icon('edit')"
|
|
90
|
+
variant="ghost"
|
|
91
|
+
color="primary"
|
|
92
|
+
:aria-label="t('actions.edit')"
|
|
93
|
+
@click="toggleEdit"
|
|
94
|
+
/>
|
|
95
|
+
</UTooltip>
|
|
96
|
+
</div>
|
|
97
|
+
</template>
|
|
98
|
+
|
|
99
|
+
<FormKit
|
|
100
|
+
type="form"
|
|
101
|
+
:actions="false"
|
|
102
|
+
@submit="onSubmit"
|
|
103
|
+
>
|
|
104
|
+
<dl class="grid grid-cols-1 sm:grid-cols-2 gap-4">
|
|
105
|
+
<div
|
|
106
|
+
v-for="field in profileFields"
|
|
107
|
+
:key="field.key"
|
|
108
|
+
class="rounded-lg border border-(--ui-border) p-4"
|
|
109
|
+
>
|
|
110
|
+
<dt class="text-xs font-medium uppercase tracking-wide text-muted">
|
|
111
|
+
{{ field.label }}
|
|
112
|
+
<span
|
|
113
|
+
v-if="isEditing && (field.key === 'phone' || field.key === 'company')"
|
|
114
|
+
class="text-error"
|
|
115
|
+
>*</span>
|
|
116
|
+
</dt>
|
|
117
|
+
<dd class="mt-1 text-sm text-highlighted break-words">
|
|
118
|
+
<FormKit
|
|
119
|
+
v-if="isEditing && field.key === 'phone'"
|
|
120
|
+
v-model="profileState.phone"
|
|
121
|
+
type="text"
|
|
122
|
+
name="phone"
|
|
123
|
+
validation="required|length:8,16|phoneNumber"
|
|
124
|
+
:validation-messages="{ phoneNumber: t('validation.invalidPhoneNumber') }"
|
|
125
|
+
autocomplete="tel"
|
|
126
|
+
/>
|
|
127
|
+
<FormKit
|
|
128
|
+
v-else-if="isEditing && field.key === 'company'"
|
|
129
|
+
v-model="profileState.company"
|
|
130
|
+
type="text"
|
|
131
|
+
name="company"
|
|
132
|
+
validation="required|length:3,64"
|
|
133
|
+
autocomplete="organization"
|
|
134
|
+
/>
|
|
135
|
+
<template v-else>
|
|
136
|
+
{{ getValue(field.value) }}
|
|
137
|
+
</template>
|
|
138
|
+
</dd>
|
|
139
|
+
</div>
|
|
140
|
+
</dl>
|
|
141
|
+
|
|
142
|
+
<template v-if="isEditing">
|
|
143
|
+
<UAlert
|
|
144
|
+
v-if="saveError"
|
|
145
|
+
color="error"
|
|
146
|
+
variant="soft"
|
|
147
|
+
:title="saveError"
|
|
148
|
+
/>
|
|
149
|
+
<div class="flex justify-end">
|
|
150
|
+
<UButton
|
|
151
|
+
type="submit"
|
|
152
|
+
:loading="saving"
|
|
153
|
+
:label="t('profile.actions.updateData')"
|
|
154
|
+
/>
|
|
155
|
+
</div>
|
|
156
|
+
</template>
|
|
157
|
+
</FormKit>
|
|
158
|
+
</UCard>
|
|
159
|
+
</template>
|
|
@@ -5,7 +5,7 @@ const localePath = useLocalePath();
|
|
|
5
5
|
</script>
|
|
6
6
|
|
|
7
7
|
<template>
|
|
8
|
-
<div class="border border-default py-6 px-8 rounded-lg flex flex-col self-start">
|
|
8
|
+
<div class="border border-default py-6 px-8 rounded-lg flex flex-col self-start lg:sticky lg:top-10">
|
|
9
9
|
<h2 class="text-xl font-semibold text-highlighted">
|
|
10
10
|
{{ t('auth.login.existingCustomer') }}
|
|
11
11
|
</h2>
|
|
@@ -105,88 +105,82 @@ async function onSubmit(): Promise<void> {
|
|
|
105
105
|
|
|
106
106
|
<template>
|
|
107
107
|
<div class="bg-elevated py-6 px-6 sm:px-8 rounded-lg">
|
|
108
|
-
<
|
|
109
|
-
|
|
110
|
-
|
|
108
|
+
<div class="rounded-lg bg-default shadow-sm p-6 mb-4">
|
|
109
|
+
<h2 class="text-xl font-semibold text-highlighted">
|
|
110
|
+
{{ registrationEnabled ? t('auth.register.title') : t('auth.register.disabled.title') }}
|
|
111
|
+
</h2>
|
|
111
112
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
113
|
+
<!-- Registration closed by the tenant — no form, just a notice. -->
|
|
114
|
+
<p
|
|
115
|
+
v-if="!registrationEnabled"
|
|
116
|
+
class="pt-6 text-sm text-muted"
|
|
117
|
+
>
|
|
118
|
+
{{ t('auth.register.disabled.description') }}
|
|
119
|
+
</p>
|
|
119
120
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
121
|
+
<!-- Path selection (new vs. existing customer) -->
|
|
122
|
+
<fieldset
|
|
123
|
+
v-if="registrationEnabled"
|
|
124
|
+
class="pt-6"
|
|
125
|
+
>
|
|
126
|
+
<legend class="text-sm font-medium text-highlighted">
|
|
127
|
+
{{ t('auth.register.modes.title') }}
|
|
128
|
+
</legend>
|
|
129
|
+
<div class="mt-3 grid grid-cols-1 sm:grid-cols-2 gap-3">
|
|
130
|
+
<button
|
|
131
|
+
v-for="option in modes"
|
|
132
|
+
:key="option.value"
|
|
133
|
+
type="button"
|
|
134
|
+
tabindex="0"
|
|
135
|
+
class="text-left rounded-lg border p-4 transition-colors cursor-pointer"
|
|
136
|
+
:class="state.mode === option.value
|
|
137
|
+
? 'border-(--ui-primary) bg-primary/5 ring-1 ring-(--ui-primary)'
|
|
138
|
+
: 'border-(--ui-border) hover:border-(--ui-border-accented)'"
|
|
139
|
+
:aria-pressed="state.mode === option.value"
|
|
140
|
+
@click="state.mode = option.value"
|
|
141
|
+
>
|
|
142
|
+
<span class="flex items-center gap-2">
|
|
143
|
+
<UIcon
|
|
144
|
+
:name="icon(option.icon)"
|
|
145
|
+
class="size-5"
|
|
146
|
+
:class="state.mode === option.value ? 'text-primary' : 'text-muted'"
|
|
147
|
+
/>
|
|
148
|
+
<span class="text-sm font-semibold text-highlighted">
|
|
149
|
+
{{ t(`auth.register.modes.${option.value}.title`) }}
|
|
150
|
+
</span>
|
|
151
|
+
</span>
|
|
152
|
+
<span class="mt-1.5 block text-xs text-muted">
|
|
153
|
+
{{ t(`auth.register.modes.${option.value}.description`) }}
|
|
149
154
|
</span>
|
|
150
|
-
</
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
</button>
|
|
155
|
-
</div>
|
|
156
|
-
</fieldset>
|
|
155
|
+
</button>
|
|
156
|
+
</div>
|
|
157
|
+
</fieldset>
|
|
158
|
+
</div>
|
|
157
159
|
|
|
158
160
|
<FormKit
|
|
159
161
|
v-if="registrationEnabled"
|
|
160
162
|
type="form"
|
|
161
163
|
:actions="false"
|
|
162
|
-
class="space-y-7 pt-7"
|
|
163
164
|
@submit="onSubmit"
|
|
164
165
|
>
|
|
165
166
|
<!-- Company -->
|
|
166
|
-
<section class="space-y-4">
|
|
167
|
-
<h3 class="text-
|
|
167
|
+
<section class="space-y-4 rounded-lg bg-default shadow-sm p-6">
|
|
168
|
+
<h3 class="text-xl font-semibold text-highlighted">
|
|
168
169
|
{{ t('auth.register.sections.company') }}
|
|
169
170
|
</h3>
|
|
170
|
-
<FormKit
|
|
171
|
-
v-model="state.company"
|
|
172
|
-
type="text"
|
|
173
|
-
:label="t('auth.register.fields.company')"
|
|
174
|
-
name="company"
|
|
175
|
-
validation="required|companyName"
|
|
176
|
-
:validation-messages="{ companyName: t('validation.invalidCompanyName') }"
|
|
177
|
-
:help="t('auth.register.companyRequiredHint')"
|
|
178
|
-
autocomplete="organization"
|
|
179
|
-
/>
|
|
180
171
|
<div class="grid grid-cols-1 sm:grid-cols-2 gap-4">
|
|
181
172
|
<FormKit
|
|
182
|
-
v-
|
|
183
|
-
v-model="state.customerNumber"
|
|
173
|
+
v-model="state.company"
|
|
184
174
|
type="text"
|
|
185
|
-
:label="t('auth.register.
|
|
186
|
-
name="
|
|
187
|
-
validation="required"
|
|
188
|
-
:
|
|
175
|
+
:label="t('auth.register.fields.company')"
|
|
176
|
+
name="company"
|
|
177
|
+
validation="required|companyName"
|
|
178
|
+
:validation-messages="{ companyName: t('validation.invalidCompanyName') }"
|
|
179
|
+
:help="t('auth.register.companyRequiredHint')"
|
|
180
|
+
autocomplete="organization"
|
|
189
181
|
/>
|
|
182
|
+
</div>
|
|
183
|
+
<div class="grid grid-cols-1 sm:grid-cols-2 gap-4">
|
|
190
184
|
<FormKit
|
|
191
185
|
v-model="state.vatId"
|
|
192
186
|
type="text"
|
|
@@ -196,15 +190,74 @@ async function onSubmit(): Promise<void> {
|
|
|
196
190
|
:help="t('auth.register.fields2.vatIdHint')"
|
|
197
191
|
placeholder="DE123456789"
|
|
198
192
|
/>
|
|
193
|
+
<FormKit
|
|
194
|
+
v-if="state.mode === 'existing'"
|
|
195
|
+
v-model="state.customerNumber"
|
|
196
|
+
type="text"
|
|
197
|
+
:label="t('auth.register.fields2.customerNumber')"
|
|
198
|
+
name="customerNumber"
|
|
199
|
+
validation="required"
|
|
200
|
+
:help="t('auth.register.fields2.customerNumberHint')"
|
|
201
|
+
/>
|
|
202
|
+
</div>
|
|
203
|
+
</section>
|
|
204
|
+
|
|
205
|
+
<!-- Contact person -->
|
|
206
|
+
<section class="space-y-4 rounded-lg bg-default shadow-sm p-6">
|
|
207
|
+
<h3 class="text-xl font-semibold text-highlighted">
|
|
208
|
+
{{ t('auth.register.sections.contact') }}
|
|
209
|
+
</h3>
|
|
210
|
+
<div class="grid grid-cols-1 sm:grid-cols-3 gap-4">
|
|
211
|
+
<FormKit
|
|
212
|
+
v-model="state.salutation"
|
|
213
|
+
type="select"
|
|
214
|
+
:label="t('auth.register.fields2.salutation')"
|
|
215
|
+
name="salutation"
|
|
216
|
+
:options="salutationItems"
|
|
217
|
+
/>
|
|
218
|
+
<FormKit
|
|
219
|
+
v-model="state.firstName"
|
|
220
|
+
type="text"
|
|
221
|
+
:label="t('auth.register.fields.firstName')"
|
|
222
|
+
name="firstName"
|
|
223
|
+
validation="required"
|
|
224
|
+
autocomplete="given-name"
|
|
225
|
+
/>
|
|
226
|
+
<FormKit
|
|
227
|
+
v-model="state.lastName"
|
|
228
|
+
type="text"
|
|
229
|
+
:label="t('auth.register.fields.lastName')"
|
|
230
|
+
name="lastName"
|
|
231
|
+
validation="required"
|
|
232
|
+
autocomplete="family-name"
|
|
233
|
+
/>
|
|
234
|
+
</div>
|
|
235
|
+
<div class="grid grid-cols-1 sm:grid-cols-2 gap-4">
|
|
236
|
+
<FormKit
|
|
237
|
+
v-model="state.jobTitle"
|
|
238
|
+
type="text"
|
|
239
|
+
:label="t('auth.register.fields2.jobTitle')"
|
|
240
|
+
name="jobTitle"
|
|
241
|
+
:help="t('auth.register.fields2.jobTitleHint')"
|
|
242
|
+
autocomplete="organization-title"
|
|
243
|
+
/>
|
|
244
|
+
<FormKit
|
|
245
|
+
v-model="state.phone"
|
|
246
|
+
type="tel"
|
|
247
|
+
:label="t('auth.register.fields2.phone')"
|
|
248
|
+
name="phone"
|
|
249
|
+
:help="t('auth.register.fields2.phoneHint')"
|
|
250
|
+
autocomplete="tel"
|
|
251
|
+
/>
|
|
199
252
|
</div>
|
|
200
253
|
</section>
|
|
201
254
|
|
|
202
255
|
<!-- Billing address (new customers only) -->
|
|
203
256
|
<section
|
|
204
257
|
v-if="state.mode === 'new'"
|
|
205
|
-
class="space-y-4"
|
|
258
|
+
class="space-y-4 rounded-lg bg-default shadow-sm p-6"
|
|
206
259
|
>
|
|
207
|
-
<h3 class="text-
|
|
260
|
+
<h3 class="text-xl font-semibold text-highlighted">
|
|
208
261
|
{{ t('auth.register.sections.address') }}
|
|
209
262
|
</h3>
|
|
210
263
|
<div class="grid grid-cols-3 gap-4">
|
|
@@ -256,59 +309,9 @@ async function onSubmit(): Promise<void> {
|
|
|
256
309
|
/>
|
|
257
310
|
</section>
|
|
258
311
|
|
|
259
|
-
<!-- Contact person -->
|
|
260
|
-
<section class="space-y-4">
|
|
261
|
-
<h3 class="text-xs font-semibold uppercase tracking-wide text-muted">
|
|
262
|
-
{{ t('auth.register.sections.contact') }}
|
|
263
|
-
</h3>
|
|
264
|
-
<div class="grid grid-cols-1 sm:grid-cols-3 gap-4">
|
|
265
|
-
<FormKit
|
|
266
|
-
v-model="state.salutation"
|
|
267
|
-
type="select"
|
|
268
|
-
:label="t('auth.register.fields2.salutation')"
|
|
269
|
-
name="salutation"
|
|
270
|
-
:options="salutationItems"
|
|
271
|
-
/>
|
|
272
|
-
<FormKit
|
|
273
|
-
v-model="state.firstName"
|
|
274
|
-
type="text"
|
|
275
|
-
:label="t('auth.register.fields.firstName')"
|
|
276
|
-
name="firstName"
|
|
277
|
-
validation="required"
|
|
278
|
-
autocomplete="given-name"
|
|
279
|
-
/>
|
|
280
|
-
<FormKit
|
|
281
|
-
v-model="state.lastName"
|
|
282
|
-
type="text"
|
|
283
|
-
:label="t('auth.register.fields.lastName')"
|
|
284
|
-
name="lastName"
|
|
285
|
-
validation="required"
|
|
286
|
-
autocomplete="family-name"
|
|
287
|
-
/>
|
|
288
|
-
</div>
|
|
289
|
-
<div class="grid grid-cols-1 sm:grid-cols-2 gap-4">
|
|
290
|
-
<FormKit
|
|
291
|
-
v-model="state.jobTitle"
|
|
292
|
-
type="text"
|
|
293
|
-
:label="t('auth.register.fields2.jobTitle')"
|
|
294
|
-
name="jobTitle"
|
|
295
|
-
:help="t('auth.register.fields2.jobTitleHint')"
|
|
296
|
-
autocomplete="organization-title"
|
|
297
|
-
/>
|
|
298
|
-
<FormKit
|
|
299
|
-
v-model="state.phone"
|
|
300
|
-
type="tel"
|
|
301
|
-
:label="t('auth.register.fields2.phone')"
|
|
302
|
-
name="phone"
|
|
303
|
-
:help="t('auth.register.fields2.phoneHint')"
|
|
304
|
-
autocomplete="tel"
|
|
305
|
-
/>
|
|
306
|
-
</div>
|
|
307
|
-
</section>
|
|
308
|
-
|
|
309
312
|
<!-- Account credentials -->
|
|
310
|
-
<section class="space-y-4">
|
|
311
|
-
<h3 class="text-
|
|
313
|
+
<section class="space-y-4 rounded-lg bg-default shadow-sm p-6">
|
|
314
|
+
<h3 class="text-xl font-semibold text-highlighted">
|
|
312
315
|
{{ t('auth.register.sections.account') }}
|
|
313
316
|
</h3>
|
|
314
317
|
<FormKit
|
|
@@ -350,6 +353,7 @@ async function onSubmit(): Promise<void> {
|
|
|
350
353
|
validation="accepted"
|
|
351
354
|
:validation-messages="{ accepted: t('validation.termsRequired') }"
|
|
352
355
|
:help="t('auth.register.fields.acceptTermsDescription')"
|
|
356
|
+
outer-class="rounded-lg bg-default shadow-sm p-6"
|
|
353
357
|
/>
|
|
354
358
|
|
|
355
359
|
<UAlert
|