Remap to noun-adjective on report-table/table-report

This commit is contained in:
Eli Ribble 2026-03-11 23:20:38 +00:00
parent 7231bf0aad
commit a049cef651
No known key found for this signature in database
2 changed files with 6 additions and 8 deletions

View file

@ -1,6 +1,4 @@
// report-table.js class TableReport extends HTMLElement {
class ReportTable extends HTMLElement {
constructor() { constructor() {
super(); super();
this.attachShadow({ mode: "open" }); this.attachShadow({ mode: "open" });
@ -206,4 +204,4 @@ class ReportTable extends HTMLElement {
} }
// Register the custom element // Register the custom element
customElements.define("report-table", ReportTable); customElements.define("table-report", TableReport);

View file

@ -12,7 +12,7 @@
<script src="/static/js/map-multipoint.js"></script> <script src="/static/js/map-multipoint.js"></script>
<!-- ordering matters since report table depends on time-relative --> <!-- ordering matters since report table depends on time-relative -->
<script src="/static/js/time-relative.js"></script> <script src="/static/js/time-relative.js"></script>
<script src="/static/js/report-table.js"></script> <script src="/static/js/table-report.js"></script>
<script> <script>
var markers = []; var markers = [];
// Because features come from tiled vector data, feature geometries may be split // Because features come from tiled vector data, feature geometries may be split
@ -140,7 +140,7 @@ function onLoad() {
console.log("location error", error); console.log("location error", error);
}) })
}); });
const report_table = document.querySelector('report-table'); const report_table = document.querySelector('table-report');
report_table.addEventListener("row-clicked", (e) => { report_table.addEventListener("row-clicked", (e) => {
window.location = "/status/" + e.detail.reportId; window.location = "/status/" + e.detail.reportId;
}) })
@ -162,7 +162,7 @@ function onLoad() {
function renderReports(features) { function renderReports(features) {
//console.log("render reports", features); //console.log("render reports", features);
const report_table = document.querySelector('report-table'); const report_table = document.querySelector('table-report');
let reports = []; let reports = [];
for (const feature of features) { for (const feature of features) {
reports.push({ reports.push({
@ -279,7 +279,7 @@ document.addEventListener('DOMContentLoaded', onLoad);
</div> </div>
<div class="card-body p-0"> <div class="card-body p-0">
<div class="table-responsive"> <div class="table-responsive">
<report-table /> <table-report />
</div> </div>
</div> </div>
<!-- <!--