Skip to content

Commit

Permalink
feat(time): add grade, lecture, region constants & type (#97)
Browse files Browse the repository at this point in the history
  • Loading branch information
SWARVY committed Aug 14, 2024
1 parent aa742e3 commit 28e35d4
Show file tree
Hide file tree
Showing 8 changed files with 42 additions and 5 deletions.
11 changes: 8 additions & 3 deletions apps/time/src/widgets/time-table/model/constants/grade.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
const GRADE = ['1학년', '2학년', '3학년', '4학년', '5학년', '6학년'] as const;

export default GRADE;
export const GRADE = [
'1학년',
'2학년',
'3학년',
'4학년',
'5학년',
'6학년',
] as const;
4 changes: 3 additions & 1 deletion apps/time/src/widgets/time-table/model/constants/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
export * from './period';
export { default as GRADE } from './grade';
export * from './grade';
export * from './region';
export * from './lecture';
14 changes: 14 additions & 0 deletions apps/time/src/widgets/time-table/model/constants/lecture.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { LectureKey, LectureValue } from '@/widgets/time-table';

export const LECTURE = {
CULTURE: '교양',
MAJOR: '전공',
TEACHING: '교직이수',
ROTC: 'ROTC',
LINKEDFUSION: '연계융합',
} as const;

export const LECTURE_ARRAY = Object.entries(LECTURE) as [
LectureKey,
LectureValue,
][];
6 changes: 6 additions & 0 deletions apps/time/src/widgets/time-table/model/constants/region.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export const REGION = {
campus1: '수원',
campus2: '서울',
} as const;

export const REGION_VALUE_ARRAY = Object.values(REGION);
2 changes: 1 addition & 1 deletion apps/time/src/widgets/time-table/types/grade.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import GRADE from '@/widgets/time-table/model/constants/grade';
import { GRADE } from '@/widgets/time-table';

type Grade = (typeof GRADE)[number];

Expand Down
2 changes: 2 additions & 0 deletions apps/time/src/widgets/time-table/types/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
export * from './day-status';
export * from './grade';
export * from './period';
export * from './lecture';
export * from './region';
5 changes: 5 additions & 0 deletions apps/time/src/widgets/time-table/types/lecture.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { LECTURE } from '@/widgets/time-table';

export type LectureKey = keyof typeof LECTURE;

export type LectureValue = (typeof LECTURE)[keyof typeof LECTURE];
3 changes: 3 additions & 0 deletions apps/time/src/widgets/time-table/types/region.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { REGION } from '@/widgets/time-table';

export type Region = (typeof REGION)[keyof typeof REGION];

0 comments on commit 28e35d4

Please sign in to comment.