Merge commit 'fdb1e175de25991ce26be7d89d8a8a171bae5fc1' into jenkins_with_weblogic
This commit is contained in:
@@ -16,7 +16,9 @@ import com.eactive.apim.portal.invitation.repository.UserInvitationRepository;
|
|||||||
import com.eactive.apim.portal.portaluser.entity.PortalUserEnums;
|
import com.eactive.apim.portal.portaluser.entity.PortalUserEnums;
|
||||||
import com.eactive.apim.portal.portaluser.entity.PortalUserEnums.RoleCode;
|
import com.eactive.apim.portal.portaluser.entity.PortalUserEnums.RoleCode;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
import javax.servlet.http.Cookie;
|
import javax.servlet.http.Cookie;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
@@ -36,6 +38,7 @@ import org.springframework.web.bind.annotation.GetMapping;
|
|||||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestParam;
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
import org.springframework.web.bind.annotation.ResponseBody;
|
||||||
import org.springframework.web.servlet.ModelAndView;
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
|
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
|
||||||
|
|
||||||
@@ -271,18 +274,20 @@ public class AccountController {
|
|||||||
|
|
||||||
|
|
||||||
@PostMapping("/mypage/org-transfer")
|
@PostMapping("/mypage/org-transfer")
|
||||||
public String processOrgTransfer(
|
@ResponseBody
|
||||||
|
public Map<String, Object> processOrgTransfer(
|
||||||
@ModelAttribute PortalOrgRegistrationDTO orgDTO,
|
@ModelAttribute PortalOrgRegistrationDTO orgDTO,
|
||||||
@ModelAttribute UserAgreementDTO agreementDTO,
|
@ModelAttribute UserAgreementDTO agreementDTO,
|
||||||
HttpServletRequest request,
|
HttpServletRequest request,
|
||||||
HttpServletResponse response,
|
HttpServletResponse response) {
|
||||||
RedirectAttributes redirectAttributes) {
|
Map<String, Object> result = new HashMap<>();
|
||||||
try {
|
try {
|
||||||
var currentUser = SecurityUtil.getPortalAuthenticatedUser();
|
var currentUser = SecurityUtil.getPortalAuthenticatedUser();
|
||||||
|
|
||||||
if (currentUser.getRoleCode() != PortalUserEnums.RoleCode.ROLE_USER) {
|
if (currentUser.getRoleCode() != PortalUserEnums.RoleCode.ROLE_USER) {
|
||||||
redirectAttributes.addFlashAttribute("error", "잘못된 접근입니다.");
|
result.put("status", "ERROR");
|
||||||
return "redirect:/mypage";
|
result.put("message", "잘못된 접근입니다.");
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
ValidationResponse validationResponse = orgRegisterFacade.convertToOrgUser(
|
ValidationResponse validationResponse = orgRegisterFacade.convertToOrgUser(
|
||||||
@@ -310,16 +315,20 @@ public class AccountController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
redirectAttributes.addFlashAttribute("success", validationResponse.getMessage());
|
result.put("status", "SUCCESS");
|
||||||
return "apps/mypage/UserConversionCompleted";
|
result.put("message", validationResponse.getMessage());
|
||||||
|
result.put("redirectUrl", "/");
|
||||||
|
return result;
|
||||||
} else {
|
} else {
|
||||||
redirectAttributes.addFlashAttribute("error", validationResponse.getMessage());
|
result.put("status", "ERROR");
|
||||||
return "redirect:/mypage/org-transfer";
|
result.put("message", validationResponse.getMessage());
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
redirectAttributes.addFlashAttribute("error", "법인회원 전환 중 오류가 발생했습니다: " + e.getMessage());
|
result.put("status", "ERROR");
|
||||||
return "redirect:/mypage/org-transfer";
|
result.put("message", "법인회원 전환 중 오류가 발생했습니다: " + e.getMessage());
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -30,29 +30,13 @@
|
|||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Service Categories (Accordion) -->
|
<!-- Service Categories -->
|
||||||
<div class="menu-section accordion-section" th:each="service : ${services}">
|
<div class="menu-section" th:each="service : ${services}">
|
||||||
<div class="menu-title accordion-trigger"
|
<a class="menu-title"
|
||||||
th:classappend="${selected == service.id} ? 'active expanded'"
|
th:classappend="${selected == service.id} ? 'active'"
|
||||||
th:data-group="${service.id}">
|
th:href="@{/apis(groupIds=${service.id})}">
|
||||||
<span class="menu-title-text">[[${service.groupName}]]</span>
|
[[${service.groupName}]]
|
||||||
<span class="accordion-icon">
|
</a>
|
||||||
<i class="fas fa-chevron-down"></i>
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- Level 2: API List (Accordion Content) -->
|
|
||||||
<div class="api-list accordion-content"
|
|
||||||
th:if="${service.apiGroupApiList != null and !service.apiGroupApiList.isEmpty()}"
|
|
||||||
th:classappend="${selected == service.id} ? 'expanded'">
|
|
||||||
<div class="api-item"
|
|
||||||
th:each="api : ${service.apiGroupApiList}"
|
|
||||||
th:data-api-id="${api.apiId}"
|
|
||||||
th:classappend="${apiSpecInfo != null and apiSpecInfo.apiId == api.apiId} ? 'active'"
|
|
||||||
th:attr="data-href=@{/apis/detail(id=${api.apiId})}">
|
|
||||||
<span class="api-name" th:text="${api.apiDesc}">API Name</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
</aside>
|
</aside>
|
||||||
@@ -183,7 +167,7 @@
|
|||||||
const mobileToggle = document.getElementById('mobileToggle');
|
const mobileToggle = document.getElementById('mobileToggle');
|
||||||
const mobileOverlay = document.getElementById('mobileOverlay');
|
const mobileOverlay = document.getElementById('mobileOverlay');
|
||||||
|
|
||||||
// API Card Click Handlers
|
// API Card Click Handlers (if any exist)
|
||||||
const apiCards = document.querySelectorAll('.api-card');
|
const apiCards = document.querySelectorAll('.api-card');
|
||||||
apiCards.forEach(function(card) {
|
apiCards.forEach(function(card) {
|
||||||
// Click handler
|
// Click handler
|
||||||
@@ -206,57 +190,6 @@
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
// Level 2 API Item Click Handlers
|
|
||||||
const apiItems = document.querySelectorAll('.api-item');
|
|
||||||
apiItems.forEach(function(item) {
|
|
||||||
// Click handler
|
|
||||||
item.addEventListener('click', function(e) {
|
|
||||||
e.stopPropagation(); // Prevent parent menu-title click
|
|
||||||
const href = this.getAttribute('data-href');
|
|
||||||
if (href) {
|
|
||||||
window.location.href = href;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
// Keyboard accessibility
|
|
||||||
item.addEventListener('keypress', function(e) {
|
|
||||||
if (e.key === 'Enter' || e.key === ' ') {
|
|
||||||
e.preventDefault();
|
|
||||||
e.stopPropagation();
|
|
||||||
const href = this.getAttribute('data-href');
|
|
||||||
if (href) {
|
|
||||||
window.location.href = href;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
// Accordion Toggle Functionality
|
|
||||||
const accordionTriggers = document.querySelectorAll('.accordion-trigger');
|
|
||||||
accordionTriggers.forEach(function(trigger) {
|
|
||||||
trigger.addEventListener('click', function(e) {
|
|
||||||
e.preventDefault();
|
|
||||||
|
|
||||||
const menuSection = this.closest('.accordion-section');
|
|
||||||
const accordionContent = menuSection.querySelector('.accordion-content');
|
|
||||||
|
|
||||||
if (accordionContent) {
|
|
||||||
// Toggle expanded state
|
|
||||||
const isExpanded = this.classList.contains('expanded');
|
|
||||||
|
|
||||||
if (isExpanded) {
|
|
||||||
// Close this accordion
|
|
||||||
this.classList.remove('expanded');
|
|
||||||
accordionContent.classList.remove('expanded');
|
|
||||||
} else {
|
|
||||||
// Open this accordion
|
|
||||||
this.classList.add('expanded');
|
|
||||||
accordionContent.classList.add('expanded');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
// Mobile Menu Toggle
|
// Mobile Menu Toggle
|
||||||
if (mobileToggle && sidebar && mobileOverlay) {
|
if (mobileToggle && sidebar && mobileOverlay) {
|
||||||
mobileToggle.addEventListener('click', function(e) {
|
mobileToggle.addEventListener('click', function(e) {
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<html xmlns="http://www.w3.org/1999/xhtml"
|
<html xmlns="http://www.w3.org/1999/xhtml"
|
||||||
xmlns:th="http://www.thymeleaf.org"
|
xmlns:th="http://www.thymeleaf.org"
|
||||||
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
|
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
|
||||||
layout:decorate="~{layout/kbank_nohead_layout}">
|
layout:decorate="~{layout/kjbank_nohead_layout}">
|
||||||
<body>
|
<body>
|
||||||
<section layout:fragment="contentFragment" class="content pop">
|
<section layout:fragment="contentFragment" class="content pop">
|
||||||
<div class="sub_title2">
|
<div class="sub_title2">
|
||||||
|
|||||||
@@ -90,11 +90,6 @@
|
|||||||
compRegNo: $('#compRegNo').val().trim() !== '',
|
compRegNo: $('#compRegNo').val().trim() !== '',
|
||||||
corpRegNo: $('#corpRegNo').val().trim() !== '',
|
corpRegNo: $('#corpRegNo').val().trim() !== '',
|
||||||
orgName: $('#orgName').val().trim() !== '',
|
orgName: $('#orgName').val().trim() !== '',
|
||||||
ceoName: $('#ceoName').val().trim() !== '',
|
|
||||||
orgAddr: $('#orgAddr').val().trim() !== '',
|
|
||||||
orgPhoneNumber: $('#orgPhoneNumber').val().trim() !== '',
|
|
||||||
scPhoneNumber: $('#scPhoneNumber').val().trim() !== '',
|
|
||||||
serviceName: $('#serviceName').val().trim() !== '',
|
|
||||||
compRegFile: $('#compRegFile').val().trim() !== ''
|
compRegFile: $('#compRegFile').val().trim() !== ''
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -104,11 +99,6 @@
|
|||||||
compRegNo: '사업자등록번호를 입력해주세요.',
|
compRegNo: '사업자등록번호를 입력해주세요.',
|
||||||
corpRegNo: '법인등록번호를 입력해주세요.',
|
corpRegNo: '법인등록번호를 입력해주세요.',
|
||||||
orgName: '법인명을 입력해주세요.',
|
orgName: '법인명을 입력해주세요.',
|
||||||
ceoName: '대표자 성명을 입력해주세요.',
|
|
||||||
orgAddr: '사업장 소재지를 입력해주세요.',
|
|
||||||
orgPhoneNumber: '회사 전화번호를 입력해주세요.',
|
|
||||||
scPhoneNumber: '고객센터 전화번호를 입력해주세요.',
|
|
||||||
serviceName: '서비스명을 입력해주세요.',
|
|
||||||
compRegFile: '사업자등록증을 업로드해주세요.'
|
compRegFile: '사업자등록증을 업로드해주세요.'
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -150,18 +140,12 @@
|
|||||||
success: function(response) {
|
success: function(response) {
|
||||||
console.log('폼 제출 성공:', response);
|
console.log('폼 제출 성공:', response);
|
||||||
|
|
||||||
// 응답이 JSON인 경우
|
if (response.status === 'SUCCESS') {
|
||||||
if (typeof response === 'object') {
|
customPopups.showAlert(response.message || '법인회원 전환 신청이 완료되었습니다.', function() {
|
||||||
if (response.status === 'SUCCESS') {
|
window.location.href = response.redirectUrl || /*[[@{/apps/mypage/UserConversionCompleted}]]*/ '/apps/mypage/UserConversionCompleted';
|
||||||
customPopups.showSuccess(response.message || '법인회원 전환 신청이 완료되었습니다.', function() {
|
});
|
||||||
window.location.href = /*[[@{/mypage}]]*/ '/mypage';
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
customPopups.showAlert(response.message || '처리 중 오류가 발생했습니다.');
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
// 응답이 HTML인 경우 (페이지 리다이렉트)
|
customPopups.showAlert(response.message || '처리 중 오류가 발생했습니다.');
|
||||||
window.location.href = /*[[@{/mypage}]]*/ '/mypage';
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
error: function(xhr, status, error) {
|
error: function(xhr, status, error) {
|
||||||
|
|||||||
@@ -166,12 +166,14 @@
|
|||||||
businessTransferBtn.addEventListener('click', () => {
|
businessTransferBtn.addEventListener('click', () => {
|
||||||
customPopups.showConfirm(
|
customPopups.showConfirm(
|
||||||
'법인 회원으로 전환하시겠습니까?',
|
'법인 회원으로 전환하시겠습니까?',
|
||||||
() => {
|
(confirmed) => {
|
||||||
const transferForm = document.createElement('form');
|
if (confirmed) {
|
||||||
transferForm.method = 'GET';
|
const transferForm = document.createElement('form');
|
||||||
transferForm.action = '/mypage/org-transfer';
|
transferForm.method = 'GET';
|
||||||
document.body.appendChild(transferForm);
|
transferForm.action = '/mypage/org-transfer';
|
||||||
transferForm.submit();
|
document.body.appendChild(transferForm);
|
||||||
|
transferForm.submit();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|||||||
+1
-1
@@ -2,7 +2,7 @@
|
|||||||
<html xmlns="http://www.w3.org/1999/xhtml"
|
<html xmlns="http://www.w3.org/1999/xhtml"
|
||||||
xmlns:th="http://www.thymeleaf.org"
|
xmlns:th="http://www.thymeleaf.org"
|
||||||
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
|
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
|
||||||
layout:decorate="~{layout/kbank_nohead_layout}">
|
layout:decorate="~{layout/kjbank_nohead_layout}">
|
||||||
<body>
|
<body>
|
||||||
<section layout:fragment="contentFragment" class="content pop">
|
<section layout:fragment="contentFragment" class="content pop">
|
||||||
<div class="sub_title2">
|
<div class="sub_title2">
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<html xmlns="http://www.w3.org/1999/xhtml"
|
<html xmlns="http://www.w3.org/1999/xhtml"
|
||||||
xmlns:th="http://www.thymeleaf.org"
|
xmlns:th="http://www.thymeleaf.org"
|
||||||
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
|
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
|
||||||
layout:decorate="~{layout/kbank_nohead_layout}">
|
layout:decorate="~{layout/kjbank_nohead_layout}">
|
||||||
<body>
|
<body>
|
||||||
<section layout:fragment="contentFragment" class="content pop">
|
<section layout:fragment="contentFragment" class="content pop">
|
||||||
<div class="sub_title2">
|
<div class="sub_title2">
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<html xmlns="http://www.w3.org/1999/xhtml"
|
<html xmlns="http://www.w3.org/1999/xhtml"
|
||||||
xmlns:th="http://www.thymeleaf.org"
|
xmlns:th="http://www.thymeleaf.org"
|
||||||
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
|
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
|
||||||
layout:decorate="~{layout/kbank_nohead_layout}">
|
layout:decorate="~{layout/kjbank_nohead_layout}">
|
||||||
<body>
|
<body>
|
||||||
<section layout:fragment="contentFragment" class="content pop">
|
<section layout:fragment="contentFragment" class="content pop">
|
||||||
<div class="sub_title2">
|
<div class="sub_title2">
|
||||||
|
|||||||
Reference in New Issue
Block a user