X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fui%2Fweb%2Fsrc%2Fviews%2FChargingStationsView.vue;h=25ea51d9bc02549c1526725e9f5e92b9fde96e5e;hb=5e3cb7281de2b6fa8b61a453f964c2f213fefa80;hp=9a5a2ce1d95a7bd8e0ddfd6495ad257abf4a5539;hpb=16fe3949f743c57db407cc02a5c017af4da1c7a9;p=e-mobility-charging-stations-simulator.git diff --git a/src/ui/web/src/views/ChargingStationsView.vue b/src/ui/web/src/views/ChargingStationsView.vue index 9a5a2ce1..25ea51d9 100644 --- a/src/ui/web/src/views/ChargingStationsView.vue +++ b/src/ui/web/src/views/ChargingStationsView.vue @@ -22,10 +22,10 @@ import ReloadButton from '@/components/buttons/ReloadButton.vue'; import CSTable from '@/components/charging-stations/CSTable.vue'; import { onMounted, reactive } from 'vue'; -import UIClient from '@/composable/UIClient'; -import { ChargingStationData } from '@/type/ChargingStationType'; +import UIClient from '@/composables/UIClient'; +import type { ChargingStationData } from '@/types/ChargingStationType'; -const UIClientInstance = UIClient.instance; +const UIClientInstance = UIClient.getInstance(); onMounted(() => { UIClientInstance.registerWSonOpenListener(load); @@ -33,21 +33,22 @@ onMounted(() => { type State = { isLoading: boolean; - chargingStations: Record; + chargingStations: ChargingStationData[]; idTag: string; }; const state: State = reactive({ isLoading: false, - chargingStations: {}, + chargingStations: [], idTag: '', }); async function load(): Promise { if (state.isLoading === true) return; state.isLoading = true; - const list = await UIClientInstance.listChargingStations(); - state.chargingStations = list as unknown as Record; + const listChargingStationsPayload = await UIClientInstance.listChargingStations(); + state.chargingStations = + listChargingStationsPayload.chargingStations as unknown as ChargingStationData[]; state.isLoading = false; } @@ -77,10 +78,9 @@ function stopSimulator(): void { #reload-button { flex: auto; - padding: 6px 14px; + padding: 5px 15px; background-color: rgb(25, 118, 210); border-radius: 5px; - color: white; font-size: 35px; font-weight: bold;