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