-
-
+
+
+
+
+
+ {count?.toString()}/{totalCapacity}
+
+
+ {/* progress ui */}
+
+
+ {[...Array(5)].map((_, i) => {
+ const percentage = (count ?? 0 / totalCapacity) * 100;
+ const start = i * 20;
+ const end = (i + 1) * 20;
+ // fill amount: 0 to 100
+ let fillPercent = 0;
+ if (percentage >= end) {
+ fillPercent = 100;
+ } else if (percentage <= start) {
+ fillPercent = 1;
+ } else {
+ fillPercent = ((percentage - start) / 20) * 100;
+ }
+ return (
+
+ );
+ })}
+
+
+ {Math.round((count ?? 0 / totalCapacity) * 100).toString()}%
+
-
{count?.toString()}
)}
diff --git a/app/src/modules/simulation/ui3d/StorageContentUi.tsx b/app/src/modules/simulation/ui3d/StorageContentUi.tsx
index dbda5b3..38f62dc 100644
--- a/app/src/modules/simulation/ui3d/StorageContentUi.tsx
+++ b/app/src/modules/simulation/ui3d/StorageContentUi.tsx
@@ -30,6 +30,8 @@ const StorageContentUi: React.FC
= ({ storageUnit }) => {
name={storageUnit.modelName}
status={storageUnit.state}
count={storageUnit.currentLoad}
+ enableStatue={false}
+ totalCapacity={storageUnit.point.action.storageCapacity}
/>