functional ad insert

This commit is contained in:
sbriat
2023-08-24 14:08:49 +02:00
parent 39cebda0b9
commit 9799f78bd2
24 changed files with 1390 additions and 2108 deletions

View File

@@ -26,13 +26,17 @@ export class RouteMapper
// eslint-disable-next-line @typescript-eslint/no-unused-vars
toResponse = (entity: RouteEntity): RouteResponseDto => {
const response = new RouteResponseDto();
response.driverDistance = entity.getProps().driverDistance;
response.driverDuration = entity.getProps().driverDuration;
response.passengerDistance = entity.getProps().passengerDistance;
response.passengerDuration = entity.getProps().passengerDuration;
response.fwdAzimuth = entity.getProps().fwdAzimuth;
response.backAzimuth = entity.getProps().backAzimuth;
response.distanceAzimuth = entity.getProps().distanceAzimuth;
response.driverDistance = Math.round(entity.getProps().driverDistance);
response.driverDuration = Math.round(entity.getProps().driverDuration);
response.passengerDistance = Math.round(
entity.getProps().passengerDistance,
);
response.passengerDuration = Math.round(
entity.getProps().passengerDuration,
);
response.fwdAzimuth = Math.round(entity.getProps().fwdAzimuth);
response.backAzimuth = Math.round(entity.getProps().backAzimuth);
response.distanceAzimuth = Math.round(entity.getProps().distanceAzimuth);
response.points = entity.getProps().points;
return response;
};