diff --git a/src/main/webapp/WEB-INF/jsp/web/ve/aplct/sspnIdtmt/eduAplctList.jsp b/src/main/webapp/WEB-INF/jsp/web/ve/aplct/sspnIdtmt/eduAplctList.jsp index bb63dd3f..2d475a17 100644 --- a/src/main/webapp/WEB-INF/jsp/web/ve/aplct/sspnIdtmt/eduAplctList.jsp +++ b/src/main/webapp/WEB-INF/jsp/web/ve/aplct/sspnIdtmt/eduAplctList.jsp @@ -91,6 +91,57 @@ $(document).ready(function(){ $applyButton.removeAttr('data-tooltip'); } }); + // 상태값 확인 모바일 + $(".ddlnCdSttsM").each(function() { + var $thisCell = $(this); + var $applyButton = $thisCell.closest('ul').find(".aplctBtnM button"); +// var $aprvlCd = $thisCell.closest('tr').find(".aplctBtn input"); + // 텍스트가 비어있는지 확인 + if ($thisCell.text().trim() === "") { + var $currentRow = $thisCell.closest('ul'); + + var strtPnttm = new Date($currentRow.find("li:eq(2)").find("span:eq(1)").text().split("~")[0].trim()); + var endPnttm = new Date($currentRow.find("li:eq(2)").find("span:eq(1)").text().split("~")[1].trim()); + var currentDate = new Date(); + // new Date에서 년, 월, 일만 생성 + currentDate = new Date(currentDate.getFullYear(), currentDate.getMonth(), currentDate.getDate()); + + // 시간, 분, 초 초기화 + strtPnttm.setHours(0, 0, 0, 0); + endPnttm.setHours(0, 0, 0, 0); + currentDate.setHours(0, 0, 0, 0); + + var ddlnCdText = ''; + + if (currentDate < strtPnttm) { + ddlnCdText = "접수전"; + } else if (currentDate >= strtPnttm && currentDate <= endPnttm) { + ddlnCdText = "접수중"; + } else if (currentDate > endPnttm) { + ddlnCdText = "접수종료"; + } + + $thisCell.text(ddlnCdText); + + } + + console.log('$thisCell.text() : ', $thisCell.text()); + console.log('$thisCell.text().trim() !== "접수중" : ', $thisCell.text().trim() !== "접수중"); + // 텍스트가 "접수중"인지 확인 + //if ($thisCell.text().trim() !== "접수중" && $thisCell.text().trim() !== "취소") { + if ($thisCell.text().trim() !== "접수중") { + $applyButton.prop('disabled', true); // 버튼 비활성화 + } + /* 24.01.22 웹접근성 검사를 위하여 disabled 사용제외 */ + if($applyButton.prop('disabled')){ + $applyButton.removeAttr('onclick'); + $applyButton.prop('disabled', false); + $applyButton.css('background-color', '#888'); + /*24.01.23 웹접근성 검사를 위하여 title 추가*/ + $applyButton.attr('title','비활성화됨'); + $applyButton.removeAttr('data-tooltip'); + } + }); // 달력 웹접근성 @@ -730,7 +781,64 @@ $(document).ready(function(){ - + + + + +