Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions frontend/src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,14 @@ function App() {
</RequireAdmin>
}
/>
<Route
path="/admin/assignment/:studentId"
element={
<RequireAdmin>
<AdminStudentAssignment />
</RequireAdmin>
}
/>
</Routes>
</BrowserRouter>
);
Expand Down
18 changes: 15 additions & 3 deletions frontend/src/pages/admin/DetailManageStudent.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ import Header from "../../components/Header";
import style from "./DetailManageStudent.module.css";
import { getStudentDetail } from "../../api/students";

const weekData = [
{ week: "1주차", title: "Git/HTML/CSS" },
{ week: "2주차", title: "JavaScript/웹 개론" },
{ week: "3주차", title: "Django CRUD/DB 개론" },
{ week: "4주차", title: "Django ORM/Ajax" },
{ week: "5주차", title: "배포/아이디어 기획" },
];

const DetailManageStudent = () => {
const { studentId } = useParams();
const numericId = Number(studentId);
Expand Down Expand Up @@ -49,9 +57,13 @@ const DetailManageStudent = () => {
출석 관리 <span>&gt;</span>
</button>
<div className={style.assignment_list}>
{student.assignmentTitles.map((title, idx) => (
<button key={idx} className={style.assignment_button}>
{title}
{weekData.map((week, index) => (
<button
key={index}
className={style.assignment_button}
onClick={() => navigate(`/admin/assignment/${student.id}`)}
>
{week.week} {week.title && ` ${week.title}`}
</button>
))}
</div>
Expand Down