Compare commits

...

9 Commits

Author SHA1 Message Date
toqvist 15700ae304 Update types 2024-04-04 14:28:24 +02:00
toqvist 174a163cd3 Restructure types for retailer-centric flow 2024-04-04 12:45:26 +02:00
toqvist 2ebb81a981 Basic map works 2024-04-03 19:39:05 +02:00
toqvist 225d45307a Fix queries 2024-04-03 19:11:33 +02:00
toqvist cb26b8edcd QueryClient setup 2024-04-03 16:23:28 +02:00
toqvist 4a95f6e2d1 Start kios map vanilla -> react conversion 2024-04-03 15:31:56 +02:00
toqvist d8438e2d84 Add sample form 2024-04-03 14:23:08 +02:00
toqvist 95243557c6 Update react/ts version 2024-04-03 14:22:56 +02:00
toqvist 4be030ec28 Import payload config 2024-04-03 12:18:03 +02:00
30 changed files with 3816 additions and 2177 deletions

View File

@ -0,0 +1 @@
PAYLOAD_URL=http://localhost:3001

View File

@ -11,22 +11,27 @@
"dependencies": {
"@astrojs/image": "0.18.0",
"@astrojs/prefetch": "0.4.1",
"@astrojs/react": "^3.1.0",
"@astrojs/react": "^3.1.1",
"@astrojs/sitemap": "3.1.2",
"@astrojs/tailwind": "5.1.0",
"@hookform/resolvers": "^3.3.4",
"@radix-ui/react-label": "^2.0.2",
"@radix-ui/react-slot": "^1.0.2",
"@types/react": "^18.0.21",
"@types/react-dom": "^18.0.6",
"@tanstack/react-query": "^5.28.14",
"@types/leaflet": "^1.9.8",
"@types/react": "^18.2.74",
"@types/react-dom": "^18.2.23",
"astro": "^4.5.13",
"axios": "^1.6.8",
"class-variance-authority": "^0.7.0",
"clsx": "^2.1.0",
"css-select": "5.1.0",
"leaflet": "^1.9.4",
"lucide-react": "^0.364.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-hook-form": "^7.51.2",
"react-leaflet": "^4.2.1",
"sharp": "^0.32.6",
"slate-serializers": "0.4.1",
"tailwind-merge": "^2.2.2",

View File

@ -22,46 +22,46 @@ export function AddRetailerForm() {
message: "Username must be at least 2 characters.",
}),
})
const form = useForm<z.infer<typeof formSchema>>({
resolver: zodResolver(formSchema),
defaultValues: {
username: "",
},
})
function onSubmit(values: z.infer<typeof formSchema>) {
// Do something with the form values.
// ✅ This will be type-safe and validated according to z schema.
console.log(values)
}
return (
<div className="flex justify-center">
<div>
<Form {...form}>
<form onSubmit={form.handleSubmit(onSubmit)} className="space-y-8">
<FormField
control={form.control}
name="username"
render={({ field }) => (
<FormItem>
<FormLabel>Username</FormLabel>
<FormControl>
<Input placeholder="shadcn" {...field} />
</FormControl>
<FormDescription>
This is your public display name.
</FormDescription>
<FormMessage />
</FormItem>
)}
/>
<Button variant={"default"} type="submit">Submit</Button>
</form>
</Form>
</div>
<div>
<Form {...form}>
<form onSubmit={form.handleSubmit(onSubmit)} className="space-y-8">
<FormField
control={form.control}
name="username"
render={({ field }) => (
<FormItem>
<FormLabel>Username</FormLabel>
<FormControl>
<Input placeholder="" {...field} />
</FormControl>
<FormDescription>
This is your public display name.
</FormDescription>
<FormMessage />
</FormItem>
)}
/>
<Button variant={"default"} type="submit">Submit</Button>
</form>
</Form>
</div>
</div>
)
}

View File

@ -0,0 +1,26 @@
import { useQuery, useMutation, useQueryClient, queryOptions, QueryClient, QueryClientProvider } from "@tanstack/react-query";
import type { ReactNode } from "react";
import { KiosMap } from "@/components/KiosMap"
export const queryClient = new QueryClient({
defaultOptions: {
queries: {
staleTime: 30000,
},
},
});
interface AppProps {
children?: ReactNode;
}
export const App: React.FC<AppProps> = (props) => {
return (
<div className="app">
<QueryClientProvider client={queryClient}>
{props.children}
<KiosMap/>
</QueryClientProvider>
</div>
);
}

View File

@ -0,0 +1,248 @@
import React, { useEffect } from 'react';
import { MapContainer, TileLayer, Marker, CircleMarker, Popup, Polyline, LayerGroup, GeoJSON, } from 'react-leaflet';
import 'leaflet/dist/leaflet.css';
import L, { LatLngBounds } from 'leaflet';
import { useQuery, useMutation, useQueryClient, queryOptions } from "@tanstack/react-query";
import axios from "axios";
//Todo: Move types to own file
type User = {
name: string;
id: string;
email: string;
phoneNumber: string;
}
type Product = {
id: string;
title: string;
weight?: number;
picture: string;
createdAt: string;
updatedAt: string;
};
// type Location = {
// latitude: number;
// longitude: number;
// }
type Maker = {
id: string;
name: string;
email: string;
phoneNumber?: string;
location: [number, number];
stock: Product[];
createdAt: string;
updatedAt: string;
};
type Retailer = {
id: string;
name: string;
email: string;
phoneNumber?: string;
location: [number, number];
stock: Product[];
createdAt: string;
updatedAt: string;
};
const DISPATCH_STATUS = ['requested', 'accepted', 'archived'] as const;
type DispatchStatus = typeof DISPATCH_STATUS[number];
type Dispatch = {
id: string;
dispatchesCode?: string; //Human readable id
createdAt: string;
updatedAt: string;
maker?: Maker;
retailer?: Retailer;
products: Product[];
courier?: User;
timeSensitive: boolean;
status: DispatchStatus[];
departureDate: string;
arrivalDate: string;
weightAllowance: number;
}
//Todo: update fetch url endpoints
//Todo: Move queryclient and hooks to own file
//Todo: Move axios stuff
const API_URL = "http://localhost:3001"
const headers = {
"Content-Type": "application/json",
}
const getMakers = async () => {
const url = `${API_URL}/api/makers`
console.log("Fetching url:", url)
const response = await axios.get(url);
const makers: Maker[] = response.data.docs;
console.log(`Fetch result from ${url}`, makers)
return makers;
}
const useGetMakers = () => {
return useQuery<Maker[]>({
queryFn: () => getMakers(),
queryKey: ['makers'],
enabled: true
})
}
const getRetailers = async () => {
const url = `${API_URL}/api/retailers`
console.log("Fetching url:", url)
const response = await axios.get(url);
const retailers:Retailer[] = response.data.docs;
console.log(`Fetch result from ${url}`, retailers)
return retailers;
}
const useGetRetailers = () => {
return useQuery<Retailer[]>({
queryFn: () => getRetailers(),
queryKey: ['retailers'],
enabled: true
})
}
const getDispatches = async () => {
const url = `${API_URL}/api/dispatches`
console.log("Fetching url:", url)
const response = await axios.get(url);
const dispatches:Dispatch[] = response.data.docs;
console.log(`Fetch result from ${url}`, dispatches)
return dispatches;
}
const useGetDispatches = () => {
return useQuery<Dispatch[]>({
queryFn: () => getDispatches(),
queryKey: ['retailers'],
enabled: true
})
}
export const KiosMap = () => {
const { data: makers, isLoading: isLoadingMakers } = useGetMakers();
const { data: retailers, isLoading: isLoadingRetailers } = useGetRetailers();
const { data: dispatches, isLoading: isLoadingDispatches } = useGetDispatches();
const blackDotIcon = L.divIcon({
className: 'bg-gray-950 rounded-full',
iconSize: [20, 20],
iconAnchor: [10, 10]
});
const bounds = new LatLngBounds(
[-90, -180], // Southwest corner
[90, 180] // Northeast corner
);
return (
<div className='w-full flex justify-center align-middle'>
<MapContainer
id="map"
center={[-6.1815, 106.8228]}
zoom={3}
maxBounds={bounds} // Restrict panning beyond these bounds
maxBoundsViscosity={0.9} // How strongly to snap the map's bounds to the restricted area
style={{ height: '800px', width: '100%' }}
>
<TileLayer url="https://tile.openstreetmap.org/{z}/{x}/{y}.png"
maxZoom={19}
attribution='&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'
/>
{makers &&
<LayerGroup>
{makers.map((maker: any, index: number) => (
<Marker
key={index}
position={[maker.location[0], maker.location[1]]}
icon={blackDotIcon}
>
<Popup>{maker.name}</Popup>
</Marker>
))}
</LayerGroup>
}
{retailers &&
<LayerGroup>
{retailers.map((retailer: any, index: number) => (
<Marker
key={index}
position={[retailer.location[0], retailer.location[1]]}
icon={blackDotIcon}
>
<Popup>{retailer.name}</Popup>
</Marker>
))}
</LayerGroup>
}
{dispatches &&
<LayerGroup>
{dispatches.map((dispatch: any, index: number) => {
const start = dispatch.maker.location;
const end = dispatch.retailer.location;
let productsString = '';
dispatch.products.forEach((product: any, i: number) => {
productsString += product.productTitle + (i + 1 < dispatch.products.length ? ', ' : '');
});
const myDashArray =
dispatch.status === 'requested' ? '20, 10' :
dispatch.status === 'archived' ? '1, 5' :
'0, 0';
return (
<div key={index}>
<Marker position={[start[0], start[1]]}
icon={blackDotIcon}
>
<Popup>{dispatch.startingPoint.name}</Popup>
</Marker>
<Marker position={[end[0], end[1]]}
icon={blackDotIcon}
>
<Popup>{dispatch.endPoint.name}</Popup>
</Marker>
<Polyline
positions={[[start[0], start[1]], [end[0], end[1]]]}
color="#000"
dashArray={myDashArray} />
</div>
);
})}
</LayerGroup>
}
</MapContainer >
</div>
);
};

