fix tx isdone checkbox text size

This commit is contained in:
xds
2026-03-10 15:54:34 +03:00
parent a5f4d75306
commit fb60c69846

View File

@@ -85,13 +85,25 @@ async function exportTransactions(spaceId: number, filters: TransactionFilters):
let response = await api.post(`/spaces/${spaceId}/transactions/_export`, filters, {
responseType: 'blob'
});
const url = window.URL.createObjectURL(new Blob([response.data]));
const contentDisposition = response.headers['content-disposition'];
let fileName = `transactions_${spaceId}_${toDateOnly(new Date())}.csv`;
if (contentDisposition) {
const fileNameMatch = contentDisposition.match(/filename\*?=['"]?(?:UTF-8'')?([^; '"]+)['"]?/i);
if (fileNameMatch && fileNameMatch[1]) {
fileName = decodeURIComponent(fileNameMatch[1]);
}
}
const url = window.URL.createObjectURL(response.data);
const link = document.createElement('a');
link.href = url;
link.setAttribute('download', `transactions_${spaceId}_${toDateOnly(new Date())}.csv`);
link.setAttribute('download', fileName);
document.body.appendChild(link);
link.click();
link.remove();
window.URL.revokeObjectURL(url);
} catch (error) {
console.error(error);
throw error;