chore: translations
This commit is contained in:
parent
a282427f24
commit
1ac67f9ce2
|
|
@ -1,5 +1,6 @@
|
|||
<script setup lang="ts">
|
||||
import { computed } from "vue";
|
||||
import { useEntities } from "@/services/onboarding";
|
||||
|
||||
const props = defineProps<{
|
||||
modelValue: {
|
||||
|
|
@ -14,6 +15,8 @@ const props = defineProps<{
|
|||
|
||||
const emit = defineEmits(["update:modelValue"]);
|
||||
|
||||
const { countries } = useEntities();
|
||||
|
||||
const orgAddress = computed({
|
||||
get() {
|
||||
return props.modelValue;
|
||||
|
|
@ -138,9 +141,9 @@ const orgAddress = computed({
|
|||
autocomplete="country-name"
|
||||
class="block w-full border-0 py-1.5 text-gray-900 ring-1 ring-inset ring-gray-300 focus:ring-2 focus:ring-inset focus:ring-blue-600 sm:text-sm sm:leading-6"
|
||||
>
|
||||
<option>Schweiz</option>
|
||||
<option>Deutschland</option>
|
||||
<option>Österreich</option>
|
||||
<option v-for="country in countries" :key="country.id" :value="country.id">
|
||||
{{ country.name }}
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -90,9 +90,16 @@ async function changeLocale(language: AvailableLanguages) {
|
|||
/>
|
||||
</svg>
|
||||
<div>
|
||||
Hast du Fragen? Schau dir unsere
|
||||
<a class="underline" href="#">FAQ</a>
|
||||
an oder kontaktiere uns:
|
||||
<i18next
|
||||
:translation="
|
||||
$t('a.Hast du Fragen? Schau dir unsere FAQ an oder kontaktiere uns')
|
||||
"
|
||||
>
|
||||
<template #faq>
|
||||
<a class="underline" href="#">FAQ</a>
|
||||
</template>
|
||||
</i18next>
|
||||
:
|
||||
<a class="underline" href="mailto:help@vbv.ch">help@vbv.ch</a>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -3,12 +3,12 @@
|
|||
<template>
|
||||
<main class="bg-gray-200 lg:px-12 lg:py-12">
|
||||
<div class="container-medium">
|
||||
<h2 class="mb-8 text-blue-900">Überbetriebliche Kurse</h2>
|
||||
<h2 class="mb-8 text-blue-900">{{ $t("a.Überbetriebliche Kurse") }}</h2>
|
||||
<router-link
|
||||
class="btn-primary"
|
||||
:to="{ name: 'accountCreate', params: { courseType: 'uk' } }"
|
||||
>
|
||||
Jetzt mit Lehrgang starten
|
||||
{{ $t("a.Jetzt mit Lehrgang starten") }}
|
||||
</router-link>
|
||||
</div>
|
||||
</main>
|
||||
|
|
|
|||
|
|
@ -3,12 +3,12 @@
|
|||
<template>
|
||||
<main class="bg-gray-200 lg:px-12 lg:py-12">
|
||||
<div class="container-medium">
|
||||
<h2 class="mb-8 text-blue-900">Versicherungsvermittler/-in</h2>
|
||||
<h2 class="mb-8 text-blue-900">{{ $t("a.Versicherungsvermittler/-in") }}</h2>
|
||||
<router-link
|
||||
class="btn-primary"
|
||||
:to="{ name: 'accountCreate', params: { courseType: 'vv' } }"
|
||||
>
|
||||
Jetzt mit Lehrgang starten
|
||||
{{ $t("a.Jetzt mit Lehrgang starten") }}
|
||||
</router-link>
|
||||
</div>
|
||||
</main>
|
||||
|
|
|
|||
|
|
@ -9,22 +9,26 @@ const userStore = useUserStore();
|
|||
<template>
|
||||
<WizardPage :step="0.5">
|
||||
<template #content>
|
||||
<h2 class="my-10">Konto erstellen</h2>
|
||||
<h2 class="my-10">{{ $t("a.Konto erstellen") }}</h2>
|
||||
<InfoBox color="text-green-500" icon="it-icon-check">
|
||||
<template #content>
|
||||
<p class="text-lg font-bold">
|
||||
Du hast erfolgreich ein Konto für
|
||||
<br />
|
||||
{{ userStore.email }} erstellt.
|
||||
{{
|
||||
$t("a.Du hast erfolgreich ein Konto für EMAIL erstellt.", {
|
||||
email: userStore.email,
|
||||
})
|
||||
}}
|
||||
</p>
|
||||
</template>
|
||||
</InfoBox>
|
||||
<p class="text-lg font-bold">Mach nun weiter mit dem nächsten Schritt.</p>
|
||||
<p class="text-lg font-bold">
|
||||
{{ $t("a.Mach nun weiter mit dem nächsten Schritt.") }}
|
||||
</p>
|
||||
</template>
|
||||
|
||||
<template #footer>
|
||||
<router-link :to="{ name: 'accountProfile' }" class="btn-blue flex items-center">
|
||||
Weiter
|
||||
{{ $t("general.next") }}
|
||||
<it-icon-arrow-right class="it-icon ml-2 h-6 w-6" />
|
||||
</router-link>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -61,23 +61,29 @@ const nextRoute = computed(() => {
|
|||
<template>
|
||||
<WizardPage :step="1">
|
||||
<template #content>
|
||||
<h2 class="my-10">Profil ergänzen</h2>
|
||||
<h2 class="my-10">{{ $t("a.Profil ergänzen") }}</h2>
|
||||
|
||||
<h3 class="mb-3">Gesellschaft</h3>
|
||||
<h3 class="mb-3">{{ $t("a.Gesellschaft") }}</h3>
|
||||
|
||||
<p class="mb-6 max-w-md hyphens-none">
|
||||
Wähle hier den Namen der Gesellschaft aus, in der du arbeitest. So können dich
|
||||
andere Personen einfacher finden.
|
||||
{{
|
||||
$t(
|
||||
"a.Wähle hier den Namen der Gesellschaft aus, in der du arbeitest. So können dich andere Personen einfacher finden."
|
||||
)
|
||||
}}
|
||||
</p>
|
||||
|
||||
<ItDropdownSelect v-model="selectedOrganisation" :items="organisations" />
|
||||
|
||||
<div class="mt-16 flex flex-col justify-between gap-12 lg:flex-row lg:gap-24">
|
||||
<div>
|
||||
<h3 class="mb-3">Profilbild</h3>
|
||||
<h3 class="mb-3">{{ $t("a.Profilbild") }}</h3>
|
||||
<p class="mb-6 max-w-md hyphens-none">
|
||||
Lade ein Profilbild hoch, damit dich andere Personen auf den ersten Blick
|
||||
erkennen.
|
||||
{{
|
||||
$t(
|
||||
"a.Lade ein Profilbild hoch, damit dich andere Personen auf den ersten Blick erkennen."
|
||||
)
|
||||
}}
|
||||
</p>
|
||||
<div class="btn-primary relative inline-flex cursor-pointer items-center">
|
||||
<input
|
||||
|
|
@ -107,7 +113,7 @@ const nextRoute = computed(() => {
|
|||
role="link"
|
||||
@click="navigate"
|
||||
>
|
||||
Weiter
|
||||
{{ $t("general.next") }}
|
||||
<it-icon-arrow-right class="it-icon ml-2 h-6 w-6" />
|
||||
</button>
|
||||
</router-link>
|
||||
|
|
|
|||
|
|
@ -14,17 +14,21 @@ const user = useUserStore();
|
|||
<template>
|
||||
<WizardPage :step="0">
|
||||
<template #content>
|
||||
<h2 class="my-10">Konto erstellen</h2>
|
||||
<p class="mb-4">Damit du myVBV nutzen kannst, brauchst du ein Konto.</p>
|
||||
<h2 class="my-10">{{ $t("a.Konto erstellen") }}</h2>
|
||||
<p class="mb-4">
|
||||
{{ $t("a.Damit du myVBV nutzen kannst, brauchst du ein Konto.") }}
|
||||
</p>
|
||||
<a
|
||||
:href="`/sso/signup?course=${props.courseType}&lang=${user.language}`"
|
||||
class="btn-primary"
|
||||
>
|
||||
Konto erstellen
|
||||
{{ $t("a.Konto erstellen") }}
|
||||
</a>
|
||||
|
||||
<p class="mb-4 mt-12">Hast du schon ein Konto?</p>
|
||||
<a :href="`/sso/login?lang=${user.language}`" class="btn-secondary">Anmelden</a>
|
||||
<p class="mb-4 mt-12">{{ $t("a.Hast du schon ein Konto?") }}</p>
|
||||
<a :href="`/sso/login?lang=${user.language}`" class="btn-secondary">
|
||||
{{ $t("a.Anmelden") }}
|
||||
</a>
|
||||
</template>
|
||||
</WizardPage>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ import WizardSidePanel from "@/components/onboarding/WizardSidePanel.vue";
|
|||
import { computed } from "vue";
|
||||
import mood_uk from "@/assets/images/mood_uk.jpg";
|
||||
import mood_vv from "@/assets/images/mood_vv.jpg";
|
||||
import { useTranslation } from "i18next-vue";
|
||||
|
||||
const props = defineProps({
|
||||
courseType: {
|
||||
|
|
@ -11,26 +12,26 @@ const props = defineProps({
|
|||
},
|
||||
});
|
||||
|
||||
type CourseMetaType = {
|
||||
[key: string]: {
|
||||
name: string;
|
||||
imageUrl: string;
|
||||
};
|
||||
};
|
||||
|
||||
const courseMeta: CourseMetaType = {
|
||||
uk: {
|
||||
name: "Überbetriebliche Kurse",
|
||||
imageUrl: mood_uk,
|
||||
},
|
||||
vv: {
|
||||
name: "Versicherungs­vermittler/‑in",
|
||||
imageUrl: mood_vv,
|
||||
},
|
||||
};
|
||||
const { t } = useTranslation();
|
||||
|
||||
const courseData = computed(() => {
|
||||
return courseMeta[props.courseType];
|
||||
if (props.courseType === "uk") {
|
||||
return {
|
||||
name: t("a.Überbetriebliche Kurse"),
|
||||
imageUrl: mood_uk,
|
||||
};
|
||||
}
|
||||
if (props.courseType === "vv") {
|
||||
return {
|
||||
name: t("a.Versicherungsvermittler/-in"),
|
||||
imageUrl: mood_vv,
|
||||
};
|
||||
}
|
||||
|
||||
return {
|
||||
name: "",
|
||||
imageUrl: "",
|
||||
};
|
||||
});
|
||||
</script>
|
||||
|
||||
|
|
|
|||
|
|
@ -3,20 +3,25 @@ import WizardPage from "@/components/onboarding/WizardPage.vue";
|
|||
import InfoBox from "@/components/onboarding/InfoBox.vue";
|
||||
import { ref } from "vue";
|
||||
|
||||
// This page will probably not be reached with a course session already assigned.
|
||||
// This is just a placeholder for the future.
|
||||
const courseSessionName = ref("");
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<WizardPage :step="2">
|
||||
<template #content>
|
||||
<h2 class="my-10">An Durchführung teilnehmen</h2>
|
||||
<h2 class="my-10">{{ $t("a.An Durchführung teilnehmen") }}</h2>
|
||||
<template v-if="courseSessionName">
|
||||
<InfoBox color="text-green-500" icon="it-icon-check">
|
||||
<template #content>
|
||||
<p class="text-lg">
|
||||
Super, nun ist alles bereit. Du bist der Durchführung «{{
|
||||
courseSessionName
|
||||
}}» zugewiesen und kannst mit dem Lehrgang starten.
|
||||
{{
|
||||
$t(
|
||||
"a.Super, nun ist alles bereit. Du bist der Durchführung «{course}» zugewiesen und kannst mit dem Lehrgang starten.",
|
||||
{ course: courseSessionName }
|
||||
)
|
||||
}}
|
||||
</p>
|
||||
</template>
|
||||
</InfoBox>
|
||||
|
|
@ -25,15 +30,22 @@ const courseSessionName = ref("");
|
|||
<InfoBox>
|
||||
<template #content>
|
||||
<p class="text-lg">
|
||||
Aktuell bist du leider keiner Durchführung zugewiesen.
|
||||
{{ $t("a.Aktuell bist du leider keiner Durchführung zugewiesen.") }}
|
||||
</p>
|
||||
</template>
|
||||
</InfoBox>
|
||||
<p>
|
||||
Damit du mit diesem Lehrgang starten kannst, musst du einer Durchführung
|
||||
zugewiesen werden. Nimm dafür deinem üK-Verantwortlichen oder unserem
|
||||
<a class="underline" href="mailto:help@vbv.ch">Support</a>
|
||||
Kontakt auf.
|
||||
<i18next
|
||||
:translation="
|
||||
$t(
|
||||
'a.Damit du mit diesem Lehrgang starten kannst, musst du einer Durchführung zugewiesen werden. Nimm dafür deinem üK-Verantwortlichen oder unserem {support} Kontakt auf.'
|
||||
)
|
||||
"
|
||||
>
|
||||
<template #support>
|
||||
<a class="underline" href="mailto:help@vbv.ch">Support</a>
|
||||
</template>
|
||||
</i18next>
|
||||
</p>
|
||||
</template>
|
||||
</template>
|
||||
|
|
@ -43,10 +55,10 @@ const courseSessionName = ref("");
|
|||
class="btn-secondary flex items-center"
|
||||
>
|
||||
<it-icon-arrow-left class="it-icon mr-2 h-6 w-6" />
|
||||
Zurück
|
||||
{{ $t("general.back") }}
|
||||
</router-link>
|
||||
<router-link v-if="courseSessionName" to="/" class="btn-blue flex items-center">
|
||||
Jetzt mit dem Lehrgang starten
|
||||
{{ $t("a.Jetzt mit Lehrgang starten") }}
|
||||
<it-icon-arrow-right class="it-icon ml-2 h-6 w-6" />
|
||||
</router-link>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -68,7 +68,6 @@ const address = ref({
|
|||
});
|
||||
|
||||
const useCompanyAddress = ref(false);
|
||||
|
||||
const fetchBillingAddress = useFetch("/api/shop/billing-address/").json();
|
||||
const billingAddressData: Ref<BillingAddressType | null> = fetchBillingAddress.data;
|
||||
|
||||
|
|
@ -191,6 +190,7 @@ const executePayment = () => {
|
|||
itPost("/api/shop/vv/checkout/", {
|
||||
redirect_url: fullHost,
|
||||
address: address.value,
|
||||
product: `vv-${user.language}`,
|
||||
}).then((res) => {
|
||||
console.log("Going to next page", res.next_step_url);
|
||||
window.location.href = res.next_step_url;
|
||||
|
|
@ -267,7 +267,7 @@ const executePayment = () => {
|
|||
class="btn-secondary flex items-center"
|
||||
>
|
||||
<it-icon-arrow-left class="it-icon mr-2 h-6 w-6" />
|
||||
Zurück
|
||||
{{ $t("general.back") }}
|
||||
</router-link>
|
||||
<button class="btn-blue flex items-center" @click="executePayment">
|
||||
Mit Kreditkarte bezahlen
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ describe("Onboarding", () => {
|
|||
user.loggedIn = true;
|
||||
user.organisation = 1;
|
||||
const mockNext = vi.fn();
|
||||
onboardingRedirect(routeLocation("accountConfirm", "uk"), START_LOCATION, mockNext);
|
||||
onboardingRedirect(routeLocation("accountProfile", "uk"), START_LOCATION, mockNext);
|
||||
expect(mockNext).toHaveBeenCalledWith({
|
||||
name: "setupComplete",
|
||||
params: { courseType: "uk" },
|
||||
|
|
@ -53,7 +53,7 @@ describe("Onboarding", () => {
|
|||
user.loggedIn = true;
|
||||
user.organisation = 1;
|
||||
const mockNext = vi.fn();
|
||||
onboardingRedirect(routeLocation("accountConfirm", "vv"), START_LOCATION, mockNext);
|
||||
onboardingRedirect(routeLocation("accountProfile", "vv"), START_LOCATION, mockNext);
|
||||
expect(mockNext).toHaveBeenCalledWith({
|
||||
name: "checkoutAddress",
|
||||
params: { courseType: "vv" },
|
||||
|
|
|
|||
|
|
@ -23,12 +23,12 @@ export async function onboardingRedirect(
|
|||
return next({ name: "accountConfirm", params: to.params });
|
||||
}
|
||||
|
||||
// Maybe we can skip the account setup steps
|
||||
if (
|
||||
from === START_LOCATION &&
|
||||
user.organisation &&
|
||||
(to.name === "accountConfirm" || to.name === "accountProfile")
|
||||
) {
|
||||
if (to.name === "accountConfirm") {
|
||||
return next();
|
||||
}
|
||||
|
||||
// Maybe we can skip the profile step
|
||||
if (from === START_LOCATION && user.organisation && to.name === "accountProfile") {
|
||||
return next({ name: profileNextRoute(to.params.courseType), params: to.params });
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue