251210_01_ENH : 프로젝트 수정, 에디터 구현중

This commit is contained in:
2025-12-10 16:24:49 +09:00
parent dd8723861a
commit ef949a6242
57 changed files with 4459 additions and 1247 deletions

View File

@@ -5,6 +5,21 @@ export function cn(...inputs: ClassValue[]) {
return twMerge(clsx(inputs))
}
export function getKeyByValue<
const T extends Record<PropertyKey, string>
>(map: T, value: T[keyof T]) {
const entry = Object.entries(map).find(([, v]) => v === value);
return entry ? (entry[0] as keyof T) : undefined;
}
export function getNumberKeyByValue(
map: Record<number, string>,
value: string
): number | undefined {
const entry = Object.entries(map).find(([, v]) => v === value);
return entry ? Number(entry[0]) : undefined;
}
export function buildUrlWithParams(
targetPath: string,
from: Record<string, string | string[] | undefined>,