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
@@ -64,10 +64,10 @@ export async function buildInspectionActPdf(snapshot: Record<string, unknown>, i
const body = (value: unknown) => { need(22); doc.font('body').fillColor('#202939').fontSize(10.5).text(text(value, '-'), { lineGap: 3 }); doc.moveDown(0.4); };
const label = (name: string, value: unknown) => { if (!text(value)) return; need(22); doc.font('body-bold').fillColor('#202939').fontSize(10).text(`${name}: `, { continued: true }); doc.font('body').text(text(value)); doc.moveDown(0.35); };
const image = (entry: ActPdfImage, caption: string) => {
need(290);
need(235);
const y = doc.y;
doc.image(entry.buffer, 58, y, { fit: [470, 245] });
doc.y = y + 250;
doc.image(entry.buffer, 58, y, { fit: [470, 190] });
doc.y = y + 195;
doc.font('body').fontSize(8).fillColor('#47536A').text(`${caption} · SHA-256 ${entry.sha256}`, 58, doc.y, { width: 475 });
doc.moveDown(0.5);
};
@@ -108,7 +108,11 @@ export async function buildInspectionActPdf(snapshot: Record<string, unknown>, i
}
doc.moveDown(0.4);
}
if (!findings.length) for (const photo of images.filter((item) => item.assetId)) image(photo, `Fotografía de inventario ${text(photo.title)}`);
const otherAssetPhotos = images.filter((item) => item.assetId && !shownAssetPhotos.has(item.id));
if (otherAssetPhotos.length) {
heading('Otras instalaciones inspeccionadas');
for (const photo of otherAssetPhotos) image(photo, `Fotografía de inventario ${text(photo.title)}${photo.capturedAt ? ` · ${date(photo.capturedAt)}` : ''}`);
}
heading('Intervinientes y firmas');
for (const signature of signatures) {
const name = text(signature.signerName);