fix(quality): contraste teal, submit red, bottombar mobile, autocomplete touch
P1: color de texto teal -> #494F4F en 5 clases del wizard (WCAG AA). P2: try/catch en handleSubmit - error de red muestra estado error del wizard. P3: flex-wrap + column-reverse en bottombar <=480px. P4: onTouchEnd fallback en autocomplete barrio y ciudad.
This commit is contained in:
@@ -147,6 +147,7 @@ export function BarrioAutocompleteField({
|
||||
aria-selected={i === activeIdx}
|
||||
className={`barrio-autocomplete-item${i === activeIdx ? ' barrio-autocomplete-item--active' : ''}`}
|
||||
onMouseDown={() => select(barrio)}
|
||||
onTouchEnd={(e) => { e.preventDefault(); select(barrio) }}
|
||||
>
|
||||
{barrio}
|
||||
</li>
|
||||
|
||||
@@ -151,6 +151,7 @@ export function CiudadSelectField({
|
||||
aria-selected={i === activeIdx}
|
||||
className={`barrio-autocomplete-item${i === activeIdx ? ' barrio-autocomplete-item--active' : ''}`}
|
||||
onMouseDown={() => select(ciudad)}
|
||||
onTouchEnd={(e) => { e.preventDefault(); select(ciudad) }}
|
||||
>
|
||||
{ciudad}
|
||||
</li>
|
||||
|
||||
@@ -210,17 +210,24 @@ export function WizardForm({ survey, schema }: WizardFormProps) {
|
||||
})
|
||||
|
||||
startTransition(async () => {
|
||||
const result = await submitSurvey({
|
||||
surveyId: survey.id,
|
||||
answers,
|
||||
consentOperativo,
|
||||
consentMacroN1,
|
||||
})
|
||||
if (result.success) {
|
||||
clearDraft(survey.id)
|
||||
setStage('success')
|
||||
} else {
|
||||
setSubmitError(result.error)
|
||||
try {
|
||||
const result = await submitSurvey({
|
||||
surveyId: survey.id,
|
||||
answers,
|
||||
consentOperativo,
|
||||
consentMacroN1,
|
||||
})
|
||||
if (result.success) {
|
||||
clearDraft(survey.id)
|
||||
setStage('success')
|
||||
} else {
|
||||
setSubmitError(result.error)
|
||||
setStage('error')
|
||||
}
|
||||
} catch {
|
||||
// Falla de red al invocar el Server Action (fetch failed) — no es un
|
||||
// error que submitSurvey pueda devolver como result, hay que capturarlo acá.
|
||||
setSubmitError('No pudimos enviar tu respuesta. Verificá tu conexión e intentá de nuevo.')
|
||||
setStage('error')
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user