IO-899 Refactor ccc paginated query
This commit is contained in:
@@ -144,23 +144,16 @@ export const QUERY_CONTRACT_BY_PK = gql`
|
||||
|
||||
export const QUERY_ACTIVE_CONTRACTS_PAGINATED = gql`
|
||||
query QUERY_ACTIVE_CONTRACTS_PAGINATED(
|
||||
$search: String
|
||||
$offset: Int
|
||||
$limit: Int
|
||||
$order: [cccontracts_order_by!]!
|
||||
$start: timestamptz
|
||||
$end: timestamptz
|
||||
) {
|
||||
cccontracts(
|
||||
search_cccontracts(
|
||||
args: { search: $search }
|
||||
offset: $offset
|
||||
limit: $limit
|
||||
order_by: $order
|
||||
where: {
|
||||
_or: [
|
||||
{ actualreturn: { _lte: $end } }
|
||||
{ actualreturn: { _is_null: true } }
|
||||
]
|
||||
start: { _gte: $start }
|
||||
}
|
||||
) {
|
||||
agreementnumber
|
||||
courtesycarid
|
||||
@@ -171,7 +164,6 @@ export const QUERY_ACTIVE_CONTRACTS_PAGINATED = gql`
|
||||
jobid
|
||||
job {
|
||||
id
|
||||
|
||||
ro_number
|
||||
ownr_fn
|
||||
ownr_ln
|
||||
@@ -190,7 +182,7 @@ export const QUERY_ACTIVE_CONTRACTS_PAGINATED = gql`
|
||||
plate
|
||||
}
|
||||
}
|
||||
cccontracts_aggregate {
|
||||
search_cccontracts_aggregate(args: { search: $search }) {
|
||||
aggregate {
|
||||
count(distinct: true)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user