parent
ddd9c396b6
commit
17e0805fe6
@ -19,7 +19,11 @@
|
|||||||
export let current_runners;
|
export let current_runners;
|
||||||
export let import_modal_open;
|
export let import_modal_open;
|
||||||
$: searchvalue = "";
|
$: searchvalue = "";
|
||||||
$: importButtonEnabled = recent_processed && (!(selected_org_or_team == "" || selected_org_or_team == null) || !(passed_org?.id == null || passed_org?.id == 0) || !(passed_team?.id == null || passed_team?.id == 0))
|
$: importButtonEnabled =
|
||||||
|
recent_processed &&
|
||||||
|
(!(selected_org_or_team == "" || selected_org_or_team == null) ||
|
||||||
|
!(passed_org?.id == null || passed_org?.id == 0) ||
|
||||||
|
!(passed_team?.id == null || passed_team?.id == 0));
|
||||||
const dispatch = createEventDispatcher();
|
const dispatch = createEventDispatcher();
|
||||||
function cancelModal() {
|
function cancelModal() {
|
||||||
json_output = [];
|
json_output = [];
|
||||||
@ -124,6 +128,13 @@
|
|||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
toast.hideToast();
|
toast.hideToast();
|
||||||
recent_processed = true;
|
recent_processed = true;
|
||||||
|
Toastify({
|
||||||
|
text: $_("error-during-import"),
|
||||||
|
duration: 500,
|
||||||
|
backgroundColor:
|
||||||
|
"linear-gradient(90deg, hsla(281, 37%, 45%, 1) 0%, hsla(1, 62%, 48%, 1) 100%)",
|
||||||
|
}).showToast();
|
||||||
|
cancelModal();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (opened_from === "TeamDetail") {
|
if (opened_from === "TeamDetail") {
|
||||||
@ -141,6 +152,13 @@
|
|||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
toast.hideToast();
|
toast.hideToast();
|
||||||
recent_processed = true;
|
recent_processed = true;
|
||||||
|
Toastify({
|
||||||
|
text: $_("error-during-import"),
|
||||||
|
duration: 500,
|
||||||
|
backgroundColor:
|
||||||
|
"linear-gradient(90deg, hsla(281, 37%, 45%, 1) 0%, hsla(1, 62%, 48%, 1) 100%)",
|
||||||
|
}).showToast();
|
||||||
|
cancelModal();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (opened_from === "RunnerOverview") {
|
if (opened_from === "RunnerOverview") {
|
||||||
@ -164,6 +182,13 @@
|
|||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
toast.hideToast();
|
toast.hideToast();
|
||||||
recent_processed = true;
|
recent_processed = true;
|
||||||
|
Toastify({
|
||||||
|
text: $_("error-during-import"),
|
||||||
|
duration: 500,
|
||||||
|
backgroundColor:
|
||||||
|
"linear-gradient(90deg, hsla(281, 37%, 45%, 1) 0%, hsla(1, 62%, 48%, 1) 100%)",
|
||||||
|
}).showToast();
|
||||||
|
cancelModal();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (selected_org_or_team.includes("TEAM_")) {
|
if (selected_org_or_team.includes("TEAM_")) {
|
||||||
@ -186,6 +211,13 @@
|
|||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
toast.hideToast();
|
toast.hideToast();
|
||||||
recent_processed = true;
|
recent_processed = true;
|
||||||
|
Toastify({
|
||||||
|
text: $_("error-during-import"),
|
||||||
|
duration: 500,
|
||||||
|
backgroundColor:
|
||||||
|
"linear-gradient(90deg, hsla(281, 37%, 45%, 1) 0%, hsla(1, 62%, 48%, 1) 100%)",
|
||||||
|
}).showToast();
|
||||||
|
cancelModal();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -194,13 +226,13 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
{#if import_modal_open}
|
{#if import_modal_open}
|
||||||
<div
|
<div
|
||||||
class="fixed z-10 inset-0 overflow-y-auto"
|
class="fixed z-10 inset-0 overflow-y-auto"
|
||||||
use:focusTrap
|
use:focusTrap
|
||||||
use:clickOutside
|
use:clickOutside
|
||||||
on:click_outside={() => {
|
on:click_outside={() => {
|
||||||
cancelModal();
|
cancelModal();
|
||||||
}}>
|
}}>
|
||||||
<div
|
<div
|
||||||
class="flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0">
|
class="flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0">
|
||||||
<div class="fixed inset-0 transition-opacity" aria-hidden="true">
|
<div class="fixed inset-0 transition-opacity" aria-hidden="true">
|
||||||
|
@ -376,5 +376,6 @@
|
|||||||
"you-can-now-use-your-new-password-to-log-in-to-your-account": "Du kannst dich jetzt mit deinem neuen Passwort anmelden! 🎉",
|
"you-can-now-use-your-new-password-to-log-in-to-your-account": "Du kannst dich jetzt mit deinem neuen Passwort anmelden! 🎉",
|
||||||
"you-dont-have-any-scanstations-yet": "Es gibt noch keine Scannerstationen",
|
"you-dont-have-any-scanstations-yet": "Es gibt noch keine Scannerstationen",
|
||||||
"you-have-to-provide-an-organization": "Du musst eine Organisation angeben",
|
"you-have-to-provide-an-organization": "Du musst eine Organisation angeben",
|
||||||
"zip-postal-code": "Postleitzahl"
|
"zip-postal-code": "Postleitzahl",
|
||||||
|
"error-during-import": "Fehler beim Importieren"
|
||||||
}
|
}
|
@ -376,5 +376,6 @@
|
|||||||
"you-can-now-use-your-new-password-to-log-in-to-your-account": "You can now use your new password to log in to your account! 🎉",
|
"you-can-now-use-your-new-password-to-log-in-to-your-account": "You can now use your new password to log in to your account! 🎉",
|
||||||
"you-dont-have-any-scanstations-yet": "You don't have any scanstations yet",
|
"you-dont-have-any-scanstations-yet": "You don't have any scanstations yet",
|
||||||
"you-have-to-provide-an-organization": "You have to provide an organization",
|
"you-have-to-provide-an-organization": "You have to provide an organization",
|
||||||
"zip-postal-code": "ZIP/ postal code"
|
"zip-postal-code": "ZIP/ postal code",
|
||||||
|
"error-during-import": "Error during import"
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user