Files
SmartScanProbeTrack/templates/work_order_list.html
2025-07-27 21:49:34 -04:00

64 lines
2.4 KiB
HTML

{% extends "base.html" %}
{% block content %}
<div class="container mt-4">
<div class="d-flex justify-content-between align-items-center mb-4">
<h2>Work Order Management</h2>
<a href="{{ url_for('work_orders.new_work_order') }}" class="btn btn-primary">Create New Work Order</a>
</div>
<div class="card">
<div class="card-header">
<h5 class="mb-0">All Work Orders</h5>
</div>
<div class="card-body">
{% if work_orders %}
<div class="table-responsive">
<table class="table table-striped table-hover">
<thead>
<tr>
<th>Order Number</th>
<th>Status</th>
<th>Due Date</th>
<th>Redmine ID</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
{% for wo in work_orders %}
<tr>
<td>{{ wo.order_number }}</td>
<td>
{% if wo.status == 'completed' %}
<span class="badge bg-success">Completed</span>
{% elif wo.status == 'in_progress' %}
<span class="badge bg-warning">In Progress</span>
{% else %}
<span class="badge bg-secondary">{{ wo.status|title }}</span>
{% endif %}
</td>
<td>
{% if wo.due_date and wo.due_date is not string %}
{{ wo.due_date.strftime('%Y-%m-%d') }}
{% else %}
{{ wo.due_date or '' }}
{% endif %}
</td>
<td>{{ wo.redmine or '-' }}</td>
<td>
<a href="{{ url_for('work_orders.view_work_order', work_order_id=wo.id) }}"
class="btn btn-sm btn-outline-primary">View</a>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% else %}
<div class="alert alert-info">No work orders found</div>
{% endif %}
</div>
</div>
</div>
{% endblock %}