Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added serie field to the vehicle interface #858

Merged
merged 1 commit into from
Oct 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions packages/network/src/api/inspection/mappers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,7 @@ function mapVehicle(response: ApiInspectionGet): Vehicle | undefined {
entityType: MonkEntityType.VEHICLE,
brand: response.vehicle.brand,
model: response.vehicle.model,
serie: response.vehicle.serie,
plate: response.vehicle.plate,
type: response.vehicle.vehicle_type,
mileageUnit: response.vehicle.mileage_unit as MileageUnit | undefined,
Expand Down Expand Up @@ -501,6 +502,7 @@ export function mapApiInspectionPost(options: CreateInspectionOptions): ApiInspe
? {
brand: options.vehicle.brand,
model: options.vehicle.model,
serie: options.vehicle.serie,
plate: options.vehicle.plate,
vehicle_type: options.vehicle.type,
mileage:
Expand Down
1 change: 1 addition & 0 deletions packages/network/src/api/models/vehicle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export interface ApiVehicleComponent {
mileage_unit?: ApiMileageUnit;
mileage_value?: number;
model?: string;
serie?: string;
owner_info?: ApiOwnerInfo;
plate?: string;
trade_in_offer?: number;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"vehicle": {
"brand": "brand",
"model": "model",
"serie": "serie",
"plate": "plate",
"vehicle_type": "hatchback",
"mileage": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export default {
vehicle: {
brand: 'brand',
model: 'model',
serie: 'serie',
plate: 'plate',
type: 'hatchback',
mileageUnit: 'mileageUnit',
Expand Down
4 changes: 4 additions & 0 deletions packages/types/src/state/vehicle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ export interface Vehicle extends MonkEntity {
* The model of the vehicle.
*/
model?: string;
/**
* The serie / trim of the vehicle.
*/
serie?: string;
/**
* The license plate number of the vehicle.
*/
Expand Down