Commit | Line | Data |
---|---|---|
32de5a57 LM |
1 | <template> |
2 | <table id="cs-table"> | |
64bfc77a JB |
3 | <caption> |
4 | Charging stations | |
5 | </caption> | |
32de5a57 LM |
6 | <thead id="cs-table__head"> |
7 | <tr class="cs-table__row"> | |
8 | <th scope="col" class="cs-table__action-col">Action</th> | |
9 | <th scope="col" class="cs-table__connector-col">Connector</th> | |
10 | <th scope="col" class="cs-table__status-col">Status</th> | |
5a010bf0 | 11 | <th scope="col" class="cs-table__transaction-col">Transaction</th> |
32de5a57 | 12 | <th scope="col" class="cs-table__name-col">Name</th> |
452a82ca | 13 | <th scope="col" class="cs-table__started-col">Started</th> |
5e3cb728 | 14 | <th scope="col" class="cs-table__wsState-col">WebSocket State</th> |
333c3566 | 15 | <th scope="col" class="cs-table__registration-status-col">Registration Status</th> |
32de5a57 | 16 | <th scope="col" class="cs-table__vendor-col">Vendor</th> |
5a010bf0 | 17 | <th scope="col" class="cs-table__model-col">Model</th> |
32de5a57 LM |
18 | <th scope="col" class="cs-table__firmware-col">Firmware Version</th> |
19 | </tr> | |
20 | </thead> | |
21 | <tbody id="cs-table__body"> | |
22 | <CSData | |
02cde3b7 | 23 | v-for="chargingStation in props.chargingStations" |
513c1626 | 24 | :key="chargingStation.stationInfo?.hashId" |
32de5a57 | 25 | :charging-station="chargingStation" |
01ff4231 | 26 | :id-tag="props.idTag" |
32de5a57 LM |
27 | /> |
28 | </tbody> | |
29 | </table> | |
30 | </template> | |
31 | ||
32 | <script setup lang="ts"> | |
33 | import CSData from './CSData.vue'; | |
f27eb751 | 34 | import type { ChargingStationData } from '@/types/ChargingStationType'; |
32de5a57 LM |
35 | |
36 | const props = defineProps<{ | |
5e3cb728 | 37 | chargingStations: ChargingStationData[]; |
5a010bf0 | 38 | idTag: string; |
32de5a57 LM |
39 | }>(); |
40 | </script> | |
41 | ||
42 | <style> | |
43 | #cs-table { | |
32de5a57 LM |
44 | height: 100%; |
45 | width: 100%; | |
60c59a02 | 46 | background-color: white; |
32de5a57 | 47 | display: flex; |
5a010bf0 | 48 | flex-grow: 1; |
32de5a57 LM |
49 | flex-direction: column; |
50 | overflow: auto hidden; | |
51 | border-collapse: collapse; | |
52 | empty-cells: show; | |
53 | } | |
54 | ||
55 | #cs-table__head, | |
56 | #cs-table__body { | |
aeb31e77 | 57 | height: fit-content; |
32de5a57 | 58 | width: 100%; |
aeb31e77 | 59 | min-width: 100%; |
fc040c43 | 60 | display: block; |
32de5a57 | 61 | } |
60c59a02 | 62 | |
32de5a57 | 63 | #cs-table__body { |
32de5a57 LM |
64 | overflow: visible overlay; |
65 | flex-grow: 1; | |
66 | } | |
67 | ||
68 | .cs-table__row { | |
32de5a57 | 69 | width: 100%; |
32de5a57 | 70 | display: flex; |
8fc2e5cc JB |
71 | justify-content: center; |
72 | align-items: center; | |
32de5a57 | 73 | } |
60c59a02 | 74 | |
32de5a57 LM |
75 | #cs-table__head .cs-table__row { |
76 | background-color: rgb(194, 188, 188); | |
77 | } | |
60c59a02 | 78 | |
32de5a57 LM |
79 | .cs-table__row:nth-of-type(even) { |
80 | background-color: rgb(223, 217, 217); | |
81 | } | |
82 | ||
83 | .cs-table__action-col, | |
84 | .cs-table__connector-col, | |
85 | .cs-table__status-col, | |
5a010bf0 | 86 | .cs-table__transaction-col, |
32de5a57 | 87 | .cs-table__name-col, |
452a82ca | 88 | .cs-table__started-col, |
5e3cb728 | 89 | .cs-table__wsState-col, |
333c3566 | 90 | .cs-table__registration-status-col, |
32de5a57 LM |
91 | .cs-table__model-col, |
92 | .cs-table__vendor-col, | |
93 | .cs-table__firmware-col { | |
5a010bf0 JB |
94 | height: 0.1%; |
95 | width: 20%; | |
96 | padding-top: 0.2%; | |
97 | padding-bottom: 0.2%; | |
32de5a57 | 98 | text-align: center; |
32de5a57 LM |
99 | } |
100 | </style> |