-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(time): add grade, lecture, region constants & type (#97)
- Loading branch information
Showing
8 changed files
with
42 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
14
apps/time/src/widgets/time-table/model/constants/lecture.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, | ||
][]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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]; |