refactor(WEB): 코드 품질 개선 및 불필요 코드 제거

- 미사용 import/변수/console.log 대량 정리 (100+개 파일)
- ItemMasterContext 간소화 (미사용 로직 제거)
- IntegratedListTemplateV2 / UniversalListPage 개선
- 결재 컴포넌트(ApprovalBox, DraftBox, ReferenceBox) 정리
- HR 컴포넌트(급여/휴가/부서) 코드 간소화
- globals.css 스타일 정리 및 개선
- AuthenticatedLayout 개선
- middleware CSP 정리
- proxy route 불필요 로깅 제거

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
유병철
2026-02-10 20:55:11 +09:00
parent 437d5f6834
commit 0db6302652
138 changed files with 779 additions and 1034 deletions

View File

@@ -2,7 +2,7 @@
import { useMemo } from 'react';
import { cn } from '@/components/ui/utils';
import { formatDate, checkIsToday } from './utils';
import { formatCalendarDate, checkIsToday } from './utils';
import { EVENT_COLORS } from './types';
import type { DayTimeViewProps, ScheduleEvent } from './types';
import { format, parseISO } from 'date-fns';
@@ -22,7 +22,7 @@ export function DayTimeView({
onEventClick,
}: DayTimeViewProps) {
const today = checkIsToday(currentDate);
const dayStr = formatDate(currentDate, 'yyyy-MM-dd');
const dayStr = formatCalendarDate(currentDate, 'yyyy-MM-dd');
const weekdayLabel = format(currentDate, 'EEEE', { locale: ko });
// 시간 슬롯 생성

View File

@@ -2,7 +2,7 @@
import { useMemo } from 'react';
import { cn } from '@/components/ui/utils';
import { getWeekDays, getWeekdayHeaders, formatDate, checkIsToday, isSameDate } from './utils';
import { getWeekDays, getWeekdayHeaders, formatCalendarDate, checkIsToday, isSameDate } from './utils';
import { EVENT_COLORS } from './types';
import type { WeekTimeViewProps, ScheduleEvent } from './types';
import { format, parseISO } from 'date-fns';
@@ -42,7 +42,7 @@ export function WeekTimeView({
const map = new Map<string, { allDay: ScheduleEvent[]; timed: ScheduleEvent[] }>();
weekDays.forEach((day) => {
const dateStr = formatDate(day, 'yyyy-MM-dd');
const dateStr = formatCalendarDate(day, 'yyyy-MM-dd');
map.set(dateStr, { allDay: [], timed: [] });
});
@@ -51,7 +51,7 @@ export function WeekTimeView({
const eventEndDate = parseISO(event.endDate);
weekDays.forEach((day) => {
const dateStr = formatDate(day, 'yyyy-MM-dd');
const dateStr = formatCalendarDate(day, 'yyyy-MM-dd');
// 이벤트가 이 날짜를 포함하는지 확인
if (day >= eventStartDate && day <= eventEndDate) {
const bucket = map.get(dateStr);
@@ -134,7 +134,7 @@ export function WeekTimeView({
<span className="text-[10px] text-muted-foreground"></span>
</div>
{weekDays.map((day, i) => {
const dateStr = formatDate(day, 'yyyy-MM-dd');
const dateStr = formatCalendarDate(day, 'yyyy-MM-dd');
const allDayEvents = eventsByDate.get(dateStr)?.allDay || [];
return (
<div
@@ -174,7 +174,7 @@ export function WeekTimeView({
</div>
{/* 요일별 셀 */}
{weekDays.map((day, i) => {
const dateStr = formatDate(day, 'yyyy-MM-dd');
const dateStr = formatCalendarDate(day, 'yyyy-MM-dd');
const timedEvents = eventsByDate.get(dateStr)?.timed || [];
const slotEvents = timedEvents.filter((event) => {
if (!event.startTime) return false;

View File

@@ -93,7 +93,7 @@ export function isSameDate(date1: Date | null, date2: Date): boolean {
/**
* 날짜 포맷
*/
export function formatDate(date: Date, formatStr: string = 'yyyy-MM-dd'): string {
export function formatCalendarDate(date: Date, formatStr: string = 'yyyy-MM-dd'): string {
return format(date, formatStr, { locale: ko });
}