Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
01ee583
Merge pull request #5 from pirogramming/frontend_sj
Imggaggu May 4, 2025
f6d919f
[fix]: InputBlock component 수정 및 reset.css 등록
NamKyeongMin May 4, 2025
cba9227
resolve conflict: keep index.css, App.css deleted
NamKyeongMin May 4, 2025
531ffc2
resolve conflict: keep index.css, App.css deleted
NamKyeongMin May 4, 2025
1406900
resolve conflict: keep index.css, App.css deleted
NamKyeongMin May 4, 2025
906cf8c
[feat]add Assignment, deposit, Home, Login page/Initial setup: routi…
qkrxogmla May 5, 2025
c7c8c09
Merge pull request #9 from pirogramming/fronted_th
qkrxogmla May 5, 2025
07a1ca2
[feat]intro page
qkrxogmla May 5, 2025
77abdfc
Merge pull request #11 from pirogramming/frontend_th
qkrxogmla May 5, 2025
ecee2f3
[feat]로그인 페이지 기능 구현 완료
qkrxogmla May 5, 2025
52258d0
Merge pull request #12 from pirogramming/frontend_th
qkrxogmla May 5, 2025
48e3234
[refactor] 로그인 API fetch 로직 분리 (api/user.js)
qkrxogmla May 5, 2025
2ac7f4a
[feat]Home page 구현 완료
qkrxogmla May 5, 2025
4178fd2
Merge pull request #15 from pirogramming/frontend_th
qkrxogmla May 5, 2025
d8d0e3b
[Merge] frontend to frontend_sj
Imggaggu May 7, 2025
f760f93
[Fix] header component & home page title font
Imggaggu May 7, 2025
6fa40be
[Feat] add AssignmentInfoBlock component& create Assignment Check page
Imggaggu May 7, 2025
c686e53
[Merge] origin to local
Imggaggu May 7, 2025
6627116
Merge pull request #18 from pirogramming/frontend_sj
Imggaggu May 7, 2025
2cec2c2
[Fix] login page title font
Imggaggu May 7, 2025
968d688
Merge pull request #19 from pirogramming/frontend_sj
Imggaggu May 7, 2025
67525c9
[feat]deposit page
qkrxogmla May 7, 2025
0b1d468
Merge pull request #20 from pirogramming/frontend_th
qkrxogmla May 7, 2025
f51993d
[fix]Assignment page
qkrxogmla May 7, 2025
cff7528
Merge pull request #21 from pirogramming/frontend_th
qkrxogmla May 7, 2025
f1f7c7a
Merge frontend into frontend_km and resolve conflict
NamKyeongMin May 7, 2025
8cd2571
Merge branch 'frontend' into frontend_km
NamKyeongMin May 7, 2025
d2b4fc6
Merge pull request #23 from pirogramming/frontend_km
NamKyeongMin May 7, 2025
e5e75a1
[add]: Attendacne page, InputBlock 컴포넌트 수정
NamKyeongMin May 7, 2025
0d2dbc4
Merge pull request #25 from pirogramming/frontend_km
NamKyeongMin May 7, 2025
af238d0
[fix]: InputBlock 컴포넌트 values 없는 예외 처리
NamKyeongMin May 7, 2025
dffff68
[add]: boom img
NamKyeongMin May 7, 2025
8f69067
Merge pull request #26 from pirogramming/frontend_km
NamKyeongMin May 7, 2025
29f6ccd
[add]: boom img
NamKyeongMin May 7, 2025
e1f294c
Merge pull request #27 from pirogramming/frontend_km
NamKyeongMin May 7, 2025
6bfd0c2
[add]: boom.png 추가
NamKyeongMin May 7, 2025
7344416
[add]: boom_filled_color 추가
NamKyeongMin May 7, 2025
34ac7be
public구조 수정
qkrxogmla May 7, 2025
52f08b1
Merge pull request #30 from pirogramming/frontend_th
qkrxogmla May 7, 2025
1b6272b
[Feat] Connect backend and frontend for Assignment section
Imggaggu May 7, 2025
6db8e8a
[Chore] Remove unused imports
Imggaggu May 7, 2025
585d1eb
merge frontend to frontend_sj
Imggaggu May 7, 2025
a28e2de
[add]: Attend_week_component 추가
NamKyeongMin May 7, 2025
c5e9808
Merge pull request #31 from pirogramming/frontend_km
NamKyeongMin May 7, 2025
a79c6f6
사용되지는 않는 코드 삭제
qkrxogmla May 7, 2025
8d5f861
Merge pull request #33 from pirogramming/frontend_th
qkrxogmla May 7, 2025
7309089
[fix]: public/img 통일
NamKyeongMin May 7, 2025
e915aec
Merge pull request #34 from pirogramming/frontend_km
NamKyeongMin May 7, 2025
b7efae5
Merge pull request #36 from pirogramming/frontend_sj
Imggaggu May 7, 2025
5a06c9d
[add]: Attendance base tool 완성
NamKyeongMin May 7, 2025
fa86b48
Merge pull request #37 from pirogramming/frontend_km
NamKyeongMin May 7, 2025
4c29dda
[Fix] assignment api url
Imggaggu May 7, 2025
15ee0e5
Merge pull request #38 from pirogramming/frontend_sj
Imggaggu May 7, 2025
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 .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:

