Compare commits

..

1 Commits

Author SHA1 Message Date
Allan Carr
3fe0e3a33c IO-3222 Vendor Name Open Search
Signed-off-by: Allan Carr <allan.carr@thinkimex.com>
2025-04-25 09:39:20 -07:00
9 changed files with 7 additions and 24 deletions

View File

@@ -1,4 +1,5 @@
import { Col, Form, Input, InputNumber, Row, Select, Space, Switch } from "antd";
import React from "react";
import { useTranslation } from "react-i18next";
import { connect } from "react-redux";
import { createStructuredSelector } from "reselect";
@@ -187,9 +188,6 @@ export function JobsDetailGeneral({ bodyshop, jobRO, job, form }) {
<Form.Item label={t("jobs.fields.tlos_ind")} name="tlos_ind" valuePropName="checked">
<Switch disabled={jobRO} />
</Form.Item>
<Form.Item label={t("jobs.fields.hit_and_run")} name="hit_and_run" valuePropName="checked">
<Switch disabled={jobRO} />
</Form.Item>
<Form.Item label={t("jobs.fields.acv_amount")} name="acv_amount">
<CurrencyInput disabled={jobRO} min={0} />
</Form.Item>

View File

@@ -10,7 +10,6 @@ import { setModalContext } from "../../redux/modals/modals.actions";
import { selectBodyshop } from "../../redux/user/user.selectors";
import CurrencyFormatter from "../../utils/CurrencyFormatter";
import { DateTimeFormatter } from "../../utils/DateFormatter";
import dayjs from "../../utils/day";
import PhoneNumberFormatter from "../../utils/PhoneFormatter";
import ChatOpenButton from "../chat-open-button/chat-open-button.component";
import DataLabel from "../data-label/data-label.component";
@@ -22,6 +21,7 @@ import ProductionListColumnComment from "../production-list-columns/production-l
import ProductionListColumnProductionNote from "../production-list-columns/production-list-columns.productionnote.component";
import VehicleVinDisplay from "../vehicle-vin-display/vehicle-vin-display.component";
import "./jobs-detail-header.styles.scss";
import dayjs from "../../utils/day";
const mapStateToProps = createStructuredSelector({
jobRO: selectJobReadOnly,
@@ -149,14 +149,6 @@ export function JobsDetailHeader({ job, bodyshop, disabled }) {
</Space>
</Tag>
)}
{job.hit_and_run && (
<Tag color="green">
<Space>
<WarningFilled />
<span>{t("jobs.fields.hit_and_run")}</span>
</Space>
</Tag>
)}
</Space>
</div>
</Card>

View File

@@ -512,7 +512,6 @@ export const GET_JOB_BY_PK = gql`
est_ph1
flat_rate_ats
federal_tax_rate
hit_and_run
id
inproduction
ins_addr1

View File

@@ -1765,7 +1765,6 @@
"flat_rate_ats": "Flat Rate ATS?",
"federal_tax_payable": "Federal Tax Payable",
"federal_tax_rate": "Federal Tax Rate",
"hit_and_run": "Hit and Run",
"ins_addr1": "Insurance Co. Address",
"ins_city": "Insurance Co. City",
"ins_co_id": "Insurance Co. ID",

View File

@@ -1765,7 +1765,6 @@
"flat_rate_ats": "",
"federal_tax_payable": "Impuesto federal por pagar",
"federal_tax_rate": "",
"hit_and_run": "",
"ins_addr1": "Dirección de Insurance Co.",
"ins_city": "Ciudad de seguros",
"ins_co_id": "ID de la compañía de seguros",

View File

@@ -1766,7 +1766,6 @@
"flat_rate_ats": "",
"federal_tax_payable": "Impôt fédéral à payer",
"federal_tax_rate": "",
"hit_and_run": "",
"ins_addr1": "Adresse Insurance Co.",
"ins_city": "Insurance City",
"ins_co_id": "ID de la compagnie d'assurance",

View File

@@ -1,4 +0,0 @@
-- Could not auto-generate a down migration.
-- Please write an appropriate down migration for the SQL below:
-- alter table "public"."jobs" add column "hit_and_run" boolean
-- null default 'false';

View File

@@ -1,2 +0,0 @@
alter table "public"."jobs" add column "hit_and_run" boolean
null default 'false';

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"
// "*"
]