diff --git a/loko/assets/static/assets/inspection_map.js b/loko/assets/static/assets/inspection_map.js index 4dbcdc6..e9dfb3a 100644 --- a/loko/assets/static/assets/inspection_map.js +++ b/loko/assets/static/assets/inspection_map.js @@ -1268,7 +1268,7 @@ document.getElementById('map-insp-summary').textContent = insp.details_summary || 'Aucun constat spécifique.'; const notesEl = document.getElementById('map-insp-notes'); if (notesEl) { - if (insp.notes) { + if (insp.notes && !insp.is_giep) { notesEl.textContent = insp.notes; notesEl.classList.remove('d-none'); } else { @@ -1422,6 +1422,23 @@ window.currentGiepLocationId = props.location_id || (props.is_location ? objId : null) || objId; } + const isGiep = (modelName === 'naturerwiz' || isZoneRwiz); + const quickNotesSection = document.getElementById('quickInspNotesSection'); + const quickResultSection = document.getElementById('quickInspResultSection'); + const quickPhotosSection = document.getElementById('quickInspPhotosSection'); + if (quickNotesSection) { + if (isGiep) quickNotesSection.classList.add('d-none'); + else quickNotesSection.classList.remove('d-none'); + } + if (quickResultSection) { + if (isGiep) quickResultSection.classList.add('d-none'); + else quickResultSection.classList.remove('d-none'); + } + if (quickPhotosSection) { + if (isGiep) quickPhotosSection.classList.add('d-none'); + else quickPhotosSection.classList.remove('d-none'); + } + document.getElementById('insp_target_type').textContent = props.element_type || props.asset_type_display || props.model_name || 'Asset'; document.getElementById('insp_target_code').textContent = props.code || props.target_display || (objId ? ('#' + objId) : '-'); document.getElementById('insp_target_name').textContent = props.name || props.name_fr || props.target_display || '-'; diff --git a/loko/assets/templates/assets/components/inspection_form_modal.html b/loko/assets/templates/assets/components/inspection_form_modal.html index 45e92f8..1c4b64f 100644 --- a/loko/assets/templates/assets/components/inspection_form_modal.html +++ b/loko/assets/templates/assets/components/inspection_form_modal.html @@ -37,7 +37,7 @@
-