forked from baron/baron-sso
Format adminfront code check targets
This commit is contained in:
@@ -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(
|
||||
|
||||
@@ -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),
|
||||
|
||||
@@ -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} 테넌트에 이미 설정되어 있습니다. 그래도 현재 테넌트에도 추가하시겠습니까?`;
|
||||
}
|
||||
|
||||
@@ -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 "";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user