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("monitors.read") ||
orgPermissions.includes("*"); orgPermissions.includes("*");
const hasBilling =
orgPermissions.includes("billing.*") || orgPermissions.includes("*");
const hasMaster = orgPermissions.includes("master"); const hasMaster = orgPermissions.includes("master");
return ( return (
@@ -102,6 +105,11 @@ export const SettingsSwitch = () => {
<Typography>Invite</Typography> <Typography>Invite</Typography>
</MenuItem> </MenuItem>
)} )}
{hasBilling && (
<MenuItem onClick={() => handleClick("billing")}>
<Typography>Billing</Typography>
</MenuItem>
)}
</Menu> </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 RootLayout from "@/components/layouts/RootLayout";
import { ProtectedRoute } from "@/components/protected-route"; import { ProtectedRoute } from "@/components/protected-route";
import BillingPage from "@/pages/billing/Billing";
const Router = () => { const Router = () => {
return ( return (
@@ -141,6 +142,7 @@ const Router = () => {
<Route path="profile" element={<ProfilePage />} /> <Route path="profile" element={<ProfilePage />} />
<Route path="export" element={<ExportPage />} /> <Route path="export" element={<ExportPage />} />
<Route path="billing" element={<BillingPage />} />
</Route> </Route>
<Route path="no-team" element={<NoTeam />} /> <Route path="no-team" element={<NoTeam />} />
<Route path="*" element={<NotFound />} /> <Route path="*" element={<NotFound />} />
+1
View File
@@ -7,6 +7,7 @@ export interface IUser {
lastName: string; lastName: string;
org: { org: {
name: string; name: string;
planKey: string;
permissions: string[]; permissions: string[];
}; };
teams: { teams: {
+1
View File
@@ -28,6 +28,7 @@ export interface IUserReturnable {
lastName: string; lastName: string;
org: { org: {
name: string; name: string;
planKey: string;
permissions: string[]; permissions: string[];
}; };
teams: { teams: {
@@ -125,6 +125,7 @@ class AuthService implements IAuthService {
lastName: user.lastName, lastName: user.lastName,
org: { org: {
name: org.name, name: org.name,
planKey: org.planKey,
permissions: orgRoles?.permissions || [], permissions: orgRoles?.permissions || [],
}, },
teams: returnableTeams, teams: returnableTeams,
@@ -261,6 +262,7 @@ class AuthService implements IAuthService {
lastName: user.lastName, lastName: user.lastName,
org: { org: {
name: org.name, name: org.name,
planKey: org.planKey,
permissions: roles[0]?.permissions || [], permissions: roles[0]?.permissions || [],
}, },
teams: [returnableTeam], teams: [returnableTeam],
@@ -397,6 +399,7 @@ class AuthService implements IAuthService {
lastName: user.lastName, lastName: user.lastName,
org: { org: {
name: org.name, name: org.name,
planKey: org.planKey,
permissions: orgPermissions, permissions: orgPermissions,
}, },
teams: returnableTeams, teams: returnableTeams,
@@ -503,6 +506,7 @@ class AuthService implements IAuthService {
lastName: user.lastName, lastName: user.lastName,
org: { org: {
name: org.name, name: org.name,
planKey: org.planKey,
permissions: orgRoles?.permissions || [], permissions: orgRoles?.permissions || [],
}, },
teams: returnableTeams, teams: returnableTeams,