-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
119 additions
and
1 deletion.
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
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,109 @@ | ||
import EnhancedTable from "../common/CustomTable"; | ||
import { MILEAGE, ISVISIBLE, REGISTERED_DATE ,MANAGE, CHECK_BOX, NUM, CATEGORY ,SEMESTER, ITEM} from 'src/assets/data/fields'; | ||
|
||
export default function MileageItem(){ | ||
|
||
|
||
/** | ||
* @breif [마일리지 카테고리] 게시판 | ||
*/ | ||
|
||
export enum MileageItemBoard { | ||
'NUM' = NUM, | ||
'CATEGORY' = CATEGORY, | ||
'SEMESTER' = SEMESTER, | ||
'ITEM' = ITEM, | ||
'MILEAGE' = MILEAGE, | ||
'ISVISIBLE' = ISVISIBLE, | ||
'REGISTERED_DATE'= REGISTERED_DATE, | ||
'MANAGE' = MANAGE, | ||
'CHECK_BOX' = CHECK_BOX, | ||
} | ||
|
||
/** | ||
* @kind 마일리지 카테로리 | ||
* @breif 데이터 인터페이스 | ||
*/ | ||
interface Data { | ||
[MileageItemBoard.CATEGORY]: string; | ||
[MileageItemBoard.MAX_MILEAGE]: number; | ||
[MileageItemBoard.MANAGE]: string; | ||
[MileageItemBoard.CHECK_BOX]: string; | ||
} | ||
|
||
/** | ||
* @kind 마일리지 카테고리 | ||
* @brief 데이터 생성 함수 | ||
* | ||
* */ | ||
function createData( | ||
num: number, | ||
category: string, | ||
maxMileage: number, | ||
manage: string, | ||
checkBox: string | ||
): Data { | ||
return { | ||
[MileageCategoryBoard.NUM]: num, | ||
[MileageCategoryBoard.CATEGORY]: category, | ||
[MileageCategoryBoard.MAX_MILEAGE]: maxMileage, | ||
[MileageCategoryBoard.MANAGE]: manage, | ||
[MileageCategoryBoard.CHECK_BOX]: checkBox, | ||
}; | ||
} | ||
|
||
/** | ||
* @number 1번 헤더 | ||
* @description 마일리지 카테고리 리스트 | ||
*/ | ||
const headCells = [ | ||
{ | ||
id: [MileageCategoryBoard.NUM], | ||
numeric: false, | ||
disablePadding: true, | ||
label: '번호', | ||
}, | ||
{ | ||
id: [MileageCategoryBoard.CATEGORY], | ||
numeric: true, | ||
disablePadding: false, | ||
label: '카테고리명', | ||
}, | ||
{ | ||
id: [MileageCategoryBoard.MAX_MILEAGE], | ||
numeric: true, | ||
disablePadding: false, | ||
label: '최대 마일리지', | ||
}, | ||
{ | ||
id: [MileageCategoryBoard.MANAGE], | ||
numeric: true, | ||
disablePadding: false, | ||
label: '관리', | ||
}, | ||
{ | ||
id: [MileageCategoryBoard.CHECK_BOX], | ||
numeric: true, | ||
disablePadding: false, | ||
label: '체크', | ||
}, | ||
]; | ||
|
||
/** | ||
* @number 1번 목록 | ||
* @description 마일리지 카테고리 리스트 | ||
*/ | ||
|
||
const rows = [ | ||
createData(1, '전공 마일리지', 7, '웹 서비스 캠프', <StarIcon />), | ||
createData(2, '비교과 - 연구활동', 6, '웹 서비스 캠프', <StarIcon />), | ||
createData(3, '비교과 - 전공활동', 6, '웹 서비스 캠프', <StarIcon />), | ||
createData(4, '비교과 - 특강참여', 7, '웹 서비스 캠프', <StarIcon />), | ||
createData(5, '비교과 - 학회활동', 6, '웹 서비스 캠프', <StarIcon />), | ||
createData(6, '비교과 - 행사참여', 8, '웹 서비스 캠프', <StarIcon />), | ||
]; | ||
|
||
return ( | ||
<EnhancedTable type="마일리지 카테고리" rows={rows} headCells={headCells} />; | ||
); | ||
} |
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