From: Jérôme Benoit Date: Sat, 17 Feb 2024 21:41:38 +0000 (+0100) Subject: feat(ui): add right action bar and use it to start transaction X-Git-Tag: v1.2.37~22 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=c317ae3edbd335e6dc52616df7d702c0d8419fd4;p=e-mobility-charging-stations-simulator.git feat(ui): add right action bar and use it to start transaction Signed-off-by: Jérôme Benoit --- diff --git a/ui/web/src/App.vue b/ui/web/src/App.vue index b3fc6d1c..1f2dcf85 100644 --- a/ui/web/src/App.vue +++ b/ui/web/src/App.vue @@ -1,7 +1,14 @@ + + diff --git a/ui/web/src/components/charging-stations/CSConnector.vue b/ui/web/src/components/charging-stations/CSConnector.vue index 81d24fac..c9e53696 100644 --- a/ui/web/src/components/charging-stations/CSConnector.vue +++ b/ui/web/src/components/charging-stations/CSConnector.vue @@ -9,7 +9,15 @@ {{ atgStatus?.start === true ? 'Yes' : 'No' }} - + @@ -24,20 +32,16 @@ import type { ConnectorStatus, Status } from '@/types' const props = defineProps<{ hashId: string + chargingStationId: string connectorId: number connector: ConnectorStatus atgStatus?: Status - transactionId?: number - idTag?: string }>() const uiClient = getCurrentInstance()?.appContext.config.globalProperties.$uiClient -function startTransaction(): void { - uiClient.startTransaction(props.hashId, props.connectorId, props.idTag) -} function stopTransaction(): void { - uiClient.stopTransaction(props.hashId, props.transactionId) + uiClient.stopTransaction(props.hashId, props.connector.transactionId) } function startAutomaticTransactionGenerator(): void { uiClient.startAutomaticTransactionGenerator(props.hashId, props.connectorId) diff --git a/ui/web/src/components/charging-stations/CSData.vue b/ui/web/src/components/charging-stations/CSData.vue index 5eaa17b0..107df494 100644 --- a/ui/web/src/components/charging-stations/CSData.vue +++ b/ui/web/src/components/charging-stations/CSData.vue @@ -1,7 +1,7 @@ @@ -32,8 +22,7 @@ import ReloadButton from '@/components/buttons/ReloadButton.vue' import Button from '@/components/buttons/Button.vue' const state = reactive({ - isLoading: false, - idTag: '' + isLoading: false }) const app = getCurrentInstance() @@ -50,6 +39,7 @@ function loadChargingStations(): void { } }) .catch((error: Error) => { + // TODO: add code for UI notifications or other error handling logic console.error('Error at fetching charging stations:', error) }) .finally(() => { @@ -79,11 +69,6 @@ function stopSimulator(): void { flex-direction: row; } -#inputs-container { - display: flex; - flex-direction: row; -} - #reload-button { flex: auto; color: white; @@ -105,10 +90,4 @@ function stopSimulator(): void { #simulator-button { flex: auto; } - -#idtag-field { - flex: auto; - font-size: 1.5rem; - text-align: center; -}