- name: Send Discord notification
env:
DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }}
DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK }}
run: |
curl -H "Content-Type: application/json" \
-X POST \
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,3 @@
.env
*.pem
.idea/

2 changes: 1 addition & 1 deletion frontend/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!doctype html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
Expand Down
1 change: 1 addition & 0 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"preview": "vite preview"
},
"dependencies": {
"axios": "^1.9.0",
"lucide-react": "^0.507.0",
"react": "^19.0.0",
"react-dom": "^19.0.0",
Expand Down
Binary file not shown.
Binary file added frontend/public/assets/img/boom-filled-green.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added frontend/public/assets/img/boom-filled-red.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added frontend/public/assets/img/full_coin_green.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions frontend/public/assets/img/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added frontend/public/assets/img/one_coin_yellow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added frontend/public/assets/img/tabler--boom.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions frontend/public/assets/img/tabler--boom.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added frontend/public/assets/img/three_out_red.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added frontend/public/assets/img/two_coin_yellow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions frontend/src/Admin.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
const Admin = () => {
return (
<div>
<h1>Admin Page</h1>
<p>This is the admin page.</p>
</div>
);
};
export default Admin;
42 changes: 0 additions & 42 deletions frontend/src/App.css

This file was deleted.

3 changes: 2 additions & 1 deletion frontend/src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import Deposit from "./Deposit";
import Intro from "./Intro";
import Admin from "./Admin";
import Attendance from "./Attendance";

function App() {
return (
<BrowserRouter>
Expand All @@ -23,4 +24,4 @@ function App() {
);
}

export default App;
export default App;
66 changes: 66 additions & 0 deletions frontend/src/Assignment.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
import React, { useEffect, useState } from "react";
import WeeklyListBlock from "./components/WeeklyListBlock";
import Header from "./components/Header";
import AssignmentInfoBlock from "./components/AssignmentInfoBlock";
import styles from "./Assignment.module.css";
import { mapStatus } from "./utils/AssignmentStatus.js";

const Assignment = () => {
const [weeks, setWeeks] = useState([]);
const [highlightCard, setHighlightCard] = useState(null);

useEffect(() => {
const user = JSON.parse(localStorage.getItem("user"));
const userId = user?.id;

if (!userId) return;

fetchAssignmentsByUser(userId)
.then((weekData) => {
const formatted = weekData.map((weekItem) => ({
label: `${weekItem.week}주차 ${weekItem.title}`,
details: weekItem.days.map((dayItem) => ({
day: dayItem.day,
subject: weekItem.title,
tasks: dayItem.details.map((task) => ({
label: task.assignmentName,
status: mapStatus(task.status),
})),
})),
}));

setWeeks(formatted);

// 형광 카드용 하이라이트 카드 추출 (가장 최근 주차 + 첫 요일)=>운영진용 페이지 만든 후 수정필요
// 운영진이 가장 최근 공개한 과제로.
if (formatted.length > 0 && formatted[0].details.length > 0) {
const first = formatted[0];
const firstDay = first.details[0];

setHighlightCard({
weekLabel: first.label,
day: firstDay.day,
tasks: firstDay.tasks,
});
}
})
.catch(() => {
alert("과제 정보를 불러오지 못했습니다.");
});
}, []);

return (
<div className={styles.assignment_page}>
<Header />
{highlightCard && (
<div className={styles.info}>
<AssignmentInfoBlock {...highlightCard} />
</div>
)}
<WeeklyListBlock weeks={weeks} />
</div>
);
};

export default Assignment;

13 changes: 13 additions & 0 deletions frontend/src/Assignment.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.info {
margin-top: 28px;
margin-bottom: 54px;
}

.assignment_page {
background-color: "black";
min-height: "100vh";
color: "white";
display: flex;
flex-direction: column;
align-items: center;
}
62 changes: 62 additions & 0 deletions frontend/src/Attendance.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
import { useState } from "react";
import Header from "./components/Header";
import InputBlock from "./components/InputBlock";
import AttendanceWeekInfo from "./components/AttendanceWeekInfo";
import styles from "./Attendance.module.css";

const Attendance = () => {
const [attendanceCode, setAttendanceCode] = useState([""]);
const handleChange = (index, value) => {
// 숫자만 입력 허용
if (/^\d*$/.test(value)) {
const userCodes = [...attendanceCode];
userCodes[index] = value;
setAttendanceCode(userCodes);
}
};
const handleSubmit = () => {
console.log("제출된 출석 코드: ", attendanceCode[0]);
// 서버 요청 등 추가 작업
};

return (
<div className={styles.attendance_page}>
<Header />
<InputBlock
inputs={[
{
type: "text",
placeholder: "출석코드를 입력하세요.",
},
]}
values={attendanceCode}
onChange={handleChange}
/>
{attendanceCode[0].length === 4 && (
<button className={styles.submitBtn} onClick={handleSubmit}>
Submit
</button>
)}
<div className={styles.attend_img_container}>
<div className={styles.boom_icon}>
<img src="/assets/img/tabler--boom.png" />
</div>
<div className={styles.boom_icon}>
<img src="/assets/img/tabler--boom.png" />
</div>
<div className={styles.boom_icon}>
<img src="/assets/img/tabler--boom.png" />
</div>
</div>
<div className={styles.attend_week_container}>
<AttendanceWeekInfo week={1} />
<AttendanceWeekInfo week={2} />
<AttendanceWeekInfo week={3} />
<AttendanceWeekInfo week={4} />
<AttendanceWeekInfo week={5} />
</div>
</div>
);
};

export default Attendance;
35 changes: 35 additions & 0 deletions frontend/src/Attendance.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
.attendance_page {
background-color: "black";
height: "100vh";
display: flex;
flex-direction: column;
align-items: center;
position: relative;
}
.submitBtn {
background-color: #ffffff;
opacity: 42%;
border-radius: 10px;
position: absolute;
top: 109px;
right: 63px;
padding: 7px;
}
.attend_img_container {
display: flex;
gap: 22px;
width: 100%;
padding-block: 40px;
justify-content: center;
}
.boom_icon {
width: 70px;
height: 65px;
}
.boom_icon > img {
width: 100%;
height: 100%;
}
.attend_week_container {
margin-top: 20px;
}
46 changes: 46 additions & 0 deletions frontend/src/Deposit.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
import Header from "./components/Header";
import styles from "./Deposit.module.css";
import axios from "axios";
import { useEffect, useState } from "react";

const Deposit = () => {
const [deposit, setDeposit] = useState(null);
useEffect(() => {
const user = JSON.parse(localStorage.getItem("user"));
const userId = user?.id;

if (!userId) return;

axios
.get(`/api/deposit/${userId}`)
.then((res) => setDeposit(res.data))
.catch((err) => {
alert("보증금 정보를 불러오지 못했습니다.");
});
}, []);

if (!deposit) return <div>loagin...</div>;

return (
<div className={styles.deposit_container}>
<Header />
<div className={styles.deposit}>
<span>잔여 보증금</span>
<span>{deposit.amount}원</span>
</div>
<div className={styles.deposit_detail}>
<span>과제 차감</span>
<span>{deposit.descentAssignment}원</span>
</div>
<div className={styles.deposit_detail}>
<span>출석 차감</span>
<span>{deposit.descentAttendance}원</span>
</div>
<div className={styles.deposit_detail}>
<span>보증금 방어권</span>
<span>{deposit.ascentDefence}원</span>
</div>
</div>
);
};
export default Deposit;
41 changes: 41 additions & 0 deletions frontend/src/Deposit.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
.deposit_container {
width: 390px;
display: flex;
flex-direction: column;
align-items: center;
}
.deposit {
background-color: var(--main-green);
width: 309px;
padding-top: 26px;
padding-bottom: 30px;
display: flex;
flex-direction: column;
align-items: center;
gap: 17px;
border-radius: 9px;
margin-top: 80px;
margin-bottom: 87px;
}
.deposit > span:nth-child(1) {
font-weight: bold;
font-size: 16px;
}
.deposit > span:nth-child(2) {
font-weight: bold;
font-size: 20px;
}
.deposit_detail {
background-color: #575757;
color: white;
border: 1px solid rgba(217, 217, 217, 0.4);
border-radius: 8px;
padding: 12px 20px;
font-size: 15px;
display: flex;
justify-content: space-between;
align-items: center;
width: 309px;
height: 47px;
margin-bottom: 15px;
}
31 changes: 31 additions & 0 deletions frontend/src/Home.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import React from "react";
import { useNavigate } from "react-router-dom";
import styles from "./Home.module.css";

const Home = () => {
const navigate = useNavigate();
return (
<div className={styles.home_container}>
<div className={styles.home}>
<h1 className={styles.pirocheck}>PIROCHECK</h1>
<button
className={styles.button}
onClick={() => navigate("/assignment")}
>
<p>ASSIGNMENT</p>
<p>CHECK</p>
</button>
<button
className={styles.button}
onClick={() => navigate("/attendance")}
>
<p>ATTENDANCE</p>
<p>CHECK</p>
</button>
<img src="/assets/img/logo.svg" alt="로고" />
</div>
</div>
);
};

export default Home;
Loading