diff --git a/src/components/flightPlans/FlightPlanForm.vue b/src/components/flightPlans/FlightPlanForm.vue
index 3085067..d85ba8e 100644
--- a/src/components/flightPlans/FlightPlanForm.vue
+++ b/src/components/flightPlans/FlightPlanForm.vue
@@ -33,7 +33,7 @@ const formData = reactive({
id: props.flightPlan.aircraft.id, name: props.flightPlan.aircraft.callSign
} : null,
plannedSpeed: props.flightPlan.plannedSpeed || 150,
- description: props.flightPlan.description || null,
+ description: props.flightPlan.description || '',
});
const {user} = storeToRefs(useLoggedUserStore());
@@ -41,19 +41,23 @@ const {user} = storeToRefs(useLoggedUserStore());
-
-
+
+
-
-
-
-
+
diff --git a/src/components/flightPlans/FlightPlanSideControls.vue b/src/components/flightPlans/FlightPlanSideControls.vue
index ffe0f16..1e1a538 100644
--- a/src/components/flightPlans/FlightPlanSideControls.vue
+++ b/src/components/flightPlans/FlightPlanSideControls.vue
@@ -18,7 +18,7 @@ const props = defineProps({
}
});
-const emits = defineEmits(["open", "change-insert-position", "fullscren-toggle"])
+const emits = defineEmits(["open", "change-insert-position", "fullscreen-toggle"])
const {getDuration, getTotalDistance, getTotalDuration} = useFlightPlanCalculations();
const totalDistance = computed(() => getTotalDistance(props.flightPlan));
@@ -54,23 +54,23 @@ const totalDistance = computed(() => getTotalDistance(props.flightPlan));
{{ segment.from.name }}
-
+
+
{{ segment.bearing }}°,
{{ segment.distance }} km,
{{ minutesToHumanReadable(getDuration(segment.distance, props.flightPlan.plannedSpeed)) }}
-
-
+
- Přidávám sem
-
+ />
+
+
+
diff --git a/src/components/map/AirspaceInfoWindow.vue b/src/components/map/AirspaceInfoWindow.vue
index d4a166a..8f3205e 100644
--- a/src/components/map/AirspaceInfoWindow.vue
+++ b/src/components/map/AirspaceInfoWindow.vue
@@ -34,7 +34,7 @@ const {getIcon} = useFlightPlanUtils();
const {searchPlaceName} = useGeocode()
const title = ref(null);
-
+const isOpened = ref(props.infoWindow.active);
watch(() => props.infoWindow.position, async () => {
if (props.infoWindow.title) {
title.value = props.infoWindow.title
@@ -57,7 +57,13 @@ const addPoint = () => {
gpsLongitude: props.infoWindow.position.lng
}
emits("add-to-route", point)
- emits("close");
+ closeInfoWindow();
+}
+
+const closeInfoWindow = () => {
+ emits('close');
+ isOpened.value = false;
+ console.log("is opened? ", isOpened.value);
}
const removePoint = () => {
@@ -95,7 +101,8 @@ const openedTab = ref("info");
@@ -201,17 +208,20 @@ const openedTab = ref("info");
-
+
+
+
-
-
-
+
diff --git a/src/components/map/MapWrapper.vue b/src/components/map/MapWrapper.vue
index 8b32a97..907bab1 100644
--- a/src/components/map/MapWrapper.vue
+++ b/src/components/map/MapWrapper.vue
@@ -169,7 +169,7 @@ const getAirspacesAtCoordinates = (clickCoordinates) => {
}
const {infoWindowObject} = useFlightPlanObjects();
-const infoWindow = ref(infoWindowObject({}));
+const infoWindow = ref({...infoWindowObject({})});
const openInfoWindow = (data) => {
infoWindow.value = infoWindowObject({active: true, ...data});
@@ -250,7 +250,7 @@ const isControlsOpened = ref(false);
:max-zoom="13"
ref="mapRef"
>
- TODO: pridavani a odebirani z trasy resit pres slot
+