@inspectorhub/field-ui 0.6.1 → 0.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +4 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -69719,7 +69719,7 @@ function usePhotoBatchUpload(inspectionId, doc) {
|
|
|
69719
69719
|
|
|
69720
69720
|
// src/hooks/attachPhotoBatch.ts
|
|
69721
69721
|
function attachPhotoBatch(findings, d) {
|
|
69722
|
-
if (!d.
|
|
69722
|
+
if (!d.itemId) return;
|
|
69723
69723
|
for (const k of d.keys) {
|
|
69724
69724
|
if (d.targetType === "defect" && d.customId) {
|
|
69725
69725
|
findings.addPhotoToDefect(d.itemId, { kind: d.defectKind, id: d.customId }, k);
|
|
@@ -69728,10 +69728,10 @@ function attachPhotoBatch(findings, d) {
|
|
|
69728
69728
|
}
|
|
69729
69729
|
}
|
|
69730
69730
|
if (d.targetType === "defect" && d.customId) return;
|
|
69731
|
-
|
|
69732
|
-
d.
|
|
69733
|
-
d.results.flatMap((r) => r.ok && r.key ? [{ key: r.key }] : r.kept === true && d.pendingIds[r.index] ? [{ pendingId: d.pendingIds[r.index] }] : [])
|
|
69731
|
+
const selection = d.results.flatMap(
|
|
69732
|
+
(r) => r.ok && r.key ? [{ key: r.key }] : r.kept === true && d.pendingIds[r.index] ? [{ pendingId: d.pendingIds[r.index] }] : []
|
|
69734
69733
|
);
|
|
69734
|
+
if (selection.length > 0) findings.orderPhotoBatch(d.itemId, selection);
|
|
69735
69735
|
}
|
|
69736
69736
|
|
|
69737
69737
|
// src/hooks/useReportCoverWrites.ts
|