Skip to content

Commit

Permalink
Updated
Browse files Browse the repository at this point in the history
  • Loading branch information
killshotxd committed Nov 17, 2023
1 parent 7c9255a commit 76c8184
Show file tree
Hide file tree
Showing 23 changed files with 804 additions and 320 deletions.
5 changes: 5 additions & 0 deletions .firebaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"projects": {
"default": "school-portal-6adb1"
}
}
1 change: 1 addition & 0 deletions Firebase.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions blueprint.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Welcome to {{ pkg.name }}. This is version {{ pkg.version }}!
16 changes: 16 additions & 0 deletions firebase.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"hosting": {
"public": "dist",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
],
"rewrites": [
{
"source": "**",
"destination": "/index.html"
}
]
}
}
36 changes: 4 additions & 32 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,44 +8,16 @@
href="/src/assets/invoice_106601.ico"
/>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="title" content="School Inventory Management " />
<!-- <meta
name="description"
content="Invoice pro is best invoice generation tool available online. Invoice generation was never this easy. Opt out for our free invoice generation service."
/>
<meta
name="keywords"
content="invoice,invoice tool,invoice service, business invoice,delivery challan,Invoice tool,generate free invoice"
/> -->
<!-- <meta name="robots" content="index, follow" /> -->
<meta name="title" content="School Portal " />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="language" content="English" />
<!-- Open Graph / Facebook -->
<meta property="og:type" content="website" />
<!-- <meta
property="og:url"
content="https://shine-computers-invoice.vercel.app/"
/> -->
<meta property="og:title" content="School Inventory Management" />
<!-- <meta
property="og:description"
content="Invoice pro is best invoice generation tool available online. Invoice generation was never this easy. Opt out for our free invoice generation service."
/> -->
<meta property="og:title" content="School Portal" />
<meta property="og:image" content="/src/assets/invoice_106601.ico" />

<!-- Twitter -->
<meta property="twitter:card" content="summary_large_image" />
<!-- <meta
property="twitter:url"
content="https://shine-computers-invoice.vercel.app/"
/> -->
<meta property="twitter:title" content="School Inventory Management" />
<!-- <meta
property="twitter:description"
content="Invoice pro is best invoice generation tool available online. Invoice generation was never this easy. Opt out for our free invoice generation service."
/> -->
<meta property="twitter:title" content="School Portal" />
<meta property="twitter:image" content="/src/assets/invoice_106601.ico" />
<title>School Inventory Management</title>
<title>School Portal</title>
</head>
<body>
<div id="root"></div>
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "invoice-pro",
"name": "school-portal",
"private": true,
"version": "0.0.0",
"type": "module",
Expand Down
72 changes: 60 additions & 12 deletions src/app.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -55,9 +56,6 @@ const App = () => {
console.log(error);
}
};
if (!currentUser) {
navigate("/");
}

const getUser = async () => {
try {
Expand Down Expand Up @@ -105,7 +103,10 @@ const App = () => {
}, []);
useEffect(() => {
getUser();
}, [currentUser]);
if (!currentUser) {
navigate("/");
}
}, [currentUser, routeState]);
useEffect(() => {
setRouteState(location.pathname);
}, [routeState, location.pathname]);
Expand Down Expand Up @@ -169,13 +170,18 @@ const App = () => {
</div> */}

<div className="mt-8 text-center">
<img src={logo} alt="" width={180} />
<h5 className="mt-4 hidden text-4xl font-semibold text-gray-600 lg:block dark:text-gray-300">
DRF
<img
className="flex justify-center m-auto"
src={logo}
alt=""
width={180}
/>
{/* <h5 className="mt-4 hidden text-4xl font-bold text-red-600 lg:block dark:text-gray-300">
Done Right Food
</h5>
<span className="hidden text-gray-400 lg:block">
<span className="hidden text-black-600 font-bold lg:block text-2xl">
School Ordering Portal
</span>
</span> */}
</div>

<ul className="mt-8 space-y-2 tracking-wide">
Expand Down Expand Up @@ -490,7 +496,7 @@ const App = () => {
/>
</svg>
<span className="group-hover:text-gray-700 dark:group-hover:text-gray-50">
Pending Orders
Pending Items
</span>
</a>
</li>
Expand Down Expand Up @@ -528,6 +534,40 @@ const App = () => {
</span>
</a>
</li>
<li>
<a
onClick={() => {
navigate("/rejected-orders");
setMl();
}}
className={
routeState == "/rejected-orders"
? "relative flex cursor-pointer items-center space-x-4 rounded-xl bg-gradient-to-r from-sky-600 to-cyan-400 px-4 py-3 text-white"
: "group flex items-center space-x-4 cursor-pointer rounded-md px-4 py-3 text-gray-600 dark:text-gray-300"
}
>
<svg
xmlns="http://www.w3.org/2000/svg"
className="h-5 w-5"
viewBox="0 0 20 20"
fill="currentColor"
>
<path
className="fill-current text-gray-600 group-hover:text-cyan-600 dark:group-hover:text-sky-400"
fillRule="evenodd"
d="M2 5a2 2 0 012-2h8a2 2 0 012 2v10a2 2 0 002 2H4a2 2 0 01-2-2V5zm3 1h6v4H5V6zm6 6H5v2h6v-2z"
clipRule="evenodd"
/>
<path
className="fill-current text-gray-300 group-hover:text-cyan-300"
d="M15 7h1a2 2 0 012 2v5.5a1.5 1.5 0 01-3 0V7z"
/>
</svg>
<span className="group-hover:text-gray-700 dark:group-hover:text-gray-50">
Rejected Items
</span>
</a>
</li>
</>
)}

Expand Down Expand Up @@ -615,7 +655,7 @@ const App = () => {
</div>
</aside>

<div className="ml-auto mb-6 lg:w-[75%] xl:w-[80%] 2xl:w-[83%]">
<div className="ml-auto mb-6 lg:w-[75%] xl:w-[80%] 2xl:w-[83%] w-[100%]">
<div
className={
window.innerWidth < 768
Expand Down Expand Up @@ -770,7 +810,7 @@ const App = () => {
</div>
</div> */}
</div>
<div className="px-6 pt-6 2xl:container bg-white">
<div className="px-6 pt-6 5xl:container bg-white">
<div className="h-[85vh] rounded-xl ">
<Routes>
<Route
Expand Down Expand Up @@ -950,6 +990,14 @@ const App = () => {
</PrivateRoute>
}
/>
<Route
path="/rejected-orders"
element={
<PrivateRoute>
<RejectedOrder />
</PrivateRoute>
}
/>
</Routes>

{/* {userData?.watermark !== "" ? (
Expand Down
4 changes: 3 additions & 1 deletion src/components/pages/Cart/Cart.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ const Cart = () => {
}, 0);

const handleOrder = async () => {
const schoolMails = localStorage.getItem("schoolMails");
setSendOrder(true);
let emailSent = false;
try {
Expand Down Expand Up @@ -306,6 +307,7 @@ const Cart = () => {
method: "POST",
body: JSON.stringify({
products,
schoolMails: schoolMails,
}),
headers: {
"Content-Type": "application/json",
Expand Down Expand Up @@ -510,7 +512,7 @@ const Cart = () => {
</div>

<div className="flex gap-2 items-center">
<p>Pick a delivery date :</p>{" "}
<p>Requested Delivery Date :</p>{" "}
<DatePicker
selected={selectedDate}
value={
Expand Down
Loading

0 comments on commit 76c8184

Please sign in to comment.