From: Jérôme Benoit Date: Tue, 30 Aug 2022 19:04:32 +0000 (+0200) Subject: Web UI: Fix NPE at template loading X-Git-Tag: v1.1.69~8 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=513c162683b320ecbab0b2a6c74d9cf14c6b508e;p=e-mobility-charging-stations-simulator.git Web UI: Fix NPE at template loading Signed-off-by: Jérôme Benoit --- diff --git a/src/ui/web/.gitignore b/src/ui/web/.gitignore index 403adbc1..9141c8ee 100644 --- a/src/ui/web/.gitignore +++ b/src/ui/web/.gitignore @@ -15,7 +15,8 @@ pnpm-debug.log* # Editor directories and files .idea -.vscode +.vscode/* +!.vscode/launch.json *.suo *.ntvs* *.njsproj diff --git a/src/ui/web/.vscode/launch.json b/src/ui/web/.vscode/launch.json new file mode 100644 index 00000000..de60ec86 --- /dev/null +++ b/src/ui/web/.vscode/launch.json @@ -0,0 +1,18 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "type": "chrome", + "request": "launch", + "name": "vuejs: chrome", + "url": "http://localhost:8081", + "webRoot": "${workspaceFolder}/src", + "sourceMapPathOverrides": { + "webpack:///src/*": "${webRoot}/*" + } + } + ] +} diff --git a/src/ui/web/src/components/charging-stations/CSInfoModal.vue b/src/ui/web/src/components/charging-stations/CSInfoModal.vue index f9481b58..aa9bcd5d 100644 --- a/src/ui/web/src/components/charging-stations/CSInfoModal.vue +++ b/src/ui/web/src/components/charging-stations/CSInfoModal.vue @@ -1,6 +1,6 @@ @@ -9,8 +9,8 @@ import Modal from '@/components/Modal.vue'; import type { ChargingStationInfo } from '@/types/ChargingStationType'; const props = defineProps<{ + stationInfo: ChargingStationInfo; isVisible: boolean; - info: ChargingStationInfo; }>(); diff --git a/src/ui/web/src/components/charging-stations/CSTable.vue b/src/ui/web/src/components/charging-stations/CSTable.vue index ccd7db14..97298b1a 100644 --- a/src/ui/web/src/components/charging-stations/CSTable.vue +++ b/src/ui/web/src/components/charging-stations/CSTable.vue @@ -17,7 +17,7 @@ diff --git a/src/ui/web/tests/unit/CSTable.spec.ts b/src/ui/web/tests/unit/CSTable.spec.ts index b6084d9c..b77fab86 100644 --- a/src/ui/web/tests/unit/CSTable.spec.ts +++ b/src/ui/web/tests/unit/CSTable.spec.ts @@ -6,11 +6,7 @@ import type { ChargingStationData } from '@/types/ChargingStationType'; describe('CSTable.vue', () => { it('renders CS table columns name', () => { const chargingStations: Record = { - '0': { - stationInfo: { - hashId: '0', - }, - } as unknown as ChargingStationData, + '0': {} as unknown as ChargingStationData, }; const wrapper = shallowMount(CSTable, { props: { chargingStations, idTag: '0' }, diff --git a/src/ui/web/vue.config.js b/src/ui/web/vue.config.js index 34f64656..779217b8 100644 --- a/src/ui/web/vue.config.js +++ b/src/ui/web/vue.config.js @@ -2,4 +2,7 @@ const { defineConfig } = require('@vue/cli-service'); module.exports = defineConfig({ transpileDependencies: true, lintOnSave: false, + configureWebpack: { + devtool: 'source-map', + }, });