frontend: add car handling
This commit is contained in:
44
frontend/src/app.d.ts
vendored
44
frontend/src/app.d.ts
vendored
@@ -68,12 +68,52 @@ interface User {
|
||||
notes: string | '';
|
||||
}
|
||||
|
||||
interface Car {
|
||||
id: number | -1;
|
||||
name: string | '';
|
||||
status: number | 0;
|
||||
brand: string | '';
|
||||
model: string | '';
|
||||
price: number | 0;
|
||||
rate: number | 0;
|
||||
start_date: string | '';
|
||||
end_date: string | '';
|
||||
color: string | '';
|
||||
licence_plate: string | '';
|
||||
location: Location;
|
||||
damages: Damage[] | [];
|
||||
insurances: Insurance[] | [];
|
||||
notes: string | '';
|
||||
}
|
||||
|
||||
interface Location {
|
||||
latitude: number | 0;
|
||||
longitude: number | 0;
|
||||
}
|
||||
|
||||
interface Damage {
|
||||
id: number | -1;
|
||||
opponent: User;
|
||||
insurance: Insurance | null;
|
||||
notes: string | '';
|
||||
}
|
||||
|
||||
interface Insurance {
|
||||
id: number | -1;
|
||||
company: string | '';
|
||||
reference: string | '';
|
||||
start_date: string | '';
|
||||
end_date: string | '';
|
||||
notes: string | '';
|
||||
}
|
||||
|
||||
declare global {
|
||||
namespace App {
|
||||
// interface Error {}
|
||||
interface Locals {
|
||||
user: User;
|
||||
users: User[];
|
||||
cars: Cars[];
|
||||
subscriptions: Subscription[];
|
||||
licence_categories: LicenceCategory[];
|
||||
}
|
||||
@@ -84,6 +124,10 @@ declare global {
|
||||
licence: Licence;
|
||||
licenceCategory: LicenceCategory;
|
||||
bankAccount: BankAccount;
|
||||
car: Car;
|
||||
insurance: Insurance;
|
||||
location: Location;
|
||||
damage: Damage;
|
||||
}
|
||||
// interface PageData {}
|
||||
// interface Platform {}
|
||||
|
||||
Reference in New Issue
Block a user