From 98e6bb2a3711aaa1fcbf1e471bb96d5084dce39d Mon Sep 17 00:00:00 2001
From: sheraj <123598317+sheraj923@users.noreply.github.com>
Date: Thu, 27 Jun 2024 12:51:10 -0600
Subject: [PATCH 1/2] done with pop with
---
Components/ui/spinner.jsx | 23 +++++++++++++++++++
app/restraunt/home/page.js | 21 +++++++++++++++---
app/restraunt/order/page.js | 42 +++++++++++++++++++++++++++++++++--
app/restraunt/setting/page.js | 22 ++++++++++++++----
4 files changed, 99 insertions(+), 9 deletions(-)
create mode 100644 Components/ui/spinner.jsx
diff --git a/Components/ui/spinner.jsx b/Components/ui/spinner.jsx
new file mode 100644
index 0000000..1d0e6a8
--- /dev/null
+++ b/Components/ui/spinner.jsx
@@ -0,0 +1,23 @@
+// components/ui/spinner.js
+export function Spinner() {
+ return (
+
Incoming Orders
@@ -131,6 +144,31 @@ export default function Order() {
+
+
+
+
+
+
+ {isLoading ? 'Notifying Customer...' : 'Notification Complete'}
+
+ {isLoading ? (
+
+
+
Please wait while we notify the customer.
+
+ ) : (
+ 'The customer has been successfully notified.'
+ )}
+
+
+ {!isLoading && (
+
+ setIsDialogOpen(false)}>Close
+
+ )}
+
+
diff --git a/app/restraunt/setting/page.js b/app/restraunt/setting/page.js
index c731eea..91f7a9c 100644
--- a/app/restraunt/setting/page.js
+++ b/app/restraunt/setting/page.js
@@ -6,8 +6,14 @@ import { Input } from "@/components/ui/input"
import { Button } from "@/components/ui/button"
import { AlertDialog , AlertDialogContent , AlertDialogHeader , AlertDialogTitle , AlertDialogDescription , AlertDialogFooter , AlertDialogCancel ,AlertDialogAction , AlertDialogTrigger} from "@/components/ui/alert-dialog"
import { Dialog, DialogContent, DialogFooter, DialogClose } from "@/components/ui/dialog"
-
+import { deleteRestaurantData } from "@/services/PostRequest/postRequest"
+import { getRestaurantInformationByUser } from "@/services/GetRequest/getRequest"
+import { useUserAuth } from '@/services/utils';
+import { useEffect } from "react"
export default function Component() {
+ const { user } = useUserAuth();
+ const [restaurantData, setRestaurantData] = useState([]);
+
const [showCurrentPassword, setShowCurrentPassword] = useState(false)
const [showNewPassword, setShowNewPassword] = useState(false)
const [showConfirmPassword, setShowConfirmPassword] = useState(false)
@@ -16,6 +22,14 @@ export default function Component() {
setShowPasswordResetModal(true)
}
+ useEffect(() => {
+ async function fetchData() {
+ const data = await getRestaurantInformationByUser(user);
+ console.log(data)
+ setRestaurantData(data);
+ }
+ fetchData();
+ }, []);
return (
@@ -29,11 +43,11 @@ export default function Component() {
@@ -139,7 +153,7 @@ export default function Component() {
-
From 63f9d5c987aa945546bb0ce0d73c8b39a0ea4a03 Mon Sep 17 00:00:00 2001
From: sheraj <123598317+sheraj923@users.noreply.github.com>
Date: Thu, 27 Jun 2024 12:53:35 -0600
Subject: [PATCH 2/2] made the timmer longer
---
app/restraunt/setting/page.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/app/restraunt/setting/page.js b/app/restraunt/setting/page.js
index 91f7a9c..32f672c 100644
--- a/app/restraunt/setting/page.js
+++ b/app/restraunt/setting/page.js
@@ -43,11 +43,11 @@ export default function Component() {