update
This commit is contained in:
80
web/templates/repairs.html
Normal file
80
web/templates/repairs.html
Normal file
@@ -0,0 +1,80 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="cs">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Správa Oprav</title>
|
||||
<link rel="stylesheet" href="{{url_for('static', filename='css/style.css')}}">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<header>
|
||||
<div class="header">
|
||||
<div class="contact-info">
|
||||
<span>Kontakt: 123 123 123 | Otevírací doba: 9-18 hod | auto@servis.cz </span>
|
||||
</div>
|
||||
<h1 class="nazev">
|
||||
<a href="{{ url_for('home') }}" style="text-decoration: none;">
|
||||
<img src="{{url_for('static', filename='img/logo.webp')}}" alt="Logo" class="logo">
|
||||
</a>
|
||||
Správa Oprav
|
||||
</h1>
|
||||
<div class="buttons">
|
||||
<a href="{{ url_for('home') }}" class="button">Zpět na Domovskou Stránku</a>
|
||||
<a href="{{ url_for('create_repair') }}" class="button">Vytvořit Novou Opravu</a>
|
||||
<a href="{{ url_for('logout') }}" class="button">Odhlásit se</a>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<div class="container">
|
||||
<div class="content">
|
||||
<h2>Opravy</h2>
|
||||
<div class="repair-table">
|
||||
{% if repairs %}
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ID Opravy</th>
|
||||
<th>Jméno Zaměstnance</th>
|
||||
<th>Název</th>
|
||||
<th>Popis</th>
|
||||
<th>Použité Produkty</th>
|
||||
<th>Akce</th> <!-- New column for actions -->
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for repair in repairs %}
|
||||
<tr>
|
||||
<td>{{ repair['ID_Opravy'] }}</td>
|
||||
<td>{{ repair['Jmeno'] }} {{ repair['Prijmeni'] }}</td>
|
||||
<td>{{ repair['Nazev'] }}</td>
|
||||
<td>{{ repair['Popis'] }}</td>
|
||||
<td>
|
||||
{% for product in repair['products'] %}
|
||||
{{ product['Nazev'] }} ({{ product['Pocet_Produktu'] }})<br>
|
||||
{% endfor %}
|
||||
</td>
|
||||
<td>
|
||||
<a href="{{ url_for('edit_repair', repair_id=repair['ID_Opravy']) }}">Edit</a>
|
||||
<form action="{{ url_for('delete_repair', repair_id=repair['ID_Opravy']) }}" method="post" style="display:inline;" onsubmit="return confirm('Opravdu chcete smazat tuto opravu?');">
|
||||
<button type="submit" class="button-link">Delete</button>
|
||||
</form>
|
||||
</td> <!-- Edit and Delete buttons -->
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% else %}
|
||||
<p>No repairs found.</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<footer class="footer" id="kontakt">
|
||||
<div>Made by Hrachovina</div>
|
||||
</footer>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user