From 01c79929b0493ebe5aa8dfc69c1cebe28738a2b2 Mon Sep 17 00:00:00 2001
From: survellow <59056368+survellow@users.noreply.github.com.>
Date: Thu, 25 Jan 2024 22:41:01 +0100
Subject: [PATCH] feat:#5 add slider for time range selection
---
frontend/src/main.ts | 2 +
frontend/src/view/FreeRooms.vue | 159 ++++++++++++++++++++++++++------
2 files changed, 135 insertions(+), 26 deletions(-)
diff --git a/frontend/src/main.ts b/frontend/src/main.ts
index c9dc23f..379aef8 100644
--- a/frontend/src/main.ts
+++ b/frontend/src/main.ts
@@ -14,6 +14,7 @@ import InputSwitch from "primevue/inputswitch";
import Card from "primevue/card";
import DataView from "primevue/dataview";
import Dialog from "primevue/dialog";
+import Slider from 'primevue/slider';
import ToggleButton from "primevue/togglebutton";
import "primeicons/primeicons.css";
import "primeflex/primeflex.css";
@@ -58,6 +59,7 @@ app.component("InputText", InputText);
app.component("InputSwitch", InputSwitch);
app.component("Card", Card);
app.component("DataView", DataView);
+app.component("Slider", Slider);
app.component("ToggleButton", ToggleButton);
app.component("SpeedDial", SpeedDial);
app.component("TabView", TabView);
diff --git a/frontend/src/view/FreeRooms.vue b/frontend/src/view/FreeRooms.vue
index 2cb1ff6..2c71df8 100644
--- a/frontend/src/view/FreeRooms.vue
+++ b/frontend/src/view/FreeRooms.vue
@@ -1,4 +1,5 @@
+
-
-
+ {timeRange[0] = start.getHours() * 60 + start.getMinutes();}"
+ type="time"
+ placeholder="start"
+ time-only
+ hour-format="24"
+ date-format="HH:mm"
+ :class="[{'p-invalid':isLater}, flexSpecs]"
+ panel-class="min-w-min"
+ touchUI
+ />
+ {timeRange[1] = end.getHours() * 60 + end.getMinutes();}"
+ type="time"
+ time-only
+ hour-format="24"
+ placeholder="end"
+ date-format="HH:mm"
+ :class="[{'p-invalid':isLater}, flexSpecs]"
+ panel-class="min-w-min"
+ touchUI
+ />
+
+
+
+
+
+
+
@@ -58,18 +83,73 @@