add deposit history page
This commit is contained in:
@@ -7,7 +7,7 @@ module Types
|
||||
graphql_name "DepositOrder"
|
||||
|
||||
field :id, ID, null: false
|
||||
field :status, String, null: false
|
||||
field :status, ProcessStatusEnum, null: false
|
||||
field :received_amount_cents, Integer, null: false
|
||||
field :paid_amount_cents, Integer, null: false
|
||||
field :created_at, GraphQL::Types::ISO8601DateTime, null: false
|
||||
|
||||
@@ -38,7 +38,10 @@ module Types
|
||||
|
||||
def deposit_orders(filter: nil)
|
||||
scope = Pundit.policy_scope(current_user, DepositOrder)
|
||||
scope.where(status: filter.status) if filter&.status
|
||||
|
||||
return scope.where(status: filter.status) if filter&.status
|
||||
|
||||
scope
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user