diff --git a/src/assets/data/board/board.ts b/src/assets/data/board/board.ts
index 8a89cb7..2c01d7b 100644
--- a/src/assets/data/board/board.ts
+++ b/src/assets/data/board/board.ts
@@ -6,7 +6,8 @@ import Checkbox from '@mui/material/Checkbox';
export enum Board {
'마일리지 카테고리',
- '마일리지 항목',
+ '마일리지 글로벌 항목',
+ '마일리지 학기별 항목',
'마일리지 조회',
'마일리지 등록',
'신청자 관리',
@@ -23,7 +24,8 @@ export enum Board {
export const BoardList = [
'마일리지 카테고리',
- '마일리지 항목',
+ '마일리지 글로벌 항목',
+ '마일리지 학기별 항목',
'마일리지 조회',
'마일리지 등록',
'신청자 관리',
diff --git a/src/assets/data/modal/modals.ts b/src/assets/data/modal/modals.ts
index fc7663a..0787c05 100644
--- a/src/assets/data/modal/modals.ts
+++ b/src/assets/data/modal/modals.ts
@@ -5,3 +5,7 @@ export const DELETECATEGORY = 'deleteCategory';
export const ADDITEM = 'addItem';
export const EDITITEM = 'editItem';
export const DELETEITEM = 'deleteItme';
+
+export const ADDGLOBALITEM = 'addGlobalItem';
+export const EDITGLOBALITEM = 'editGlobalItem';
+export const DELETEGLOBALITEM = 'deleteGlobalItem';
diff --git a/src/components/board/MileageItem.tsx b/src/components/board/MileageGlobalItem.tsx
similarity index 69%
rename from src/components/board/MileageItem.tsx
rename to src/components/board/MileageGlobalItem.tsx
index ed18303..cb9e46a 100644
--- a/src/components/board/MileageItem.tsx
+++ b/src/components/board/MileageGlobalItem.tsx
@@ -23,8 +23,7 @@ import {
MAX_MAILEAGE,
} from 'src/assets/data/fields';
import SWModal from '../common/modal/SWModal';
-import { EDITITEM } from 'src/assets/data/modal/modals';
-
+import { EDITGLOBALITEM, EDITITEM } from 'src/assets/data/modal/modals';
/**
* @component [마일리지 항목] 게시판
@@ -35,7 +34,7 @@ import { EDITITEM } from 'src/assets/data/modal/modals';
* @breif enum
*/
-export enum MileageItemBoard {
+export enum MileageGlobalItemBoard {
'NUM' = NUM,
'CATEGORY' = CATEGORY,
'SEMESTER' = SEMESTER,
@@ -51,16 +50,16 @@ export enum MileageItemBoard {
* @breif 데이터 인터페이스
*/
interface Data {
- [MileageItemBoard.CATEGORY]: string;
- [MileageItemBoard.SEMESTER]: string;
- [MileageItemBoard.ITEM]: string;
- [MileageItemBoard.MILEAGE]: number;
- [MileageItemBoard.ISVISIBLE]: boolean;
- [MileageItemBoard.REGISTERED_DATE]: string;
- [MileageItemBoard.MANAGE]: string;
+ [MileageGlobalItemBoard.CATEGORY]: string;
+ [MileageGlobalItemBoard.SEMESTER]: string;
+ [MileageGlobalItemBoard.ITEM]: string;
+ [MileageGlobalItemBoard.MILEAGE]: number;
+ [MileageGlobalItemBoard.ISVISIBLE]: boolean;
+ [MileageGlobalItemBoard.REGISTERED_DATE]: string;
+ [MileageGlobalItemBoard.MANAGE]: string;
}
-export default function MileageItem() {
+export default function MileageGlobalItem() {
/**
* @kind [마일리지 항목]
* @brief 데이터 생성 함수
@@ -77,14 +76,14 @@ export default function MileageItem() {
manage: string
): Data {
return {
- [MileageItemBoard.NUM]: num,
- [MileageItemBoard.CATEGORY]: category,
- [MileageItemBoard.SEMESTER]: semester,
- [MileageItemBoard.ITEM]: item,
- [MileageItemBoard.MILEAGE]: mileage,
- [MileageItemBoard.ISVISIBLE]: isVisible,
- [MileageItemBoard.REGISTERED_DATE]: registeredDate,
- [MileageItemBoard.MANAGE]: manage,
+ [MileageGlobalItemBoard.NUM]: num,
+ [MileageGlobalItemBoard.CATEGORY]: category,
+ [MileageGlobalItemBoard.SEMESTER]: semester,
+ [MileageGlobalItemBoard.ITEM]: item,
+ [MileageGlobalItemBoard.MILEAGE]: mileage,
+ [MileageGlobalItemBoard.ISVISIBLE]: isVisible,
+ [MileageGlobalItemBoard.REGISTERED_DATE]: registeredDate,
+ [MileageGlobalItemBoard.MANAGE]: manage,
};
}
@@ -94,49 +93,49 @@ export default function MileageItem() {
*/
const headCells = [
{
- id: [MileageItemBoard.NUM],
+ id: [MileageGlobalItemBoard.NUM],
numeric: false,
disablePadding: true,
label: '번호',
},
{
- id: [MileageItemBoard.CATEGORY],
+ id: [MileageGlobalItemBoard.CATEGORY],
numeric: true,
disablePadding: false,
label: '카테고리명',
},
{
- id: [MileageItemBoard.SEMESTER],
+ id: [MileageGlobalItemBoard.SEMESTER],
numeric: true,
disablePadding: false,
label: '학기',
},
{
- id: [MileageItemBoard.ITEM],
+ id: [MileageGlobalItemBoard.ITEM],
numeric: true,
disablePadding: false,
label: '항목명',
},
{
- id: [MileageItemBoard.MILEAGE],
+ id: [MileageGlobalItemBoard.MILEAGE],
numeric: true,
disablePadding: false,
label: '마일리지',
},
{
- id: [MileageItemBoard.ISVISIBLE],
+ id: [MileageGlobalItemBoard.ISVISIBLE],
numeric: true,
disablePadding: false,
label: '보이기',
},
{
- id: [MileageItemBoard.REGISTERED_DATE],
+ id: [MileageGlobalItemBoard.REGISTERED_DATE],
numeric: true,
disablePadding: false,
label: '등록일',
},
{
- id: [MileageItemBoard.MANAGE],
+ id: [MileageGlobalItemBoard.MANAGE],
numeric: true,
disablePadding: false,
label: '관리',
@@ -177,8 +176,7 @@ export default function MileageItem() {
'y',
'2023-08-21',
-
-
+
),
createData(
2,
@@ -189,8 +187,7 @@ export default function MileageItem() {
'y',
'2023-08-21',
-
-
+
),
createData(
3,
@@ -201,8 +198,7 @@ export default function MileageItem() {
'y',
'2023-08-21',
-
-
+
),
createData(
4,
@@ -213,8 +209,7 @@ export default function MileageItem() {
'y',
'2023-08-21',
-
-
+
),
createData(
5,
@@ -224,7 +219,7 @@ export default function MileageItem() {
30,
'y',
'2023-08-21',
-
+
),
createData(
6,
@@ -234,11 +229,9 @@ export default function MileageItem() {
30,
'y',
'2023-08-21',
-
+
),
];
-
- return ;
-
+ return ;
}
diff --git a/src/components/board/MileageRegister.tsx b/src/components/board/MileageRegister.tsx
index 84b528c..a762b88 100644
--- a/src/components/board/MileageRegister.tsx
+++ b/src/components/board/MileageRegister.tsx
@@ -218,5 +218,5 @@ export default function MileageRegister() {
),
];
- return ;
+ return ;
}
diff --git a/src/components/board/MileageResult.tsx b/src/components/board/MileageResult.tsx
index 6306626..83c4cda 100644
--- a/src/components/board/MileageResult.tsx
+++ b/src/components/board/MileageResult.tsx
@@ -188,5 +188,5 @@ export default function MileageResult() {
),
];
- return ;
+ return ;
}
diff --git a/src/components/board/MileageSemesterItem.tsx b/src/components/board/MileageSemesterItem.tsx
new file mode 100644
index 0000000..9a5e29e
--- /dev/null
+++ b/src/components/board/MileageSemesterItem.tsx
@@ -0,0 +1,237 @@
+import { StarIcon } from 'src/theme/overrides/CustomIcons';
+import EnhancedTable from '../common/CustomTable';
+import {
+ MILEAGE,
+ ISVISIBLE,
+ REGISTERED_DATE,
+ MANAGE,
+ CHECK_BOX,
+ NUM,
+ CATEGORY,
+ SEMESTER,
+ ITEM,
+ DESCRIPTION,
+ DESCRIPTION1,
+ DESCRIPTION2,
+ FILE_DESCRIPTION,
+ ISVISIBLE_STUDENT,
+ ISINPUT_STUDENT,
+ ISDUPLICATE_RECORD,
+ ISEVALUATE_CSEE,
+ ISEVALUATE_PORTFOLIO,
+ ISEVALUATE_FUSION,
+ MAX_MAILEAGE,
+} from 'src/assets/data/fields';
+import SWModal from '../common/modal/SWModal';
+import { EDITITEM } from 'src/assets/data/modal/modals';
+
+/**
+ * @component [마일리지 학기별 항목] 게시판
+ */
+
+/**
+ * @kind [마일리지 학기별 항목]
+ * @breif enum
+ */
+
+export enum MileageSemesterItemBoard {
+ 'NUM' = NUM,
+ 'CATEGORY' = CATEGORY,
+ 'SEMESTER' = SEMESTER,
+ 'ITEM' = ITEM,
+ 'MILEAGE' = MILEAGE,
+ 'ISVISIBLE' = ISVISIBLE,
+ 'REGISTERED_DATE' = REGISTERED_DATE,
+ 'MANAGE' = MANAGE,
+}
+
+/**
+ * @kind [마일리지 학기별 항목]
+ * @breif 데이터 인터페이스
+ */
+interface Data {
+ [MileageSemesterItemBoard.CATEGORY]: string;
+ [MileageSemesterItemBoard.SEMESTER]: string;
+ [MileageSemesterItemBoard.ITEM]: string;
+ [MileageSemesterItemBoard.MILEAGE]: number;
+ [MileageSemesterItemBoard.ISVISIBLE]: boolean;
+ [MileageSemesterItemBoard.REGISTERED_DATE]: string;
+ [MileageSemesterItemBoard.MANAGE]: string;
+}
+
+export default function MileageSemesterItem() {
+ /**
+ * @kind [마일리지 학기별 항목]
+ * @brief 데이터 생성 함수
+ *
+ * */
+ function createData(
+ num: number,
+ category: string,
+ semester: string,
+ item: string,
+ mileage: number,
+ isVisible: boolean,
+ registeredDate: string,
+ manage: string
+ ): Data {
+ return {
+ [MileageSemesterItemBoard.NUM]: num,
+ [MileageSemesterItemBoard.CATEGORY]: category,
+ [MileageSemesterItemBoard.SEMESTER]: semester,
+ [MileageSemesterItemBoard.ITEM]: item,
+ [MileageSemesterItemBoard.MILEAGE]: mileage,
+ [MileageSemesterItemBoard.ISVISIBLE]: isVisible,
+ [MileageSemesterItemBoard.REGISTERED_DATE]: registeredDate,
+ [MileageSemesterItemBoard.MANAGE]: manage,
+ };
+ }
+
+ /**
+ * @kind [마일리지 학기별 항목]
+ * @brief 테이블 헤더
+ */
+ const headCells = [
+ {
+ id: [MileageSemesterItemBoard.NUM],
+ numeric: false,
+ disablePadding: true,
+ label: '번호',
+ },
+ {
+ id: [MileageSemesterItemBoard.CATEGORY],
+ numeric: true,
+ disablePadding: false,
+ label: '카테고리명',
+ },
+ {
+ id: [MileageSemesterItemBoard.SEMESTER],
+ numeric: true,
+ disablePadding: false,
+ label: '학기',
+ },
+ {
+ id: [MileageSemesterItemBoard.ITEM],
+ numeric: true,
+ disablePadding: false,
+ label: '항목명',
+ },
+ {
+ id: [MileageSemesterItemBoard.MILEAGE],
+ numeric: true,
+ disablePadding: false,
+ label: '마일리지',
+ },
+ {
+ id: [MileageSemesterItemBoard.ISVISIBLE],
+ numeric: true,
+ disablePadding: false,
+ label: '보이기',
+ },
+ {
+ id: [MileageSemesterItemBoard.REGISTERED_DATE],
+ numeric: true,
+ disablePadding: false,
+ label: '등록일',
+ },
+ {
+ id: [MileageSemesterItemBoard.MANAGE],
+ numeric: true,
+ disablePadding: false,
+ label: '관리',
+ },
+ ];
+
+ const IParams = {
+ [CATEGORY]: '카테고리테스트',
+ [SEMESTER]: '2022-01',
+ [ITEM]: '웹 서비스 캠프',
+ [MILEAGE]: 30,
+ [MAX_MAILEAGE]: 50,
+ [DESCRIPTION1]: '설명 1',
+ [DESCRIPTION2]: '설명 2',
+ [FILE_DESCRIPTION]: '첨부파일 설명',
+ [ISVISIBLE]: true,
+ [ISVISIBLE_STUDENT]: false,
+ [ISINPUT_STUDENT]: false,
+ [ISDUPLICATE_RECORD]: false,
+ [ISEVALUATE_CSEE]: false,
+ [ISEVALUATE_PORTFOLIO]: false,
+ [ISEVALUATE_FUSION]: false,
+ };
+
+ /**
+ * @kind [마일리지 학기별 항목]
+
+ * @description 마일리지 학기별 항목 리스트
+ */
+
+ const rows = [
+ createData(
+ 1,
+ '전공 마일리지',
+ '2022-01',
+ '웹 서비스 캠프',
+ 30,
+ 'y',
+ '2023-08-21',
+
+
+ ),
+ createData(
+ 2,
+ '비교과 - 연구활동',
+ '2022-01',
+ '웹 서비스 캠프',
+ 30,
+ 'y',
+ '2023-08-21',
+
+
+ ),
+ createData(
+ 3,
+ '비교과 - 전공활동',
+ '2022-01',
+ '웹 서비스 캠프',
+ 30,
+ 'y',
+ '2023-08-21',
+
+
+ ),
+ createData(
+ 4,
+ '비교과 - 특강참여',
+ '2022-01',
+ '웹 서비스 캠프',
+ 30,
+ 'y',
+ '2023-08-21',
+
+
+ ),
+ createData(
+ 5,
+ '비교과 - 학회활동',
+ '2022-02',
+ '웹 서비스 캠프',
+ 30,
+ 'y',
+ '2023-08-21',
+
+ ),
+ createData(
+ 6,
+ '비교과 - 행사참여',
+ '2022-02',
+ '웹 서비스 캠프',
+ 30,
+ 'y',
+ '2023-08-21',
+
+ ),
+ ];
+
+ return ;
+}
diff --git a/src/components/board/MileageView.tsx b/src/components/board/MileageView.tsx
index 4c53462..760df08 100644
--- a/src/components/board/MileageView.tsx
+++ b/src/components/board/MileageView.tsx
@@ -217,5 +217,5 @@ export default function MileageView() {
),
];
- return ;
+ return ;
}
diff --git a/src/components/board/RegisterManage.tsx b/src/components/board/RegisterManage.tsx
index 63c2de0..6a79474 100644
--- a/src/components/board/RegisterManage.tsx
+++ b/src/components/board/RegisterManage.tsx
@@ -223,5 +223,5 @@ export default function RegisterManage() {
),
];
- return ;
+ return ;
}
diff --git a/src/components/board/StudentManage.tsx b/src/components/board/StudentManage.tsx
index 1a99ff9..c7cb65c 100644
--- a/src/components/board/StudentManage.tsx
+++ b/src/components/board/StudentManage.tsx
@@ -223,5 +223,5 @@ export default function StudentManage() {
),
];
- return ;
+ return ;
}
diff --git a/src/components/board/UserManage.tsx b/src/components/board/UserManage.tsx
index cf70200..0eff19b 100644
--- a/src/components/board/UserManage.tsx
+++ b/src/components/board/UserManage.tsx
@@ -104,5 +104,5 @@ export default function UserManage() {
createData(5, '김광', '21800450', '관리자', '20(2023-08-22)'),
];
- return ;
+ return ;
}
diff --git a/src/components/common/CustomTable.tsx b/src/components/common/CustomTable.tsx
index 274ae27..f795c57 100644
--- a/src/components/common/CustomTable.tsx
+++ b/src/components/common/CustomTable.tsx
@@ -31,8 +31,7 @@ import { CATEGORY, NUM } from '../../assets/data/fields';
import Modal from './modal/SWModal';
import CustomModal1 from '../Template/CustomModal';
import SWModal from './modal/SWModal';
-import { ADDCATEGORY, ADDITEM, EDITCATEGORY } from 'src/assets/data/modal/modals';
-
+import { ADDCATEGORY, ADDGLOBALITEM, ADDITEM, EDITCATEGORY } from 'src/assets/data/modal/modals';
/**
* @brief 반응형 구축
@@ -53,7 +52,6 @@ const ResponsiveTableHeadTableCell = styled(TableCell)({
const ResponsiveTableHeadLabel = styled(TableSortLabel)({
'@media (max-width: 600px)': {
-
fontSize: '10px',
display: 'inline',
@@ -74,7 +72,6 @@ const ResponsiveTableBody = styled(TableCell)({
},
});
-
function descendingComparator(a: T, b: T, orderBy: keyof T) {
if (b[orderBy] < a[orderBy]) {
return -1;
@@ -85,7 +82,6 @@ function descendingComparator(a: T, b: T, orderBy: keyof T) {
return 0;
}
-
function getComparator(
order: Order,
orderBy: Key
@@ -199,7 +195,6 @@ function EnhancedTableToolbar(props: EnhancedTableToolbarProps) {
{type} {' 리스트'}
-
{
switch (type) {
case '마일리지 카테고리':
return ADDCATEGORY;
- case '마일리지 항목':
+ case '마일리지 학기별 항목':
return ADDITEM;
+ case '마일리지 글로벌 항목':
+ return ADDGLOBALITEM;
}
};
export default function EnhancedTable({ rows, headCells, type }) {
-
const [order, setOrder] = React.useState('asc');
const [orderBy, setOrderBy] = React.useState('calories');
const [selected, setSelected] = React.useState([]);
diff --git a/src/components/common/Drawer/Drawer.tsx b/src/components/common/Drawer/Drawer.tsx
index ccebf9c..ede4512 100644
--- a/src/components/common/Drawer/Drawer.tsx
+++ b/src/components/common/Drawer/Drawer.tsx
@@ -95,7 +95,7 @@ export default function MiniDrawer() {
{/* 사이드바 리스트 아이템 */}
- {[0, 1, 2, 3, 4, 5, 6, 7, 8, 9].map((boardNum, index) => (
+ {[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10].map((boardNum, index) => (
- {(boardNum === 3 || boardNum === 6) && }
+ {(boardNum === 4 || boardNum === 7) && }
))}
diff --git a/src/components/common/Drawer/DrawerIcons.tsx b/src/components/common/Drawer/DrawerIcons.tsx
index 18f7c10..430c0b4 100644
--- a/src/components/common/Drawer/DrawerIcons.tsx
+++ b/src/components/common/Drawer/DrawerIcons.tsx
@@ -10,13 +10,16 @@ import PersonIcon from '@mui/icons-material/Person';
import DonutSmallIcon from '@mui/icons-material/DonutSmall';
import GavelIcon from '@mui/icons-material/Gavel';
import SettingsIcon from '@mui/icons-material/Settings';
+import PublicIcon from '@mui/icons-material/Public';
import { Board } from 'src/assets/data/board/board';
export const IconReturn = (text) => {
switch (text) {
case Board['마일리지 카테고리']:
return ;
- case Board['마일리지 항목']:
+ case Board['마일리지 글로벌 항목']:
+ return ;
+ case Board['마일리지 학기별 항목']:
return ;
case Board['마일리지 조회']:
return ;
diff --git a/src/components/common/Table/TableComponents.tsx b/src/components/common/Table/TableComponents.tsx
index 192ccfe..0f33943 100644
--- a/src/components/common/Table/TableComponents.tsx
+++ b/src/components/common/Table/TableComponents.tsx
@@ -9,24 +9,23 @@ import PersonIcon from '@mui/icons-material/Person';
import DonutSmallIcon from '@mui/icons-material/DonutSmall';
import GavelIcon from '@mui/icons-material/Gavel';
import SettingsIcon from '@mui/icons-material/Settings';
-import MileageItem from 'src/components/board/MileageItem';
+import MileageItem from 'src/components/board/MileageSemesterItem';
import MileageView from 'src/components/board/MileageView';
import MileageRegister from 'src/components/board/MileageRegister';
import RegisterManage from 'src/components/board/RegisterManage';
import StudentManage from 'src/components/board/StudentManage';
import UserManage from 'src/components/board/UserManage';
import MileageResult from 'src/components/board/MileageResult';
+import MileageGlobalItem from 'src/components/board/MileageGlobalItem';
export const ComponentReturn = (text) => {
switch (text) {
case Board['마일리지 카테고리']:
-
return ;
-
- case Board['마일리지 항목']:
+ case Board['마일리지 글로벌 항목']:
+ return ;
+ case Board['마일리지 학기별 항목']:
return ;
-
-
case Board['마일리지 조회']:
return ;
case Board['마일리지 등록']:
diff --git a/src/components/common/modal/ModalTitle.tsx b/src/components/common/modal/ModalTitle.tsx
index 465e373..06c9e07 100644
--- a/src/components/common/modal/ModalTitle.tsx
+++ b/src/components/common/modal/ModalTitle.tsx
@@ -2,10 +2,12 @@ import { Typography } from '@mui/material';
import { useSelector } from 'react-redux';
import {
ADDCATEGORY,
+ ADDGLOBALITEM,
ADDITEM,
DELETECATEGORY,
DELETEITEM,
EDITCATEGORY,
+ EDITGLOBALITEM,
EDITITEM,
} from 'src/assets/data/modal/modals';
@@ -21,11 +23,15 @@ export default function ModalTitle() {
case DELETECATEGORY:
return '마일리지 카테고리 삭제';
case ADDITEM:
- return '마일리지 항목 추가';
+ return '마일리지 학기별 항목 추가';
case EDITITEM:
- return '마일리지 항목 수정';
+ return '마일리지 학기별 항목 수정';
case DELETEITEM:
- return '마일리지 항목 삭제';
+ return '마일리지 학기별 항목 삭제';
+ case ADDGLOBALITEM:
+ return '마일리지 글로벌 항목 추가';
+ case EDITGLOBALITEM:
+ return '마일리지 글로벌 항목 수정';
}
};
diff --git a/src/components/common/modal/SWModal.tsx b/src/components/common/modal/SWModal.tsx
index bb7d8ac..32a9161 100644
--- a/src/components/common/modal/SWModal.tsx
+++ b/src/components/common/modal/SWModal.tsx
@@ -27,9 +27,11 @@ import EditIcon from '@mui/icons-material/Edit';
import DeleteIcon from '@mui/icons-material/Delete';
import {
ADDCATEGORY,
+ ADDGLOBALITEM,
ADDITEM,
DELETECATEGORY,
EDITCATEGORY,
+ EDITGLOBALITEM,
EDITITEM,
} from 'src/assets/data/modal/modals';
import { ErrorMessage, Field, Form, Formik } from 'formik';
@@ -95,6 +97,10 @@ const modalForm = (modalType, beforeData) => {
return ;
case EDITITEM:
return ;
+ case ADDGLOBALITEM:
+ return ;
+ case EDITGLOBALITEM:
+ return ;
}
};
@@ -153,13 +159,14 @@ export default function SWModal({ type, beforeData }) {
>
- {/* */}
+
{/* use Formik
https://formik.org/docs/api/errormessage
https://velog.io/@silverbeen/Formik%EC%97%90-%EB%8C%80%ED%95%98%EC%97%AC-%EC%95%8C%EC%95%84%EB%B3%B4%EC%9E%90-feat.-Yup
https://jeonghwan-kim.github.io/dev/2022/03/29/react-form-and-formik.html#getfieldprops-%EC%9C%A0%ED%8B%B8-%ED%95%A8%EC%88%98-%EC%A0%9C%EA%B3%B5
*/}
{modalForm(modalType, beforeData)}
+ {/* */}
{/* */}