diff --git a/src/pages/DashboardPage/MonthlyPerfectUserTable.jsx b/src/pages/DashboardPage/MonthlyPerfectUserTable.jsx index 7663923..4cb1e13 100644 --- a/src/pages/DashboardPage/MonthlyPerfectUserTable.jsx +++ b/src/pages/DashboardPage/MonthlyPerfectUserTable.jsx @@ -10,11 +10,10 @@ import { import Typography from "@mui/material/Typography"; const columns = [ - { field: "id", headerName: "ID", width: 80 }, { field: "intraId", headerName: "Intra ID", - width: 150, + width: 120, editable: true, }, { @@ -26,31 +25,6 @@ const columns = [ }, ]; -const rows = [ - { id: 1, intraId: "Snow", totalPerfectCount: 3 }, - { - id: 2, - intraId: "Lannister", - totalPerfectCount: 3, - }, - { - id: 3, - intraId: "Lannister", - totalPerfectCount: 3, - }, - { id: 4, intraId: "Stark", totalPerfectCount: 3 }, - { - id: 5, - intraId: "Targaryen", - totalPerfectCount: 3, - }, - { - id: 6, - intraId: "Melisandre", - totalPerfectCount: 3, - }, -]; - function CustomToolbar() { return ( @@ -59,7 +33,15 @@ function CustomToolbar() { ); } -function MonthlyPerfectUserTable() { +function MonthlyPerfectUserTable(props) { + const { data } = props; + const rows = []; + if (data.length > 0){ + data.forEach((user) => { + if (user.isPerfectAttendance) + rows.push(user); + }) + } return ( @@ -72,7 +54,7 @@ function MonthlyPerfectUserTable() { row.intraId} components={{ Toolbar: CustomToolbar }} /> diff --git a/src/pages/DashboardPage/MonthlyUserTable.jsx b/src/pages/DashboardPage/MonthlyUserTable.jsx index abc88a4..f3602de 100644 --- a/src/pages/DashboardPage/MonthlyUserTable.jsx +++ b/src/pages/DashboardPage/MonthlyUserTable.jsx @@ -38,14 +38,12 @@ function MonthlyUserTable(props) { const { data } = props; const rows = []; if (data.length > 0) { - data.forEach((user) => { - if (user.isPerfectAttendance) - user.isPerfectAttendance = "✅" - else - user.isPerfectAttendance = "❌" - rows.push(user); - } - ) + data.forEach((user) => { + if (user.isPerfectAttendance) + rows.push({...user, isPerfectAttendance: "✅"}) + else + rows.push({...user, isPerfectAttendance: "❌"}) + }) } return ( diff --git a/src/pages/DashboardPage/index.jsx b/src/pages/DashboardPage/index.jsx index d9f5703..e669a45 100644 --- a/src/pages/DashboardPage/index.jsx +++ b/src/pages/DashboardPage/index.jsx @@ -63,7 +63,7 @@ function DashboardPage() { {/* EXPLAIN: 이번 달 개근자 목록 테이블 */} - + {/* EXPLAIN: 출석 데이터 수정 */}