Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions components/infrastructure/InfrastructureSidebarMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@
<span
class="uppercase font-bold font-title text-sm text-iroco-greenish-white brightness-50 pb-2"
>
Infrastructure
{{ $t("infrastructureSidebar.title") }}
</span>
<SidebarItem
:to="`/calculatrice/infrastructure/${infraId}`"
icon="ph:article-bold"
text="Vue d'ensemble"
:text="$t('infrastructureSidebar.overview')"
/>
</div>
</template>
Expand Down
6 changes: 4 additions & 2 deletions error.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ definePageMeta({
<div class="flex items-center justify-center min-h-screen">
<div class="w-full max-w-full h-auto sm:w-1/2 lg:w-1/4 text-center">
<img src="~/assets/static/error-logo-1.png" alt="Logo" />
<p class="mt-4 text-3xl sm:text-4xl md:text-5xl font-bold">Ooops !</p>
<p class="mt-4 text-3xl sm:text-4xl md:text-5xl font-bold">
{{ $t("error.oops") }}
</p>
<p class="mt-4 text-xs sm:text-sm md:text-base">
<span v-if="!error?.data" class="font-bold">{{
error?.statusCode
Expand All @@ -45,7 +47,7 @@ definePageMeta({
{{ error?.message }}
</p>
<Button variant="black" class="mt-12" @click="redirectToRoot()"
>Retourner sur Iroco<sub class="text-xs">2</sub></Button
>{{ $t("error.returnToIroco") }}<sub class="text-xs">2</sub></Button
>
</div>
</div>
Expand Down
73 changes: 73 additions & 0 deletions i18n/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@
"newInfrastructure": "New infrastructure",
"noInfrastructure": "No infrastructure."
},
"infrastructureSidebar": {
"title": "Infrastructure",
"overview": "Overview"
},
"equivalents": {
"equivalentTo": "Equivalent to",
"kmCarThermal": "kilometers driven by thermal car",
Expand Down Expand Up @@ -148,5 +152,74 @@
"requestIntegration": "Request an integration",
"serviceLogo": "Logo of {name}",
"comingSoon": "Coming soon"
},
"contact": {
"title": "Have a question?",
"subtitle": "Contact us",
"description": "Feel free to contact us with any questions or requests for information. Whether you want to learn more about our services, get help, or share feedback, our team is here to respond quickly. We look forward to assisting you!",
"askDemo": "Request a demo",
"form": {
"company": "Company name",
"mail": "Contact email",
"subject": {
"title": "Subject",
"signalProblem": "Report a problem",
"suggestion": "Suggestion",
"other": "Other"
},
"yourDemand": "Your request",
"send": "Send",
"errors": {
"mandatoryField": "Required field",
"companyNameMinLength": "Company name must be longer than 2 characters",
"companyNameMaxLength": "Company name must be shorter than 255 characters",
"invalidEmail": "Invalid email address",
"messageMinLength": "Message must be longer than 10 characters",
"messageMaxLength": "Message must be shorter than 500 characters"
},
"sentNotification": "Email sent. We will do our best to reply as soon as possible."
}
},
"cur": {
"yourAnalyses": "Your analyses:",
"refreshList": "Refresh list",
"newAnalysis": "New analysis",
"table": {
"id": "Id",
"status": "Status",
"analysisDate": "Analysis date",
"carbonImpact": "Carbon impact"
},
"deleteAnalysis": "Delete this analysis",
"deleteModal": {
"title": "Delete analysis",
"description": "This action will permanently delete the analysis.",
"cancel": "Cancel",
"confirmDelete": "Delete analysis"
},
"detail": {
"cur": "Cur {curId}"
}
},
"scanner": {
"yourScans": "Your scans:",
"refreshList": "Refresh list",
"table": {
"id": "Id",
"status": "Status",
"scanDate": "Scan date",
"carbonImpact": "Carbon impact"
},
"detail": {
"scan": "Scan"
}
},
"token": {
"yourConnectedAccounts": "Your connected accounts:",
"createKey": "Create a key"
},
"error": {
"oops": "Ooops!",
"returnToIroco": "Return to Iroco"
}
}
73 changes: 73 additions & 0 deletions i18n/locales/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@
"newInfrastructure": "Nouvelle infrastructure",
"noInfrastructure": "Aucune infrastructure."
},
"infrastructureSidebar": {
"title": "Infrastructure",
"overview": "Vue d'ensemble"
},
"equivalents": {
"equivalentTo": "Équivalent à",
"kmCarThermal": "kilomètres parcourus en voiture thermique",
Expand Down Expand Up @@ -148,5 +152,74 @@
"requestIntegration": "Demander une intégration",
"serviceLogo": "Logo de {name}",
"comingSoon": "Prochainement"
},
"contact": {
"title": "Une question ?",
"subtitle": "Contactez-nous",
"description": "N'hésitez pas à nous contacter pour toute question ou demande d'information. Que ce soit pour en savoir plus sur nos services, obtenir de l'aide ou partager vos suggestions, notre équipe est là pour vous répondre rapidement. Nous sommes impatients de vous accompagner !",
"askDemo": "Demander une démo",
"form": {
"company": "Nom de l'entreprise",
"mail": "Mail de contact",
"subject": {
"title": "Sujet",
"signalProblem": "Signaler un problème",
"suggestion": "Suggestion",
"other": "Autres"
},
"yourDemand": "Votre demande",
"send": "Envoyer",
"errors": {
"mandatoryField": "Champ obligatoire",
"companyNameMinLength": "Le nom de l'entreprise doit faire plus de 2 caractères",
"companyNameMaxLength": "Le nom de l'entreprise doit faire moins de 255 caractères",
"invalidEmail": "Adresse mail invalide",
"messageMinLength": "Le message doit faire plus de 10 caractères",
"messageMaxLength": "Le message doit faire moins de 500 caractères"
},
"sentNotification": "Courriel envoyé. Nous faisons notre possible pour vous répondre au plus vite."
}
},
"cur": {
"yourAnalyses": "Vos analyses :",
"refreshList": "Rafraîchir la liste",
"newAnalysis": "Nouvelle analyse",
"table": {
"id": "Id",
"status": "Statut",
"analysisDate": "Date de l'analyse",
"carbonImpact": "Impact carbone"
},
"deleteAnalysis": "Supprimer cette analyse",
"deleteModal": {
"title": "Supprimer l'analyse",
"description": "Cette action va supprimer l'analyse de façon permanente.",
"cancel": "Annuler",
"confirmDelete": "Supprimer l'analyse"
},
"detail": {
"cur": "Cur {curId}"
}
},
"scanner": {
"yourScans": "Vos scans :",
"refreshList": "Rafraîchir la liste",
"table": {
"id": "Id",
"status": "Statut",
"scanDate": "Date du scan",
"carbonImpact": "Impact carbone"
},
"detail": {
"scan": "Scan"
}
},
"token": {
"yourConnectedAccounts": "Vos comptes connectés :",
"createKey": "Créer une clé"
},
"error": {
"oops": "Ooops !",
"returnToIroco": "Retourner sur Iroco"
}
}
70 changes: 36 additions & 34 deletions pages/contact/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,12 @@
class="flex flex-col lg:grid lg:grid-cols-2 gap-16 sm:p-8 lg:p-28 xl:p-40"
>
<div class="grid gap-8">
<h1 class="text-4xl font-bold font-title">Une question ?</h1>
<h2 class="text-xl text-green-500">Contactez-nous</h2>
<p class="text-justify">
N'hésitez pas à nous contacter pour toute question ou demande
d'information. Que ce soit pour en savoir plus sur nos services, obtenir
de l'aide ou partager vos suggestions, notre équipe est là pour vous
répondre rapidement. Nous sommes impatients de vous accompagner !
</p>
<h1 class="text-4xl font-bold font-title">{{ $t("contact.title") }}</h1>
<h2 class="text-xl text-green-500">{{ $t("contact.subtitle") }}</h2>
<p class="text-justify">{{ $t("contact.description") }}</p>
<img
src="~/assets/static/ask-demo.svg"
alt="Demander une démo"
v-bind:alt="t('contact.askDemo')"
class="w-1/2 mx-auto"
/>
</div>
Expand All @@ -41,7 +36,7 @@
<form class="w-full space-y-6" @submit="onSubmit">
<FormField v-slot="{ componentField }" name="companyName">
<FormItem>
<FormLabel>Nom de l'entreprise</FormLabel>
<FormLabel>{{ $t("contact.form.company") }}</FormLabel>
<FormControl>
<Input type="text" v-bind="componentField" />
</FormControl>
Expand All @@ -50,7 +45,7 @@
</FormField>
<FormField v-slot="{ componentField }" name="mail">
<FormItem>
<FormLabel>Mail de contact</FormLabel>
<FormLabel>{{ $t("contact.form.mail") }}</FormLabel>
<FormControl>
<Input type="text" v-bind="componentField" />
</FormControl>
Expand All @@ -59,7 +54,7 @@
</FormField>
<FormField v-slot="{ componentField }" name="subject">
<FormItem>
<FormLabel>Sujet</FormLabel>
<FormLabel>{{ $t("contact.form.subject.title") }}</FormLabel>

<Select v-bind="componentField">
<FormControl>
Expand All @@ -69,14 +64,18 @@
</FormControl>
<SelectContent>
<SelectGroup>
<SelectItem value="Demander une démo"
>Demander une démo</SelectItem
>
<SelectItem value="Signaler un problème"
>Signaler un problème</SelectItem
>
<SelectItem value="Suggestion">Suggestion</SelectItem>
<SelectItem value="Autres">Autres</SelectItem>
<SelectItem value="Demander une démo">{{
$t("contact.askDemo")
}}</SelectItem>
<SelectItem value="Signaler un problème">{{
$t("contact.form.subject.signalProblem")
}}</SelectItem>
<SelectItem value="Suggestion">{{
$t("contact.form.subject.suggestion")
}}</SelectItem>
<SelectItem value="Autres">{{
$t("contact.form.subject.other")
}}</SelectItem>
</SelectGroup>
</SelectContent>
</Select>
Expand All @@ -86,15 +85,17 @@

<FormField v-slot="{ componentField }" name="message">
<FormItem>
<FormLabel>Votre demande</FormLabel>
<FormLabel>{{ $t("contact.form.yourDemand") }}</FormLabel>
<FormControl>
<Textarea rows="10" v-bind="componentField" class="resize-none" />
</FormControl>
<FormMessage />
</FormItem>
</FormField>

<Button type="submit" variant="black"> Envoyer </Button>
<Button type="submit" variant="black">
{{ $t("contact.form.send") }}
</Button>
</form>
</div>
</section>
Expand Down Expand Up @@ -130,25 +131,27 @@ definePageMeta({
});

const notificationHandler = useToast();

const { t } = useI18n();
const formSchema = toTypedSchema(
z.object({
companyName: z
.string({ required_error: "Champ obligatoire" })
.string({ required_error: t("contact.form.errors.mandatoryField") })
.min(2, {
message: "Le nom de l'entreprise doit faire plus de 2 caractères",
message: t("contact.form.errors.companyNameMinLength"),
})
.max(255, {
message: "Le nom de l'entreprise doit faire moins de 255 caractères",
message: t("contact.form.errors.companyNameMaxLength"),
}),
mail: z
.string({ required_error: "Champ obligatoire" })
.email({ message: "Adresse mail invalide" }),
subject: z.string({ required_error: "Champ obligatoire" }),
.string({ required_error: t("contact.form.errors.mandatoryField") })
.email({ message: t("contact.form.errors.invalidEmail") }),
subject: z.string({
required_error: t("contact.form.errors.mandatoryField"),
}),
message: z
.string({ required_error: "Champ obligatoire" })
.min(10, { message: "Le message doit faire plus de 10 caractères" })
.max(500, { message: "Le message doit faire moins de 500 caractères" }),
.string({ required_error: t("contact.form.errors.mandatoryField") })
.min(10, { message: t("contact.form.errors.messageMinLength") })
.max(500, { message: t("contact.form.errors.messageMaxLength") }),
}),
);

Expand All @@ -166,8 +169,7 @@ const onSubmit = form.handleSubmit(async (values) => {

await contactService.requestDemoEmail(body).then(() => {
notificationHandler.add({
title:
"Courriel envoyé. Nous faisons notre possible pour vous répondre au plus vite.",
title: t("contact.form.sentNotification"),
color: NuxtColors.success,
});
form.resetForm();
Expand Down
2 changes: 1 addition & 1 deletion pages/cur/[curId]/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

<template>
<div class="h-full container flex flex-col gap-8 mx-auto">
<div class="container">Cur {{ curId }}</div>
<div class="container">{{ $t("cur.detail.cur", { curId }) }}</div>
<EstimateTotal :total="analysis.totalCO2Converted" />
<EstimateDetails
:relative-carbon-footprint-list="analysis.relativeCarbonFootprintList"
Expand Down
Loading