Členové
-
+
+
+
+ Přidat se
+
+
+
+ Opustit organizaci
+
+
+
+
-
+
{{ user.name || user.email }}
@@ -49,19 +60,12 @@ onMounted(() => {
Zatím nikdo...
+
-
-
- Přidat se
-
-
-
- Opustit organizaci
-
+ Letadla
- Letadla
-
-
+
+
Žádné letadlo
diff --git a/src/stores/Photo.js b/src/stores/Photo.js
index 4c43a2d..d8ddbb6 100644
--- a/src/stores/Photo.js
+++ b/src/stores/Photo.js
@@ -1,6 +1,6 @@
import {defineStore} from "pinia";
import {apolloWrapper} from "src/graphql/apollo";
-import {DELETE_PHOTO, EDIT_PHOTO, UPLOAD_PHOTO} from "src/graphql/mutations/photo";
+import {DELETE_PHOTO, EDIT_PHOTO, ROTATE_PHOTO, UPLOAD_PHOTO} from "src/graphql/mutations/photo";
export const usePhotosStore = defineStore('Photos', {
state: () => ({
@@ -35,6 +35,12 @@ export const usePhotosStore = defineStore('Photos', {
return data.editPhoto;
}).finally(() => this.isMutationRunning = false);
},
+ rotate(id, angle) {
+ this.isMutationRunning = true;
+ return apolloWrapper.mutate(ROTATE_PHOTO, {id, angle}).then(({data}) => {
+ return data.rotatePhoto;
+ }).finally(() => this.isMutationRunning = false);
+ },
delete(photoId) {
return apolloWrapper.mutate(DELETE_PHOTO, {id: photoId}).then(({data}) => {
return data.deletePhoto;