fix(f6.9): include every field photo and preserve document revisions
Android CI / RC / Android · lint, tests, debug APK, release compile (push) Successful in 3m8s
DH V2 CI / WEB · typecheck, build (push) Successful in 19s
DH V2 CI / API · typecheck, tests, build (push) Successful in 32s
Production dependency audit / API · production dependencies (push) Successful in 8s
Production dependency audit / WEB · production dependencies (push) Successful in 9s
DH V2 CI / Docker / scripts contract (push) Successful in 59s

This commit is contained in:
DH V2
2026-09-15 19:18:31 -03:00
parent 669c0d2656
commit 60ba37c287
9 changed files with 169 additions and 18 deletions
@@ -66,11 +66,14 @@ export function InspectionActMediaPanel({ actId }: { actId: string }) {
.finally(() => active && setLoading(false));
return () => { active = false; };
}, [actId]);
const findingAssetIds = new Set(items.map((item) => item.finding.asset.id));
const otherPhotos = assetPhotos.filter((photo) => !findingAssetIds.has(photo.assetId));
return <section className="panel act-media-panel">
<div className="panel-heading"><div><h2>Hallazgos del Acta</h2><p className="section-copy">Cada hallazgo reúne su descripción y las fotos tomadas en campo.</p></div><span className="count-pill">{items.length}</span></div>
{error && <Alert>{error}</Alert>}
{loading ? <LoadingBlock label="Cargando hallazgos y fotografías…" /> : items.length ?
<div className="act-finding-list">{items.map((item) => <Finding key={item.finding.id} item={item} assetPhotos={assetPhotos.filter((photo) => photo.assetId === item.finding.asset.id)} />)}</div> :
<EmptyState title="Sin hallazgos" text="Esta Acta no contiene hallazgos sincronizados." />}
{!loading && otherPhotos.length > 0 && <div className="act-other-asset-photos"><h3>Fotos de otras instalaciones</h3><div className="act-finding-photos">{otherPhotos.map((photo) => <Photo key={photo.id} id={photo.id} title={photo.title || 'Instalación inspeccionada'} caption={`${photo.title || 'Instalación'} · ${formatDate(photo.fieldCapturedAt || photo.capturedAt || photo.createdAt)}`} load={getAssetMediaBlob} />)}</div></div>}
</section>;
}
+3
View File
@@ -1433,3 +1433,6 @@ code { color: #5e6677; font-family: ui-monospace, monospace; font-size: 9px; }
.act-closed-date { font-weight: 700; }
.act-integrity-details { border-top: 1px solid var(--border); padding-top: 10px; }
.act-integrity-details code { overflow-wrap: anywhere; }
.act-other-asset-photos { border-top: 1px solid #e3eaf5; margin-top: 24px; padding-top: 20px; }
.act-other-asset-photos h3 { margin: 0 0 14px; }