1
0
Fork 0
mirror of https://github.com/seanmorley15/AdventureLog.git synced 2025-07-20 21:39:37 +02:00

feat: Add functionality to change a non-adventure to an adventure in AdventureCard component

This commit is contained in:
Sean Morley 2024-07-27 15:49:57 -04:00
parent 87a804dbc2
commit acb7470fbb

View file

@ -209,11 +209,18 @@
><CheckBold class="w-6 h-6" />Mark Visited</button
>
{/if}
{#if adventure.collection}
<!-- remove from adventure -->
{#if (adventure.collection && adventure.type == 'visited') || adventure.type == 'planned'}
<button class="btn btn-neutral mb-2" on:click={removeFromCollection}
><LinkVariantRemove class="w-6 h-6" />Remove from Collection</button
>
{/if}
<!-- change a non adventure to an adventure -->
{#if adventure.collection && adventure.type == 'lodging'}
<button class="btn btn-neutral mb-2" on:click={changeType('visited')}
><CheckBold class="w-6 h-6" />Change to Visit</button
>
{/if}
{#if !adventure.collection}
<button class="btn btn-neutral mb-2" on:click={() => (isCollectionModalOpen = true)}
><Plus class="w-6 h-6" />Add to Collection</button