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__stopped-col">{{ getStopped() }}</td>
12 <td class="cs-table__registration-status-col">{{ getRegistrationStatus() }}</td>
13 <td class="cs-table__vendor-col">{{ getVendor() }}</td>
14 <td class="cs-table__model-col">{{ getModel() }}</td>
15 <td class="cs-table__firmware-col">{{ getFirmwareVersion() }}</td>
19 <script setup lang="ts">
20 import CSConnector from './CSConnector.vue';
22 // import { reactive } from 'vue';
23 import Utils from '@/composables/Utils';
28 } from '@/types/ChargingStationType';
30 const props = defineProps<{
31 chargingStation: ChargingStationData;
36 // isTagModalVisible: boolean;
40 // const state: State = reactive({
41 // isTagModalVisible: false,
45 function getHashId(): string {
46 return props.chargingStation.hashId;
48 function getConnectors(): ConnectorStatus[] {
49 return props.chargingStation.connectors?.slice(1);
51 function getInfo(): ChargingStationInfo {
52 return props.chargingStation.stationInfo;
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 getStopped(): string {
67 return props.chargingStation.stopped === true ? 'Yes' : 'No';
69 function getRegistrationStatus(): string {
70 return props.chargingStation?.bootNotificationResponse?.status ?? 'Ø';
72 // function showTagModal(): void {
73 // state.isTagModalVisible = true;
75 // function hideTagModal(): void {
76 // state.isTagModalVisible = false;