1
0
Fork 0
mirror of https://github.com/seanmorley15/AdventureLog.git synced 2025-07-23 06:49:37 +02:00

add transportation

This commit is contained in:
Sean Morley 2024-07-28 09:10:59 -04:00
parent 61c3d23efa
commit 6155d531ab
5 changed files with 267 additions and 28 deletions

View file

@ -11,18 +11,13 @@
let originalName = transportationToEdit.name;
let isPointModalOpen: boolean = false;
import MapMarker from '~icons/mdi/map-marker';
import Calendar from '~icons/mdi/calendar';
import Notebook from '~icons/mdi/notebook';
import ClipboardList from '~icons/mdi/clipboard-list';
import Image from '~icons/mdi/image';
import Star from '~icons/mdi/star';
import Attachment from '~icons/mdi/attachment';
import PointSelectionModal from './PointSelectionModal.svelte';
import Earth from '~icons/mdi/earth';
import TransportationCard from './TransportationCard.svelte';
import PlaneCar from '~icons/mdi/plane-car';
import LinkVariant from '~icons/mdi/link-variant';
import Airplane from '~icons/mdi/airplane';
onMount(async () => {
modal = document.getElementById('my_modal_1') as HTMLDialogElement;
@ -99,7 +94,7 @@
class="input input-bordered w-full max-w-xs mt-1"
/>
<div class="mb-2">
<label for="type">Type <Calendar class="inline-block mb-1 w-6 h-6" /></label><br />
<label for="type">Type <PlaneCar class="inline-block mb-1 w-6 h-6" /></label><br />
<select
class="select select-bordered w-full max-w-xs"
name="type"
@ -164,7 +159,7 @@
/>
</div>
<div class="mb-2">
<label for="rating">Link <Star class="inline-block mb-1 w-6 h-6" /></label><br />
<label for="rating">Link <LinkVariant class="inline-block mb-1 w-6 h-6" /></label><br />
<input
type="url"
id="link"
@ -173,22 +168,11 @@
class="input input-bordered w-full max-w-xs mt-1"
/>
</div>
<div class="mb-2">
<label for="rating">Rating <Star class="inline-block mb-1 w-6 h-6" /></label><br />
<input
type="number"
max="5"
min="0"
id="rating"
name="rating"
bind:value={transportationToEdit.rating}
class="input input-bordered w-full max-w-xs mt-1"
/>
</div>
{#if transportationToEdit.type == 'plane'}
<div class="mb-2">
<label for="flight_number"
>Flight Number <Star class="inline-block mb-1 w-6 h-6" /></label
>Flight Number <Airplane class="inline-block mb-1 w-6 h-6" /></label
><br />
<input
type="text"
@ -200,8 +184,8 @@
</div>
{/if}
<div class="mb-2">
<label for="rating">From Location <Star class="inline-block mb-1 w-6 h-6" /></label><br
/>
<label for="rating">From Location <MapMarker class="inline-block mb-1 w-6 h-6" /></label
><br />
<input
type="text"
id="from_location"
@ -211,7 +195,8 @@
/>
</div>
<div class="mb-2">
<label for="rating">To Location <Star class="inline-block mb-1 w-6 h-6" /></label><br />
<label for="rating">To Location <MapMarker class="inline-block mb-1 w-6 h-6" /></label
><br />
<input
type="text"
id="to_location"