Added owners search + owner pagination page BOD-115

This commit is contained in:
Patrick Fic
2020-07-13 16:02:17 -07:00
parent d5026133e0
commit cff21c5bdf
9 changed files with 211 additions and 23 deletions

View File

@@ -89,6 +89,46 @@ export const QUERY_ALL_OWNERS = gql`
}
`;
export const QUERY_ALL_OWNERS_PAGINATED = gql`
query QUERY_ALL_OWNERS_PAGINATED(
$search: String
$offset: Int
$limit: Int
$order: [owners_order_by!]!
) {
search_owners(
args: { search: $search }
offset: $offset
limit: $limit
order_by: $order
) {
id
allow_text_message
created_at
ownr_addr1
ownr_addr2
ownr_co_nm
ownr_city
ownr_ctry
ownr_ea
ownr_fn
ownr_ph1
ownr_ln
ownr_ph2
ownr_st
ownr_title
ownr_zip
preferred_contact
updated_at
}
search_owners_aggregate(args: { search: $search }) {
aggregate {
count(distinct: true)
}
}
}
`;
export const QUERY_OWNER_FOR_JOB_CREATION = gql`
query QUERY_OWNER_FOR_JOB_CREATION($id: uuid!) {
owners_by_pk(id: $id) {