Merge branch 'bo_fixes' into 'dev'
[BO] 수정사항 반영 See merge request korea-research/korea-research!110
This commit is contained in:
@@ -10,9 +10,6 @@ import org.springframework.validation.Validator;
|
||||
@Component
|
||||
public class AdminUpdateValidator implements Validator {
|
||||
|
||||
// 비밀번호: 5자, 숫자 + 특수문자(!@#$%_-) 1개 이상
|
||||
private final String PASSWORD_REGEX = "^(?=.*[0-9])(?=.*[!@#$%_\\-]).{5}$";
|
||||
|
||||
@Override
|
||||
public boolean supports(Class<?> clazz) {
|
||||
return AdminUpdateBindingVO.class.equals(clazz);
|
||||
@@ -66,11 +63,5 @@ public class AdminUpdateValidator implements Validator {
|
||||
errors.rejectValue("regionMainCode", "valid.common.required","필수입력항목을 확인해주세요.");
|
||||
}
|
||||
});
|
||||
|
||||
// [2] 비밀번호 형식 검사
|
||||
if (!vo.getUpdatePassword().matches(PASSWORD_REGEX)) {
|
||||
errors.rejectValue("updatePassword", "valid.common.password.wrong",
|
||||
"비밀번호는 5자, 숫자 + 특수문자(!@#$%_-) 1개 이상입니다.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,18 +24,10 @@
|
||||
region_sub_code,
|
||||
region_detail_code,
|
||||
address,
|
||||
<if test="industryLargeCode != null and industryLargeCode != ''">
|
||||
industry_large_code,
|
||||
</if>
|
||||
<if test="industryMiddleCode != null and industryMiddleCode != ''">
|
||||
industry_middle_code,
|
||||
</if>
|
||||
<if test="industrySubMiddle != null and industrySubMiddle != ''">
|
||||
industry_sub_middle,
|
||||
</if>
|
||||
<if test="industryDetail != null and industryDetail != ''">
|
||||
industry_detail,
|
||||
</if>
|
||||
is_panel,
|
||||
usage_type,
|
||||
employment_type,
|
||||
|
||||
@@ -18,18 +18,10 @@
|
||||
region_sub_code = #{regionSubCode},
|
||||
region_detail_code = #{regionDetailCode},
|
||||
address = #{address},
|
||||
<if test="industryLargeCode != null and industryLargeCode != ''">
|
||||
industry_large_code = #{industryLargeCode},
|
||||
</if>
|
||||
<if test="industryMiddleCode != null and industryMiddleCode != ''">
|
||||
industry_middle_code = #{industryMiddleCode},
|
||||
</if>
|
||||
<if test="industrySubMiddle != null and industrySubMiddle != ''">
|
||||
industry_sub_middle = #{industrySubMiddle},
|
||||
</if>
|
||||
<if test="industryDetail != null and industryDetail != ''">
|
||||
industry_detail = #{industryDetail},
|
||||
</if>
|
||||
is_panel = #{isPanel},
|
||||
<if test="usageType != null and usageType != ''">
|
||||
usage_type = #{usageType},
|
||||
|
||||
@@ -342,9 +342,15 @@
|
||||
) AS hvr
|
||||
<where>
|
||||
1=1
|
||||
<if test="cmd.ownerField != null and cmd.ownerField != ''">
|
||||
<if test="cmd.ownerValue != null and cmd.ownerValue != ''">
|
||||
/* 경영주 검색 */
|
||||
<choose>
|
||||
<when test="cmd.ownerField == ''">
|
||||
AND (
|
||||
hvr.householdName ILIKE '%' || #{cmd.ownerValue} || '%'
|
||||
OR hvr.householdPhone ILIKE '%' || #{cmd.ownerValue} || '%'
|
||||
)
|
||||
</when>
|
||||
<when test="cmd.ownerField eq 'name'">
|
||||
AND hvr.householdName ILIKE '%' || #{cmd.ownerValue} || '%'
|
||||
</when>
|
||||
|
||||
@@ -492,8 +492,9 @@ const setSelectBoxUiCode = ({
|
||||
codeList,
|
||||
parentSelector,
|
||||
childSelector,
|
||||
defaultOptionText = '전체',
|
||||
selectedParentCode = '',
|
||||
selectedChildCode = ''
|
||||
selectedChildCode = '',
|
||||
}) => {
|
||||
const $parent = $(parentSelector);
|
||||
const $child = $(childSelector);
|
||||
@@ -501,16 +502,20 @@ const setSelectBoxUiCode = ({
|
||||
if (!codeList?.nodes || !$parent.length || !$child.length) return;
|
||||
|
||||
const renderOptions = ($el, list, selected) => {
|
||||
$el.html('<option value="">전체</option>');
|
||||
$el.html(`<option value="">${defaultOptionText}</option>`);
|
||||
list.forEach(item => {
|
||||
const val = item.id.split('.').pop();
|
||||
const isSelected = item.id === selected ? 'selected' : '';
|
||||
$el.append(`<option value="${item.id}" ${isSelected}>${val}. ${item.codeText}</option>`);
|
||||
});
|
||||
|
||||
if (selected) {
|
||||
$el.val(selected);
|
||||
}
|
||||
};
|
||||
|
||||
const loadChildren = (parentId, selectedChild = '') => {
|
||||
$child.html('<option value="">전체</option>');
|
||||
$child.html(`<option value="">${defaultOptionText}</option>`);
|
||||
if (!parentId) return;
|
||||
|
||||
const parent = codeList.nodes.find(n => n.id === parentId);
|
||||
|
||||
@@ -168,7 +168,6 @@
|
||||
<th:block th:each="item, status : ${menuHierarchy}">
|
||||
<a th:if="${status.first}" th:href="${item.uri}" >홈</a>
|
||||
<a th:if="${!status.first and item.id != currentURI.id}"
|
||||
th:href="${item.uri}"
|
||||
th:text="${@coreUtil.getUriTitle(item)}"></a>
|
||||
<span th:if="${!status.first and item.id == currentURI.id}" th:text="${@coreUtil.getUriTitle(item)}" ></span>
|
||||
</th:block>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<div class="modal-header">
|
||||
<h3 class="modal-tit" >임가 매핑</h3>
|
||||
</div>
|
||||
<form autocomplete="off" method="get" name="reqHouseholdForm" id="reqHouseholdForm">
|
||||
<form autocomplete="off" method="get" name="reqHouseholdForm" id="reqHouseholdForm" onsubmit="return false;">
|
||||
<div class="modal-content">
|
||||
<div class="modal-content-inner">
|
||||
<section class="filter-wrap">
|
||||
@@ -34,7 +34,8 @@
|
||||
</div>
|
||||
<div class="component-input">
|
||||
<div class="input-field">
|
||||
<input type="text" id="ownerValue" name="ownerValue" placeholder="입력" th:value="${ownerValue}">
|
||||
<input type="text" id="ownerValue" name="ownerValue" placeholder="입력" th:value="${ownerValue}"
|
||||
onkeydown="if(event.key === 'Enter'){ event.preventDefault(); initSearchHousehold(); }">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -94,7 +95,7 @@
|
||||
<button type="button" class="btn" onclick="resetSearchForm()">
|
||||
<span class="btn-txt">초기화</span>
|
||||
</button>
|
||||
<button type="button" class="btn btn-primary" th:onclick="|searchHouseholdList(0,${regionMainCode})|">
|
||||
<button type="button" class="btn btn-primary" onclick="initSearchHousehold();">
|
||||
<span class="btn-txt">검색</span>
|
||||
</button>
|
||||
</div>
|
||||
@@ -161,6 +162,7 @@
|
||||
codeList: regionList,
|
||||
parentSelector: '#regionSubCode',
|
||||
childSelector: '#regionDetailCode',
|
||||
defaultOptionText: '전체'
|
||||
});
|
||||
|
||||
document.querySelector(".modal01").ui.open();
|
||||
@@ -178,6 +180,8 @@
|
||||
$('#isPanel').val('');
|
||||
$('#searchMapping').val('');
|
||||
$('#ownerValue').val('');
|
||||
|
||||
initSearchHousehold();
|
||||
};
|
||||
|
||||
const searchHouseholdList = (pageNo,regionMainCode) => {
|
||||
@@ -214,6 +218,16 @@
|
||||
</tr>
|
||||
`);
|
||||
});
|
||||
|
||||
// nodata 처리
|
||||
if (!$(response.content).length) {
|
||||
tbody.append(`
|
||||
<tr>
|
||||
<td colspan="8" class="text-center text-muted">임가정보가 존재하지 않습니다.</td>
|
||||
</tr>
|
||||
`);
|
||||
}
|
||||
|
||||
// Pagination 구성하기
|
||||
const paging = $('.mapping-paging');
|
||||
paging.empty();
|
||||
@@ -271,6 +285,11 @@
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
const initSearchHousehold = () => {
|
||||
const regionMainCode = document.querySelector('[name="regionMainCode"]')?.value || '';
|
||||
searchHouseholdList(0, regionMainCode);
|
||||
};
|
||||
</script>
|
||||
</div>
|
||||
</html>
|
||||
@@ -121,7 +121,7 @@
|
||||
<td>
|
||||
<div class="component-select">
|
||||
<select class="select-list" name="regionMainCode" required>
|
||||
<option value="">전체</option>
|
||||
<option value="">선택</option>
|
||||
<option th:each="item : ${regionMainList}"
|
||||
th:value="${item.id}"
|
||||
th:text="${item.codeText}">
|
||||
@@ -132,7 +132,7 @@
|
||||
<td>
|
||||
<div class="component-select">
|
||||
<select class="select-list" name="regionSubCode" id="regionSubCode" required>
|
||||
<option value="">전체</option>
|
||||
<option value="">선택</option>
|
||||
</select>
|
||||
</div>
|
||||
</td>
|
||||
@@ -140,7 +140,7 @@
|
||||
<td>
|
||||
<div class="component-select">
|
||||
<select class="select-list" name="regionDetailCode" id="regionDetailCode" required>
|
||||
<option value="">전체</option>
|
||||
<option value="">선택</option>
|
||||
</select>
|
||||
</div>
|
||||
</td>
|
||||
@@ -160,7 +160,7 @@
|
||||
<td>
|
||||
<div class="component-select">
|
||||
<select class="select-list" name="industryLargeCode" id="industryLargeCode">
|
||||
<option value="">전체</option>
|
||||
<option value="">선택</option>
|
||||
</select>
|
||||
</div>
|
||||
</td>
|
||||
@@ -168,7 +168,7 @@
|
||||
<td>
|
||||
<div class="component-select">
|
||||
<select class="select-list" name="industryMiddleCode" id="industryMiddleCode">
|
||||
<option value="">전체</option>>
|
||||
<option value="">선택</option>>
|
||||
</select>
|
||||
</div>
|
||||
</td>
|
||||
@@ -320,7 +320,8 @@
|
||||
setSelectBoxUiCode({
|
||||
codeList: regionList,
|
||||
parentSelector: '#regionSubCode',
|
||||
childSelector: '#regionDetailCode'
|
||||
childSelector: '#regionDetailCode',
|
||||
defaultOptionText: '선택'
|
||||
});
|
||||
|
||||
// 업종 대분류, 중분류 셀렉트박스 세팅
|
||||
@@ -328,6 +329,7 @@
|
||||
codeList: industryLargeList,
|
||||
parentSelector: '#industryLargeCode',
|
||||
childSelector: '#industryMiddleCode',
|
||||
defaultOptionText: '선택'
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -307,22 +307,27 @@
|
||||
|
||||
$(document).ready(function () {
|
||||
// 지역, 세부지역 셀렉트박스 세팅
|
||||
setSelectBoxUiCode({
|
||||
setSelectBoxUiCode({
|
||||
codeList: regionList,
|
||||
parentSelector: '#regionSubCode',
|
||||
childSelector: '#regionDetailCode',
|
||||
defaultOptionText: '전체',
|
||||
selectedParentCode: selectedRegionSubCode,
|
||||
selectedChildCode: selectedRegionDetailCode
|
||||
});
|
||||
|
||||
// 업종 대분류, 중분류 셀렉트박스 세팅
|
||||
setSelectBoxUiCode({
|
||||
codeList: industryLargeList,
|
||||
parentSelector: '#industryLargeCode',
|
||||
childSelector: '#industryMiddleCode',
|
||||
selectedParentCode: selectedIndustryLargeCode,
|
||||
selectedChildCode: selectedIndustryMiddleCode
|
||||
});
|
||||
// 업종 대분류, 중분류 셀렉트박스 세팅
|
||||
setSelectBoxUiCode({
|
||||
codeList: industryLargeList,
|
||||
parentSelector: '#industryLargeCode',
|
||||
childSelector: '#industryMiddleCode',
|
||||
defaultOptionText: '전체',
|
||||
selectedParentCode: selectedIndustryLargeCode,
|
||||
selectedChildCode: selectedIndustryMiddleCode
|
||||
});
|
||||
|
||||
// 최초 리스트 로드
|
||||
getHouseholds(document.reqForm.page.value);
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -409,9 +414,6 @@
|
||||
'json'
|
||||
);
|
||||
}
|
||||
|
||||
// 최초 리스트 로드
|
||||
getHouseholds(document.reqForm.page.value);
|
||||
</script>
|
||||
|
||||
<script th:inline="javascript">
|
||||
|
||||
@@ -191,9 +191,6 @@
|
||||
<h3>지출 <strong>(<span id="expenseCount">0</span>건)</strong></h3>
|
||||
<div class="component-btns bottom-btn-group">
|
||||
<div class="btns-row align-right">
|
||||
<button type="button" class="btn small">
|
||||
<span class="btn-txt">영수증 다운로드 <i class="ico-download" aria-hidden="true"></i></span>
|
||||
</button>
|
||||
<button type="button" class="btn small">
|
||||
<span class="btn-txt">
|
||||
<label class="radio-inner">
|
||||
|
||||
@@ -313,7 +313,7 @@
|
||||
<div class="input-textarea-field">
|
||||
<textarea id="memo" name="memo" class="textarea"
|
||||
placeholder=""
|
||||
th:value="${householdInfo.memo}"></textarea>
|
||||
th:text="${householdInfo.memo}"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
@@ -353,6 +353,7 @@
|
||||
codeList: regionList,
|
||||
parentSelector: '#regionSubCode',
|
||||
childSelector: '#regionDetailCode',
|
||||
defaultOptionText: '선택',
|
||||
selectedParentCode: selectedRegionSubCode,
|
||||
selectedChildCode: selectedRegionDetailCode
|
||||
});
|
||||
@@ -362,6 +363,7 @@
|
||||
codeList: industryLargeList,
|
||||
parentSelector: '#industryLargeCode',
|
||||
childSelector: '#industryMiddleCode',
|
||||
defaultOptionText: '선택',
|
||||
selectedParentCode: selectedIndustryLargeCode,
|
||||
selectedChildCode: selectedIndustryMiddleCode
|
||||
});
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
</div>
|
||||
<div class="component-btns">
|
||||
<div class="btns-row">
|
||||
<button type="button" class="btn" onclick="goInit();">
|
||||
<button type="button" class="btn" onclick="location.href = location.pathname">
|
||||
<span class="btn-txt">초기화</span>
|
||||
</button>
|
||||
<button type="button" class="btn btn-primary" onclick="goSearch();" >
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
</div>
|
||||
<div class="component-input">
|
||||
<div class="input-field">
|
||||
<input type="password" id="floatingPassword" name="password" placeholder="비밀번호 입력">
|
||||
<input type="password" id="floatingPassword" name="password" placeholder="비밀번호 입력" maxlength="5">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user