mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-18 08:44:25 +08:00
export transaction data based on the conditions on the transaction list page (#55)
This commit is contained in:
+3
-2
@@ -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' });
|
||||
|
||||
Reference in New Issue
Block a user