-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'NetManagerMapFunc' of github.com:AKATWIJUKA-ELIA/AirQo-…
…frontend into NetManagerMapFunc
- Loading branch information
Showing
44 changed files
with
5,560 additions
and
1,031 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
72 changes: 72 additions & 0 deletions
72
netmanager-app/app/(authenticated)/organizations/[id]/page.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
"use client"; | ||
|
||
import type React from "react"; | ||
import { Suspense } from "react"; | ||
import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs"; | ||
import { OrganizationProfile } from "@/components/Organization/organization-profile"; | ||
import { TeamMembers } from "@/components/Organization/team-members"; | ||
import { OrganizationRoles } from "@/components/Organization/organization-roles"; | ||
import { Skeleton } from "@/components/ui/skeleton"; | ||
import { ArrowLeftIcon } from "lucide-react"; | ||
import { useRouter } from "next/navigation"; | ||
import { Button } from "@/components/ui/button"; | ||
import { RouteGuard } from "@/components/route-guard"; | ||
|
||
const LoadingFallback = () => ( | ||
<div className="space-y-4"> | ||
<Skeleton className="h-8 w-3/4" /> | ||
<Skeleton className="h-64 w-full" /> | ||
</div> | ||
); | ||
|
||
const TabContent = ({ | ||
value, | ||
children, | ||
}: { | ||
value: string; | ||
children: React.ReactNode; | ||
}) => ( | ||
<TabsContent value={value}> | ||
<Suspense fallback={<LoadingFallback />}>{children}</Suspense> | ||
</TabsContent> | ||
); | ||
|
||
const OrganizationDetailsPage = ({ params }: { params: { id: string } }) => { | ||
const router = useRouter(); | ||
|
||
return ( | ||
<RouteGuard permission="CREATE_UPDATE_AND_DELETE_NETWORK_USERS"> | ||
<div className="container mx-auto"> | ||
{/* Back button */} | ||
<Button | ||
variant="ghost" | ||
className="flex items-center space-x-2 mb-6" | ||
onClick={() => router.push("/organizations")} | ||
> | ||
<ArrowLeftIcon className="h-4 w-4" /> | ||
<span>Back to Organizations</span> | ||
</Button> | ||
{/* Organization Details */} | ||
<h1 className="text-3xl font-bold mb-6">Organization Details</h1> | ||
<Tabs defaultValue="profile"> | ||
<TabsList className="grid grid-cols-3"> | ||
<TabsTrigger value="profile">Organization Profile</TabsTrigger> | ||
<TabsTrigger value="members">Team Members</TabsTrigger> | ||
<TabsTrigger value="roles">Organization Roles</TabsTrigger> | ||
</TabsList> | ||
<TabContent value="profile"> | ||
<OrganizationProfile organizationId={params.id} /> | ||
</TabContent> | ||
<TabContent value="members"> | ||
<TeamMembers organizationId={params.id} /> | ||
</TabContent> | ||
<TabContent value="roles"> | ||
<OrganizationRoles organizationId={params.id} /> | ||
</TabContent> | ||
</Tabs> | ||
</div> | ||
</RouteGuard> | ||
); | ||
}; | ||
|
||
export default OrganizationDetailsPage; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
"use client"; | ||
|
||
import { OrganizationList } from "@/components/Organization/List"; | ||
import { RouteGuard } from "@/components/route-guard"; | ||
|
||
const OrganizationSettingsPage = () => { | ||
return ( | ||
<RouteGuard permission="CREATE_UPDATE_AND_DELETE_NETWORK_USERS"> | ||
<div className="mx-auto"> | ||
<OrganizationList /> | ||
</div> | ||
</RouteGuard> | ||
); | ||
}; | ||
|
||
export default OrganizationSettingsPage; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.