Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
57e3526
commit 1afe7dc
Showing
7 changed files
with
61 additions
and
7 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,16 @@ | ||
<script lang="ts"> | ||
import Datepicker from './lib/Datepicker.svelte'; | ||
let pickedDate: Date; | ||
import { Link, Route, Router } from 'svelte-routing'; | ||
import Calendar from './routes/calendar/Calendar.svelte'; | ||
import LostAndFound from './routes/lost-and-found/LostAndFound.svelte'; | ||
</script> | ||
|
||
<main> | ||
<p>{pickedDate}</p> | ||
<Datepicker bind:date={pickedDate} /> | ||
</main> | ||
<Router> | ||
<nav> | ||
<Link to="/">Calendar</Link> | ||
<Link to="/lost-and-found">Blog</Link> | ||
</nav> | ||
<main> | ||
<Route path="/lost-and-found" component={LostAndFound} /> | ||
<Route path="/"><Calendar /></Route> | ||
</main> | ||
</Router> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
export interface Reservation { | ||
id: string; | ||
owner: string; | ||
startTime: number; //timestamp | ||
endTime: number; //timestamp | ||
} | ||
|
||
export type ReservationStoreData = Reservation[] | null; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { writable } from 'svelte/store'; | ||
import type { Reservation, ReservationStoreData } from './reservation.model'; | ||
|
||
const mockedReservations: Reservation[] = [ | ||
{ | ||
id: '1', | ||
owner: '1', | ||
startTime: 1698667200, | ||
endTime: 1698670800, | ||
}, | ||
{ | ||
id: '2', | ||
owner: '2', | ||
startTime: 1698678000, | ||
endTime: 1698681600, | ||
}, | ||
]; | ||
|
||
const reservations$ = writable<ReservationStoreData>(null); | ||
|
||
export const loadSlots = (): Reservation[] => { | ||
return mockedReservations; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<script lang="ts"> | ||
import Datepicker from '../../lib/Datepicker.svelte'; | ||
let pickedDate: Date; | ||
</script> | ||
|
||
<p>{pickedDate}</p> | ||
<Datepicker bind:date={pickedDate} /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<p>Hello Ariane!</p> |