feat: add fee workspace and polish AI presentation
This commit is contained in:
5
app/(app)/app/[organizationSlug]/billing/page.tsx
Normal file
5
app/(app)/app/[organizationSlug]/billing/page.tsx
Normal file
@@ -0,0 +1,5 @@
|
||||
import BillingPage from "../../billing/page";
|
||||
|
||||
export default async function ScopedBillingPage(): Promise<React.ReactElement> {
|
||||
return BillingPage();
|
||||
}
|
||||
20
app/(app)/app/billing/page.tsx
Normal file
20
app/(app)/app/billing/page.tsx
Normal file
@@ -0,0 +1,20 @@
|
||||
import { redirect } from "next/navigation";
|
||||
|
||||
import { BillingWorkspaceClient } from "@/modules/billing/components/BillingWorkspaceClient";
|
||||
import { createInitialBillingStatements } from "@/modules/billing/lib/presentation-data";
|
||||
import { getCurrentAuthContext } from "@/modules/core/server/auth";
|
||||
import { hasPermission } from "@/modules/core/server/permissions";
|
||||
import { getWorkspaceHref } from "@/modules/shared/lib/workspace-routing";
|
||||
|
||||
export default async function BillingPage(): Promise<React.ReactElement> {
|
||||
const context = await getCurrentAuthContext();
|
||||
if (!context) {
|
||||
redirect("/login");
|
||||
}
|
||||
|
||||
if (!context.organization || !hasPermission(context.permissions, "admission:manage")) {
|
||||
redirect(getWorkspaceHref(context.organization?.slug, "/dashboard"));
|
||||
}
|
||||
|
||||
return <BillingWorkspaceClient initialStatements={createInitialBillingStatements()} />;
|
||||
}
|
||||
Reference in New Issue
Block a user