* chore: user store code refactor * chore: general unauthorized screen asset added * chore: workspace setting sidebar options updated for guest and viewer * chore: NotAuthorizedView component code updated * chore: project setting layout code refactor * chore: workspace setting members and exports page permission validation added * chore: workspace members and exports settings page improvement * chore: project invite modal updated * chore: workspace setting unauthorized access empty state * chore: workspace setting unauthorized access empty state * chore: project settings sidebar permission updated * fix: project settings user role permission updated * chore: app sidebar role permission validation updated * chore: app sidebar role permission validation * chore: disabled page empty state validation * chore: app sidebar add project improvement * chore: guest role changes * fix: user favorite * chore: changed pages permission * chore: guest role changes * fix: app sidebar project item permission * fix: project setting empty state flicker * fix: workspace setting empty state flicker * chore: granted notification permission to viewer * chore: project invite and edit validation updated * chore: favorite validation added for guest and viewer role * chore: create view validation updated * chore: views permission changes * chore: create view empty state validation updated * chore: created ENUM for permissions --------- Co-authored-by: NarayanBavisetti <narayan3119@gmail.com> Co-authored-by: Bavisetti Narayan <72156168+NarayanBavisetti@users.noreply.github.com>
34 lines
923 B
TypeScript
34 lines
923 B
TypeScript
"use client";
|
|
|
|
import { observer } from "mobx-react";
|
|
// component
|
|
import { NotAuthorizedView } from "@/components/auth-screens";
|
|
import { PageHead } from "@/components/core";
|
|
// hooks
|
|
import { useUser, useWorkspace } from "@/hooks/store";
|
|
// plane web components
|
|
import { BillingRoot } from "@/plane-web/components/workspace";
|
|
|
|
const BillingSettingsPage = observer(() => {
|
|
// store hooks
|
|
const {
|
|
canPerformWorkspaceAdminActions,
|
|
membership: { currentWorkspaceRole },
|
|
} = useUser();
|
|
const { currentWorkspace } = useWorkspace();
|
|
// derived values
|
|
const pageTitle = currentWorkspace?.name ? `${currentWorkspace.name} - Billing & Plans` : undefined;
|
|
|
|
if (currentWorkspaceRole && !canPerformWorkspaceAdminActions) {
|
|
return <NotAuthorizedView section="settings" />;
|
|
}
|
|
|
|
return (
|
|
<>
|
|
<PageHead title={pageTitle} />
|
|
<BillingRoot />
|
|
</>
|
|
);
|
|
});
|
|
|
|
export default BillingSettingsPage;
|