billing skeleton

This commit is contained in:
Alex Holliday committed 2025-11-30 17:16:30 +00:00
1 parent d76da4b00c
commit 6bca0ed00b
6 files changed
+35

No files matched your search

@@ -47,6 +47,9 @@ export const SettingsSwitch = () => {
orgPermissions.includes("monitors.read") ||
orgPermissions.includes("*");
const hasBilling =
orgPermissions.includes("billing.*") || orgPermissions.includes("*");
const hasMaster = orgPermissions.includes("master");
return (
@@ -102,6 +105,11 @@ export const SettingsSwitch = () => {
<Typography>Invite</Typography>
</MenuItem>
)}
{hasBilling && (
<MenuItem onClick={() => handleClick("billing")}>
<Typography>Billing</Typography>
</MenuItem>
)}
</Menu>
</>
);
+19
View File
@@ -0,0 +1,19 @@
import { BasePage, InfoBox } from "@/components/design-elements";
import { useAppSelector } from "@/hooks/AppHooks";
const BillingPage = () => {
const { user } = useAppSelector((state) => state.auth);
console.log(user);
return (
<BasePage>
<InfoBox
title="Choose a plan!"
description="Choose a plan that fits your needs and start enjoying our services."
/>
</BasePage>
);
};
export default BillingPage;
+2
View File
@@ -53,6 +53,7 @@ import NotFound from "@/pages/errors/NotFound";
import RootLayout from "@/components/layouts/RootLayout";
import { ProtectedRoute } from "@/components/protected-route";
import BillingPage from "@/pages/billing/Billing";
const Router = () => {
return (
@@ -141,6 +142,7 @@ const Router = () => {
<Route path="profile" element={<ProfilePage />} />
<Route path="export" element={<ExportPage />} />
<Route path="billing" element={<BillingPage />} />
</Route>
<Route path="no-team" element={<NoTeam />} />
<Route path="*" element={<NotFound />} />
+1
View File
@@ -7,6 +7,7 @@ export interface IUser {
lastName: string;
org: {
name: string;
planKey: string;
permissions: string[];
};
teams: {
+1
View File
@@ -28,6 +28,7 @@ export interface IUserReturnable {
lastName: string;
org: {
name: string;
planKey: string;
permissions: string[];
};
teams: {
@@ -125,6 +125,7 @@ class AuthService implements IAuthService {
lastName: user.lastName,
org: {
name: org.name,
planKey: org.planKey,
permissions: orgRoles?.permissions || [],
},
teams: returnableTeams,
@@ -261,6 +262,7 @@ class AuthService implements IAuthService {
lastName: user.lastName,
org: {
name: org.name,
planKey: org.planKey,
permissions: roles[0]?.permissions || [],
},
teams: [returnableTeam],
@@ -397,6 +399,7 @@ class AuthService implements IAuthService {
lastName: user.lastName,
org: {
name: org.name,
planKey: org.planKey,
permissions: orgPermissions,
},
teams: returnableTeams,
@@ -503,6 +506,7 @@ class AuthService implements IAuthService {
lastName: user.lastName,
org: {
name: org.name,
planKey: org.planKey,
permissions: orgRoles?.permissions || [],
},
teams: returnableTeams,