1
0
forked from baron/baron-sso

린트 적용

This commit is contained in:
2026-03-05 17:50:34 +09:00
parent c2b55081a6
commit 45ae1bb1c0
21 changed files with 1114 additions and 810 deletions

View File

@@ -450,7 +450,7 @@ export function exportUsersCSVUrl(search?: string, companyCode?: string) {
const params = new URLSearchParams();
if (search) params.append("search", search);
if (companyCode) params.append("companyCode", companyCode);
// Get mock role from storage if exists for dev environment
const mockRole = window.localStorage.getItem("X-Mock-Role");
if (mockRole) params.append("x-test-role", mockRole);

View File

@@ -41,7 +41,9 @@ export function buildTenantFullTree(
// Function to calculate recursive counts with cycle protection
const calculateRecursive = (node: TenantNode): number => {
if (visitedForCalc.has(node.id)) {
console.warn(`Circular dependency detected in tenant tree for ID: ${node.id}`);
console.warn(
`Circular dependency detected in tenant tree for ID: ${node.id}`,
);
return 0; // Prevent infinite loop
}
visitedForCalc.add(node.id);
@@ -51,8 +53,8 @@ export function buildTenantFullTree(
total += calculateRecursive(child);
}
node.recursiveMemberCount = total;
// We don't remove from visitedForCalc here because a tree shouldn't have
// We don't remove from visitedForCalc here because a tree shouldn't have
// multiple paths to the same node anyway (it's a tree, not a graph).
// If it were a DAG, we'd need different logic, but for a tree with parentIds,
// a node should only be visited once.