IO-2261 All Jobs, Bills, Payments

Adjust Pagination settings and on clear delete search.page to reset. Adjust payments for bodyshopid as it was pointed at bill instead of payment
This commit is contained in:
Allan Carr
2023-05-04 18:27:47 -07:00
parent 6898d609fe
commit ac72177fbb
4 changed files with 16 additions and 10 deletions

View File

@@ -126,7 +126,6 @@ async function OpenSearchUpdateHandler(req, res) {
`,
{ billId: req.body.event.data.new.id }
);
document = {
..._.pick(req.body.event.data.new, [
"id",
@@ -138,7 +137,6 @@ async function OpenSearchUpdateHandler(req, res) {
...bill.bills_by_pk,
bodyshopid: bill.bills_by_pk.job.shopid,
};
break;
case "payments":
//Query to get the job and RO number
@@ -179,11 +177,10 @@ async function OpenSearchUpdateHandler(req, res) {
"type",
]),
...payment.payments_by_pk,
bodyshopid: bill.payments_by_pk.job.shopid,
bodyshopid: payment.payments_by_pk.job.shopid,
};
break;
}
const payload = {
id: req.body.event.data.new.id,
index: req.body.table.name,