fix(phase26): add Pi trip deletion (BUG-08)
This commit is contained in:
@@ -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>
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user