mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
Merge branch 'adminDeletePendingCreationQuery' into adminConfirmPendingCreation
This commit is contained in:
commit
2c2e56024d
@ -60,8 +60,11 @@ describe('CreationConfirm', () => {
|
||||
})
|
||||
|
||||
describe('store', () => {
|
||||
it('commits openCreationsPlus to store', () => {
|
||||
expect(storeCommitMock).toBeCalledWith('openCreationsPlus', 2)
|
||||
it('commits resetOpenCreations to store', () => {
|
||||
expect(storeCommitMock).toBeCalledWith('resetOpenCreations')
|
||||
})
|
||||
it('commits setOpenCreations to store', () => {
|
||||
expect(storeCommitMock).toBeCalledWith('setOpenCreations', 2)
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
@ -64,15 +64,15 @@ export default {
|
||||
this.$store.commit('openCreationsMinus', 1)
|
||||
}
|
||||
},
|
||||
async getPendingCreations() {
|
||||
getPendingCreations() {
|
||||
this.$apollo
|
||||
.query({
|
||||
query: getPendingCreations,
|
||||
})
|
||||
.then((result) => {
|
||||
this.confirmResult = result.data.getPendingCreations
|
||||
this.$store.commit('resetOpenCreations')
|
||||
this.$store.commit('openCreationsPlus', result.data.getPendingCreations.length)
|
||||
this.confirmResult = result.data.getPendingCreations.reverse()
|
||||
this.$store.commit('setOpenCreations', result.data.getPendingCreations.length)
|
||||
})
|
||||
.catch((error) => {
|
||||
this.$toasted.error(error.message)
|
||||
|
||||
@ -64,11 +64,7 @@ export default {
|
||||
query: getPendingCreations,
|
||||
})
|
||||
.then((result) => {
|
||||
this.$store.commit('resetOpenCreations')
|
||||
this.$store.commit('openCreationsPlus', result.data.getPendingCreations.length)
|
||||
})
|
||||
.catch((error) => {
|
||||
this.$toasted.error(error.message)
|
||||
this.$store.commit('setOpenCreations', result.data.getPendingCreations.length)
|
||||
})
|
||||
},
|
||||
},
|
||||
|
||||
@ -135,7 +135,7 @@ export class AdminResolver {
|
||||
return pendingCreationsPromise
|
||||
}
|
||||
|
||||
@Query(() => Boolean)
|
||||
@Mutation(() => Boolean)
|
||||
async deletePendingCreation(@Arg('id') id: number): Promise<boolean> {
|
||||
const pendingCreationRepository = getCustomRepository(PendingCreationRepository)
|
||||
const entity = await pendingCreationRepository.findOne(id)
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
|
||||
/*
|
||||
Elopage Webhook
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user