Add trip linking and names to Schengen compliance report

- Add trip_date and trip_name fields to SchengenStay dataclass
- Implement extract_schengen_stays_with_trip_info() to associate stays with trips
- Update schengen_report.html to show trip names with clickable links
- Add Trip column to stays table and trip name column to compliance history
- Links navigate to individual trip pages using existing URL structure

Closes #197

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Edward Betts 2025-07-15 15:06:09 +02:00
parent 1d37f92cfb
commit 8363a581c7
3 changed files with 87 additions and 11 deletions

View file

@ -72,6 +72,7 @@
<th>Exit Date</th>
<th>Country</th>
<th>Days</th>
<th>Trip</th>
</tr>
</thead>
<tbody>
@ -87,6 +88,15 @@
</td>
<td>{{ stay.country | country_flag }} {{ stay.country.upper() }}</td>
<td>{{ stay.days }}</td>
<td>
{% if stay.trip_date and stay.trip_name %}
<a href="{{ url_for('trip_page', start=stay.trip_date.strftime('%Y-%m-%d')) }}" class="text-decoration-none">
{{ stay.trip_name }}
</a>
{% else %}
<span class="text-muted">-</span>
{% endif %}
</td>
</tr>
{% endfor %}
</tbody>
@ -139,6 +149,7 @@
<thead>
<tr>
<th>Trip Date</th>
<th>Trip Name</th>
<th>Days Used</th>
<th>Days Remaining</th>
<th>Status</th>
@ -148,6 +159,13 @@
{% for trip_date, calculation in trips_with_compliance.items() %}
<tr>
<td>{{ trip_date.strftime('%Y-%m-%d') }}</td>
<td>
<a href="{{ url_for('trip_page', start=trip_date.strftime('%Y-%m-%d')) }}" class="text-decoration-none">
{% for trip_obj in trip_list if trip_obj.start == trip_date %}
{{ trip_obj.title }}
{% endfor %}
</a>
</td>
<td>{{ calculation.total_days_used }}/90</td>
<td>{{ calculation.days_remaining }}</td>
<td>