mirror of
https://github.com/seanmorley15/AdventureLog.git
synced 2026-03-11 10:57:40 -04:00
Add type to map tag
This commit is contained in:
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user