feat: add manual subscription finalization functionality and support for expired plan notifications
This commit is contained in:
@@ -278,6 +278,43 @@
|
||||
font-weight: 800;
|
||||
}
|
||||
|
||||
.expiredDowngradeNotice {
|
||||
margin: 0;
|
||||
padding: 18px 20px;
|
||||
border: 1px solid rgba(194, 65, 12, 0.24);
|
||||
border-radius: 18px;
|
||||
background: #fff7ed;
|
||||
color: #7c2d12;
|
||||
box-shadow: 0 12px 28px rgba(194, 65, 12, 0.08);
|
||||
}
|
||||
|
||||
.expiredDowngradeNotice span {
|
||||
display: inline-flex;
|
||||
width: fit-content;
|
||||
margin-bottom: 8px;
|
||||
padding: 5px 11px;
|
||||
border-radius: 999px;
|
||||
background: rgba(194, 65, 12, 0.12);
|
||||
color: #9a3412;
|
||||
font-size: 12px;
|
||||
font-weight: 900;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.04em;
|
||||
}
|
||||
|
||||
.expiredDowngradeNotice strong {
|
||||
display: block;
|
||||
color: #7c2d12;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.expiredDowngradeNotice p {
|
||||
margin: 8px 0 0;
|
||||
color: #9a3412;
|
||||
line-height: 1.55;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.section {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
@@ -107,6 +107,11 @@ export default function CurrentPlanPage() {
|
||||
const plan = subscription?.plan;
|
||||
const isPaidPlan = Boolean(plan && plan.price > 0);
|
||||
const statusText = isPaidPlan ? getSubStatusText(subscription?.mpStatus) : "ACTIVO";
|
||||
const showExpiredDowngradeNotice = Boolean(
|
||||
isOwner &&
|
||||
subscription?.downgradeReason === "expired" &&
|
||||
subscription.downgradedAt
|
||||
);
|
||||
const canRenew = Boolean(
|
||||
isOwner &&
|
||||
isPaidPlan &&
|
||||
@@ -216,6 +221,17 @@ export default function CurrentPlanPage() {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{showExpiredDowngradeNotice && (
|
||||
<div className={styles.expiredDowngradeNotice}>
|
||||
<span>Plan vencido</span>
|
||||
<strong>Tu plan pago venció y esta organización pasó al plan básico.</strong>
|
||||
<p>
|
||||
No borramos tu organización ni tus datos. Los límites cambiaron y las nuevas acciones se validan con el plan básico.
|
||||
{subscription.downgradedFromPlanName && ` Tu plan anterior era ${subscription.downgradedFromPlanName}.`}
|
||||
</p>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{!isPaidPlan && (
|
||||
<p className={styles.notice}>Estás usando el plan gratis. No tiene vencimiento pago.</p>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user