Mileage
›
{% if mode == 'edit' %}Edit trip{% else %}New trip{% endif %}
{% set is_active_trip = (mode == 'edit' and entry and entry.odometer_start is not none and entry.odometer_end is none and not entry.is_submitted) %}
// {% if is_active_trip %}Finish trip{% elif mode == 'edit' %}Edit trip{% else %}Log miles{% endif %}
{% if is_active_trip %}
⌖ Trip in progress — enter your end odometer and SAVE to finish. Miles will auto-calculate.
{% endif %}
{% if mode == 'edit' and entry.is_submitted %}
Submitted on {{ entry.submitted_at[:10] }}. Edits won't change the submitted state.
{% endif %}