1
0
Fork 0
mirror of https://github.com/seanmorley15/AdventureLog.git synced 2025-07-25 15:59:38 +02:00

lodging beta

This commit is contained in:
Sean Morley 2024-07-27 15:41:26 -04:00
parent 0ea9f1d73e
commit 87a804dbc2
6 changed files with 69 additions and 7 deletions

View file

@ -149,9 +149,12 @@
<div>
{#if adventure.type == 'visited' && user?.pk == adventure.user_id}
<div class="badge badge-primary">Visited</div>
{:else if user?.pk == adventure.user_id}
{:else if user?.pk == adventure.user_id && adventure.type == 'planned'}
<div class="badge badge-secondary">Planned</div>
{:else if user?.pk == adventure.user_id && adventure.type == 'lodging'}
<div class="badge badge-success">Lodging</div>
{/if}
<div class="badge badge-neutral">{adventure.is_public ? 'Public' : 'Private'}</div>
</div>
{#if adventure.location && adventure.location !== ''}

View file

@ -11,6 +11,7 @@
export let longitude: number | null = null;
export let latitude: number | null = null;
export let collection_id: number | null = null;
import MapMarker from '~icons/mdi/map-marker';
import Calendar from '~icons/mdi/calendar';
@ -39,7 +40,7 @@
latitude: null,
longitude: null,
is_public: false,
collection: null
collection: collection_id || NaN
};
if (longitude && latitude) {
@ -371,6 +372,14 @@
bind:value={newAdventure.longitude}
class="input input-bordered w-full max-w-xs mt-1"
/>
<input
type="text"
id="collection"
name="collection"
hidden
bind:value={newAdventure.collection}
class="input input-bordered w-full max-w-xs mt-1"
/>
<button type="submit" class="btn btn-primary mr-4 mt-4">Create</button>
<button type="button" class="btn mt-4" on:click={close}>Close</button>