Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion admin-side.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Mit Canteen | Sie</title>
<title>Canteen Automation System | Sie</title>

<!-- Page Icon -->
<link rel="Micosoft icon" href="assets/images/MIT LOGO.png" />
Expand Down
Binary file modified assets/images/footer-illustration.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
30 changes: 22 additions & 8 deletions assets/js/admin.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
console.log("Admin JS loaded!");

// --- Admin Product Management Btns ---
const addProductBtn = document.querySelector("#add-product-menu");
const removeProductBtn = document.querySelector("#remove-product-menu");
Expand All @@ -6,21 +8,33 @@ const removeProductBtn = document.querySelector("#remove-product-menu");
const addContainer = document.querySelector(".add-container");
const removeContainer = document.querySelector(".remove-container");

// Admin Side URL
const adminSRC = "http://127.0.0.1:5502/admin-side.html";

// --- Admin Side ---
if (adminSRC === window.location.href) {
console.log("admin side");
// Admin Management Btns
// Check if elements exist before adding event listeners
if (addProductBtn && addContainer && removeContainer) {
addProductBtn.addEventListener("click", () => {
addContainer.classList.toggle("show-container");
removeContainer.classList.remove("show-container");
});
}

// Admin Management Btns
if (removeProductBtn && addContainer && removeContainer) {
removeProductBtn.addEventListener("click", () => {
removeContainer.classList.toggle("show-container");
addContainer.classList.remove("show-container");
});
}

// --- Order Page Fix ---
document.addEventListener("DOMContentLoaded", () => {
const orderPage = document.querySelector("body"); // Check if we're on order.html
if (orderPage) {
console.log("Order page detected!");

// Example: Ensuring order-related elements exist
const orderTable = document.querySelector("table");
if (orderTable) {
console.log("Order table found!");
} else {
console.warn("Order table not found.");
}
}
});
11 changes: 0 additions & 11 deletions assets/js/features.js
Original file line number Diff line number Diff line change
Expand Up @@ -288,11 +288,6 @@ function customerFooterUI() {
</ul>
</article>
</main>
<!-- Deep Devs Info -->
<main class="deep-devs flex">
<div>© Copyright 2020 - 2021. All Rights Reserved</div>
<div class="">Designed & Developed with <i class="fas fa-heart clr-red"></i> By <a href="#">Deep Devs</a></div>
</main>
</section>
`;
})
Expand Down Expand Up @@ -342,12 +337,6 @@ function userFooterUI() {
<li> <i class="fas fa-globe-asia"></i> <p>For Professional Courses, Visit: www.altius.ac.in</p></li>
</ul>
</article>
</main>
<!-- Deep Devs Info -->
<main class="deep-devs flex">
<div>© Copyright 2020 - 2021. All Rights Reserved</div>
<div class="">Designed & Developed with <i class="fas fa-heart clr-red"></i> By <a href="#">Deep Devs</a></div>
</main>
</section>
`;
})
Expand Down
13 changes: 7 additions & 6 deletions assets/js/functioning.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
// --- Authentication Part ---
// Your web app's Firebase configuration
var firebaseConfig = {
apiKey: "AIzaSyDBn5GMIvsqhTPMVAeylq-I_2R8SSJYzmI",
authDomain: "js-login-form.firebaseapp.com",
projectId: "js-login-form",
storageBucket: "js-login-form.appspot.com",
messagingSenderId: "1039987076182",
appId: "1:1039987076182:web:e51f940647b55c0cd7dff7",
apiKey: "AIzaSyBQKKbbd_0skAQidmlyqMEgeSky5hfPNI0",
authDomain: "mit-canteen-21c53.firebaseapp.com",
projectId: "mit-canteen-21c53",
storageBucket: "mit-canteen-21c53.firebasestorage.app",
messagingSenderId: "162842621279",
appId: "1:162842621279:web:92663f913df89adf5cf2ea",
measurementId: "G-28Y95R0R65"
};

