Merged in feature/IO-3222-Vendor-Name-OpenSearch (pull request #2365)

IO-3222 Vendor Name Open Search
This commit is contained in:
Dave Richer
2025-06-03 18:11:06 +00:00

View File

@@ -64,7 +64,7 @@ async function OpenSearchUpdateHandler(req, res) {
document = pick(req.body.event.data.new, ["id", "ownr_fn", "ownr_ln", "ownr_co_nm", "ownr_ph1", "ownr_ph2"]);
document.bodyshopid = req.body.event.data.new.shopid;
break;
case "bills":
case "bills": {
const bill = await client.request(
`query ADMIN_GET_BILL_BY_ID($billId: uuid!) {
bills_by_pk(id: $billId) {
@@ -97,7 +97,8 @@ async function OpenSearchUpdateHandler(req, res) {
bodyshopid: bill.bills_by_pk.job.shopid
};
break;
case "payments":
}
case "payments": {
//Query to get the job and RO number
const payment = await client.request(
@@ -141,6 +142,7 @@ async function OpenSearchUpdateHandler(req, res) {
bodyshopid: payment.payments_by_pk.job.shopid
};
break;
}
}
const payload = {
id: req.body.event.data.new.id,
@@ -255,6 +257,7 @@ async function OpenSearchSearchHandler(req, res) {
"*ownr_co_nm^8",
"*ownr_ph1^8",
"*ownr_ph2^8",
"*vendor.name^8",
"*comment^6"
// "*"
]