11
astro/src/pages/Map.astro Normal file
View File

@ -0,0 +1,11 @@
---
import BaseLayout from "@/layouts/BaseLayout.astro";
import { App } from "@/components/App"
---
<BaseLayout title="Kios">
<App
client:only
>
</App>
</BaseLayout>

View File

@ -58,4 +58,9 @@
body {
@apply text-foreground;
}
}
.black-dot {
background-color: black;
border-radius: 50%;
}

View File

@ -11,6 +11,11 @@ export interface Config {
posts: Post;
users: User;
media: Media;
couriers: Courier;
dispatches: Dispatch;
makers: Maker;
products: Product;
retailers: Retailer;
};
globals: {};
}
@ -28,7 +33,8 @@ export interface Post {
}
export interface User {
id: string;
name?: string;
name: string;
phoneNumber?: number;
updatedAt: string;
createdAt: string;
email: string;
@ -52,3 +58,50 @@ export interface Media {
width?: number;
height?: number;
}
export interface Courier {
id: string;
updatedAt: string;
createdAt: string;
}
export interface Dispatch {
id: string;
products: string[] | Product[];
courier?: string | Courier;
maker?: string | Maker;
retailer?: string | Retailer;
status: ('requested' | 'accepted' | 'archived')[];
updatedAt: string;
createdAt: string;
}
export interface Product {
id: string;
title: string;
picture: string | Media;
weight?: number;
updatedAt: string;
createdAt: string;
}
export interface Maker {
id: string;
name: string;
/**
* @minItems 2
* @maxItems 2
*/
location: [number, number];
stock?: string[] | Product[];
updatedAt: string;
createdAt: string;
}
export interface Retailer {
id: string;
name: string;
/**
* @minItems 2
* @maxItems 2
*/
location: [number, number];
stock?: string[] | Product[];
updatedAt: string;
createdAt: string;
}

0
astro/src/utils/hooks.ts Normal file
View File

View File

@ -3,7 +3,7 @@ module.exports = {
darkMode: ["class"],
content: [
'./src/**/*.{astro,html,js,jsx,md,mdx,svelte,ts,tsx,vue}',
'./styles/**/*.{css}',
'./styles/**/*.css',
'./pages/**/*.{ts,tsx}',
'./components/**/*.{ts,tsx}',
'./app/**/*.{ts,tsx}',

View File

@ -85,10 +85,10 @@
dependencies:
prismjs "^1.29.0"
"@astrojs/react@^3.1.0":
version "3.1.0"
resolved "https://registry.yarnpkg.com/@astrojs/react/-/react-3.1.0.tgz#8a1742ad840a1f3b485ac64786cd6e296495dc93"
integrity sha512-KZhZyV+sUDZEjlrmPWNiPGeYowG9uq6/aMbCgVaeKEBlWT4Kg32TNwBOhZk6AcE4LY1l3mIwt3orUGE2JV96/g==
"@astrojs/react@^3.1.1":
version "3.1.1"
resolved "https://registry.yarnpkg.com/@astrojs/react/-/react-3.1.1.tgz#bfe0d5f47e7b17f1467718b288c3f851dc547599"
integrity sha512-Uc4zY8UxkZrSKmiFGPyy+0uUKGgVETJSra5c/65Z2ZckJEHtgLYW0ZqGUoItGr0wJFMv+h1g3Z4OJGapGgcUyA==
dependencies:
"@vitejs/plugin-react" "^4.2.0"
ultrahtml "^1.3.0"
@ -690,85 +690,102 @@
"@babel/runtime" "^7.13.10"
"@radix-ui/react-compose-refs" "1.0.1"
"@rollup/rollup-android-arm-eabi@4.13.2":
version "4.13.2"
resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.13.2.tgz#fbf098f49d96a8cac9056f22f5fd80906ef3af85"
integrity sha512-3XFIDKWMFZrMnao1mJhnOT1h2g0169Os848NhhmGweEcfJ4rCi+3yMCOLG4zA61rbJdkcrM/DjVZm9Hg5p5w7g==
"@react-leaflet/core@^2.1.0":
version "2.1.0"
resolved "https://registry.yarnpkg.com/@react-leaflet/core/-/core-2.1.0.tgz#383acd31259d7c9ae8fb1b02d5e18fe613c2a13d"
integrity sha512-Qk7Pfu8BSarKGqILj4x7bCSZ1pjuAPZ+qmRwH5S7mDS91VSbVVsJSrW4qA+GPrro8t69gFYVMWb1Zc4yFmPiVg==
"@rollup/rollup-android-arm64@4.13.2":
version "4.13.2"
resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.13.2.tgz#0d2448251040fce19a98eee505dff5b3c8ec9b98"
integrity sha512-GdxxXbAuM7Y/YQM9/TwwP+L0omeE/lJAR1J+olu36c3LqqZEBdsIWeQ91KBe6nxwOnb06Xh7JS2U5ooWU5/LgQ==
"@rollup/rollup-android-arm-eabi@4.14.0":
version "4.14.0"
resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.14.0.tgz#57936f50d0335e2e7bfac496d209606fa516add4"
integrity sha512-jwXtxYbRt1V+CdQSy6Z+uZti7JF5irRKF8hlKfEnF/xJpcNGuuiZMBvuoYM+x9sr9iWGnzrlM0+9hvQ1kgkf1w==
"@rollup/rollup-darwin-arm64@4.13.2":
version "4.13.2"
resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.13.2.tgz#78db4d4da5b1b84c22adbe25c8a4961b3f22d3af"
integrity sha512-mCMlpzlBgOTdaFs83I4XRr8wNPveJiJX1RLfv4hggyIVhfB5mJfN4P8Z6yKh+oE4Luz+qq1P3kVdWrCKcMYrrA==
"@rollup/rollup-android-arm64@4.14.0":
version "4.14.0"
resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.14.0.tgz#81bba83b37382a2d0e30ceced06c8d3d85138054"
integrity sha512-fI9nduZhCccjzlsA/OuAwtFGWocxA4gqXGTLvOyiF8d+8o0fZUeSztixkYjcGq1fGZY3Tkq4yRvHPFxU+jdZ9Q==
"@rollup/rollup-darwin-x64@4.13.2":
version "4.13.2"
resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.13.2.tgz#fcc05af54379f8ee5c7e954987d4514c6fd0fb42"
integrity sha512-yUoEvnH0FBef/NbB1u6d3HNGyruAKnN74LrPAfDQL3O32e3k3OSfLrPgSJmgb3PJrBZWfPyt6m4ZhAFa2nZp2A==
"@rollup/rollup-darwin-arm64@4.14.0":
version "4.14.0"
resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.14.0.tgz#a371bd723a5c4c4a33376da72abfc3938066842b"
integrity sha512-BcnSPRM76/cD2gQC+rQNGBN6GStBs2pl/FpweW8JYuz5J/IEa0Fr4AtrPv766DB/6b2MZ/AfSIOSGw3nEIP8SA==
"@rollup/rollup-linux-arm-gnueabihf@4.13.2":
version "4.13.2"
resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.13.2.tgz#2ce200efa1ef4a56ee2af7b453edc74a259d7d31"
integrity sha512-GYbLs5ErswU/Xs7aGXqzc3RrdEjKdmoCrgzhJWyFL0r5fL3qd1NPcDKDowDnmcoSiGJeU68/Vy+OMUluRxPiLQ==
"@rollup/rollup-darwin-x64@4.14.0":
version "4.14.0"
resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.14.0.tgz#8baf2fda277c9729125017c65651296282412886"
integrity sha512-LDyFB9GRolGN7XI6955aFeI3wCdCUszFWumWU0deHA8VpR3nWRrjG6GtGjBrQxQKFevnUTHKCfPR4IvrW3kCgQ==
"@rollup/rollup-linux-arm64-gnu@4.13.2":
version "4.13.2"
resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.13.2.tgz#5a24aac882bff9abfda3f45f6f1db2166c342a4a"
integrity sha512-L1+D8/wqGnKQIlh4Zre9i4R4b4noxzH5DDciyahX4oOz62CphY7WDWqJoQ66zNR4oScLNOqQJfNSIAe/6TPUmQ==
"@rollup/rollup-linux-arm-gnueabihf@4.14.0":
version "4.14.0"
resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.14.0.tgz#822830a8f7388d5b81d04c69415408d3bab1079b"
integrity sha512-ygrGVhQP47mRh0AAD0zl6QqCbNsf0eTo+vgwkY6LunBcg0f2Jv365GXlDUECIyoXp1kKwL5WW6rsO429DBY/bA==
"@rollup/rollup-linux-arm64-musl@4.13.2":
version "4.13.2"
resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.13.2.tgz#f1fb4c6f961d3f3397231a99e621d199200e4ea9"
integrity sha512-tK5eoKFkXdz6vjfkSTCupUzCo40xueTOiOO6PeEIadlNBkadH1wNOH8ILCPIl8by/Gmb5AGAeQOFeLev7iZDOA==
"@rollup/rollup-linux-arm64-gnu@4.14.0":
version "4.14.0"
resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.14.0.tgz#e20fbe1bd4414c7119f9e0bba8ad17a6666c8365"
integrity sha512-x+uJ6MAYRlHGe9wi4HQjxpaKHPM3d3JjqqCkeC5gpnnI6OWovLdXTpfa8trjxPLnWKyBsSi5kne+146GAxFt4A==
"@rollup/rollup-linux-powerpc64le-gnu@4.13.2":
version "4.13.2"
resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.13.2.tgz#46b2463d94ac3af3e0f7a2947b695397bc13b755"
integrity sha512-zvXvAUGGEYi6tYhcDmb9wlOckVbuD+7z3mzInCSTACJ4DQrdSLPNUeDIcAQW39M3q6PDquqLWu7pnO39uSMRzQ==
"@rollup/rollup-linux-arm64-musl@4.14.0":
version "4.14.0"
resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.14.0.tgz#13f475596a62e1924f13fe1c8cf2c40e09a99b47"
integrity sha512-nrRw8ZTQKg6+Lttwqo6a2VxR9tOroa2m91XbdQ2sUUzHoedXlsyvY1fN4xWdqz8PKmf4orDwejxXHjh7YBGUCA==
"@rollup/rollup-linux-riscv64-gnu@4.13.2":
version "4.13.2"
resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.13.2.tgz#47b932ee59a5395a3a341b0493e361d9e6032cf2"
integrity sha512-C3GSKvMtdudHCN5HdmAMSRYR2kkhgdOfye4w0xzyii7lebVr4riCgmM6lRiSCnJn2w1Xz7ZZzHKuLrjx5620kw==
"@rollup/rollup-linux-powerpc64le-gnu@4.14.0":
version "4.14.0"
resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.14.0.tgz#6a431c441420d1c510a205e08c6673355a0a2ea9"
integrity sha512-xV0d5jDb4aFu84XKr+lcUJ9y3qpIWhttO3Qev97z8DKLXR62LC3cXT/bMZXrjLF9X+P5oSmJTzAhqwUbY96PnA==
"@rollup/rollup-linux-s390x-gnu@4.13.2":
version "4.13.2"
resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.13.2.tgz#8e14a1b3c3b9a4440c70a9c1ba12d32aa21f9712"
integrity sha512-l4U0KDFwzD36j7HdfJ5/TveEQ1fUTjFFQP5qIt9gBqBgu1G8/kCaq5Ok05kd5TG9F8Lltf3MoYsUMw3rNlJ0Yg==
"@rollup/rollup-linux-riscv64-gnu@4.14.0":
version "4.14.0"
resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.14.0.tgz#53d9448962c3f9ed7a1672269655476ea2d67567"
integrity sha512-SDDhBQwZX6LPRoPYjAZWyL27LbcBo7WdBFWJi5PI9RPCzU8ijzkQn7tt8NXiXRiFMJCVpkuMkBf4OxSxVMizAw==
"@rollup/rollup-linux-x64-gnu@4.13.2":
version "4.13.2"
resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.13.2.tgz#270e939194b66df77bcb33dd9a5ddf7784bd7997"
integrity sha512-xXMLUAMzrtsvh3cZ448vbXqlUa7ZL8z0MwHp63K2IIID2+DeP5iWIT6g1SN7hg1VxPzqx0xZdiDM9l4n9LRU1A==
"@rollup/rollup-linux-s390x-gnu@4.14.0":
version "4.14.0"
resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.14.0.tgz#95f0c133b324da3e7e5c7d12855e0eb71d21a946"
integrity sha512-RxB/qez8zIDshNJDufYlTT0ZTVut5eCpAZ3bdXDU9yTxBzui3KhbGjROK2OYTTor7alM7XBhssgoO3CZ0XD3qA==
"@rollup/rollup-linux-x64-musl@4.13.2":
version "4.13.2"
resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.13.2.tgz#e8dd0f3c2046acbda2934490b36552e856a3bc6a"
integrity sha512-M/JYAWickafUijWPai4ehrjzVPKRCyDb1SLuO+ZyPfoXgeCEAlgPkNXewFZx0zcnoIe3ay4UjXIMdXQXOZXWqA==
"@rollup/rollup-linux-x64-gnu@4.14.0":
version "4.14.0"
resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.14.0.tgz#820ada75c68ead1acc486e41238ca0d8f8531478"
integrity sha512-C6y6z2eCNCfhZxT9u+jAM2Fup89ZjiG5pIzZIDycs1IwESviLxwkQcFRGLjnDrP+PT+v5i4YFvlcfAs+LnreXg==
"@rollup/rollup-win32-arm64-msvc@4.13.2":
version "4.13.2"
resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.13.2.tgz#f8b65a4a7e7a6b383e7b14439129b2f474ff123c"
integrity sha512-2YWwoVg9KRkIKaXSh0mz3NmfurpmYoBBTAXA9qt7VXk0Xy12PoOP40EFuau+ajgALbbhi4uTj3tSG3tVseCjuA==
"@rollup/rollup-linux-x64-musl@4.14.0":
version "4.14.0"
resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.14.0.tgz#ca74f22e125efbe94c1148d989ef93329b464443"
integrity sha512-i0QwbHYfnOMYsBEyjxcwGu5SMIi9sImDVjDg087hpzXqhBSosxkE7gyIYFHgfFl4mr7RrXksIBZ4DoLoP4FhJg==
"@rollup/rollup-win32-ia32-msvc@4.13.2":
version "4.13.2"
resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.13.2.tgz#bc1c5a4fbc4337d6cb15da80a4de95fd53ab3573"
integrity sha512-2FSsE9aQ6OWD20E498NYKEQLneShWes0NGMPQwxWOdws35qQXH+FplabOSP5zEe1pVjurSDOGEVCE2agFwSEsw==
"@rollup/rollup-win32-arm64-msvc@4.14.0":
version "4.14.0"
resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.14.0.tgz#269023332297051d037a9593dcba92c10fef726b"
integrity sha512-Fq52EYb0riNHLBTAcL0cun+rRwyZ10S9vKzhGKKgeD+XbwunszSY0rVMco5KbOsTlwovP2rTOkiII/fQ4ih/zQ==
"@rollup/rollup-win32-x64-msvc@4.13.2":
version "4.13.2"
resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.13.2.tgz#851959c4c1c3c6647aba1f388198c8243aed6917"
integrity sha512-7h7J2nokcdPePdKykd8wtc8QqqkqxIrUz7MHj6aNr8waBRU//NLDVnNjQnqQO6fqtjrtCdftpbTuOKAyrAQETQ==
"@rollup/rollup-win32-ia32-msvc@4.14.0":
version "4.14.0"
resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.14.0.tgz#d7701438daf964011fd7ca33e3f13f3ff5129e7b"
integrity sha512-e/PBHxPdJ00O9p5Ui43+vixSgVf4NlLsmV6QneGERJ3lnjIua/kim6PRFe3iDueT1rQcgSkYP8ZBBXa/h4iPvw==
"@shikijs/core@1.2.3":
version "1.2.3"
resolved "https://registry.yarnpkg.com/@shikijs/core/-/core-1.2.3.tgz#551c257b6e1575ef0b87635c515dec134b32f611"
integrity sha512-SM+aiQVaEK2P53dEcsvhq9+LJPr0rzwezHbMQhHaSrPN4OlOB4vp1qTdhVEKfMg6atdq8s9ZotWW/CSCzWftwg==
"@rollup/rollup-win32-x64-msvc@4.14.0":
version "4.14.0"
resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.14.0.tgz#0bb7ac3cd1c3292db1f39afdabfd03ccea3a3d34"
integrity sha512-aGg7iToJjdklmxlUlJh/PaPNa4PmqHfyRMLunbL3eaMO0gp656+q1zOKkpJ/CVe9CryJv6tAN1HDoR8cNGzkag==
"@shikijs/core@1.2.4":
version "1.2.4"
resolved "https://registry.yarnpkg.com/@shikijs/core/-/core-1.2.4.tgz#1b380fad8eaccc6bec4ab1c265d70413e66e8034"
integrity sha512-ClaUWpt8oTzjcF0MM1P81AeWyzc1sNSJlAjMG80CbwqbFqXSNz+NpQVUC0icobt3sZn43Sn27M4pHD/Jmp3zHw==
"@tanstack/query-core@5.28.13":
version "5.28.13"
resolved "https://registry.yarnpkg.com/@tanstack/query-core/-/query-core-5.28.13.tgz#15c187c23b87a393e91d0fd2ea6dfc22b8a85b75"
integrity sha512-C3+CCOcza+mrZ7LglQbjeYEOTEC3LV0VN0eYaIN6GvqAZ8Foegdgch7n6QYPtT4FuLae5ALy+m+ZMEKpD6tMCQ==
"@tanstack/react-query@^5.28.14":
version "5.28.14"
resolved "https://registry.yarnpkg.com/@tanstack/react-query/-/react-query-5.28.14.tgz#9585b6300eb8f167ed374e2748043dc8d6476709"
integrity sha512-cZqt03Igb3I9tM72qNX5TAAmeYl75Z+k4Mv92VkXIXc2hCrv0fIywd7GN3JV1BBJl4mr7Cc+OOKKOPy8sNVOkA==
dependencies:
"@tanstack/query-core" "5.28.13"
"@testing-library/dom@^9.0.0":
version "9.3.4"
@ -843,6 +860,11 @@
resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.5.tgz#a6ce3e556e00fd9895dd872dd172ad0d4bd687f4"
integrity sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==
"@types/geojson@*":
version "7946.0.14"
resolved "https://registry.yarnpkg.com/@types/geojson/-/geojson-7946.0.14.tgz#319b63ad6df705ee2a65a73ef042c8271e696613"
integrity sha512-WCfD5Ht3ZesJUsONdhvm84dmzWOiOzOAqOncN0++w0lBw1o8OuDNJF2McvvCef/yBqb/HYRahp1BYtODFQ8bRg==
"@types/hast@^3.0.0":
version "3.0.4"
resolved "https://registry.yarnpkg.com/@types/hast/-/hast-3.0.4.tgz#1d6b39993b82cea6ad783945b0508c25903e15aa"
@ -850,6 +872,13 @@
dependencies:
"@types/unist" "*"
"@types/leaflet@^1.9.8":
version "1.9.8"
resolved "https://registry.yarnpkg.com/@types/leaflet/-/leaflet-1.9.8.tgz#32162a8eaf305c63267e99470b9603b5883e63e8"
integrity sha512-EXdsL4EhoUtGm2GC2ZYtXn+Fzc6pluVgagvo2VC1RHWToLGlTRwVYoDpqS/7QXa01rmDyBjJk3Catpf60VMkwg==
dependencies:
"@types/geojson" "*"
"@types/mdast@^4.0.0":
version "4.0.3"
resolved "https://registry.yarnpkg.com/@types/mdast/-/mdast-4.0.3.tgz#1e011ff013566e919a4232d1701ad30d70cab333"
@ -870,9 +899,9 @@
"@types/unist" "^2"
"@types/node@*":
version "20.12.2"
resolved "https://registry.yarnpkg.com/@types/node/-/node-20.12.2.tgz#9facdd11102f38b21b4ebedd9d7999663343d72e"
integrity sha512-zQ0NYO87hyN6Xrclcqp7f8ZbXNbRfoGWNcMvHTPQp9UUrwI0mI7XBz+cu7/W6/VClYo2g63B0cjull/srU7LgQ==
version "20.12.3"
resolved "https://registry.yarnpkg.com/@types/node/-/node-20.12.3.tgz#d6658c2c7776c1cad93534bb45428195ed840c65"
integrity sha512-sD+ia2ubTeWrOu+YMF+MTAB7E+O7qsMqAbMfW7DG3K1URwhZ5hN1pLlRVGbf4wDFzSfikL05M17EyorS86jShw==
dependencies:
undici-types "~5.26.4"
@ -886,17 +915,17 @@
resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.7.12.tgz#12bb1e2be27293c1406acb6af1c3f3a1481d98c6"
integrity sha512-5zvhXYtRNRluoE/jAp4GVsSduVUzNWKkOZrCDBWYtE7biZywwdC2AcEzg+cSMLFRfVgeAFqpfNabiPjxFddV1Q==
"@types/react-dom@^18.0.0", "@types/react-dom@^18.0.6":
"@types/react-dom@^18.0.0", "@types/react-dom@^18.2.23":
version "18.2.23"
resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-18.2.23.tgz#112338760f622a16d64271b408355f2f27f6302c"
integrity sha512-ZQ71wgGOTmDYpnav2knkjr3qXdAFu0vsk8Ci5w3pGAIdj7/kKAyn+VsQDhXsmzzzepAiI9leWMmubXz690AI/A==
dependencies:
"@types/react" "*"
"@types/react@*", "@types/react@^18.0.21":
version "18.2.73"
resolved "https://registry.yarnpkg.com/@types/react/-/react-18.2.73.tgz#0579548ad122660d99e00499d22e33b81e73ed94"
integrity sha512-XcGdod0Jjv84HOC7N5ziY3x+qL0AfmubvKOZ9hJjJ2yd5EE+KYjWhdOjt387e9HPheHkdggF9atTifMRtyAaRA==
"@types/react@*", "@types/react@^18.2.74":
version "18.2.74"
resolved "https://registry.yarnpkg.com/@types/react/-/react-18.2.74.tgz#2d52eb80e4e7c4ea8812c89181d6d590b53f958c"
integrity sha512-9AEqNZZyBx8OdZpxzQlaFEVCSFUM2YXJH46yPOiOpm078k6ZLOCcuAzGum/zK8YBwY+dbahVNbHrbgrAwIRlqw==
dependencies:
"@types/prop-types" "*"
csstype "^3.0.2"
@ -1038,9 +1067,9 @@ array-iterate@^2.0.0:
integrity sha512-I1jXZMjAgCMmxT4qxXfPXa6SthSoE8h6gkSI9BGGNv8mP8G/v0blc+qFnZu6K42vTOiuME596QaLO0TP3Lk0xg==
astro@^4.5.13:
version "4.5.13"
resolved "https://registry.yarnpkg.com/astro/-/astro-4.5.13.tgz#7213be3ab0533b7a97ba5fc670a67a08fd50b6e1"
integrity sha512-vbkiPH0J8dp5OlsvQpW3PcuV36U4vGRcdcL/LxXDwmeVjzVo6DH3Fkv+DAU5UDs7ciYodadomOo4+VZKvi8ylw==
version "4.5.14"
resolved "https://registry.yarnpkg.com/astro/-/astro-4.5.14.tgz#1607df977d403252e1595fe30e67a4965aab700a"
integrity sha512-OXQ9Wbcn5e2eEPrNKJjGXeCWnKamNGyvSwORL0B8BB1fp3OO/EYo/RfeQGTR9kxGNxEpokoPZL9JNgFHoVK+wA==
dependencies:
"@astrojs/compiler" "^2.7.1"
"@astrojs/internal-helpers" "0.4.0"
@ -1107,6 +1136,11 @@ astro@^4.5.13:
optionalDependencies:
sharp "^0.32.6"
asynckit@^0.4.0:
version "0.4.0"
resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79"
integrity sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==
autoprefixer@^10.4.15:
version "10.4.19"
resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-10.4.19.tgz#ad25a856e82ee9d7898c59583c1afeb3fa65f89f"
@ -1126,6 +1160,15 @@ available-typed-arrays@^1.0.7:
dependencies:
possible-typed-array-names "^1.0.0"
axios@^1.6.8:
version "1.6.8"
resolved "https://registry.yarnpkg.com/axios/-/axios-1.6.8.tgz#66d294951f5d988a00e87a0ffb955316a619ea66"
integrity sha512-v/ZHtJDU39mDpyBoFVkETcd/uNdxrWRrg3bKpOKzXFA6Bvqopts6ALSMU3y6ijYxbw2B+wPrIv46egTzJXCLGQ==
dependencies:
follow-redirects "^1.15.6"
form-data "^4.0.0"
proxy-from-env "^1.1.0"
axobject-query@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/axobject-query/-/axobject-query-4.0.0.tgz#04a4c90dce33cc5d606c76d6216e3b250ff70dab"
@ -1439,6 +1482,13 @@ color@^4.2.3:
color-convert "^2.0.1"
color-string "^1.9.0"
combined-stream@^1.0.8:
version "1.0.8"
resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f"
integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==
dependencies:
delayed-stream "~1.0.0"
comma-separated-tokens@^2.0.0:
version "2.0.3"
resolved "https://registry.yarnpkg.com/comma-separated-tokens/-/comma-separated-tokens-2.0.3.tgz#4e89c9458acb61bc8fef19f4529973b2392839ee"
@ -1567,6 +1617,11 @@ define-properties@^1.2.1:
has-property-descriptors "^1.0.0"
object-keys "^1.1.1"
delayed-stream@~1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619"
integrity sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==
dequal@^2.0.0, dequal@^2.0.3:
version "2.0.3"
resolved "https://registry.yarnpkg.com/dequal/-/dequal-2.0.3.tgz#2644214f1997d39ed0ee0ece72335490a7ac67be"
@ -1682,9 +1737,9 @@ eastasianwidth@^0.2.0:
integrity sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==
electron-to-chromium@^1.4.668:
version "1.4.723"
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.723.tgz#827da30c96b316684d352c3d81430029df01bb8e"
integrity sha512-rxFVtrMGMFROr4qqU6n95rUi9IlfIm+lIAt+hOToy/9r6CDv0XiEcQdC3VP71y1pE5CFTzKV0RvxOGYCPWWHPw==
version "1.4.724"
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.724.tgz#e0a86fe4d3d0e05a4d7b032549d79608078f830d"
integrity sha512-RTRvkmRkGhNBPPpdrgtDKvmOEYTrPlXDfc0J/Nfq5s29tEahAwhiX4mmhNzj6febWMleulxVYPh7QwCSL/EldA==
emoji-regex@^10.2.1, emoji-regex@^10.3.0:
version "10.3.0"
@ -1936,6 +1991,11 @@ flattie@^1.1.0:
resolved "https://registry.yarnpkg.com/flattie/-/flattie-1.1.1.tgz#88182235723113667d36217fec55359275d6fe3d"
integrity sha512-9UbaD6XdAL97+k/n+N7JwX46K/M6Zc6KcFYskrYL8wbBV/Uyk0CTAMY0VT+qiK5PM7AIc9aTWYtq65U7T+aCNQ==
follow-redirects@^1.15.6:
version "1.15.6"
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.6.tgz#7f815c0cda4249c74ff09e95ef97c23b5fd0399b"
integrity sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==
for-each@^0.3.3:
version "0.3.3"
resolved "https://registry.yarnpkg.com/for-each/-/for-each-0.3.3.tgz#69b447e88a0a5d32c3e7084f3f1710034b21376e"
@ -1951,6 +2011,15 @@ foreground-child@^3.1.0:
cross-spawn "^7.0.0"
signal-exit "^4.0.1"
form-data@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.0.tgz#93919daeaf361ee529584b9b31664dc12c9fa452"
integrity sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==
dependencies:
asynckit "^0.4.0"
combined-stream "^1.0.8"
mime-types "^2.1.12"
fraction.js@^4.3.7:
version "4.3.7"
resolved "https://registry.yarnpkg.com/fraction.js/-/fraction.js-4.3.7.tgz#06ca0085157e42fda7f9e726e79fefc4068840f7"
@ -2170,9 +2239,9 @@ hast-util-raw@^9.0.0:
zwitch "^2.0.0"
hast-util-to-html@^9.0.0:
version "9.0.0"
resolved "https://registry.yarnpkg.com/hast-util-to-html/-/hast-util-to-html-9.0.0.tgz#51c0ae2a3550b9aa988c094c4fc4e327af0dddd1"
integrity sha512-IVGhNgg7vANuUA2XKrT6sOIIPgaYZnmLx3l/CCOAK0PtgfoHrZwX7jCSYyFxHTrGmC6S9q8aQQekjp4JPZF+cw==
version "9.0.1"
resolved "https://registry.yarnpkg.com/hast-util-to-html/-/hast-util-to-html-9.0.1.tgz#d108aba473c0ced8377267b1a725b25e818ff3c8"
integrity sha512-hZOofyZANbyWo+9RP75xIDV/gq+OUKx+T46IlwERnKmfpwp81XBFbT9mi26ws+SJchA4RVUQwIBJpqEOBhMzEQ==
dependencies:
"@types/hast" "^3.0.0"
"@types/unist" "^3.0.0"
@ -2570,6 +2639,11 @@ kleur@^4.1.4, kleur@^4.1.5:
resolved "https://registry.yarnpkg.com/kleur/-/kleur-4.1.5.tgz#95106101795f7050c6c650f350c683febddb1780"
integrity sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==
leaflet@^1.9.4:
version "1.9.4"
resolved "https://registry.yarnpkg.com/leaflet/-/leaflet-1.9.4.tgz#23fae724e282fa25745aff82ca4d394748db7d8d"
integrity sha512-nxS1ynzJOmOlHp+iL3FyWqK89GtNL8U8rvlMOsQdTTssxZwCXh8N2NB3GDQOL+YR3XnWyZAxwQixURb+FA74PA==
lilconfig@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/lilconfig/-/lilconfig-2.1.0.tgz#78e23ac89ebb7e1bfbf25b18043de756548e7f52"
@ -3107,6 +3181,18 @@ micromatch@^4.0.2, micromatch@^4.0.4, micromatch@^4.0.5:
braces "^3.0.2"
picomatch "^2.3.1"
mime-db@1.52.0:
version "1.52.0"
resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70"
integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==
mime-types@^2.1.12:
version "2.1.35"
resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a"
integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==
dependencies:
mime-db "1.52.0"
mime@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/mime/-/mime-3.0.0.tgz#b374550dca3a0c18443b0c950a6a58f1931cf7a7"
@ -3562,9 +3648,14 @@ prompts@^2.4.2:
sisteransi "^1.0.5"
property-information@^6.0.0:
version "6.4.1"
resolved "https://registry.yarnpkg.com/property-information/-/property-information-6.4.1.tgz#de8b79a7415fd2107dfbe65758bb2cc9dfcf60ac"
integrity sha512-OHYtXfu5aI2sS2LWFSN5rgJjrQ4pCy8i1jubJLe2QvMF8JJ++HXTUIVWFLfXJoaOfvYYjk2SN8J2wFUWIGXT4w==
version "6.5.0"
resolved "https://registry.yarnpkg.com/property-information/-/property-information-6.5.0.tgz#6212fbb52ba757e92ef4fb9d657563b933b7ffec"
integrity sha512-PgTgs/BlvHxOu8QuEN7wi5A0OmXaBcHpmCSTehcs6Uuu9IkDIEo13Hy7n898RHfrQ49vKCoGeWZSaAK01nwVig==
proxy-from-env@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz#e102f16ca355424865755d2c9e8ea4f24d58c3e2"
integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==
pump@^3.0.0:
version "3.0.0"
@ -3601,7 +3692,7 @@ rc@^1.2.7:
minimist "^1.2.0"
strip-json-comments "~2.0.1"
react-dom@^18.0.0:
react-dom@^18.2.0:
version "18.2.0"
resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-18.2.0.tgz#22aaf38708db2674ed9ada224ca4aa708d821e3d"
integrity sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g==
@ -3619,12 +3710,19 @@ react-is@^17.0.1:
resolved "https://registry.yarnpkg.com/react-is/-/react-is-17.0.2.tgz#e691d4a8e9c789365655539ab372762b0efb54f0"
integrity sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==
react-leaflet@^4.2.1:
version "4.2.1"
resolved "https://registry.yarnpkg.com/react-leaflet/-/react-leaflet-4.2.1.tgz#c300e9eccaf15cb40757552e181200aa10b94780"
integrity sha512-p9chkvhcKrWn/H/1FFeVSqLdReGwn2qmiobOQGO3BifX+/vV/39qhY8dGqbdcPh1e6jxh/QHriLXr7a4eLFK4Q==
dependencies:
"@react-leaflet/core" "^2.1.0"
react-refresh@^0.14.0:
version "0.14.0"
resolved "https://registry.yarnpkg.com/react-refresh/-/react-refresh-0.14.0.tgz#4e02825378a5f227079554d4284889354e5f553e"
integrity sha512-wViHqhAd8OHeLS/IRMJjTSDHF3U9eWi62F/MledQGPdJGDhodXJ9PBLNGr6WWL7qlH12Mt3TyTpbS+hGXMjCzQ==
react@^18.0.0:
react@^18.2.0:
version "18.2.0"
resolved "https://registry.yarnpkg.com/react/-/react-18.2.0.tgz#555bd98592883255fa00de14f1151a917b5d77d5"
integrity sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==
@ -3819,27 +3917,27 @@ reusify@^1.0.4:
integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==
rollup@^4.13.0:
version "4.13.2"
resolved "https://registry.yarnpkg.com/rollup/-/rollup-4.13.2.tgz#ac57d2dc48e8f5562f5a6daadb9caee590069262"
integrity sha512-MIlLgsdMprDBXC+4hsPgzWUasLO9CE4zOkj/u6j+Z6j5A4zRY+CtiXAdJyPtgCsc42g658Aeh1DlrdVEJhsL2g==
version "4.14.0"
resolved "https://registry.yarnpkg.com/rollup/-/rollup-4.14.0.tgz#c3e2cd479f1b2358b65c1f810fa05b51603d7be8"
integrity sha512-Qe7w62TyawbDzB4yt32R0+AbIo6m1/sqO7UPzFS8Z/ksL5mrfhA0v4CavfdmFav3D+ub4QeAgsGEe84DoWe/nQ==
dependencies:
"@types/estree" "1.0.5"
optionalDependencies:
"@rollup/rollup-android-arm-eabi" "4.13.2"
"@rollup/rollup-android-arm64" "4.13.2"
"@rollup/rollup-darwin-arm64" "4.13.2"
"@rollup/rollup-darwin-x64" "4.13.2"
"@rollup/rollup-linux-arm-gnueabihf" "4.13.2"
"@rollup/rollup-linux-arm64-gnu" "4.13.2"
"@rollup/rollup-linux-arm64-musl" "4.13.2"
"@rollup/rollup-linux-powerpc64le-gnu" "4.13.2"
"@rollup/rollup-linux-riscv64-gnu" "4.13.2"
"@rollup/rollup-linux-s390x-gnu" "4.13.2"
"@rollup/rollup-linux-x64-gnu" "4.13.2"
"@rollup/rollup-linux-x64-musl" "4.13.2"
"@rollup/rollup-win32-arm64-msvc" "4.13.2"
"@rollup/rollup-win32-ia32-msvc" "4.13.2"
"@rollup/rollup-win32-x64-msvc" "4.13.2"
"@rollup/rollup-android-arm-eabi" "4.14.0"
"@rollup/rollup-android-arm64" "4.14.0"
"@rollup/rollup-darwin-arm64" "4.14.0"
"@rollup/rollup-darwin-x64" "4.14.0"
"@rollup/rollup-linux-arm-gnueabihf" "4.14.0"
"@rollup/rollup-linux-arm64-gnu" "4.14.0"
"@rollup/rollup-linux-arm64-musl" "4.14.0"
"@rollup/rollup-linux-powerpc64le-gnu" "4.14.0"
"@rollup/rollup-linux-riscv64-gnu" "4.14.0"
"@rollup/rollup-linux-s390x-gnu" "4.14.0"
"@rollup/rollup-linux-x64-gnu" "4.14.0"
"@rollup/rollup-linux-x64-musl" "4.14.0"
"@rollup/rollup-win32-arm64-msvc" "4.14.0"
"@rollup/rollup-win32-ia32-msvc" "4.14.0"
"@rollup/rollup-win32-x64-msvc" "4.14.0"
fsevents "~2.3.2"
run-parallel@^1.1.9:
@ -3947,11 +4045,11 @@ shebang-regex@^3.0.0:
integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==
shiki@^1.1.2:
version "1.2.3"
resolved "https://registry.yarnpkg.com/shiki/-/shiki-1.2.3.tgz#7da5c145205ce563245bd883d353a99ffa1e2a19"
integrity sha512-+v7lO5cJMeV2N2ySK4l+51YX3wTh5I49SLjAOs1ch1DbUfeEytU1Ac9KaZPoZJCVBGycDZ09OBQN5nbcPFc5FQ==
version "1.2.4"
resolved "https://registry.yarnpkg.com/shiki/-/shiki-1.2.4.tgz#6160497463f3328d43223cc0199eaa4bdcbe4311"
integrity sha512-Q9n9jKiOjJCRPztA9POn3/uZXNySHDNKAsPNpmtHDcFyi6ZQhx5vQKZW3Nhrwn8TWW3RudSRk66zqY603EZDeg==
dependencies:
"@shikijs/core" "1.2.3"
"@shikijs/core" "1.2.4"
side-channel@^1.0.4:
version "1.0.6"
@ -4080,8 +4178,16 @@ streamx@^2.13.0, streamx@^2.15.0:
optionalDependencies:
bare-events "^2.2.0"
"string-width-cjs@npm:string-width@^4.2.0", string-width@^4.1.0:
name string-width-cjs
"string-width-cjs@npm:string-width@^4.2.0":
version "4.2.3"
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
dependencies:
emoji-regex "^8.0.0"
is-fullwidth-code-point "^3.0.0"
strip-ansi "^6.0.1"
string-width@^4.1.0:
version "4.2.3"
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
@ -4125,15 +4231,21 @@ string_decoder@^1.1.1:
safe-buffer "~5.2.0"
stringify-entities@^4.0.0:
version "4.0.3"
resolved "https://registry.yarnpkg.com/stringify-entities/-/stringify-entities-4.0.3.tgz#cfabd7039d22ad30f3cc435b0ca2c1574fc88ef8"
integrity sha512-BP9nNHMhhfcMbiuQKCqMjhDP5yBCAxsPu4pHFFzJ6Alo9dZgY4VLDPutXqIjpRiMoKdp7Av85Gr73Q5uH9k7+g==
version "4.0.4"
resolved "https://registry.yarnpkg.com/stringify-entities/-/stringify-entities-4.0.4.tgz#b3b79ef5f277cc4ac73caeb0236c5ba939b3a4f3"
integrity sha512-IwfBptatlO+QCJUo19AqvrPNqlVMpW9YEL2LIVY+Rpv2qsjCGxaDLNRgeGsQWJhfItebuJhsGSLjaBbNSQ+ieg==
dependencies:
character-entities-html4 "^2.0.0"
character-entities-legacy "^3.0.0"
"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1:
name strip-ansi-cjs
"strip-ansi-cjs@npm:strip-ansi@^6.0.1":
version "6.0.1"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
dependencies:
ansi-regex "^5.0.1"
strip-ansi@^6.0.0, strip-ansi@^6.0.1:
version "6.0.1"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
@ -4558,9 +4670,9 @@ vfile@^6.0.0, vfile@^6.0.1:
vfile-message "^4.0.0"
vite@^5.1.4:
version "5.2.7"
resolved "https://registry.yarnpkg.com/vite/-/vite-5.2.7.tgz#e1b8a985eb54fcb9467d7f7f009d87485016df6e"
integrity sha512-k14PWOKLI6pMaSzAuGtT+Cf0YmIx12z9YGon39onaJNy8DLBfBJrzg9FQEmkAM5lpHBZs9wksWAsyF/HkpEwJA==
version "5.2.8"
resolved "https://registry.yarnpkg.com/vite/-/vite-5.2.8.tgz#a99e09939f1a502992381395ce93efa40a2844aa"
integrity sha512-OyZR+c1CE8yeHw5V5t59aXsUPPVTHMDjEZz8MgguLL/Q7NblxhZUlTu9xSPqlsUO/y+X7dlU05jdhvyycD55DA==
dependencies:
esbuild "^0.20.1"
postcss "^8.4.38"

10
node_modules/.yarn-integrity generated vendored Normal file
View File

@ -0,0 +1,10 @@
{
"systemParams": "linux-x64-108",
"modulesFolders": [],
"flags": [],
"linkedModules": [],
"topLevelPatterns": [],
"lockfileEntries": {},
"files": [],
"artifacts": {}
}

View File

@ -13,6 +13,7 @@
"generate:types": "cross-env PAYLOAD_CONFIG_PATH=src/payload.config.ts node -r tsconfig-paths/register node_modules/payload/dist/bin/index.js generate:types"
},
"dependencies": {
"cors": "^2.8.5",
"cross-env": "^7.0.3",
"dotenv": "^16.3.1",
"express": "^4.17.1",

View File

@ -0,0 +1,20 @@
import { CollectionConfig } from 'payload/types';
const Couriers: CollectionConfig = {
slug: 'couriers',
admin: {
useAsTitle: 'name',
},
access: {
read: () => true,
},
fields: [
{
name: 'id',
type: 'text',
required: true,
}
],
};
export default Couriers;

View File

@ -0,0 +1,88 @@
import { CollectionConfig } from 'payload/types';
const Dispatches: CollectionConfig = {
slug: 'dispatches',
admin: {
useAsTitle: 'dispatchesCode',
},
access: {
read: () => true,
},
fields: [
// {
// name: 'dispatchesCode',
// type: 'text',
// required: false,
// },
{
name: 'products',
type: 'relationship',
relationTo: 'products',
hasMany: true,
required: true,
},
{
name: 'courier',
type: 'relationship',
relationTo: 'couriers',
hasMany: false,
required: false
},
{
name: 'maker',
type: 'relationship',
relationTo: 'makers',
hasMany: false,
required: false
},
{
name: 'retailer',
type: 'relationship',
relationTo: 'retailers',
hasMany: false,
required: false
},
{
name: 'status',
type: 'select',
hasMany: true,
required: true,
options: [
{
label: 'Requested',
value: 'requested',
},
{
label: 'Accepted',
value: 'accepted',
},
{
label: 'Archived',
value: 'archived',
},
],
}
],
};
export default Dispatches;
// type Dispatch = {
// id: string;
// dispatchesCode: string; //Human readable id
// createdAt: string;
// updatedAt: string;
// maker: Maker;
// retailer: Retailer;
// products: Product[];
// courier: User;
// timeSensitive: boolean;
// status: DispatchStatus[];
// departureDate: string;
// arrivalDate: string;
// weightAllowance: number;
// }

View File

@ -0,0 +1,32 @@
import { CollectionConfig } from 'payload/types';
const Makers: CollectionConfig = {
slug: 'makers',
admin: {
useAsTitle: 'name',
},
access: {
read: () => true,
},
fields: [
{
name: 'name',
type: 'text',
required: true,
},
{
name: 'location',
type: 'point',
label: 'Location',
required: true
},
{
name: 'stock',
type: 'relationship',
relationTo: 'products',
hasMany: true,
},
],
};
export default Makers;

View File

@ -0,0 +1,34 @@
import { CollectionConfig } from 'payload/types';
const Products: CollectionConfig = {
slug: 'products',
admin: {
useAsTitle: 'productTitle',
},
access: {
read: () => true,
},
fields: [
{
name: 'title',
type: 'text',
required: true,
},
{
name: 'picture',
type: 'relationship',
relationTo: 'media',
hasMany: false,
required: true,
},
{
name: 'weight',
label: 'Weight (kg)',
type: 'number',
hasMany: false,
required: false,
}
],
};
export default Products;

View File

@ -0,0 +1,33 @@
import { CollectionConfig } from 'payload/types';
import { geoPickerField } from "../customFields/geoPicker/field";
const Retailers: CollectionConfig = {
slug: 'retailers',
admin: {
useAsTitle: 'name',
},
access: {
read: () => true,
},
fields: [
{
name: 'name',
type: 'text',
required: true,
},
{
name: 'location',
type: 'point',
label: 'Location',
required: true
},
{
name: 'stock',
type: 'relationship',
relationTo: 'products',
hasMany: true,
},
],
};
export default Retailers;

View File

@ -14,7 +14,13 @@ const Users: CollectionConfig = {
{
name: 'name',
type: 'text',
}
required: true
},
{
name: 'phoneNumber',
type: 'number',
required: false
},
],
};

View File

@ -0,0 +1,68 @@
import * as React from 'react';
import { useField } from 'payload/components/forms';
export const GeoPicker: React.FC<{ path: string }> = ({ path }) => {
const { value, setValue } = useField<string>({ path });
const [longitude, setLongitude] = React.useState(value[0] || 0);
const [latitude, setLatitude] = React.useState(value[1] || 0);
const [error, setError] = React.useState("")
const handleCityEnter = async (e) => {
if (e.key === 'Enter') {
try {
const response = await fetch(
`https://nominatim.openstreetmap.org/search?format=json&q=${e.target.value}`
);
const data = await response.json();
if (data && data.length > 0) {
const { lat, lon } = data[0];
setLatitude(lat);
setLongitude(lon);
setValue([lon, lat]);
}
} catch (err) {
setError(e)
console.error('Error fetching geolocation:', e);
}
}
};
const handleLatitudeChange = (e) => {
setLatitude(e.target.value);
};
const handleLongitudeChange = (e) => {
setLongitude(e.target.value);
};
return (
<div>
<div className='field-type text'>
<label className='field-label'>
City
</label>
<input
type="text"
className='field-name'
onKeyDown={handleCityEnter}
placeholder="Enter city to get coordinates"
/>
</div>
{error != "" &&
<p>{error}</p>
}
<div className="field-type point">
<ul className='point__wrap'>
<li>
<label className='field-label'>Location - Longitude</label>
<input id="field-longitude-location" type="number" name="location.longitude" value={longitude} onChange={handleLongitudeChange}></input>
</li>
<li>
<label className='field-label'>Location - Latitude</label>
<input id="field-latitude-latitude" type="number" name="location.latitude" value={latitude} onChange={handleLatitudeChange}></input>
</li>
</ul>
</div>
</div>
);
};

View File

@ -0,0 +1,12 @@
import { PointField } from 'payload/types';
import { GeoPicker } from './GeoPicker';
export const geoPickerField: PointField = {
name: 'Location',
type: 'point',
admin: {
components: {
Field: GeoPicker,
},
},
}

View File

@ -3,6 +3,11 @@ import path from "path";
import Posts from "@/collections/Posts";
import Users from "@/collections/Users";
import Media from "@/collections/Media";
import Couriers from "./collections/Couriers";
import Dispatches from "./collections/Dispatches";
import Makers from "./collections/Makers";
import Products from "./collections/Products";
import Retailers from "./collections/Retailers";
export default buildConfig({
serverURL: process.env.PAYLOAD_URL,
@ -19,7 +24,16 @@ export default buildConfig({
},
}),
},
collections: [Posts, Users, Media],
collections: [
Posts,
Users,
Media,
Couriers,
Dispatches,
Makers,
Products,
Retailers,
],
typescript: {
outputFile: path.resolve("/", "types.ts"),
},

View File

@ -1,5 +1,6 @@
import express from "express";
import payload from "payload";
import cors from "cors";
require("dotenv").config();
const app = express();
@ -17,5 +18,11 @@ payload.init({
},
});
const corsOptions = {
origin: 'http://localhost:3000',
};
app.use(cors(corsOptions));
app.use("/media", express.static("media"));
app.listen(process.env.PAYLOAD_PORT);

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,48 @@
//Dispatch Represents:
//- a connection between two locations
//- An agreement between a courier, a maker and a retailer to transport goods (Products) from point A (maker) to point B (retailer)
//- A dispatch has 4 statuses: offered (by a courier), requested (by a maker/retailer), accepted and archived
//- An offered dispatch will not yet have a Product, Maker, or Retailer.
//- A requested dispatch will have a Product, Maker and Retailer, but not a courier
//- A dispatch is accepted (moved from offered/requested) once all parties have accepted the conditions
//- A retailer accepts an offered route by responding with products (courier must then also confirm, but does not provide further data)
//- A courier accepts a requested route by responding with a date of arrival (the retailer must then confirm, but does not provide further data)
//- A retailer requests a dispatch by requesting a product they want to stock
//- A maker requests a dispatch by requesting to stock a product with a retailer
const DISPATCH_STATUS = ['requested', 'accepted', 'archived'] as const;
type DispatchStatus = typeof DISPATCH_STATUS[number];
type Dispatch = {
id: string;
dispatchesCode: string; //Human readable id
createdAt: string;
updatedAt: string;
maker: Maker;
retailer: Retailer;
products: Product[];
courier: User;
timeSensitive: boolean;
status: DispatchStatus[];
departureDate: string;
arrivalDate: string;
weightAllowance: number;
}
//Courier is just a person (User) and doesn't need to be its own thing. A user is a courier when they accept a dispatch as a courier
// Delete the couriers collection
type Product = {
id: string;
productTitle: string;
weight: number;
img: string;
createdAt: string;
updatedAt: string;
};

