Scan reactive add

This commit is contained in:
2023-04-12 21:14:37 +02:00
parent 9811ede3b2
commit f5d14f2e18
3 changed files with 16 additions and 5 deletions

View File

@@ -8,8 +8,8 @@
} from "@odit/lfk-client-js";
import Select from "svelte-select";
import Toastify from "toastify-js";
import { createEventDispatcher } from "svelte";
export let modal_open;
export let current_scans;
const getRunnerLabel = (option) =>
option.firstname + " " + (option.middlename || "") + " " + option.lastname;
const filterRunners = (label, filterText, option) =>
@@ -18,6 +18,7 @@
function focus(el) {
el.focus();
}
const dispatch = createEventDispatcher();
$: runner = 0;
$: runners = [];
RunnerService.runnerControllerGetAll().then((val) => {
@@ -63,8 +64,7 @@
duration: 500,
backgroundColor: "linear-gradient(to right, #00b09b, #96c93d)",
}).showToast();
current_scans.push(result);
current_scans = current_scans;
dispatch("created", { scans: [result] });
})
.catch((err) => {
//