parent
258b3cea66
commit
7ff1d50079
@ -123,7 +123,7 @@
|
||||
<div class="col-span-6">
|
||||
<label
|
||||
for="track"
|
||||
class="block text-sm font-medium text-gray-700">Tracks</label>
|
||||
class="block text-sm font-medium text-gray-700">Track</label>
|
||||
<select
|
||||
name="track"
|
||||
bind:value={track}
|
||||
|
@ -9,7 +9,7 @@
|
||||
);
|
||||
import store from "../../store";
|
||||
import ScanStationsEmptyState from "./ScanStationsEmptyState.svelte";
|
||||
import ConfirmScanStationDeletion from "./ConfirmScanStationDeletion.svelte";
|
||||
import ConfirmScanStationDeletion from "./ConfirmScanStationDeletion.svelte";
|
||||
$: searchvalue = "";
|
||||
$: active_deletes = [];
|
||||
let delete_station = {};
|
||||
@ -79,8 +79,9 @@ import ConfirmScanStationDeletion from "./ConfirmScanStationDeletion.svelte";
|
||||
<div class="ml-4">
|
||||
<div class="text-sm font-medium text-gray-900">
|
||||
<a
|
||||
href="../tracks"
|
||||
class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-gray-100 text-gray-800"> {s.track.name || s.track.distance + "m"}</a>
|
||||
href="../tracks"
|
||||
class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-gray-100 text-gray-800">
|
||||
{s.track.name || s.track.distance + 'm'}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -113,22 +114,22 @@ import ConfirmScanStationDeletion from "./ConfirmScanStationDeletion.svelte";
|
||||
tabindex="0"
|
||||
class="ml-4 text-indigo-600 hover:text-indigo-900 cursor-pointer">{$_('cancel-delete')}</button>
|
||||
<button
|
||||
on:click={() => {
|
||||
ScanStationService.scanStationControllerRemove(s.id, false)
|
||||
.then((resp) => {
|
||||
current_stations = current_stations.filter((obj) => obj.id !== s.id);
|
||||
Toastify({
|
||||
text: 'Station deleted',
|
||||
duration: 500,
|
||||
backgroundColor:
|
||||
'linear-gradient(to right, #00b09b, #96c93d)',
|
||||
}).showToast();
|
||||
})
|
||||
.catch((err) => {
|
||||
modal_open = true;
|
||||
delete_station = s;
|
||||
});
|
||||
}}
|
||||
on:click={() => {
|
||||
ScanStationService.scanStationControllerRemove(s.id, false)
|
||||
.then((resp) => {
|
||||
current_stations = current_stations.filter((obj) => obj.id !== s.id);
|
||||
Toastify({
|
||||
text: 'Station deleted',
|
||||
duration: 500,
|
||||
backgroundColor:
|
||||
'linear-gradient(to right, #00b09b, #96c93d)',
|
||||
}).showToast();
|
||||
})
|
||||
.catch((err) => {
|
||||
modal_open = true;
|
||||
delete_station = s;
|
||||
});
|
||||
}}
|
||||
tabindex="0"
|
||||
class="ml-4 text-red-600 hover:text-red-900 cursor-pointer">{$_('confirm-delete')}</button>
|
||||
</td>
|
||||
|
Loading…
x
Reference in New Issue
Block a user