mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-17 12:42:15 +01:00
fix error handling for organization export, fixes ST-426
This commit is contained in:
@@ -25,6 +25,7 @@ async function exportData() {
|
|||||||
loading.value = true;
|
loading.value = true;
|
||||||
const organizationId = getCurrentOrganizationId();
|
const organizationId = getCurrentOrganizationId();
|
||||||
if (organizationId) {
|
if (organizationId) {
|
||||||
|
try {
|
||||||
const response = await handleApiRequestNotifications(
|
const response = await handleApiRequestNotifications(
|
||||||
() =>
|
() =>
|
||||||
api.exportOrganization(
|
api.exportOrganization(
|
||||||
@@ -40,10 +41,12 @@ async function exportData() {
|
|||||||
);
|
);
|
||||||
if (response) {
|
if (response) {
|
||||||
showResultModal.value = true;
|
showResultModal.value = true;
|
||||||
loading.value = false;
|
|
||||||
exportResponse.value = response;
|
exportResponse.value = response;
|
||||||
window.open(response.download_url, '_self')?.focus();
|
window.open(response.download_url, '_self')?.focus();
|
||||||
}
|
}
|
||||||
|
} finally {
|
||||||
|
loading.value = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user