Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

move to production #2506

Merged
merged 81 commits into from
Feb 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
81 commits
Select commit Hold shift + click to select a range
10185d4
Add organization page component for authenticated users
danielmarv Feb 10, 2025
e006f8f
Add organization management components and API integration
danielmarv Feb 10, 2025
9be6e0b
Refactor API endpoints to use USERS_MGT_URL for group management
danielmarv Feb 10, 2025
b1a6c64
Fix API endpoints to use 'groups' instead of 'grids' for group detail…
danielmarv Feb 10, 2025
3de29c1
Add group types and Redux slice for group management
danielmarv Feb 10, 2025
4fa10fc
Rename 'grids' to 'groups' in API and hooks for consistency in group …
danielmarv Feb 10, 2025
51c5daa
Refactor group-related types and hooks for consistency in group manag…
danielmarv Feb 11, 2025
f363f30
Refactor useGroups hook for improved readability and consistency
danielmarv Feb 11, 2025
1b3359b
Rename useGrids hook to useGroups for consistency in group management
danielmarv Feb 11, 2025
a03c267
Refactor useGroups hook for improved readability and add groups reduc…
danielmarv Feb 11, 2025
16ad002
Refactor organization components and hooks for improved consistency a…
danielmarv Feb 11, 2025
8a39ee9
Add roles API and refactor OrganizationRoles component for improved r…
danielmarv Feb 11, 2025
76d269a
Add roles management: define Role and Permission types, implement rol…
danielmarv Feb 11, 2025
addc4c3
Refactor organization components to streamline role management and im…
danielmarv Feb 11, 2025
29fc5f7
Refactor OrganizationRoles component: improve role creation logic and…
danielmarv Feb 12, 2025
110558e
Refactor OrganizationRoles component: integrate useAppSelector for ne…
danielmarv Feb 12, 2025
23d234f
Add group members management: define GroupMember and GroupMembersResp…
danielmarv Feb 12, 2025
6711426
Add team members management: implement useTeamMembers hook for fetchi…
danielmarv Feb 12, 2025
e8f8d30
Refactor group management: add group details slice, enhance loading/e…
danielmarv Feb 12, 2025
3e37d5f
Refactor organization profile and team members components: enhance lo…
danielmarv Feb 12, 2025
35e4d0d
Refactor TeamMembers component: enhance loading/error handling, impro…
danielmarv Feb 13, 2025
7a23442
Refactor TeamMembers component: streamline role selection logic, enha…
danielmarv Feb 13, 2025
f1fa604
Refactor organization roles and team members components: simplify rol…
danielmarv Feb 13, 2025
93d6379
Enhance organization profile and roles components: improve form handl…
danielmarv Feb 13, 2025
2e34d0e
Enhance Organizations List: Add pagination, search, and improved UI f…
danielmarv Feb 13, 2025
b9b8dc9
Improve loading states in organization components: Replace placeholde…
danielmarv Feb 13, 2025
682ad0f
Add Radix UI Switch and enhance Organization Profile component with m…
danielmarv Feb 13, 2025
e352dc6
Add react-timezone-select and refactor organization components: impro…
danielmarv Feb 14, 2025
e4cc9a2
my first commet
francislub Feb 14, 2025
46f004c
my first commet
francislub Feb 14, 2025
da52907
more in the side bar
francislub Feb 15, 2025
8ed723a
more
francislub Feb 15, 2025
ad6580d
advanced nav
francislub Feb 15, 2025
8459b7c
more about responsivenss
francislub Feb 15, 2025
06c7454
completing navigation on different devices
francislub Feb 15, 2025
11361e8
Implement multi-step organization creation workflow with enhanced for…
danielmarv Feb 15, 2025
3ab0ccc
Merge remote-tracking branch 'origin/staging' into migrate-net-daniel
danielmarv Feb 15, 2025
99cfcc8
Enhance organization creation workflow with site creation and error h…
danielmarv Feb 16, 2025
98a251f
Refactor Organization Management Components: Enhance UI, Sorting, and…
danielmarv Feb 16, 2025
bb7f051
Refactor Organizations List: Add Advanced Sorting and Improved UI
danielmarv Feb 16, 2025
9e4f3c1
Refactor Organization Profile: Migrate to React Query for State Manag…
danielmarv Feb 16, 2025
dc0263d
Fix Organization Profile Badge Status Display
danielmarv Feb 16, 2025
8d55081
Refactor Team Members Invite Flow: Implement React Query Mutation
danielmarv Feb 16, 2025
0f1fa03
Refactor MyProfile Component: Improve UI, Error Handling, and User Ex…
danielmarv Feb 16, 2025
04aa7e0
Enhance Password Edit Component: Improve Security and User Experience
danielmarv Feb 16, 2025
7daf88d
Enhance API Tokens Management: Add Sorting, Search, and Pagination Fe…
danielmarv Feb 16, 2025
0243d55
Refactor Hooks: Improve Type Safety and Code Organization
danielmarv Feb 16, 2025
23701f6
Update Industry Options and Remove Commented Code
danielmarv Feb 16, 2025
8c40579
Simplify Site Creation Logic in Organization Dialog
danielmarv Feb 16, 2025
7d40c1b
about networks
francislub Feb 17, 2025
84283ca
removed __
francislub Feb 17, 2025
2e9a364
removed map to mapicon
francislub Feb 17, 2025
9c58433
Refactor Create Organization Dialog: Implement Site and Device Select…
danielmarv Feb 17, 2025
b57e870
Add TypeScript Types for react-select-country-list
danielmarv Feb 17, 2025
df2ff10
Refactor Create Organization Dialog: Update Hooks and Data Fetching
danielmarv Feb 17, 2025
7ee003d
Enhance Create Organization Dialog: Improve UI, Navigation, and User …
danielmarv Feb 17, 2025
7aea551
Add Search Functionality and UI Enhancements to Create Organization D…
danielmarv Feb 17, 2025
0a72260
removed the .idea
francislub Feb 18, 2025
258f201
added the logo
francislub Feb 18, 2025
d16124d
Refactor Create Organization Dialog: Simplify Multi-Step Form and Imp…
danielmarv Feb 18, 2025
f9e5bef
added the nav
francislub Feb 18, 2025
f07d5f5
Refactor Group Management: Update API Calls and Hooks for Improved Fu…
danielmarv Feb 18, 2025
4dba9f2
nave
francislub Feb 18, 2025
7329490
more about images
francislub Feb 18, 2025
48c0977
Add Group Activation Feature to Organization List
danielmarv Feb 18, 2025
0cc61b1
Merge branch 'airqo-platform:staging' into francisPro
francislub Feb 18, 2025
cff63ff
more about footer
francislub Feb 18, 2025
7f0c799
Remove unused variable assignment for groupId in Create Organization …
danielmarv Feb 20, 2025
6c1b5a8
Merge remote-tracking branch 'origin/staging' into migrate-net-daniel
danielmarv Feb 23, 2025
c375af9
fix desktop sidebar scrolling
Codebmk Feb 24, 2025
ac2fd37
center icons for collapsed sidebar
Codebmk Feb 24, 2025
6f1fd4f
code cleanup and ui enhancements
Codebmk Feb 24, 2025
12c07e3
added page access control on organisation pages
Codebmk Feb 24, 2025
af3fd5c
remove unused imports
Codebmk Feb 24, 2025
9228e8a
organisation formatting and truncate for long names
Codebmk Feb 24, 2025
c5225e0
Fix for the Google analytics component
OchiengPaul442 Feb 24, 2025
d84bf43
Merge remote-tracking branch 'upstream/staging' into website-content-…
OchiengPaul442 Feb 24, 2025
34e6867
updates the code
OchiengPaul442 Feb 24, 2025
2f640ad
Merge pull request #2454 from airqo-platform/migrate-net-daniel
Baalmart Feb 24, 2025
415ca9f
Merge pull request #2475 from francislub/francisPro
Baalmart Feb 24, 2025
6efd254
Merge pull request #2505 from airqo-platform/website-content-updates2
Baalmart Feb 24, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions netmanager-app/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ build/Release
node_modules/
jspm_packages/

