Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

feat: addressed llm review

=10fe57f80d25
diff --git a/frontend/src/hooks/api/billingV2/queries.tsx b/frontend/src/hooks/api/billingV2/queries.tsx
index d432ec94ea..13ccdf1870 100644
--- a/frontend/src/hooks/api/billingV2/queries.tsx
+++ b/frontend/src/hooks/api/billingV2/queries.tsx
@@ -34,7 +34,8 @@ export const useGetBillingV2Overview = (orgId: string) => {
return overview;
},
enabled: Boolean(orgId),
- placeholderData: keepPreviousData
+ placeholderData: keepPreviousData,
+ refetchOnWindowFocus: "always"
});
};
diff --git a/frontend/src/pages/organization/BillingV2Page/components/Banner.tsx b/frontend/src/pages/organization/BillingV2Page/components/Banner.tsx
index af703cec8e..434e3afd5a 100644
--- a/frontend/src/pages/organization/BillingV2Page/components/Banner.tsx
+++ b/frontend/src/pages/organization/BillingV2Page/components/Banner.tsx
@@ -52,14 +52,14 @@ const PAYMENT_ALERT: Record<
icon: TriangleAlert,
title: "Your bank needs you to approve your renewal payment",
body: "Approve the payment to keep your products active.",
- actionLabel: "Approve payment"
+ actionLabel: "Approve Payment"
},
failed: {
variant: "danger",
icon: CircleAlert,
title: "Your last payment failed",
body: "Pay the open invoice or update your payment method to avoid losing access.",
- actionLabel: "Pay invoice"
+ actionLabel: "Pay Invoice"
}
};
@@ -88,7 +88,11 @@ export const Banner = ({
}
if (paymentAlert) {
- const alert = PAYMENT_ALERT[paymentAlert.state];
+ // Access is already paused when suspended, so keep that copy and only borrow the payment action.
+ const alert =
+ subState === "suspended"
+ ? { ...PAYMENT_ALERT[paymentAlert.state], ...DUNNING.suspended }
+ : PAYMENT_ALERT[paymentAlert.state];
const AlertIcon = alert.icon;
return (
<Alert variant={alert.variant}>
@@ -109,7 +113,7 @@ export const Banner = ({
{paymentAlert.state === "failed" && (
<Button variant="outline" size="sm" onClick={onUpdatePayment}>
<CreditCard />
- Update payment method
+ Update Payment Method
</Button>
)}
</div>
diff --git a/frontend/src/pages/organization/BillingV2Page/components/Overview.tsx b/frontend/src/pages/organization/BillingV2Page/components/Overview.tsx
index 1987b29a0f..74754c129e 100644
--- a/frontend/src/pages/organization/BillingV2Page/components/Overview.tsx
+++ b/frontend/src/pages/organization/BillingV2Page/components/Overview.tsx
@@ -196,6 +196,16 @@ export const Overview = ({
onUpdatePayment={onUpdatePayment}
onManageSubscription={onManageSubscription}
/>
+ <TrialBanners
+ overview={overview}
+ catalog={catalog}
+ readOnly={productsReadOnly}
+ onManage={onUpgrade}
+ onUpdatePayment={onUpdatePayment}
+ onContact={onContact}
+ onCompleteTrialPayment={onCompleteTrialPayment}
+ isCompletingTrialPayment={isCompletingTrialPayment}
+ />
<ProductsCard
key="products"
overview={overview}
diff --git a/frontend/src/pages/organization/BillingV2Page/components/TrialBanners.tsx b/frontend/src/pages/organization/BillingV2Page/components/TrialBanners.tsx
index 399da1be33..3ac86f129d 100644
--- a/frontend/src/pages/organization/BillingV2Page/components/TrialBanners.tsx
+++ b/frontend/src/pages/organization/BillingV2Page/components/TrialBanners.tsx
@@ -108,7 +108,7 @@ export const TrialBanners = ({
isPending={isCompletingTrialPayment}
onClick={onCompleteTrialPayment}
>
- Complete payment
+ Complete Payment
</Button>
</div>
)}
@@ -163,7 +163,7 @@ export const TrialBanners = ({
{canAct && (
<div className="mt-3 flex flex-wrap gap-2">
<Button variant="ghost" size="xs" onClick={() => onManage(trial.productKey)}>
- View plans
+ View Plans
</Button>
</div>
)}
diff --git a/frontend/src/pages/organization/BillingV2Page/components/shared.tsx b/frontend/src/pages/organization/BillingV2Page/components/shared.tsx
index 5370f34c2d..b1a96cacb7 100644
--- a/frontend/src/pages/organization/BillingV2Page/components/shared.tsx
+++ b/frontend/src/pages/organization/BillingV2Page/components/shared.tsx
@@ -352,7 +352,7 @@ export const PaymentActionRequiredNotice = ({ orgId }: { orgId: string }) => {
)
}
>
- Open billing portal
+ Open Billing Portal
</Button>
</div>
</AlertDescription>
@@ -373,7 +373,7 @@ export const PaymentApprovalNotice = ({ paymentUrl }: { paymentUrl: string }) =>
onClick={() => window.open(paymentUrl, "_blank", "noopener,noreferrer")}
>
<ExternalLink />
- Approve payment
+ Approve Payment
</Button>
</div>
</AlertDescription>