+
{steps.map((label, index) => (
}
+ StepIconComponent={(stepProps) => }
>
{label}
diff --git a/frontend/src/components/ShipmentDetails.tsx b/frontend/src/components/ShipmentDetails.tsx
index 7e56119..b68f0c5 100644
--- a/frontend/src/components/ShipmentDetails.tsx
+++ b/frontend/src/components/ShipmentDetails.tsx
@@ -311,7 +311,7 @@ const ShipmentDetails: React.FC = ({
flexDirection: 'row',
justifyContent: 'space-between'
}}>
-
+
diff --git a/frontend/src/components/statusUtils.ts b/frontend/src/components/statusUtils.ts
new file mode 100644
index 0000000..c62308f
--- /dev/null
+++ b/frontend/src/components/statusUtils.ts
@@ -0,0 +1,24 @@
+// statusUtils.ts
+// Utility functions to handle dewar statuses and icon colors
+
+export type DewarStatus = 'In Preparation' | 'Ready for Shipping' | 'Shipped' | 'Not Arrived' | 'Arrived' | 'Returned' | 'Delayed';
+
+export const STATUS_TO_STEP: Record = {
+ 'In Preparation': 0,
+ 'Ready for Shipping': 1,
+ 'Shipped': 1,
+ 'Delayed': 1,
+ 'Not Arrived': 2,
+ 'Arrived': 2,
+ 'Returned': 3
+};
+
+export const getStatusStepIndex = (status: DewarStatus): number => STATUS_TO_STEP[status];
+
+export const determineIconColor = (iconIndex: number, status: DewarStatus): string => {
+ const statusIndex = getStatusStepIndex(status);
+ if (status === 'Delayed' && iconIndex === 1) {
+ return 'orange';
+ }
+ return iconIndex <= statusIndex ? (iconIndex === statusIndex ? (status === 'Shipped' ? 'green' : 'blue') : 'green') : 'grey';
+};
\ No newline at end of file