X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fui%2Fweb%2Fsrc%2Fviews%2FChargingStationsView.vue;h=bf11e1a450effb6bd886b74fd04f23658578a90b;hb=f27eb751a2eb332306ecb9c5c4f0578d3bf66ee4;hp=10d6e4da87596d64f2d44924ec9f5991398a61fc;hpb=5a010bf00a68ca47e0cb610f70ad3e0c16c5fe5e;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 10d6e4da..bf11e1a4 100644 --- a/src/ui/web/src/views/ChargingStationsView.vue +++ b/src/ui/web/src/views/ChargingStationsView.vue @@ -22,13 +22,13 @@ 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.onOpen(load); + UIClientInstance.registerWSonOpenListener(load); }); type State = { @@ -46,8 +46,8 @@ const state: State = reactive({ 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 chargingStationsList = await UIClientInstance.listChargingStations(); + state.chargingStations = chargingStationsList as unknown as Record; state.isLoading = false; }