source: sources/client/src/components/admin/ParkingZoneInfoViewer/ZoneSector/index.js@ bc20307

Last change on this file since bc20307 was bc20307, checked in by Tasevski2 <39170279+Tasevski2@…>, 2 years ago

Push before video

  • Property mode set to 100644
File size: 3.5 KB
Line 
1import {
2 Wrapper,
3 Title,
4 DividerUnderTitle,
5 Characteristics,
6 KeyValueWrapper,
7 Key,
8 Value,
9 ColorCircleWrapper,
10 ColorCircle,
11 ZoneCenterLocation,
12 SmallTitle,
13 LatLngCenter,
14 LabelAndLatLngWrapper,
15 LatLngLabel,
16 LatLngValue,
17 ZoneCornersLocation,
18 TableWrapper,
19} from './styles';
20
21const ZoneSector = ({
22 name = '',
23 hourlyRate = 0,
24 from = 0,
25 to = 0,
26 color = '',
27 centerLocation = null,
28 coords = [],
29}) => {
30 return (
31 <Wrapper>
32 <Title>Паркинг Зона</Title>
33 <DividerUnderTitle />
34 <Characteristics>
35 <KeyValueWrapper>
36 <Key>Назив:</Key>
37 <Value>{name ?? ''}</Value>
38 </KeyValueWrapper>
39 <KeyValueWrapper>
40 <Key>Цена од Час:</Key>
41 <Value>{hourlyRate ?? 0} ден.</Value>
42 </KeyValueWrapper>
43 <KeyValueWrapper>
44 <Key>Работни часови:</Key>
45 <Value>
46 {from < 10
47 ? '0' + from
48 : from}{' '}
49 -{' '}
50 {to < 10
51 ? '0' + to
52 : to}
53 </Value>
54 </KeyValueWrapper>
55 <KeyValueWrapper>
56 <Key>Боја на зона:</Key>
57 <ColorCircleWrapper>
58 <ColorCircle $color={color} />
59 </ColorCircleWrapper>
60 </KeyValueWrapper>
61 </Characteristics>
62
63 <ZoneCenterLocation>
64 <SmallTitle>Центар на Зона</SmallTitle>
65 <LatLngCenter>
66 <LabelAndLatLngWrapper>
67 <LatLngLabel htmlFor='lat-value'>Латитуда:</LatLngLabel>
68 <LatLngValue id='lat-value'>
69 {centerLocation?.lat ?? ''}
70 </LatLngValue>
71 </LabelAndLatLngWrapper>
72 <LabelAndLatLngWrapper>
73 <LatLngLabel htmlFor='lng-value'>
74 Лонгитуда:
75 </LatLngLabel>
76 <LatLngValue id='lng-value'>
77 {centerLocation?.lat ?? ''}
78 </LatLngValue>
79 </LabelAndLatLngWrapper>
80 </LatLngCenter>
81 </ZoneCenterLocation>
82
83 <ZoneCornersLocation>
84 <SmallTitle>Темиња на Зона</SmallTitle>
85 <TableWrapper>
86 <table>
87 <thead>
88 <tr>
89 <th>Латитуда</th>
90 <th>Лонгитуда</th>
91 </tr>
92 </thead>
93 <tbody>
94 {coords &&
95 coords.map(({ lat, lng }, index) => (
96 <tr key={index}>
97 <td>{lat}</td>
98 <td>{lng}</td>
99 </tr>
100 ))}
101 </tbody>
102 </table>
103 </TableWrapper>
104 </ZoneCornersLocation>
105 </Wrapper>
106 );
107};
108
109export default ZoneSector;
Note: See TracBrowser for help on using the repository browser.