initial style and langcode config

This commit is contained in:
María
2025-10-17 18:04:39 +02:00
committed by María
parent d6859c386f
commit ddc623411a
61 changed files with 262 additions and 1236 deletions

View File

@@ -1,27 +1,29 @@
<template>
<div class="space-y-6">
<form @submit.prevent="handleSubmit" class="space-y-4">
<p class="text-sm text-muted">
<form class="" @submit.prevent="handleSubmit">
<!-- <p class="text-sm text-muted">
Pregunta {{ currentIndex + 1 }} de {{ total }}
</p>
</p> -->
<div class="flex flex-col gap-4">
<div class="flex flex-col gap-1">
<h2 class="text-xl font-semibold text-gray-900">{{ data.section.title }}</h2>
<p v-if="data.section.description" class="text-muted text-xs">{{ data.section.description }}</p>
<div class="flex gap-2">
<img src="../public/icono-bravioo.svg" alt="logo-bravio" class="h-6 w-6 object-cover" />
<div class="flex flex-col gap-1">
<h2 class="text-xl font-semibold">{{ data.section.title[langcode] }}</h2>
<p v-if="data.section.description" class="text-muted text-xs">{{ data.section.description[langcode] }}</p>
</div>
</div>
<div class="flex flex-col gap-1">
<h3 class="text-base font-semibold text-gray-900">{{ data.question.title }}</h3>
<p v-if="data.question.description" class="text-muted text-xs">{{ data.question.description }}</p>
<h3 class="text-base font-semibold">{{ data.question.title[langcode] }}</h3>
<p v-if="data.question.description" class="text-muted text-xs">{{ data.question.description[langcode] }}</p>
</div>
<p v-if="data.question.recommendation" class="w-fit text-xs bg-[#AFE3D2] px-3 py-1 rounded-3xl"><strong>Recomendado:</strong> {{ data.question.recommendation }}</p>
<!-- <p v-if="data.question.recommendation" class="w-fit text-xs bg-[#AFE3D2] px-3 py-1 rounded-3xl"><strong>Recomendado:</strong> {{ data.question.recommendation[langcode] }}</p> -->
</div>
<template v-if="inputComponent">
<component
:is="inputComponent"
:key="data.question"
:key="data.question.id"
v-bind="inputProps"
:required="data.input.required || false"
@input-value="localValue = $event"
/>
@@ -48,6 +50,7 @@
</template>
<script>
import { mapGetters } from "vuex"
import InputText from "@/components/InputText.vue"
import InputEmail from "@/components/InputEmail.vue"
import InputTextarea from "@/components/InputTextarea.vue"
@@ -86,6 +89,7 @@ export default {
},
computed: {
...mapGetters(['langcode']),
inputComponent() {
switch (this.data.input.type) {
case "text": return "InputText"