일계부 말일 alert 창

This commit is contained in:
주수현
2025-07-11 08:41:10 +09:00
parent 01717687ab
commit f8d8b606b1
12 changed files with 169 additions and 4 deletions

View File

@@ -769,6 +769,7 @@
root: '',
list: '/record/calendar/{searchMonth}/{groupNo}',
create: '/record/daily/{searchMonth}/{groupNo}',
alert: '/api/record/daily/alert/{searchMonth}',
},
submitted: false,
};
@@ -807,6 +808,61 @@
}
$('#selectedDay').html(html);
// 오늘 날짜가 해당 달의 마지막 날인지 확인
const today = new Date();
const lastDayOfMonth = new Date(viewDate.getFullYear(), viewDate.getMonth() + 1, 0); // 해당 달의 마지막 날
if (today.getFullYear() === lastDayOfMonth.getFullYear() &&
today.getMonth() === lastDayOfMonth.getMonth() &&
today.getDate() === lastDayOfMonth.getDate()) {
ajaxUtil._ajaxSyncMethod(
ENV.httpUrl.alert.replace('{searchMonth}', searchMonth.replace('-', '')),
{},
function (response) {
let dailyNo = []
let msgTxt = '';
let month = viewDate.getMonth() + 1;
msgTxt += "등록하지 않은 일계부 항목이 있습니다.\n 정확한 조사를 위해 꾸준히 입력해 주세요.\n";
if(response.dailyRecordAlertDtoList.length > 0){
response.dailyRecordAlertDtoList.forEach((dto) =>{
let dateTxt;
if(dto.startDay === dto.endDay){
dateTxt = month+"월 "+dto.startDay+"일";
}else{
dateTxt = month+"월 "+dto.startDay+"~"+dto.endDay+"일";
}
dailyNo.push(dateTxt);
});
msgTxt += "1. 일계부 미등록 \n"+dailyNo.join(',')+"\n";
}
if(response.monthRecordAlertDtoList.length > 0) {
response.monthRecordAlertDtoList.forEach((dto,idx) => {
if(response.dailyRecordAlertDtoList.length > 0){
idx ++;
}
msgTxt += idx+". "+dto+"\n";
});
}
if(response.dailyRecordAlertDtoList.length > 0 || dto.monthRecordAlertDtoList.length > 0) {
etUI.dialog.alert({
title: '',
message: msgTxt,
type:'alert',
callback: function () {
},
});
}
},
function (rstData, status) {
},
'get'
,'json'
);
}
},
recordCreate(searchMonth, groupNo) {
location.href = ENV.httpUrl.create.replace('{searchMonth}', searchMonth.replace('-', '')).replace('{groupNo}', groupNo);