Added invoices to global search BOD-238
This commit is contained in:
@@ -131,6 +131,23 @@ export default function GlobalSearch() {
|
||||
};
|
||||
}),
|
||||
},
|
||||
{
|
||||
label: renderTitle(t("menus.header.search.invoices")),
|
||||
options: data.search_invoices.map((invoice) => {
|
||||
return {
|
||||
value: `${invoice.invoice_number}`,
|
||||
label: (
|
||||
<Link to={`/manage/invoices?invoiceid=${invoice.id}`}>
|
||||
<div className="imex-flex-row">
|
||||
<span className="imex-flex-row__margin-large">{`${invoice.invoice_number}`}</span>
|
||||
<span className="imex-flex-row__margin-large">{`${invoice.vendor.name}`}</span>
|
||||
<span className="imex-flex-row__margin-large">{`${invoice.date}`}</span>
|
||||
</div>
|
||||
</Link>
|
||||
),
|
||||
};
|
||||
}),
|
||||
},
|
||||
]
|
||||
: [];
|
||||
|
||||
|
||||
@@ -40,5 +40,14 @@ export const GLOBAL_SEARCH_QUERY = gql`
|
||||
memo
|
||||
transactionid
|
||||
}
|
||||
search_invoices(args: { search: $search }) {
|
||||
id
|
||||
date
|
||||
invoice_number
|
||||
vendor {
|
||||
id
|
||||
name
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
Reference in New Issue
Block a user