[FO] 일계부 등록 현황 ING, 수정이외 기간 button disabled 처리
This commit is contained in:
@@ -16,6 +16,29 @@
|
||||
and ddg.group_no = #{groupNo}
|
||||
</select>
|
||||
|
||||
<select id="getDailyRecordStatus"
|
||||
resultType="app.module.front.usecase.daily.record.adapters.persistence.model.DailyRecordStatusDto">
|
||||
select dr.id as daily_id
|
||||
, dr.day_group_no, dr.start_date, dr.end_date
|
||||
, dr.all_status
|
||||
, dr.income_status
|
||||
, dr.work_status
|
||||
, dr.expense_status
|
||||
, dr.power_status
|
||||
, dr.forestry_status
|
||||
, dr.farming_status
|
||||
, (select count(*) from daily_income di where di.daily_record_seq = dr.id and di.is_deleted = false) as income_count
|
||||
, (select count(*) from daily_work dw where dw.daily_record_seq = dr.id and dw.is_deleted = false) as work_count
|
||||
, (select count(*) from daily_expense de where de.daily_record_seq = dr.id and de.is_deleted = false) as expense_count
|
||||
, (select count(*) from daily_power dp where dp.daily_record_seq = dr.id and dp.is_deleted = false) as power_count
|
||||
, (select count(*) from daily_forestry df1 where df1.daily_record_seq = dr.id and df1.is_deleted = false) as forestry_count
|
||||
, (select count(*) from daily_farming df2 where df2.daily_record_seq = dr.id and df2.is_deleted = false) as farming_count
|
||||
from daily_record dr
|
||||
where dr.is_deleted = false
|
||||
and dr.household_seq = #{householdSeq}
|
||||
and dr.record_month = #{searchMonth}
|
||||
</select>
|
||||
|
||||
<select id="getDailyRecordExistCount" resultType="int">
|
||||
select count(1) as exist
|
||||
from daily_record dr
|
||||
|
||||
@@ -16,29 +16,6 @@
|
||||
ddg.group_no asc
|
||||
</select>
|
||||
|
||||
<select id="getDailyRecordStatus"
|
||||
resultType="app.module.front.usecase.daily.calendar.adapters.persistence.model.DailyRecordStatusDto">
|
||||
select dr.id as daily_id
|
||||
, dr.day_group_no, dr.start_date, dr.end_date
|
||||
, dr.all_status
|
||||
, dr.income_status
|
||||
, dr.work_status
|
||||
, dr.expense_status
|
||||
, dr.power_status
|
||||
, dr.forestry_status
|
||||
, dr.farming_status
|
||||
, (select count(*) from daily_income di where di.daily_record_seq = dr.id and di.is_deleted = false) as income_count
|
||||
, (select count(*) from daily_work dw where dw.daily_record_seq = dr.id and dw.is_deleted = false) as work_count
|
||||
, (select count(*) from daily_expense de where de.daily_record_seq = dr.id and de.is_deleted = false) as expense_count
|
||||
, (select count(*) from daily_power dp where dp.daily_record_seq = dr.id and dp.is_deleted = false) as power_count
|
||||
, (select count(*) from daily_forestry df1 where df1.daily_record_seq = dr.id and df1.is_deleted = false) as forestry_count
|
||||
, (select count(*) from daily_farming df2 where df2.daily_record_seq = dr.id and df2.is_deleted = false) as farming_count
|
||||
from daily_record dr
|
||||
where dr.is_deleted = false
|
||||
and dr.household_seq = #{householdSeq}
|
||||
and dr.record_month = #{searchMonth}
|
||||
</select>
|
||||
|
||||
<select id="getMonthlyStatus">
|
||||
select mis.forest_product_status as forest_product, mis.bank_auto_transfer_input_status as bank_input, mis.bank_auto_transfer_output_status as bank_output
|
||||
from monthly_input_status mis
|
||||
@@ -115,7 +92,7 @@
|
||||
</select>
|
||||
|
||||
<select id="getLatestDate"
|
||||
resultType="app.module.front.usecase.daily.calendar.adapters.persistence.model.DailyRecordStatusDto">
|
||||
resultType="app.module.front.usecase.daily.record.adapters.persistence.model.DailyRecordStatusDto">
|
||||
select dr.id as daily_id
|
||||
, dr.day_group_no, dr.start_date, dr.end_date
|
||||
from daily_record dr
|
||||
|
||||
@@ -3,7 +3,9 @@
|
||||
xmlns:th="http://www.thymeleaf.org" lang="ko">
|
||||
|
||||
<div layout:fragment="content" th:classappend="acco-wrap">
|
||||
<main id="content" role="main">
|
||||
<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)}
|
||||
, btnIcoClass=${btnDisabled ? 'ico-add-disabled' : 'ico-add'}">
|
||||
<div class="inner">
|
||||
<hgroup class="tit-group">
|
||||
<h3>
|
||||
@@ -23,11 +25,8 @@
|
||||
<!--/* 신규 등록 : dailyRecord.modifiable=false 수정 기간 아님 */-->
|
||||
<th:block th:if="${#lists.isEmpty(expenseList)}">
|
||||
<button type="button" class="btn btn-m btn-secondary btn-full button-modal01" data-testid="button-modal01"
|
||||
th:disabled="${not dailyRecord.modifiable
|
||||
|| #strings.equals(dailyRecord.expenseStatus, T(app.module.front.usecase.daily.record.adapters.web.model.DailyTargetStatus).TODAY_NONE)}">
|
||||
<i class=" ico-small" aria-hidden="true"
|
||||
th:classappend="${not dailyRecord.modifiable
|
||||
|| #strings.equals(dailyRecord.expenseStatus, T(app.module.front.usecase.daily.record.adapters.web.model.DailyTargetStatus).TODAY_NONE) ? 'ico-add-disabled' : 'ico-add'}"></i>
|
||||
th:disabled="${btnDisabled}">
|
||||
<i class="ico-small" aria-hidden="true" th:classappend="${btnIcoClass}"></i>
|
||||
<span class="btn-txt">추가 등록</span>
|
||||
</button>
|
||||
<div class="component-input align-center">
|
||||
@@ -47,7 +46,8 @@
|
||||
<section class="regist-item-area">
|
||||
<p class="total">
|
||||
<span>총 <strong>[[${#lists.size(expenseList)}]]</strong>건</span>
|
||||
<button type="button" class="btn-reset" onclick="krip.daily.resetConfirm()">
|
||||
<button type="button" class="btn-reset" onclick="krip.daily.resetConfirm()"
|
||||
th:if="${not btnDisabled}">
|
||||
<i class="ico-reset ico-small" aria-hidden="true"></i>
|
||||
<span>초기화</span>
|
||||
</button>
|
||||
@@ -57,7 +57,8 @@
|
||||
th:each="item, itemStatus : ${expenseList}">
|
||||
<div class="item-tit-group">
|
||||
<p class="item-name">[[${item.expenseKind}]]</p>
|
||||
<div class="btn-group">
|
||||
<div class="btn-group"
|
||||
th:if="${not btnDisabled}">
|
||||
<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>
|
||||
|
||||
@@ -3,7 +3,9 @@
|
||||
xmlns:th="http://www.thymeleaf.org" lang="ko">
|
||||
|
||||
<div layout:fragment="content" th:classappend="acco-wrap">
|
||||
<main id="content" role="main">
|
||||
<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)}
|
||||
, btnIcoClass=${btnDisabled ? 'ico-add-disabled' : 'ico-add'}">
|
||||
<div class="inner">
|
||||
<hgroup class="tit-group">
|
||||
<h3>
|
||||
@@ -23,11 +25,8 @@
|
||||
<!--/* 신규 등록 : dailyRecord.modifiable=false 수정 기간 아님 */-->
|
||||
<th:block th:if="${#lists.isEmpty(farmingList)}">
|
||||
<button type="button" class="btn btn-m btn-secondary btn-full button-modal01" data-testid="button-modal01"
|
||||
th:disabled="${not dailyRecord.modifiable
|
||||
|| #strings.equals(dailyRecord.farmingStatus, T(app.module.front.usecase.daily.record.adapters.web.model.DailyTargetStatus).TODAY_NONE)}">
|
||||
<i class="ico-small" aria-hidden="true"
|
||||
th:classappend="${not dailyRecord.modifiable
|
||||
|| #strings.equals(dailyRecord.farmingStatus, T(app.module.front.usecase.daily.record.adapters.web.model.DailyTargetStatus).TODAY_NONE) ? 'ico-add-disabled' : 'ico-add'}"></i>
|
||||
th:disabled="${btnDisabled}">
|
||||
<i class="ico-small" aria-hidden="true" th:classappend="${btnIcoClass}"></i>
|
||||
<span class="btn-txt">추가 등록</span>
|
||||
</button>
|
||||
<div class="component-input align-center">
|
||||
@@ -53,7 +52,8 @@
|
||||
<section class="regist-item-area">
|
||||
<p class="total">
|
||||
<span>총 <strong>[[${#lists.size(farmingList)}]]</strong>건</span>
|
||||
<button type="button" class="btn-reset" onclick="krip.daily.resetConfirm()">
|
||||
<button type="button" class="btn-reset" onclick="krip.daily.resetConfirm()"
|
||||
th:if="${not btnDisabled}">
|
||||
<i class="ico-reset ico-small" aria-hidden="true"></i>
|
||||
<span>초기화</span>
|
||||
</button>
|
||||
@@ -63,7 +63,8 @@
|
||||
th:each="item, itemStatus : ${farmingList}">
|
||||
<div class="item-tit-group">
|
||||
<p class="item-name">[[${item.productLabel}]]</p>
|
||||
<div class="btn-group">
|
||||
<div class="btn-group"
|
||||
th:if="${not btnDisabled}">
|
||||
<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>
|
||||
|
||||
@@ -3,7 +3,9 @@
|
||||
xmlns:th="http://www.thymeleaf.org" lang="ko">
|
||||
|
||||
<div layout:fragment="content" th:classappend="acco-wrap">
|
||||
<main id="content" role="main">
|
||||
<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)}
|
||||
, btnIcoClass=${btnDisabled ? 'ico-add-disabled' : 'ico-add'}">
|
||||
<div class="inner">
|
||||
<hgroup class="tit-group">
|
||||
<h3>
|
||||
@@ -23,11 +25,8 @@
|
||||
<!--/* 신규 등록 : dailyRecord.modifiable=false 수정 기간 아님 */-->
|
||||
<th:block th:if="${#lists.isEmpty(forestryList)}">
|
||||
<button type="button" class="btn btn-m btn-secondary btn-full button-modal01" data-testid="button-modal01"
|
||||
th:disabled="${not dailyRecord.modifiable
|
||||
|| #strings.equals(dailyRecord.forestryStatus, T(app.module.front.usecase.daily.record.adapters.web.model.DailyTargetStatus).TODAY_NONE)}">
|
||||
<i class="ico-small" aria-hidden="true"
|
||||
th:classappend="${not dailyRecord.modifiable
|
||||
|| #strings.equals(dailyRecord.forestryStatus, T(app.module.front.usecase.daily.record.adapters.web.model.DailyTargetStatus).TODAY_NONE) ? 'ico-add-disabled' : 'ico-add'}"></i>
|
||||
th:disabled="${btnDisabled}">
|
||||
<i class="ico-small" aria-hidden="true" th:classappend="${btnIcoClass}"></i>
|
||||
<span class="btn-txt">추가 등록</span>
|
||||
</button>
|
||||
<div class="component-input align-center">
|
||||
@@ -53,7 +52,8 @@
|
||||
<section class="regist-item-area">
|
||||
<p class="total">
|
||||
<span>총 <strong>[[${#lists.size(forestryList)}]]</strong>건</span>
|
||||
<button type="button" class="btn-reset" onclick="krip.daily.resetConfirm()">
|
||||
<button type="button" class="btn-reset" onclick="krip.daily.resetConfirm()"
|
||||
th:if="${not btnDisabled}">
|
||||
<i class="ico-reset ico-small" aria-hidden="true"></i>
|
||||
<span>초기화</span>
|
||||
</button>
|
||||
@@ -63,7 +63,8 @@
|
||||
th:each="item, itemStatus : ${forestryList}">
|
||||
<div class="item-tit-group">
|
||||
<p class="item-name">[[${item.productName}]]</p>
|
||||
<div class="btn-group">
|
||||
<div class="btn-group"
|
||||
th:if="${not btnDisabled}">
|
||||
<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>
|
||||
|
||||
@@ -3,7 +3,9 @@
|
||||
xmlns:th="http://www.thymeleaf.org" lang="ko">
|
||||
|
||||
<div layout:fragment="content" th:classappend="acco-wrap">
|
||||
<main id="content" role="main">
|
||||
<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)}
|
||||
, btnIcoClass=${btnDisabled ? 'ico-add-disabled' : 'ico-add'}">
|
||||
<div class="inner">
|
||||
<hgroup class="tit-group">
|
||||
<h3>
|
||||
@@ -24,11 +26,8 @@
|
||||
<!--/* 신규 등록 : dailyRecord.modifiable=false 수정 기간 아님 */-->
|
||||
<th:block th:if="${#lists.isEmpty(incomeList)}">
|
||||
<button type="button" class="btn btn-m btn-secondary btn-full button-modal01" data-testid="button-modal01"
|
||||
th:disabled="${not dailyRecord.modifiable
|
||||
|| #strings.equals(dailyRecord.incomeStatus, T(app.module.front.usecase.daily.record.adapters.web.model.DailyTargetStatus).TODAY_NONE)}">
|
||||
<i class=" ico-small" aria-hidden="true"
|
||||
th:classappend="${not dailyRecord.modifiable
|
||||
|| #strings.equals(dailyRecord.incomeStatus, T(app.module.front.usecase.daily.record.adapters.web.model.DailyTargetStatus).TODAY_NONE) ? 'ico-add-disabled' : 'ico-add'}"></i>
|
||||
th:disabled="${btnDisabled}">
|
||||
<i class="ico-small" aria-hidden="true" th:classappend="${btnIcoClass}"></i>
|
||||
<span class="btn-txt">추가 등록</span>
|
||||
</button>
|
||||
<div class="component-input align-center">
|
||||
@@ -48,7 +47,8 @@
|
||||
<section class="regist-item-area">
|
||||
<p class="total">
|
||||
<span>총 <strong>[[${#lists.size(incomeList)}]]</strong>건</span>
|
||||
<button type="button" class="btn-reset" onclick="krip.daily.resetConfirm()">
|
||||
<button type="button" class="btn-reset" onclick="krip.daily.resetConfirm()"
|
||||
th:if="${not btnDisabled}">
|
||||
<i class="ico-reset ico-small" aria-hidden="true"></i>
|
||||
<span>초기화</span>
|
||||
</button>
|
||||
@@ -58,7 +58,8 @@
|
||||
th:each="item, itemStatus : ${incomeList}">
|
||||
<div class="item-tit-group">
|
||||
<p class="item-name">[[${item.incomeKind}]]</p>
|
||||
<div class="btn-group">
|
||||
<div class="btn-group"
|
||||
th:if="${not btnDisabled}">
|
||||
<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>
|
||||
@@ -91,7 +92,9 @@
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<button type="button" class="btn btn-m btn-secondary btn-full button-modal01" data-testid="button-modal01">
|
||||
|
||||
<button type="button" class="btn btn-m btn-secondary btn-full button-modal01" data-testid="button-modal01"
|
||||
th:if="${not btnDisabled}">
|
||||
<i class="ico-add ico-small" aria-hidden="true"></i>
|
||||
<span class="btn-txt">추가 등록</span>
|
||||
</button>
|
||||
|
||||
@@ -3,7 +3,9 @@
|
||||
xmlns:th="http://www.thymeleaf.org" lang="ko">
|
||||
|
||||
<div layout:fragment="content" th:classappend="acco-wrap">
|
||||
<main id="content" role="main">
|
||||
<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)}
|
||||
, btnIcoClass=${btnDisabled ? 'ico-add-disabled' : 'ico-add'}">
|
||||
<div class="inner">
|
||||
<hgroup class="tit-group">
|
||||
<h3>
|
||||
@@ -23,11 +25,8 @@
|
||||
<!--/* 신규 등록 : dailyRecord.modifiable=false 수정 기간 아님 */-->
|
||||
<th:block th:if="${#lists.isEmpty(powerList)}">
|
||||
<button type="button" class="btn btn-m btn-secondary btn-full button-modal01" data-testid="button-modal01"
|
||||
th:disabled="${not dailyRecord.modifiable
|
||||
|| #strings.equals(dailyRecord.powerStatus, T(app.module.front.usecase.daily.record.adapters.web.model.DailyTargetStatus).TODAY_NONE)}">
|
||||
<i class="ico-small" aria-hidden="true"
|
||||
th:classappend="${not dailyRecord.modifiable
|
||||
|| #strings.equals(dailyRecord.powerStatus, T(app.module.front.usecase.daily.record.adapters.web.model.DailyTargetStatus).TODAY_NONE) ? 'ico-add-disabled' : 'ico-add'}"></i>
|
||||
th:disabled="${btnDisabled}">
|
||||
<i class="ico-small" aria-hidden="true" th:classappend="${btnIcoClass}"></i>
|
||||
<span class="btn-txt">추가 등록</span>
|
||||
</button>
|
||||
<div class="component-input align-center">
|
||||
@@ -47,7 +46,8 @@
|
||||
<section class="regist-item-area">
|
||||
<p class="total">
|
||||
<span>총 <strong>[[${#lists.size(powerList)}]]</strong>건</span>
|
||||
<button type="button" class="btn-reset" onclick="krip.daily.resetConfirm()">
|
||||
<button type="button" class="btn-reset" onclick="krip.daily.resetConfirm()"
|
||||
th:if="${not btnDisabled}">
|
||||
<i class="ico-reset ico-small" aria-hidden="true"></i>
|
||||
<span>초기화</span>
|
||||
</button>
|
||||
@@ -57,7 +57,8 @@
|
||||
th:each="item, itemStatus : ${powerList}">
|
||||
<div class="item-tit-group">
|
||||
<p class="item-name">[[${item.equipmentName}]]</p>
|
||||
<div class="btn-group">
|
||||
<div class="btn-group"
|
||||
th:if="${not btnDisabled}">
|
||||
<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>
|
||||
|
||||
@@ -3,7 +3,9 @@
|
||||
xmlns:th="http://www.thymeleaf.org" lang="ko">
|
||||
|
||||
<div layout:fragment="content" th:classappend="acco-wrap">
|
||||
<main id="content" role="main">
|
||||
<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)}
|
||||
, btnIcoClass=${btnDisabled ? 'ico-add-disabled' : 'ico-add'}">
|
||||
<div class="inner">
|
||||
<hgroup class="tit-group">
|
||||
<h3>
|
||||
@@ -23,11 +25,8 @@
|
||||
<!--/* 신규 등록 : dailyRecord.modifiable=false 수정 기간 아님 */-->
|
||||
<th:block th:if="${#lists.isEmpty(workList)}">
|
||||
<button type="button" class="btn btn-m btn-secondary btn-full button-modal01" data-testid="button-modal01"
|
||||
th:disabled="${not dailyRecord.modifiable
|
||||
|| #strings.equals(dailyRecord.workStatus, T(app.module.front.usecase.daily.record.adapters.web.model.DailyTargetStatus).TODAY_NONE)}">
|
||||
<i class="ico-small" aria-hidden="true"
|
||||
th:classappend="${not dailyRecord.modifiable
|
||||
|| #strings.equals(dailyRecord.workStatus, T(app.module.front.usecase.daily.record.adapters.web.model.DailyTargetStatus).TODAY_NONE) ? 'ico-add-disabled' : 'ico-add'}"></i>
|
||||
th:disabled="${btnDisabled}">
|
||||
<i class="ico-small" aria-hidden="true" th:classappend="${btnIcoClass}"></i>
|
||||
<span class="btn-txt">추가 등록</span>
|
||||
</button>
|
||||
<div class="component-input align-center">
|
||||
@@ -55,7 +54,8 @@
|
||||
<section class="regist-item-area">
|
||||
<p class="total">
|
||||
<span>총 <strong>[[${#lists.size(workList)}]]</strong>건</span>
|
||||
<button type="button" class="btn-reset" onclick="krip.daily.resetConfirm()">
|
||||
<button type="button" class="btn-reset" onclick="krip.daily.resetConfirm()"
|
||||
th:if="${not btnDisabled}">
|
||||
<i class="ico-reset ico-small" aria-hidden="true"></i>
|
||||
<span>초기화</span>
|
||||
</button>
|
||||
@@ -65,7 +65,8 @@
|
||||
th:each="item, itemStatus : ${workList}">
|
||||
<div class="item-tit-group">
|
||||
<p class="item-name">[[${item.itemName}]]</p>
|
||||
<div class="btn-group">
|
||||
<div class="btn-group"
|
||||
th:if="${not btnDisabled}">
|
||||
<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>
|
||||
|
||||
Reference in New Issue
Block a user