fix: K) 위원회 일정관리 날짜형식 변경

thkim
thkim 2024-03-18 17:56:07 +09:00
parent 72e996193a
commit 964b0ebf34
2 changed files with 22 additions and 3 deletions

View File

@ -354,7 +354,7 @@ function Schedules(props) {
? ?
<tbody> <tbody>
<tr> <tr>
<td colspan="7"> <td colSpan="7">
<Box sx={{ display: 'flex', width: '100%', padding: '250px 0px' }}> <Box sx={{ display: 'flex', width: '100%', padding: '250px 0px' }}>
<CircularProgress sx={{ margin: '0px auto', }}/> <CircularProgress sx={{ margin: '0px auto', }}/>
</Box> </Box>

View File

@ -36,6 +36,25 @@ function SchedulesDetail(props) {
} }
const convertDate = (str) => {
if( !str ) {
return null;
}
let year = str.substring(0, 4);
let month = str.substring(5, 7);
let date = str.substring(8, 10);
let hour = str.substring(11, 13);
let minute = str.substring(14, 16);
return {
year: year,
month: month,
date: date,
hour: hour,
minute: minute,
dateForm: year + "-" + month + "-" + date + " " + hour + ":" + minute + ""
}
}
const onClickDeleteSchedule = (schdulId) => { const onClickDeleteSchedule = (schdulId) => {
const deleteBoardURL = `/schedule/${schdulId}`; const deleteBoardURL = `/schedule/${schdulId}`;
@ -116,7 +135,7 @@ function SchedulesDetail(props) {
</dl> </dl>
<dl> <dl>
<dt>날짜/시간 </dt> <dt>날짜/시간 </dt>
<dd> {scheduleDetail.startDate} ~ {scheduleDetail.endDate}</dd> <dd> { convertDate(scheduleDetail?.startDate)?.dateForm} ~ {convertDate(scheduleDetail?.endDate)?.dateForm} </dd>
</dl> </dl>
<dl> <dl>
<dt>내용</dt> <dt>내용</dt>