1
0
forked from baron/baron-sso

Format adminfront code check targets

This commit is contained in:
2026-04-30 15:59:57 +09:00
parent 6c45eca3d3
commit 790be37930
17 changed files with 2531 additions and 2919 deletions

View File

@@ -34,7 +34,10 @@ describe("DomainTagInput", () => {
/>,
);
await user.type(screen.getByPlaceholderText("example.com"), "samaneng.com ");
await user.type(
screen.getByPlaceholderText("example.com"),
"samaneng.com ",
);
expect(
await screen.findByText(

View File

@@ -71,8 +71,7 @@ export function normalizeSchemaField(field: unknown): SchemaField {
type,
required: Boolean(source.required),
adminOnly: Boolean(source.adminOnly),
validation:
typeof source.validation === "string" ? source.validation : "",
validation: typeof source.validation === "string" ? source.validation : "",
unsigned: Boolean(source.unsigned),
isLoginId,
indexed: isLoginId || Boolean(source.indexed),

View File

@@ -54,6 +54,9 @@ export function formatDomainConflictMessage(
const tenantName =
"tenant" in conflict
? conflict.tenant.name
: conflict.tenantName || conflict.tenantSlug || conflict.tenantId || "다른";
: conflict.tenantName ||
conflict.tenantSlug ||
conflict.tenantId ||
"다른";
return `${conflict.domain} 도메인은 ${tenantName} 테넌트에 이미 설정되어 있습니다. 그래도 현재 테넌트에도 추가하시겠습니까?`;
}

View File

@@ -129,7 +129,10 @@ export function buildTenantImportPreview(
candidates[0] && candidates[0].score >= 0.95
? candidates[0].tenantId
: "",
defaultCreateSlug: suggestUniqueTenantSlug(row.slug || row.name, tenants),
defaultCreateSlug: suggestUniqueTenantSlug(
row.slug || row.name,
tenants,
),
};
})
.sort((a, b) => {
@@ -148,10 +151,7 @@ export function serializeTenantImportCSV(
const sortedRows = [...previewRows].sort(
(a, b) => a.row.rowNumber - b.row.rowNumber,
);
const targetTenantIds = buildTargetTenantIds(
sortedRows,
selectedTenantIds,
);
const targetTenantIds = buildTargetTenantIds(sortedRows, selectedTenantIds);
for (const preview of sortedRows) {
const resolution = selectedTenantIds[preview.row.rowNumber] ?? "";
@@ -241,7 +241,9 @@ function remapParentTenantId(
return targetTenantIds.bySourceId.get(parentTenantId) ?? parentTenantId;
}
if (parentTenantSlug) {
return targetTenantIds.bySourceSlug.get(parentTenantSlug.toLowerCase()) ?? "";
return (
targetTenantIds.bySourceSlug.get(parentTenantSlug.toLowerCase()) ?? ""
);
}
return "";
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -159,10 +159,7 @@ function UserListPage() {
},
onError: () => {
toast.error(
t(
"msg.admin.users.export_error",
"사용자 내보내기에 실패했습니다.",
),
t("msg.admin.users.export_error", "사용자 내보내기에 실패했습니다."),
);
},
});

View File

@@ -400,10 +400,7 @@ export function UserBulkUploadModal({ onSuccess }: UserBulkUploadModalProps) {
data-testid="user-import-tenant-resolution"
>
<div className="mb-2 font-medium">
{t(
"ui.admin.users.bulk.tenant_resolution",
"테넌트 매핑",
)}
{t("ui.admin.users.bulk.tenant_resolution", "테넌트 매핑")}
</div>
<div className="space-y-2">
{tenantPreviewRows.map((preview) => (
@@ -487,7 +484,9 @@ export function UserBulkUploadModal({ onSuccess }: UserBulkUploadModalProps) {
<td className="p-2">
<input
className="h-8 w-full min-w-[180px] rounded-md border border-input bg-background px-2 font-mono text-xs"
value={hanmacEmailPreviews[index]?.finalEmail ?? u.email}
value={
hanmacEmailPreviews[index]?.finalEmail ?? u.email
}
onChange={(event) =>
setPreviewData((prev) =>
prev.map((item, itemIndex) =>

View File

@@ -1,18 +1,18 @@
export type UserSchemaFieldType =
| "text"
| "number"
| "boolean"
| "date"
| "float"
| "datetime";
| "text"
| "number"
| "boolean"
| "date"
| "float"
| "datetime";
export type UserSchemaField = {
key: string;
label?: string;
type?: UserSchemaFieldType;
required?: boolean;
adminOnly?: boolean;
validation?: string;
isLoginId?: boolean;
indexed?: boolean;
key: string;
label?: string;
type?: UserSchemaFieldType;
required?: boolean;
adminOnly?: boolean;
validation?: string;
isLoginId?: boolean;
indexed?: boolean;
};