diff --git a/client/src/components/jobs-create-jobs-info/jobs-create-jobs-info.component.jsx b/client/src/components/jobs-create-jobs-info/jobs-create-jobs-info.component.jsx index 2bf230b27..07ada4233 100644 --- a/client/src/components/jobs-create-jobs-info/jobs-create-jobs-info.component.jsx +++ b/client/src/components/jobs-create-jobs-info/jobs-create-jobs-info.component.jsx @@ -1,4 +1,12 @@ -import { Collapse, Form, Input, InputNumber, Select, Switch } from "antd"; +import { + Collapse, + Form, + Input, + InputNumber, + Select, + Space, + Switch, +} from "antd"; import React from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; @@ -10,6 +18,8 @@ import FormItemEmail from "../form-items-formatted/email-form-item.component"; import FormItemPhone, { PhoneItemFormatterValidation, } from "../form-items-formatted/phone-form-item.component"; +import JobsDetailChangeEstimator from "../jobs-detail-change-estimator/jobs-detail-change-estimator.component"; +import JobsDetailChangeFilehandler from "../jobs-detail-change-filehandler/jobs-detail-change-filehandler.component"; import JobsDetailRatesChangeButton from "../jobs-detail-rates-change-button/jobs-detail-rates-change-button.component"; import JobsDetailRatesParts from "../jobs-detail-rates/jobs-detail-rates.parts.component"; import JobsMarkPstExempt from "../jobs-mark-pst-exempt/jobs-mark-pst-exempt.component"; @@ -25,6 +35,15 @@ const mapDispatchToProps = (dispatch) => ({ export function JobsCreateJobsInfo({ bodyshop, form, selected }) { const { t } = useTranslation(); const { getFieldValue } = form; + + const handleInsCoChange = (value) => { + const selectedCompany = bodyshop.md_ins_cos.find((s) => s.name === value); + if (selectedCompany) { + form.setFieldValue("ins_addr1", selectedCompany.street1); + form.setFieldValue("ins_city", selectedCompany.city); + } + }; + return (
@@ -34,26 +53,20 @@ export function JobsCreateJobsInfo({ bodyshop, form, selected }) { forceRender > - + - - - - - - - {bodyshop.md_ins_cos.map((s) => ( {s.name} @@ -67,7 +80,15 @@ export function JobsCreateJobsInfo({ bodyshop, form, selected }) { - + + {t("jobs.fields.ins_ct_ln")} + + + } + name="ins_ct_ln" + > @@ -95,11 +116,24 @@ export function JobsCreateJobsInfo({ bodyshop, form, selected }) { > - + + + + + + - + + {t("jobs.fields.est_ct_fn")} + + + } + name="est_ct_fn" + > diff --git a/client/src/components/jobs-detail-general/jobs-detail-general.component.jsx b/client/src/components/jobs-detail-general/jobs-detail-general.component.jsx index e2cecb4f5..4af64e694 100644 --- a/client/src/components/jobs-detail-general/jobs-detail-general.component.jsx +++ b/client/src/components/jobs-detail-general/jobs-detail-general.component.jsx @@ -37,6 +37,15 @@ const lossColDamage = { sm: { span: 24 }, md: { span: 6 }, lg: { span: 4 } }; export function JobsDetailGeneral({ bodyshop, jobRO, job, form }) { const { getFieldValue } = form; const { t } = useTranslation(); + + const handleInsCoChange = (value) => { + const selectedCompany = bodyshop.md_ins_cos.find((s) => s.name === value); + if (selectedCompany) { + form.setFieldValue("ins_addr1", selectedCompany.street1); + form.setFieldValue("ins_city", selectedCompany.city); + } + }; + return (
@@ -71,7 +80,7 @@ export function JobsDetailGeneral({ bodyshop, jobRO, job, form }) { - {bodyshop.md_ins_cos.map((s) => ( {s.name} diff --git a/client/src/translations/en_us/common.json b/client/src/translations/en_us/common.json index de1c35af8..210f04c0f 100644 --- a/client/src/translations/en_us/common.json +++ b/client/src/translations/en_us/common.json @@ -1573,7 +1573,7 @@ "federal_tax_payable": "Federal Tax Payable", "federal_tax_rate": "Federal Tax Rate", "ins_addr1": "Insurance Co. Address", - "ins_city": "Insurance City", + "ins_city": "Insurance Co. City", "ins_co_id": "Insurance Co. ID", "ins_co_nm": "Insurance Company Name", "ins_co_nm_short": "Ins. Co.",