Merge branch 'dev' into 'deploy-dev-front'

Dev

See merge request korea-research/korea-research!39
This commit is contained in:
김현주 개발
2025-06-24 12:47:18 +00:00
74 changed files with 1330 additions and 308 deletions

View File

@@ -769,10 +769,6 @@
if (rowdata == null) {
kri.logger.error('달력 선택 데이터 없음.')
}
// if (rowdata != null && typeof rowdata === 'object' && rowdata.children !== undefined) {
// rowList = rowdata.children.filter(f => !(f.code === 'MONTHLY' || f.code === 'BANK'));
// monthlyList = rowdata.children.filter(f => f.code === 'MONTHLY' || f.code === 'BANK');
// }
let tmpl = $.templates('#dailyNoneTmpl');
let html = '';
@@ -782,6 +778,8 @@
no: rowdata.no,
date: currentDate,
monthlyList: monthlyList,
registrable: rowdata.registrable,
modifiable: rowdata.modifiable,
});
} else {
tmpl = $.templates('#dailyListTmpl');
@@ -791,6 +789,8 @@
date: currentDate,
list: childList,
monthlyList: monthlyList,
registrable: rowdata.registrable,
modifiable: rowdata.modifiable,
});
}
@@ -804,11 +804,13 @@
<script id="dailyNoneTmpl" type="text/x-jsrender">
{{include tmpl="#titleTmpl" /}}
{{if registrable}}
<div class="component-btns btn-add">
<button type="button" onclick="formControl.recordCreate('{{:month}}', {{:no}});">
<p class="txt">일계부 등록하기</p>
</button>
</div>
{{/if}}
{{include tmpl="#etcRowTmpl" /}}
</script>
@@ -816,7 +818,11 @@
{{include tmpl="#titleTmpl" /}}
<ul class="btn-column-list">
{{for list tmpl="#basicRowTmpl" /}}
{{if modifiable}}
{{for list tmpl="#basicRowTmpl1" /}}
{{else}}
{{for list tmpl="#basicRowTmpl2" /}}
{{/if}}
</ul>
{{include tmpl="#etcRowTmpl" /}}
@@ -828,24 +834,42 @@
<p class="date">{{:date.start}} ~ {{:date.end}}</p>
{{/if}}
</script>
<script id="basicRowTmpl" type="text/x-jsrender">
<script id="basicRowTmpl1" type="text/x-jsrender">
<li>
<a href="{{:path}}?type=update">
<p class="label">{{:codeLabel}}</p>
{{if total != null && total != 0}}
{{if status == null}}
<p class="value">미작성</p>
{{else status == 'TARGET' && total != 0}}
<p class="value"><em>총 <b>{{:total}}</b>건</em></p>
{{else}}
{{else status == 'TARGET' && total == 0}}
<p class="value">미완료</p>
{{else status == 'TODAY_NONE'}}
<p class="value">없음</p>
{{/if}}
</a>
</li>
</script>
<script id="basicRowTmpl2" type="text/x-jsrender">
<li>
<a href="{{:path}}?type=update">
<p class="label">{{:codeLabel}}, TODO: 수정버튼삭제필요</p>
{{if status == null}}
<p class="value">미작성</p>
{{else status == 'TARGET' && total != 0}}
<p class="value"><em>총 <b>{{:total}}</b>건</em></p>
{{else status == 'TARGET' && total == 0}}
<p class="value">미완료</p>
{{else status == 'TODAY_NONE'}}
<p class="value">없음</p>
{{/if}}
</a>
</li>
</script>
<script id="etcRowTmpl" type="text/x-jsrender">
<div class="regist-btn-area">
{{for monthlyList}}
<a href="{{:path ? path : 'javascript:void(0);'}}" class="btn{{if total != null && total != 0}} complete{{/if}}">
<p>{{:codeLabel}}</p>
{{if total != null && total != 0}}
<span>등록완료</span>

View File

@@ -81,7 +81,7 @@
<ul class="detail-list"
th:if="${item.name eq 'WORK'}"
>
<th:block th:if="${#strings.isEmpty(workList)}">
<th:block th:if="${#lists.isEmpty(workList)}">
<li>
<p>없음</p>
</li>

