@@ -13,6 +13,7 @@ import { absenceAttendancesApi } from '../../api/absenceAttendancesApi';
1313import { useSelector } from 'react-redux' ;
1414import { useNavigate } from 'react-router-dom' ;
1515import { URL_PATHS } from '../../constants/urlPaths' ;
16+ import AttendanceAbsenceDetail from '../staffAttendanceAbsence/AttendanceAbsenceDetail' ;
1617
1718export default function StudentAttendanceAbsence ( ) {
1819 const courseId = useSelector ( ( state ) => state . auth . user . courseId ) ;
@@ -42,6 +43,13 @@ export default function StudentAttendanceAbsence() {
4243 reason : '' ,
4344 } ) ;
4445
46+ const modalContent = currentItem ? (
47+ < AttendanceAbsenceDetail
48+ courseId = { courseId }
49+ id = { currentItem . absenceAttendanceId }
50+ />
51+ ) : null ;
52+
4553 const resetFormFields = ( ) => {
4654 setUploadData ( {
4755 category : categoryMap [ isActiveIndex ] ,
@@ -325,53 +333,6 @@ export default function StudentAttendanceAbsence() {
325333 />
326334 ) ;
327335 } ) ;
328- const editInputBox = (
329- < >
330- < div className = { styles . editInputBox } >
331- { ' ' }
332- < div className = { styles . editCategoryButton } > { editRoundButtons } </ div >
333- < div className = { styles . applicationDate } >
334- < NewInputBox label = "신청 날짜" value = { '2025-04-03' } > </ NewInputBox >
335- </ div >
336- < p className = { styles . editTermTitle } > 기간</ p >
337- < div className = { styles . editDateInputBox } >
338- < DatePicker
339- selected = { startDate }
340- onChange = { setStartDate }
341- dateFormat = "yyyy-MM-dd"
342- className = { styles . editDateInput }
343- locale = { ko }
344- placeholderText = "시작일"
345- maxDate = { endDate }
346- utcOffset = { 0 }
347- />
348- < span className = { styles . editDateSeparator } > ~</ span >
349- < DatePicker
350- selected = { endDate }
351- onChange = { setEndDate }
352- dateFormat = "yyyy-MM-dd"
353- className = { styles . editDateInput }
354- locale = { ko }
355- placeholderText = "종료일"
356- minDate = { startDate }
357- utcOffset = { 0 }
358- />
359- </ div >
360- < div className = { styles . editTextInput } >
361- < NewInputBox
362- label = "서류"
363- title = "파일 선택 또는 끌어놓기..."
364- type = "file"
365- onChange = { ( e ) => setFile ( e . target . files [ 0 ] ) }
366- innerRef = { fileInputRef }
367- />
368- < div className = { styles . editReason } >
369- < NewInputBox label = "사유" value = { reason } onChange = { handleOnChange } />
370- </ div >
371- </ div >
372- </ div >
373- </ >
374- ) ;
375336
376337 return (
377338 < >
@@ -445,7 +406,7 @@ export default function StudentAttendanceAbsence() {
445406 onClose = { handleCloseModal }
446407 isEnable = { true }
447408 mainText = { '수정' }
448- content = { editInputBox }
409+ content = { modalContent }
449410 />
450411 </ div >
451412 </ >
0 commit comments