009b7d896b
- New GET route and template for reviewing individual connection requests
- Optional personal message field when sending connection requests
- Message visible to recipient on review page and connection list
- Dashboard "Review" button links to per-connection review page
- QR scan flow shows message prompt before sending request
- Fix accepted connections query: include both sent and received
- Fix url_for('uploaded_file') -> url_for('static', 'uploads/')
- Fix request.json -> request.is_json to avoid 415 on form POST
- Remove card from DOM on approve/reject instead of page reload
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
129 lines
7.0 KiB
HTML
129 lines
7.0 KiB
HTML
{% extends "base.html" %}
|
|
|
|
{% block title %}{{ 'attendee_dashboard'|t }} - NetEvents{% endblock %}
|
|
|
|
{% block content %}
|
|
<div class="attendee-dashboard">
|
|
<h1>{{ 'attendee_dashboard'|t }}</h1>
|
|
|
|
{% if event %}
|
|
<section class="event-info">
|
|
<h2>{{ 'current_event'|t }}</h2>
|
|
<div class="event-card">
|
|
<h3>{{ event.name }}</h3>
|
|
<p><strong>{{ 'start'|t }}:</strong> {{ event.start_time|localized_date if event.start_time else 'TBD' }}</p>
|
|
{% if event.end_time %}
|
|
<p><strong>{{ 'end'|t }}:</strong> {{ event.end_time|localized_date }}</p>
|
|
{% endif %}
|
|
<p><strong>{{ 'location'|t }}:</strong> {{ event.location }}</p>
|
|
<div class="event-card-actions">
|
|
<a href="{{ url_for('register_event', code=event.code) }}" class="btn btn-outline">{{ 'event_details'|t }}</a>
|
|
<a href="{{ url_for('attendee_breakout_sessions') }}" class="btn btn-outline">{{ 'breakout_sessions'|t }}</a>
|
|
<a href="{{ url_for('attendee_scan') }}" class="btn btn-primary"><i data-lucide="scan-line"></i> {{ 'scan_qr_to_connect'|t }}</a>
|
|
<a href="{{ url_for('download_badge') }}" class="btn btn-outline"><i data-lucide="file-down"></i> {{ 'download_badge'|t }}</a>
|
|
<form method="POST" action="{{ url_for('email_badge') }}" class="d-inline">
|
|
<button type="submit" class="btn btn-outline"><i data-lucide="mail"></i> {{ 'email_badge'|t }}</button>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
{% endif %}
|
|
|
|
{% if sent_pending_connections %}
|
|
<section class="sent-pending-section">
|
|
<h2>{{ 'connection_requests_sent'|t }}</h2>
|
|
<div class="connections-list">
|
|
{% for conn in sent_pending_connections %}
|
|
<div class="connection-card connection-pending">
|
|
<h4><span class="first-name">{{ conn.first_name }}</span> <span class="last-name">{{ conn.last_name }}</span></h4>
|
|
<p>{{ conn.organisation if conn.organisation else '' }}</p>
|
|
<p class="connection-role">{{ conn.role if conn.role else '' }}</p>
|
|
<span class="badge badge-pending">{{ 'request_pending'|t }}</span>
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
</section>
|
|
{% endif %}
|
|
|
|
{% if pending_connections %}
|
|
<section class="pending-section">
|
|
<h2>{{ 'incoming_connection_requests'|t }}</h2>
|
|
<div class="connections-list">
|
|
{% for conn in pending_connections %}
|
|
<div class="connection-card connection-incoming">
|
|
<h4><span class="first-name">{{ conn.first_name }}</span> <span class="last-name">{{ conn.last_name }}</span></h4>
|
|
<p>{{ conn.organisation if conn.organisation else '' }}</p>
|
|
<p class="connection-role">{{ conn.role if conn.role else '' }}</p>
|
|
<a href="{{ url_for('respond_to_connection', connection_id=conn.id) }}" class="btn btn-sm btn-outline">{{ 'review'|t }}</a>
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
<p><a href="{{ url_for('connection_requests') }}">{{ 'view_all_incoming_requests'|t }}</a></p>
|
|
</section>
|
|
{% endif %}
|
|
|
|
<section class="connections-section">
|
|
<h2>{{ 'my_connections'|t }}</h2>
|
|
<div class="section-actions">
|
|
<a href="{{ url_for('list_attendees') }}" class="btn btn-primary">{{ 'find_attendees'|t }}</a>
|
|
</div>
|
|
|
|
{% if connections %}
|
|
<div class="connections-grid">
|
|
{% for conn in connections %}
|
|
<div class="connection-card">
|
|
<h4 class="mb-3"><span class="first-name">{{ conn.first_name }}</span> <span class="last-name">{{ conn.last_name }}</span></h4>
|
|
<p class="connection-org mb-3">{{ conn.organisation if conn.organisation else '' }}</p>
|
|
<p class="connection-role">{{ conn.role if conn.role else '' }}</p>
|
|
<span class="badge badge-success">{{ 'connected'|t }}</span>
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
{% else %}
|
|
<p class="no-data">{{ 'no_connections_yet'|t }}</p>
|
|
{% endif %}
|
|
</section>
|
|
|
|
<section class="appointments-section">
|
|
<h2>{{ 'my_appointments'|t }}</h2>
|
|
<div class="section-actions">
|
|
<a href="{{ url_for('list_attendees') }}" class="btn btn-outline">{{ 'schedule_appointment'|t }}</a>
|
|
</div>
|
|
|
|
{% if appointments %}
|
|
<div class="appointments-list">
|
|
{% for apt in appointments %}
|
|
<div class="appointment-item {% if apt.status %}status-{{ apt.status }}{% endif %}">
|
|
<div class="apt-info">
|
|
<p><strong>
|
|
{% if apt.requester_id == session.user_id %}
|
|
{{ 'with'|t }} <span class="first-name">{{ apt.target_first_name }}</span> <span class="last-name">{{ apt.target_last_name }}</span>
|
|
{% else %}
|
|
{{ 'with'|t }} <span class="first-name">{{ apt.requester_first_name }}</span> <span class="last-name">{{ apt.requester_last_name }}</span>
|
|
{% endif %}
|
|
</strong></p>
|
|
<p><strong>{{ 'time'|t }}:</strong> {{ apt.appointment_time|localized_date if apt.appointment_time else 'TBD' }}</p>
|
|
<p><strong>{{ 'location'|t }}:</strong> {{ apt.location or 'TBD' }}</p>
|
|
<p class="apt-status status-{{ apt.status }}">{{ (apt.status)|spacify if apt.status else '' }}</p>
|
|
</div>
|
|
{% if apt.status == 'pending' and apt.target_id == session.user_id %}
|
|
<div class="apt-actions">
|
|
<form method="POST" action="{{ url_for('update_appointment', appointment_id=apt.id) }}" class="inline-form">
|
|
<input type="hidden" name="status" value="accepted">
|
|
<button type="submit" class="btn btn-sm btn-success">{{ 'accept'|t }}</button>
|
|
</form>
|
|
<form method="POST" action="{{ url_for('update_appointment', appointment_id=apt.id) }}" class="inline-form">
|
|
<input type="hidden" name="status" value="rejected">
|
|
<button type="submit" class="btn btn-sm btn-danger">{{ 'reject'|t }}</button>
|
|
</form>
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
{% else %}
|
|
<p class="no-data">{{ 'no_appointments'|t }}</p>
|
|
{% endif %}
|
|
</section>
|
|
</div>
|
|
{% endblock %} |