Added invoice search + reformatted invoices page BOD-123
This commit is contained in:
@@ -11,13 +11,27 @@ export const INSERT_NEW_INVOICE = gql`
|
||||
`;
|
||||
|
||||
export const QUERY_ALL_INVOICES_PAGINATED = gql`
|
||||
query QUERY_ALL_INVOICES_PAGINATED($offset: Int, $limit: Int) {
|
||||
invoices(offset: $offset, limit: $limit, order_by: { date: desc }) {
|
||||
query QUERY_ALL_INVOICES_PAGINATED(
|
||||
$search: String
|
||||
$offset: Int
|
||||
$limit: Int
|
||||
$order: [invoices_order_by!]!
|
||||
) {
|
||||
search_invoices(
|
||||
args: { search: $search }
|
||||
offset: $offset
|
||||
limit: $limit
|
||||
order_by: $order
|
||||
) {
|
||||
id
|
||||
vendor {
|
||||
id
|
||||
name
|
||||
}
|
||||
federal_tax_rate
|
||||
local_tax_rate
|
||||
state_tax_rate
|
||||
is_credit_memo
|
||||
total
|
||||
invoice_number
|
||||
date
|
||||
@@ -34,6 +48,11 @@ export const QUERY_ALL_INVOICES_PAGINATED = gql`
|
||||
line_desc
|
||||
}
|
||||
}
|
||||
search_invoices_aggregate(args: { search: $search }) {
|
||||
aggregate {
|
||||
count(distinct: true)
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user