Skip to content

Commit

Permalink
Updated create inspection params and removed zoom level labels (#590)
Browse files Browse the repository at this point in the history
Co-authored-by: souyahia-monk <[email protected]>
  • Loading branch information
souyahia-monk and souyahia-monk authored Oct 10, 2023
1 parent cf053a6 commit ccac0d4
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ const validErrorCodes = [
'WRONG_CENTER_PART',
'MISSING_PARTS',
'HIDDEN_PARTS',
'TOO_ZOOMED',
'NOT_ZOOMED_ENOUGH',
// 'TOO_ZOOMED',
// 'NOT_ZOOMED_ENOUGH',
];

export default function useSubtitle({
Expand Down
14 changes: 7 additions & 7 deletions packages/camera/src/components/UploadCenter/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@ export default function UploadCenter({
const displayRetakeAll = useMemo(
() => Object.values(uploads.state).some((u) => !!u.error) || Object.values(compliance.state)
.some((c) => ['rejected', 'unsatisfied'].includes(c.status)
|| c?.result?.data?.compliances?.image_quality_assessment?.is_compliant === false
|| c?.result?.data?.compliances?.zoom_level?.is_compliant === false),
|| c?.result?.data?.compliances?.image_quality_assessment?.is_compliant === false),
// || c?.result?.data?.compliances?.zoom_level?.is_compliant === false),
[compliance, uploads],
);

Expand All @@ -141,11 +141,11 @@ export default function UploadCenter({
reasons: value?.result?.data?.compliances?.image_quality_assessment?.reasons,
status: value?.result?.data?.compliances?.image_quality_assessment?.status,
},
zoom_level: {
isCompliant: value?.result?.data?.compliances?.zoom_level?.is_compliant,
reasons: value?.result?.data?.compliances?.zoom_level?.reasons,
status: value?.result?.data?.compliances?.zoom_level?.status,
},
// zoom_level: {
// isCompliant: value?.result?.data?.compliances?.zoom_level?.is_compliant,
// reasons: value?.result?.data?.compliances?.zoom_level?.reasons,
// status: value?.result?.data?.compliances?.zoom_level?.status,
// },
},
})),
}), [ids, compliance.state]);
Expand Down
17 changes: 10 additions & 7 deletions src/screens/InspectionCreate/useCreateInspection/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,15 @@ export default function useCreateInspection(vehicle) {
},
damageDetection: {
...taskOptions,
generate_subimages_parts: {},
generate_subimages_damages: {},
damage_score_threshold: 0.3,
generate_visual_output: {
generate_parts: true,
generate_damages: true
generate_subimages_parts: {
generate_tight: false,
},
// generate_subimages_damages: {},
damage_score_threshold: 0.3,
// generate_visual_output: {
// generate_parts: true,
// generate_damages: true,
// },
},
};

Expand All @@ -33,7 +35,8 @@ export default function useCreateInspection(vehicle) {
vehicle,
damage_severity: { output_format: 'toyota' },
additionalData: {
damage_detection_version: "v2",
damage_detection_version: 'v2',
use_dynamic_crops: true,
},
});
}, []);
Expand Down

0 comments on commit ccac0d4

Please sign in to comment.