From 32eaa08b2f9afd201ba2fdd41598b75bb350b777 Mon Sep 17 00:00:00 2001 From: TaehunPark Date: Sat, 28 Jan 2023 10:47:44 +0900 Subject: [PATCH 1/2] =?UTF-8?q?fix=20:=20=EC=99=B8=EC=82=AC=EA=B2=BD?= =?UTF-8?q?=EC=B0=B0=20=EA=B2=BD=EB=A0=A5=20=ED=98=84=EC=9E=AC=EC=9E=AC?= =?UTF-8?q?=EC=A7=81=EC=A4=91=20=EC=B6=94=EA=B0=80=20=EC=88=98=EC=A0=95?= =?UTF-8?q?=EC=82=AC=ED=95=AD=2060=EB=B2=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../faisp/main/userInfo/model/UserCareer.java | 2 ++ .../resources/static/js/police/careerMgt.js | 28 +++++++++++++++++++ .../police/career/careerFormModal.html | 20 +++++++++---- 3 files changed, 45 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/dbnt/faisp/main/userInfo/model/UserCareer.java b/src/main/java/com/dbnt/faisp/main/userInfo/model/UserCareer.java index 95013370..4e2630f1 100644 --- a/src/main/java/com/dbnt/faisp/main/userInfo/model/UserCareer.java +++ b/src/main/java/com/dbnt/faisp/main/userInfo/model/UserCareer.java @@ -65,6 +65,8 @@ public class UserCareer{ @Column(name = "wrt_dt") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm") private LocalDateTime wrtDt; + @Column(name = "in_office_yn") + private String inOfficeYn; @Transient diff --git a/src/main/resources/static/js/police/careerMgt.js b/src/main/resources/static/js/police/careerMgt.js index 85f15886..d92f6536 100644 --- a/src/main/resources/static/js/police/careerMgt.js +++ b/src/main/resources/static/js/police/careerMgt.js @@ -111,6 +111,7 @@ $(document).on('change', '#positionCheckBox', function (){ $(document).on('click', '#saveBtn', function (){ if(checkValue()){ contentFade("in"); + document.getElementById("endDate").disabled = false; const formData = new FormData($("#careerForm")[0]); $.ajax({ type : 'POST', @@ -205,3 +206,30 @@ function checkValue(){ } return flag; } + +$(document).on('change', '#inOfficeYn', function (){ + const today = new Date(); + const year = today.getFullYear(); + const month = ('0' + (today.getMonth() + 1)).slice(-2); + const day = ('0' + today.getDate()).slice(-2); + const dateString = year + '-' + month + '-' + day; + if($("#startDate").val() == ""){ + alert("근무시작일을 입력해주세요"); + $('#startDate').focus(); + this.checked = false; + } + + if(this.checked){ + $(this).attr('value', 'Y'); + $("#endDate").val(dateString); + $("#endDate").attr("disabled",true); + }else{ + $(this).attr('value', 'N'); + $("#endDate").val(''); + $("#endDate").removeAttr("disabled"); + } + console.log($("#inOfficeYn").val()); + + + +}) diff --git a/src/main/resources/templates/police/career/careerFormModal.html b/src/main/resources/templates/police/career/careerFormModal.html index 43b906a1..34ed28b9 100644 --- a/src/main/resources/templates/police/career/careerFormModal.html +++ b/src/main/resources/templates/police/career/careerFormModal.html @@ -67,15 +67,25 @@ +
- -
-
- - + +
+
+
+ + +
+
+
+ + +
+
+
\ No newline at end of file diff --git a/src/main/resources/templates/publicBoard/notice/noticeEditModal.html b/src/main/resources/templates/publicBoard/notice/noticeEditModal.html index 8b18ae45..c0fe555c 100644 --- a/src/main/resources/templates/publicBoard/notice/noticeEditModal.html +++ b/src/main/resources/templates/publicBoard/notice/noticeEditModal.html @@ -67,6 +67,8 @@
\ No newline at end of file diff --git a/src/main/resources/templates/publicBoard/notice/noticePage.html b/src/main/resources/templates/publicBoard/notice/noticePage.html index 9c74d7f4..499492e4 100644 --- a/src/main/resources/templates/publicBoard/notice/noticePage.html +++ b/src/main/resources/templates/publicBoard/notice/noticePage.html @@ -68,22 +68,27 @@ - + + + - - - + + + + + @@ -95,8 +100,6 @@ - -
순번 제목첨부파일댓글 관서 부서 계급 작성자 작성일시첨부파일댓글
diff --git a/src/main/resources/templates/publicBoard/notice/noticeViewModal.html b/src/main/resources/templates/publicBoard/notice/noticeViewModal.html index 8f5d532b..cbc1f0bf 100644 --- a/src/main/resources/templates/publicBoard/notice/noticeViewModal.html +++ b/src/main/resources/templates/publicBoard/notice/noticeViewModal.html @@ -165,5 +165,7 @@ + \ No newline at end of file diff --git a/src/main/resources/templates/publicBoard/qna/qnaPage.html b/src/main/resources/templates/publicBoard/qna/qnaPage.html index 47655cfb..96c03c2e 100644 --- a/src/main/resources/templates/publicBoard/qna/qnaPage.html +++ b/src/main/resources/templates/publicBoard/qna/qnaPage.html @@ -66,22 +66,25 @@ - + + + - - - + - + + + + @@ -93,8 +96,6 @@ - -
순번 제목첨부파일댓글 관서 부서 계급 작성자 작성일시첨부파일댓글
diff --git a/src/main/resources/templates/publicBoard/reference/referenceEditModal.html b/src/main/resources/templates/publicBoard/reference/referenceEditModal.html index cc723187..f33982f2 100644 --- a/src/main/resources/templates/publicBoard/reference/referenceEditModal.html +++ b/src/main/resources/templates/publicBoard/reference/referenceEditModal.html @@ -85,6 +85,8 @@ \ No newline at end of file diff --git a/src/main/resources/templates/publicBoard/reference/referencePage.html b/src/main/resources/templates/publicBoard/reference/referencePage.html index 053a4977..df9ba9af 100644 --- a/src/main/resources/templates/publicBoard/reference/referencePage.html +++ b/src/main/resources/templates/publicBoard/reference/referencePage.html @@ -71,21 +71,24 @@ - + + + - - - + + + diff --git a/src/main/resources/templates/publicBoard/reference/referenceViewModal.html b/src/main/resources/templates/publicBoard/reference/referenceViewModal.html index 57714dab..05ed67fa 100644 --- a/src/main/resources/templates/publicBoard/reference/referenceViewModal.html +++ b/src/main/resources/templates/publicBoard/reference/referenceViewModal.html @@ -171,5 +171,7 @@ + \ No newline at end of file
순번 제목첨부파일댓글 관서 부서 계급 작성자 작성일시첨부파일댓글