// Initialize Firebase
Expand Down
30 changes: 16 additions & 14 deletions client-side.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Mit Canteen | Menu</title>
<title>Canteen Automation System | Menu</title>

<!-- Page Icon -->
<link rel="Micosoft icon" href="assets/images/MIT LOGO.png">
Expand Down Expand Up @@ -108,48 +108,50 @@
</section>

<!-- Menu Showcase -->
<!-- Hero -->
<section class="menu-hero">
<div class="banner">
<h1 class="banner-title lg">Our Menu</h1>
<button class="banner-btn btn">order now</button>
<!-- FIXED "Order Now" BUTTON -->
<button class="banner-btn btn" id="orderNowBtn">Order Now</button>
</div>
</section>

<!-- Menu -->
<section class="menu" style="margin-bottom: 5rem;">
<main class="container grid grid-1">
<!-- Title -->
<div class="title text-center">
<div class="title text-center">
<h2 class="lg my-2">Filter By Category</h2>
<!-- Filter Buttons -->
<div class="btn-container grid grid-4">
<button id="menu-filter" class="filter-btn btn current" type="button" data-id="all">All</button>
<button id="menu-filter" class="filter-btn btn" type="button" data-id="Burger">Burger</button>
<button id="menu-filter" class="filter-btn btn" type="button" data-id="Sandwitch">Sandwich</button>
<button id="menu-filter" class="filter-btn btn" type="button" data-id="Sandwich">Sandwich</button>
<button id="menu-filter" class="filter-btn btn" type="button" data-id="Fries">Fries</button>
<button id="menu-filter" class="filter-btn btn fv" type="button" data-id="Maggie">Maggie</button>
<button id="menu-filter" class="filter-btn btn" type="button" data-id="Maggie">Maggie</button>
<button id="menu-filter" class="filter-btn btn" type="button" data-id="Beverages">Beverages</button>
<button id="menu-filter" class="filter-btn btn" type="button" data-id="Pasta">Pasta</button>
</div>
</div>
<hr>
<!-- Menu Items -->
<div class="menu-section grid grid-3">
<!-- Menu Item -->
<!-- Menu Items -->
</div>
</main>
</section>

<!-- User Footer -->
<footer class="customer-footer" id="user-footer" style="margin-top: 10rem;"><!-- Comes Through JS --></footer>

<!-- Menu & Admin Stuff -->
<!-- Scripts -->
<script src="assets/js/main.js"></script>
<!-- Creative Features -->
<script src="assets/js/features.js"></script>
<!-- Controls User Stuff -->
<script src="assets/js/functioning.js"></script>

<!-- FIXED SCRIPT FOR ORDER NOW BUTTON -->
<script>
document.getElementById("orderNowBtn").addEventListener("click", function() {
window.location.href = "user-orders.html";
});
</script>

</body>
</html>
</html>
21 changes: 21 additions & 0 deletions firebase.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"hosting": {
"public": "public",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
],
"rewrites": [
{
"source": "**",
"destination": "/index.html"
}
]
},
"firestore": {
"rules": "firestore.rules",
"indexes": "firestore.indexes.json"
}
}

13 changes: 13 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
const express = require("express");
const path = require("path");

const app = express();
const PORT = process.env.PORT || 5001;

// Serve static files (HTML, CSS, JS)
app.use(express.static(path.join(__dirname)));

// Start the server
app.listen(PORT, () => {
console.log(`Canteen Website server is running on http://localhost:${PORT}`);
});
12 changes: 12 additions & 0 deletions menu.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Menu</title>
</head>
<body>
<h1>Welcome to Our Menu</h1>
<p>Our delicious food items will be displayed here.</p>
</body>
</html>
16 changes: 16 additions & 0 deletions node_modules/.bin/mime

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

17 changes: 17 additions & 0 deletions node_modules/.bin/mime.cmd

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

28 changes: 28 additions & 0 deletions node_modules/.bin/mime.ps1

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

Loading