diff --git a/FE/src/components/Map.vue b/FE/src/components/Map.vue index 1cc389f..53c7b6d 100644 --- a/FE/src/components/Map.vue +++ b/FE/src/components/Map.vue @@ -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); } @@ -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")); diff --git a/FE/src/components/TeleopCard.vue b/FE/src/components/TeleopCard.vue index 950a7ab..e384c91 100644 --- a/FE/src/components/TeleopCard.vue +++ b/FE/src/components/TeleopCard.vue @@ -10,7 +10,6 @@ required @change="$emit('setCar', $event)" /> -
{{ getCarBatteryIcon(car.fuel.toFixed(4)) }} diff --git a/FE/src/plugins/i18n/translations.js b/FE/src/plugins/i18n/translations.js index 2025437..d7edf62 100644 --- a/FE/src/plugins/i18n/translations.js +++ b/FE/src/plugins/i18n/translations.js @@ -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",