View File

@@ -98,7 +98,7 @@
</main>
<div class="component-btns fixed"
th:if="${dailyRecord.modifiable}">
th:if="${dailyRecord.registrable || dailyRecord.modifiable}">
<div class="btns-row">
<button type="button" class="btn btn-l btn-primary _nextStep"
th:data-last="${dailyRecord.lastDay}"
@@ -164,11 +164,16 @@
create() {
const f = document.reqForm;
let checkedArray = [];
const $checked = $(f).find('input:checked');
if ($checked.length === 0) {
f.todayNone.value = 'Y';
}
$(f).find('input:checked').each(function() {
checkedArray.push($(this).data('target'));
})
const obj = $(f).serializeObject();
ajaxUtil._ajaxAsync(
ENV.httpUrl.create,
@@ -176,12 +181,12 @@
function () {
if (f.todayNone.value === 'Y') {
if ($('._nextStep').data('last')) {
krip.daily.goToNext('LAST', ENV.month, ENV.groupNo);
krip.daily.goToNext('LAST', ENV.month, ENV.groupNo, checkedArray.join(','));
} else {
krip.daily.goToDone(ENV.month, ENV.groupNo);
}
} else if ($checked.data('target') !== undefined) {
krip.daily.goToNext($checked.data('target'), ENV.month, ENV.groupNo);
krip.daily.goToNext($checked.data('target'), ENV.month, ENV.groupNo, checkedArray.join(','));
} else {
krip.daily.goToMain();
}

View File

@@ -4,7 +4,9 @@
<div layout:fragment="content" th:classappend="acco-wrap">
<main id="content" role="main"
th:with="btnDisabled=${not dailyRecord.modifiable || #strings.equals(dailyRecord.expenseStatus, T(app.module.front.usecase.daily.record.adapters.web.model.DailyTargetStatus).TODAY_NONE)}
th:with="btnActive=${(dailyRecord.registrable && moveStep) || dailyRecord.modifiable }
, btnDisabled=${(not btnActive)
|| #strings.equals(dailyRecord.expenseStatus, T(app.module.front.usecase.daily.record.adapters.web.model.DailyTargetStatus).TODAY_NONE)}
, btnIcoClass=${btnDisabled ? 'ico-add-disabled' : 'ico-add'}">
<div class="inner">
<hgroup class="tit-group">
@@ -33,7 +35,7 @@
<label class="checkbox-inner" id="todayNone">
<input type="checkbox" name="todayNone"
data-type="EXPENSE"
th:disabled="${not dailyRecord.modifiable}"
th:disabled="${not btnActive}"
th:checked="${#strings.equals(dailyRecord.expenseStatus, T(app.module.front.usecase.daily.record.adapters.web.model.DailyTargetStatus).TODAY_NONE)}">
<span class="checkbox-item">
<span class="checkbox-txt">금일 등록내용 없음</span>
@@ -47,7 +49,7 @@
<p class="total">
<span>총 <strong>[[${#lists.size(expenseList)}]]</strong>건</span>
<button type="button" class="btn-reset" onclick="krip.daily.resetConfirm()"
th:if="${not btnDisabled}">
th:if="${btnActive}">
<i class="ico-reset ico-small" aria-hidden="true"></i>
<span>초기화</span>
</button>
@@ -58,7 +60,7 @@
<div class="item-tit-group">
<p class="item-name">[[${item.expenseKind}]]</p>
<div class="btn-group"
th:if="${not btnDisabled}">
th:if="${btnActive}">
<button type="button" class="delete" th:onclick="krip.daily.removeConfirm([[${item.id}]])"><span class="hide-txt">삭제</span></button>
<button type="button" class="edit" th:onclick="krip.daily.createModal([[${item.id}]])"><span class="hide-txt">수정</span></button>
</div>
@@ -98,7 +100,7 @@
<!--/* 하단 고정 버튼 */-->
<div class="component-btns fixed"
th:if="${dailyRecord.modifiable && moveStep}">
th:if="${(dailyRecord.registrable && moveStep)}">
<div class="btns-row">
<button type="button" class="btn btn-l btn-secondary" onclick="krip.daily.goToPrev();">
<span class="btn-txt">이전 단계로 이동</span>

View File

@@ -3,9 +3,19 @@
xmlns:th="http://www.thymeleaf.org" lang="ko">
<div layout:fragment="content" th:classappend="acco-wrap">
[[${dailyRecord.registrable}]]
[[${moveStep}]],
[[${dailyRecord.modifiable}]]
--
[[${(not dailyRecord.modifiable)}]]
<main id="content" role="main"
th:with="btnDisabled=${not dailyRecord.modifiable || #strings.equals(dailyRecord.farmingStatus, T(app.module.front.usecase.daily.record.adapters.web.model.DailyTargetStatus).TODAY_NONE)}
th:with="btnActive=${(dailyRecord.registrable && moveStep) || dailyRecord.modifiable }
, btnDisabled=${(not btnActive)
|| #strings.equals(dailyRecord.farmingStatus, T(app.module.front.usecase.daily.record.adapters.web.model.DailyTargetStatus).TODAY_NONE)}
, btnIcoClass=${btnDisabled ? 'ico-add-disabled' : 'ico-add'}">
[[${btnActive}]], [[${btnDisabled}]], [[${btnIcoClass}]]
<div class="inner">
<hgroup class="tit-group">
<h3>
@@ -33,7 +43,7 @@
<label class="checkbox-inner" id="todayNone">
<input type="checkbox" name="todayNone"
data-type="FARMING"
th:disabled="${not dailyRecord.modifiable}"
th:disabled="${not btnActive}"
th:checked="${#strings.equals(dailyRecord.farmingStatus, T(app.module.front.usecase.daily.record.adapters.web.model.DailyTargetStatus).TODAY_NONE)}">
<span class="checkbox-item">
<span class="checkbox-txt">금일 등록내용 없음</span>
@@ -53,7 +63,7 @@
<p class="total">
<span>총 <strong>[[${#lists.size(farmingList)}]]</strong>건</span>
<button type="button" class="btn-reset" onclick="krip.daily.resetConfirm()"
th:if="${not btnDisabled}">
th:if="${btnActive}">
<i class="ico-reset ico-small" aria-hidden="true"></i>
<span>초기화</span>
</button>
@@ -64,7 +74,7 @@
<div class="item-tit-group">
<p class="item-name">[[${item.productLabel}]]</p>
<div class="btn-group"
th:if="${not btnDisabled}">
th:if="${btnActive}">
<button type="button" class="delete" th:onclick="krip.daily.removeConfirm([[${item.id}]])"><span class="hide-txt">삭제</span></button>
<button type="button" class="edit" th:onclick="krip.daily.createModal([[${item.id}]])"><span class="hide-txt">수정</span></button>
</div>
@@ -101,14 +111,14 @@
<!--/* 하단 고정 버튼 */-->
<div class="component-btns fixed"
th:if="${dailyRecord.modifiable && moveStep}">
th:if="${(dailyRecord.registrable && moveStep)}">
<div class="btns-row">
<button type="button" class="btn btn-l btn-secondary" onclick="krip.daily.goToPrev();">
<span class="btn-txt">이전 단계로 이동</span>
</button>
<button type="button" class="btn btn-l btn-primary"
th:disabled="${not #strings.equals(dailyRecord.farmingStatus, T(app.module.front.usecase.daily.record.adapters.web.model.DailyTargetStatus).TODAY_NONE) and #lists.isEmpty(farmingList)}"
th:onclick="krip.daily.goToNext([[${dailyRecord.nextStep}]], [[${reqVO.searchMonth}]], [[${reqVO.groupNo}]])">
th:onclick="krip.daily.goToNext([[${dailyRecord.nextStep}]], [[${reqVO.searchMonth}]], [[${reqVO.groupNo}]], [[${targetList}]])">
<span class="btn-txt">다음 단계로 이동</span>
</button>
</div>

View File

@@ -4,7 +4,9 @@
<div layout:fragment="content" th:classappend="acco-wrap">
<main id="content" role="main"
th:with="btnDisabled=${not dailyRecord.modifiable || #strings.equals(dailyRecord.forestryStatus, T(app.module.front.usecase.daily.record.adapters.web.model.DailyTargetStatus).TODAY_NONE)}
th:with="btnActive=${(dailyRecord.registrable && moveStep) || dailyRecord.modifiable }
, btnDisabled=${(not btnActive)
|| #strings.equals(dailyRecord.forestryStatus, T(app.module.front.usecase.daily.record.adapters.web.model.DailyTargetStatus).TODAY_NONE)}
, btnIcoClass=${btnDisabled ? 'ico-add-disabled' : 'ico-add'}">
<div class="inner">
<hgroup class="tit-group">
@@ -33,7 +35,7 @@
<label class="checkbox-inner" id="todayNone">
<input type="checkbox" name="todayNone"
data-type="FORESTRY"
th:disabled="${not dailyRecord.modifiable}"
th:disabled="${not btnActive}"
th:checked="${#strings.equals(dailyRecord.forestryStatus, T(app.module.front.usecase.daily.record.adapters.web.model.DailyTargetStatus).TODAY_NONE)}">
<span class="checkbox-item">
<span class="checkbox-txt">금일 등록내용 없음</span>
@@ -53,7 +55,7 @@
<p class="total">
<span>총 <strong>[[${#lists.size(forestryList)}]]</strong>건</span>
<button type="button" class="btn-reset" onclick="krip.daily.resetConfirm()"
th:if="${not btnDisabled}">
th:if="${btnActive}">
<i class="ico-reset ico-small" aria-hidden="true"></i>
<span>초기화</span>
</button>
@@ -64,7 +66,7 @@
<div class="item-tit-group">
<p class="item-name">[[${item.productName}]]</p>
<div class="btn-group"
th:if="${not btnDisabled}">
th:if="${btnActive}">
<button type="button" class="delete" th:onclick="krip.daily.removeConfirm([[${item.id}]])"><span class="hide-txt">삭제</span></button>
<button type="button" class="edit" th:onclick="krip.daily.createModal([[${item.id}]])"><span class="hide-txt">수정</span></button>
</div>
@@ -101,7 +103,7 @@
<!--/* 하단 고정 버튼 */-->
<div class="component-btns fixed"
th:if="${dailyRecord.modifiable && moveStep}">
th:if="${(dailyRecord.registrable && moveStep)}">
<div class="btns-row">
<button type="button" class="btn btn-l btn-secondary" onclick="krip.daily.goToPrev();">
<span class="btn-txt">이전 단계로 이동</span>

View File

@@ -3,8 +3,25 @@
xmlns:th="http://www.thymeleaf.org" lang="ko">
<div layout:fragment="content" th:classappend="acco-wrap">
<th:block th:if="${@systemProperties['spring.profiles.active'] eq 'local'}">
<div>
reqVO: [[${reqVO}]]
</div>
<div>
detail: [[${dailyRecord}]]
</div>
<div>
[[${dailyRecord.registrable}]]
[[${moveStep}]],
[[${dailyRecord.modifiable}]]
<br>
//http://localhost:8080/record/income/202505/12?type=step1&target=income
</div>
</th:block>
<main id="content" role="main"
th:with="btnDisabled=${not dailyRecord.modifiable || #strings.equals(dailyRecord.incomeStatus, T(app.module.front.usecase.daily.record.adapters.web.model.DailyTargetStatus).TODAY_NONE)}
th:with="btnActive=${(dailyRecord.registrable && moveStep) || dailyRecord.modifiable }
, btnDisabled=${(not btnActive)
|| #strings.equals(dailyRecord.incomeStatus, T(app.module.front.usecase.daily.record.adapters.web.model.DailyTargetStatus).TODAY_NONE)}
, btnIcoClass=${btnDisabled ? 'ico-add-disabled' : 'ico-add'}">
<div class="inner">
<hgroup class="tit-group">
@@ -34,7 +51,7 @@
<label class="checkbox-inner" id="todayNone">
<input type="checkbox" name="todayNone"
data-type="INCOME"
th:disabled="${not dailyRecord.modifiable}"
th:disabled="${not btnActive}"
th:checked="${#strings.equals(dailyRecord.incomeStatus, T(app.module.front.usecase.daily.record.adapters.web.model.DailyTargetStatus).TODAY_NONE)}">
<span class="checkbox-item">
<span class="checkbox-txt">금일 등록내용 없음</span>
@@ -48,7 +65,7 @@
<p class="total">
<span>총 <strong>[[${#lists.size(incomeList)}]]</strong>건</span>
<button type="button" class="btn-reset" onclick="krip.daily.resetConfirm()"
th:if="${not btnDisabled}">
th:if="${btnActive}">
<i class="ico-reset ico-small" aria-hidden="true"></i>
<span>초기화</span>
</button>
@@ -59,7 +76,7 @@
<div class="item-tit-group">
<p class="item-name">[[${item.incomeKind}]]</p>
<div class="btn-group"
th:if="${not btnDisabled}">
th:if="${btnActive}">
<button type="button" class="delete" th:onclick="krip.daily.removeConfirm([[${item.id}]])"><span class="hide-txt">삭제</span></button>
<button type="button" class="edit" th:onclick="krip.daily.createModal([[${item.id}]])"><span class="hide-txt">수정</span></button>
</div>
@@ -94,7 +111,7 @@
</div>
<button type="button" class="btn btn-m btn-secondary btn-full button-modal01" data-testid="button-modal01"
th:if="${not btnDisabled}">
th:if="${btnActive}">
<i class="ico-add ico-small" aria-hidden="true"></i>
<span class="btn-txt">추가 등록</span>
</button>
@@ -105,14 +122,14 @@
<!--/* 하단 고정 버튼 */-->
<div class="component-btns fixed"
th:if="${dailyRecord.modifiable && moveStep}">
th:if="${(dailyRecord.registrable && moveStep)}">
<div class="btns-row">
<button type="button" class="btn btn-l btn-secondary" onclick="krip.daily.goToPrev();">
<span class="btn-txt">이전 단계로 이동</span>
</button>
<button type="button" class="btn btn-l btn-primary"
th:disabled="${not #strings.equals(dailyRecord.incomeStatus, T(app.module.front.usecase.daily.record.adapters.web.model.DailyTargetStatus).TODAY_NONE) and #lists.isEmpty(incomeList)}"
th:onclick="krip.daily.goToNext([[${dailyRecord.nextStep}]], [[${reqVO.searchMonth}]], [[${reqVO.groupNo}]])">
th:onclick="krip.daily.goToNext([[${dailyRecord.nextStep}]], [[${reqVO.searchMonth}]], [[${reqVO.groupNo}]], [[${targetList}]])">
<span class="btn-txt">다음 단계로 이동</span>
</button>
</div>

View File

@@ -4,7 +4,9 @@
<div layout:fragment="content" th:classappend="acco-wrap">
<main id="content" role="main"
th:with="btnDisabled=${not dailyRecord.modifiable || #strings.equals(dailyRecord.powerStatus, T(app.module.front.usecase.daily.record.adapters.web.model.DailyTargetStatus).TODAY_NONE)}
th:with="btnActive=${(dailyRecord.registrable && moveStep) || dailyRecord.modifiable }
, btnDisabled=${(not btnActive)
|| #strings.equals(dailyRecord.powerStatus, T(app.module.front.usecase.daily.record.adapters.web.model.DailyTargetStatus).TODAY_NONE)}
, btnIcoClass=${btnDisabled ? 'ico-add-disabled' : 'ico-add'}">
<div class="inner">
<hgroup class="tit-group">
@@ -33,7 +35,7 @@
<label class="checkbox-inner" id="todayNone">
<input type="checkbox" name="todayNone"
data-type="POWER"
th:disabled="${not dailyRecord.modifiable}"
th:disabled="${not btnActive}"
th:checked="${#strings.equals(dailyRecord.powerStatus, T(app.module.front.usecase.daily.record.adapters.web.model.DailyTargetStatus).TODAY_NONE)}">
<span class="checkbox-item">
<span class="checkbox-txt">금일 등록내용 없음</span>
@@ -47,7 +49,7 @@
<p class="total">
<span>총 <strong>[[${#lists.size(powerList)}]]</strong>건</span>
<button type="button" class="btn-reset" onclick="krip.daily.resetConfirm()"
th:if="${not btnDisabled}">
th:if="${btnActive}">
<i class="ico-reset ico-small" aria-hidden="true"></i>
<span>초기화</span>
</button>
@@ -58,7 +60,7 @@
<div class="item-tit-group">
<p class="item-name">[[${item.equipmentName}]]</p>
<div class="btn-group"
th:if="${not btnDisabled}">
th:if="${btnActive}">
<button type="button" class="delete" th:onclick="krip.daily.removeConfirm([[${item.id}]])"><span class="hide-txt">삭제</span></button>
<button type="button" class="edit" th:onclick="krip.daily.createModal([[${item.id}]])"><span class="hide-txt">수정</span></button>
</div>
@@ -86,7 +88,7 @@
<!--/* 하단 고정 버튼 */-->
<div class="component-btns fixed"
th:if="${dailyRecord.modifiable && moveStep}">
th:if="${(dailyRecord.registrable && moveStep)}">
<div class="btns-row">
<button type="button" class="btn btn-l btn-secondary" onclick="krip.daily.goToPrev();">
<span class="btn-txt">이전 단계로 이동</span>

View File

@@ -4,7 +4,9 @@
<div layout:fragment="content" th:classappend="acco-wrap">
<main id="content" role="main"
th:with="btnDisabled=${not dailyRecord.modifiable || #strings.equals(dailyRecord.workStatus, T(app.module.front.usecase.daily.record.adapters.web.model.DailyTargetStatus).TODAY_NONE)}
th:with="btnActive=${(dailyRecord.registrable && moveStep) || dailyRecord.modifiable }
, btnDisabled=${(not btnActive)
|| #strings.equals(dailyRecord.workStatus, T(app.module.front.usecase.daily.record.adapters.web.model.DailyTargetStatus).TODAY_NONE)}
, btnIcoClass=${btnDisabled ? 'ico-add-disabled' : 'ico-add'}">
<div class="inner">
<hgroup class="tit-group">
@@ -33,7 +35,7 @@
<label class="checkbox-inner" id="todayNone">
<input type="checkbox" name="todayNone"
data-type="WORK"
th:disabled="${not dailyRecord.modifiable}"
th:disabled="${not btnActive}"
th:checked="${#strings.equals(dailyRecord.workStatus, T(app.module.front.usecase.daily.record.adapters.web.model.DailyTargetStatus).TODAY_NONE)}">
<span class="checkbox-item">
<span class="checkbox-txt">금일 등록내용 없음</span>
@@ -55,7 +57,7 @@
<p class="total">
<span>총 <strong>[[${#lists.size(workList)}]]</strong>건</span>
<button type="button" class="btn-reset" onclick="krip.daily.resetConfirm()"
th:if="${not btnDisabled}">
th:if="${btnActive}">
<i class="ico-reset ico-small" aria-hidden="true"></i>
<span>초기화</span>
</button>
@@ -66,7 +68,7 @@
<div class="item-tit-group">
<p class="item-name">[[${item.itemName}]]</p>
<div class="btn-group"
th:if="${not btnDisabled}">
th:if="${btnActive}">
<button type="button" class="delete" th:onclick="krip.daily.removeConfirm([[${item.id}]])"><span class="hide-txt">삭제</span></button>
<button type="button" class="edit" th:onclick="krip.daily.createModal([[${item.id}]])"><span class="hide-txt">수정</span></button>
</div>
@@ -147,7 +149,7 @@
<!--/* 하단 고정 버튼 */-->
<div class="component-btns fixed"
th:if="${dailyRecord.modifiable && moveStep}">
th:if="${(dailyRecord.registrable && moveStep)}">
<div class="btns-row">
<button type="button" class="btn btn-l btn-secondary" onclick="krip.daily.goToPrev();">
<span class="btn-txt">이전 단계로 이동</span>