Web UI: fix NPE on connectors
authorJérôme Benoit <jerome.benoit@sap.com>
Sun, 28 Aug 2022 15:25:49 +0000 (17:25 +0200)
committerJérôme Benoit <jerome.benoit@sap.com>
Sun, 28 Aug 2022 15:25:49 +0000 (17:25 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
src/ui/web/src/components/charging-stations/CSData.vue
src/ui/web/src/components/charging-stations/CSTable.vue
src/ui/web/src/views/ChargingStationsView.vue

index 3de9a7d6ebe4d0d41ac43e031aedcbd8d83aee98..ea8fd1da86569ad5870dabce006ec0c7dfbf49eb 100644 (file)
@@ -46,7 +46,7 @@ function getHashId(): string {
   return props.chargingStation.hashId;
 }
 function getConnectors(): ConnectorStatus[] {
-  return props.chargingStation.connectors.slice(1);
+  return props.chargingStation.connectors?.slice(1);
 }
 function getInfo(): ChargingStationInfo {
   return props.chargingStation.stationInfo;
index c76d9e4d1eda6d9fc190eee8cd00f47c4fa42bd0..04f38aa16901733c69522f1c4cae30f1b1a307c5 100644 (file)
@@ -50,8 +50,9 @@ const props = defineProps<{
 
 #cs-table__head,
 #cs-table__body {
+  height: fit-content;
   width: 100%;
-  min-width: 930px;
+  min-width: 100%;
   display: block;
 }
 
index 42e698e57933376c553cc98adb8f2d5f904ff6e1..5476ac4b678a2a057c9cea5716ddd354cb578002 100644 (file)
@@ -77,7 +77,7 @@ function stopSimulator(): void {
 
 #reload-button {
   flex: auto;
-  padding: 6px 14px;
+  padding: 5px 15px;
   background-color: rgb(25, 118, 210);
   border-radius: 5px;
   color: white;