parent
a7642c2da4
commit
4ece21cdf2
@ -8,6 +8,7 @@
|
||||
import store from "../../store";
|
||||
import RunnersEmptyState from "./RunnersEmptyState.svelte";
|
||||
import Select from "svelte-select";
|
||||
import Toastify from "toastify-js";
|
||||
$: searchvalue = "";
|
||||
$: active_deletes = [];
|
||||
export let current_runners = [];
|
||||
@ -80,6 +81,10 @@
|
||||
<button
|
||||
on:click={() => {
|
||||
const locale = getLocaleFromNavigator();
|
||||
const toast = Toastify({
|
||||
text: $_('generating-pdf'),
|
||||
duration: -1,
|
||||
}).showToast();
|
||||
fetch(
|
||||
`https://dev.lauf-fuer-kaya.de/documents/contracts?locale=${locale}&download=true&key=${config.documentserver_key}`,
|
||||
{
|
||||
@ -101,6 +106,13 @@
|
||||
document.body.appendChild(a);
|
||||
a.click();
|
||||
a.remove();
|
||||
toast.hideToast();
|
||||
Toastify({
|
||||
text: $_('pdf-successfully-generated'),
|
||||
duration: 3500,
|
||||
backgroundColor:
|
||||
'linear-gradient(to right, #00b09b, #96c93d)',
|
||||
}).showToast();
|
||||
})
|
||||
.catch((err) => {
|
||||
console.error(err);
|
||||
|
Loading…
x
Reference in New Issue
Block a user