Merge branch 'kangsun' into 'dev'

[FO] 마이페이지 수정사항 반영

See merge request korea-research/korea-research!57
This commit is contained in:
이강선 매니저/ST
2025-06-27 01:58:55 +00:00
8 changed files with 52 additions and 42 deletions

View File

@@ -145,6 +145,7 @@
(response) => {
console.log("임가방문정보 상세 응답값 : ", response);
setVisitFormData(response);
document.querySelector(".modal-visit-info").ui.open();
},
function (code, rstData) {
console.log("error : ", code);
@@ -152,9 +153,9 @@
'get',
'json'
);
} else {
document.querySelector(".modal-visit-info").ui.open();
}
document.querySelector(".modal-visit-info").ui.open();
}
// 임가방문정보 상세 값 set

View File

@@ -222,9 +222,6 @@
etUI.dialog.confirm({
title: '삭제 안내',
message: '선택하신 내용을 삭제하시겠습니까?<br>삭제한 항목은 복구할 수 없습니다.',
negativeCallback: function () {
},
positiveCallback: function () {
goDeleteForestProduct(checkedIds);
},
@@ -234,7 +231,6 @@
// 임산물현황 삭제
const goDeleteForestProduct = (checkedIds) => {
const f = document.reqForm;
console.log("f.monthlyInputStatusId.value", f.monthlyInputStatusId.value);
ajaxUtil._ajaxMethod(
'/api/household/forestProducts/delete',

View File

@@ -10,7 +10,7 @@
<h3></h3>
<div class="component-btns bottom-btn-group">
<div class="btns-row align-right">
<button type="button" class="btn small btn-secondary" onclick="goDeleteVisitInfo();">
<button type="button" class="btn small btn-secondary" onclick="showDeleteVisitInfoConfirm();">
<span class=" btn-txt">삭제</span>
</button>
<button type="button" class="btn small btn-primary" onclick="showVisitInfoModal();">
@@ -94,38 +94,47 @@
);
}
// 임가방문정보 삭제
const goDeleteVisitInfo = () => {
// 임가방문정보 삭제 confirm
const showDeleteVisitInfoConfirm = () => {
const checkedIds = Array.from(
document.querySelectorAll('input[name="visitRemoveIds"]:checked')
).map(el => Number(el.value));
if(checkedIds.length <= 0) {
alert("임가방문정보를 선택해주세요.");
return
return;
}
if(confirm("선택하신 내용을 삭제하시겠습니까? 삭제한 항목은 복구할 수 없습니다.")) {
const f = document.reqForm;
etUI.dialog.confirm({
title: '삭제 안내',
message: '선택하신 내용을 삭제하시겠습니까?<br>삭제한 항목은 복구할 수 없습니다.',
positiveCallback: function () {
goDeleteVisitInfo(checkedIds);
},
});
}
ajaxUtil._ajaxMethod(
'/api/visitInfo/remove',
JSON.stringify({
householdSeq: f.householdSeq.value,
visitRemoveIds: checkedIds
}),
(response) => { // 성공
alert("방문정보가 삭제되었습니다.");
getVisitInfo();
},
function (code, rstData) {
if(code == 422) alert(rstData.responseText);
},
'delete',
'json',
{ handle422Type: 'alert' }
);
}
// 임가방문정보 삭제
const goDeleteVisitInfo = (checkedIds) => {
const f = document.reqForm;
ajaxUtil._ajaxMethod(
'/api/visitInfo/remove',
JSON.stringify({
householdSeq: f.householdSeq.value,
visitRemoveIds: checkedIds
}),
() => { // 성공
alert("방문정보가 삭제되었습니다.");
getVisitInfo();
},
function (code, rstData) {
if(code == 422) alert(rstData.responseText);
},
'delete',
'json',
{ handle422Type: 'alert' }
);
}
</script>
</div>