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(() => {
|
||||
currentReady = true;
|
||||
});
|
||||
checkCustomerHasImages(InstallWait.customer?.uid);
|
||||
checkCustomerHasImages(InstallWait.customer?.uid, InstallWait.iw_uid);
|
||||
});
|
||||
|
||||
// 2) 기존 PICKUP / INSTALL 로드
|
||||
|
|
|
|||
|
|
@ -741,7 +741,7 @@ function popup(){
|
|||
|
||||
<!-- 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="simpleInstallPhotoList" class="d-flex flex-wrap gap-2 mt-2"></div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -914,8 +914,8 @@ function fillRequestBySelect(selectedValue = 'Customer') {
|
|||
}
|
||||
|
||||
// 이미지 여부 체크
|
||||
function checkCustomerHasImages(customerUid) {
|
||||
if (!customerUid) return;
|
||||
function checkCustomerHasImages(customerUid, iwUid) {
|
||||
if (!customerUid || !iwUid) return;
|
||||
|
||||
const btn = document.getElementById('btnViewPhotos');
|
||||
if (!btn) return;
|
||||
|
|
@ -932,9 +932,28 @@ function checkCustomerHasImages(customerUid) {
|
|||
const temp = document.createElement('div');
|
||||
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) {
|
||||
btn.classList.remove('d-none');
|
||||
|
|
|
|||
|
|
@ -68,7 +68,8 @@ while ($row = mysqli_fetch_assoc($rlt)) {
|
|||
'note' => $row['i_note'] ?? '',
|
||||
'created' => $row['i_createddate'] ?? '',
|
||||
'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