View File

@ -0,0 +1,355 @@
{
"docs": [
{
"id": "660a8a0701275c2f8eb88344",
"dispatchesCode": "Tropical Tap Water",
"products": [
{
"id": "660a87b201275c2f8eb88302",
"productTitle": "Tote Bags",
"createdAt": "2024-04-01T10:08:50.417Z",
"updatedAt": "2024-04-01T10:08:50.417Z"
}
],
"typeOfTransportation": ["air"],
"courier": {
"id": "660a899501275c2f8eb8831b",
"name": "Daniel Aguilar Ruvalcaba",
"startingPoint": "Indonesia",
"destination": "Mexico",
"departureDate": "2024-04-15T06:00:00.000Z",
"arrivalDate": "2024-04-16T06:00:00.000Z",
"weightAllowance": 5,
"createdAt": "2024-04-01T10:16:53.455Z",
"updatedAt": "2024-04-01T10:16:53.455Z"
},
"timeSensitive": false,
"status": ["routeRequested"],
"createdAt": "2024-04-01T10:18:47.302Z",
"updatedAt": "2024-04-01T10:18:47.302Z"
},
{
"id": "66028d2a01275c2f8eb87e3a",
"dispatchesCode": "HQL-571",
"products": [
{
"id": "66028ee601275c2f8eb87e93",
"productTitle": "Acts of Departure: Dispatches from The Last Emporium",
"createdAt": "2024-03-26T09:01:26.239Z",
"updatedAt": "2024-03-26T09:01:26.239Z"
}
],
"startingPoint": {
"id": "66028ec901275c2f8eb87e76",
"name": "Display Distribute",
"location": [114.19163986185993, 22.31656075733971],
"products": [
{
"id": "65b0cefaafcaf765bddf4527",
"productTitle": "Product one",
"createdAt": "2024-01-24T08:48:58.369Z",
"updatedAt": "2024-01-24T08:48:58.369Z"
}
],
"createdAt": "2024-03-26T09:00:57.371Z",
"updatedAt": "2024-03-26T09:00:57.371Z"
},
"endPoint": {
"id": "65b0cf25afcaf765bddf4540",
"name": "Retailer one",
"location": [2.45, 48.9],
"products": [
{
"id": "65b0cefaafcaf765bddf4527",
"productTitle": "Product one",
"createdAt": "2024-01-24T08:48:58.369Z",
"updatedAt": "2024-01-24T08:48:58.369Z"
}
],
"createdAt": "2024-01-24T08:49:41.635Z",
"updatedAt": "2024-01-24T08:49:41.635Z"
},
"typeOfTransportation": ["air"],
"courier": {
"id": "66028b3801275c2f8eb87e22",
"name": "Shuang",
"startingPoint": "Chongqing",
"destination": "Hong Kong",
"departureDate": "2024-03-26T16:00:00.000Z",
"arrivalDate": "2024-03-27T16:00:00.000Z",
"weightAllowance": 2,
"createdAt": "2024-03-26T08:45:44.841Z",
"updatedAt": "2024-03-26T09:04:46.105Z"
},
"status": ["completed"],
"createdAt": "2024-03-26T08:54:02.444Z",
"updatedAt": "2024-03-26T09:05:05.667Z"
},
{
"id": "65db4a5af1b7d726bba2ebe4",
"dispatchesCode": "007",
"products": [
{
"id": "65b0cefaafcaf765bddf4527",
"productTitle": "Product one",
"createdAt": "2024-01-24T08:48:58.369Z",
"updatedAt": "2024-01-24T08:48:58.369Z"
}
],
"startingPoint": {
"id": "65b0cff2afcaf765bddf45a8",
"name": "Maker 3",
"location": [106, -6.2],
"products": [
{
"id": "65b0cefaafcaf765bddf4527",
"productTitle": "Product one",
"createdAt": "2024-01-24T08:48:58.369Z",
"updatedAt": "2024-01-24T08:48:58.369Z"
}
],
"createdAt": "2024-01-24T08:53:06.945Z",
"updatedAt": "2024-01-24T08:53:06.945Z"
},
"endPoint": {
"id": "65b0cf25afcaf765bddf4540",
"name": "Retailer one",
"location": [2.45, 48.9],
"products": [
{
"id": "65b0cefaafcaf765bddf4527",
"productTitle": "Product one",
"createdAt": "2024-01-24T08:48:58.369Z",
"updatedAt": "2024-01-24T08:48:58.369Z"
}
],
"createdAt": "2024-01-24T08:49:41.635Z",
"updatedAt": "2024-01-24T08:49:41.635Z"
},
"courier": {
"id": "65b0ced0afcaf765bddf4503",
"name": "Joost the Courier",
"createdAt": "2024-01-24T08:48:16.461Z",
"updatedAt": "2024-01-24T08:48:16.461Z"
},
"timeSensitive": true,
"status": ["routeRequested"],
"createdAt": "2024-02-25T14:10:34.727Z",
"updatedAt": "2024-02-25T19:24:29.046Z",
"typeOfTransportation": ["car"]
},
{
"id": "65b0d0aeafcaf765bddf4671",
"dispatchesCode": "004",
"products": [
{
"id": "65b0cefaafcaf765bddf4527",
"productTitle": "Product one",
"createdAt": "2024-01-24T08:48:58.369Z",
"updatedAt": "2024-01-24T08:48:58.369Z"
}
],
"startingPoint": {
"id": "65b0cfd9afcaf765bddf4596",
"name": "Maker Two",
"location": [0.128, 51.5],
"products": [
{
"id": "65b0cefaafcaf765bddf4527",
"productTitle": "Product one",
"createdAt": "2024-01-24T08:48:58.369Z",
"updatedAt": "2024-01-24T08:48:58.369Z"
}
],
"createdAt": "2024-01-24T08:52:41.057Z",
"updatedAt": "2024-01-24T08:52:41.057Z"
},
"endPoint": {
"id": "65b0cf7eafcaf765bddf4564",
"name": "Retailer 3",
"location": [9.19, 45.5],
"products": [
{
"id": "65b0cefaafcaf765bddf4527",
"productTitle": "Product one",
"createdAt": "2024-01-24T08:48:58.369Z",
"updatedAt": "2024-01-24T08:48:58.369Z"
}
],
"createdAt": "2024-01-24T08:51:10.008Z",
"updatedAt": "2024-01-24T08:51:10.008Z"
},
"courier": {
"id": "65b0ced0afcaf765bddf4503",
"name": "Joost the Courier",
"createdAt": "2024-01-24T08:48:16.461Z",
"updatedAt": "2024-01-24T08:48:16.461Z"
},
"status": ["routeRequested"],
"createdAt": "2024-01-24T08:56:14.210Z",
"updatedAt": "2024-01-24T08:56:14.210Z"
},
{
"id": "65b0d099afcaf765bddf4640",
"dispatchesCode": "003",
"products": [
{
"id": "65b0cefaafcaf765bddf4527",
"productTitle": "Product one",
"createdAt": "2024-01-24T08:48:58.369Z",
"updatedAt": "2024-01-24T08:48:58.369Z"
}
],
"startingPoint": {
"id": "65b0cff2afcaf765bddf45a8",
"name": "Maker 3",
"location": [106, -6.2],
"products": [
{
"id": "65b0cefaafcaf765bddf4527",
"productTitle": "Product one",
"createdAt": "2024-01-24T08:48:58.369Z",
"updatedAt": "2024-01-24T08:48:58.369Z"
}
],
"createdAt": "2024-01-24T08:53:06.945Z",
"updatedAt": "2024-01-24T08:53:06.945Z"
},
"endPoint": {
"id": "65b0cf6bafcaf765bddf4552",
"name": "Retailer two",
"location": [-74, 40.7],
"products": [
{
"id": "65b0cefaafcaf765bddf4527",
"productTitle": "Product one",
"createdAt": "2024-01-24T08:48:58.369Z",
"updatedAt": "2024-01-24T08:48:58.369Z"
}
],
"createdAt": "2024-01-24T08:50:51.876Z",
"updatedAt": "2024-01-24T08:50:51.876Z"
},
"courier": {
"id": "65b0ced0afcaf765bddf4503",
"name": "Joost the Courier",
"createdAt": "2024-01-24T08:48:16.461Z",
"updatedAt": "2024-01-24T08:48:16.461Z"
},
"status": ["completed"],
"createdAt": "2024-01-24T08:55:53.951Z",
"updatedAt": "2024-01-24T08:55:53.951Z"
},
{
"id": "65b0d07cafcaf765bddf460f",
"dispatchesCode": "002",
"products": [
{
"id": "65b0cefaafcaf765bddf4527",
"productTitle": "Product one",
"createdAt": "2024-01-24T08:48:58.369Z",
"updatedAt": "2024-01-24T08:48:58.369Z"
}
],
"startingPoint": {
"id": "65b0d00dafcaf765bddf45ba",
"name": "Fahad the Artist",
"location": [-6.84, 33.9],
"products": [
{
"id": "65b0cefaafcaf765bddf4527",
"productTitle": "Product one",
"createdAt": "2024-01-24T08:48:58.369Z",
"updatedAt": "2024-01-24T08:48:58.369Z"
}
],
"createdAt": "2024-01-24T08:53:33.106Z",
"updatedAt": "2024-01-24T08:53:33.106Z"
},
"endPoint": {
"id": "65b0cf25afcaf765bddf4540",
"name": "Retailer one",
"location": [2.45, 48.9],
"products": [
{
"id": "65b0cefaafcaf765bddf4527",
"productTitle": "Product one",
"createdAt": "2024-01-24T08:48:58.369Z",
"updatedAt": "2024-01-24T08:48:58.369Z"
}
],
"createdAt": "2024-01-24T08:49:41.635Z",
"updatedAt": "2024-01-24T08:49:41.635Z"
},
"courier": {
"id": "65b0ced0afcaf765bddf4503",
"name": "Joost the Courier",
"createdAt": "2024-01-24T08:48:16.461Z",
"updatedAt": "2024-01-24T08:48:16.461Z"
},
"status": ["routeRequested"],
"createdAt": "2024-01-24T08:55:24.797Z",
"updatedAt": "2024-01-24T08:55:24.797Z"
},
{
"id": "65b0d05cafcaf765bddf45de",
"dispatchesCode": "Random-string-maybe-better-to-use-the-ID",
"products": [
{
"id": "65b0cefaafcaf765bddf4527",
"productTitle": "Product one",
"createdAt": "2024-01-24T08:48:58.369Z",
"updatedAt": "2024-01-24T08:48:58.369Z"
}
],
"startingPoint": {
"id": "65b0cfd9afcaf765bddf4596",
"name": "Maker Two",
"location": [0.128, 51.5],
"products": [
{
"id": "65b0cefaafcaf765bddf4527",
"productTitle": "Product one",
"createdAt": "2024-01-24T08:48:58.369Z",
"updatedAt": "2024-01-24T08:48:58.369Z"
}
],
"createdAt": "2024-01-24T08:52:41.057Z",
"updatedAt": "2024-01-24T08:52:41.057Z"
},
"endPoint": {
"id": "65b0cf7eafcaf765bddf4564",
"name": "Retailer 3",
"location": [9.19, 45.5],
"products": [
{
"id": "65b0cefaafcaf765bddf4527",
"productTitle": "Product one",
"createdAt": "2024-01-24T08:48:58.369Z",
"updatedAt": "2024-01-24T08:48:58.369Z"
}
],
"createdAt": "2024-01-24T08:51:10.008Z",
"updatedAt": "2024-01-24T08:51:10.008Z"
},
"courier": {
"id": "65b0ced0afcaf765bddf4503",
"name": "Joost the Courier",
"createdAt": "2024-01-24T08:48:16.461Z",
"updatedAt": "2024-01-24T08:48:16.461Z"
},
"status": ["inTransit"],
"createdAt": "2024-01-24T08:54:52.811Z",
"updatedAt": "2024-01-24T08:54:52.811Z"
}
],
"totalDocs": 7,
"limit": 10,
"totalPages": 1,
"page": 1,
"pagingCounter": 1,
"hasPrevPage": false,
"hasNextPage": false,
"prevPage": null,
"nextPage": null
}

