From 58bb4cd964ef0922dee3df0fbaed1616650ec2d6 Mon Sep 17 00:00:00 2001 From: David Ly Date: Wed, 17 Jul 2024 16:16:49 +0200 Subject: [PATCH] Fixed image with upload error status are displayed on top of the gallery --- .../InspectionGallery/hooks/useInspectionGalleryItems.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/common-ui-web/src/components/InspectionGallery/hooks/useInspectionGalleryItems.ts b/packages/common-ui-web/src/components/InspectionGallery/hooks/useInspectionGalleryItems.ts index 25c648b25..576b3c14c 100644 --- a/packages/common-ui-web/src/components/InspectionGallery/hooks/useInspectionGalleryItems.ts +++ b/packages/common-ui-web/src/components/InspectionGallery/hooks/useInspectionGalleryItems.ts @@ -23,7 +23,9 @@ function needsToBeRetaken(item: InspectionGalleryItem): boolean { return ( !item.isAddDamage && item.isTaken && - [ImageStatus.UPLOAD_FAILED, ImageStatus.NOT_COMPLIANT].includes(item.image.status) + [ImageStatus.UPLOAD_FAILED, ImageStatus.NOT_COMPLIANT, ImageStatus.UPLOAD_ERROR].includes( + item.image.status, + ) ); }