mirror of
https://github.com/magicbug/Cloudlog
synced 2026-08-13 17:49:35 -04:00
Introduce a new partial view and controller endpoint for rendering accumulated-results as an HTMX component, and refactor the accumulated statistics page and JS. Changes include: adding component_accumulated_results() in the Accumulated controller and a new view (accumulate/component_results.php) exposing filter params via data-attributes; updating accumulate/index.php to use a card-based layout, improved form markup, and HTMX attributes to load the results component; and a major rewrite of assets/js/sections/accumulatedstatistics.js to modularize logic (getAwardText, setAccumulateLoading, accumulateRender), improve loading/error handling, rebuild chart/table markup, update DataTables usage, and hook into htmx:afterSwap to render the chart when the component is swapped in. Overall this enables partial updates, better UX, and cleaner client-side code.
18 lines
847 B
PHP
18 lines
847 B
PHP
<div class="card shadow-sm">
|
|
<div class="card-header d-flex align-items-center justify-content-between">
|
|
<h2 class="h5 mb-0">Results</h2>
|
|
<span class="badge text-bg-secondary rounded-pill">Updated</span>
|
|
</div>
|
|
<div class="card-body">
|
|
<div id="accumulateParams"
|
|
data-band="<?php echo htmlspecialchars($band, ENT_QUOTES, 'UTF-8'); ?>"
|
|
data-award="<?php echo htmlspecialchars($award, ENT_QUOTES, 'UTF-8'); ?>"
|
|
data-mode="<?php echo htmlspecialchars($mode, ENT_QUOTES, 'UTF-8'); ?>"
|
|
data-period="<?php echo htmlspecialchars($period, ENT_QUOTES, 'UTF-8'); ?>"></div>
|
|
|
|
<div id="accumulateContainer">
|
|
<canvas id="myChartAccumulate" width="400" height="150"></canvas>
|
|
<div id="accumulateTable"></div>
|
|
</div>
|
|
</div>
|
|
</div>
|