v1.2.14
- [MAP] Container 교체 요청 이미 있으면 강조. - [INSTALL WAIT LIST] 이미지 연결 강화.
This commit is contained in:
parent
0833b3e460
commit
151fd6b66d
|
|
@ -474,7 +474,7 @@ function getWaitCategoryColor($cat) {
|
||||||
loadCurrentContainersIfNeeded(() => {
|
loadCurrentContainersIfNeeded(() => {
|
||||||
currentReady = true;
|
currentReady = true;
|
||||||
});
|
});
|
||||||
checkCustomerHasImages(InstallWait.customer?.uid);
|
checkCustomerHasImages(InstallWait.customer?.uid, InstallWait.iw_uid);
|
||||||
});
|
});
|
||||||
|
|
||||||
// 2) 기존 PICKUP / INSTALL 로드
|
// 2) 기존 PICKUP / INSTALL 로드
|
||||||
|
|
|
||||||
|
|
@ -741,7 +741,7 @@ function popup(){
|
||||||
|
|
||||||
<!-- BODY -->
|
<!-- BODY -->
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<div id="simpleInstallMeta" class="mb-2 small text-muted" style="display:none;">
|
<div id="simpleInstallMeta" class="alert alert-warning py-2 px-3 mb-3" style="display:none;">
|
||||||
<div id="simpleInstallPhotoWrap" class="mb-3" style="display:none;">
|
<div id="simpleInstallPhotoWrap" class="mb-3" style="display:none;">
|
||||||
<div id="simpleInstallPhotoList" class="d-flex flex-wrap gap-2 mt-2"></div>
|
<div id="simpleInstallPhotoList" class="d-flex flex-wrap gap-2 mt-2"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -914,8 +914,8 @@ function fillRequestBySelect(selectedValue = 'Customer') {
|
||||||
}
|
}
|
||||||
|
|
||||||
// 이미지 여부 체크
|
// 이미지 여부 체크
|
||||||
function checkCustomerHasImages(customerUid) {
|
function checkCustomerHasImages(customerUid, iwUid) {
|
||||||
if (!customerUid) return;
|
if (!customerUid || !iwUid) return;
|
||||||
|
|
||||||
const btn = document.getElementById('btnViewPhotos');
|
const btn = document.getElementById('btnViewPhotos');
|
||||||
if (!btn) return;
|
if (!btn) return;
|
||||||
|
|
@ -932,9 +932,28 @@ function checkCustomerHasImages(customerUid) {
|
||||||
const temp = document.createElement('div');
|
const temp = document.createElement('div');
|
||||||
temp.innerHTML = html;
|
temp.innerHTML = html;
|
||||||
|
|
||||||
const hasImage = temp.querySelector('img') !== null;
|
const slider = temp.querySelector('#customerImageSlider');
|
||||||
|
|
||||||
console.log('hasImage:', hasImage);
|
if (!slider) {
|
||||||
|
btn.classList.add('d-none');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
let meta = [];
|
||||||
|
|
||||||
|
try {
|
||||||
|
meta = JSON.parse(slider.dataset.meta || '[]');
|
||||||
|
} catch (e) {
|
||||||
|
console.error('image meta parse error:', e);
|
||||||
|
btn.classList.add('d-none');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const hasImage = meta.some(m => {
|
||||||
|
return parseInt(m.sourceuid || 0, 10) === parseInt(iwUid || 0, 10);
|
||||||
|
});
|
||||||
|
|
||||||
|
console.log('hasImage:', hasImage, 'iwUid:', iwUid, 'meta:', meta);
|
||||||
|
|
||||||
if (hasImage) {
|
if (hasImage) {
|
||||||
btn.classList.remove('d-none');
|
btn.classList.remove('d-none');
|
||||||
|
|
|
||||||
|
|
@ -68,7 +68,8 @@ while ($row = mysqli_fetch_assoc($rlt)) {
|
||||||
'note' => $row['i_note'] ?? '',
|
'note' => $row['i_note'] ?? '',
|
||||||
'created' => $row['i_createddate'] ?? '',
|
'created' => $row['i_createddate'] ?? '',
|
||||||
'by' => trim(($row['m_firstname'] ?? '').' '.($row['m_lastname'] ?? '')),
|
'by' => trim(($row['m_firstname'] ?? '').' '.($row['m_lastname'] ?? '')),
|
||||||
'type' => $row['i_type'] ?? ''
|
'type' => $row['i_type'] ?? '',
|
||||||
|
'sourceuid' => intval($row['i_sourceuid'] ?? 0)
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue