mirror of
https://github.com/seanmorley15/AdventureLog.git
synced 2025-08-04 04:35:19 +02:00
Add type to map tag
This commit is contained in:
parent
0a8ff18560
commit
1e67de6e14
2 changed files with 7 additions and 8 deletions
|
@ -44,7 +44,8 @@ export const load = (async (event) => {
|
||||||
return {
|
return {
|
||||||
lngLat: [adventure.longitude, adventure.latitude],
|
lngLat: [adventure.longitude, adventure.latitude],
|
||||||
name: adventure.name,
|
name: adventure.name,
|
||||||
visits: adventure.visits
|
visits: adventure.visits,
|
||||||
|
type: adventure.type,
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<script>
|
<script>
|
||||||
// @ts-nocheck
|
// @ts-nocheck
|
||||||
|
|
||||||
import { isAdventureVisited } from '$lib';
|
import { isAdventureVisited, typeToString } from '$lib';
|
||||||
import AdventureModal from '$lib/components/AdventureModal.svelte';
|
import AdventureModal from '$lib/components/AdventureModal.svelte';
|
||||||
import {
|
import {
|
||||||
DefaultMarker,
|
DefaultMarker,
|
||||||
|
@ -162,6 +162,7 @@
|
||||||
<Popup openOn="click" offset={[0, -10]}>
|
<Popup openOn="click" offset={[0, -10]}>
|
||||||
<div class="text-lg text-black font-bold">{marker.name}</div>
|
<div class="text-lg text-black font-bold">{marker.name}</div>
|
||||||
<p class="font-semibold text-black text-md">Visited</p>
|
<p class="font-semibold text-black text-md">Visited</p>
|
||||||
|
<p class="font-semibold text-black text-md">{typeToString(marker.type)}</p>
|
||||||
{#if marker.visits && marker.visits.length > 0}
|
{#if marker.visits && marker.visits.length > 0}
|
||||||
<p class="text-black text-sm">
|
<p class="text-black text-sm">
|
||||||
{#each marker.visits as visit}
|
{#each marker.visits as visit}
|
||||||
|
@ -170,9 +171,7 @@
|
||||||
timeZone: 'UTC'
|
timeZone: 'UTC'
|
||||||
})
|
})
|
||||||
: ''}
|
: ''}
|
||||||
{visit.end_date &&
|
{visit.end_date && visit.end_date !== '' && visit.end_date !== visit.start_date
|
||||||
visit.end_date !== '' &&
|
|
||||||
visit.end_date !== visit.start_date
|
|
||||||
? ' - ' +
|
? ' - ' +
|
||||||
new Date(visit.end_date).toLocaleDateString(undefined, {
|
new Date(visit.end_date).toLocaleDateString(undefined, {
|
||||||
timeZone: 'UTC'
|
timeZone: 'UTC'
|
||||||
|
@ -202,6 +201,7 @@
|
||||||
<Popup openOn="click" offset={[0, -10]}>
|
<Popup openOn="click" offset={[0, -10]}>
|
||||||
<div class="text-lg text-black font-bold">{marker.name}</div>
|
<div class="text-lg text-black font-bold">{marker.name}</div>
|
||||||
<p class="font-semibold text-black text-md">Planned</p>
|
<p class="font-semibold text-black text-md">Planned</p>
|
||||||
|
<p class="font-semibold text-black text-md">{typeToString(marker.type)}</p>
|
||||||
{#if marker.visits && marker.visits.length > 0}
|
{#if marker.visits && marker.visits.length > 0}
|
||||||
<p class="text-black text-sm">
|
<p class="text-black text-sm">
|
||||||
{#each marker.visits as visit}
|
{#each marker.visits as visit}
|
||||||
|
@ -210,9 +210,7 @@
|
||||||
timeZone: 'UTC'
|
timeZone: 'UTC'
|
||||||
})
|
})
|
||||||
: ''}
|
: ''}
|
||||||
{visit.end_date &&
|
{visit.end_date && visit.end_date !== '' && visit.end_date !== visit.start_date
|
||||||
visit.end_date !== '' &&
|
|
||||||
visit.end_date !== visit.start_date
|
|
||||||
? ' - ' +
|
? ' - ' +
|
||||||
new Date(visit.end_date).toLocaleDateString(undefined, {
|
new Date(visit.end_date).toLocaleDateString(undefined, {
|
||||||
timeZone: 'UTC'
|
timeZone: 'UTC'
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue