@@ -844,100 +845,39 @@
{/if}
{#if currentView == 'all'}
- {#if adventures.length > 0}
-
{$t('adventures.linked_adventures')}
-
-
- {#each adventures as adventure}
-
- {/each}
-
- {/if}
-
- {#if transportations.length > 0}
-
{$t('adventures.transportations')}
-
- {#each transportations as transportation}
- {
- transportations = transportations.filter((t) => t.id != event.detail);
- }}
- on:edit={editTransportation}
- {collection}
- />
- {/each}
-
- {/if}
-
- {#if lodging.length > 0}
-
{$t('adventures.lodging')}
-
- {#each lodging as hotel}
- {
- lodging = lodging.filter((t) => t.id != event.detail);
- }}
- on:edit={editLodging}
- {collection}
- />
- {/each}
-
- {/if}
-
- {#if notes.length > 0}
-
{$t('adventures.notes')}
-
- {#each notes as note}
- {
- noteToEdit = event.detail;
- isNoteModalOpen = true;
- }}
- on:delete={(event) => {
- notes = notes.filter((n) => n.id != event.detail);
- }}
- {collection}
- />
- {/each}
-
- {/if}
-
- {#if checklists.length > 0}
-
{$t('adventures.checklists')}
-
- {#each checklists as checklist}
- {
- checklists = checklists.filter((n) => n.id != event.detail);
- }}
- on:edit={(event) => {
- checklistToEdit = event.detail;
- isShowingChecklistModal = true;
- }}
- {collection}
- />
- {/each}
-
- {/if}
-
-
- {#if adventures.length == 0 && transportations.length == 0 && notes.length == 0 && checklists.length == 0 && lodging.length == 0}
-
- {/if}
+
{
+ transportations = transportations.filter((t) => t.id != event.detail);
+ }}
+ on:editLodging={editLodging}
+ on:deleteLodging={(event) => {
+ lodging = lodging.filter((t) => t.id != event.detail);
+ }}
+ on:editNote={(event) => {
+ noteToEdit = event.detail;
+ isNoteModalOpen = true;
+ }}
+ on:deleteNote={(event) => {
+ notes = notes.filter((n) => n.id != event.detail);
+ }}
+ on:editChecklist={(event) => {
+ checklistToEdit = event.detail;
+ isShowingChecklistModal = true;
+ }}
+ on:deleteChecklist={(event) => {
+ checklists = checklists.filter((n) => n.id != event.detail);
+ }}
+ />
{/if}
{#if collection.start_date && collection.end_date}