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:
parent
87a804dbc2
commit
acb7470fbb
1 changed files with 8 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue