mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
change Overview.vue methods getPendingCreations and store set open pending creations
This commit is contained in:
parent
997230b334
commit
56fcd7d445
@ -74,7 +74,9 @@ export default {
|
||||
query: getPendingCreations,
|
||||
})
|
||||
.then((result) => {
|
||||
this.$store.commit('resetOpenCreations')
|
||||
this.confirmResult = result.data.getPendingCreations
|
||||
this.$store.commit('setOpenCreations', result.data.getPendingCreations.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>
|
||||
|
||||
@ -76,24 +76,25 @@
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { countPendingCreations } from '../graphql/getCountPendingCreations'
|
||||
import { getPendingCreations } from '../graphql/getPendingCreations'
|
||||
|
||||
export default {
|
||||
name: 'overview',
|
||||
methods: {
|
||||
getCountPendingCreation() {
|
||||
getPendingCreations() {
|
||||
this.$apollo
|
||||
.query({
|
||||
query: countPendingCreations,
|
||||
query: getPendingCreations,
|
||||
})
|
||||
.then((result) => {
|
||||
this.$store.commit('setOpenCreations', result.data.countPendingCreations)
|
||||
console.log(result.data)
|
||||
this.$store.commit('setOpenCreations', result.data.getPendingCreations.length)
|
||||
})
|
||||
.catch()
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.getCountPendingCreation()
|
||||
this.getPendingCreations()
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user