fix(phase26): add Pi trip deletion (BUG-08)

This commit is contained in:
Mathieu Moran
2026-08-11 02:07:59 -04:00
parent 786d5b8f3e
commit c5c478bef6
7 changed files with 33 additions and 4 deletions
+7
View File
@@ -131,6 +131,13 @@
<script src="{{ url_for('static', filename='js/theme.js') }}"></script>
<script src="{{ url_for('static', filename='js/data-list.js') }}"></script>
<script src="{{ url_for('static', filename='js/alerts.js') }}"></script>
{# ── Shared confirmation helper ────────────────────────────────────────── #}
<script>
window.confirmDelete = function(message) {
return Promise.resolve(window.confirm(message));
};
</script>
{% block scripts %}{% endblock %}
</body>
+2 -2
View File
@@ -1,5 +1,5 @@
{% macro data_table(id, columns, empty_title, empty_message) %}
<div class="data-list" id="{{ id }}" data-data-list>
{% macro data_table(id, columns, empty_title, empty_message, deletable=false) %}
<div class="data-list" id="{{ id }}" data-data-list{% if deletable %} data-deletable="1"{% endif %}>
<div class="table-responsive data-list-table" data-data-list-table hidden>
<table class="table table-hover align-middle mb-0">
<thead>
+3 -1
View File
@@ -35,8 +35,10 @@
{"key": "action", "label": "", "sortable": false, "class": "d-none d-sm-table-cell"}
],
"No trips detected",
"Trip history appears after sustained GPS or OBD movement is recorded."
"Trip history appears after sustained GPS or OBD movement is recorded.",
deletable=true
) }}
<script>document.getElementById('trip-list').dataset.deleteUrl = '/api/trip/';</script>
</div>
</div>
</div>