refactor: update payment types and user interface, enhance error handling, and adjust API base URL
Some checks failed
Build and Push Docker Images / Build and Push Docker Images (push) Failing after 3m14s

This commit is contained in:
2025-04-05 23:25:17 +05:00
parent aa18484475
commit 9e2a2f430e
15 changed files with 596 additions and 423 deletions

View File

@ -50,3 +50,23 @@ export interface Api400Error {
message: string;
};
}
export interface Payment {
id: string;
devices: Device[];
number_of_months: number;
amount: number;
paid: boolean;
paid_at: string | null;
method: string;
expires_at: string | null;
created_at: string;
updated_at: string;
user: number;
}
export interface NewPayment {
device_ids: number[];
number_of_months: number;
amount: number;
}

View File

@ -1,11 +1,3 @@
export type PaymentType = {
numberOfMonths: number;
userId: string;
deviceIds: string[];
amount: number;
paid: boolean;
};
export type TopupType = {
amount: number;
userId: string;

View File

@ -19,6 +19,8 @@ export interface User {
user_permissions: Permission[];
first_name: string;
last_name: string;
mobile?: string;
wallet_balance?: number;
is_superuser: boolean;
date_joined: string;
last_login: string;