feat(calendar): add adventure detail link in event modal
This commit is contained in:
@@ -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
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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">
|
||||||
|
|||||||
Reference in New Issue
Block a user