export transaction data based on the conditions on the transaction list page (#55)

This commit is contained in:
MaysWind
2025-06-30 23:49:01 +08:00
parent 53aa4ff390
commit 2e1a9362fc
20 changed files with 236 additions and 11 deletions
+3 -2
View File
@@ -16,6 +16,7 @@ import {
} from '@/models/user.ts';
import type {
ExportTransactionDataRequest,
DataStatisticsResponse
} from '@/models/data_management.ts';
@@ -360,9 +361,9 @@ export const useUserStore = defineStore('user', () => {
});
}
function getExportedUserData(fileType: string): Promise<Blob> {
function getExportedUserData(fileType: string, req?: ExportTransactionDataRequest): Promise<Blob> {
return new Promise((resolve, reject) => {
services.getExportedUserData(fileType).then(response => {
services.getExportedUserData(fileType, req).then(response => {
if (response && response.headers) {
if (fileType === 'csv' && response.headers['content-type'] !== 'text/csv') {
reject({ message: 'Unable to retrieve exported user data' });