[FO] 비밀번호 inputmode, 노동의 필수입력 수정, formContrl.init 삭제

This commit is contained in:
김현주
2025-06-27 11:12:46 +09:00
parent 7a3b8e3d24
commit f4496934df
13 changed files with 36 additions and 38 deletions

View File

@@ -9,4 +9,9 @@ public class CommonConstants {
* 단위의 직접입력 코드
*/
public static final String UNIT_CODE_SELF = "code.record.unit.self";
/**
* 작업 면적의 직접입력 코드
*/
public static final String AREA_CODE_OTHER = "code.record.area.self";
}

View File

@@ -1,5 +1,6 @@
package app.module.front.usecase.daily.farming.adapters.web.validator;
import app.module.front.config.constants.CommonConstants;
import app.module.front.usecase.daily.farming.adapters.web.model.CreateDailyFarmingReqVO;
import lombok.RequiredArgsConstructor;
import org.apache.tika.utils.StringUtils;
@@ -20,7 +21,7 @@ public class CreateDailyFarmingValidator implements Validator {
public void validate(Object target, Errors errors) {
CreateDailyFarmingReqVO vo = (CreateDailyFarmingReqVO) target;
if ("SELF".equals(vo.getProductCode()) && StringUtils.isBlank(vo.getProductSelf())) {
if (CommonConstants.UNIT_CODE_SELF.equals(vo.getProductCode()) && StringUtils.isBlank(vo.getProductSelf())) {
errors.rejectValue(
"categorySelf", "valid.common.required",
"생산물을 입력해 주세요.");

View File

@@ -1,5 +1,6 @@
package app.module.front.usecase.daily.work.adapters.web.validator;
import app.module.front.config.constants.CommonConstants;
import app.module.front.usecase.daily.work.adapters.web.model.CreateDailyWorkReqVO;
import lombok.RequiredArgsConstructor;
import org.apache.tika.utils.StringUtils;
@@ -20,19 +21,37 @@ public class CreateDailyWorkValidator implements Validator {
public void validate(Object target, Errors errors) {
CreateDailyWorkReqVO vo = (CreateDailyWorkReqVO) target;
if (vo.getHarvestQuantity() == null) {
if (vo.getWorkLandArea() == null && !StringUtils.isBlank(vo.getAreaUnitCode())) {
errors.rejectValue(
"harvestQuantity", "valid.common.required",
"수확량을 입력해 주세요.");
"workLandArea", "valid.common.required",
"작업 면적을 입력해 주세요.");
}
if ("SELF".equals(vo.getAreaUnitCode()) && StringUtils.isBlank(vo.getAreaUnitSelf())) {
if (vo.getWorkLandArea() != null && StringUtils.isBlank(vo.getAreaUnitCode())) {
errors.rejectValue(
"areaUnitCode", "valid.common.required",
"단위를 선택해 주세요.");
}
if (CommonConstants.AREA_CODE_OTHER.equals(vo.getAreaUnitCode()) && StringUtils.isBlank(vo.getAreaUnitSelf())) {
errors.rejectValue(
"areaUnitSelf", "valid.common.required",
"단위를 입력해 주세요.");
}
if ("SELF".equals(vo.getHarvestUnitCode()) && StringUtils.isBlank(vo.getHarvestUnitSelf())) {
if (vo.getHarvestQuantity() == null && !StringUtils.isBlank(vo.getHarvestUnitCode())) {
errors.rejectValue(
"harvestQuantity", "valid.common.required",
"수확량을 입력해 주세요.");
}
if (vo.getHarvestQuantity() != null && StringUtils.isBlank(vo.getHarvestUnitCode())) {
errors.rejectValue(
"harvestUnitCode", "valid.common.required",
"단위를 선택해 주세요.");
}
if (CommonConstants.UNIT_CODE_SELF.equals(vo.getHarvestUnitCode()) && StringUtils.isBlank(vo.getHarvestUnitSelf())) {
errors.rejectValue(
"harvestUnitSelf", "valid.common.required",
"단위를 입력해 주세요.");

View File

@@ -223,7 +223,7 @@ var ajaxUtil = {
infoBox = $('<ul class="input-info"></ul>').appendTo(component);
}
infoBox.html('<li>' + oj.message + '1111</li>');
infoBox.html('<li>' + oj.message + '</li>');
}
}

View File

@@ -95,8 +95,6 @@ krip.daily.baseBindUI = function() {
//document.reqForm.todayNone.value = 'N';
$noneWrap.val('N');
}
// TODO 2번 이벤트 발생하는 원인 찾기
console.log(1111)
krip.daily.todayNone(ENV.month, ENV.groupNo, $noneWrap.data('type'), checked);
});

View File

@@ -20,7 +20,7 @@
<strong>지출 내역 [[${#lists.isEmpty(expenseList) ? 0 : #lists.size(expenseList)}]]건 등록</strong> <br>
되었습니다.
</h3>
<p th:if="${#lists.isEmpty(expenseList)}">지출 내역을 등록해 주세요..</p>
<p th:if="${#lists.isEmpty(expenseList)}">지출 내역을 등록해 주세요.</p>
<p th:unless="${#lists.isEmpty(expenseList)}">등록 내용을 확인하거나 다음 단계로 이동하세요.</p>
</hgroup>
@@ -140,10 +140,6 @@
<section layout:fragment="script">
<script th:src="@{/static/ui/page/daily-record.js}"></script>
<script th:inline="javascript">
$(function() {
formControl.init();
});
let ENV = {
httpUrl: {
root: /*[[|/record/daily/${reqVO.searchMonth}/${reqVO.groupNo}|]]*/'rootUrl',

View File

@@ -143,10 +143,6 @@
<section layout:fragment="script">
<script th:src="@{/static/ui/page/daily-record.js}"></script>
<script th:inline="javascript">
$(function() {
formControl.init();
});
let ENV = {
httpUrl: {
root: /*[[|/record/farming/${reqVO.searchMonth}/${reqVO.groupNo}|]]*/'rootUrl',

View File

@@ -143,10 +143,6 @@
<section layout:fragment="script">
<script th:src="@{/static/ui/page/daily-record.js}"></script>
<script th:inline="javascript">
$(function() {
formControl.init();
});
let ENV = {
httpUrl: {
root: /*[[|/record/forestry/${reqVO.searchMonth}/${reqVO.groupNo}|]]*/'rootUrl',

View File

@@ -155,10 +155,6 @@
<section layout:fragment="script">
<script th:src="@{/static/ui/page/daily-record.js}"></script>
<script th:inline="javascript">
$(function() {
formControl.init();
});
let ENV = {
httpUrl: {
root: /*[[|/record/daily/${reqVO.searchMonth}/${reqVO.groupNo}|]]*/'rootUrl',

View File

@@ -128,10 +128,6 @@
<section layout:fragment="script">
<script th:src="@{/static/ui/page/daily-record.js}"></script>
<script th:inline="javascript">
$(function() {
formControl.init();
});
let ENV = {
httpUrl: {
root: /*[[|/record/power/${reqVO.searchMonth}/${reqVO.groupNo}|]]*/'rootUrl',

View File

@@ -66,7 +66,7 @@
</div>
<div id="areaUnitCode" class="component-select bottom-sheet" data-props-default="단위를 선택해 주세요"
data-props-type="bottomSheet">
<input type="hidden" name="areaUnitCode" th:value="${detail.areaUnitCode}">
<input type="hidden" name="areaUnitCode" data-type="select" th:value="${detail.areaUnitCode}">
<button type="button" class="select-box">
<span class="select-txt"></span>
</button>
@@ -104,7 +104,6 @@
<div class="input-label">
<label for="harvestQuantity" class="label-txt">
수확량
<i class="ico-required-mark" role="img" aria-label="필수">*</i>
</label>
</div>
<div class="input-field">
@@ -120,7 +119,7 @@
</div>
<div id="harvestUnitCode" class="component-select bottom-sheet" data-props-default="단위를 선택해 주세요"
data-props-type="bottomSheet">
<input type="hidden" name="harvestUnitCode" th:value="${detail.harvestUnitCode}">
<input type="hidden" name="harvestUnitCode" data-type="select" th:value="${detail.harvestUnitCode}">
<button type="button" class="select-box">
<span class="select-txt"></span>
</button>

View File

@@ -189,10 +189,6 @@
<section layout:fragment="script">
<script th:src="@{/static/ui/page/daily-record.js}"></script>
<script th:inline="javascript">
$(function() {
formControl.init();
});
let ENV = {
httpUrl: {
root: /*[[|/record/work/${reqVO.searchMonth}/${reqVO.groupNo}|]]*/'rootUrl',

View File

@@ -35,7 +35,7 @@
</label>
</div>
<div class="input-field">
<input type="password" name="password" id="floatingPassword" placeholder="비밀번호 4자리를 입력해 주세요" maxlength="4">
<input type="password" inputmode="numeric" maxlength="4" name="password" id="floatingPassword" placeholder="비밀번호 4자리를 입력해 주세요">
</div>
<ul class="input-info" id="password-error" style="display: none;">
<li>비밀번호를 입력해주세요</li>