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