Skip to content

Commit

Permalink
Org settings page without content
Browse files Browse the repository at this point in the history
  • Loading branch information
MrBartusek committed Nov 23, 2023
1 parent 669af1d commit c786ac5
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 0 deletions.
48 changes: 48 additions & 0 deletions apps/client/src/components/Pages/OrganizationSettingsPage.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
import { BsBuildingGear, BsChevronLeft, BsPencil, BsTrash } from 'react-icons/bs';
import { Link, useNavigate, useParams } from 'react-router-dom';
import OrganizationSettingsSection from '../../OrganizationSettingsSection';
import useOrganizationDetails from '../../hooks/useOrganisationDetails';
import { Utils } from '../../utils';
import Button from '../Button';
import Container from '../Container';
import EntityActionsRow from '../Entity/EntityActionsRow';
import EntityInfoTable from '../Entity/EntityInfoTable';
import HeaderWithHint from '../HeaderWithHint';
import IconButton from '../IconButton';
import DashboardLayout from '../Layout/DasboardLayout';
import Loader from '../Loader';
import { SecondaryNavbar } from '../SecondaryNavbar';
import WarehousesList from '../WarehousesList';

function OrganizationSettingsPage() {
const { id } = useParams();
const { organization, isLoading, error } = useOrganizationDetails(id);
const navigate = useNavigate();

return (
<DashboardLayout>
<SecondaryNavbar
icon={BsBuildingGear}
title={`${organization?.name} - settings`}
actions={
<Link to="..">
<Button className="flex items-center gap-3">
<BsChevronLeft size={20} />
Go back
</Button>
</Link>
}
/>
<Loader
isLoading={isLoading}
isError={error != undefined}
>
<Container>
<div>form</div>
</Container>
</Loader>
</DashboardLayout>
);
}

export default OrganizationSettingsPage;
5 changes: 5 additions & 0 deletions apps/client/src/components/Router.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import RegisterSelect from './RegisterSelect';
import { ProtectedRoute, PublicRoute } from './SpecialRoutes';
import InventoryViewPage from './Pages/InventoryViewPage';
import OrganizationViewPage from './Pages/OrganizationViewPage';
import OrganizationSettingsPage from './Pages/OrganizationSettingsPage';

function Router() {
const router = createBrowserRouter([
Expand Down Expand Up @@ -95,6 +96,10 @@ function Router() {
path: 'view/:id',
element: <OrganizationViewPage />,
},
{
path: 'settings/:id',
element: <OrganizationSettingsPage />,
},
{
path: ':organization/:warehouse',
element: <DashboardPage />,
Expand Down

0 comments on commit c786ac5

Please sign in to comment.