diff --git a/resources/views/system/holidays/index.blade.php b/resources/views/system/holidays/index.blade.php index e1d606ab..75470ad6 100644 --- a/resources/views/system/holidays/index.blade.php +++ b/resources/views/system/holidays/index.blade.php @@ -258,6 +258,16 @@ function HolidayManagement() { }; const getDefaultBulkText = () => { + // 해당 연도에 등록된 데이터가 있으면 기존 데이터를 텍스트로 변환 + if (holidays.length > 0) { + const typeLabels = { public: '공휴일', company: '회사지정', alternative: '대체휴일', temporary: '임시휴일' }; + return holidays.map(h => { + const datePart = h.startDate === h.endDate ? h.startDate : `${h.startDate}~${h.endDate}`; + const typePart = h.type !== 'public' ? ` [${typeLabels[h.type] || h.type}]` : ''; + return `${datePart} ${h.name}${typePart}`; + }).join('\n'); + } + // 등록된 데이터가 없으면 기본 공휴일 예시 const y = selectedYear; return `${y}-01-01 신정 ${y}-01-28~${y}-01-30 설날연휴