From: Jérôme Benoit Date: Wed, 21 Aug 2024 16:36:22 +0000 (+0200) Subject: refactor: display transaction id in UI X-Git-Tag: ocpp-server@v1.5.2~104 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=99fb669336a4182fa6932a1e1b1c0eb2fad834aa;p=e-mobility-charging-stations-simulator.git refactor: display transaction id in UI Signed-off-by: Jérôme Benoit --- diff --git a/ui/web/src/components/charging-stations/CSConnector.vue b/ui/web/src/components/charging-stations/CSConnector.vue index 45548a93..c59e2656 100644 --- a/ui/web/src/components/charging-stations/CSConnector.vue +++ b/ui/web/src/components/charging-stations/CSConnector.vue @@ -7,7 +7,7 @@ {{ connector.status ?? 'Ø' }} - {{ connector.transactionStarted === true ? 'Yes' : 'No' }} + {{ connector.transactionStarted === true ? `Yes (${connector.transactionId})` : 'No' }} {{ atgStatus?.start === true ? 'Yes' : 'No' }} diff --git a/ui/web/src/main.ts b/ui/web/src/main.ts index 1e4bb7ad..c4f23234 100644 --- a/ui/web/src/main.ts +++ b/ui/web/src/main.ts @@ -57,10 +57,12 @@ fetch('/config.json') } response .json() + // eslint-disable-next-line promise/no-nesting .then(config => { initializeApp(app, config as ConfigurationData) return undefined }) + // eslint-disable-next-line promise/no-nesting .catch((error: unknown) => { // TODO: add code for UI notifications or other error handling logic console.error('Error at deserializing JSON app configuration:', error)