From 852ce876a7a62d671f43ab06686a982893e64f1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=A3=BC=EC=88=98=ED=98=84?= Date: Wed, 23 Jul 2025 14:26:50 +0900 Subject: [PATCH] =?UTF-8?q?=EC=A1=B0=EC=82=AC=EC=9B=90=EB=93=B1=EB=A1=9D?= =?UTF-8?q?=20->=20=EC=A1=B0=EC=82=AC=EC=9B=90=20=ED=98=84=ED=99=A9?= =?UTF-8?q?=EC=9C=BC=EB=A1=9C=20=EC=9D=B4=EB=8F=99=20=EB=B0=8F=20=EC=97=91?= =?UTF-8?q?=EC=85=80=20=EC=97=85=EB=A1=9C=EB=93=9C=20=EC=9C=A0=ED=9A=A8?= =?UTF-8?q?=EC=84=B1=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/templates/admin/adminList.html | 59 ------------------- .../modal/modal-researcher-excel.html} | 6 +- .../templates/researcher/researchers.html | 59 +++++++++++++++++++ .../config/constants/CommonConstants.java | 5 ++ .../persistence/ExcelSaveAdminIdDao.java | 33 ++++++++++- .../resources/sql/data/04_second_open.sql | 2 +- .../mappers/notice/GetNoticesMapper.xml | 6 +- .../templates/record/expense/index.html | 2 +- .../templates/record/income/index.html | 2 +- .../templates/record/work/index.html | 2 +- 10 files changed, 104 insertions(+), 72 deletions(-) rename admin/src/main/resources/templates/{admin/modal/modal-admin-excel.html => researcher/modal/modal-researcher-excel.html} (87%) diff --git a/admin/src/main/resources/templates/admin/adminList.html b/admin/src/main/resources/templates/admin/adminList.html index 30c8ae1c..3ecb4731 100644 --- a/admin/src/main/resources/templates/admin/adminList.html +++ b/admin/src/main/resources/templates/admin/adminList.html @@ -128,9 +128,6 @@
- @@ -138,7 +135,6 @@
-
@@ -214,61 +210,6 @@ // f.submit(); // } - function showAdminExcelUploadModal() { - const modal = document.querySelector(".modal-admin-excel"); - const fileInput = document.getElementById("file"); - if (fileInput) { - fileInput.value = ''; - } - modal.ui.open(); - - } - - const uploadAdminExcel = () => { - event.preventDefault(); - - const fileInput = document.getElementById('file'); - if (fileInput.files.length === 0) { - alert('업로드할 엑셀 파일을 선택해주세요.'); - return; - } - - let formData = new FormData(); - formData.append('file', fileInput.files[0]); - - $.ajax({ - method: 'POST', - url: '/api/settings/admin/excelUpload', - data: formData, - contentType: false, // * 중요 * - processData: false, // * 중요 * - enctype: 'multipart/form-data', // * 중요 * - beforeSend: function (xhr) { - xhr.setRequestHeader( - $("meta[name='_csrf_header']").attr("content"), - $("meta[name='_csrf']").attr("content")); - }, - success(res) { - alert("총 "+res.total+"건 중에 "+res.success+"건 등록되었습니다."); - }, - statusCode: { - 400:() => { - ajaxUtil._hideWaiting(); - alert("잘못된 엑셀파일입니다."); - document.querySelector(".modal-admin-excel").ui.close(); - }, - 500: () => { - ajaxUtil._hideWaiting(); - alert("엑셀 업로드에 실패하였습니다."); - document.querySelector(".modal-admin-excel").ui.close(); - } - } - }); - }; - - const closeModal = () => { - document.querySelector(".modal-admin-excel").ui.close(); - }; diff --git a/admin/src/main/resources/templates/admin/modal/modal-admin-excel.html b/admin/src/main/resources/templates/researcher/modal/modal-researcher-excel.html similarity index 87% rename from admin/src/main/resources/templates/admin/modal/modal-admin-excel.html rename to admin/src/main/resources/templates/researcher/modal/modal-researcher-excel.html index 05158f0a..c167ca9a 100644 --- a/admin/src/main/resources/templates/admin/modal/modal-admin-excel.html +++ b/admin/src/main/resources/templates/researcher/modal/modal-researcher-excel.html @@ -3,12 +3,12 @@ layout:decorate="~{layout/layout}">
-