1
0
Fork 0
mirror of https://github.com/seanmorley15/AdventureLog.git synced 2025-07-19 12:59:36 +02:00

feat(calendar): add adventure detail link in event modal

This commit is contained in:
Sean Morley 2025-06-19 11:37:08 -04:00
parent 36f9022872
commit a6b39f64d6
2 changed files with 12 additions and 1 deletions

View file

@ -34,6 +34,7 @@ export const load = (async (event) => {
formattedEnd: string; formattedEnd: string;
location?: string; location?: string;
description?: string; description?: string;
adventureId?: string;
}; };
}> = []; }> = [];
@ -119,7 +120,8 @@ export const load = (async (event) => {
? formatAllDayDate(visit.end_date || visit.start_date) ? formatAllDayDate(visit.end_date || visit.start_date)
: formatDateInTimezone(visit.end_date || visit.start_date, targetTimezone), : formatDateInTimezone(visit.end_date || visit.start_date, targetTimezone),
location: adventure.location || '', location: adventure.location || '',
description: adventure.description || '' description: adventure.description || '',
adventureId: adventure.id
} }
}); });
} }

View file

@ -408,6 +408,15 @@
</div> </div>
</div> </div>
{/if} {/if}
{#if selectedEvent.extendedProps.adventureId}
<a
href={`/adventures/${selectedEvent.extendedProps.adventureId}`}
class="btn btn-neutral btn-block mt-4"
>
{$t('map.view_details')}
</a>
{/if}
</div> </div>
<div class="modal-action mt-8"> <div class="modal-action mt-8">