From c3b7f0c24754827c3a7755eb61952e2c4c337289 Mon Sep 17 00:00:00 2001 From: mint723 Date: Mon, 15 Sep 2025 16:01:18 +0900 Subject: [PATCH 1/2] =?UTF-8?q?fix:=20=EC=8B=9C=EA=B0=84=20=EB=AC=B8?= =?UTF-8?q?=EC=A0=9C=20=ED=95=B4=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ganttchart/ganttChart.config.js | 9 ++++---- src/components/kanban/Kanban.jsx | 6 +++-- src/components/kanban/KanbanCard.jsx | 23 +++++++++++-------- 3 files changed, 22 insertions(+), 16 deletions(-) diff --git a/src/components/ganttchart/ganttChart.config.js b/src/components/ganttchart/ganttChart.config.js index 59ffbe8..283f711 100644 --- a/src/components/ganttchart/ganttChart.config.js +++ b/src/components/ganttchart/ganttChart.config.js @@ -1,11 +1,11 @@ export const scales = [ - { unit: "month", step: 1, format: "Y년 M" }, + { unit: "month", step: 1, format: "Y년 M월" }, { unit: "day", step: 1, format: "d일" }, ]; export const columns = [ { id: "text", header: "작업명", flexGrow: 1, align: "center"}, - { id: "start", header: "마감일", flexGrow: 1, align: "center" }, + { id: "start", header: "시작일", flexGrow: 1, align: "center" }, // { id: "action", header: "", width: 50, align: "center" }, ]; @@ -40,8 +40,7 @@ export const calculateDuration = (start, end) => { const startDate = new Date(start); const endDate = new Date(end); startDate.setHours(0, 0, 0, 0); - endDate.setHours(0, 0, 0, 0); + endDate.setHours(23, 59, 59, 59); const diffTime = Math.abs(endDate - startDate); - const diffDays = Math.ceil(diffTime / (1000 * 60 * 60 * 24)); - return diffDays + 1; + return Math.ceil(diffTime / (1000 * 60 * 60 * 24)); }; diff --git a/src/components/kanban/Kanban.jsx b/src/components/kanban/Kanban.jsx index 5be84e1..41be9db 100644 --- a/src/components/kanban/Kanban.jsx +++ b/src/components/kanban/Kanban.jsx @@ -52,10 +52,12 @@ function Kanban({ projectId, members = [] }) { }; const handleAddNewCard = (columnId) => { - // 새 이슈에 대한 기본 날짜 정보를 추가합니다. const startDate = new Date(); + startDate.setHours(0, 0, 0, 0); // 00시 00분 00초 000밀리초 + const endDate = new Date(); - endDate.setDate(startDate.getDate() + 1); // 기본 마감일은 다음 날로 설정 + endDate.setDate(startDate.getDate() + 1); // 다음 날로 설정 + endDate.setHours(23, 59, 59, 999); // 23시 59분 59초 999밀리초 const newIssueData = { title: "새로운 작업", diff --git a/src/components/kanban/KanbanCard.jsx b/src/components/kanban/KanbanCard.jsx index 4c8b1dc..39fdac4 100644 --- a/src/components/kanban/KanbanCard.jsx +++ b/src/components/kanban/KanbanCard.jsx @@ -33,21 +33,26 @@ function KanbanCard({ item, index, onCardClick, onDelete }) { }; const formatDate = (dateString) => { - const date = new Date(dateString) - const today = new Date() - const diffTime = date - today - const diffDays = Math.ceil(diffTime / (1000 * 60 * 60 * 24)) + const date = new Date(dateString); + const today = new Date(); + + // 시간 정규화 + date.setHours(23, 59, 59, 999); // 대상 날짜는 하루 끝으로 + today.setHours(0, 0, 0, 0); // 오늘은 하루 시작으로 + + const diffTime = date - today; + const diffDays = Math.floor(diffTime / (1000 * 60 * 60 * 24)); if (diffDays < 0) { - return `${Math.abs(diffDays)}일 지남` + return `${Math.abs(diffDays)}일 지남`; } else if (diffDays === 0) { - return '오늘' + return '오늘'; } else if (diffDays === 1) { - return '내일' + return '내일'; } else { - return `${diffDays}일 남음` + return `${diffDays}일 남음`; } - } + }; return ( From dfa918729e199f015b2602557a343ae05fc89f40 Mon Sep 17 00:00:00 2001 From: mint723 Date: Mon, 15 Sep 2025 16:07:46 +0900 Subject: [PATCH 2/2] =?UTF-8?q?feat:=20=ED=94=84=EB=A1=9C=EC=A0=9D?= =?UTF-8?q?=ED=8A=B8=20=EC=A0=95=EB=A0=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/project/ProjectFilters.jsx | 11 +++++------ src/pages/ProjectManager.jsx | 4 ++-- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/components/project/ProjectFilters.jsx b/src/components/project/ProjectFilters.jsx index 8405e2d..1bba342 100644 --- a/src/components/project/ProjectFilters.jsx +++ b/src/components/project/ProjectFilters.jsx @@ -27,11 +27,10 @@ function ProjectFilters({ filters, onFiltersChange, sortBy, onSortChange }) { ]; const sortOptions = [ - { value: "created", label: "생성일순" }, - { value: "name", label: "이름순" }, - { value: "progress", label: "진행률순" }, - { value: "endDate", label: "마감일순" }, - { value: "priority", label: "우선순위순" } + { value: "CREATED_AT", label: "생성일순" }, + { value: "NAME", label: "이름순" }, + { value: "END_DATE", label: "마감일순" }, + { value: "PRIORITY", label: "우선순위순" } ]; return ( @@ -77,7 +76,7 @@ function ProjectFilters({ filters, onFiltersChange, sortBy, onSortChange }) { {/* 필터 초기화 */} - {(filters.status !== 'all' || filters.priority !== 'all' || filters.assignee !== 'all' || filters.period !== 'all') && ( + {(filters.status !== 'all' || filters.priority !== 'all') && (