Add --state and --contract-ended flags to CLI user list
Replace the --active boolean flag with two explicit filters: --state (ACTIVE/INACTIVE) and --contract-ended (true/false). Also add state filter support to the console GraphQL API. Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
@@ -53,6 +53,7 @@ input ProfileOrder
|
||||
|
||||
input ProfileFilter {
|
||||
contractEnded: Boolean
|
||||
state: ProfileState
|
||||
}
|
||||
|
||||
type ProfileConnection
|
||||
|
||||
@@ -124,6 +124,9 @@ func (r *organizationResolver) Profiles(ctx context.Context, obj *types.Organiza
|
||||
filters := coredata.NewMembershipProfileFilter(nil).WithMembership()
|
||||
if filter != nil {
|
||||
filters = coredata.NewMembershipProfileFilter(filter.ContractEnded).WithMembership()
|
||||
if filter.State != nil {
|
||||
filters.WithState(*filter.State)
|
||||
}
|
||||
}
|
||||
|
||||
pageOrderBy := page.OrderBy[coredata.MembershipProfileOrderField]{
|
||||
|
||||
Reference in New Issue
Block a user