|
@@ -256,6 +256,29 @@
|
|
|
<ShieldCheck :class="['w-5 h-5 transition-colors', allowPortfolio ? 'text-primary' : 'text-muted-foreground/30']" />
|
|
<ShieldCheck :class="['w-5 h-5 transition-colors', allowPortfolio ? 'text-primary' : 'text-muted-foreground/30']" />
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
+ <!-- Nuances consent (Mandatory) -->
|
|
|
|
|
+ <div class="flex items-start gap-4 p-4 mt-3 bg-secondary/30 border border-black/[0.03] rounded-2xl cursor-pointer hover:bg-secondary/50 transition-all active:scale-[0.99] group"
|
|
|
|
|
+ @click="agreeToNuances = !agreeToNuances">
|
|
|
|
|
+ <div :class="['mt-0.5 w-5 h-5 rounded border flex items-center justify-center transition-all',
|
|
|
|
|
+ agreeToNuances ? 'bg-primary border-primary' : 'bg-background border-border group-hover:border-primary/50']">
|
|
|
|
|
+ <Check v-if="agreeToNuances" class="w-3.5 h-3.5 text-primary-foreground" />
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="flex-1">
|
|
|
|
|
+ <p class="text-sm font-medium leading-relaxed">
|
|
|
|
|
+ {{ t("upload.agreeToNuances") }}
|
|
|
|
|
+ <RouterLink
|
|
|
|
|
+ :to="{ name: 'nuances', params: { lang: locale } }"
|
|
|
|
|
+ target="_blank"
|
|
|
|
|
+ class="text-primary underline hover:text-primary/80 transition-colors"
|
|
|
|
|
+ @click.stop
|
|
|
|
|
+ >
|
|
|
|
|
+ {{ t("upload.nuancesLink") }}
|
|
|
|
|
+ </RouterLink>
|
|
|
|
|
+ </p>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <FileText :class="['w-5 h-5 transition-colors', agreeToNuances ? 'text-primary' : 'text-muted-foreground/30']" />
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
<!-- Estimate -->
|
|
<!-- Estimate -->
|
|
|
<Transition enter-active-class="transition duration-300" enter-from-class="opacity-0 translate-y-2" enter-to-class="opacity-100 translate-y-0">
|
|
<Transition enter-active-class="transition duration-300" enter-from-class="opacity-0 translate-y-2" enter-to-class="opacity-100 translate-y-0">
|
|
|
<div v-if="estimatedPrice !== null"
|
|
<div v-if="estimatedPrice !== null"
|
|
@@ -315,6 +338,7 @@ const companyName = ref("");
|
|
|
const companyPib = ref("");
|
|
const companyPib = ref("");
|
|
|
const companyAddress = ref("");
|
|
const companyAddress = ref("");
|
|
|
const allowPortfolio = ref(false);
|
|
const allowPortfolio = ref(false);
|
|
|
|
|
+const agreeToNuances = ref(false);
|
|
|
const materials = ref<any[]>([]);
|
|
const materials = ref<any[]>([]);
|
|
|
const selectedMaterial = ref("1");
|
|
const selectedMaterial = ref("1");
|
|
|
const selectedColor = ref("");
|
|
const selectedColor = ref("");
|
|
@@ -385,6 +409,7 @@ const isFormValid = computed(() =>
|
|
|
firstName.value.trim() !== "" && lastName.value.trim() !== "" &&
|
|
firstName.value.trim() !== "" && lastName.value.trim() !== "" &&
|
|
|
phone.value.trim() !== "" && email.value.trim() !== "" &&
|
|
phone.value.trim() !== "" && email.value.trim() !== "" &&
|
|
|
address.value.trim() !== "" && selectedMaterial.value !== "" &&
|
|
address.value.trim() !== "" && selectedMaterial.value !== "" &&
|
|
|
|
|
+ agreeToNuances.value &&
|
|
|
(files.value.length > 0 || modelLink.value.trim() !== "") &&
|
|
(files.value.length > 0 || modelLink.value.trim() !== "") &&
|
|
|
(!isCompany.value || (companyName.value.trim() !== "" && companyPib.value.trim() !== ""))
|
|
(!isCompany.value || (companyName.value.trim() !== "" && companyPib.value.trim() !== ""))
|
|
|
);
|
|
);
|
|
@@ -465,7 +490,9 @@ async function handleSubmit() {
|
|
|
toast.success(t("upload.success"));
|
|
toast.success(t("upload.success"));
|
|
|
files.value = []; firstName.value = ""; lastName.value = ""; phone.value = "";
|
|
files.value = []; firstName.value = ""; lastName.value = ""; phone.value = "";
|
|
|
email.value = ""; address.value = ""; modelLink.value = "";
|
|
email.value = ""; address.value = ""; modelLink.value = "";
|
|
|
- allowPortfolio.value = false; notes.value = "";
|
|
|
|
|
|
|
+ allowPortfolio.value = false;
|
|
|
|
|
+ agreeToNuances.value = false;
|
|
|
|
|
+ notes.value = "";
|
|
|
} catch (err: any) {
|
|
} catch (err: any) {
|
|
|
toast.error(err.message || t("upload.error"));
|
|
toast.error(err.message || t("upload.error"));
|
|
|
} finally {
|
|
} finally {
|