From 9b55cb57c99af948fd5f6a829e432e42b38910cf Mon Sep 17 00:00:00 2001 From: backuppc Date: Tue, 30 Dec 2025 15:11:05 +0900 Subject: [PATCH] UI Unification: Refactor MonthlyWorkPage to Notepad design system --- Project/frontend/src/pages/MonthlyWork.tsx | 294 +++++++++++++-------- 1 file changed, 178 insertions(+), 116 deletions(-) diff --git a/Project/frontend/src/pages/MonthlyWork.tsx b/Project/frontend/src/pages/MonthlyWork.tsx index b480ef2..77339f1 100644 --- a/Project/frontend/src/pages/MonthlyWork.tsx +++ b/Project/frontend/src/pages/MonthlyWork.tsx @@ -1,14 +1,20 @@ import { useState, useEffect, useCallback } from 'react'; import { - Calendar, + CalendarDays, Save, RefreshCw, ChevronLeft, ChevronRight, Loader2, + Calendar, + CheckCircle2, + XCircle, + FileText, + Clock } from 'lucide-react'; import { comms } from '@/communication'; import { HolidayItem } from '@/types'; +import { clsx } from 'clsx'; interface DayInfo extends HolidayItem { dayOfWeek: number; @@ -104,144 +110,200 @@ export function MonthlyWorkPage() { const freeDays = holidays.filter(h => h.free).length; return ( -
- {/* 헤더 */} -
-
-
-
- +
+ {/* 월별근무표 메인 카드 */} +
+
+
+
+
-

월별근무표

-

휴일 및 근무일 관리

+

월별근무표

+

+ Monthly Company Schedule +

-
- {/* 월 선택 */} -
+
+ {/* 월 선택 컨트롤 */} +
- setMonth(e.target.value)} - className="bg-transparent text-white text-center w-32 focus:outline-none" - /> + +
+ + setMonth(e.target.value)} + className="bg-transparent border-none text-xs font-bold text-white pl-7 pr-2 focus:outline-none focus:ring-0 w-28 h-full cursor-pointer" + /> +
+
- {/* 버튼들 */} - + {/* 빠른 통계 */} +
+
+
+ Duty + {workDays} +
+
+
+
+ Free + {freeDays} +
+
- +
+ {/* 새로고침 */} + + + {/* 저장 버튼 */} + +
- {/* 통계 */} -
- - 근무일: {workDays}일 - - - 휴일: {freeDays}일 - - - 총: {holidays.length}일 - + {/* 리스트 헤더 */} +
+
날짜 (Date)
+
요일
+
휴일 지정
+
업무 및 특이사항 (Memo)
-
- {/* 테이블 */} -
- {loading ? ( -
- -
- ) : ( -
- - - - - - - - - - - {holidays.map((day) => ( - - - - - - - ))} - -
날짜요일휴일메모
+
+ {loading ? ( +
+ +

근무표 데이터를 불러오는 중...

+
+ ) : holidays.length === 0 ? ( +
+ +

근무표가 생성되지 않았습니다

+

No schedule data found

+
+ ) : ( + holidays.map((day) => ( +
+ {/* 날짜 */} +
+
+ + {day.pdate} -
- {day.dayName} - - - - handleMemoChange(day.idx, e.target.value)} - placeholder="메모 입력..." - className="w-full bg-white/5 border border-white/10 rounded-lg px-3 py-1.5 text-white text-sm focus:outline-none focus:border-primary-500" - /> -
+ +
+
+ + {/* 요일 */} +
+ + {day.dayName} + +
+ + {/* 휴일지정 */} +
+ +
+ + {/* 메모 */} +
+
+ + handleMemoChange(day.idx, e.target.value)} + placeholder="메모를 입력하세요..." + className="w-full bg-white/5 border border-white/5 rounded-xl pl-9 pr-4 py-1.5 text-xs text-white placeholder:text-white/5 focus:outline-none focus:bg-white/10 focus:border-primary-500/30 transition-all font-medium" + /> +
+
+
+ )) + )} +
+ + {/* 푸터 */} +
+
+ Company Schedule Hub / + Month {month}
- )} +
+
+
+ Sunday (휴일) +
+
+
+ Saturday (토요일) +
+
+
);