diff --git a/src/components/scanstations/AddScanStationModal.svelte b/src/components/scanstations/AddScanStationModal.svelte
index 48ea18ae..207aa6ff 100644
--- a/src/components/scanstations/AddScanStationModal.svelte
+++ b/src/components/scanstations/AddScanStationModal.svelte
@@ -4,14 +4,16 @@
import { focusTrap } from "svelte-focus-trap";
import { ScanStationService, TrackService } from "@odit/lfk-client-js";
import Toastify from "toastify-js";
+ import Select from "svelte-select";
export let modal_open;
export let new_station;
export let current_stations;
export let copy_modal_open;
let tracks = [];
TrackService.trackControllerGetAll().then((val) => {
- tracks = val;
- track = tracks[0].id;
+ tracks = val.map((t) => {
+ return { label: t.name || `#${t.id}`, value: t };
+ });
});
function focus(el) {
el.focus();
@@ -39,7 +41,7 @@
if (processed_last_submit === true) {
processed_last_submit = false;
const toast = Toastify({
- text: $_('scanstation-is-being-added'),
+ text: $_("scanstation-is-being-added"),
duration: -1,
}).showToast();
let postdata = {
@@ -55,14 +57,14 @@
modal_open = false;
//
Toastify({
- text: $_('scanstation-added'),
+ text: $_("scanstation-added"),
duration: 500,
backgroundColor: "linear-gradient(to right, #00b09b, #96c93d)",
}).showToast();
current_stations.push(result);
current_stations = current_stations;
- new_station=result;
- copy_modal_open=true;
+ new_station = result;
+ copy_modal_open = true;
})
.catch((err) => {
//
@@ -111,7 +113,7 @@
width="24"
height="24">