From 78dee1f4fe483f86ed0ec2f7fe4e37eed1db4266 Mon Sep 17 00:00:00 2001 From: kangsunlee Date: Wed, 16 Jul 2025 11:48:14 +0900 Subject: [PATCH] =?UTF-8?q?[BO]=20=EC=88=98=EC=A0=95=EC=82=AC=ED=95=AD=20?= =?UTF-8?q?=EB=B0=98=EC=98=81=20(1)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../household/UpdateHouseholdMapper.xml | 2 -- admin/src/main/resources/static/ui/uiUtil.js | 4 ++++ .../common/modal-researcher-mapping.html | 15 ++++++++----- .../communication/notice/create.html | 14 ++++++++++++- .../templates/communication/notice/{id}.html | 15 ++++++++++++- .../templates/households/households.html | 4 ++-- .../templates/households/update/{seq}.html | 2 +- .../resources/templates/households/{seq}.html | 4 ++-- .../ports/application/CreateFileService.java | 21 +++++++++++++++++++ 9 files changed, 67 insertions(+), 14 deletions(-) diff --git a/admin/src/main/resources/mappers/household/UpdateHouseholdMapper.xml b/admin/src/main/resources/mappers/household/UpdateHouseholdMapper.xml index ca0668e3..e603a5a7 100644 --- a/admin/src/main/resources/mappers/household/UpdateHouseholdMapper.xml +++ b/admin/src/main/resources/mappers/household/UpdateHouseholdMapper.xml @@ -29,9 +29,7 @@ employment_type = #{employmentType}, - memo = #{memo}, - WHERE seq = #{householdSeq} diff --git a/admin/src/main/resources/static/ui/uiUtil.js b/admin/src/main/resources/static/ui/uiUtil.js index 816ba08e..7359e595 100644 --- a/admin/src/main/resources/static/ui/uiUtil.js +++ b/admin/src/main/resources/static/ui/uiUtil.js @@ -259,10 +259,14 @@ uiUtil.uploadFile = (fileUploadType, input) => { }, statusCode: { // 실패 - validation fail + 400: (res) => { + alert(res.responseJSON.message); + }, 422: (res) => { const resJson = res.responseJSON; $(input).parent().find('.invalid-feedback').text(resJson.message); $(input).addClass('is-invalid'); + alert(resJson.message); } } }); diff --git a/admin/src/main/resources/templates/common/modal-researcher-mapping.html b/admin/src/main/resources/templates/common/modal-researcher-mapping.html index 27312705..306f8fca 100644 --- a/admin/src/main/resources/templates/common/modal-researcher-mapping.html +++ b/admin/src/main/resources/templates/common/modal-researcher-mapping.html @@ -81,9 +81,7 @@ - + @@ -117,8 +115,13 @@ diff --git a/admin/src/main/resources/templates/communication/notice/{id}.html b/admin/src/main/resources/templates/communication/notice/{id}.html index 59487c1a..5fd368e7 100644 --- a/admin/src/main/resources/templates/communication/notice/{id}.html +++ b/admin/src/main/resources/templates/communication/notice/{id}.html @@ -32,7 +32,7 @@
- - 선택 조사원명 전화번호 실사

첨부 가능 파일 형식: 문서(pdf, docx, xlsx, pptx, hwp), 이미지(jpg, jpeg, png, gif), 기타(zip, @@ -231,6 +231,19 @@ } }); } + + // JavaScript 함수 추가 + function validateFileSize(input) { + const maxSize = 5 * 1024 * 1024; // 5MB + const file = input.files[0]; + + if (file && file.size > maxSize) { + alert('파일 크기는 5MB 이하만 업로드 가능합니다.'); + input.value = ''; // 파일 선택 초기화 + return false; + } + return true; + } diff --git a/admin/src/main/resources/templates/households/households.html b/admin/src/main/resources/templates/households/households.html index 9de2bce3..df290145 100644 --- a/admin/src/main/resources/templates/households/households.html +++ b/admin/src/main/resources/templates/households/households.html @@ -281,8 +281,8 @@ onclick="location.href='/households/create'"> 임가 등록 - -

diff --git a/admin/src/main/resources/templates/households/update/{seq}.html b/admin/src/main/resources/templates/households/update/{seq}.html index de180e29..f29dcc34 100644 --- a/admin/src/main/resources/templates/households/update/{seq}.html +++ b/admin/src/main/resources/templates/households/update/{seq}.html @@ -381,7 +381,7 @@ JSON.stringify(dataOj), function(response) { // 성공 alert("등록이 완료되었습니다."); - location.href = '/households'; + location.href = '/households/' + f.householdSeq.value; }, function (code, rstData) { if(code == 422) alert(rstData.responseText); diff --git a/admin/src/main/resources/templates/households/{seq}.html b/admin/src/main/resources/templates/households/{seq}.html index 5805838f..7db69c47 100644 --- a/admin/src/main/resources/templates/households/{seq}.html +++ b/admin/src/main/resources/templates/households/{seq}.html @@ -112,9 +112,9 @@
-
+
-