Files
paul 009b7d896b Add connection review page with optional message on connection requests
- 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>
2026-05-28 08:28:21 +00:00

90 lines
4.3 KiB
HTML

{% extends "base.html" %}
{% block title %}{{ 'review'|t }} - NetEvents{% endblock %}
{% block content %}
<div class="connection-review">
<nav class="breadcrumb-nav">
<a href="{{ url_for('attendee_dashboard') }}">{{ 'attendee_dashboard'|t }}</a>
<span class="separator">/</span>
<a href="{{ url_for('connection_requests') }}">{{ 'connection_requests'|t }}</a>
<span class="separator">/</span>
<span class="current">{{ 'review'|t }}</span>
</nav>
<h1>{{ 'review_connection_request'|t }}</h1>
<div class="review-card">
<div class="review-header">
<div class="review-profile">
{% if connection.profile_picture %}
<img src="{{ url_for('static', filename='uploads/' + connection.profile_picture) }}" alt="{{ connection.first_name }}" class="review-photo">
{% else %}
<div class="review-photo-placeholder"><span class="first-name">{{ connection.first_name[0] if connection.first_name else '?' }}</span><span class="last-name">{{ connection.last_name[0] if connection.last_name else '' }}</span></div>
{% endif %}
</div>
<div class="review-name-org">
<h2><span class="first-name">{{ connection.first_name }}</span> <span class="last-name">{{ connection.last_name }}</span></h2>
{% if connection.organisation or connection.role %}
<p class="review-title">{{ connection.organisation }}{% if connection.organisation and connection.role %} - {% endif %}{{ connection.role }}</p>
{% endif %}
</div>
</div>
<div class="review-details">
<div class="detail-row">
<span class="detail-label">{{ 'email'|t }}</span>
<span class="detail-value">{{ connection.email }}</span>
</div>
{% if connection.phone %}
<div class="detail-row">
<span class="detail-label">{{ 'phone'|t }}</span>
<span class="detail-value">{{ connection.phone }}</span>
</div>
{% endif %}
{% if connection.linkedin %}
<div class="detail-row">
<span class="detail-label">LinkedIn</span>
<span class="detail-value"><a href="{{ connection.linkedin if connection.linkedin.startswith('http') else 'https://' + connection.linkedin }}" target="_blank" rel="noopener">{{ connection.linkedin }}</a></span>
</div>
{% endif %}
{% if connection.message %}
<div class="detail-row detail-message">
<span class="detail-label">{{ 'message'|t }}</span>
<span class="detail-value message-text">"{{ connection.message }}"</span>
</div>
{% endif %}
{% if connection.introduction %}
<div class="detail-row detail-intro">
<span class="detail-label">{{ 'introduction'|t }}</span>
<span class="detail-value intro-text">"{{ connection.introduction }}"</span>
</div>
{% endif %}
<div class="detail-row">
<span class="detail-label">{{ 'requested'|t }}</span>
<span class="detail-value">{{ connection.created_at|localized_date if connection.created_at else '' }}</span>
</div>
</div>
<div class="review-actions">
<form method="POST" action="{{ url_for('respond_to_connection', connection_id=connection.id) }}" class="review-form">
<input type="hidden" name="action" value="approve">
<button type="submit" class="btn btn-success btn-lg">
<i data-lucide="user-check"></i> {{ 'approve'|t }}
</button>
</form>
<form method="POST" action="{{ url_for('respond_to_connection', connection_id=connection.id) }}" class="review-form">
<input type="hidden" name="action" value="reject">
<button type="submit" class="btn btn-danger btn-lg">
<i data-lucide="user-x"></i> {{ 'reject'|t }}
</button>
</form>
</div>
</div>
<div class="back-link">
<a href="{{ url_for('connection_requests') }}" class="btn btn-outline">&larr; {{ 'back_to_connection_requests'|t }}</a>
</div>
</div>
{% endblock %}