v0.13.2 - s4 event pipeline complete #56
@@ -192,8 +192,9 @@ function renderTable() {
|
||||
? '<span class="px-2 py-0.5 rounded text-xs bg-yellow-100 text-yellow-800 dark:bg-yellow-900/30 dark:text-yellow-300">FT</span>'
|
||||
: '';
|
||||
const checked = _selected.has(ev.id) ? 'checked' : '';
|
||||
return `<tr class="hover:bg-gray-50 dark:hover:bg-slate-700/50">
|
||||
<td class="px-3 py-2"><input type="checkbox" class="row-check" data-event-id="${_esc(ev.id)}" ${checked} onchange="onRowCheck(this)"></td>
|
||||
return `<tr class="hover:bg-gray-50 dark:hover:bg-slate-700/50 cursor-pointer"
|
||||
onclick="showEventDetail('${_esc(ev.id)}')">
|
||||
<td class="px-3 py-2" onclick="event.stopPropagation()"><input type="checkbox" class="row-check" data-event-id="${_esc(ev.id)}" ${checked} onchange="onRowCheck(this)"></td>
|
||||
<td class="px-3 py-2 text-sm font-mono text-gray-700 dark:text-gray-300">${_esc(ev.serial)}</td>
|
||||
<td class="px-3 py-2 text-sm text-gray-900 dark:text-white whitespace-nowrap">${_esc(ts)}</td>
|
||||
<td class="px-3 py-2 text-sm font-mono text-right">${_fmtPpv(ev.tran_ppv)}</td>
|
||||
@@ -355,5 +356,15 @@ async function flagSelected(value) {
|
||||
}
|
||||
|
||||
// Initial empty state — let the user choose to load.
|
||||
|
||||
// Refresh the events table when the modal's review form saves — keeps
|
||||
// the FT badge in sync without a full page reload.
|
||||
window.addEventListener('sfm-event-review-saved', () => {
|
||||
if (_events.length) loadEvents();
|
||||
});
|
||||
</script>
|
||||
|
||||
{# Shared event-detail modal — rendered by /static/event-modal.js #}
|
||||
{% include 'partials/event_detail_modal.html' %}
|
||||
<script src="/static/event-modal.js"></script>
|
||||
{% endblock %}
|
||||
|
||||
@@ -118,6 +118,13 @@
|
||||
{# Shared event-detail modal — rendered by /static/event-modal.js #}
|
||||
{% include 'partials/event_detail_modal.html' %}
|
||||
<script src="/static/event-modal.js"></script>
|
||||
<script>
|
||||
// Refresh the events table when the modal's review form saves —
|
||||
// keeps the FT badge in sync without a full page reload.
|
||||
window.addEventListener('sfm-event-review-saved', () => {
|
||||
if (typeof loadEvents === 'function') loadEvents();
|
||||
});
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.sfm-tab {
|
||||
|
||||
@@ -3720,5 +3720,11 @@ function showToast(message, type = 'info') {
|
||||
{# Shared event-detail modal (clicking a row in the SFM Events table) #}
|
||||
{% include 'partials/event_detail_modal.html' %}
|
||||
<script src="/static/event-modal.js"></script>
|
||||
<script>
|
||||
// Refresh the unit's events table when the modal's review form saves.
|
||||
window.addEventListener('sfm-event-review-saved', () => {
|
||||
if (typeof loadUnitEvents === 'function') loadUnitEvents();
|
||||
});
|
||||
</script>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
@@ -992,4 +992,10 @@ document.getElementById('swap-modal')?.addEventListener('click', function(e) {
|
||||
{# Shared event-detail modal (clicking an event row in the Events tab) #}
|
||||
{% include 'partials/event_detail_modal.html' %}
|
||||
<script src="/static/event-modal.js"></script>
|
||||
<script>
|
||||
// Refresh the location's events table when the modal's review form saves.
|
||||
window.addEventListener('sfm-event-review-saved', () => {
|
||||
if (typeof loadLocationEvents === 'function') loadLocationEvents();
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user