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, { let response = await api.post(`/spaces/${spaceId}/transactions/_export`, filters, {
responseType: 'blob' 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'); const link = document.createElement('a');
link.href = url; link.href = url;
link.setAttribute('download', `transactions_${spaceId}_${toDateOnly(new Date())}.csv`); link.setAttribute('download', fileName);
document.body.appendChild(link); document.body.appendChild(link);
link.click(); link.click();
link.remove(); link.remove();
window.URL.revokeObjectURL(url);
} catch (error) { } catch (error) {
console.error(error); console.error(error);
throw error; throw error;