diff --git a/src/components/scanstations/AddScanStationModal.svelte b/src/components/scanstations/AddScanStationModal.svelte index 921fbcbd..1794e16c 100644 --- a/src/components/scanstations/AddScanStationModal.svelte +++ b/src/components/scanstations/AddScanStationModal.svelte @@ -5,7 +5,9 @@ import { ScanStationService, TrackService } from "@odit/lfk-client-js"; import Toastify from "toastify-js"; 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; @@ -59,6 +61,8 @@ }).showToast(); current_stations.push(result); current_stations = current_stations; + new_station=result; + copy_modal_open=true; }) .catch((err) => { // diff --git a/src/components/scanstations/CopyScanStationTokenModal.svelte b/src/components/scanstations/CopyScanStationTokenModal.svelte new file mode 100644 index 00000000..7ef8d3e1 --- /dev/null +++ b/src/components/scanstations/CopyScanStationTokenModal.svelte @@ -0,0 +1,127 @@ + + +{#if copy_modal_open} + {#if valueCopy != null} + + {/if} +
+
+ +
+{/if} diff --git a/src/components/scanstations/ScanStations.svelte b/src/components/scanstations/ScanStations.svelte index 882f03d3..74b636af 100644 --- a/src/components/scanstations/ScanStations.svelte +++ b/src/components/scanstations/ScanStations.svelte @@ -2,8 +2,11 @@ import { _ } from "svelte-i18n"; import store from "../../store"; import AddScanStationModal from "./AddScanStationModal.svelte"; +import CopyScanStationTokenModal from "./CopyScanStationTokenModal.svelte"; import ScanStationsOverview from "./ScanStationsOverview.svelte"; export let modal_open = false; + export let copy_modal_open = false; + export let new_station = {}; let current_stations = []; @@ -21,9 +24,10 @@ {/if} - + {#if store.state.jwtinfo.userdetails.permissions.includes('STATION:CREATE')} - + + {/if} diff --git a/src/components/scanstations/ScanStationsEmptyState.svelte b/src/components/scanstations/ScanStationsEmptyState.svelte index 3d34d5b5..5a1baec6 100644 --- a/src/components/scanstations/ScanStationsEmptyState.svelte +++ b/src/components/scanstations/ScanStationsEmptyState.svelte @@ -1,8 +1,11 @@ @@ -14,4 +17,5 @@ import AddScanStationModal from "./AddScanStationModal.svelte";

- + + \ No newline at end of file