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

Created HGV vehicle type #852

Merged
merged 1 commit into from
Sep 27, 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
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { useTranslation } from 'react-i18next';
import { Navigate } from 'react-router-dom';
import { VehicleTypeSelection } from '@monkvision/common-ui-web';
import { useMonkAppState } from '@monkvision/common';
import { VehicleType } from '@monkvision/types';
import { Page } from '../pages';

export function VehicleTypeSelectionPage() {
Expand All @@ -20,6 +21,7 @@ export function VehicleTypeSelectionPage() {
authToken={authToken ?? ''}
apiDomain={config.apiDomain}
thumbnailDomain={config.thumbnailDomain}
availableVehicleTypes={[VehicleType.HGV]} // TODO : Remove this line
/>
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ const vehicleModelDisplayOverlays: Record<Exclude<VehicleModel, VehicleModel.ALL
[VehicleModel.JGC21]: sights['jgc21-VHq_6BM-'].overlay,
[VehicleModel.TSIENNA20]: sights['tsienna20-jY3cR5vy'].overlay,
[VehicleModel.VWTROC]: sights['vwtroc-IzMR_OzQ'].overlay,
[VehicleModel.MAN12]: sights['man12-u8GNhGqe'].overlay,
};

export interface SightCardProps {
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { VehicleTypeSedanAsset } from './sedan';
import { VehicleTypeLargeSuvAsset } from './largeSuv';
import { VehicleTypeMinivanAsset } from './minivan';
import { VehicleTypeSuvAsset } from './suv';
import { VehicleTypeHGVAsset } from './hgv';

export const VehicleTypeAssetsMap: Record<VehicleType, string> = {
[VehicleType.HATCHBACK]: VehicleTypeHatchbackAsset,
Expand All @@ -19,4 +20,5 @@ export const VehicleTypeAssetsMap: Record<VehicleType, string> = {
[VehicleType.LARGE_SUV]: VehicleTypeLargeSuvAsset,
[VehicleType.MINIVAN]: VehicleTypeMinivanAsset,
[VehicleType.SUV]: VehicleTypeSuvAsset,
[VehicleType.HGV]: VehicleTypeHGVAsset,
};
2 changes: 1 addition & 1 deletion packages/sights/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"eslint": "eslint --format=pretty ./src ./test",
"eslint:fix": "eslint --fix --format=pretty ./src ./test",
"lint": "yarn run prettier && yarn run eslint",
"lint:fix": "yarn run prettier:fix && yarn run eslint:fix && yarn run svgo"
"lint:fix": "yarn run prettier:fix && yarn run eslint:fix && echo \"Running SVGO on package overlays...\" && yarn run svgo"
},
"dependencies": {
"@monkvision/types": "4.0.19"
Expand Down
7 changes: 7 additions & 0 deletions packages/sights/research/data/labels.json
Original file line number Diff line number Diff line change
Expand Up @@ -552,6 +552,13 @@
"de": "Geländewagen",
"nl": "SUV"
},
"hgv": {
"key": "hgv",
"en": "HGV",
"fr": "HGV",
"de": "HGV",
"nl": "HGV"
},
"tire": {
"key": "tire",
"en": "Tire",
Expand Down
66 changes: 66 additions & 0 deletions packages/sights/research/data/man12/man12.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
{
"man12-2VHq5s6d": {
"id": "man12-2VHq5s6d",
"category": "exterior",
"label": "rear-right",
"overlay": "man12-2VHq5s6d.svg",
"vehicle": "man12",
"tasks": ["damage_detection"]
},
"man12-aOHkUnUo": {
"id": "man12-aOHkUnUo",
"category": "exterior",
"label": "rear-left",
"overlay": "man12-aOHkUnUo.svg",
"vehicle": "man12",
"tasks": ["damage_detection"]
},
"man12-AUlxkp6e": {
"id": "man12-AUlxkp6e",
"category": "exterior",
"label": "front-low",
"overlay": "man12-AUlxkp6e.svg",
"vehicle": "man12",
"tasks": ["damage_detection"]
},
"man12-cjam9ZnA": {
"id": "man12-cjam9ZnA",
"category": "exterior",
"label": "lateral-full-right",
"overlay": "man12-cjam9ZnA.svg",
"vehicle": "man12",
"tasks": ["damage_detection"]
},
"man12-E3yAloDS": {
"id": "man12-E3yAloDS",
"category": "exterior",
"label": "rear-low",
"overlay": "man12-E3yAloDS.svg",
"vehicle": "man12",
"tasks": ["damage_detection"]
},
"man12-iNR6WXR_": {
"id": "man12-iNR6WXR_",
"category": "exterior",
"label": "lateral-full-left",
"overlay": "man12-iNR6WXR_.svg",
"vehicle": "man12",
"tasks": ["damage_detection"]
},
"man12-u8GNhGqe": {
"id": "man12-u8GNhGqe",
"category": "exterior",
"label": "front-fender-left",
"overlay": "man12-u8GNhGqe.svg",
"vehicle": "man12",
"tasks": ["damage_detection"]
},
"man12-YIhu2ntW": {
"id": "man12-YIhu2ntW",
"category": "exterior",
"label": "front-fender-right",
"overlay": "man12-YIhu2ntW.svg",
"vehicle": "man12",
"tasks": ["damage_detection"]
}
}
37 changes: 37 additions & 0 deletions packages/sights/research/data/man12/man12.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "man12.schema",
"definitions": {
"Sight": {
"$ref": "sight.schema"
}
},
"type": "object",
"propertyNames": {
"type": "string",
"pattern": "man12-[a-zA-Z\\d_-]+"
},
"patternProperties": {
"": {
"allOf": [
{
"$ref": "#/definitions/Sight"
}
],
"type": "object",
"properties": {
"id": {
"type": "string",
"pattern": "^man12-[a-zA-Z\\d_-]+$"
},
"mirror_sight": {
"type": "string",
"pattern": "^man12-[a-zA-Z\\d_-]+$"
}
},
"required": ["id"],
"unevaluatedProperties": false
}
},
"unevaluatedProperties": false
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading