repositories
/
e-mobility-charging-stations-simulator.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
refactor: cleanup null checks and helpers
[e-mobility-charging-stations-simulator.git]
/
ui
/
web
/
src
/
components
/
charging-stations
/
CSData.vue
diff --git
a/ui/web/src/components/charging-stations/CSData.vue
b/ui/web/src/components/charging-stations/CSData.vue
index 23c413e969a044af817300d3e7f197d06dbda407..ab9c8208a453d820dab67318bd68415c8bc52de2 100644
(file)
--- a/
ui/web/src/components/charging-stations/CSData.vue
+++ b/
ui/web/src/components/charging-stations/CSData.vue
@@
-20,12
+20,8
@@
<script setup lang="ts">
// import { reactive } from 'vue';
import CSConnector from './CSConnector.vue';
<script setup lang="ts">
// import { reactive } from 'vue';
import CSConnector from './CSConnector.vue';
-import type {
- ChargingStationData,
- ChargingStationInfo,
- ConnectorStatus,
-} from '@/types/ChargingStationType';
-import Utils from '@/composables/Utils';
+import type { ChargingStationData, ChargingStationInfo, ConnectorStatus } from '@/types';
+import { ifUndefined } from '@/composables/Utils';
const props = defineProps<{
chargingStation: ChargingStationData;
const props = defineProps<{
chargingStation: ChargingStationData;
@@
-63,7
+59,7
@@
function getHashId(): string {
return getInfo().hashId;
}
function getId(): string {
return getInfo().hashId;
}
function getId(): string {
- return
Utils.
ifUndefined<string>(getInfo().chargingStationId, 'Ø');
+ return ifUndefined<string>(getInfo().chargingStationId, 'Ø');
}
function getModel(): string {
return getInfo().chargePointModel;
}
function getModel(): string {
return getInfo().chargePointModel;
@@
-72,7
+68,7
@@
function getVendor(): string {
return getInfo().chargePointVendor;
}
function getFirmwareVersion(): string {
return getInfo().chargePointVendor;
}
function getFirmwareVersion(): string {
- return
Utils.
ifUndefined<string>(getInfo().firmwareVersion, 'Ø');
+ return ifUndefined<string>(getInfo().firmwareVersion, 'Ø');
}
function getStarted(): string {
return props.chargingStation.started === true ? 'Yes' : 'No';
}
function getStarted(): string {
return props.chargingStation.started === true ? 'Yes' : 'No';