Improve on the template, most things work???
This commit is contained in:
parent
c0f9876184
commit
46fa0d1ae5
19 changed files with 396 additions and 181 deletions
29
app/templates/admin/dashboard.html
Normal file
29
app/templates/admin/dashboard.html
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Admin Dashboard</title>
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}">
|
||||
</head>
|
||||
<body>
|
||||
{% include 'base.html' %}
|
||||
<div class="container">
|
||||
<h1>Admin Dashboard</h1>
|
||||
<div class="admin-controls">
|
||||
<h2>Manage Repair Bays</h2>
|
||||
<button onclick="location.href='{{ url_for('admin.create_repair_bay') }}'">Create Repair Bay</button>
|
||||
<button onclick="location.href='{{ url_for('admin.remove_repair_bay') }}'">Remove Repair Bay</button>
|
||||
</div>
|
||||
<div class="user-management">
|
||||
<h2>User Management</h2>
|
||||
<button onclick="location.href='{{ url_for('admin.create_user') }}'">Create User</button>
|
||||
<button onclick="location.href='{{ url_for('admin.remove_user') }}'">Remove User</button>
|
||||
</div>
|
||||
<div class="reports">
|
||||
<h2>Reports</h2>
|
||||
<button onclick="location.href='{{ url_for('admin.view_reports') }}'">View Reports</button>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,26 +1,37 @@
|
|||
<!doctype html>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>{% block title %}Repair Tracker{% endblock %}</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='css/bootstrap.min.css') }}">
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='css/custom.css') }}">
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>{% block title %}OpenSTR{% endblock %}</title>
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
{% include 'navbar.html' %}
|
||||
<div class="container-fluid mt-3">
|
||||
<header>
|
||||
<h1>Open Service Tracker Repair Tool</h1>
|
||||
<nav>
|
||||
<ul>
|
||||
<li><a href="{{ url_for('customer.dashboard') }}">Customer Dashboard</a></li>
|
||||
<li><a href="{{ url_for('technician.dashboard') }}">Technician Dashboard</a></li>
|
||||
<li><a href="{{ url_for('admin.dashboard') }}">Admin Dashboard</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
</header>
|
||||
<main>
|
||||
{% with messages = get_flashed_messages() %}
|
||||
{% if messages %}
|
||||
<div class="alert alert-info">{{ messages[0] }}</div>
|
||||
{% endif %}
|
||||
{% if messages %}
|
||||
<ul class="flashes">
|
||||
{% for message in messages %}
|
||||
<li>{{ message }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
{% block content %}{% endblock %}
|
||||
</div>
|
||||
<script src="{{ url_for('static', filename='js/bootstrap.bundle.min.js') }}"></script>
|
||||
<script src="{{ url_for('static', filename='js/custom.js') }}"></script>
|
||||
</main>
|
||||
<footer>
|
||||
<p>© {{ current_year }} Miracle Computer Consulting</p>
|
||||
</footer>
|
||||
<script src="{{ url_for('static', filename='js/script.js') }}"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
58
app/templates/customer/dashboard.html
Normal file
58
app/templates/customer/dashboard.html
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Customer Dashboard</title>
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}">
|
||||
</head>
|
||||
<body>
|
||||
{% include 'base.html' %}
|
||||
<div class="container">
|
||||
<h1>Welcome to Your Dashboard, {{ customer.name }}</h1>
|
||||
<h2>Your Appointments</h2>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Date</th>
|
||||
<th>Time</th>
|
||||
<th>Service</th>
|
||||
<th>Status</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for appointment in appointments %}
|
||||
<tr>
|
||||
<td>{{ appointment.date }}</td>
|
||||
<td>{{ appointment.time }}</td>
|
||||
<td>{{ appointment.service }}</td>
|
||||
<td>{{ appointment.status }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<h2>Your Repairs</h2>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Device</th>
|
||||
<th>Issue</th>
|
||||
<th>Status</th>
|
||||
<th>Notes</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for repair in repairs %}
|
||||
<tr>
|
||||
<td>{{ repair.device }}</td>
|
||||
<td>{{ repair.issue }}</td>
|
||||
<td>{{ repair.status }}</td>
|
||||
<td>{{ repair.notes }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
44
app/templates/technician/dashboard.html
Normal file
44
app/templates/technician/dashboard.html
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Technician Dashboard</title>
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}">
|
||||
</head>
|
||||
<body>
|
||||
{% include 'base.html' %}
|
||||
<div class="container">
|
||||
<h1>Technician Dashboard</h1>
|
||||
<div class="repair-status">
|
||||
<h2>Repair Status Overview</h2>
|
||||
<ul>
|
||||
<li>Submitted Repairs: {{ submitted_count }}</li>
|
||||
<li>In Progress Repairs: {{ in_progress_count }}</li>
|
||||
<li>Completed Repairs: {{ completed_count }}</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="repair-list">
|
||||
<h2>Repairs</h2>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Device</th>
|
||||
<th>Status</th>
|
||||
<th>Technician Notes</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for repair in repairs %}
|
||||
<tr>
|
||||
<td>{{ repair.device_name }}</td>
|
||||
<td>{{ repair.status }}</td>
|
||||
<td>{{ repair.notes }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Add table
Add a link
Reference in a new issue