const $toast = useToast()
-function stopTransaction(): void {
+const stopTransaction = (): void => {
uiClient
.stopTransaction(props.hashId, props.connector.transactionId)
.then(() => {
console.error('Error at stopping transaction:', error)
})
}
-function startAutomaticTransactionGenerator(): void {
+const startAutomaticTransactionGenerator = (): void => {
uiClient
.startAutomaticTransactionGenerator(props.hashId, props.connectorId)
.then(() => {
console.error('Error at starting automatic transaction generator:', error)
})
}
-function stopAutomaticTransactionGenerator(): void {
+const stopAutomaticTransactionGenerator = (): void => {
uiClient
.stopAutomaticTransactionGenerator(props.hashId, props.connectorId)
.then(() => {
chargingStation: ChargingStationData
}>()
-function getConnectors(): ConnectorStatus[] {
+const getConnectors = (): ConnectorStatus[] => {
if (Array.isArray(props.chargingStation.evses) && props.chargingStation.evses.length > 0) {
const connectorsStatus: ConnectorStatus[] = []
for (const [evseId, evseStatus] of props.chargingStation.evses.entries()) {
}
return props.chargingStation.connectors?.slice(1)
}
-function getATGStatus(connectorId: number): Status | undefined {
+const getATGStatus = (connectorId: number): Status | undefined => {
return props.chargingStation.automaticTransactionGenerator
?.automaticTransactionGeneratorStatuses?.[connectorId - 1]
}
-function getSupervisionUrl(): string {
+const getSupervisionUrl = (): string => {
const supervisionUrl = new URL(props.chargingStation.supervisionUrl)
return `${supervisionUrl.protocol}//${supervisionUrl.host.split('.').join('.\u200b')}`
}
-function getWsState(): string {
+const getWsState = (): string => {
switch (props.chargingStation?.wsState) {
case WebSocket.CONNECTING:
return 'Connecting'
const $toast = useToast()
-function startChargingStation(): void {
+const startChargingStation = (): void => {
uiClient
.startChargingStation(props.chargingStation.stationInfo.hashId)
.then(() => {
console.error('Error at starting charging station', error)
})
}
-function stopChargingStation(): void {
+const stopChargingStation = (): void => {
uiClient
.stopChargingStation(props.chargingStation.stationInfo.hashId)
.then(() => {
console.error('Error at stopping charging station', error)
})
}
-function openConnection(): void {
+const openConnection = (): void => {
uiClient
.openConnection(props.chargingStation.stationInfo.hashId)
.then(() => {
console.error('Error at opening connection', error)
})
}
-function closeConnection(): void {
+const closeConnection = (): void => {
uiClient
.closeConnection(props.chargingStation.stationInfo.hashId)
.then(() => {
console.error('Error at closing connection', error)
})
}
-function deleteChargingStation(): void {
+const deleteChargingStation = (): void => {
uiClient
.deleteChargingStation(props.chargingStation.stationInfo.hashId)
.then(() => {
const $toast = useToast()
-function loadChargingStations(reloadCallback?: () => void): void {
+const loadChargingStations = (reloadCallback?: () => void): void => {
if (state.isLoading === false) {
state.isLoading = true
uiClient
}
}
-function startSimulator(): void {
+const startSimulator = (): void => {
uiClient
.startSimulator()
.then(() => {
console.error('Error at starting simulator:', error)
})
}
-function stopSimulator(): void {
+const stopSimulator = (): void => {
uiClient
.stopSimulator()
.then(() => {