</td>
<td class="cs-table__column">{{ getWSState() }}</td>
<td class="cs-table__column">
- {{ chargingStation?.bootNotificationResponse?.status ?? 'Ø' }}
+ {{ chargingStation.bootNotificationResponse?.status ?? 'Ø' }}
</td>
<td class="cs-table__column">
{{ chargingStation.stationInfo.templateName }}
</tr>
</thead>
<tbody id="connectors-table__body">
- <!-- eslint-disable-next-line vue/valid-v-for -->
<CSConnector
v-for="(connector, index) in getConnectorStatuses()"
+ :key="index + 1"
:hash-id="chargingStation.stationInfo.hashId"
:charging-station-id="chargingStation.stationInfo.chargingStationId"
:connector-id="index + 1"
</template>
<script setup lang="ts">
-import { getCurrentInstance } from 'vue'
import { useToast } from 'vue-toast-notification'
-import CSConnector from '@/components/charging-stations/CSConnector.vue'
+
import Button from '@/components/buttons/Button.vue'
-import type { ChargingStationData, ConnectorStatus, Status } from '@/types'
import ToggleButton from '@/components/buttons/ToggleButton.vue'
+import CSConnector from '@/components/charging-stations/CSConnector.vue'
+import { useUIClient } from '@/composables'
+import type { ChargingStationData, ConnectorStatus, Status } from '@/types'
const props = defineProps<{
chargingStation: ChargingStationData
}
}
-const uiClient = getCurrentInstance()?.appContext.config.globalProperties.$uiClient
+const uiClient = useUIClient()
const $toast = useToast()
})
.catch((error: Error) => {
$toast.error('Error at starting charging station')
- console.error('Error at starting charging station', error)
+ console.error('Error at starting charging station:', error)
})
}
const stopChargingStation = (): void => {
})
.catch((error: Error) => {
$toast.error('Error at stopping charging station')
- console.error('Error at stopping charging station', error)
+ console.error('Error at stopping charging station:', error)
})
}
const openConnection = (): void => {
})
.catch((error: Error) => {
$toast.error('Error at opening connection')
- console.error('Error at opening connection', error)
+ console.error('Error at opening connection:', error)
})
}
const closeConnection = (): void => {
})
.catch((error: Error) => {
$toast.error('Error at closing connection')
- console.error('Error at closing connection', error)
+ console.error('Error at closing connection:', error)
})
}
const deleteChargingStation = (): void => {
})
.catch((error: Error) => {
$toast.error('Error at deleting charging station')
- console.error('Error at deleting charging station', error)
+ console.error('Error at deleting charging station:', error)
})
}
</script>
.connectors-table__column {
width: calc(100% / 5);
+ display: flex;
+ flex-direction: column;
text-align: center;
}
</style>