Feat(Fix): Multi Org, Suspension, User Detail

Multi Org switch, members suspend/unsuspend status, delete account, next serial, show email in user member search
This commit is contained in:
2026-03-02 23:55:47 +05:45
parent 6cab506603
commit b97937f080
16 changed files with 2011 additions and 298 deletions
+6 -10
View File
@@ -23,10 +23,11 @@ import { Label } from "@/components/ui/label";
import { Textarea } from "@/components/ui/textarea";
import { api, OIDCClient, OIDCClientWithSecret } from "@/lib/api";
import { useToast } from "@/hooks/use-toast";
import { useOrg } from "@/contexts/OrgContext";
export default function OIDCClientsPage() {
const { toast } = useToast();
const [orgId, setOrgId] = useState<string | null>(null);
const { selectedOrgId: orgId } = useOrg();
const [clients, setClients] = useState<OIDCClient[]>([]);
const [isLoading, setIsLoading] = useState(true);
const [isCreateOpen, setIsCreateOpen] = useState(false);
@@ -44,15 +45,10 @@ export default function OIDCClientsPage() {
};
useEffect(() => {
api.users.organizations()
.then((data) => {
if (!data.organizations.length) { setIsLoading(false); return; }
const id = data.organizations[0].id;
setOrgId(id);
loadData(id);
})
.catch(() => { setIsLoading(false); });
}, []);
if (!orgId) { setIsLoading(false); return; }
setIsLoading(true);
loadData(orgId);
}, [orgId]);
const handleCreate = async () => {
if (!orgId || !nameRef.current || !urisRef.current) return;