Compare commits
4 Commits
v1.3.0
...
feature/86
| Author | SHA1 | Date | |
|---|---|---|---|
| 6f2ca6ccfb | |||
| 9b633672ae | |||
| 9f13cc20a5 | |||
| 3ab9024152 |
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "api",
|
"name": "api",
|
||||||
"version": "1.3.0",
|
"version": "1.3.1",
|
||||||
"description": "",
|
"description": "",
|
||||||
"author": "",
|
"author": "",
|
||||||
"private": true,
|
"private": true,
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "app",
|
"name": "app",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "1.3.0",
|
"version": "1.3.1",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
|
|||||||
@@ -4,8 +4,6 @@ import { useHttpClient } from '../../hooks/httpClient/UseHttpClient';
|
|||||||
import { AxiosInstance, AxiosResponse } from 'axios';
|
import { AxiosInstance, AxiosResponse } from 'axios';
|
||||||
import { useAccessToken } from '../../hooks/accessToken/UseAcessToken';
|
import { useAccessToken } from '../../hooks/accessToken/UseAcessToken';
|
||||||
import { useIsAuthenticated } from '@azure/msal-react';
|
import { useIsAuthenticated } from '@azure/msal-react';
|
||||||
import { Swiper, SwiperSlide } from 'swiper/react';
|
|
||||||
import { Pagination } from 'swiper/modules';
|
|
||||||
import { MapContainer, TileLayer } from 'react-leaflet';
|
import { MapContainer, TileLayer } from 'react-leaflet';
|
||||||
import ReactLeafletKml from 'react-leaflet-kml';
|
import ReactLeafletKml from 'react-leaflet-kml';
|
||||||
import 'swiper/css';
|
import 'swiper/css';
|
||||||
@@ -46,35 +44,20 @@ const LogTrackMaps = ({ rowKey, trackUrls }: LogTrackMapsProps) => {
|
|||||||
}, [trackUrls])
|
}, [trackUrls])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<MapContainer
|
||||||
<Swiper
|
center={[45.14489, -93.21019]}
|
||||||
spaceBetween={30}
|
scrollWheelZoom={false}
|
||||||
pagination={{
|
style={{ height: '500px', width: '100%' }}
|
||||||
clickable: true,
|
zoom={8}
|
||||||
}}
|
>
|
||||||
modules={[Pagination]}
|
<TileLayer
|
||||||
className="mySwiper"
|
attribution='© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
|
||||||
>
|
url="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"
|
||||||
{tracks.length > 0 && tracks.map((track) => {
|
/>
|
||||||
return (
|
{tracks.length > 0 && tracks.map((track) => (
|
||||||
<SwiperSlide>
|
<ReactLeafletKml kml={track} />
|
||||||
<MapContainer
|
))}
|
||||||
center={[45.14489, -93.21019]}
|
</MapContainer>
|
||||||
scrollWheelZoom={false}
|
|
||||||
style={{ height: '500px', width: '100%' }}
|
|
||||||
zoom={8}
|
|
||||||
>
|
|
||||||
<TileLayer
|
|
||||||
attribution='© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
|
|
||||||
url="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"
|
|
||||||
/>
|
|
||||||
<ReactLeafletKml kml={track} />
|
|
||||||
</MapContainer>
|
|
||||||
</SwiperSlide>
|
|
||||||
)
|
|
||||||
})}
|
|
||||||
</Swiper>
|
|
||||||
</>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ const LogTracks = ({ isDrawerOpen, mode, onOpenClose, selectedRowKey }: LogTrack
|
|||||||
const uploadResponse: AxiosResponse = await httpClient.post(`api/logs/log/${selectedRowKey}/track`, formData, formDataConfig);
|
const uploadResponse: AxiosResponse = await httpClient.post(`api/logs/log/${selectedRowKey}/track`, formData, formDataConfig);
|
||||||
const uploadUrl = uploadResponse.data.url;
|
const uploadUrl = uploadResponse.data.url;
|
||||||
const log = await getLog();
|
const log = await getLog();
|
||||||
const tracks: string[] = JSON.parse(log.tracks!);
|
const tracks: string[] = log.tracks ? JSON.parse(log.tracks!) : [];
|
||||||
|
|
||||||
tracks.push(uploadUrl)
|
tracks.push(uploadUrl)
|
||||||
log.tracks = JSON.stringify(tracks);
|
log.tracks = JSON.stringify(tracks);
|
||||||
@@ -171,7 +171,7 @@ const LogTracks = ({ isDrawerOpen, mode, onOpenClose, selectedRowKey }: LogTrack
|
|||||||
onClick={onCancel}
|
onClick={onCancel}
|
||||||
size="small"
|
size="small"
|
||||||
>
|
>
|
||||||
{mode.toString() !== FormMode.VIEW ? 'Cancel' : 'Close'}
|
Close
|
||||||
</Button>
|
</Button>
|
||||||
{mode.toString() !== FormMode.VIEW && (
|
{mode.toString() !== FormMode.VIEW && (
|
||||||
<Button
|
<Button
|
||||||
|
|||||||
Reference in New Issue
Block a user