2 <tr v-for="(connector, index) in getConnectors()" class="cs-table__row">
6 :connector-id="index + 1"
7 :transaction-id="connector.transactionId"
10 <td class="cs-table__name-col">{{ getId() }}</td>
11 <td class="cs-table__started-col">{{ getStarted() }}</td>
12 <td class="cs-table__wsState-col">{{ getWsState() }}</td>
13 <td class="cs-table__registration-status-col">{{ getRegistrationStatus() }}</td>
14 <td class="cs-table__vendor-col">{{ getVendor() }}</td>
15 <td class="cs-table__model-col">{{ getModel() }}</td>
16 <td class="cs-table__firmware-col">{{ getFirmwareVersion() }}</td>
20 <script setup lang="ts">
21 // import { reactive } from 'vue';
22 import CSConnector from './CSConnector.vue';
27 } from '@/types/ChargingStationType';
28 import Utils from '@/composables/Utils';
30 const props = defineProps<{
31 chargingStation: ChargingStationData;
36 // isTagModalVisible: boolean;
40 // const state: State = reactive({
41 // isTagModalVisible: false,
45 function getConnectors(): ConnectorStatus[] {
46 return props.chargingStation.connectors?.slice(1);
48 function getInfo(): ChargingStationInfo {
49 return props.chargingStation.stationInfo;
51 function getHashId(): string {
52 return getInfo().hashId;
54 function getId(): string {
55 return Utils.ifUndefined<string>(getInfo().chargingStationId, 'Ø');
57 function getModel(): string {
58 return getInfo().chargePointModel;
60 function getVendor(): string {
61 return getInfo().chargePointVendor;
63 function getFirmwareVersion(): string {
64 return Utils.ifUndefined<string>(getInfo().firmwareVersion, 'Ø');
66 function getStarted(): string {
67 return props.chargingStation.started === true ? 'Yes' : 'No';
69 function getWsState(): string {
70 switch (props.chargingStation?.wsState) {
71 case WebSocket.CONNECTING:
75 case WebSocket.CLOSING:
77 case WebSocket.CLOSED:
83 function getRegistrationStatus(): string {
84 return props.chargingStation?.bootNotificationResponse?.status ?? 'Ø';
86 // function showTagModal(): void {
87 // state.isTagModalVisible = true;
89 // function hideTagModal(): void {
90 // state.isTagModalVisible = false;