mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
Rename after suggestion emailChecked withActivated and deletedAt to withDeleted
This commit is contained in:
parent
9761b4afa6
commit
621786c91d
@ -5,15 +5,15 @@ export const searchUsers = gql`
|
||||
$searchText: String!
|
||||
$currentPage: Int
|
||||
$pageSize: Int
|
||||
$emailChecked: Boolean
|
||||
$deletedAt: Boolean
|
||||
$withActivated: Boolean
|
||||
$withDeleted: Boolean
|
||||
) {
|
||||
searchUsers(
|
||||
searchText: $searchText
|
||||
currentPage: $currentPage
|
||||
pageSize: $pageSize
|
||||
emailChecked: $emailChecked
|
||||
deletedAt: $deletedAt
|
||||
withActivated: $withActivated
|
||||
withDeleted: $withDeleted
|
||||
) {
|
||||
userCount
|
||||
userList {
|
||||
@ -22,10 +22,10 @@ export const searchUsers = gql`
|
||||
lastName
|
||||
email
|
||||
creation
|
||||
emailChecked
|
||||
hasElopage
|
||||
emailConfirmationSend
|
||||
deletedAt
|
||||
withActivated
|
||||
withDeleted
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -71,8 +71,8 @@ describe('Creation', () => {
|
||||
searchText: '',
|
||||
currentPage: 1,
|
||||
pageSize: 25,
|
||||
emailChecked: true,
|
||||
deletedAt: false,
|
||||
withActivated: true,
|
||||
withDeleted: false,
|
||||
},
|
||||
}),
|
||||
)
|
||||
@ -271,8 +271,8 @@ describe('Creation', () => {
|
||||
searchText: 'XX',
|
||||
currentPage: 1,
|
||||
pageSize: 25,
|
||||
emailChecked: true,
|
||||
deletedAt: false,
|
||||
withActivated: true,
|
||||
withDeleted: false,
|
||||
},
|
||||
}),
|
||||
)
|
||||
@ -288,8 +288,8 @@ describe('Creation', () => {
|
||||
searchText: '',
|
||||
currentPage: 1,
|
||||
pageSize: 25,
|
||||
emailChecked: true,
|
||||
deletedAt: false,
|
||||
withActivated: true,
|
||||
withDeleted: false,
|
||||
},
|
||||
}),
|
||||
)
|
||||
@ -305,8 +305,8 @@ describe('Creation', () => {
|
||||
searchText: '',
|
||||
currentPage: 2,
|
||||
pageSize: 25,
|
||||
emailChecked: true,
|
||||
deletedAt: false,
|
||||
withActivated: true,
|
||||
withDeleted: false,
|
||||
},
|
||||
}),
|
||||
)
|
||||
|
||||
@ -102,8 +102,8 @@ export default {
|
||||
searchText: this.criteria,
|
||||
currentPage: this.currentPage,
|
||||
pageSize: this.perPage,
|
||||
emailChecked: true,
|
||||
deletedAt: false,
|
||||
withActivated: true,
|
||||
withDeleted: false,
|
||||
},
|
||||
fetchPolicy: 'network-only',
|
||||
})
|
||||
|
||||
@ -82,8 +82,8 @@ describe('UserSearch', () => {
|
||||
searchText: '',
|
||||
currentPage: 1,
|
||||
pageSize: 25,
|
||||
emailChecked: null,
|
||||
deletedAt: null,
|
||||
withActivated: null,
|
||||
withDeleted: null,
|
||||
},
|
||||
}),
|
||||
)
|
||||
@ -101,8 +101,8 @@ describe('UserSearch', () => {
|
||||
searchText: '',
|
||||
currentPage: 1,
|
||||
pageSize: 25,
|
||||
emailChecked: true,
|
||||
deletedAt: null,
|
||||
withActivated: true,
|
||||
withDeleted: null,
|
||||
},
|
||||
}),
|
||||
)
|
||||
@ -121,8 +121,8 @@ describe('UserSearch', () => {
|
||||
searchText: '',
|
||||
currentPage: 1,
|
||||
pageSize: 25,
|
||||
emailChecked: null,
|
||||
deletedAt: true,
|
||||
withActivated: null,
|
||||
withDeleted: true,
|
||||
},
|
||||
}),
|
||||
)
|
||||
@ -141,8 +141,8 @@ describe('UserSearch', () => {
|
||||
searchText: '',
|
||||
currentPage: 2,
|
||||
pageSize: 25,
|
||||
emailChecked: null,
|
||||
deletedAt: null,
|
||||
withActivated: null,
|
||||
withDeleted: null,
|
||||
},
|
||||
}),
|
||||
)
|
||||
@ -161,8 +161,8 @@ describe('UserSearch', () => {
|
||||
searchText: 'search string',
|
||||
currentPage: 1,
|
||||
pageSize: 25,
|
||||
emailChecked: null,
|
||||
deletedAt: null,
|
||||
withActivated: null,
|
||||
withDeleted: null,
|
||||
},
|
||||
}),
|
||||
)
|
||||
@ -178,8 +178,8 @@ describe('UserSearch', () => {
|
||||
searchText: '',
|
||||
currentPage: 1,
|
||||
pageSize: 25,
|
||||
emailChecked: null,
|
||||
deletedAt: null,
|
||||
withActivated: null,
|
||||
withDeleted: null,
|
||||
},
|
||||
}),
|
||||
)
|
||||
|
||||
@ -85,8 +85,8 @@ export default {
|
||||
searchText: this.criteria,
|
||||
currentPage: this.currentPage,
|
||||
pageSize: this.perPage,
|
||||
emailChecked: this.filterCheckedEmails,
|
||||
deletedAt: this.filterDeletedUser,
|
||||
withActivated: this.filterCheckedEmails,
|
||||
withDeleted: this.filterDeletedUser,
|
||||
},
|
||||
fetchPolicy: 'no-cache',
|
||||
})
|
||||
|
||||
@ -12,8 +12,8 @@ export default class SearchUsersArgs {
|
||||
pageSize?: number
|
||||
|
||||
@Field(() => Boolean, { nullable: true })
|
||||
emailChecked?: boolean | null
|
||||
withActivated?: boolean | null
|
||||
|
||||
@Field(() => Boolean, { nullable: true })
|
||||
deletedAt?: boolean | null
|
||||
withDeleted?: boolean | null
|
||||
}
|
||||
|
||||
@ -56,19 +56,19 @@ export class AdminResolver {
|
||||
searchText,
|
||||
currentPage = 1,
|
||||
pageSize = 25,
|
||||
emailChecked = null,
|
||||
deletedAt = null,
|
||||
withActivated = null,
|
||||
withDeleted = null,
|
||||
}: SearchUsersArgs,
|
||||
): Promise<SearchUsersResult> {
|
||||
const userRepository = getCustomRepository(UserRepository)
|
||||
|
||||
const filterCriteria: ObjectLiteral[] = []
|
||||
if (emailChecked !== null) {
|
||||
filterCriteria.push({ emailChecked: emailChecked })
|
||||
if (withActivated !== null) {
|
||||
filterCriteria.push({ withActivated: withActivated })
|
||||
}
|
||||
|
||||
if (deletedAt !== null) {
|
||||
filterCriteria.push({ deletedAt: deletedAt ? Not(IsNull()) : IsNull() })
|
||||
if (withDeleted !== null) {
|
||||
filterCriteria.push({ withDeleted: withDeleted ? Not(IsNull()) : IsNull() })
|
||||
}
|
||||
|
||||
const userFields = ['id', 'firstName', 'lastName', 'email', 'emailChecked', 'deletedAt']
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user