1
0
forked from baron/baron-sso

worksmobile 연동 & ory stack 26.2.0으로 업그레이드

This commit is contained in:
2026-05-06 09:30:00 +09:00
parent 3dcdd97882
commit 2495fcb13d
74 changed files with 8698 additions and 212 deletions

View File

@@ -297,6 +297,12 @@ function isVisibleOrgChartUser(user: UserSummary) {
);
}
function isOrgFrontTenantType(tenant: TenantSummary) {
return ["COMPANY_GROUP", "COMPANY", "ORGANIZATION"].includes(
tenant.type.toUpperCase(),
);
}
function isSystemGlobalTenant(
tenant?: Pick<TenantSummary, "id" | "slug" | "type" | "name">,
) {
@@ -363,7 +369,9 @@ function filterSystemGlobalTenants(tenants: TenantSummary[]) {
}
}
return tenants.filter((tenant) => !excludedIds.has(tenant.id));
return tenants.filter(
(tenant) => !excludedIds.has(tenant.id) && isOrgFrontTenantType(tenant),
);
}
type TenantIndexes = {
@@ -567,7 +575,7 @@ export function TenantOrgChartPage() {
const companyFilters = React.useMemo(() => {
return (familyRoot?.children ?? [])
.filter((node) => node.type === "COMPANY")
.filter((node) => node.type === "COMPANY" || node.type === "ORGANIZATION")
.map((node) => ({ id: node.id, label: node.name }))
.sort((a, b) => a.label.localeCompare(b.label));
}, [familyRoot]);
@@ -588,7 +596,9 @@ export function TenantOrgChartPage() {
node.slug.toLowerCase() === tenantId.toLowerCase() ||
node.name === tenantId,
);
if (match?.type === "COMPANY") setSelectedTenantFilter(match.id);
if (match?.type === "COMPANY" || match?.type === "ORGANIZATION") {
setSelectedTenantFilter(match.id);
}
}, [familyRoot, rootNodes, tenantId]);
const targetNodes = React.useMemo(() => {