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
2 changes: 1 addition & 1 deletion frontend/src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function App() {
<Route path="/deposit" element={<Deposit />} />
<Route path="/admin" element={<Admin />} />
<Route path="/managestudent" element={<ManageStudent />} />
<Route path="/magagetask" element={<ManageTask />} />
<Route path="/managetask" element={<ManageTask />} />
<Route path="/attendancecode" element={<AttendanceCode />} />
<Route path="/admin/attendance/:studentId" element={<AdminStudentAttendance />} />
</Routes>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/api/students.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import api from "./api";

export const getStudentsByName = async (name) => {
const res = await api.get("/admin/managestudent", {
const res = await api.get(`/admin/managestudent`, {
params: { name },
});
return res.data; // [{ id: ..., name: ... }]
Expand Down
8 changes: 6 additions & 2 deletions frontend/src/components/Header.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,14 @@ const Header = () => {
else if (path.includes("deposit")) title = "DEPOSIT";
else if (path.includes("attendance")) title = "ATTENDANCE\nCHECK";
else if (path.includes("managestudent")) title = "수강생 관리";
else if (path.includes("magagetask")) title = "과제 관리";
else if (path.includes("managetask")) title = "과제 관리";
else if (path.includes("attendancecode")) title = "출석코드 생성";

const showRightDeposit = !path.includes("deposit");
const showRightDeposit =
!path.includes("deposit") &&
!path.includes("managestudent") &&
!path.includes("managetask"); // 수강생 관리, 과제 관리 페이지 추가

const showRightMagageStudent = path.includes("attendancecode");

return (
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/pages/admin/Admin.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const Admin = () => {
</button>
<button
className={styles.button}
onClick={() => navigate("/magagetask")}
onClick={() => navigate("/managetask")}
>
<p>과제 관리</p>
</button>
Expand Down
13 changes: 10 additions & 3 deletions frontend/src/pages/admin/ManageTask.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
const MagageTask = () => {
return <p>과제 관리</p>;
import Header from "../../components/Header";
import style from "./ManageTask.module.css";

const ManageTask = () => {
return (
<div className={style.managetask_wrapper}>
<Header />
</div>
);
};
export default MagageTask;
export default ManageTask;
6 changes: 6 additions & 0 deletions frontend/src/pages/admin/ManageTask.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.managetask_wrapper {
display: flex;
justify-content: center;
flex-direction: column;
align-items: center;
}