37 lines
1.1 KiB
TypeScript
37 lines
1.1 KiB
TypeScript
export const SITE_TITLE = "강원문화재단 문화예술지원사업 모니터링 및 종합평가";
|
|
|
|
export const TOP_MENU_KEY_MAP: Record<string, string> = {
|
|
"performance-list": "사업정보",
|
|
"user-list": "계정관리",
|
|
"assign": "모니터링 배정",
|
|
};
|
|
|
|
export const TOP_MENU_PATH_MAP: Record<string, string> = {
|
|
"performance-list": "/performance",
|
|
"user-list": "/user",
|
|
"assign": "/assign",
|
|
};
|
|
|
|
export const MONITORING_USER_ROLE = 9003;
|
|
|
|
export const WRITTEN_REVIEW_LINK_URL = {
|
|
incomplete: "/written-review",
|
|
complete: "/written-review/result",
|
|
} as const;
|
|
|
|
export const buildWrittenReviewLink = ({
|
|
performanceId,
|
|
userId,
|
|
complete,
|
|
}: {
|
|
performanceId: number;
|
|
userId: string;
|
|
complete: boolean;
|
|
}) => {
|
|
const baseUrl = complete ? WRITTEN_REVIEW_LINK_URL.complete : WRITTEN_REVIEW_LINK_URL.incomplete;
|
|
const url = new URL(baseUrl, typeof window === "undefined" ? "http://localhost" : window.location.origin);
|
|
url.searchParams.set("performanceId", String(performanceId));
|
|
url.searchParams.set("userId", userId);
|
|
return /^https?:\/\//i.test(baseUrl) ? url.toString() : url.pathname + url.search;
|
|
};
|