251210_01_ENH : 프로젝트 수정, 에디터 구현중
This commit is contained in:
62
src/const/projectConst.ts
Normal file
62
src/const/projectConst.ts
Normal file
@@ -0,0 +1,62 @@
|
||||
export enum SurveyType {
|
||||
NONE = 0,
|
||||
KON = 1,
|
||||
KIWI = 2,
|
||||
EXTERNAL = 99,
|
||||
}
|
||||
|
||||
export const SURVEY_TYPE_ORDER = [
|
||||
SurveyType.NONE,
|
||||
SurveyType.KON,
|
||||
SurveyType.KIWI,
|
||||
SurveyType.EXTERNAL,
|
||||
] as const;
|
||||
|
||||
// 라벨 맵 (단일 소스)
|
||||
export const SURVEY_TYPE_LABEL = {
|
||||
[SurveyType.NONE]: "없음",
|
||||
[SurveyType.KON]: "KON",
|
||||
[SurveyType.KIWI]: "KIWI",
|
||||
[SurveyType.EXTERNAL]: "외부 설문",
|
||||
} as const satisfies Record<SurveyType, string>;
|
||||
|
||||
export enum ProjectStatus {
|
||||
WAITING = 0,
|
||||
IN_PROGRESS = 1,
|
||||
COMPLETED = 10,
|
||||
}
|
||||
|
||||
export const PROJECT_STATUS_ORDER = [
|
||||
ProjectStatus.WAITING,
|
||||
ProjectStatus.IN_PROGRESS,
|
||||
ProjectStatus.COMPLETED,
|
||||
] as const;
|
||||
|
||||
export const PROJECT_STATUS_LABEL = {
|
||||
[ProjectStatus.WAITING]: "대기",
|
||||
[ProjectStatus.IN_PROGRESS]: "진행",
|
||||
[ProjectStatus.COMPLETED]: "완료",
|
||||
} as const satisfies Record<ProjectStatus, string>;
|
||||
|
||||
export const PROJECT_STATUS_CLASS = {
|
||||
[ProjectStatus.WAITING]: "bg-yellow-100 text-yellow-800",
|
||||
[ProjectStatus.IN_PROGRESS]: "bg-blue-100 text-blue-800",
|
||||
[ProjectStatus.COMPLETED]: "bg-green-100 text-green-800",
|
||||
} as const satisfies Record<ProjectStatus, string>;
|
||||
|
||||
// 옵션이 필요하면(셀렉트/라디오 등) 이것만 돌려 쓰기
|
||||
export const SURVEY_TYPE_OPTIONS = [
|
||||
{ value: SurveyType.NONE, label: SURVEY_TYPE_LABEL[SurveyType.NONE] },
|
||||
{ value: SurveyType.KON, label: SURVEY_TYPE_LABEL[SurveyType.KON] },
|
||||
{ value: SurveyType.KIWI, label: SURVEY_TYPE_LABEL[SurveyType.KIWI] },
|
||||
{ value: SurveyType.EXTERNAL, label: SURVEY_TYPE_LABEL[SurveyType.EXTERNAL] },
|
||||
] as const;
|
||||
|
||||
export const PROJECT_STATUS_OPTIONS = [
|
||||
{ value: ProjectStatus.WAITING, label: PROJECT_STATUS_LABEL[ProjectStatus.WAITING] },
|
||||
{ value: ProjectStatus.IN_PROGRESS, label: PROJECT_STATUS_LABEL[ProjectStatus.IN_PROGRESS] },
|
||||
{ value: ProjectStatus.COMPLETED, label: PROJECT_STATUS_LABEL[ProjectStatus.COMPLETED] },
|
||||
] as const;
|
||||
|
||||
export const PROJECT_NAME_REGEX= /^[^\u0000-\u001F\u007F]+$/
|
||||
export const PROJECT_SEARCH_COUNT = 20
|
||||
Reference in New Issue
Block a user