feat: update collaborator invitation flow to handle existing users and pending invitations in StepEngine
This commit is contained in:
@@ -341,7 +341,7 @@ function DashboardContent() {
|
||||
selectedCompanyPlanSupportsRepeats &&
|
||||
(isCompanyOwner || selectedOrganization?.isAdmin)
|
||||
);
|
||||
const showFreePlanStarterContent = Boolean(displayedPlan && displayedPlan.price === 0 && organizations.length === 0);
|
||||
const showNoOrganizationStarterContent = Boolean(displayedPlan && organizations.length === 0);
|
||||
const agendaItems = dashboardData?.personalAgenda ?? [];
|
||||
const filteredAgendaItems = agendaItems.filter(item => !showOnlyMine || item.collaboratorId === SessionInfo.userId);
|
||||
|
||||
@@ -518,28 +518,28 @@ function DashboardContent() {
|
||||
</div>
|
||||
)}
|
||||
|
||||
{showFreePlanStarterContent && (
|
||||
{showNoOrganizationStarterContent && (
|
||||
<div className={style.starterCard}>
|
||||
<div className={style.starterContent}>
|
||||
<span className={style.starterEyebrow}>Tu plan gratuito ya está activo</span>
|
||||
<h2>Ahora podés empezar a ofrecer turnos</h2>
|
||||
<span className={style.starterEyebrow}>Tu plan {displayedPlan.name} ya está activo</span>
|
||||
<h2>Creá tu primera organización para empezar a trabajar</h2>
|
||||
<p>
|
||||
Todavía no pertenecés a ninguna organización. Podés crear tu propio negocio con el asistente,
|
||||
o esperar una invitación para sumarte al equipo de una organización existente.
|
||||
Todavía no pertenecés a ninguna organización. Podés seguir el flujo guiado con el asistente
|
||||
o hacerlo manualmente desde Mis Organizaciones.
|
||||
</p>
|
||||
</div>
|
||||
<div className={style.starterActions}>
|
||||
<button className={style.starterPrimaryButton} onClick={() => goTo("/admin/assistant?flow=onboarding-org&action=new-org")}>
|
||||
Crear mi organización
|
||||
Usar el asistente
|
||||
</button>
|
||||
<button className={style.starterSecondaryButton} onClick={() => goTo("/landing/my-appointments")}>
|
||||
Ver mis turnos
|
||||
<button className={style.starterSecondaryButton} onClick={() => goTo("/admin/org")}>
|
||||
Crear manualmente
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{showFreePlanStarterContent && (
|
||||
{showNoOrganizationStarterContent && (
|
||||
<div className={style.starterGuideGrid}>
|
||||
<section className={style.starterGuideCard}>
|
||||
<span className={style.starterGuideNumber}>1</span>
|
||||
@@ -568,10 +568,10 @@ function DashboardContent() {
|
||||
</div>
|
||||
)}
|
||||
|
||||
{showFreePlanStarterContent && (
|
||||
{showNoOrganizationStarterContent && (
|
||||
<div className={style.starterNextStepsPanel}>
|
||||
<div>
|
||||
<span className={style.starterEyebrow}>Qué podés hacer con tu plan básico</span>
|
||||
<span className={style.starterEyebrow}>Qué podés hacer con tu plan</span>
|
||||
<h3>Tu cuenta ya está lista para operar</h3>
|
||||
<p>
|
||||
Usá este primer paso para preparar la base de tu negocio. Cuando tengas tu organización creada,
|
||||
@@ -588,7 +588,7 @@ function DashboardContent() {
|
||||
)}
|
||||
|
||||
{/* Left Column (Sidebar) */}
|
||||
{!showFreePlanStarterContent && <div style={{ display: 'flex', flexDirection: 'column', gap: '20px' }}>
|
||||
{!showNoOrganizationStarterContent && <div style={{ display: 'flex', flexDirection: 'column', gap: '20px' }}>
|
||||
{/* Agenda del Día */}
|
||||
{dashboardData && dashboardData.role !== "NONE" && (
|
||||
<div className={style.agendaCard}>
|
||||
@@ -674,7 +674,7 @@ function DashboardContent() {
|
||||
</div>}
|
||||
|
||||
{/* Right Column (Main Content) */}
|
||||
{!showFreePlanStarterContent && <div style={{ display: 'flex', flexDirection: 'column', gap: '20px' }}>
|
||||
{!showNoOrganizationStarterContent && <div style={{ display: 'flex', flexDirection: 'column', gap: '20px' }}>
|
||||
{/* Rendimiento Financiero (Only for ADMIN) */}
|
||||
{dashboardData && dashboardData.role === "ADMIN" && (
|
||||
<FinancialWidget
|
||||
|
||||
Reference in New Issue
Block a user