// SellerOnboarding.jsx — multi-step onboarding for a new seller signing up to sell on Allen.
// Steps: business info -> RFC/tax -> address -> bank -> first product (optional) -> done.
const { useState: useOnbState } = React;
const STEPS = [
{ id: "negocio", label: "Tu negocio" },
{ id: "fiscal", label: "Datos fiscales" },
{ id: "direccion", label: "Dirección" },
{ id: "banco", label: "Cuenta bancaria" },
{ id: "verifica", label: "Verificación" },
];
const SellerOnboarding = ({ onNav }) => {
const [step, setStep] = useOnbState(0);
const [form, setForm] = useOnbState({
business: "", category: "herramientas", year: "", desc: "",
rfc: "", regimen: "rif", razonSocial: "",
street: "", area: "", city: "Puerto Vallarta", state: "Jalisco", zip: "",
bank: "BBVA", clabe: "", titular: "",
accept: false,
});
const set = (k, v) => setForm(f => ({ ...f, [k]: v }));
const toast = useToast();
const next = () => {
if (step < STEPS.length - 1) setStep(s => s + 1);
else {
toast("¡Solicitud enviada! Te avisamos en menos de 24 h");
onNav("seller");
}
};
const prev = () => step > 0 && setStep(s => s - 1);
return (
Vende en Allen
Te toma 5 minutos. Aprobamos tu tienda en menos de 24 horas.
{/* Stepper */}
{STEPS.map((s, i) => (
))}
{step === 0 &&
}
{step === 1 &&
}
{step === 2 &&
}
{step === 3 &&
}
{step === 4 &&
}
{step === STEPS.length - 1 ? "Enviar solicitud" : "Continuar"}
{/* Help footer */}
¿Dudas con el registro?
WhatsApp: +52 33 5555 0202 · sellers@allenmx.com
);
};
const StepBusiness = ({ form, set }) => (
<>
Cuéntanos de tu negocio
Estos datos se ven en tu tienda pública.
set("business", e.target.value)} />
set("year", e.target.value)} />
>
);
const StepTax = ({ form, set }) => (
<>
Datos fiscales
Necesarios para facturar y cumplir con SAT. Cifrados extremo a extremo.
set("razonSocial", e.target.value)} />
set("rfc", e.target.value.toUpperCase())} maxLength={13} style={{ fontFamily: "var(--font-mono)", letterSpacing: ".08em" }} />
Tus datos fiscales están cifrados. Solo el SAT y tú podemos verlos. Allen usa ellos para emitir tu CFDI de comisión.
>
);
const StepAddress = ({ form, set }) => (
<>
Dirección de origen
Desde dónde envías tus pedidos. Puedes agregar más direcciones después.
set("street", e.target.value)} />
set("area", e.target.value)} />
set("zip", e.target.value)} maxLength={5} />
set("city", e.target.value)} />
set("state", e.target.value)} />
>
);
const StepBank = ({ form, set }) => (
<>
Cuenta para depósitos
Allen deposita el monto neto de tus ventas (descontada la comisión) cada lunes.
set("clabe", e.target.value.replace(/\D/g, ""))} maxLength={18} style={{ fontFamily: "var(--font-mono)", letterSpacing: ".05em" }} />
set("titular", e.target.value)} />
Cuenta verificada por SPEI. Validamos que el titular coincida con tu razón social.
>
);
const StepReview = ({ form, set }) => (
<>
Revisa y envía
Te avisamos en menos de 24 horas. Mientras tanto, puedes preparar tu primer producto.
{[
{ k: "Negocio", v: form.business || "—" },
{ k: "Categoría", v: CATEGORIES.find(c => c.id === form.category)?.label },
{ k: "RFC", v: form.rfc || "—", mono: true },
{ k: "Razón social", v: form.razonSocial || "—" },
{ k: "Dirección", v: form.street ? `${form.street}, ${form.area}, ${form.city}` : "—" },
{ k: "Banco", v: `${form.bank} · ${form.clabe ? "•••• " + form.clabe.slice(-4) : "—"}` },
].map(row => (
{row.k}
{row.v}
))}
>
);
window.SellerOnboarding = SellerOnboarding;