|
|
@@ -12,21 +12,11 @@
|
|
|
let description: string = "Description ...";
|
|
|
|
|
|
let selectedDate: Date = new Date();
|
|
|
-
|
|
|
+ let activateModal: boolean = false;
|
|
|
let appointmentDateTimes: AppointmentDateTimes[] = [
|
|
|
|
|
|
];
|
|
|
|
|
|
- $: {
|
|
|
- updateSelectedDate(selectedDate);
|
|
|
- }
|
|
|
-
|
|
|
- function updateSelectedDate(date: Date) {
|
|
|
- // request appointment date times from backend
|
|
|
- console.log("updating");
|
|
|
- console.log(date);
|
|
|
- }
|
|
|
-
|
|
|
async function getAppointmentInfo(appointmentId: string) {
|
|
|
const response = await fetch(`${api_host}/api/schedule?appointmentId=${appointmentId}`, {
|
|
|
method: "GET",
|
|
|
@@ -62,8 +52,8 @@
|
|
|
<div class="top-margin w-80 inline-margin">
|
|
|
<AppointmentInfo bind:title bind:description bind:location />
|
|
|
{#key selectedDate}
|
|
|
- <DateTimes bind:selectedDate bind:availableTimes={appointmentDateTimes} />
|
|
|
+ <DateTimes bind:activateModal bind:selectedDate bind:availableTimes={appointmentDateTimes} />
|
|
|
{/key}
|
|
|
</div>
|
|
|
|
|
|
-<AppointmentConfirmDialog active={true} />
|
|
|
+<AppointmentConfirmDialog bind:active={activateModal} bind:date={selectedDate} bind:title bind:description bind:location />
|