feat: improve toasts
All checks were successful
Build Latest and dev images / build-container (push) Successful in 1m0s
All checks were successful
Build Latest and dev images / build-container (push) Successful in 1m0s
This commit is contained in:
parent
e7a69ebdca
commit
481f6b686e
@ -106,7 +106,7 @@
|
||||
function deleteDonation() {
|
||||
DonationService.donationControllerRemove(original_data.id, false)
|
||||
.then((resp) => {
|
||||
toast($_("donation-deleted"));
|
||||
toast.success($_("donation-deleted"));
|
||||
location.replace("./");
|
||||
})
|
||||
.catch((err) => {
|
||||
|
@ -163,7 +163,7 @@
|
||||
...options,
|
||||
data: current_donations,
|
||||
}));
|
||||
toast($_("donation-deleted"));
|
||||
toast.success($_("donation-deleted"));
|
||||
}
|
||||
|
||||
onMount(async () => {
|
||||
|
@ -77,7 +77,7 @@
|
||||
function deleteDonor() {
|
||||
DonorService.donorControllerRemove(original_data.id, true)
|
||||
.then((resp) => {
|
||||
toast($_("donor-deleted"));
|
||||
toast.success($_("donor-deleted"));
|
||||
location.replace("./");
|
||||
})
|
||||
.catch((err) => {
|
||||
|
@ -174,7 +174,7 @@
|
||||
toast.loading($_("deleting-donor"));
|
||||
await DonorService.donorControllerRemove(event.detail.id, true);
|
||||
toast.dismiss();
|
||||
toast($_("donor-deleted"));
|
||||
toast.success($_("donor-deleted"));
|
||||
current_donors = current_donors.filter((d) => d.id !== event.detail.id);
|
||||
active_deletes = active_deletes.filter((a) => a.id !== event.detail.id);
|
||||
options.update((options) => ({
|
||||
|
@ -50,7 +50,7 @@
|
||||
);
|
||||
});
|
||||
grantedPermissions_initial = grantedPermissions;
|
||||
toast($_("permissions-updated"));
|
||||
toast.success($_("permissions-updated"));
|
||||
});
|
||||
}
|
||||
Object.values(CreatePermission.target).forEach((t) => {
|
||||
|
@ -18,7 +18,7 @@
|
||||
true
|
||||
)
|
||||
.then((resp) => {
|
||||
toast($_("organization-deleted"));
|
||||
toast.success($_("organization-deleted"));
|
||||
location.replace("./");
|
||||
})
|
||||
.catch((err) => {});
|
||||
|
@ -75,7 +75,7 @@
|
||||
false
|
||||
)
|
||||
.then((resp) => {
|
||||
toast($_("organization-deleted"));
|
||||
toast.success($_("organization-deleted"));
|
||||
location.replace("./");
|
||||
})
|
||||
.catch((err) => {});
|
||||
|
@ -30,7 +30,7 @@
|
||||
a.click();
|
||||
a.remove();
|
||||
toast.dismiss();
|
||||
toast($_("pdf-successfully-generated"));
|
||||
toast.success($_("pdf-successfully-generated"));
|
||||
}
|
||||
|
||||
function generateRunnerCards(locale) {
|
||||
|
@ -37,7 +37,7 @@
|
||||
a.click();
|
||||
a.remove();
|
||||
toast.dismiss();
|
||||
toast($_("pdf-successfully-generated"));
|
||||
toast.success($_("pdf-successfully-generated"));
|
||||
}
|
||||
|
||||
async function generateRunnerCertificates(locale) {
|
||||
@ -146,7 +146,7 @@
|
||||
count_orgs === generate_orgs.length
|
||||
) {
|
||||
toast.dismiss();
|
||||
toast($_("pdfs-successfully-generated"));
|
||||
toast.success($_("pdfs-successfully-generated"));
|
||||
}
|
||||
})
|
||||
.catch((err) => {});
|
||||
|
@ -36,7 +36,7 @@
|
||||
a.click();
|
||||
a.remove();
|
||||
toast.dismiss();
|
||||
toast($_("pdf-successfully-generated"));
|
||||
toast.success($_("pdf-successfully-generated"));
|
||||
}
|
||||
|
||||
async function generateTeamContracts(locale) {
|
||||
|
@ -150,7 +150,7 @@
|
||||
dispatch("created", { runners: resp });
|
||||
toast.dismiss();
|
||||
recent_processed = true;
|
||||
toast($_("import-finished"));
|
||||
toast.success($_("import-finished"));
|
||||
cancelModal();
|
||||
})
|
||||
.catch((err) => {
|
||||
@ -170,7 +170,7 @@
|
||||
dispatch("created", { runners: resp });
|
||||
toast.dismiss();
|
||||
recent_processed = true;
|
||||
toast($_("import-finished"));
|
||||
toast.success($_("import-finished"));
|
||||
cancelModal();
|
||||
})
|
||||
.catch((err) => {
|
||||
|
@ -146,7 +146,7 @@
|
||||
...options,
|
||||
data: current_runners,
|
||||
}));
|
||||
toast($_("runner-deleted"));
|
||||
toast.success($_("runner-deleted"));
|
||||
}
|
||||
|
||||
onMount(async () => {
|
||||
|
@ -72,7 +72,7 @@
|
||||
function deleteScan() {
|
||||
ScanService.scanControllerRemove(original_data.id, false)
|
||||
.then((resp) => {
|
||||
toast($_("deleted-scan"));
|
||||
toast.success($_("deleted-scan"));
|
||||
location.replace("./");
|
||||
})
|
||||
.catch((err) => {
|
||||
|
@ -174,7 +174,7 @@
|
||||
...options,
|
||||
data: current_scans,
|
||||
}));
|
||||
toast($_("scan-deleted"));
|
||||
toast.success($_("scan-deleted"));
|
||||
}
|
||||
|
||||
onMount(async () => {
|
||||
|
@ -15,7 +15,7 @@
|
||||
function deleteStation() {
|
||||
ScanStationService.scanStationControllerRemove(delete_station.id, true)
|
||||
.then((resp) => {
|
||||
toast($_("station-deleted"));
|
||||
toast.success($_("station-deleted"));
|
||||
location.replace("./");
|
||||
})
|
||||
.catch((err) => {});
|
||||
|
@ -49,7 +49,7 @@
|
||||
function deleteStation() {
|
||||
ScanStationService.scanStationControllerRemove(original_data.id, false)
|
||||
.then((resp) => {
|
||||
toast($_("station-deleted"));
|
||||
toast.success($_("station-deleted"));
|
||||
location.replace("./");
|
||||
})
|
||||
.catch((err) => {
|
||||
|
@ -165,7 +165,7 @@
|
||||
current_stations = current_stations.filter(
|
||||
(obj) => obj.id !== s.id
|
||||
);
|
||||
toast($_("station-deleted"));
|
||||
toast.success($_("station-deleted"));
|
||||
})
|
||||
.catch((err) => {
|
||||
modal_open = true;
|
||||
|
@ -14,7 +14,7 @@
|
||||
function deleteClient() {
|
||||
StatsClientService.statsClientControllerRemove(delete_client.id, true)
|
||||
.then((resp) => {
|
||||
toast($_("statsclient-deleted"));
|
||||
toast.success($_("statsclient-deleted"));
|
||||
location.replace("./");
|
||||
})
|
||||
.catch((err) => {});
|
||||
|
@ -22,7 +22,7 @@
|
||||
if (!successful) {
|
||||
throw new Error();
|
||||
}
|
||||
toast($_("copied-token-to-clipboard"));
|
||||
toast.success($_("copied-token-to-clipboard"));
|
||||
copied = true;
|
||||
} catch (err) {
|
||||
toast.error($_("error-whyile-copying-to-clipboard"));
|
||||
|
@ -20,7 +20,7 @@
|
||||
function deleteClient() {
|
||||
StatsClientService.statsClientControllerRemove(original_data.id, false)
|
||||
.then((resp) => {
|
||||
toast($_("statsclient-deleted"));
|
||||
toast.success($_("statsclient-deleted"));
|
||||
location.replace("./");
|
||||
})
|
||||
.catch((err) => {
|
||||
|
@ -118,7 +118,7 @@
|
||||
current_clients = current_clients.filter(
|
||||
(obj) => obj.id !== c.id
|
||||
);
|
||||
toast($_("statsclient-deleted"));
|
||||
toast.success($_("statsclient-deleted"));
|
||||
})
|
||||
.catch((err) => {
|
||||
modal_open = true;
|
||||
|
@ -67,7 +67,7 @@
|
||||
function deleteTeam() {
|
||||
RunnerTeamService.runnerTeamControllerRemove(original.id, false)
|
||||
.then((resp) => {
|
||||
toast($_("team-deleted"));
|
||||
toast.success($_("team-deleted"));
|
||||
location.replace("./");
|
||||
})
|
||||
.catch((err) => {
|
||||
|
@ -92,7 +92,7 @@
|
||||
usergroups_array_original = usergroups_array;
|
||||
//
|
||||
toast.dismiss();
|
||||
toast($_("user-updated"));
|
||||
toast.success($_("user-updated"));
|
||||
})
|
||||
.catch((err) => {});
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user