Can create movements from UI

This commit is contained in:
2025-04-21 15:29:00 +02:00
parent 18bed77c7b
commit 09e44da46e
8 changed files with 189 additions and 15 deletions

View File

@ -4,6 +4,15 @@ export interface Balances {
[key: number]: number;
}
export interface MovementUpdate {
account_id: number;
time: number;
label: String;
file_id?: number;
amount: number;
checked: boolean;
}
export class MovementApi {
/**
* Get all accounts balances
@ -16,4 +25,15 @@ export class MovementApi {
})
).data;
}
/**
* Create a new movement
*/
static async Create(q: MovementUpdate): Promise<void> {
await APIClient.exec({
uri: `/movement`,
method: "POST",
jsonData: q,
});
}
}

View File

@ -17,6 +17,7 @@ export interface ServerConstraints {
token_name: LenConstraint;
token_ip_net: LenConstraint;
token_max_inactivity: LenConstraint;
account_name: LenConstraint;
movement_label: LenConstraint;
}