Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Restaurant Planning Calculator #1820

Merged
merged 3 commits into from
Aug 10, 2024
Merged
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions Calculators/Restaurant-Planning-Calculator/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<p align="center">Restaurant Planning Calculator</p>

## Description :-

This Restaurant Planning Calculator helps users efficiently plan their restaurant by calculating the initial and monthly costs based on various inputs such as available space, number of staff, rent, utilities, equipment costs, and salaries.

## Tech Stacks :-

HTML
CSS
JavaScript

## Features :-

This Restaurant Planning Calculator helps users efficiently plan their restaurant by calculating the initial and monthly costs based on various inputs such as available space, number of staff, rent, utilities, equipment costs, and salaries. It provides detailed insights on cost management, space optimization, and budget planning. The intuitive interface ensures easy input and clear results, aiding in effective financial planning and resource management for restaurant owners.

## Screenshots :-

![image](https://github.com/user-attachments/assets/1ac11236-403c-4a98-9fbe-111bd4f15c9c)
43 changes: 43 additions & 0 deletions Calculators/Restaurant-Planning-Calculator/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Restaurant Planning Calculator</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<div class="canvas">
<div class="container">
<h1>Restaurant Planning Calculator</h1>
<form id="calculator-form">
<label for="space">Available Space (sq ft):</label>
<input type="number" id="space" min="1" required>

<label for="staff">Number of Staff:</label>
<input type="number" id="staff" min="1" required>

<label for="rent">Monthly Rent ($):</label>
<input type="number" id="rent" min="0" required>

<label for="utilities">Monthly Utilities ($):</label>
<input type="number" id="utilities" min="0" required>

<label for="equipment">One-time Equipment Cost ($):</label>
<input type="number" id="equipment" min="0" required>

<label for="salary">Average Monthly Salary per Staff ($):</label>
<input type="number" id="salary" min="0" required>

<button type="submit">Calculate Total Cost</button>
</form>
<div id="result">
<h2>Total Initial Cost: $<span id="initial-cost">0</span></h2>
<h2>Total Monthly Cost: $<span id="monthly-cost">0</span></h2>
<div id="insights"></div>
</div>
</div>
</div>
<script src="scripts.js"></script>
</body>
</html>
64 changes: 64 additions & 0 deletions Calculators/Restaurant-Planning-Calculator/scripts.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
document.getElementById("calculator-form").addEventListener("submit", function(event) {
event.preventDefault();

// Fetch the input values
let space = parseFloat(document.getElementById("space").value);
let staff = parseFloat(document.getElementById("staff").value);
let rent = parseFloat(document.getElementById("rent").value);
let utilities = parseFloat(document.getElementById("utilities").value);
let equipment = parseFloat(document.getElementById("equipment").value);
let salary = parseFloat(document.getElementById("salary").value);

// Perform calculations
let initialCost = equipment + rent + utilities;
let monthlyCost = rent + utilities + (salary * staff);

// Update the result section with the calculations
document.getElementById("initial-cost").textContent = initialCost.toFixed(2);
document.getElementById("monthly-cost").textContent = monthlyCost.toFixed(2);

// Generate insights based on inputs
let insights = "";

if (space < 500) {
insights += "<p>Consider expanding your space to accommodate more customers and increase revenue.</p>";
} else {
insights += "<p>Your space is sufficient for a moderate-sized restaurant. Ensure it's well-utilized.</p>";
}

if (staff < 5) {
insights += "<p>With a small staff, focus on efficiency and multi-tasking to keep operations smooth.</p>";
} else {
insights += "<p>With a larger staff, ensure proper training and delegation to maintain high service quality.</p>";
}

if (rent > 5000) {
insights += "<p>Your rent is quite high. Consider negotiating with the landlord or finding a more affordable location.</p>";
} else {
insights += "<p>Your rent is manageable. Ensure it's balanced with your expected revenue.</p>";
}

if (utilities > 1000) {
insights += "<p>High utility costs may impact your budget. Invest in energy-efficient appliances to save costs.</p>";
} else {
insights += "<p>Your utility costs are within a reasonable range. Regularly monitor and optimize usage.</p>";
}

if (equipment > 20000) {
insights += "<p>Your initial equipment cost is significant. Ensure you're investing in quality equipment that lasts.</p>";
} else {
insights += "<p>Your equipment cost is reasonable. Maintain and service equipment regularly to extend its life.</p>";
}

if (salary < 3000) {
insights += "<p>With lower salaries, ensure your staff are motivated through other means such as incentives and a good working environment.</p>";
} else {
insights += "<p>Competitive salaries will help in retaining skilled staff. Regularly review and adjust salaries based on performance.</p>";
}

// Update the insights section
document.getElementById("insights").innerHTML = insights;

// Show the result section
document.getElementById("result").style.display = "block";
});
68 changes: 68 additions & 0 deletions Calculators/Restaurant-Planning-Calculator/styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
body {
margin: 0;
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
background: linear-gradient(to right, #f8b500, #fceabb);
}

.canvas {
background: white;
padding: 20px;
border-radius: 15px;
box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
}

.container {
width: 300px;
}

h1, h2 {
text-align: center;
color: #333;
}

form {
display: flex;
flex-direction: column;
align-items: center;
}

label {
margin-top: 10px;
}

input, button {
padding: 10px;
margin-top: 5px;
width: 100%;
border: 1px solid #ccc;
border-radius: 4px;
font-size: 1rem;
}

button {
background: #f8b500;
color: white;
border: none;
cursor: pointer;
margin-top: 20px;
font-size: 1.2rem;
}

button:hover {
background: #f7a000;
}

#result {
display: none; /* Hide the result section initially */
margin-top: 20px;
text-align: center;
}

#insights {
margin-top: 20px;
text-align: left;
color: #333;
}
14 changes: 14 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4161,6 +4161,20 @@ <h3>Calculates the overall budget for a rental payment.</h3>
</div>
</div>
</div>
<div class="box">
<div class="content">
<h2>Restaurant Planning Calculator</h2>
<h3>Calculates the overall budget for starting and running a restaurant.</h3>
<div class="card-footer">
<a href="./Calculators/Restaurant-Planning-Calculator/index.html" target="_blank">
<button>Try Now</button>
</a>
<a href="https://github.com/Rakesh9100/CalcDiverse/tree/main/Calculators/Restaurant-Planning-Calculator" title="Source Code" target="_blank">
<img src="./assets/images/github.png" alt="Source Code"></img>
</a>
</div>
</div>
</div>
<div class="box">
<div class="content">
<h2>Retirement Calculator</h2>
Expand Down