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 CSConnector from './CSConnector.vue';
23 // import { reactive } from 'vue';
24 import Utils from '@/composables/Utils';
29 } from '@/types/ChargingStationType';
31 const props = defineProps<{
32 chargingStation: ChargingStationData;
37 // isTagModalVisible: boolean;
41 // const state: State = reactive({
42 // isTagModalVisible: false,
46 function getConnectors(): ConnectorStatus[] {
47 return props.chargingStation.connectors?.slice(1);
49 function getInfo(): ChargingStationInfo {
50 return props.chargingStation.stationInfo;
52 function getHashId(): string {
53 return getInfo().hashId;
55 function getId(): string {
56 return Utils.ifUndefined<string>(getInfo().chargingStationId, 'Ø');
58 function getModel(): string {
59 return getInfo().chargePointModel;
61 function getVendor(): string {
62 return getInfo().chargePointVendor;
64 function getFirmwareVersion(): string {
65 return Utils.ifUndefined<string>(getInfo().firmwareVersion, 'Ø');
67 function getStarted(): string {
68 return props.chargingStation.started === true ? 'Yes' : 'No';
70 function getWsState(): string {
71 switch (props.chargingStation?.wsState) {
72 case WebSocket.CONNECTING:
76 case WebSocket.CLOSING:
78 case WebSocket.CLOSED:
84 function getRegistrationStatus(): string {
85 return props.chargingStation?.bootNotificationResponse?.status ?? 'Ø';
87 // function showTagModal(): void {
88 // state.isTagModalVisible = true;
90 // function hideTagModal(): void {
91 // state.isTagModalVisible = false;