Spaces:
Sleeping
Sleeping
Upload 7 files
Browse files- templates/base.html +73 -0
- templates/change_password.html +18 -0
- templates/employees.html +54 -0
- templates/index.html +40 -0
- templates/inventory.html +42 -0
- templates/login.html +18 -0
- templates/projects.html +42 -0
templates/base.html
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>Construction ERP</title>
|
| 7 |
+
<!-- Bootstrap CSS -->
|
| 8 |
+
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet">
|
| 9 |
+
<!-- Custom CSS -->
|
| 10 |
+
<link rel="stylesheet" href="{{ url_for('static', filename='css/styles.css') }}">
|
| 11 |
+
</head>
|
| 12 |
+
<body>
|
| 13 |
+
<!-- Navigation Bar -->
|
| 14 |
+
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
|
| 15 |
+
<div class="container-fluid">
|
| 16 |
+
<a class="navbar-brand" href="{{ url_for('index') }}">Construction ERP</a>
|
| 17 |
+
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
|
| 18 |
+
<span class="navbar-toggler-icon"></span>
|
| 19 |
+
</button>
|
| 20 |
+
<div class="collapse navbar-collapse" id="navbarNav">
|
| 21 |
+
<ul class="navbar-nav me-auto">
|
| 22 |
+
<li class="nav-item">
|
| 23 |
+
<a class="nav-link" href="{{ url_for('index') }}">Home</a>
|
| 24 |
+
</li>
|
| 25 |
+
{% if 'user_id' in session %}
|
| 26 |
+
<li class="nav-item">
|
| 27 |
+
<a class="nav-link" href="{{ url_for('projects') }}">Projects</a>
|
| 28 |
+
</li>
|
| 29 |
+
<li class="nav-item">
|
| 30 |
+
<a class="nav-link" href="{{ url_for('inventory') }}">Inventory</a>
|
| 31 |
+
</li>
|
| 32 |
+
<li class="nav-item">
|
| 33 |
+
<a class="nav-link" href="{{ url_for('employees') }}">Employees</a>
|
| 34 |
+
</li>
|
| 35 |
+
{% endif %}
|
| 36 |
+
</ul>
|
| 37 |
+
<ul class="navbar-nav ms-auto">
|
| 38 |
+
{% if 'user_id' in session %}
|
| 39 |
+
<li class="nav-item">
|
| 40 |
+
<a class="nav-link" href="{{ url_for('logout') }}">Logout</a>
|
| 41 |
+
</li>
|
| 42 |
+
{% else %}
|
| 43 |
+
<li class="nav-item">
|
| 44 |
+
<a class="nav-link" href="{{ url_for('login') }}">Login</a>
|
| 45 |
+
</li>
|
| 46 |
+
{% endif %}
|
| 47 |
+
</ul>
|
| 48 |
+
</div>
|
| 49 |
+
</div>
|
| 50 |
+
</nav>
|
| 51 |
+
|
| 52 |
+
<!-- Main Content -->
|
| 53 |
+
<main class="container mt-4">
|
| 54 |
+
{% with messages = get_flashed_messages(with_categories=true) %}
|
| 55 |
+
{% if messages %}
|
| 56 |
+
{% for category, message in messages %}
|
| 57 |
+
<div class="alert alert-{{ category }} alert-dismissible fade show" role="alert">
|
| 58 |
+
{{ message }}
|
| 59 |
+
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
|
| 60 |
+
</div>
|
| 61 |
+
{% endfor %}
|
| 62 |
+
{% endif %}
|
| 63 |
+
{% endwith %}
|
| 64 |
+
{% block content %}{% endblock %}
|
| 65 |
+
</main>
|
| 66 |
+
|
| 67 |
+
<!-- Bootstrap JS and dependencies -->
|
| 68 |
+
<script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.11.6/dist/umd/popper.min.js"></script>
|
| 69 |
+
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/js/bootstrap.min.js"></script>
|
| 70 |
+
<!-- Custom JS -->
|
| 71 |
+
<script src="{{ url_for('static', filename='js/script.js') }}"></script>
|
| 72 |
+
</body>
|
| 73 |
+
</html>
|
templates/change_password.html
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{% extends 'base.html' %}
|
| 2 |
+
|
| 3 |
+
{% block content %}
|
| 4 |
+
<div class="container">
|
| 5 |
+
<h2 class="my-4">Change Password</h2>
|
| 6 |
+
<form method="POST">
|
| 7 |
+
<div class="mb-3">
|
| 8 |
+
<label for="new_password" class="form-label">New Password</label>
|
| 9 |
+
<input type="password" class="form-control" id="new_password" name="new_password" required>
|
| 10 |
+
</div>
|
| 11 |
+
<div class="mb-3">
|
| 12 |
+
<label for="confirm_password" class="form-label">Confirm Password</label>
|
| 13 |
+
<input type="password" class="form-control" id="confirm_password" name="confirm_password" required>
|
| 14 |
+
</div>
|
| 15 |
+
<button type="submit" class="btn btn-primary">Change Password</button>
|
| 16 |
+
</form>
|
| 17 |
+
</div>
|
| 18 |
+
{% endblock %}
|
templates/employees.html
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{% extends 'base.html' %}
|
| 2 |
+
|
| 3 |
+
{% block content %}
|
| 4 |
+
<div class="container">
|
| 5 |
+
<h2 class="my-4">Employees</h2>
|
| 6 |
+
<form method="POST">
|
| 7 |
+
<div class="mb-3">
|
| 8 |
+
<label for="name" class="form-label">Employee Name</label>
|
| 9 |
+
<input type="text" class="form-control" id="name" name="name" required>
|
| 10 |
+
</div>
|
| 11 |
+
<div class="mb-3">
|
| 12 |
+
<label for="role" class="form-label">Role</label>
|
| 13 |
+
<select class="form-control" id="role" name="role" required>
|
| 14 |
+
<option value="Materials Manager">Materials Manager</option>
|
| 15 |
+
<option value="Procurement Manager">Procurement Manager</option>
|
| 16 |
+
<option value="HR Manager">HR Manager</option>
|
| 17 |
+
</select>
|
| 18 |
+
</div>
|
| 19 |
+
<div class="mb-3">
|
| 20 |
+
<label for="salary" class="form-label">Salary</label>
|
| 21 |
+
<input type="number" class="form-control" id="salary" name="salary" step="0.01" required>
|
| 22 |
+
</div>
|
| 23 |
+
<div class="mb-3">
|
| 24 |
+
<label for="username" class="form-label">Username</label>
|
| 25 |
+
<input type="text" class="form-control" id="username" name="username" required>
|
| 26 |
+
</div>
|
| 27 |
+
<div class="mb-3">
|
| 28 |
+
<label for="password" class="form-label">Initial Password</label>
|
| 29 |
+
<input type="password" class="form-control" id="password" name="password" required>
|
| 30 |
+
</div>
|
| 31 |
+
<button type="submit" class="btn btn-primary">Add Employee</button>
|
| 32 |
+
</form>
|
| 33 |
+
|
| 34 |
+
<h3 class="my-4">Employee List</h3>
|
| 35 |
+
<table class="table table-striped">
|
| 36 |
+
<thead>
|
| 37 |
+
<tr>
|
| 38 |
+
<th>Name</th>
|
| 39 |
+
<th>Role</th>
|
| 40 |
+
<th>Salary</th>
|
| 41 |
+
</tr>
|
| 42 |
+
</thead>
|
| 43 |
+
<tbody>
|
| 44 |
+
{% for employee in employees %}
|
| 45 |
+
<tr>
|
| 46 |
+
<td>{{ employee.name }}</td>
|
| 47 |
+
<td>{{ employee.role }}</td>
|
| 48 |
+
<td>${{ employee.salary }}</td>
|
| 49 |
+
</tr>
|
| 50 |
+
{% endfor %}
|
| 51 |
+
</tbody>
|
| 52 |
+
</table>
|
| 53 |
+
</div>
|
| 54 |
+
{% endblock %}
|
templates/index.html
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{% extends 'base.html' %}
|
| 2 |
+
|
| 3 |
+
{% block content %}
|
| 4 |
+
<div class="jumbotron text-center">
|
| 5 |
+
<h1 class="display-4">Welcome to Construction ERP</h1>
|
| 6 |
+
<p class="lead">Manage your construction projects, inventory, and employees efficiently with our ERP solution.</p>
|
| 7 |
+
<hr class="my-4">
|
| 8 |
+
<p>Get started by exploring the modules below.</p>
|
| 9 |
+
</div>
|
| 10 |
+
|
| 11 |
+
<div class="row">
|
| 12 |
+
<div class="col-md-4">
|
| 13 |
+
<div class="card">
|
| 14 |
+
<div class="card-body">
|
| 15 |
+
<h5 class="card-title">Projects</h5>
|
| 16 |
+
<p class="card-text">Manage all your construction projects in one place.</p>
|
| 17 |
+
<a href="{{ url_for('projects') }}" class="btn btn-primary">Go to Projects</a>
|
| 18 |
+
</div>
|
| 19 |
+
</div>
|
| 20 |
+
</div>
|
| 21 |
+
<div class="col-md-4">
|
| 22 |
+
<div class="card">
|
| 23 |
+
<div class="card-body">
|
| 24 |
+
<h5 class="card-title">Inventory</h5>
|
| 25 |
+
<p class="card-text">Track and manage construction materials and equipment.</p>
|
| 26 |
+
<a href="{{ url_for('inventory') }}" class="btn btn-primary">Go to Inventory</a>
|
| 27 |
+
</div>
|
| 28 |
+
</div>
|
| 29 |
+
</div>
|
| 30 |
+
<div class="col-md-4">
|
| 31 |
+
<div class="card">
|
| 32 |
+
<div class="card-body">
|
| 33 |
+
<h5 class="card-title">Employees</h5>
|
| 34 |
+
<p class="card-text">Manage your workforce and payroll efficiently.</p>
|
| 35 |
+
<a href="{{ url_for('employees') }}" class="btn btn-primary">Go to Employees</a>
|
| 36 |
+
</div>
|
| 37 |
+
</div>
|
| 38 |
+
</div>
|
| 39 |
+
</div>
|
| 40 |
+
{% endblock %}
|
templates/inventory.html
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{% extends 'base.html' %}
|
| 2 |
+
|
| 3 |
+
{% block content %}
|
| 4 |
+
<div class="container">
|
| 5 |
+
<h2 class="my-4">Inventory</h2>
|
| 6 |
+
<form method="POST">
|
| 7 |
+
<div class="mb-3">
|
| 8 |
+
<label for="item_name" class="form-label">Item Name</label>
|
| 9 |
+
<input type="text" class="form-control" id="item_name" name="item_name" required>
|
| 10 |
+
</div>
|
| 11 |
+
<div class="mb-3">
|
| 12 |
+
<label for="quantity" class="form-label">Quantity</label>
|
| 13 |
+
<input type="number" class="form-control" id="quantity" name="quantity" required>
|
| 14 |
+
</div>
|
| 15 |
+
<div class="mb-3">
|
| 16 |
+
<label for="unit_price" class="form-label">Unit Price</label>
|
| 17 |
+
<input type="number" class="form-control" id="unit_price" name="unit_price" step="0.01" required>
|
| 18 |
+
</div>
|
| 19 |
+
<button type="submit" class="btn btn-primary">Add Item</button>
|
| 20 |
+
</form>
|
| 21 |
+
|
| 22 |
+
<h3 class="my-4">Inventory List</h3>
|
| 23 |
+
<table class="table table-striped">
|
| 24 |
+
<thead>
|
| 25 |
+
<tr>
|
| 26 |
+
<th>Item Name</th>
|
| 27 |
+
<th>Quantity</th>
|
| 28 |
+
<th>Unit Price</th>
|
| 29 |
+
</tr>
|
| 30 |
+
</thead>
|
| 31 |
+
<tbody>
|
| 32 |
+
{% for item in inventory_items %}
|
| 33 |
+
<tr>
|
| 34 |
+
<td>{{ item.item_name }}</td>
|
| 35 |
+
<td>{{ item.quantity }}</td>
|
| 36 |
+
<td>${{ item.unit_price }}</td>
|
| 37 |
+
</tr>
|
| 38 |
+
{% endfor %}
|
| 39 |
+
</tbody>
|
| 40 |
+
</table>
|
| 41 |
+
</div>
|
| 42 |
+
{% endblock %}
|
templates/login.html
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{% extends 'base.html' %}
|
| 2 |
+
|
| 3 |
+
{% block content %}
|
| 4 |
+
<div class="container">
|
| 5 |
+
<h2 class="my-4">Login</h2>
|
| 6 |
+
<form method="POST">
|
| 7 |
+
<div class="mb-3">
|
| 8 |
+
<label for="username" class="form-label">Username</label>
|
| 9 |
+
<input type="text" class="form-control" id="username" name="username" required>
|
| 10 |
+
</div>
|
| 11 |
+
<div class="mb-3">
|
| 12 |
+
<label for="password" class="form-label">Password</label>
|
| 13 |
+
<input type="password" class="form-control" id="password" name="password" required>
|
| 14 |
+
</div>
|
| 15 |
+
<button type="submit" class="btn btn-primary">Login</button>
|
| 16 |
+
</form>
|
| 17 |
+
</div>
|
| 18 |
+
{% endblock %}
|
templates/projects.html
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{% extends 'base.html' %}
|
| 2 |
+
|
| 3 |
+
{% block content %}
|
| 4 |
+
<div class="container">
|
| 5 |
+
<h2 class="my-4">Projects</h2>
|
| 6 |
+
<form id="project-form" method="POST" class="mb-4">
|
| 7 |
+
<div class="mb-3">
|
| 8 |
+
<label for="name" class="form-label">Project Name</label>
|
| 9 |
+
<input type="text" class="form-control" id="name" name="name" required>
|
| 10 |
+
</div>
|
| 11 |
+
<div class="mb-3">
|
| 12 |
+
<label for="description" class="form-label">Description</label>
|
| 13 |
+
<textarea class="form-control" id="description" name="description" required></textarea>
|
| 14 |
+
</div>
|
| 15 |
+
<div class="mb-3">
|
| 16 |
+
<label for="budget" class="form-label">Budget</label>
|
| 17 |
+
<input type="number" class="form-control" id="budget" name="budget" step="0.01" required>
|
| 18 |
+
</div>
|
| 19 |
+
<button type="submit" class="btn btn-primary">Add Project</button>
|
| 20 |
+
</form>
|
| 21 |
+
|
| 22 |
+
<h3>Project List</h3>
|
| 23 |
+
<table class="table table-striped">
|
| 24 |
+
<thead>
|
| 25 |
+
<tr>
|
| 26 |
+
<th>Name</th>
|
| 27 |
+
<th>Description</th>
|
| 28 |
+
<th>Budget</th>
|
| 29 |
+
</tr>
|
| 30 |
+
</thead>
|
| 31 |
+
<tbody>
|
| 32 |
+
{% for project in projects %}
|
| 33 |
+
<tr>
|
| 34 |
+
<td>{{ project.name }}</td>
|
| 35 |
+
<td>{{ project.description }}</td>
|
| 36 |
+
<td>${{ project.budget }}</td>
|
| 37 |
+
</tr>
|
| 38 |
+
{% endfor %}
|
| 39 |
+
</tbody>
|
| 40 |
+
</table>
|
| 41 |
+
</div>
|
| 42 |
+
{% endblock %}
|