IO-3222 Vendor Name Open Search
Signed-off-by: Allan Carr <allan.carr@thinkimex.com>
This commit is contained in:
@@ -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 = 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;
|
document.bodyshopid = req.body.event.data.new.shopid;
|
||||||
break;
|
break;
|
||||||
case "bills":
|
case "bills": {
|
||||||
const bill = await client.request(
|
const bill = await client.request(
|
||||||
`query ADMIN_GET_BILL_BY_ID($billId: uuid!) {
|
`query ADMIN_GET_BILL_BY_ID($billId: uuid!) {
|
||||||
bills_by_pk(id: $billId) {
|
bills_by_pk(id: $billId) {
|
||||||
@@ -97,7 +97,8 @@ async function OpenSearchUpdateHandler(req, res) {
|
|||||||
bodyshopid: bill.bills_by_pk.job.shopid
|
bodyshopid: bill.bills_by_pk.job.shopid
|
||||||
};
|
};
|
||||||
break;
|
break;
|
||||||
case "payments":
|
}
|
||||||
|
case "payments": {
|
||||||
//Query to get the job and RO number
|
//Query to get the job and RO number
|
||||||
|
|
||||||
const payment = await client.request(
|
const payment = await client.request(
|
||||||
@@ -141,6 +142,7 @@ async function OpenSearchUpdateHandler(req, res) {
|
|||||||
bodyshopid: payment.payments_by_pk.job.shopid
|
bodyshopid: payment.payments_by_pk.job.shopid
|
||||||
};
|
};
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
const payload = {
|
const payload = {
|
||||||
id: req.body.event.data.new.id,
|
id: req.body.event.data.new.id,
|
||||||
@@ -255,6 +257,7 @@ async function OpenSearchSearchHandler(req, res) {
|
|||||||
"*ownr_co_nm^8",
|
"*ownr_co_nm^8",
|
||||||
"*ownr_ph1^8",
|
"*ownr_ph1^8",
|
||||||
"*ownr_ph2^8",
|
"*ownr_ph2^8",
|
||||||
|
"*vendor.name^8",
|
||||||
"*comment^6"
|
"*comment^6"
|
||||||
// "*"
|
// "*"
|
||||||
]
|
]
|
||||||
|
|||||||
Reference in New Issue
Block a user