Merge pull request 'refactor: improve email validation logic and enhance community response checks in FormularioRegistro' (#15) from develop into master
Reviewed-on: #15
This commit was merged in pull request #15.
This commit is contained in:
@@ -246,9 +246,10 @@ export default function FormularioRegistro({
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Buscar un posible correo en las respuestas si no hay cuentaInfo
|
// Buscar un posible correo en las respuestas si no hay cuentaInfo
|
||||||
let correo = cuentaInfo?.correo === respuestas[preguntaCorreo?.id_pregunta ?? '']
|
let correo =
|
||||||
? cuentaInfo?.correo
|
cuentaInfo?.correo === respuestas[preguntaCorreo?.id_pregunta ?? '']
|
||||||
: respuestas[preguntaCorreo?.id_pregunta ?? ''];
|
? cuentaInfo?.correo
|
||||||
|
: respuestas[preguntaCorreo?.id_pregunta ?? ''];
|
||||||
|
|
||||||
if (!correo) {
|
if (!correo) {
|
||||||
// Buscar en las respuestas una que parezca correo
|
// Buscar en las respuestas una que parezca correo
|
||||||
@@ -291,9 +292,14 @@ export default function FormularioRegistro({
|
|||||||
// ------------------------
|
// ------------------------
|
||||||
const mostrarFormularioRestante =
|
const mostrarFormularioRestante =
|
||||||
(isComunidad &&
|
(isComunidad &&
|
||||||
confirmativeOption.includes(isComunidad.label) &&
|
confirmativeOption.some((opt) =>
|
||||||
|
isComunidad.label?.toLowerCase().includes(opt.toLowerCase())
|
||||||
|
) &&
|
||||||
!!cuentaInfo) ||
|
!!cuentaInfo) ||
|
||||||
(isComunidad && negativeOption.includes(isComunidad.label));
|
(isComunidad &&
|
||||||
|
negativeOption.some((opt) =>
|
||||||
|
isComunidad.label?.toLowerCase().includes(opt.toLowerCase())
|
||||||
|
));
|
||||||
|
|
||||||
if (error) {
|
if (error) {
|
||||||
console.error('Error al cargar el cuestionario:', error);
|
console.error('Error al cargar el cuestionario:', error);
|
||||||
@@ -337,7 +343,9 @@ export default function FormularioRegistro({
|
|||||||
)}
|
)}
|
||||||
|
|
||||||
{isComunidad &&
|
{isComunidad &&
|
||||||
confirmativeOption.includes(isComunidad?.label) &&
|
confirmativeOption.some((opt) =>
|
||||||
|
isComunidad.label?.toLowerCase().includes(opt.toLowerCase())
|
||||||
|
) &&
|
||||||
preguntaCuenta && (
|
preguntaCuenta && (
|
||||||
<div className="my-4">
|
<div className="my-4">
|
||||||
<label
|
<label
|
||||||
|
|||||||
Reference in New Issue
Block a user