ScansOverview: add ThFilterTrack
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -1,11 +1,12 @@
|
||||
<script>
|
||||
import { _ } from "svelte-i18n";
|
||||
import { DataHandler, Datatable, Th, ThFilter } from "@vincjo/datatables";
|
||||
import { ScanService } from "@odit/lfk-client-js";
|
||||
import { ScanService, TrackService } from "@odit/lfk-client-js";
|
||||
import store from "../../store";
|
||||
import Toastify from "toastify-js";
|
||||
import ScansEmptyState from "./ScansEmptyState.svelte";
|
||||
import ThFilterRunner from "./ThFilterRunner.svelte";
|
||||
import ThFilterTrack from "./ThFilterTrack.svelte";
|
||||
$: active_deletes = [];
|
||||
export let current_scans = [];
|
||||
const handler = new DataHandler(current_scans, { rowsPerPage: 20 });
|
||||
@@ -14,6 +15,10 @@
|
||||
current_scans = val;
|
||||
handler.setRows(val);
|
||||
});
|
||||
$: allTracks = [];
|
||||
TrackService.trackControllerGetAll().then((val) => {
|
||||
allTracks = val;
|
||||
});
|
||||
function format_laptime(laptime) {
|
||||
if (laptime == 0 || laptime == null) {
|
||||
return $_("first-scan-of-the-day");
|
||||
@@ -84,7 +89,8 @@
|
||||
<ThFilter {handler} filterBy="id" />
|
||||
<ThFilterRunner {handler} />
|
||||
<th style="border-bottom: 1px solid #ddd;" />
|
||||
<th style="border-bottom: 1px solid #ddd;" />
|
||||
<ThFilterTrack tracks={allTracks} {handler} />
|
||||
<!-- <th style="border-bottom: 1px solid #ddd;" /> -->
|
||||
<th style="border-bottom: 1px solid #ddd;" />
|
||||
<th style="border-bottom: 1px solid #ddd;" />
|
||||
<th style="border-bottom: 1px solid #ddd;" />
|
||||
|
||||
Reference in New Issue
Block a user