Jul 10 - Update codes to catch up with the single tenant project (Medium)

This commit is contained in:
2026-07-10 12:58:57 -04:00
parent e41998b561
commit aa749107c7
12 changed files with 815 additions and 68 deletions
@@ -0,0 +1,60 @@
{% extends "base.html" %}
{% block title %}My Chat History{% endblock %}
{% block content %}
<div class="d-flex justify-content-between align-items-center mb-3">
<div>
<h4 class="mb-0"><i class="bi bi-clock-history me-2 text-primary"></i>My Chat History</h4>
<small class="text-muted">{{ sessions|length }} conversation{{ 's' if sessions|length != 1 }}</small>
</div>
<a href="{{ url_for('support.chat') }}" class="btn btn-primary btn-sm">
<i class="bi bi-plus-circle me-1"></i>New Chat
</a>
</div>
{% if sessions %}
<div class="card shadow-sm">
<div class="table-responsive">
<table class="table table-hover mb-0 align-middle">
<thead class="table-light">
<tr>
<th>Topic</th>
<th>Last Activity</th>
<th>Messages</th>
<th></th>
</tr>
</thead>
<tbody>
{% for s in sessions %}
<tr>
<td>
<span class="fw-semibold">{{ s.title or 'Conversation' }}</span>
</td>
<td class="text-muted small text-nowrap">
{{ s.last_msg_at.strftime('%b %d, %Y %I:%M %p') }}
</td>
<td class="text-muted small">{{ s.messages | length }}</td>
<td class="text-nowrap">
<a href="{{ url_for('support.my_conversation_detail', session_id=s.id) }}"
class="btn btn-sm btn-outline-secondary me-1">
<i class="bi bi-eye me-1"></i>View
</a>
<a href="{{ url_for('support.chat', session_id=s.id) }}"
class="btn btn-sm btn-outline-primary">
<i class="bi bi-chat me-1"></i>Continue
</a>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
{% else %}
<div class="text-center text-muted py-5">
<i class="bi bi-chat-dots fs-1 d-block mb-2"></i>
No conversations yet.
<a href="{{ url_for('support.chat') }}">Start a chat</a> with our AI assistant.
</div>
{% endif %}
{% endblock %}