mirror of
https://github.com/seanmorley15/AdventureLog.git
synced 2025-08-02 19:55:18 +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 {
|
||||
lngLat: [adventure.longitude, adventure.latitude],
|
||||
name: adventure.name,
|
||||
visits: adventure.visits
|
||||
visits: adventure.visits,
|
||||
type: adventure.type,
|
||||
};
|
||||
});
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<script>
|
||||
// @ts-nocheck
|
||||
|
||||
import { isAdventureVisited } from '$lib';
|
||||
import { isAdventureVisited, typeToString } from '$lib';
|
||||
import AdventureModal from '$lib/components/AdventureModal.svelte';
|
||||
import {
|
||||
DefaultMarker,
|
||||
|
@ -162,6 +162,7 @@
|
|||
<Popup openOn="click" offset={[0, -10]}>
|
||||
<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">{typeToString(marker.type)}</p>
|
||||
{#if marker.visits && marker.visits.length > 0}
|
||||
<p class="text-black text-sm">
|
||||
{#each marker.visits as visit}
|
||||
|
@ -170,9 +171,7 @@
|
|||
timeZone: 'UTC'
|
||||
})
|
||||
: ''}
|
||||
{visit.end_date &&
|
||||
visit.end_date !== '' &&
|
||||
visit.end_date !== visit.start_date
|
||||
{visit.end_date && visit.end_date !== '' && visit.end_date !== visit.start_date
|
||||
? ' - ' +
|
||||
new Date(visit.end_date).toLocaleDateString(undefined, {
|
||||
timeZone: 'UTC'
|
||||
|
@ -202,6 +201,7 @@
|
|||
<Popup openOn="click" offset={[0, -10]}>
|
||||
<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">{typeToString(marker.type)}</p>
|
||||
{#if marker.visits && marker.visits.length > 0}
|
||||
<p class="text-black text-sm">
|
||||
{#each marker.visits as visit}
|
||||
|
@ -210,9 +210,7 @@
|
|||
timeZone: 'UTC'
|
||||
})
|
||||
: ''}
|
||||
{visit.end_date &&
|
||||
visit.end_date !== '' &&
|
||||
visit.end_date !== visit.start_date
|
||||
{visit.end_date && visit.end_date !== '' && visit.end_date !== visit.start_date
|
||||
? ' - ' +
|
||||
new Date(visit.end_date).toLocaleDateString(undefined, {
|
||||
timeZone: 'UTC'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue