From 48043934ab045b3920e70684fa3d8a6940666cd6 Mon Sep 17 00:00:00 2001 From: manideepyelugam Date: Mon, 18 May 2026 21:46:50 +0530 Subject: [PATCH 1/2] fixed organization ui, setting ui --- .../[workspaceId]/organization/client.tsx | 1308 +++++++++-------- .../spaces/[spaceId]/settings/client.tsx | 35 +- src/components/breadcrumb.tsx | 6 +- src/components/sidebar.tsx | 4 +- .../components/organization-audit-logs.tsx | 265 ++-- .../organization-billing-settings.tsx | 780 ++++------ .../components/organization-rewards.tsx | 142 +- .../components/edit-workspace-form.tsx | 14 +- 8 files changed, 1273 insertions(+), 1281 deletions(-) diff --git a/src/app/(dashboard)/workspaces/[workspaceId]/organization/client.tsx b/src/app/(dashboard)/workspaces/[workspaceId]/organization/client.tsx index 884eef8e..06520b26 100644 --- a/src/app/(dashboard)/workspaces/[workspaceId]/organization/client.tsx +++ b/src/app/(dashboard)/workspaces/[workspaceId]/organization/client.tsx @@ -8,10 +8,9 @@ import { format } from "date-fns"; import { toast } from "sonner"; import { Building2, Users, Settings2, Shield, Trash2, Crown, - CreditCard, AlertTriangle, FileText, Loader2, Clock, Hash, UserPlus, Mail, BarChart3, ImageIcon, + CreditCard, AlertTriangle, FileText, Loader2, UserPlus, Mail, BarChart3, ImageIcon, Gift, Eye } from "lucide-react"; -import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card"; import { Badge } from "@/components/ui/badge"; import { Button } from "@/components/ui/button"; import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar"; @@ -386,7 +385,7 @@ export const OrganizationSettingsClient = () => { return (
{/* Header */} -
+
{isLoadingOrg ? ( @@ -423,540 +422,695 @@ export const OrganizationSettingsClient = () => { {/* Tabs */} - - - - General - - {hasPermission(OrgPermissionKey.MEMBERS_VIEW) && ( - - - Members - - {members.length} - - - )} - {hasPermission(OrgPermissionKey.SECURITY_VIEW) && ( - - - Security - - )} - {hasPermission(OrgPermissionKey.DEPARTMENTS_MANAGE) && ( - - - Departments - - )} - {hasPermission(OrgPermissionKey.BILLING_VIEW) && ( - - - Billing - - )} - {hasPermission(OrgPermissionKey.AUDIT_VIEW) && ( + - - Audit - - )} - - - Rewards - + value="general" + className=" + relative rounded-lg px-4 py-1 text-sm + transition-all duration-200 + data-[state=active]:bg-blue-500/10 + data-[state=active]:text-blue-700 + data-[state=active]:shadow-none + hover:bg-blue-500/10 + hover:text-blue-700 + " + > + + General + + {hasPermission(OrgPermissionKey.MEMBERS_VIEW) && ( + + + Members + + + {members.length} + + + )} + {hasPermission(OrgPermissionKey.SECURITY_VIEW) && ( + + + Security + + )} + {hasPermission(OrgPermissionKey.DEPARTMENTS_MANAGE) && ( + + + Departments + + )} + {hasPermission(OrgPermissionKey.BILLING_VIEW) && ( + + + Billing + + )} + + {hasPermission(OrgPermissionKey.AUDIT_VIEW) && ( + + + Audit + + )} + + + Rewards + {/* ==================== GENERAL TAB ==================== */} - - - - - - Organization Details - - - {canEditSettings - ? "Update your organization information" - : "View your organization information"} - - - - {isLoading ? ( -
- - -
- ) : ( - <> - {/* Organization Logo */} -
- -
-
- - {currentLogoUrl ? ( - - ) : null} - - {orgInitial} - - - {canEditSettings && ( -