From 76c81848d7daf7f52adfaca87adf6cdb98409b70 Mon Sep 17 00:00:00 2001 From: Mohd Hassan Date: Fri, 17 Nov 2023 10:37:47 +0530 Subject: [PATCH] Updated --- .firebaserc | 5 + Firebase.jsx | 1 + blueprint.md | 1 + firebase.json | 16 + index.html | 36 +-- package-lock.json | 4 +- package.json | 2 +- src/app.jsx | 72 ++++- src/components/pages/Cart/Cart.jsx | 4 +- src/components/pages/Dashboard.jsx | 205 ++++++++++-- src/components/pages/Favorites/Favorites.jsx | 2 +- src/components/pages/Login.jsx | 2 +- .../pages/Orders/ConfirmedOrders.jsx | 36 ++- src/components/pages/Orders/OrderInfo.jsx | 28 +- src/components/pages/Orders/OrderPending.jsx | 2 +- src/components/pages/Orders/OrderStatus.jsx | 4 +- .../pages/Products/ListProducts.jsx | 164 +++++----- .../pages/School-Products/ProductInfo.jsx | 4 +- .../pages/School-Products/SchoolProducts.jsx | 2 +- src/components/pages/Schools/AddSchools.jsx | 29 +- src/components/pages/Schools/ListSchools.jsx | 209 +++++++------ .../pages/Schools/RejectedOrder.jsx | 292 ++++++++++++++++++ src/index.css | 4 + 23 files changed, 804 insertions(+), 320 deletions(-) create mode 100644 .firebaserc create mode 100644 blueprint.md create mode 100644 firebase.json create mode 100644 src/components/pages/Schools/RejectedOrder.jsx diff --git a/.firebaserc b/.firebaserc new file mode 100644 index 0000000..a35704e --- /dev/null +++ b/.firebaserc @@ -0,0 +1,5 @@ +{ + "projects": { + "default": "school-portal-6adb1" + } +} diff --git a/Firebase.jsx b/Firebase.jsx index ca91292..1e37c16 100644 --- a/Firebase.jsx +++ b/Firebase.jsx @@ -12,6 +12,7 @@ import { getStorage } from "firebase/storage"; const firebaseConfig = { apiKey: import.meta.env.VITE_FIRE_API_KEY, authDomain: import.meta.env.VITE_FIRE_AUTH_DOM, + databaseURL: import.meta.env.VITE_FIRE_DB_URL, projectId: import.meta.env.VITE_FIRE_PRJ_ID, storageBucket: import.meta.env.VITE_FIRE_STG_BKT, messagingSenderId: import.meta.env.VITE_FIRE_MSG_ID, diff --git a/blueprint.md b/blueprint.md new file mode 100644 index 0000000..7047399 --- /dev/null +++ b/blueprint.md @@ -0,0 +1 @@ +Welcome to {{ pkg.name }}. This is version {{ pkg.version }}! diff --git a/firebase.json b/firebase.json new file mode 100644 index 0000000..2c33c29 --- /dev/null +++ b/firebase.json @@ -0,0 +1,16 @@ +{ + "hosting": { + "public": "dist", + "ignore": [ + "firebase.json", + "**/.*", + "**/node_modules/**" + ], + "rewrites": [ + { + "source": "**", + "destination": "/index.html" + } + ] + } +} diff --git a/index.html b/index.html index 0332eb7..add61e0 100644 --- a/index.html +++ b/index.html @@ -8,44 +8,16 @@ href="/src/assets/invoice_106601.ico" /> - - - + - - - - + - - - - - + - School Inventory Management + School Portal
diff --git a/package-lock.json b/package-lock.json index 5594751..9088709 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,11 +1,11 @@ { - "name": "invoice-pro", + "name": "school-portal", "version": "0.0.0", "lockfileVersion": 2, "requires": true, "packages": { "": { - "name": "invoice-pro", + "name": "school-portal", "version": "0.0.0", "dependencies": { "chart.js": "^4.3.3", diff --git a/package.json b/package.json index 3be6f4c..5fce5bb 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "invoice-pro", + "name": "school-portal", "private": true, "version": "0.0.0", "type": "module", diff --git a/src/app.jsx b/src/app.jsx index 0d1135d..123dc7a 100644 --- a/src/app.jsx +++ b/src/app.jsx @@ -39,6 +39,7 @@ import BuyerInvoice from "./components/pages/Invoice/BuyerInvoice"; import BatchInvoice from "./components/pages/Invoice/BatchInvoice"; import OrderPending from "./components/pages/Orders/OrderPending"; import logo from "./assets/7.jpg"; +import RejectedOrder from "./components/pages/Schools/RejectedOrder"; const App = () => { const { currentUser, logout } = UserAuth(); const [userData, setUserData] = useState(null); @@ -55,9 +56,6 @@ const App = () => { console.log(error); } }; - if (!currentUser) { - navigate("/"); - } const getUser = async () => { try { @@ -105,7 +103,10 @@ const App = () => { }, []); useEffect(() => { getUser(); - }, [currentUser]); + if (!currentUser) { + navigate("/"); + } + }, [currentUser, routeState]); useEffect(() => { setRouteState(location.pathname); }, [routeState, location.pathname]); @@ -169,13 +170,18 @@ const App = () => { */}
- -
- DRF + + {/*
+ Done Right Food
- + School Ordering Portal - + */}