new defaults (car)
This commit is contained in:
@@ -117,3 +117,62 @@ export function defaultSupporter() {
|
||||
supporter.membership.subscription_model.name = SUPPORTER_SUBSCRIPTION_MODEL_NAME;
|
||||
return supporter;
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns {App.Types['location']}
|
||||
*/
|
||||
export function defaultLocation() {
|
||||
return {
|
||||
latitude: 0,
|
||||
longitude: 0
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns {App.Types['damage']}
|
||||
*/
|
||||
export function defaultDamage() {
|
||||
return {
|
||||
id: 0,
|
||||
opponent: defaultUser(),
|
||||
insurance: null,
|
||||
notes: ''
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns {App.Types['insurance']}
|
||||
*/
|
||||
export function defaultInsurance() {
|
||||
return {
|
||||
id: 0,
|
||||
company: '',
|
||||
reference: '',
|
||||
start_date: '',
|
||||
end_date: '',
|
||||
notes: ''
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns {App.Types['car']}
|
||||
*/
|
||||
export function defaultCar() {
|
||||
return {
|
||||
id: 0,
|
||||
name: '',
|
||||
status: '',
|
||||
brand: '',
|
||||
model: '',
|
||||
price: 0,
|
||||
rate: 0,
|
||||
start_date: '',
|
||||
end_date: '',
|
||||
color: '',
|
||||
licence_plate: '',
|
||||
location: defaultLocation(),
|
||||
damages: [],
|
||||
insurances: [],
|
||||
notes: ''
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user