]> Piment Noir Git Repositories - e-mobility-charging-stations-simulator.git/commit
refactor(ui): move generic utilities to ui-common and add useFetchData composable
authorJérôme Benoit <jerome.benoit@sap.com>
Fri, 17 Apr 2026 00:53:23 +0000 (02:53 +0200)
committerJérôme Benoit <jerome.benoit@sap.com>
Fri, 17 Apr 2026 00:53:23 +0000 (02:53 +0200)
commit93cacfb376c7856e85eb8607db8cd3edb8e160f2
tree6f2563ae593a236a4c036608d53df77cf0e71843
parent647c8080f940c6a0d0b71f186ad04aeef3961933
refactor(ui): move generic utilities to ui-common and add useFetchData composable

- Move convertToBoolean(), convertToInt() to ui-common/src/utils/converters.ts
- Move getWebSocketStateName() to ui-common/src/utils/websocket.ts using
  portable WebSocketReadyState enum instead of browser WebSocket constants
- Add useFetchData() composable to deduplicate fetch-with-loading-guard
  pattern in ChargingStationsView (3 instances collapsed)
- All consumers import directly from ui-common, no re-exports
ui/common/src/index.ts
ui/common/src/utils/converters.ts [new file with mode: 0644]
ui/common/src/utils/websocket.ts [new file with mode: 0644]
ui/web/src/components/actions/AddChargingStations.vue
ui/web/src/components/actions/StartTransaction.vue
ui/web/src/components/charging-stations/CSData.vue
ui/web/src/composables/Utils.ts
ui/web/src/composables/index.ts
ui/web/src/views/ChargingStationsView.vue
ui/web/tests/unit/Utils.test.ts