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 ( 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') && (