Drobne upravy ve vizualu, oprava comboboxu, funkcni prakticky cela editace letu

This commit is contained in:
Michal Kváček
2023-07-18 10:21:40 +02:00
parent 2d76d136cf
commit 4648c30f90
21 changed files with 233 additions and 132 deletions
+23
View File
@@ -0,0 +1,23 @@
import {defineStore} from 'pinia'
import {apolloWrapper} from "src/graphql/apollo";
import {COPILOTS_LIST} from "src/graphql/queries/copilots";
export const useCopilotsStore = defineStore('SecondPilots', {
state: () => ({
items: []
}),
getters: {},
actions: {
create(formData) {
console.log("not implemented");
},
fetch() {
return apolloWrapper.query(COPILOTS_LIST).then(result => {
this.items = result.data.copilots;
return result.data.copilots;
});
}
}
})
-26
View File
@@ -1,26 +0,0 @@
import {defineStore} from 'pinia'
export const useSecondPilotsStore = defineStore('SecondPilots', {
state: () => ({
items: []
}),
getters: {},
actions: {
create(formData) {
this.items.push(formData);
},
fetch() {
if (this.items.length > 0) return;
this.$patch({
items: [
{id: 1, name: "Karel Franta", isInstructor: false},
{id: 2, name: "Franta Pepa", isInstructor: false},
{id: 3, name: "Instruktor Letajici", isInstructor: true},
]
});
}
}
})