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>
This commit is contained in:
@@ -29,10 +29,36 @@
|
||||
</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>
|
||||
<p><a href="{{ url_for('connection_requests') }}">{{ 'review_scan_requests'|t }}</a></p>
|
||||
<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 %}
|
||||
|
||||
@@ -49,6 +75,7 @@
|
||||
<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>
|
||||
|
||||
Reference in New Issue
Block a user