In CreationConfirm.vue number of all open creations and transferred to the store

This commit is contained in:
ogerly 2021-11-26 17:43:24 +01:00
parent a618ac678e
commit 2f6a1a0630
2 changed files with 13 additions and 6 deletions

View File

@ -75,6 +75,8 @@ export default {
})
.then((result) => {
this.confirmResult = result.data.getPendingCreations
this.$store.commit('resetOpenCreations')
this.$store.commit('openCreationsPlus', Object.keys(this.confirmResult).length)
})
.catch((error) => {
this.$toasted.error(error.message)
@ -83,7 +85,6 @@ export default {
},
async created() {
await this.getPendingCreations()
this.$store.commit('openCreationsPlus', Object.keys(this.confirmResult).length)
},
}
</script>

View File

@ -76,21 +76,27 @@
</div>
</template>
<script>
import { countPendingCreations } from '../graphql/getCountPendingCreations'
// import { getPendingCreations } from '../graphql/getPendingCreations'
export default {
name: 'overview',
methods: {
getCountPendingCreation() {
/*
async getPendingCreations() {
this.$apollo
.query({
query: countPendingCreations,
query: getPendingCreations,
})
.then((result) => {
this.$store.commit('setOpenCreations', result.data.countPendingCreations)
this.confirmResult = result.data.getPendingCreations
this.$store.commit('resetOpenCreations')
this.$store.commit('openCreationsPlus', Object.keys(this.confirmResult).length)
})
.catch((error) => {
this.$toasted.error(error.message)
})
.catch()
},
*/
},
created() {
this.getCountPendingCreation()