basic progress toasts

ref #62
This commit is contained in:
2021-02-20 17:19:17 +01:00
parent dbc0ab76af
commit a7642c2da4
7 changed files with 70 additions and 1 deletions

View File

@@ -122,6 +122,10 @@
on:click={async () => {
const locale = getLocaleFromNavigator();
const runners = await RunnerOrganizationService.runnerOrganizationControllerGetRunners(original_object.id);
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}`,
{
@@ -141,6 +145,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) => {});
}}