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}">
-