# Removing the idea
.idea/


# TypeScript v1 declaration files
typings/

Expand Down
2 changes: 0 additions & 2 deletions netmanager-app/app/(authenticated)/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import "../globals.css";
import Layout from "../../components/layout";
import { Toaster } from "@/components/ui/sonner";

export default function AuthenticatedLayout({
children,
Expand All @@ -12,7 +11,6 @@ export default function AuthenticatedLayout({
return (
<Layout>
{children}
<Toaster />
</Layout>
);
}
72 changes: 72 additions & 0 deletions netmanager-app/app/(authenticated)/organizations/[id]/page.tsx
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;
16 changes: 16 additions & 0 deletions netmanager-app/app/(authenticated)/organizations/page.tsx
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;
2 changes: 2 additions & 0 deletions netmanager-app/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Inter } from "next/font/google";
import "./globals.css";
import Providers from "./providers";
import { Toaster } from "@/components/ui/sonner";

const inter = Inter({ subsets: ["latin"] });

Expand All @@ -13,6 +14,7 @@ export default function RootLayout({
<html lang="en">
<body className={inter.className}>
<Providers>{children}</Providers>
<Toaster />
</body>
</html>
);
Expand Down
51 changes: 51 additions & 0 deletions netmanager-app/app/types/groups.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
import { UserDetails } from "@/app/types/users";

export interface Group {
_id: string
grp_status: "ACTIVE" | "INACTIVE"
grp_profile_picture: string
grp_title: string
grp_description: string
grp_website: string
grp_industry: string
grp_country: string
grp_timezone: string
createdAt: string
numberOfGroupUsers: number
grp_users: UserDetails[]
grp_manager: UserDetails
}

export interface GroupResponse {
success: boolean
message: string
group: Group
}

interface RolePermission {
_id: string;
permission: string;
};

export interface GroupMember {
_id: string;
email: string;
firstName: string;
lastName: string;
userName: string;
profilePicture: string;
jobTitle: string;
isActive: boolean;
lastLogin: string;
createdAt: string;
role_name: string;
role_id: string;
role_permissions: RolePermission[];
};

export interface GroupMembersResponse {
success: boolean;
message: string;
group_members: GroupMember[];
};

38 changes: 38 additions & 0 deletions netmanager-app/app/types/roles.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
export interface Permission {
_id: string;
permission: string;
}

export interface Group {
_id: string;
grp_status: string;
grp_profile_picture: string;
grp_title: string;
grp_description: string;
grp_website: string;
grp_industry: string;
grp_country: string;
grp_timezone: string;
grp_manager: string;
grp_manager_username: string;
grp_manager_firstname: string;
grp_manager_lastname: string;
createdAt: string;
updatedAt: string;
__v: number;
}

export interface Role {
_id: string;
role_status: string;
role_name: string;
role_permissions: Permission[];
group?: Group;
}

export interface RolesResponse {
success: boolean;
message: string;
roles: Role[];
}

Loading