Refactor release workflow to use "released" event type

This commit is contained in:
Sean Morley
2024-10-04 21:33:02 -04:00
parent d0791faad5
commit f354cd1ffe
5 changed files with 125 additions and 57 deletions

View File

@@ -40,6 +40,7 @@
import EditAdventure from '$lib/components/AdventureModal.svelte';
import AdventureModal from '$lib/components/AdventureModal.svelte';
import ImageDisplayModal from '$lib/components/ImageDisplayModal.svelte';
import { typeToString } from '$lib';
onMount(() => {
if (data.props.adventure) {
@@ -310,7 +311,7 @@
<div>
<p class="text-sm text-muted-foreground">Adventure Type</p>
<p class="text-base font-medium">
{adventure.type[0].toLocaleUpperCase() + adventure.type.slice(1)}
{typeToString(adventure.type)}
</p>
</div>
{#if data.props.collection}
@@ -322,6 +323,34 @@
>
</div>
{/if}
{#if adventure.visits.length > 0}
<div>
<p class="text-sm text-muted-foreground">Visits</p>
<p class="text-base font-medium">
{adventure.visits.length}
{adventure.visits.length > 1 ? 'visits' : 'visit' + ':'}
</p>
<!-- show each visit start and end date as well as notes -->
{#each adventure.visits as visit}
<div class="grid gap-2">
<p class="text-sm text-muted-foreground">
{visit.start_date
? new Date(visit.start_date).toLocaleDateString(undefined, {
timeZone: 'UTC'
})
: ''}
{visit.end_date && visit.end_date !== ''
? ' - ' +
new Date(visit.end_date).toLocaleDateString(undefined, {
timeZone: 'UTC'
})
: ''}
</p>
<p class="text-sm text-muted-foreground -mt-2 mb-2">{visit.notes}</p>
</div>
{/each}
</div>
{/if}
</div>
{#if adventure.longitude && adventure.latitude}
<div class="grid md:grid-cols-2 gap-4">