mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
Apollo first steps getPendingCreations.
This commit is contained in:
parent
296d916f1a
commit
99749eebb2
@ -153,6 +153,7 @@ export default {
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.getPendingCreations()
|
||||
this.$store.commit('resetOpenCreations')
|
||||
this.$store.commit('openCreationsPlus', Object.keys(this.confirmResult).length)
|
||||
},
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { Resolver, Query, Arg, Args, Authorized } from 'type-graphql'
|
||||
import { getCustomRepository, Raw } from 'typeorm'
|
||||
import { getCustomRepository, Raw, Any } from 'typeorm'
|
||||
import { UserAdmin } from '../model/UserAdmin'
|
||||
import { LoginUserRepository } from '../../typeorm/repository/LoginUser'
|
||||
import { RIGHTS } from '../../auth/RIGHTS'
|
||||
@ -7,6 +7,7 @@ import { TransactionCreationRepository } from '../../typeorm/repository/Transact
|
||||
import { PendingCreationRepository } from '../../typeorm/repository/PendingCreation'
|
||||
import { UserRepository } from '../../typeorm/repository/User'
|
||||
import CreatePendingCreationArgs from '../arg/CreatePendingCreationArgs'
|
||||
import { LoginPendingTasksAdmin } from '@entity/LoginPendingTasksAdmin'
|
||||
import moment from 'moment'
|
||||
|
||||
@Resolver()
|
||||
@ -52,6 +53,14 @@ export class AdminResolver {
|
||||
}
|
||||
return await getUserCreations(user.id)
|
||||
}
|
||||
|
||||
@Query(() => String)
|
||||
async getPendingCreations(): Promise<string> {
|
||||
const pendingCreationRepository = getCustomRepository(PendingCreationRepository)
|
||||
const pendingCreations = await pendingCreationRepository.find()
|
||||
console.log('pendingCreations', pendingCreations)
|
||||
return pendingCreations.toString()
|
||||
}
|
||||
}
|
||||
|
||||
async function getUserCreations(id: number): Promise<number[]> {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user