First commit
This commit is contained in:
@@ -0,0 +1,64 @@
|
||||
{% extends "base.html" %}
|
||||
{% block title %}My Support Requests{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="d-flex justify-content-between align-items-center mb-3">
|
||||
<div>
|
||||
<h4 class="mb-0"><i class="bi bi-inbox me-2 text-primary"></i>My Support Requests</h4>
|
||||
<small class="text-muted">{{ tickets | length }} request{{ 's' if tickets | length != 1 }}</small>
|
||||
</div>
|
||||
<a href="{{ url_for('support.chat') }}" class="btn btn-outline-primary btn-sm">
|
||||
<i class="bi bi-chat-dots me-1"></i>New Chat / Ask a Question
|
||||
</a>
|
||||
</div>
|
||||
|
||||
{% if tickets %}
|
||||
<div class="card shadow-sm">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover mb-0 align-middle">
|
||||
<thead class="table-light">
|
||||
<tr>
|
||||
<th style="width:60px">#</th>
|
||||
<th>Subject</th>
|
||||
<th>Facility</th>
|
||||
<th>Status</th>
|
||||
<th>Submitted</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% set status_class = {'open': 'warning', 'answered': 'success', 'closed': 'secondary'} %}
|
||||
{% set status_label = {'open': 'Awaiting reply', 'answered': 'Answered', 'closed': 'Closed'} %}
|
||||
{% for ticket in tickets %}
|
||||
<tr>
|
||||
<td class="text-muted small">{{ ticket.id }}</td>
|
||||
<td>{{ ticket.subject }}</td>
|
||||
<td>{{ ticket.facility.name if ticket.facility else '—' }}</td>
|
||||
<td>
|
||||
<span class="badge bg-{{ status_class.get(ticket.status, 'secondary') }}">
|
||||
{{ status_label.get(ticket.status, ticket.status | capitalize) }}
|
||||
</span>
|
||||
</td>
|
||||
<td class="text-muted small text-nowrap">
|
||||
{{ ticket.created_at.strftime('%b %d, %Y') }}
|
||||
</td>
|
||||
<td>
|
||||
<a href="{{ url_for('support.my_ticket_detail', ticket_id=ticket.id) }}"
|
||||
class="btn btn-sm btn-outline-primary">
|
||||
<i class="bi bi-eye me-1"></i>View
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="text-center text-muted py-5">
|
||||
<i class="bi bi-inbox fs-1 d-block mb-2"></i>
|
||||
You haven't submitted any support requests yet.<br>
|
||||
<a href="{{ url_for('support.chat') }}" class="mt-2 d-inline-block">Start a support chat</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user