View File

@ -0,0 +1,88 @@
{
"docs": [
{
"id": "66028ec901275c2f8eb87e76",
"name": "Display Distribute",
"location": [114.19163986185993, 22.31656075733971],
"products": [
{
"id": "65b0cefaafcaf765bddf4527",
"productTitle": "Product one",
"createdAt": "2024-01-24T08:48:58.369Z",
"updatedAt": "2024-01-24T08:48:58.369Z"
}
],
"createdAt": "2024-03-26T09:00:57.371Z",
"updatedAt": "2024-03-26T09:00:57.371Z"
},
{
"id": "65b0d00dafcaf765bddf45ba",
"name": "Fahad the Artist",
"location": [-6.84, 33.9],
"products": [
{
"id": "65b0cefaafcaf765bddf4527",
"productTitle": "Product one",
"createdAt": "2024-01-24T08:48:58.369Z",
"updatedAt": "2024-01-24T08:48:58.369Z"
}
],
"createdAt": "2024-01-24T08:53:33.106Z",
"updatedAt": "2024-01-24T08:53:33.106Z"
},
{
"id": "65b0cff2afcaf765bddf45a8",
"name": "Maker 3",
"location": [106, -6.2],
"products": [
{
"id": "65b0cefaafcaf765bddf4527",
"productTitle": "Product one",
"createdAt": "2024-01-24T08:48:58.369Z",
"updatedAt": "2024-01-24T08:48:58.369Z"
}
],
"createdAt": "2024-01-24T08:53:06.945Z",
"updatedAt": "2024-01-24T08:53:06.945Z"
},
{
"id": "65b0cfd9afcaf765bddf4596",
"name": "Maker Two",
"location": [0.128, 51.5],
"products": [
{
"id": "65b0cefaafcaf765bddf4527",
"productTitle": "Product one",
"createdAt": "2024-01-24T08:48:58.369Z",
"updatedAt": "2024-01-24T08:48:58.369Z"
}
],
"createdAt": "2024-01-24T08:52:41.057Z",
"updatedAt": "2024-01-24T08:52:41.057Z"
},
{
"id": "65b0cfbbafcaf765bddf4584",
"name": "Maker one",
"location": [67, 24.86],
"products": [
{
"id": "65b0cefaafcaf765bddf4527",
"productTitle": "Product one",
"createdAt": "2024-01-24T08:48:58.369Z",
"updatedAt": "2024-01-24T08:48:58.369Z"
}
],
"createdAt": "2024-01-24T08:52:11.469Z",
"updatedAt": "2024-01-24T08:52:11.469Z"
}
],
"totalDocs": 5,
"limit": 10,
"totalPages": 1,
"page": 1,
"pagingCounter": 1,
"hasPrevPage": false,
"hasNextPage": false,
"prevPage": null,
"nextPage": null
}

