Load the list of movements on webui
This commit is contained in:
@ -13,6 +13,18 @@ export interface MovementUpdate {
|
||||
checked: boolean;
|
||||
}
|
||||
|
||||
export interface Movement {
|
||||
id: number;
|
||||
account_id: number;
|
||||
time: number;
|
||||
label: string;
|
||||
file_id?: number;
|
||||
amount: number;
|
||||
checked: boolean;
|
||||
time_create: number;
|
||||
time_update: number;
|
||||
}
|
||||
|
||||
export class MovementApi {
|
||||
/**
|
||||
* Get all accounts balances
|
||||
@ -36,4 +48,16 @@ export class MovementApi {
|
||||
jsonData: q,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all the movements of an account
|
||||
*/
|
||||
static async GetAccountMovements(account_id: number): Promise<Movement[]> {
|
||||
return (
|
||||
await APIClient.exec({
|
||||
uri: `/account/${account_id}/movements`,
|
||||
method: "GET",
|
||||
})
|
||||
).data;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user