버그 수정 — 완료 조치 편집 시 결과상태 '완료' 미표시 문제

처리이력에서 완료된 조치를 편집할 때 resultStatus 셀렉트에
'done' 옵션이 없어 '계속 진행 중'으로 표시되던 문제 수정.
편집 모드에서 result_status가 'done'이면 셀렉트에 ' 완료' 옵션을
동적으로 추가하고 자동 선택함.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
byun
2026-06-01 16:40:19 +09:00
parent e52e916dc8
commit 012f87d75e

View File

@@ -130,8 +130,8 @@
</div> </div>
<div style="flex:1;min-width:140px;display:flex;align-items:flex-end;"> <div style="flex:1;min-width:140px;display:flex;align-items:flex-end;">
<div style="font-size:11px;color:var(--gray4);padding-bottom:6px;line-height:1.6;"> <div style="font-size:11px;color:var(--gray4);padding-bottom:6px;line-height:1.6;">
<strong>조치 완료 저장</strong>처리 완료로 확정됩니다.<br> <strong>조치 완료 저장</strong>항상 완료로 저장됩니다.<br>
💾 <strong>상태 저장</strong>은 왼쪽 상태로 임시 저장됩니다. 💾 <strong>상태 저장</strong>은 왼쪽 선택 상태로 저장됩니다.
</div> </div>
</div> </div>
</div> </div>
@@ -247,8 +247,14 @@ async function loadEdit() {
if (repair.started_at) document.getElementById('startedAt').value = toLocalDtInput(repair.started_at); if (repair.started_at) document.getElementById('startedAt').value = toLocalDtInput(repair.started_at);
if (repair.completed_at) document.getElementById('completedAt').value = toLocalDtInput(repair.completed_at); if (repair.completed_at) document.getElementById('completedAt').value = toLocalDtInput(repair.completed_at);
const sel = document.getElementById('resultStatus'); const sel = document.getElementById('resultStatus');
if (repair.result_status && sel.querySelector(`option[value="${repair.result_status}"]`)) if (repair.result_status === 'done') {
const opt = document.createElement('option');
opt.value = 'done'; opt.textContent = '✅ 완료';
sel.insertBefore(opt, sel.firstChild);
sel.value = 'done';
} else if (sel.querySelector(`option[value="${repair.result_status}"]`)) {
sel.value = repair.result_status; sel.value = repair.result_status;
}
// 기존 사진 표시 // 기존 사진 표시
renderExistingPhotos(repair); renderExistingPhotos(repair);