View File

@ -0,0 +1,31 @@
{
"docs": [
{
"id": "660a87b201275c2f8eb88302",
"productTitle": "Tote Bags",
"createdAt": "2024-04-01T10:08:50.417Z",
"updatedAt": "2024-04-01T10:08:50.417Z"
},
{
"id": "66028ee601275c2f8eb87e93",
"productTitle": "Acts of Departure: Dispatches from The Last Emporium",
"createdAt": "2024-03-26T09:01:26.239Z",
"updatedAt": "2024-03-26T09:01:26.239Z"
},
{
"id": "65b0cefaafcaf765bddf4527",
"productTitle": "Product one",
"createdAt": "2024-01-24T08:48:58.369Z",
"updatedAt": "2024-01-24T08:48:58.369Z"
}
],
"totalDocs": 3,
"limit": 10,
"totalPages": 1,
"page": 1,
"pagingCounter": 1,
"hasPrevPage": false,
"hasNextPage": false,
"prevPage": null,
"nextPage": null
}

View File

@ -0,0 +1,58 @@
{
"docs": [
{
"id": "65b0cf7eafcaf765bddf4564",
"name": "Retailer 3",
"location": [9.19, 45.5],
"products": [
{
"id": "65b0cefaafcaf765bddf4527",
"productTitle": "Product one",
"createdAt": "2024-01-24T08:48:58.369Z",
"updatedAt": "2024-01-24T08:48:58.369Z"
}
],
"createdAt": "2024-01-24T08:51:10.008Z",
"updatedAt": "2024-01-24T08:51:10.008Z"
},
{
"id": "65b0cf6bafcaf765bddf4552",
"name": "Retailer two",
"location": [-74, 40.7],
"products": [
{
"id": "65b0cefaafcaf765bddf4527",
"productTitle": "Product one",
"createdAt": "2024-01-24T08:48:58.369Z",
"updatedAt": "2024-01-24T08:48:58.369Z"
}
],
"createdAt": "2024-01-24T08:50:51.876Z",
"updatedAt": "2024-01-24T08:50:51.876Z"
},
{
"id": "65b0cf25afcaf765bddf4540",
"name": "Retailer one",
"location": [2.45, 48.9],
"products": [
{
"id": "65b0cefaafcaf765bddf4527",
"productTitle": "Product one",
"createdAt": "2024-01-24T08:48:58.369Z",
"updatedAt": "2024-01-24T08:48:58.369Z"
}
],
"createdAt": "2024-01-24T08:49:41.635Z",
"updatedAt": "2024-01-24T08:49:41.635Z"
}
],
"totalDocs": 3,
"limit": 10,
"totalPages": 1,
"page": 1,
"pagingCounter": 1,
"hasPrevPage": false,
"hasNextPage": false,
"prevPage": null,
"nextPage": null
}

4
yarn.lock Normal file
View File

@ -0,0 +1,4 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1