Skip to content

Commit 74f3608

Browse files
Recxsmacxromitg2
andauthored
fix: Billings page reorganised (calcom#28053)
* billings page reorganised * Update redirect-apps.generated.ts * small border update * udpate for organization billing page --------- Co-authored-by: Romit <romitgabani1.work@gmail.com> Co-authored-by: Romit <85230081+romitg2@users.noreply.github.com>
1 parent 9bfa416 commit 74f3608

3 files changed

Lines changed: 37 additions & 35 deletions

File tree

apps/web/app/(use-page-wrapper)/settings/(settings-layout)/billing/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const Page = async () => {
2121
<SettingsHeader
2222
title={t("billing")}
2323
description={t("manage_billing_description")}
24-
borderInShellHeader={false}>
24+
borderInShellHeader={true}>
2525
<BillingView />
2626
</SettingsHeader>
2727
);

apps/web/app/(use-page-wrapper)/settings/(settings-layout)/organizations/(org-admin-only)/billing/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ const Page = async () => {
2929
<SettingsHeader
3030
title={t("billing")}
3131
description={t("manage_billing_description")}
32-
borderInShellHeader={false}>
32+
borderInShellHeader={true}>
3333
<BillingView />
3434
</SettingsHeader>
3535
);

apps/web/modules/settings/billing/billing-view.tsx

Lines changed: 35 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -108,45 +108,47 @@ const BillingView = () => {
108108

109109
return (
110110
<>
111-
<div className="bg-cal-muted border-muted mt-5 rounded-xl border p-1">
112-
<div className="bg-default border-muted flex rounded-[10px] border px-5 py-4">
113-
<div className="flex w-full flex-col gap-1">
114-
<h3 className="text-emphasis text-sm font-semibold leading-none">{t("manage_billing")}</h3>
115-
<p className="text-subtle text-sm font-medium leading-tight">
116-
{t("view_and_manage_billing_details")}
117-
</p>
118-
</div>
119-
<Button color="primary" href={billingHref} target="_blank" size="sm" EndIcon="external-link">
120-
{t("billing_portal")}
121-
</Button>
122-
</div>
123-
{isTrialing && (
124-
<div className="bg-default border-muted mt-1 flex rounded-[10px] border px-5 py-4">
111+
<div className="border-subtle rounded-b-lg border border-t-0 px-4 py-8 sm:px-6">
112+
<div className="bg-cal-muted border-muted rounded-xl border p-1">
113+
<div className="bg-default border-muted flex rounded-[10px] border px-5 py-4">
125114
<div className="flex w-full flex-col gap-1">
126-
<h3 className="text-emphasis text-sm font-semibold leading-none">{t("skip_trial")}</h3>
127-
<p className="text-subtle text-sm font-medium leading-tight">{t("skip_trial_description")}</p>
115+
<h3 className="text-emphasis text-sm font-semibold leading-none">{t("manage_billing")}</h3>
116+
<p className="text-subtle text-sm font-medium leading-tight">
117+
{t("view_and_manage_billing_details")}
118+
</p>
128119
</div>
129-
<Button
130-
color="secondary"
131-
size="sm"
132-
onClick={() => setShowSkipTrialDialog(true)}
133-
loading={isLoadingStatus}>
134-
{t("skip_trial")}
120+
<Button color="primary" href={billingHref} target="_blank" size="sm" EndIcon="external-link">
121+
{t("billing_portal")}
122+
</Button>
123+
</div>
124+
{isTrialing && (
125+
<div className="bg-default border-muted mt-1 flex rounded-[10px] border px-5 py-4">
126+
<div className="flex w-full flex-col gap-1">
127+
<h3 className="text-emphasis text-sm font-semibold leading-none">{t("skip_trial")}</h3>
128+
<p className="text-subtle text-sm font-medium leading-tight">{t("skip_trial_description")}</p>
129+
</div>
130+
<Button
131+
color="secondary"
132+
size="sm"
133+
onClick={() => setShowSkipTrialDialog(true)}
134+
loading={isLoadingStatus}>
135+
{t("skip_trial")}
136+
</Button>
137+
</div>
138+
)}
139+
<div className="flex items-center justify-between px-4 py-5">
140+
<p className="text-subtle text-sm font-medium leading-tight">{t("need_help")}</p>
141+
<Button color="secondary" size="sm" onClick={onContactSupportClick}>
142+
{t("contact_support")}
135143
</Button>
136144
</div>
137-
)}
138-
<div className="flex items-center justify-between px-4 py-5">
139-
<p className="text-subtle text-sm font-medium leading-tight">{t("need_help")}</p>
140-
<Button color="secondary" size="sm" onClick={onContactSupportClick}>
141-
{t("contact_support")}
142-
</Button>
143145
</div>
146+
<BillingCredits />
147+
{teamIdNumber && subscriptionStatus?.billingMode === "ACTIVE_USERS" && (
148+
<ActiveUserBreakdown teamId={teamIdNumber} />
149+
)}
150+
<InvoicesTable />
144151
</div>
145-
<BillingCredits />
146-
{teamIdNumber && subscriptionStatus?.billingMode === "ACTIVE_USERS" && (
147-
<ActiveUserBreakdown teamId={teamIdNumber} />
148-
)}
149-
<InvoicesTable />
150152

151153
<Dialog open={showSkipTrialDialog} onOpenChange={setShowSkipTrialDialog}>
152154
<DialogContent>

0 commit comments

Comments
 (0)