Upravit text
diff --git a/src/pages/profile/flight/PhotoEditorPage.vue b/src/pages/profile/flight/PhotoEditorPage.vue
index d877f40..f65df63 100644
--- a/src/pages/profile/flight/PhotoEditorPage.vue
+++ b/src/pages/profile/flight/PhotoEditorPage.vue
@@ -41,7 +41,12 @@ watch(() => [adjustment.value, croppedAreaForPreview.value], debounce(() => {
}, 200), {deep: true, immediate: true});
const savePhotoAdjustment = (photoId) => {
- const adjustmentInput = {...adjustment.value, crop: croppedArea.value};
+ const adjustmentInput = {...adjustment.value};
+
+ if (croppedArea.value.left !== null) {
+ adjustmentInput.crop = {...croppedArea.value}
+ }
+
usePhotosStore().adjust(photoId, adjustmentInput).then((data) => {
noCacheTimestamp.value = (new Date()).getTime();
photo.value = data;
diff --git a/src/pages/public/pilotProfile/CopilotDetailPage.vue b/src/pages/public/pilotProfile/CopilotDetailPage.vue
new file mode 100644
index 0000000..6b4876b
--- /dev/null
+++ b/src/pages/public/pilotProfile/CopilotDetailPage.vue
@@ -0,0 +1,53 @@
+
+
+
+
+
+
+ Společné lety
+
+
+
diff --git a/src/pages/public/pilotProfile/FlightDetailPage.vue b/src/pages/public/pilotProfile/FlightDetailPage.vue
index 85162ea..f09d528 100644
--- a/src/pages/public/pilotProfile/FlightDetailPage.vue
+++ b/src/pages/public/pilotProfile/FlightDetailPage.vue
@@ -43,7 +43,10 @@ watch(flight, (newVal) => {
-
+
diff --git a/src/pages/public/pilotProfile/FlightsListPage.vue b/src/pages/public/pilotProfile/FlightsListPage.vue
index c444723..4593670 100644
--- a/src/pages/public/pilotProfile/FlightsListPage.vue
+++ b/src/pages/public/pilotProfile/FlightsListPage.vue
@@ -19,7 +19,6 @@ const props = defineProps({
}
});
-// TODO: onmounted presunout do child komponent, stejne jako fetch dat
onMounted(() => {
fetchUser(props.username).then(user => {
useAppStore().setPageTitle(user.publicUsername);
diff --git a/src/router/routes.js b/src/router/routes.js
index 4c90f6b..63ac779 100644
--- a/src/router/routes.js
+++ b/src/router/routes.js
@@ -18,6 +18,7 @@ const routes = [
children: [
{path: '', name: "publicProfileDetail", component: () => import('pages/public/pilotProfile/FlightsListPage.vue')},
{path: ':id', name: "publicFlightDetail", component: () => import('pages/public/pilotProfile/FlightDetailPage.vue')},
+ {path: 'kopilot/:id', name: "publicCopilotDetail", component: () => import('pages/public/pilotProfile/CopilotDetailPage.vue')},
{path: 'udalosti', name: "publicEventsList", component: () => import('pages/public/pilotProfile/EventsListPage.vue')},
{path: 'udalosti/:id', name: "publicEventDetail", component: () => import('pages/public/pilotProfile/EventDetailPage.vue')},
]
diff --git a/src/stores/Copilots.js b/src/stores/Copilots.js
index d00da25..4d12e41 100644
--- a/src/stores/Copilots.js
+++ b/src/stores/Copilots.js
@@ -11,8 +11,8 @@ export const useCopilotsStore = defineStore('Copilots', {
}),
actions: {
- fetchDetail(copilotId) {
- return apolloWrapper.query(COPILOT_DETAIL, {id: copilotId}).then(({data}) => data.copilot);
+ fetchDetail(copilotId, pilotUsername) {
+ return apolloWrapper.query(COPILOT_DETAIL, {id: copilotId, pilotUsername: pilotUsername}).then(({data}) => data.copilot);
},
fetch() {
return apolloWrapper.query(COPILOTS_LIST).then(result => {