Skip to content

Commit

Permalink
Minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
JakubNajvarek committed Dec 6, 2023
1 parent 094072a commit c1d4e9d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
10 changes: 8 additions & 2 deletions FE/src/components/Map.vue
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,10 @@ export default {
try {
this.stations = await stationApi.getStations();
this.routes = await routeApi.getRoutes(true);
this.center = latLng(this.stations[0].latitude, this.stations[0].longitude);
this.center = latLng(
this.selectedCar.latitude || this.stations[0].latitude || 0,
this.selectedCar.longitude || this.stations[0].longitude || 0
);
} catch (error) {
console.error("Error fetching data:", error);
}
Expand All @@ -170,7 +173,10 @@ export default {
this.zoom = zoom;
},
recenterMap() {
this.center = latLng(this.stations[0].latitude, this.stations[0].longitude);
this.center = latLng(
this.selectedCar.latitude || this.stations[0].latitude || 0,
this.selectedCar.longitude || this.stations[0].longitude || 0
);
},
setLocalSettings(settings) {
const oldSettings = JSON.parse(localStorage.getItem("mapSettings"));
Expand Down
1 change: 0 additions & 1 deletion FE/src/components/TeleopCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
required
@change="$emit('setCar', $event)"
/>
<!--<p class="text-center text-h6 mb-0">{{ car.name }}</p> -->
<div class="d-flex justify-center align-center text-caption mb-1">
<span v-if="car.fuel" class="mr-2">
<v-icon>{{ getCarBatteryIcon(car.fuel.toFixed(4)) }}</v-icon>
Expand Down
2 changes: 1 addition & 1 deletion FE/src/plugins/i18n/translations.js
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ const translations = {
title: "Orders",
count: "Number of orders",
new: "New order",
none: "No order",
none: "No orders",
to: "To",
in: "in",
asap: "As soon as possible",
Expand Down

0 comments on commit c1d4e9d

Please sign in to comment.