From 48b5a5131f5185916977e305c70b3444bdcf601a Mon Sep 17 00:00:00 2001 From: seonjuuu Date: Mon, 2 Jun 2025 17:41:47 +0900 Subject: [PATCH 01/12] =?UTF-8?q?[feat]=20yml=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/pirocheck/src/main/resources/application.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/pirocheck/src/main/resources/application.yml b/backend/pirocheck/src/main/resources/application.yml index bdef4aa..8d44732 100644 --- a/backend/pirocheck/src/main/resources/application.yml +++ b/backend/pirocheck/src/main/resources/application.yml @@ -17,7 +17,7 @@ server: session: cookie: http-only: true # 세션 쿠키를 HttpOnly로 설정 (JS에서 접근 불가) - secure: false # HTTPS 전용 전송 (Https -> true로 바꿔야 함) + secure: true # HTTPS 전용 전송 (Https -> true로 바꿔야 함) same-site: Lax # CSRF 방지 timeout: 30m # 세션 타임아웃 30분 (30 minutes) address: 0.0.0.0 From e603fd0cd74e1389e50769d6c5712f8bba209179 Mon Sep 17 00:00:00 2001 From: Suhjung Park <145967352+Imggaggu@users.noreply.github.com> Date: Mon, 2 Jun 2025 18:09:47 +0900 Subject: [PATCH 02/12] Update api.js --- frontend/src/api/api.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/api/api.js b/frontend/src/api/api.js index 1950026..ae4217f 100644 --- a/frontend/src/api/api.js +++ b/frontend/src/api/api.js @@ -1,7 +1,7 @@ import axios from "axios"; const api = axios.create({ - baseURL: "http://api.pirocheck.org:8080/api", + baseURL: "https://api.pirocheck.org:8080/api", // 수정 필요한지 재검 필요함 // "http://api.pirocheck.org:8080/api" withCredentials: true, From 1a45c3bcb41d2ee96ce9b923c66ef8700c55d65d Mon Sep 17 00:00:00 2001 From: Suhjung Park <145967352+Imggaggu@users.noreply.github.com> Date: Mon, 2 Jun 2025 18:18:21 +0900 Subject: [PATCH 03/12] Update user.js --- frontend/src/api/user.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/api/user.js b/frontend/src/api/user.js index 12e057a..3309ca5 100644 --- a/frontend/src/api/user.js +++ b/frontend/src/api/user.js @@ -1,5 +1,5 @@ export const loginUser = async ({ name, password }) => { - const res = await fetch("http://api.pirocheck.org:8080/api/login", { + const res = await fetch("https://api.pirocheck.org/api/login", { method: "POST", headers: { "Content-Type": "application/json", From 6c96fe1a73bbcb091ab155f2701a9676208abc1d Mon Sep 17 00:00:00 2001 From: Suhjung Park <145967352+Imggaggu@users.noreply.github.com> Date: Mon, 2 Jun 2025 18:18:41 +0900 Subject: [PATCH 04/12] Update api.js --- frontend/src/api/api.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/api/api.js b/frontend/src/api/api.js index ae4217f..c2c9d61 100644 --- a/frontend/src/api/api.js +++ b/frontend/src/api/api.js @@ -1,7 +1,7 @@ import axios from "axios"; const api = axios.create({ - baseURL: "https://api.pirocheck.org:8080/api", + baseURL: "https://api.pirocheck.org/api", // 수정 필요한지 재검 필요함 // "http://api.pirocheck.org:8080/api" withCredentials: true, From 032f4fbf4915788f1c985c1374470034f2f394f3 Mon Sep 17 00:00:00 2001 From: Suhjung Park <145967352+Imggaggu@users.noreply.github.com> Date: Mon, 2 Jun 2025 18:19:11 +0900 Subject: [PATCH 05/12] Update vite.config.js --- frontend/vite.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/vite.config.js b/frontend/vite.config.js index 26f670c..6fe408f 100644 --- a/frontend/vite.config.js +++ b/frontend/vite.config.js @@ -7,7 +7,7 @@ export default defineConfig({ server: { proxy: { "/api": { - target: "http://api.pirocheck.org:8080/api", + target: "https://api.pirocheck.org/api", changeOrigin: true, }, }, From d863c18d351797ea5f8ba25930778165555090c0 Mon Sep 17 00:00:00 2001 From: Suhjung Park <145967352+Imggaggu@users.noreply.github.com> Date: Sat, 14 Jun 2025 22:16:43 +0900 Subject: [PATCH 06/12] Update AdminStudentAssignment.jsx --- frontend/src/pages/admin/AdminStudentAssignment.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/pages/admin/AdminStudentAssignment.jsx b/frontend/src/pages/admin/AdminStudentAssignment.jsx index c29c35e..b02cf21 100644 --- a/frontend/src/pages/admin/AdminStudentAssignment.jsx +++ b/frontend/src/pages/admin/AdminStudentAssignment.jsx @@ -42,7 +42,7 @@ const AdminStudentAssignment = () => { id: task.id, label: task.assignmentName, status: task.status, - //modified: false, + modified: false, })), })), })); From 9e28625663ab9bbeeab8090445e7f466a56d421d Mon Sep 17 00:00:00 2001 From: Suhjung Park <145967352+Imggaggu@users.noreply.github.com> Date: Sat, 14 Jun 2025 22:41:40 +0900 Subject: [PATCH 07/12] Update AdminStudentAssignment.jsx --- .../pages/admin/AdminStudentAssignment.jsx | 29 +++++++++---------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/frontend/src/pages/admin/AdminStudentAssignment.jsx b/frontend/src/pages/admin/AdminStudentAssignment.jsx index b02cf21..6a59f9e 100644 --- a/frontend/src/pages/admin/AdminStudentAssignment.jsx +++ b/frontend/src/pages/admin/AdminStudentAssignment.jsx @@ -64,19 +64,20 @@ const AdminStudentAssignment = () => { }); }, [studentId, week]); - const handleStatusChange = (weekIdx, dayIdx, taskIdx, newStatus) => { - const updated = [...weeks]; - const task = updated[weekIdx].days[dayIdx].tasks[taskIdx]; - task.status = newStatus; - task.modified = true; - setWeeks(updated); - }; - /* - const handleSave = async (taskId, status) => { - await api.put("/admin/assignment/status", { - assignmentId: taskId, - status, - }); + const handleStatusChange = (taskId, newStatus) => { + const updatedWeeks = weeks.map((weekItem) => ({ + ...weekItem, + days: weekItem.days.map((dayItem) => ({ + ...dayItem, + tasks: dayItem.tasks.map((task) => + task.id === taskId + ? { ...task, status: newStatus, modified: true } + : task + ), + })), + })); + + setWeeks(updatedWeeks); }; */ @@ -134,8 +135,6 @@ const AdminStudentAssignment = () => { value={task.status} onChange={(e) => handleStatusChange( - weekIdx, - dayIdx, taskIdx, e.target.value ) From f389fceab5baea5a024ddc5ac3e08e9e6fe46679 Mon Sep 17 00:00:00 2001 From: Suhjung Park <145967352+Imggaggu@users.noreply.github.com> Date: Sat, 14 Jun 2025 22:58:44 +0900 Subject: [PATCH 08/12] Update AdminStudentAssignment.jsx --- frontend/src/pages/admin/AdminStudentAssignment.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/pages/admin/AdminStudentAssignment.jsx b/frontend/src/pages/admin/AdminStudentAssignment.jsx index 6a59f9e..fd2d088 100644 --- a/frontend/src/pages/admin/AdminStudentAssignment.jsx +++ b/frontend/src/pages/admin/AdminStudentAssignment.jsx @@ -79,7 +79,7 @@ const AdminStudentAssignment = () => { setWeeks(updatedWeeks); }; -*/ + const handleSave = async (taskId, status) => { From f29291aeff6dc88aba20038fbfac952968227b7f Mon Sep 17 00:00:00 2001 From: Imggaggu Date: Sat, 14 Jun 2025 23:04:34 +0900 Subject: [PATCH 09/12] =?UTF-8?q?[Fix]=20=EC=9D=B4=EC=A0=84=EC=9C=BC?= =?UTF-8?q?=EB=A1=9C...?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 + .../pages/admin/AdminStudentAssignment.jsx | 31 ++++++++++--------- 2 files changed, 17 insertions(+), 15 deletions(-) diff --git a/.gitignore b/.gitignore index 53d4561..70dccf0 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,4 @@ .env *.pem .idea/ +et --hard HEAD~1 \ No newline at end of file diff --git a/frontend/src/pages/admin/AdminStudentAssignment.jsx b/frontend/src/pages/admin/AdminStudentAssignment.jsx index fd2d088..b02cf21 100644 --- a/frontend/src/pages/admin/AdminStudentAssignment.jsx +++ b/frontend/src/pages/admin/AdminStudentAssignment.jsx @@ -64,22 +64,21 @@ const AdminStudentAssignment = () => { }); }, [studentId, week]); - const handleStatusChange = (taskId, newStatus) => { - const updatedWeeks = weeks.map((weekItem) => ({ - ...weekItem, - days: weekItem.days.map((dayItem) => ({ - ...dayItem, - tasks: dayItem.tasks.map((task) => - task.id === taskId - ? { ...task, status: newStatus, modified: true } - : task - ), - })), - })); - - setWeeks(updatedWeeks); + const handleStatusChange = (weekIdx, dayIdx, taskIdx, newStatus) => { + const updated = [...weeks]; + const task = updated[weekIdx].days[dayIdx].tasks[taskIdx]; + task.status = newStatus; + task.modified = true; + setWeeks(updated); }; - + /* + const handleSave = async (taskId, status) => { + await api.put("/admin/assignment/status", { + assignmentId: taskId, + status, + }); + }; +*/ const handleSave = async (taskId, status) => { @@ -135,6 +134,8 @@ const AdminStudentAssignment = () => { value={task.status} onChange={(e) => handleStatusChange( + weekIdx, + dayIdx, taskIdx, e.target.value ) From f27aa2cde8d44e1f87ba22d24fc3579dc3abf48c Mon Sep 17 00:00:00 2001 From: Suhjung Park <145967352+Imggaggu@users.noreply.github.com> Date: Sat, 14 Jun 2025 23:31:43 +0900 Subject: [PATCH 10/12] Update vite.config.js --- frontend/vite.config.js | 1 + 1 file changed, 1 insertion(+) diff --git a/frontend/vite.config.js b/frontend/vite.config.js index 6fe408f..43d84a4 100644 --- a/frontend/vite.config.js +++ b/frontend/vite.config.js @@ -3,6 +3,7 @@ import react from "@vitejs/plugin-react"; // https://vitejs.dev/config/ export default defineConfig({ + base: './', plugins: [react()], server: { proxy: { From 21a143f274515cd7530d787602642d782e1f8a71 Mon Sep 17 00:00:00 2001 From: Suhjung Park <145967352+Imggaggu@users.noreply.github.com> Date: Sat, 14 Jun 2025 23:45:47 +0900 Subject: [PATCH 11/12] Update deployFront.yml --- .github/workflows/deployFront.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/deployFront.yml b/.github/workflows/deployFront.yml index 177eaf3..512d2a4 100644 --- a/.github/workflows/deployFront.yml +++ b/.github/workflows/deployFront.yml @@ -24,6 +24,9 @@ jobs: rm -rf node_modules package-lock.json npm install npm install --save-dev vite rollup + + - name: Clean dist + run: rm -rf frontend/dist - name: Build frontend run: | From e28239fd6aefe9147c380eff6e1d25e76887e19a Mon Sep 17 00:00:00 2001 From: Suhjung Park <145967352+Imggaggu@users.noreply.github.com> Date: Sun, 15 Jun 2025 00:05:04 +0900 Subject: [PATCH 12/12] Update deployFront.yml --- .github/workflows/deployFront.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deployFront.yml b/.github/workflows/deployFront.yml index 512d2a4..e184f7f 100644 --- a/.github/workflows/deployFront.yml +++ b/.github/workflows/deployFront.yml @@ -25,8 +25,8 @@ jobs: npm install npm install --save-dev vite rollup - - name: Clean dist - run: rm -rf frontend/dist + #- name: Clean dist + # run: rm -rf frontend/dist - name: Build frontend run: |