Merged in feature/IO-3544-Ant-Select-Deprecation (pull request #3005)

Feature/IO-3544 Ant Select Deprecation
This commit is contained in:
Dave Richer
2026-02-18 17:41:33 +00:00
58 changed files with 1895 additions and 2862 deletions

843
client/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -8,9 +8,9 @@
"private": true, "private": true,
"proxy": "http://localhost:4000", "proxy": "http://localhost:4000",
"dependencies": { "dependencies": {
"@amplitude/analytics-browser": "^2.34.0", "@amplitude/analytics-browser": "^2.35.0",
"@ant-design/pro-layout": "^7.22.6", "@ant-design/pro-layout": "^7.22.6",
"@apollo/client": "^4.1.3", "@apollo/client": "^4.1.4",
"@dnd-kit/core": "^6.3.1", "@dnd-kit/core": "^6.3.1",
"@dnd-kit/modifiers": "^9.0.0", "@dnd-kit/modifiers": "^9.0.0",
"@dnd-kit/sortable": "^10.0.0", "@dnd-kit/sortable": "^10.0.0",
@@ -18,35 +18,35 @@
"@emotion/is-prop-valid": "^1.4.0", "@emotion/is-prop-valid": "^1.4.0",
"@fingerprintjs/fingerprintjs": "^5.0.1", "@fingerprintjs/fingerprintjs": "^5.0.1",
"@firebase/analytics": "^0.10.19", "@firebase/analytics": "^0.10.19",
"@firebase/app": "^0.14.7", "@firebase/app": "^0.14.8",
"@firebase/auth": "^1.12.0", "@firebase/auth": "^1.12.0",
"@firebase/firestore": "^4.10.0", "@firebase/firestore": "^4.11.0",
"@firebase/messaging": "^0.12.22", "@firebase/messaging": "^0.12.22",
"@jsreport/browser-client": "^3.1.0", "@jsreport/browser-client": "^3.1.0",
"@reduxjs/toolkit": "^2.11.2", "@reduxjs/toolkit": "^2.11.2",
"@sentry/cli": "^3.1.0", "@sentry/cli": "^3.2.0",
"@sentry/react": "^10.38.0", "@sentry/react": "^10.39.0",
"@sentry/vite-plugin": "^4.8.0", "@sentry/vite-plugin": "^4.9.1",
"@splitsoftware/splitio-react": "^2.6.1", "@splitsoftware/splitio-react": "^2.6.1",
"@tanem/react-nprogress": "^5.0.58", "@tanem/react-nprogress": "^5.0.63",
"antd": "^6.2.2", "antd": "^6.3.0",
"apollo-link-logger": "^3.0.0", "apollo-link-logger": "^3.0.0",
"autosize": "^6.0.1", "autosize": "^6.0.1",
"axios": "^1.13.4", "axios": "^1.13.5",
"classnames": "^2.5.1", "classnames": "^2.5.1",
"css-box-model": "^1.2.1", "css-box-model": "^1.2.1",
"dayjs": "^1.11.19", "dayjs": "^1.11.19",
"dayjs-business-days2": "^1.3.2", "dayjs-business-days2": "^1.3.2",
"dinero.js": "^1.9.1", "dinero.js": "^1.9.1",
"dotenv": "^17.2.3", "dotenv": "^17.3.1",
"env-cmd": "^11.0.0", "env-cmd": "^11.0.0",
"exifr": "^7.1.3", "exifr": "^7.1.3",
"graphql": "^16.12.0", "graphql": "^16.12.0",
"graphql-ws": "^6.0.7", "graphql-ws": "^6.0.7",
"i18next": "^25.8.0", "i18next": "^25.8.11",
"i18next-browser-languagedetector": "^8.2.0", "i18next-browser-languagedetector": "^8.2.1",
"immutability-helper": "^3.1.1", "immutability-helper": "^3.1.1",
"libphonenumber-js": "^1.12.36", "libphonenumber-js": "^1.12.37",
"lightningcss": "^1.31.1", "lightningcss": "^1.31.1",
"logrocket": "^12.0.0", "logrocket": "^12.0.0",
"markerjs2": "^2.32.7", "markerjs2": "^2.32.7",
@@ -54,7 +54,7 @@
"normalize-url": "^8.1.1", "normalize-url": "^8.1.1",
"object-hash": "^3.0.0", "object-hash": "^3.0.0",
"phone": "^3.1.70", "phone": "^3.1.70",
"posthog-js": "^1.336.4", "posthog-js": "^1.351.1",
"prop-types": "^15.8.1", "prop-types": "^15.8.1",
"query-string": "^9.3.1", "query-string": "^9.3.1",
"raf-schd": "^4.0.3", "raf-schd": "^4.0.3",
@@ -87,7 +87,7 @@
"rxjs": "^7.8.2", "rxjs": "^7.8.2",
"sass": "^1.97.3", "sass": "^1.97.3",
"socket.io-client": "^4.8.3", "socket.io-client": "^4.8.3",
"styled-components": "^6.3.8", "styled-components": "^6.3.10",
"vite-plugin-ejs": "^1.7.0", "vite-plugin-ejs": "^1.7.0",
"web-vitals": "^5.1.0" "web-vitals": "^5.1.0"
}, },
@@ -144,11 +144,11 @@
"@emotion/babel-plugin": "^11.13.5", "@emotion/babel-plugin": "^11.13.5",
"@emotion/react": "^11.14.0", "@emotion/react": "^11.14.0",
"@eslint/js": "^9.39.2", "@eslint/js": "^9.39.2",
"@playwright/test": "^1.58.0", "@playwright/test": "^1.58.2",
"@testing-library/dom": "^10.4.1", "@testing-library/dom": "^10.4.1",
"@testing-library/jest-dom": "^6.9.1", "@testing-library/jest-dom": "^6.9.1",
"@testing-library/react": "^16.3.2", "@testing-library/react": "^16.3.2",
"@vitejs/plugin-react": "^5.1.2", "@vitejs/plugin-react": "^5.1.4",
"babel-plugin-react-compiler": "^1.0.0", "babel-plugin-react-compiler": "^1.0.0",
"browserslist": "^4.28.1", "browserslist": "^4.28.1",
"browserslist-to-esbuild": "^2.1.1", "browserslist-to-esbuild": "^2.1.1",
@@ -156,16 +156,16 @@
"eslint": "^9.39.2", "eslint": "^9.39.2",
"eslint-plugin-react": "^7.37.5", "eslint-plugin-react": "^7.37.5",
"eslint-plugin-react-compiler": "^19.1.0-rc.2", "eslint-plugin-react-compiler": "^19.1.0-rc.2",
"globals": "^17.2.0", "globals": "^17.3.0",
"jsdom": "^27.4.0", "jsdom": "^28.1.0",
"memfs": "^4.56.10", "memfs": "^4.56.10",
"os-browserify": "^0.3.0", "os-browserify": "^0.3.0",
"playwright": "^1.58.0", "playwright": "^1.58.2",
"react-error-overlay": "^6.1.0", "react-error-overlay": "^6.1.0",
"redux-logger": "^3.0.6", "redux-logger": "^3.0.6",
"source-map-explorer": "^2.5.3", "source-map-explorer": "^2.5.3",
"vite": "^7.3.1", "vite": "^7.3.1",
"vite-plugin-babel": "^1.4.1", "vite-plugin-babel": "^1.5.1",
"vite-plugin-eslint": "^1.8.1", "vite-plugin-eslint": "^1.8.1",
"vite-plugin-node-polyfills": "^0.25.0", "vite-plugin-node-polyfills": "^0.25.0",
"vite-plugin-pwa": "^1.2.0", "vite-plugin-pwa": "^1.2.0",

View File

@@ -29,19 +29,18 @@ export function AllocationsAssignmentComponent({
<Select <Select
id="employeeSelector" id="employeeSelector"
showSearch={{ showSearch={{
optionFilterProp: "children", optionFilterProp: "label",
filterOption: (input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0 filterOption: (input, option) => option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
}} }}
style={{ width: 200 }} style={{ width: 200 }}
placeholder="Select a person" placeholder="Select a person"
onChange={onChange} onChange={onChange}
> options={bodyshop.employees.map((emp) => ({
{bodyshop.employees.map((emp) => ( value: emp.id,
<Select.Option value={emp.id} key={emp.id}> key: emp.id,
{`${emp.first_name} ${emp.last_name}`} label: `${emp.first_name} ${emp.last_name}`
</Select.Option> }))}
))} />
</Select>
<InputNumber <InputNumber
defaultValue={assignment.hours} defaultValue={assignment.hours}
placeholder={t("joblines.fields.mod_lb_hrs")} placeholder={t("joblines.fields.mod_lb_hrs")}

View File

@@ -31,19 +31,17 @@ export default connect(
<div> <div>
<Select <Select
showSearch={{ showSearch={{
optionFilterProp: "children", optionFilterProp: "label",
filterOption: (input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0 filterOption: (input, option) => option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
}} }}
style={{ width: 200 }} style={{ width: 200 }}
placeholder="Select a person" placeholder="Select a person"
onChange={onChange} onChange={onChange}
> options={bodyshop.employees.map((emp) => ({
{bodyshop.employees.map((emp) => ( value: emp.id,
<Select.Option value={emp.id} key={emp.id}> label: `${emp.first_name} ${emp.last_name}`
{`${emp.first_name} ${emp.last_name}`} }))}
</Select.Option> />
))}
</Select>
<Button type="primary" disabled={!assignment.employeeid} onClick={handleAssignment}> <Button type="primary" disabled={!assignment.employeeid} onClick={handleAssignment}>
Assign Assign

View File

@@ -99,20 +99,22 @@ export function BillFormItemsExtendedFormItem({
}} }}
</Form.Item> </Form.Item>
<Form.Item label={t("billlines.fields.cost_center")} name={["billlineskeys", record.id, "cost_center"]}> <Form.Item label={t("billlines.fields.cost_center")} name={["billlineskeys", record.id, "cost_center"]}>
<Select showSearch style={{ minWidth: "3rem" }} disabled={disabled}> <Select
{bodyshopHasDmsKey(bodyshop) showSearch
? CiecaSelect(true, false) style={{ minWidth: "3rem" }}
: responsibilityCenters.costs.map((item) => <Select.Option key={item.name}>{item.name}</Select.Option>)} disabled={disabled}
</Select> options={
bodyshopHasDmsKey(bodyshop)
? CiecaSelect(true, false)
: responsibilityCenters.costs.map((item) => ({ value: item.name, label: item.name }))
}
/>
</Form.Item> </Form.Item>
<Form.Item label={t("billlines.fields.location")} name={["billlineskeys", record.id, "location"]}> <Form.Item label={t("billlines.fields.location")} name={["billlineskeys", record.id, "location"]}>
<Select disabled={disabled}> <Select
{bodyshop.md_parts_locations.map((loc, idx) => ( disabled={disabled}
<Select.Option key={idx} value={loc}> options={bodyshop.md_parts_locations.map((loc) => ({ value: loc, label: loc }))}
{loc} />
</Select.Option>
))}
</Select>
</Form.Item> </Form.Item>
<Form.Item <Form.Item
label={t("billlines.fields.deductedfromlbr")} label={t("billlines.fields.deductedfromlbr")}
@@ -136,22 +138,10 @@ export function BillFormItemsExtendedFormItem({
]} ]}
name={["billlineskeys", record.id, "lbr_adjustment", "mod_lbr_ty"]} name={["billlineskeys", record.id, "lbr_adjustment", "mod_lbr_ty"]}
> >
<Select allowClear> <Select
<Select.Option value="LAA">{t("joblines.fields.lbr_types.LAA")}</Select.Option> allowClear
<Select.Option value="LAB">{t("joblines.fields.lbr_types.LAB")}</Select.Option> options={CiecaSelect(false, true)}
<Select.Option value="LAD">{t("joblines.fields.lbr_types.LAD")}</Select.Option> />
<Select.Option value="LAE">{t("joblines.fields.lbr_types.LAE")}</Select.Option>
<Select.Option value="LAF">{t("joblines.fields.lbr_types.LAF")}</Select.Option>
<Select.Option value="LAG">{t("joblines.fields.lbr_types.LAG")}</Select.Option>
<Select.Option value="LAM">{t("joblines.fields.lbr_types.LAM")}</Select.Option>
<Select.Option value="LAR">{t("joblines.fields.lbr_types.LAR")}</Select.Option>
<Select.Option value="LAS">{t("joblines.fields.lbr_types.LAS")}</Select.Option>
<Select.Option value="LAU">{t("joblines.fields.lbr_types.LAU")}</Select.Option>
<Select.Option value="LA1">{t("joblines.fields.lbr_types.LA1")}</Select.Option>
<Select.Option value="LA2">{t("joblines.fields.lbr_types.LA2")}</Select.Option>
<Select.Option value="LA3">{t("joblines.fields.lbr_types.LA3")}</Select.Option>
<Select.Option value="LA4">{t("joblines.fields.lbr_types.LA4")}</Select.Option>
</Select>
</Form.Item> </Form.Item>
<Form.Item <Form.Item
label={t("jobs.labels.adjustmentrate")} label={t("jobs.labels.adjustmentrate")}

View File

@@ -328,13 +328,12 @@ export function BillFormComponent({
</Form.Item> </Form.Item>
{!billEdit && ( {!billEdit && (
<Form.Item label={t("bills.fields.allpartslocation")} name="location"> <Form.Item label={t("bills.fields.allpartslocation")} name="location">
<Select style={{ width: "10rem" }} disabled={disabled} allowClear> <Select
{bodyshop.md_parts_locations.map((loc, idx) => ( style={{ width: "10rem" }}
<Select.Option key={idx} value={loc}> disabled={disabled}
{loc} allowClear
</Select.Option> options={bodyshop.md_parts_locations.map((loc) => ({ value: loc, label: loc }))}
))} />
</Select>
</Form.Item> </Form.Item>
)} )}
</LayoutFormRow> </LayoutFormRow>

View File

@@ -399,11 +399,17 @@ export function BillEnterModalLinesComponent({
rules: [{ required: true }] rules: [{ required: true }]
}), }),
formInput: () => ( formInput: () => (
<Select showSearch style={{ minWidth: "3rem" }} disabled={disabled} tabIndex={0}> <Select
{bodyshopHasDmsKey(bodyshop) showSearch
? CiecaSelect(true, false) style={{ minWidth: "3rem" }}
: responsibilityCenters.costs.map((item) => <Select.Option key={item.name}>{item.name}</Select.Option>)} disabled={disabled}
</Select> tabIndex={0}
options={
bodyshopHasDmsKey(bodyshop)
? CiecaSelect(true, false)
: responsibilityCenters.costs.map((item) => ({ value: item.name, label: item.name }))
}
/>
) )
}, },
...(billEdit ...(billEdit
@@ -419,13 +425,11 @@ export function BillEnterModalLinesComponent({
name: [field.name, "location"] name: [field.name, "location"]
}), }),
formInput: () => ( formInput: () => (
<Select disabled={disabled} tabIndex={0}> <Select
{bodyshop.md_parts_locations.map((loc, idx) => ( disabled={disabled}
<Select.Option key={idx} value={loc}> tabIndex={0}
{loc} options={bodyshop.md_parts_locations.map((loc) => ({ value: loc, label: loc }))}
</Select.Option> />
))}
</Select>
) )
} }
]), ]),
@@ -466,22 +470,10 @@ export function BillEnterModalLinesComponent({
rules={[{ required: true }]} rules={[{ required: true }]}
name={[record.name, "lbr_adjustment", "mod_lbr_ty"]} name={[record.name, "lbr_adjustment", "mod_lbr_ty"]}
> >
<Select allowClear> <Select
<Select.Option value="LAA">{t("joblines.fields.lbr_types.LAA")}</Select.Option> allowClear
<Select.Option value="LAB">{t("joblines.fields.lbr_types.LAB")}</Select.Option> options={CiecaSelect(false, true)}
<Select.Option value="LAD">{t("joblines.fields.lbr_types.LAD")}</Select.Option> />
<Select.Option value="LAE">{t("joblines.fields.lbr_types.LAE")}</Select.Option>
<Select.Option value="LAF">{t("joblines.fields.lbr_types.LAF")}</Select.Option>
<Select.Option value="LAG">{t("joblines.fields.lbr_types.LAG")}</Select.Option>
<Select.Option value="LAM">{t("joblines.fields.lbr_types.LAM")}</Select.Option>
<Select.Option value="LAR">{t("joblines.fields.lbr_types.LAR")}</Select.Option>
<Select.Option value="LAS">{t("joblines.fields.lbr_types.LAS")}</Select.Option>
<Select.Option value="LAU">{t("joblines.fields.lbr_types.LAU")}</Select.Option>
<Select.Option value="LA1">{t("joblines.fields.lbr_types.LA1")}</Select.Option>
<Select.Option value="LA2">{t("joblines.fields.lbr_types.LA2")}</Select.Option>
<Select.Option value="LA3">{t("joblines.fields.lbr_types.LA3")}</Select.Option>
<Select.Option value="LA4">{t("joblines.fields.lbr_types.LA4")}</Select.Option>
</Select>
</Form.Item> </Form.Item>
{Enhanced_Payroll.treatment === "on" ? ( {Enhanced_Payroll.treatment === "on" ? (

View File

@@ -19,13 +19,12 @@ export default function ChatTagRoComponent({ roOptions, loading, handleSearch, h
placeholder={t("general.labels.search")} placeholder={t("general.labels.search")}
onSelect={handleInsertTag} onSelect={handleInsertTag}
notFoundContent={loading ? <LoadingOutlined /> : <Empty />} notFoundContent={loading ? <LoadingOutlined /> : <Empty />}
> options={roOptions.map((item, idx) => ({
{roOptions.map((item, idx) => ( key: item.id || idx,
<Select.Option key={item.id || idx}> value: item.id || idx,
{` ${item.ro_number || ""} | ${OwnerNameDisplayFunction(item)}`} label: ` ${item.ro_number || ""} | ${OwnerNameDisplayFunction(item)}`
</Select.Option> }))}
))} />
</Select>
</div> </div>
{loading ? <LoadingOutlined /> : null} {loading ? <LoadingOutlined /> : null}

View File

@@ -309,13 +309,13 @@ export function ContractConvertToRo({ bodyshop, currentUser, contract, disabled
} }
]} ]}
> >
<Select> <Select
{bodyshop.md_ins_cos.map((s) => ( options={bodyshop.md_ins_cos.map((s) => ({
<Select.Option key={s.name} value={s.name}> key: s.name,
{s.name} value: s.name,
</Select.Option> label: s.name
))} }))}
</Select> />
</Form.Item> </Form.Item>
<Form.Item <Form.Item
name={"class"} name={"class"}
@@ -327,13 +327,13 @@ export function ContractConvertToRo({ bodyshop, currentUser, contract, disabled
} }
]} ]}
> >
<Select> <Select
{bodyshop.md_classes.map((s) => ( options={bodyshop.md_classes.map((s) => ({
<Select.Option key={s} value={s}> key: s,
{s} value: s,
</Select.Option> label: s
))} }))}
</Select> />
</Form.Item> </Form.Item>
<Form.Item <Form.Item
label={t("contracts.labels.convertform.applycleanupcharge")} label={t("contracts.labels.convertform.applycleanupcharge")}

View File

@@ -2,8 +2,6 @@ import { useEffect, useState } from "react";
import { Select } from "antd"; import { Select } from "antd";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
const { Option } = Select;
const ContractStatusComponent = ({ value, onChange, ref }) => { const ContractStatusComponent = ({ value, onChange, ref }) => {
const [option, setOption] = useState(value); const [option, setOption] = useState(value);
const { t } = useTranslation(); const { t } = useTranslation();
@@ -15,11 +13,17 @@ const ContractStatusComponent = ({ value, onChange, ref }) => {
}, [value, option, onChange]); }, [value, option, onChange]);
return ( return (
<Select ref={ref} value={option} style={{ width: 100 }} onChange={setOption}> <Select
<Option value="contracts.status.new">{t("contracts.status.new")}</Option> ref={ref}
<Option value="contracts.status.out">{t("contracts.status.out")}</Option> value={option}
<Option value="contracts.status.returned">{t("contracts.status.out")}</Option> style={{ width: 100 }}
</Select> onChange={setOption}
options={[
{ value: "contracts.status.new", label: t("contracts.status.new") },
{ value: "contracts.status.out", label: t("contracts.status.out") },
{ value: "contracts.status.returned", label: t("contracts.status.out") }
]}
/>
); );
}; };

View File

@@ -2,8 +2,6 @@ import { Select } from "antd";
import { useEffect, useState } from "react"; import { useEffect, useState } from "react";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
const { Option } = Select;
const CourtesyCarReadinessComponent = ({ value, onChange, ref }) => { const CourtesyCarReadinessComponent = ({ value, onChange, ref }) => {
const [option, setOption] = useState(value); const [option, setOption] = useState(value);
const { t } = useTranslation(); const { t } = useTranslation();
@@ -23,10 +21,11 @@ const CourtesyCarReadinessComponent = ({ value, onChange, ref }) => {
width: 100 width: 100
}} }}
onChange={setOption} onChange={setOption}
> options={[
<Option value="courtesycars.readiness.ready">{t("courtesycars.readiness.ready")}</Option> { value: "courtesycars.readiness.ready", label: t("courtesycars.readiness.ready") },
<Option value="courtesycars.readiness.notready">{t("courtesycars.readiness.notready")}</Option> { value: "courtesycars.readiness.notready", label: t("courtesycars.readiness.notready") }
</Select> ]}
/>
); );
}; };
export default CourtesyCarReadinessComponent; export default CourtesyCarReadinessComponent;

View File

@@ -2,8 +2,6 @@ import { useEffect, useState } from "react";
import { Select } from "antd"; import { Select } from "antd";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
const { Option } = Select;
const CourtesyCarStatusComponent = ({ value, onChange, ref }) => { const CourtesyCarStatusComponent = ({ value, onChange, ref }) => {
const [option, setOption] = useState(value); const [option, setOption] = useState(value);
const { t } = useTranslation(); const { t } = useTranslation();
@@ -22,14 +20,15 @@ const CourtesyCarStatusComponent = ({ value, onChange, ref }) => {
width: 100 width: 100
}} }}
onChange={setOption} onChange={setOption}
> options={[
<Option value="courtesycars.status.in">{t("courtesycars.status.in")}</Option> { value: "courtesycars.status.in", label: t("courtesycars.status.in") },
<Option value="courtesycars.status.inservice">{t("courtesycars.status.inservice")}</Option> { value: "courtesycars.status.inservice", label: t("courtesycars.status.inservice") },
<Option value="courtesycars.status.out">{t("courtesycars.status.out")}</Option> { value: "courtesycars.status.out", label: t("courtesycars.status.out") },
<Option value="courtesycars.status.sold">{t("courtesycars.status.sold")}</Option> { value: "courtesycars.status.sold", label: t("courtesycars.status.sold") },
<Option value="courtesycars.status.leasereturn">{t("courtesycars.status.leasereturn")}</Option> { value: "courtesycars.status.leasereturn", label: t("courtesycars.status.leasereturn") },
<Option value="courtesycars.status.unavailable">{t("courtesycars.status.unavailable")}</Option> { value: "courtesycars.status.unavailable", label: t("courtesycars.status.unavailable") }
</Select> ]}
/>
); );
}; };
export default CourtesyCarStatusComponent; export default CourtesyCarStatusComponent;

View File

@@ -272,11 +272,15 @@ export default function CdkLikePostForm({ bodyshop, socket, job, logsRef, mode,
name={[field.name, "name"]} name={[field.name, "name"]}
rules={[{ required: true }]} rules={[{ required: true }]}
> >
<Select style={{ width: "100%" }} onSelect={(value) => handlePayerSelect(value, index)}> <Select
{bodyshop.cdk_configuration?.payers?.map((payer) => ( style={{ width: "100%" }}
<Select.Option key={payer.name}>{payer.name}</Select.Option> onSelect={(value) => handlePayerSelect(value, index)}
))} options={bodyshop.cdk_configuration?.payers?.map((payer) => ({
</Select> key: payer.name,
value: payer.name,
label: payer.name
}))}
/>
</Form.Item> </Form.Item>
</Col> </Col>

View File

@@ -86,11 +86,13 @@ export function EmailOverlayComponent({ emailConfig, form, selectedMediaState, b
} }
]} ]}
> >
<Select> <Select
<Select.Option key={currentUser.email}>{currentUser.email}</Select.Option> options={[
<Select.Option key={bodyshop.email}>{bodyshop.email}</Select.Option> { key: currentUser.email, value: currentUser.email, label: currentUser.email },
{bodyshop.md_from_emails && bodyshop.md_from_emails.map((e) => <Select.Option key={e}>{e}</Select.Option>)} { key: bodyshop.email, value: bodyshop.email, label: bodyshop.email },
</Select> ...(bodyshop.md_from_emails ? bodyshop.md_from_emails.map((e) => ({ key: e, value: e, label: e })) : [])
]}
/>
</Form.Item> </Form.Item>
<Form.Item <Form.Item
label={ label={

View File

@@ -1,7 +1,6 @@
import { Select, Space, Tag } from "antd"; import { Select, Space, Tag } from "antd";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
const { Option } = Select;
//To be used as a form element only. //To be used as a form element only.
const EmployeeSearchSelectEmail = ({ options, ...props }) => { const EmployeeSearchSelectEmail = ({ options, ...props }) => {
@@ -12,26 +11,24 @@ const EmployeeSearchSelectEmail = ({ options, ...props }) => {
showSearch={{ showSearch={{
optionFilterProp: "search" optionFilterProp: "search"
}} }}
// value={option}
style={{ style={{
width: 400 width: 400
}} }}
options={options?.map((o) => ({
key: o.id,
value: o.user_email,
search: `${o.employee_number} ${o.first_name} ${o.last_name}`,
label: (
<Space>
{`${o.employee_number} ${o.first_name} ${o.last_name}`}
<Tag color="green">
{o.flat_rate ? t("timetickets.labels.flat_rate") : t("timetickets.labels.straight_time")}
</Tag>
</Space>
)
}))}
{...props} {...props}
> />
{options
? options.map((o) => (
<Option key={o.id} value={o.user_email} search={`${o.employee_number} ${o.first_name} ${o.last_name}`}>
<Space>
{`${o.employee_number} ${o.first_name} ${o.last_name}`}
<Tag color="green">
{o.flat_rate ? t("timetickets.labels.flat_rate") : t("timetickets.labels.straight_time")}
</Tag>
</Space>
</Option>
))
: null}
</Select>
); );
}; };
export default EmployeeSearchSelectEmail; export default EmployeeSearchSelectEmail;

View File

@@ -1,7 +1,6 @@
import { Select, Space, Tag } from "antd"; import { Select, Space, Tag } from "antd";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
const { Option } = Select;
//To be used as a form element only. //To be used as a form element only.
const EmployeeSearchSelect = ({ options, showEmail, ...props }) => { const EmployeeSearchSelect = ({ options, showEmail, ...props }) => {
@@ -12,30 +11,29 @@ const EmployeeSearchSelect = ({ options, showEmail, ...props }) => {
showSearch={{ showSearch={{
optionFilterProp: "search" optionFilterProp: "search"
}} }}
// value={option}
style={{ style={{
width: 400 width: 400
}} }}
options={options?.map((o) => ({
key: o.id,
value: o.id,
search: `${o.employee_number} ${o.first_name} ${o.last_name}`,
label: (
<Space size="small">
{`${o.employee_number ?? ""} ${o.first_name} ${o.last_name}`}
<Tag color="green" style={{ padding: "0.1 0.1rem", marginRight: "1px", marginLeft: "1px" }}>
{o.flat_rate ? t("timetickets.labels.flat_rate") : t("timetickets.labels.straight_time")}
</Tag>
{showEmail && o.user_email ? (
<Tag color="blue" style={{ padding: "0.1 0.1rem", marginRight: "1px", marginLeft: "1px" }}>
{o.user_email}
</Tag>
) : null}
</Space>
)
}))}
{...props} {...props}
> />
{options
? options.map((o) => (
<Option key={o.id} value={o.id} search={`${o.employee_number} ${o.first_name} ${o.last_name}`}>
<Space size="small">
{`${o.employee_number ?? ""} ${o.first_name} ${o.last_name}`}
<Tag color="green" style={{ padding: "0.1 0.1rem", marginRight: "1px", marginLeft: "1px" }}>
{o.flat_rate ? t("timetickets.labels.flat_rate") : t("timetickets.labels.straight_time")}
</Tag>
{showEmail && o.user_email ? (
<Tag color="blue" style={{ padding: "0.1 0.1rem", marginRight: "1px", marginLeft: "1px" }}>
{o.user_email}
</Tag>
) : null}
</Space>
</Option>
))
: null}
</Select>
); );
}; };
export default EmployeeSearchSelect; export default EmployeeSearchSelect;

View File

@@ -67,16 +67,19 @@ export function Jobd3RdPartyModal({ bodyshop, jobId, job, technician }) {
); );
}; };
const handleInsSelect = (value, option) => { const handleInsSelect = (value) => {
form.setFieldsValue({ const selectedVendor = bodyshop.md_ins_cos.find(s => s.name === value);
addr1: option.obj.name, if (selectedVendor) {
addr2: option.obj.street1, form.setFieldsValue({
addr3: option.obj.street2, addr1: selectedVendor.name,
city: option.obj.city, addr2: selectedVendor.street1,
state: option.obj.state, addr3: selectedVendor.street2,
zip: option.obj.zip, city: selectedVendor.city,
vendorid: null state: selectedVendor.state,
}); zip: selectedVendor.zip,
vendorid: null
});
}
}; };
const handleVendorSelect = (vendorid) => { const handleVendorSelect = (vendorid) => {
@@ -103,13 +106,13 @@ export function Jobd3RdPartyModal({ bodyshop, jobId, job, technician }) {
<VendorSearchSelect options={VendorAutoCompleteData?.vendors} onSelect={handleVendorSelect} /> <VendorSearchSelect options={VendorAutoCompleteData?.vendors} onSelect={handleVendorSelect} />
</Form.Item> </Form.Item>
<Form.Item label={t("bodyshop.fields.md_ins_co.name")} name="ins_co_id"> <Form.Item label={t("bodyshop.fields.md_ins_co.name")} name="ins_co_id">
<Select onSelect={handleInsSelect}> <Select
{bodyshop.md_ins_cos.map((s) => ( onSelect={handleInsSelect}
<Select.Option key={s.name} obj={s} value={s.name}> options={bodyshop.md_ins_cos.map((s) => ({
{s.name} value: s.name,
</Select.Option> label: s.name
))} }))}
</Select> />
</Form.Item> </Form.Item>
<LayoutFormRow grow> <LayoutFormRow grow>
<Form.Item label={t("printcenter.jobs.3rdpartyfields.addr1")} name="addr1"> <Form.Item label={t("printcenter.jobs.3rdpartyfields.addr1")} name="addr1">

View File

@@ -88,17 +88,15 @@ export function JoblineBulkAssign({ setSelectedLines, selectedLines, insertAudit
> >
<Select <Select
showSearch={{ showSearch={{
optionFilterProp: "children", optionFilterProp: "label",
filterOption: (input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0 filterOption: (input, option) => option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
}} }}
style={{ width: 200 }} style={{ width: 200 }}
> options={bodyshop.employee_teams.map((team) => ({
{bodyshop.employee_teams.map((team) => ( value: team.id,
<Select.Option value={team.id} key={team.id} name={team.name}> label: team.name
{team.name} }))}
</Select.Option> />
))}
</Select>
</Form.Item> </Form.Item>
<Space wrap> <Space wrap>

View File

@@ -122,22 +122,26 @@ export function JobLineConvertToLabor({
} }
]} ]}
> >
<Select allowClear showSearch={{ optionFilterProp: "children" }}> <Select
<Select.Option value="LAA">{t("joblines.fields.lbr_types.LAA")}</Select.Option> allowClear
<Select.Option value="LAB">{t("joblines.fields.lbr_types.LAB")}</Select.Option> showSearch
<Select.Option value="LAD">{t("joblines.fields.lbr_types.LAD")}</Select.Option> options={[
<Select.Option value="LAE">{t("joblines.fields.lbr_types.LAE")}</Select.Option> { value: "LAA", label: t("joblines.fields.lbr_types.LAA") },
<Select.Option value="LAF">{t("joblines.fields.lbr_types.LAF")}</Select.Option> { value: "LAB", label: t("joblines.fields.lbr_types.LAB") },
<Select.Option value="LAG">{t("joblines.fields.lbr_types.LAG")}</Select.Option> { value: "LAD", label: t("joblines.fields.lbr_types.LAD") },
<Select.Option value="LAM">{t("joblines.fields.lbr_types.LAM")}</Select.Option> { value: "LAE", label: t("joblines.fields.lbr_types.LAE") },
<Select.Option value="LAR">{t("joblines.fields.lbr_types.LAR")}</Select.Option> { value: "LAF", label: t("joblines.fields.lbr_types.LAF") },
<Select.Option value="LAS">{t("joblines.fields.lbr_types.LAS")}</Select.Option> { value: "LAG", label: t("joblines.fields.lbr_types.LAG") },
<Select.Option value="LAU">{t("joblines.fields.lbr_types.LAU")}</Select.Option> { value: "LAM", label: t("joblines.fields.lbr_types.LAM") },
<Select.Option value="LA1">{t("joblines.fields.lbr_types.LA1")}</Select.Option> { value: "LAR", label: t("joblines.fields.lbr_types.LAR") },
<Select.Option value="LA2">{t("joblines.fields.lbr_types.LA2")}</Select.Option> { value: "LAS", label: t("joblines.fields.lbr_types.LAS") },
<Select.Option value="LA3">{t("joblines.fields.lbr_types.LA3")}</Select.Option> { value: "LAU", label: t("joblines.fields.lbr_types.LAU") },
<Select.Option value="LA4">{t("joblines.fields.lbr_types.LA4")}</Select.Option> { value: "LA1", label: t("joblines.fields.lbr_types.LA1") },
</Select> { value: "LA2", label: t("joblines.fields.lbr_types.LA2") },
{ value: "LA3", label: t("joblines.fields.lbr_types.LA3") },
{ value: "LA4", label: t("joblines.fields.lbr_types.LA4") }
]}
/>
</Form.Item> </Form.Item>
<Form.Item shouldUpdate> <Form.Item shouldUpdate>

View File

@@ -115,19 +115,18 @@ export function JobLineDispatchButton({
> >
<Select <Select
showSearch={{ showSearch={{
optionFilterProp: "children", optionFilterProp: "label",
filterOption: (input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0 filterOption: (input, option) => option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
}} }}
style={{ width: 200 }} style={{ width: 200 }}
> options={bodyshop.employees
{bodyshop.employees
.filter((emp) => emp.active) .filter((emp) => emp.active)
.map((emp) => ( .map((emp) => ({
<Select.Option value={emp.id} key={emp.id} name={`${emp.first_name} ${emp.last_name}`}> value: emp.id,
{`${emp.first_name} ${emp.last_name}`} key: emp.id,
</Select.Option> label: `${emp.first_name} ${emp.last_name}`
))} }))}
</Select> />
</Form.Item> </Form.Item>
<Space wrap> <Space wrap>

View File

@@ -64,13 +64,12 @@ export function JobLineStatusPopup({ bodyshop, jobline, disabled }) {
onSelect={handleChange} onSelect={handleChange}
onBlur={handleSave} onBlur={handleSave}
onClear={() => handleChange(null)} onClear={() => handleChange(null)}
> options={Object.values(bodyshop.md_order_statuses).map((s, idx) => ({
{Object.values(bodyshop.md_order_statuses).map((s, idx) => ( key: idx,
<Select.Option key={idx} value={s}> value: s,
{s} label: s
</Select.Option> }))}
))} />
</Select>
</LoadingSpinner> </LoadingSpinner>
</div> </div>
); );

View File

@@ -75,13 +75,12 @@ export function JoblineTeamAssignment({ bodyshop, jobline, disabled, jobId, inse
onSelect={handleChange} onSelect={handleChange}
onBlur={handleSave} onBlur={handleSave}
onClear={() => handleChange(null)} onClear={() => handleChange(null)}
> options={Object.values(bodyshop.employee_teams).map((s) => ({
{Object.values(bodyshop.employee_teams).map((s, idx) => ( key: s.id,
<Select.Option key={idx} value={s.id}> value: s.id,
{s.name} label: s.name
</Select.Option> }))}
))} />
</Select>
</LoadingSpinner> </LoadingSpinner>
</div> </div>
); );

View File

@@ -67,22 +67,22 @@ export function JobLinesUpsertModalComponent({ bodyshop, open, jobLine, handleCa
</LayoutFormRow> </LayoutFormRow>
<LayoutFormRow grow> <LayoutFormRow grow>
<Form.Item label={t("joblines.fields.mod_lbr_ty")} name="mod_lbr_ty"> <Form.Item label={t("joblines.fields.mod_lbr_ty")} name="mod_lbr_ty">
<Select allowClear> <Select allowClear options={[
<Select.Option value="LAA">{t("joblines.fields.lbr_types.LAA")}</Select.Option> { value: "LAA", label: t("joblines.fields.lbr_types.LAA") },
<Select.Option value="LAB">{t("joblines.fields.lbr_types.LAB")}</Select.Option> { value: "LAB", label: t("joblines.fields.lbr_types.LAB") },
<Select.Option value="LAD">{t("joblines.fields.lbr_types.LAD")}</Select.Option> { value: "LAD", label: t("joblines.fields.lbr_types.LAD") },
<Select.Option value="LAE">{t("joblines.fields.lbr_types.LAE")}</Select.Option> { value: "LAE", label: t("joblines.fields.lbr_types.LAE") },
<Select.Option value="LAF">{t("joblines.fields.lbr_types.LAF")}</Select.Option> { value: "LAF", label: t("joblines.fields.lbr_types.LAF") },
<Select.Option value="LAG">{t("joblines.fields.lbr_types.LAG")}</Select.Option> { value: "LAG", label: t("joblines.fields.lbr_types.LAG") },
<Select.Option value="LAM">{t("joblines.fields.lbr_types.LAM")}</Select.Option> { value: "LAM", label: t("joblines.fields.lbr_types.LAM") },
<Select.Option value="LAR">{t("joblines.fields.lbr_types.LAR")}</Select.Option> { value: "LAR", label: t("joblines.fields.lbr_types.LAR") },
<Select.Option value="LAS">{t("joblines.fields.lbr_types.LAS")}</Select.Option> { value: "LAS", label: t("joblines.fields.lbr_types.LAS") },
<Select.Option value="LAU">{t("joblines.fields.lbr_types.LAU")}</Select.Option> { value: "LAU", label: t("joblines.fields.lbr_types.LAU") },
<Select.Option value="LA1">{t("joblines.fields.lbr_types.LA1")}</Select.Option> { value: "LA1", label: t("joblines.fields.lbr_types.LA1") },
<Select.Option value="LA2">{t("joblines.fields.lbr_types.LA2")}</Select.Option> { value: "LA2", label: t("joblines.fields.lbr_types.LA2") },
<Select.Option value="LA3">{t("joblines.fields.lbr_types.LA3")}</Select.Option> { value: "LA3", label: t("joblines.fields.lbr_types.LA3") },
<Select.Option value="LA4">{t("joblines.fields.lbr_types.LA4")}</Select.Option> { value: "LA4", label: t("joblines.fields.lbr_types.LA4") }
</Select> ]} />
</Form.Item> </Form.Item>
<Form.Item label={t("joblines.fields.op_code_desc")} name="op_code_desc"> <Form.Item label={t("joblines.fields.op_code_desc")} name="op_code_desc">
<Input /> <Input />
@@ -128,17 +128,17 @@ export function JobLinesUpsertModalComponent({ bodyshop, open, jobLine, handleCa
</LayoutFormRow> </LayoutFormRow>
<LayoutFormRow> <LayoutFormRow>
<Form.Item label={t("joblines.fields.part_type")} name="part_type"> <Form.Item label={t("joblines.fields.part_type")} name="part_type">
<Select allowClear> <Select allowClear options={[
<Select.Option value="PAA">{t("joblines.fields.part_types.PAA")}</Select.Option> { value: "PAA", label: t("joblines.fields.part_types.PAA") },
<Select.Option value="PAC">{t("joblines.fields.part_types.PAC")}</Select.Option> { value: "PAC", label: t("joblines.fields.part_types.PAC") },
<Select.Option value="PAE">{t("joblines.fields.part_types.PAE")}</Select.Option> { value: "PAE", label: t("joblines.fields.part_types.PAE") },
<Select.Option value="PAL">{t("joblines.fields.part_types.PAL")}</Select.Option> { value: "PAL", label: t("joblines.fields.part_types.PAL") },
<Select.Option value="PAM">{t("joblines.fields.part_types.PAM")}</Select.Option> { value: "PAM", label: t("joblines.fields.part_types.PAM") },
<Select.Option value="PAN">{t("joblines.fields.part_types.PAN")}</Select.Option> { value: "PAN", label: t("joblines.fields.part_types.PAN") },
<Select.Option value="PAO">{t("joblines.fields.part_types.PAO")}</Select.Option> { value: "PAO", label: t("joblines.fields.part_types.PAO") },
<Select.Option value="PAR">{t("joblines.fields.part_types.PAR")}</Select.Option> { value: "PAR", label: t("joblines.fields.part_types.PAR") },
<Select.Option value="PAS">{t("joblines.fields.part_types.PAS")}</Select.Option> { value: "PAS", label: t("joblines.fields.part_types.PAS") }
</Select> ]} />
</Form.Item> </Form.Item>
<Form.Item label={t("joblines.fields.oem_partno")} name="oem_partno"> <Form.Item label={t("joblines.fields.oem_partno")} name="oem_partno">
<Input /> <Input />

View File

@@ -8,8 +8,6 @@ import { SEARCH_JOBS_BY_ID_FOR_AUTOCOMPLETE, SEARCH_JOBS_FOR_AUTOCOMPLETE } from
import AlertComponent from "../alert/alert.component"; import AlertComponent from "../alert/alert.component";
import { OwnerNameDisplayFunction } from "../owner-name-display/owner-name-display.component"; import { OwnerNameDisplayFunction } from "../owner-name-display/owner-name-display.component";
const { Option } = Select;
const JobSearchSelect = ({ const JobSearchSelect = ({
disabled, disabled,
convertedOnly = false, convertedOnly = false,
@@ -87,24 +85,24 @@ const JobSearchSelect = ({
style={{ width: "100%" }} style={{ width: "100%" }}
suffixIcon={(loading || idLoading) && <Spin />} // matches OLD spinner semantics suffixIcon={(loading || idLoading) && <Spin />} // matches OLD spinner semantics
notFoundContent={loading ? <LoadingOutlined /> : null} // matches OLD (loading only) notFoundContent={loading ? <LoadingOutlined /> : null} // matches OLD (loading only)
> options={theOptions?.map((o) => ({
{theOptions key: o.id,
? theOptions.map((o) => ( value: o.id,
<Option key={o.id} value={o.id} status={o.status}> status: o.status,
<Space align="center"> label: (
<span> <Space align="center">
{`${clm_no && o.clm_no ? `${o.clm_no} | ` : ""}${o.ro_number || t("general.labels.na")} | ${OwnerNameDisplayFunction( <span>
o {`${clm_no && o.clm_no ? `${o.clm_no} | ` : ""}${o.ro_number || t("general.labels.na")} | ${OwnerNameDisplayFunction(
)} | ${o.v_model_yr || ""} ${o.v_make_desc || ""} ${o.v_model_desc || ""}`} o
</span> )} | ${o.v_model_yr || ""} ${o.v_make_desc || ""} ${o.v_model_desc || ""}`}
<Tag> </span>
<strong>{o.status}</strong> <Tag>
</Tag> <strong>{o.status}</strong>
</Space> </Tag>
</Option> </Space>
)) )
: null} }))}
</Select> />
{error ? <AlertComponent title={error.message} type="error" /> : null} {error ? <AlertComponent title={error.message} type="error" /> : null}
{idError ? <AlertComponent title={idError.message} type="error" /> : null} {idError ? <AlertComponent title={idError.message} type="error" /> : null}

View File

@@ -59,13 +59,12 @@ export function JobsAdminClass({ bodyshop, job }) {
} }
]} ]}
> >
<Select> <Select
{bodyshop.md_classes.map((s) => ( options={bodyshop.md_classes.map((s) => ({
<Select.Option key={s} value={s}> value: s,
{s} label: s
</Select.Option> }))}
))} />
</Select>
</Form.Item> </Form.Item>
</Form> </Form>

View File

@@ -141,13 +141,11 @@ export function JobsCloseLines({ bodyshop, job, jobRO }) {
option.children.toLowerCase().indexOf(input.toLowerCase()) >= 0 option.children.toLowerCase().indexOf(input.toLowerCase()) >= 0
}} }}
disabled={jobRO} disabled={jobRO}
> options={bodyshop.md_responsibility_centers.profits.map((p) => ({
{bodyshop.md_responsibility_centers.profits.map((p) => ( value: p.name,
<Select.Option key={p.name} value={p.name}> label: p.name
{p.name} }))}
</Select.Option> />
))}
</Select>
</Form.Item> </Form.Item>
</td> </td>
<td> <td>
@@ -171,13 +169,11 @@ export function JobsCloseLines({ bodyshop, job, jobRO }) {
option.children.toLowerCase().indexOf(input.toLowerCase()) >= 0 option.children.toLowerCase().indexOf(input.toLowerCase()) >= 0
}} }}
disabled={jobRO} disabled={jobRO}
> options={bodyshop.md_responsibility_centers.profits.map((p) => ({
{bodyshop.md_responsibility_centers.profits.map((p) => ( value: p.name,
<Select.Option key={p.name} value={p.name}> label: p.name
{p.name} }))}
</Select.Option> />
))}
</Select>
</Form.Item> </Form.Item>
</td> </td>
</tr> </tr>

View File

@@ -2,7 +2,7 @@ import { useMutation } from "@apollo/client/react";
import { Button, Divider, Form, Input, Modal, Select, Space, Switch } from "antd"; import { Button, Divider, Form, Input, Modal, Select, Space, Switch } from "antd";
import axios from "axios"; import axios from "axios";
import { some } from "lodash"; import { some } from "lodash";
import { useCallback, useState } from "react"; import { useCallback, useMemo, useState } from "react";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { connect } from "react-redux"; import { connect } from "react-redux";
import { createStructuredSelector } from "reselect"; import { createStructuredSelector } from "reselect";
@@ -19,10 +19,10 @@ import { useSocket } from "../../contexts/SocketIO/useSocket.js";
import RREarlyROForm from "../dms-post-form/rr-early-ro-form"; import RREarlyROForm from "../dms-post-form/rr-early-ro-form";
const mapStateToProps = createStructuredSelector({ const mapStateToProps = createStructuredSelector({
//currentUser: selectCurrentUser
bodyshop: selectBodyshop, bodyshop: selectBodyshop,
jobRO: selectJobReadOnly jobRO: selectJobReadOnly
}); });
const mapDispatchToProps = (dispatch) => ({ const mapDispatchToProps = (dispatch) => ({
insertAuditTrail: ({ jobid, operation, type }) => insertAuditTrail: ({ jobid, operation, type }) =>
dispatch( dispatch(
@@ -37,16 +37,17 @@ const mapDispatchToProps = (dispatch) => ({
export function JobsConvertButton({ bodyshop, job, refetch, jobRO, insertAuditTrail, parentFormIsFieldsTouched }) { export function JobsConvertButton({ bodyshop, job, refetch, jobRO, insertAuditTrail, parentFormIsFieldsTouched }) {
const [open, setOpen] = useState(false); const [open, setOpen] = useState(false);
const [loading, setLoading] = useState(false); const [loading, setLoading] = useState(false);
const [earlyRoCreated, setEarlyRoCreated] = useState(!!job?.dms_id); // Track early RO creation state
const [earlyRoCreatedThisSession, setEarlyRoCreatedThisSession] = useState(false); // Track if created in THIS modal session const [earlyRoCreated, setEarlyRoCreated] = useState(!!job?.dms_id);
const [earlyRoCreatedThisSession, setEarlyRoCreatedThisSession] = useState(false);
const [mutationConvertJob] = useMutation(CONVERT_JOB_TO_RO); const [mutationConvertJob] = useMutation(CONVERT_JOB_TO_RO);
const { t } = useTranslation(); const { t } = useTranslation();
const [form] = Form.useForm(); const [form] = Form.useForm();
const notification = useNotification(); const notification = useNotification();
const allFormValues = Form.useWatch([], form); const allFormValues = Form.useWatch([], form);
const { socket } = useSocket(); // Extract socket from context const { socket } = useSocket();
// Get Fortellis treatment for proper DMS mode detection
const { const {
treatments: { Fortellis } treatments: { Fortellis }
} = useTreatmentsWithConfig({ } = useTreatmentsWithConfig({
@@ -55,16 +56,64 @@ export function JobsConvertButton({ bodyshop, job, refetch, jobRO, insertAuditTr
splitKey: bodyshop?.imexshopid splitKey: bodyshop?.imexshopid
}); });
// Check if bodyshop has Reynolds integration using the proper getDmsMode function
const dmsMode = getDmsMode(bodyshop, Fortellis.treatment); const dmsMode = getDmsMode(bodyshop, Fortellis.treatment);
const isReynoldsMode = dmsMode === DMS_MAP.reynolds; const isReynoldsMode = dmsMode === DMS_MAP.reynolds;
const insuranceOptions = useMemo(
() =>
(bodyshop?.md_ins_cos ?? []).map((s) => ({
value: s.name,
label: s.name
})),
[bodyshop?.md_ins_cos]
);
const classOptions = useMemo(
() =>
(bodyshop?.md_classes ?? []).map((s) => ({
value: s,
label: s
})),
[bodyshop?.md_classes]
);
const referralOptions = useMemo(
() =>
(bodyshop?.md_referral_sources ?? []).map((s) => ({
value: s,
label: s
})),
[bodyshop?.md_referral_sources]
);
const csrOptions = useMemo(
() =>
(bodyshop?.employees ?? [])
.filter((emp) => emp.active)
.map((emp) => ({
value: emp.id,
label: `${emp.first_name} ${emp.last_name}`
})),
[bodyshop?.employees]
);
const categoryOptions = useMemo(
() =>
(bodyshop?.md_categories ?? []).map((s) => ({
value: s,
label: s
})),
[bodyshop?.md_categories]
);
const handleConvert = async ({ employee_csr, category, ...values }) => { const handleConvert = async ({ employee_csr, category, ...values }) => {
if (parentFormIsFieldsTouched()) { if (parentFormIsFieldsTouched()) {
alert(t("jobs.labels.savebeforeconversion")); alert(t("jobs.labels.savebeforeconversion"));
return; return;
} }
setLoading(true); setLoading(true);
const res = await mutationConvertJob({ const res = await mutationConvertJob({
variables: { variables: {
jobId: job.id, jobId: job.id,
@@ -78,13 +127,11 @@ export function JobsConvertButton({ bodyshop, job, refetch, jobRO, insertAuditTr
}); });
if (values.ca_gst_registrant) { if (values.ca_gst_registrant) {
await axios.post("/job/totalsssu", { await axios.post("/job/totalsssu", { id: job.id });
id: job.id
});
} }
if (!res.errors) { if (!res.errors) {
refetch(); refetch?.();
notification.success({ notification.success({
title: t("jobs.successes.converted") title: t("jobs.successes.converted")
}); });
@@ -97,19 +144,20 @@ export function JobsConvertButton({ bodyshop, job, refetch, jobRO, insertAuditTr
setOpen(false); setOpen(false);
} }
setLoading(false); setLoading(false);
}; };
const submitDisabled = useCallback(() => some(allFormValues, (v) => v === undefined), [allFormValues]); const submitDisabled = useCallback(() => some(allFormValues, (v) => v === undefined), [allFormValues]);
const handleEarlyROSuccess = (result) => { const handleEarlyROSuccess = (result) => {
setEarlyRoCreated(true); // Mark early RO as created setEarlyRoCreated(true);
setEarlyRoCreatedThisSession(true); // Mark as created in this session setEarlyRoCreatedThisSession(true);
notification.success({ notification.success({
title: t("jobs.successes.early_ro_created"), title: t("jobs.successes.early_ro_created"),
description: `RO Number: ${result.roNumber || "N/A"}` description: `RO Number: ${result.roNumber || "N/A"}`
}); });
// Delay refetch to keep success message visible for 2 seconds
setTimeout(() => { setTimeout(() => {
refetch?.(); refetch?.();
}, 2000); }, 2000);
@@ -130,29 +178,28 @@ export function JobsConvertButton({ bodyshop, job, refetch, jobRO, insertAuditTr
disabled={job.converted || jobRO} disabled={job.converted || jobRO}
loading={loading} loading={loading}
onClick={() => { onClick={() => {
setEarlyRoCreated(!!job?.dms_id); // Initialize state based on current job setEarlyRoCreated(!!job?.dms_id);
setEarlyRoCreatedThisSession(false); // Reset session state when opening modal setEarlyRoCreatedThisSession(false);
setOpen(true); setOpen(true);
}} }}
> >
{t("jobs.actions.convert")} {t("jobs.actions.convert")}
</Button> </Button>
{/* Convert Job Modal */}
<Modal <Modal
open={open} open={open}
onCancel={handleModalClose} onCancel={handleModalClose}
closable={!(earlyRoCreatedThisSession && !job.converted)} // Only restrict if created in THIS session closable={!(earlyRoCreatedThisSession && !job.converted)}
maskClosable={!(earlyRoCreatedThisSession && !job.converted)} // Only restrict if created in THIS session maskClosable={!(earlyRoCreatedThisSession && !job.converted)}
title={t("jobs.actions.convert")} title={t("jobs.actions.convert")}
footer={null} footer={null}
width={700} width={700}
destroyOnHidden destroyOnHidden
> >
{/* Standard Convert Form */}
<Form <Form
layout="vertical" layout="vertical"
form={form} form={form}
preserve={false}
onFinish={handleConvert} onFinish={handleConvert}
initialValues={{ initialValues={{
driveable: true, driveable: true,
@@ -164,7 +211,6 @@ export function JobsConvertButton({ bodyshop, job, refetch, jobRO, insertAuditTr
referral_source_extra: job.referral_source_extra ?? "" referral_source_extra: job.referral_source_extra ?? ""
}} }}
> >
{/* Show Reynolds Early RO section at the top if applicable */}
{isReynoldsMode && !job.dms_id && !earlyRoCreated && ( {isReynoldsMode && !job.dms_id && !earlyRoCreated && (
<> <>
<RREarlyROForm <RREarlyROForm
@@ -181,127 +227,78 @@ export function JobsConvertButton({ bodyshop, job, refetch, jobRO, insertAuditTr
<Form.Item <Form.Item
name={["ins_co_nm"]} name={["ins_co_nm"]}
label={t("jobs.fields.ins_co_nm")} label={t("jobs.fields.ins_co_nm")}
rules={[ rules={[{ required: true }]}
{
required: true
//message: t("general.validation.required"),
}
]}
> >
<Select showSearch> <Select
{bodyshop.md_ins_cos.map((s, i) => ( showSearch={{
<Select.Option key={i} value={s.name}> optionFilterProp:'label'
{s.name} }}
</Select.Option> options={insuranceOptions}
))} />
</Select>
</Form.Item> </Form.Item>
{bodyshop.enforce_class && ( {bodyshop.enforce_class && (
<Form.Item <Form.Item name="class" label={t("jobs.fields.class")} rules={[{ required: bodyshop.enforce_class }]}>
name={"class"} <Select options={classOptions} />
label={t("jobs.fields.class")}
rules={[
{
required: bodyshop.enforce_class
//message: t("general.validation.required"),
}
]}
>
<Select>
{bodyshop.md_classes.map((s) => (
<Select.Option key={s} value={s}>
{s}
</Select.Option>
))}
</Select>
</Form.Item> </Form.Item>
)} )}
{bodyshop.enforce_referral && ( {bodyshop.enforce_referral && (
<> <>
<Form.Item <Form.Item
name={"referral_source"} name="referral_source"
label={t("jobs.fields.referralsource")} label={t("jobs.fields.referralsource")}
rules={[ rules={[{ required: bodyshop.enforce_referral }]}
{
required: bodyshop.enforce_referral
//message: t("general.validation.required"),
}
]}
> >
<Select> <Select options={referralOptions} />
{bodyshop.md_referral_sources.map((s) => (
<Select.Option key={s} value={s}>
{s}
</Select.Option>
))}
</Select>
</Form.Item> </Form.Item>
<Form.Item label={t("jobs.fields.referral_source_extra")} name="referral_source_extra"> <Form.Item label={t("jobs.fields.referral_source_extra")} name="referral_source_extra">
<Input /> <Input />
</Form.Item> </Form.Item>
</> </>
)} )}
{bodyshop.enforce_conversion_csr && ( {bodyshop.enforce_conversion_csr && (
<Form.Item <Form.Item
name={"employee_csr"} name="employee_csr"
label={t( label={t(
InstanceRenderManager({ InstanceRenderManager({
imex: "jobs.fields.employee_csr", imex: "jobs.fields.employee_csr",
rome: "jobs.fields.employee_csr_writer" rome: "jobs.fields.employee_csr_writer"
}) })
)} )}
rules={[ rules={[{ required: bodyshop.enforce_conversion_csr }]}
{
required: bodyshop.enforce_conversion_csr
//message: t("general.validation.required"),
}
]}
> >
<Select <Select
showSearch={{ showSearch={{
optionFilterProp: "children", optionFilterProp: 'label',
filterOption: (input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0 filterOption: (input, option) =>
(option?.label ?? "").toLowerCase().includes(input.toLowerCase())
}} }}
style={{ width: 200 }} style={{ width: 200 }}
>
{bodyshop.employees options={csrOptions}
.filter((emp) => emp.active) />
.map((emp) => (
<Select.Option value={emp.id} key={emp.id} name={`${emp.first_name} ${emp.last_name}`}>
{`${emp.first_name} ${emp.last_name}`}
</Select.Option>
))}
</Select>
</Form.Item> </Form.Item>
)} )}
{bodyshop.enforce_conversion_category && ( {bodyshop.enforce_conversion_category && (
<Form.Item <Form.Item name="category" label={t("jobs.fields.category")} rules={[{ required: bodyshop.enforce_conversion_category }]}>
name={"category"} <Select allowClear options={categoryOptions} />
label={t("jobs.fields.category")}
rules={[
{
required: bodyshop.enforce_conversion_category
//message: t("general.validation.required"),
}
]}
>
<Select allowClear>
{bodyshop.md_categories.map((s) => (
<Select.Option key={s} value={s}>
{s}
</Select.Option>
))}
</Select>
</Form.Item> </Form.Item>
)} )}
{bodyshop.region_config.toLowerCase().startsWith("ca") && ( {bodyshop.region_config.toLowerCase().startsWith("ca") && (
<Form.Item label={t("jobs.fields.ca_gst_registrant")} name="ca_gst_registrant" valuePropName="checked"> <Form.Item label={t("jobs.fields.ca_gst_registrant")} name="ca_gst_registrant" valuePropName="checked">
<Switch /> <Switch />
</Form.Item> </Form.Item>
)} )}
<Form.Item label={t("jobs.fields.driveable")} name="driveable" valuePropName="checked"> <Form.Item label={t("jobs.fields.driveable")} name="driveable" valuePropName="checked">
<Switch /> <Switch />
</Form.Item> </Form.Item>
<Form.Item label={t("jobs.fields.towin")} name="towin" valuePropName="checked"> <Form.Item label={t("jobs.fields.towin")} name="towin" valuePropName="checked">
<Switch /> <Switch />
</Form.Item> </Form.Item>
@@ -316,6 +313,7 @@ export function JobsConvertButton({ bodyshop, job, refetch, jobRO, insertAuditTr
> >
{t("jobs.actions.convert")} {t("jobs.actions.convert")}
</Button> </Button>
<Button onClick={handleModalClose} disabled={earlyRoCreatedThisSession && !job.converted}> <Button onClick={handleModalClose} disabled={earlyRoCreatedThisSession && !job.converted}>
{t("general.actions.close")} {t("general.actions.close")}
</Button> </Button>

View File

@@ -60,13 +60,13 @@ export function JobsCreateJobsInfo({ bodyshop, form, selected }) {
<Input /> <Input />
</Form.Item> </Form.Item>
<Form.Item label={t("jobs.fields.ins_co_nm")} name="ins_co_nm"> <Form.Item label={t("jobs.fields.ins_co_nm")} name="ins_co_nm">
<Select onChange={handleInsCoChange}> <Select
{bodyshop.md_ins_cos.map((s) => ( onChange={handleInsCoChange}
<Select.Option key={s.name} value={s.name}> options={bodyshop.md_ins_cos.map((s) => ({
{s.name} value: s.name,
</Select.Option> label: s.name
))} }))}
</Select> />
</Form.Item> </Form.Item>
<Form.Item label={t("jobs.fields.ins_addr1")} name="ins_addr1"> <Form.Item label={t("jobs.fields.ins_addr1")} name="ins_addr1">
<Input /> <Input />
@@ -192,13 +192,12 @@ export function JobsCreateJobsInfo({ bodyshop, form, selected }) {
<Input /> <Input />
</Form.Item> </Form.Item>
<Form.Item label={t("jobs.fields.referralsource")} name="referral_source"> <Form.Item label={t("jobs.fields.referralsource")} name="referral_source">
<Select> <Select
{bodyshop.md_referral_sources.map((s) => ( options={bodyshop.md_referral_sources.map((s) => ({
<Select.Option key={s} value={s}> value: s,
{s} label: s
</Select.Option> }))}
))} />
</Select>
</Form.Item> </Form.Item>
<Form.Item label={t("jobs.fields.referral_source_extra")} name="referral_source_extra"> <Form.Item label={t("jobs.fields.referral_source_extra")} name="referral_source_extra">
<Input /> <Input />
@@ -221,10 +220,13 @@ export function JobsCreateJobsInfo({ bodyshop, form, selected }) {
<CurrencyInput min={0} /> <CurrencyInput min={0} />
</Form.Item> </Form.Item>
<Form.Item label={t("jobs.fields.ded_status")} name="ded_status"> <Form.Item label={t("jobs.fields.ded_status")} name="ded_status">
<Select allowClear> <Select
<Select.Option value="W">{t("jobs.labels.deductible.waived")}</Select.Option> allowClear
<Select.Option value="Y">{t("jobs.labels.deductible.stands")}</Select.Option> options={[
</Select> { value: "W", label: t("jobs.labels.deductible.waived") },
{ value: "Y", label: t("jobs.labels.deductible.stands") }
]}
/>
</Form.Item> </Form.Item>
<Form.Item label={t("jobs.fields.depreciation_taxes")} name="depreciation_taxes"> <Form.Item label={t("jobs.fields.depreciation_taxes")} name="depreciation_taxes">
<CurrencyInput /> <CurrencyInput />

View File

@@ -43,20 +43,19 @@ export function JobsDetailGeneral({ bodyshop, jobRO, job, form }) {
<Input disabled={jobRO} /> <Input disabled={jobRO} />
</Form.Item> </Form.Item>
<Form.Item label={t("jobs.fields.ded_status")} name="ded_status"> <Form.Item label={t("jobs.fields.ded_status")} name="ded_status">
<Select disabled={jobRO}> <Select disabled={jobRO} options={[
<Select.Option value="W">{t("jobs.labels.deductible.waived")}</Select.Option> { value: "W", label: t("jobs.labels.deductible.waived") },
<Select.Option value="Y">{t("jobs.labels.deductible.stands")}</Select.Option> { value: "Y", label: t("jobs.labels.deductible.stands") }
</Select> ]} />
</Form.Item> </Form.Item>
<Form.Item label={t("jobs.fields.ded_amt")} name="ded_amt"> <Form.Item label={t("jobs.fields.ded_amt")} name="ded_amt">
<CurrencyInput disabled={jobRO} min={0} /> <CurrencyInput disabled={jobRO} min={0} />
</Form.Item> </Form.Item>
<Form.Item label={t("jobs.fields.ded_note")} name="ded_note"> <Form.Item label={t("jobs.fields.ded_note")} name="ded_note">
<Select disabled={jobRO}> <Select disabled={jobRO} options={bodyshop.md_ded_notes.map((n) => ({
{bodyshop.md_ded_notes.map((n, index) => ( value: n,
<Select.Option key={index}>{n}</Select.Option> label: n
))} }))} />
</Select>
</Form.Item> </Form.Item>
<Form.Item label={t("jobs.fields.policy_no")} name="policy_no"> <Form.Item label={t("jobs.fields.policy_no")} name="policy_no">
<Input disabled={jobRO} /> <Input disabled={jobRO} />
@@ -66,13 +65,10 @@ export function JobsDetailGeneral({ bodyshop, jobRO, job, form }) {
</Form.Item> </Form.Item>
<Form.Item label={t("jobs.fields.ins_co_nm")} name="ins_co_nm"> <Form.Item label={t("jobs.fields.ins_co_nm")} name="ins_co_nm">
<Select disabled={jobRO} onChange={handleInsCoChange}> <Select disabled={jobRO} onChange={handleInsCoChange} options={bodyshop.md_ins_cos.map((s) => ({
{bodyshop.md_ins_cos.map((s) => ( value: s.name,
<Select.Option key={s.name} value={s.name}> label: s.name
{s.name} }))} />
</Select.Option>
))}
</Select>
</Form.Item> </Form.Item>
<Form.Item label={t("jobs.fields.ins_addr1")} name="ins_addr1"> <Form.Item label={t("jobs.fields.ins_addr1")} name="ins_addr1">
<Input disabled={jobRO} /> <Input disabled={jobRO} />
@@ -123,25 +119,19 @@ export function JobsDetailGeneral({ bodyshop, jobRO, job, form }) {
} }
]} ]}
> >
<Select disabled={jobRO} allowClear> <Select disabled={jobRO} allowClear options={bodyshop.md_referral_sources.map((s) => ({
{bodyshop.md_referral_sources.map((s) => ( value: s,
<Select.Option key={s} value={s}> label: s
{s} }))} />
</Select.Option>
))}
</Select>
</Form.Item> </Form.Item>
<Form.Item label={t("jobs.fields.referral_source_extra")} name="referral_source_extra"> <Form.Item label={t("jobs.fields.referral_source_extra")} name="referral_source_extra">
<Input disabled={jobRO} /> <Input disabled={jobRO} />
</Form.Item> </Form.Item>
<Form.Item label={t("jobs.fields.alt_transport")} name="alt_transport"> <Form.Item label={t("jobs.fields.alt_transport")} name="alt_transport">
<Select disabled={jobRO} allowClear> <Select disabled={jobRO} allowClear options={bodyshop.appt_alt_transport.map((s) => ({
{bodyshop.appt_alt_transport.map((s) => ( value: s,
<Select.Option key={s} value={s}> label: s
{s} }))} />
</Select.Option>
))}
</Select>
</Form.Item> </Form.Item>
</FormRow> </FormRow>
<Row gutter={[16, 16]}> <Row gutter={[16, 16]}>
@@ -243,13 +233,10 @@ export function JobsDetailGeneral({ bodyshop, jobRO, job, form }) {
</FormRow> </FormRow>
<FormRow header={t("jobs.forms.other")}> <FormRow header={t("jobs.forms.other")}>
<Form.Item label={t("jobs.fields.category")} name="category"> <Form.Item label={t("jobs.fields.category")} name="category">
<Select disabled={jobRO} allowClear> <Select disabled={jobRO} allowClear options={bodyshop.md_categories.map((s) => ({
{bodyshop.md_categories.map((s) => ( value: s,
<Select.Option key={s} value={s}> label: s
{s} }))} />
</Select.Option>
))}
</Select>
</Form.Item> </Form.Item>
<Form.Item label={t("jobs.fields.selling_dealer")} name="selling_dealer"> <Form.Item label={t("jobs.fields.selling_dealer")} name="selling_dealer">
<Input disabled={jobRO} /> <Input disabled={jobRO} />

View File

@@ -714,13 +714,12 @@ export function JobsDetailHeaderActions({
<FormDateTimePickerComponent /> <FormDateTimePickerComponent />
</Form.Item> </Form.Item>
<Form.Item label={t("appointments.fields.color")} name="color"> <Form.Item label={t("appointments.fields.color")} name="color">
<Select> <Select
{bodyshop.appt_colors.map((col, idx) => ( options={bodyshop.appt_colors.map((col) => ({
<Select.Option key={idx} value={col.color.hex}> value: col.color.hex,
{col.label} label: col.label
</Select.Option> }))}
))} />
</Select>
</Form.Item> </Form.Item>
<Space wrap> <Space wrap>

View File

@@ -94,22 +94,26 @@ export function LaborAllocationsAdjustmentEdit({
} }
]} ]}
> >
<Select allowClear disabled={!!mod_lbr_ty}> <Select
<Select.Option value="LAA">{t("joblines.fields.lbr_types.LAA")}</Select.Option> allowClear
<Select.Option value="LAB">{t("joblines.fields.lbr_types.LAB")}</Select.Option> disabled={!!mod_lbr_ty}
<Select.Option value="LAD">{t("joblines.fields.lbr_types.LAD")}</Select.Option> options={[
<Select.Option value="LAE">{t("joblines.fields.lbr_types.LAE")}</Select.Option> { value: "LAA", label: t("joblines.fields.lbr_types.LAA") },
<Select.Option value="LAF">{t("joblines.fields.lbr_types.LAF")}</Select.Option> { value: "LAB", label: t("joblines.fields.lbr_types.LAB") },
<Select.Option value="LAG">{t("joblines.fields.lbr_types.LAG")}</Select.Option> { value: "LAD", label: t("joblines.fields.lbr_types.LAD") },
<Select.Option value="LAM">{t("joblines.fields.lbr_types.LAM")}</Select.Option> { value: "LAE", label: t("joblines.fields.lbr_types.LAE") },
<Select.Option value="LAR">{t("joblines.fields.lbr_types.LAR")}</Select.Option> { value: "LAF", label: t("joblines.fields.lbr_types.LAF") },
<Select.Option value="LAS">{t("joblines.fields.lbr_types.LAS")}</Select.Option> { value: "LAG", label: t("joblines.fields.lbr_types.LAG") },
<Select.Option value="LAU">{t("joblines.fields.lbr_types.LAU")}</Select.Option> { value: "LAM", label: t("joblines.fields.lbr_types.LAM") },
<Select.Option value="LA1">{t("joblines.fields.lbr_types.LA1")}</Select.Option> { value: "LAR", label: t("joblines.fields.lbr_types.LAR") },
<Select.Option value="LA2">{t("joblines.fields.lbr_types.LA2")}</Select.Option> { value: "LAS", label: t("joblines.fields.lbr_types.LAS") },
<Select.Option value="LA3">{t("joblines.fields.lbr_types.LA3")}</Select.Option> { value: "LAU", label: t("joblines.fields.lbr_types.LAU") },
<Select.Option value="LA4">{t("joblines.fields.lbr_types.LA4")}</Select.Option> { value: "LA1", label: t("joblines.fields.lbr_types.LA1") },
</Select> { value: "LA2", label: t("joblines.fields.lbr_types.LA2") },
{ value: "LA3", label: t("joblines.fields.lbr_types.LA3") },
{ value: "LA4", label: t("joblines.fields.lbr_types.LA4") }
]}
/>
</Form.Item> </Form.Item>
<Form.Item <Form.Item
label={t("jobs.fields.adjustmenthours")} label={t("jobs.fields.adjustmenthours")}

View File

@@ -7,8 +7,6 @@ import { SEARCH_OWNERS_BY_ID_FOR_AUTOCOMPLETE, SEARCH_OWNERS_FOR_AUTOCOMPLETE }
import AlertComponent from "../alert/alert.component"; import AlertComponent from "../alert/alert.component";
import { OwnerNameDisplayFunction } from "../owner-name-display/owner-name-display.component"; import { OwnerNameDisplayFunction } from "../owner-name-display/owner-name-display.component";
const { Option } = Select;
const OwnerSearchSelect = ({ value, onChange, onBlur, disabled, ref }) => { const OwnerSearchSelect = ({ value, onChange, onBlur, disabled, ref }) => {
const [callSearch, { loading, error, data }] = useLazyQuery(SEARCH_OWNERS_FOR_AUTOCOMPLETE); const [callSearch, { loading, error, data }] = useLazyQuery(SEARCH_OWNERS_FOR_AUTOCOMPLETE);
@@ -71,15 +69,12 @@ const OwnerSearchSelect = ({ value, onChange, onBlur, disabled, ref }) => {
onSelect={handleSelect} onSelect={handleSelect}
notFoundContent={loading ? <LoadingOutlined /> : <Empty />} notFoundContent={loading ? <LoadingOutlined /> : <Empty />}
onBlur={onBlur} onBlur={onBlur}
> options={theOptions?.map((o) => ({
{theOptions key: o.id,
? theOptions.map((o) => ( value: o.id,
<Option key={o.id} value={o.id}> label: `${OwnerNameDisplayFunction(o)} | ${o.ownr_addr1 || ""} `
{`${OwnerNameDisplayFunction(o)} | ${o.ownr_addr1 || ""} `} }))}
</Option> />
))
: null}
</Select>
{idLoading || loading ? <LoadingOutlined /> : null} {idLoading || loading ? <LoadingOutlined /> : null}
{error ? <AlertComponent title={error.message} type="error" /> : null} {error ? <AlertComponent title={error.message} type="error" /> : null}
{idError ? <AlertComponent title={idError.message} type="error" /> : null} {idError ? <AlertComponent title={idError.message} type="error" /> : null}

View File

@@ -158,19 +158,21 @@ export function PartsOrderModalComponent({
key={`${index}part_type`} key={`${index}part_type`}
name={[field.name, "part_type"]} name={[field.name, "part_type"]}
> >
<Select disabled={!(sendType === "oec" && OEConnection_PriceChange.treatment === "on")}> <Select
<Select.Option value="PAA">{t("joblines.fields.part_types.PAA")}</Select.Option> disabled={!(sendType === "oec" && OEConnection_PriceChange.treatment === "on")}
<Select.Option value="PAC">{t("joblines.fields.part_types.PAC")}</Select.Option> options={[
{ value: "PAA", label: t("joblines.fields.part_types.PAA") },
<Select.Option value="PAL">{t("joblines.fields.part_types.PAL")}</Select.Option> { value: "PAC", label: t("joblines.fields.part_types.PAC") },
<Select.Option value="PAG">{t("joblines.fields.part_types.PAG")}</Select.Option> { value: "PAL", label: t("joblines.fields.part_types.PAL") },
<Select.Option value="PAM">{t("joblines.fields.part_types.PAM")}</Select.Option> { value: "PAG", label: t("joblines.fields.part_types.PAG") },
<Select.Option value="PAP">{t("joblines.fields.part_types.PAP")}</Select.Option> { value: "PAM", label: t("joblines.fields.part_types.PAM") },
<Select.Option value="PAN">{t("joblines.fields.part_types.PAN")}</Select.Option> { value: "PAP", label: t("joblines.fields.part_types.PAP") },
<Select.Option value="PAO">{t("joblines.fields.part_types.PAO")}</Select.Option> { value: "PAN", label: t("joblines.fields.part_types.PAN") },
<Select.Option value="PAR">{t("joblines.fields.part_types.PAR")}</Select.Option> { value: "PAO", label: t("joblines.fields.part_types.PAO") },
<Select.Option value="PAS">{t("joblines.fields.part_types.PAS")}</Select.Option> { value: "PAR", label: t("joblines.fields.part_types.PAR") },
</Select> { value: "PAS", label: t("joblines.fields.part_types.PAS") }
]}
/>
</Form.Item> </Form.Item>
<Form.Item <Form.Item
label={t("parts_orders.fields.oem_partno")} label={t("parts_orders.fields.oem_partno")}

View File

@@ -29,13 +29,12 @@ export function PartsReceiveModalComponent({ bodyshop, form }) {
}) })
}); });
}} }}
> options={bodyshop.md_parts_locations.map((loc, idx) => ({
{bodyshop.md_parts_locations.map((loc, idx) => ( key: idx,
<Select.Option key={idx} value={loc}> value: loc,
{loc} label: loc
</Select.Option> }))}
))} />
</Select>
</Form.Item> </Form.Item>
</LayoutFormRow> </LayoutFormRow>
<Typography.Title level={4}>{t("parts_orders.labels.inthisorder")}</Typography.Title> <Typography.Title level={4}>{t("parts_orders.labels.inthisorder")}</Typography.Title>
@@ -85,13 +84,14 @@ export function PartsReceiveModalComponent({ bodyshop, form }) {
key={`${index}location`} key={`${index}location`}
name={[field.name, "location"]} name={[field.name, "location"]}
> >
<Select style={{ width: "10rem" }}> <Select
{bodyshop.md_parts_locations.map((loc, idx) => ( style={{ width: "10rem" }}
<Select.Option key={idx} value={loc}> options={bodyshop.md_parts_locations.map((loc, idx) => ({
{loc} key: idx,
</Select.Option> value: loc,
))} label: loc
</Select> }))}
/>
</Form.Item> </Form.Item>
<Form.Item <Form.Item
label={t("parts_orders.fields.quantity")} label={t("parts_orders.fields.quantity")}

View File

@@ -2,8 +2,6 @@ import { Button, Card, Divider, Form, Input, Select, Space } from "antd";
import { DeleteOutlined, PlusOutlined } from "@ant-design/icons"; import { DeleteOutlined, PlusOutlined } from "@ant-design/icons";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
const { Option } = Select;
export default function PartsShopInfoEmailPresets() { export default function PartsShopInfoEmailPresets() {
const { t } = useTranslation(); const { t } = useTranslation();
@@ -26,13 +24,7 @@ export default function PartsShopInfoEmailPresets() {
label={t("bodyshop.labels.email_type")} label={t("bodyshop.labels.email_type")}
rules={[{ required: true, message: t("bodyshop.errors.email_type_required") }]} rules={[{ required: true, message: t("bodyshop.errors.email_type_required") }]}
> >
<Select placeholder={t("bodyshop.placeholders.select_email_type")}> <Select placeholder={t("bodyshop.placeholders.select_email_type")} options={emailTypes} />
{emailTypes.map((type) => (
<Option key={type.value} value={type.value}>
{type.label}
</Option>
))}
</Select>
</Form.Item> </Form.Item>
<Form.Item <Form.Item
{...restField} {...restField}

View File

@@ -91,20 +91,25 @@ export function PaymentFormComponent({ form, bodyshop, disabled }) {
} }
]} ]}
> >
<Select disabled={disabled}> <Select disabled={disabled}
<Select.Option value={t("payments.labels.customer")}>{t("payments.labels.customer")}</Select.Option> options={Qb_Multi_Ar.treatment === "on"
{Qb_Multi_Ar.treatment === "on" ? ( ? [
<Select.OptGroup label={t("payments.labels.external")}> { value: t("payments.labels.customer"), label: t("payments.labels.customer") },
{bodyshop.md_ins_cos.map((i, idx) => ( {
<Select.Option key={idx} value={i.name}> label: t("payments.labels.external"),
{i.name} options: bodyshop.md_ins_cos.map((i, idx) => ({
</Select.Option> key: idx,
))} value: i.name,
</Select.OptGroup> label: i.name
) : ( }))
<Select.Option value={t("payments.labels.insurance")}>{t("payments.labels.insurance")}</Select.Option> }
)} ]
</Select> : [
{ value: t("payments.labels.customer"), label: t("payments.labels.customer") },
{ value: t("payments.labels.insurance"), label: t("payments.labels.insurance") }
]
}
/>
</Form.Item> </Form.Item>
<Form.Item <Form.Item
@@ -117,13 +122,13 @@ export function PaymentFormComponent({ form, bodyshop, disabled }) {
} }
]} ]}
> >
<Select disabled={disabled}> <Select disabled={disabled}
{bodyshop.md_payment_types.map((v, idx) => ( options={bodyshop.md_payment_types.map((v, idx) => ({
<Select.Option key={idx} value={v}> key: idx,
{v} value: v,
</Select.Option> label: v
))} }))}
</Select> />
</Form.Item> </Form.Item>
</LayoutFormRow> </LayoutFormRow>
<LayoutFormRow grow> <LayoutFormRow grow>

View File

@@ -453,10 +453,10 @@ export function ProductionListConfigManager({
}} }}
onSelect={handleSelect} onSelect={handleSelect}
placeholder={t("production.labels.selectview")} placeholder={t("production.labels.selectview")}
optionLabelProp="label"
popupMatchSelectWidth={false} popupMatchSelectWidth={false}
value={activeView} value={activeView}
disabled={open || isAddingNewProfile} // Disable the Select box when the popover is open or adding a new profile disabled={open || isAddingNewProfile} // Disable the Select box when the popover is open or adding a new profile
optionLabelProp="label"
> >
{bodyshop?.production_config && {bodyshop?.production_config &&
bodyshop.production_config bodyshop.production_config

View File

@@ -158,20 +158,28 @@ export function ScheduleJobModalComponent({
</LayoutFormRow> </LayoutFormRow>
<LayoutFormRow grow> <LayoutFormRow grow>
<Form.Item name="color" label={t("appointments.fields.color")}> <Form.Item name="color" label={t("appointments.fields.color")}>
<Select allowClear> <Select
{bodyshop.appt_colors && allowClear
bodyshop.appt_colors.map((color) => ( options={
<Select.Option style={{ color: color.color.hex }} key={color.color.hex} value={color.color.hex}> bodyshop.appt_colors &&
{color.label} bodyshop.appt_colors.map((color) => ({
</Select.Option> value: color.color.hex,
))} label: color.label
</Select> }))
}
/>
</Form.Item> </Form.Item>
<Form.Item name={"alt_transport"} label={t("jobs.fields.alt_transport")}> <Form.Item name={"alt_transport"} label={t("jobs.fields.alt_transport")}>
<Select allowClear> <Select
{bodyshop.appt_alt_transport && allowClear
bodyshop.appt_alt_transport.map((alt) => <Select.Option key={alt}>{alt}</Select.Option>)} options={
</Select> bodyshop.appt_alt_transport &&
bodyshop.appt_alt_transport.map((alt) => ({
value: alt,
label: alt
}))
}
/>
</Form.Item> </Form.Item>
<Form.Item name={"note"} label={t("appointments.fields.note")}> <Form.Item name={"note"} label={t("appointments.fields.note")}>
<Input /> <Input />

View File

@@ -120,13 +120,12 @@ export function ScheduleManualEvent({ bodyshop, event }) {
<FormDateTimePickerComponent /> <FormDateTimePickerComponent />
</Form.Item> </Form.Item>
<Form.Item label={t("appointments.fields.color")} name="color"> <Form.Item label={t("appointments.fields.color")} name="color">
<Select> <Select
{bodyshop.appt_colors.map((col, idx) => ( options={bodyshop.appt_colors.map((col) => ({
<Select.Option key={idx} value={col.color.hex}> value: col.color.hex,
{col.label} label: col.label
</Select.Option> }))}
))} />
</Select>
</Form.Item> </Form.Item>
<Space wrap> <Space wrap>

View File

@@ -325,22 +325,20 @@ export function ShopEmployeesFormComponent({ bodyshop }) {
} }
]} ]}
> >
<Select> <Select
<Select.Option key={"shift"} value="timetickets.labels.shift"> options={[
{t("timetickets.labels.shift")} { value: "timetickets.labels.shift", label: t("timetickets.labels.shift") },
</Select.Option> ...(bodyshop.cdk_dealerid ||
bodyshop.pbs_serialnumber ||
{bodyshop.cdk_dealerid || bodyshop.rr_dealerid ||
bodyshop.pbs_serialnumber || Enhanced_Payroll.treatment === "on"
bodyshop.rr_dealerid || ? CiecaSelect(false, true)
Enhanced_Payroll.treatment === "on" : bodyshop.md_responsibility_centers.costs.map((c) => ({
? CiecaSelect(false, true) value: c.name,
: bodyshop.md_responsibility_centers.costs.map((c) => ( label: c.name
<Select.Option key={c.name} value={c.name}> })))
{c.name} ]}
</Select.Option> />
))}
</Select>
</Form.Item> </Form.Item>
<Form.Item <Form.Item
label={t("employees.fields.rate")} label={t("employees.fields.rate")}

View File

@@ -1039,22 +1039,25 @@ export function ShopInfoGeneral({ form }) {
key={`${index}mod_lbr_ty`} key={`${index}mod_lbr_ty`}
name={[field.name, "mod_lbr_ty"]} name={[field.name, "mod_lbr_ty"]}
> >
<Select allowClear> <Select
<Select.Option value="LAA">{t("joblines.fields.lbr_types.LAA")}</Select.Option> allowClear
<Select.Option value="LAB">{t("joblines.fields.lbr_types.LAB")}</Select.Option> options={[
<Select.Option value="LAD">{t("joblines.fields.lbr_types.LAD")}</Select.Option> { value: "LAA", label: t("joblines.fields.lbr_types.LAA") },
<Select.Option value="LAE">{t("joblines.fields.lbr_types.LAE")}</Select.Option> { value: "LAB", label: t("joblines.fields.lbr_types.LAB") },
<Select.Option value="LAF">{t("joblines.fields.lbr_types.LAF")}</Select.Option> { value: "LAD", label: t("joblines.fields.lbr_types.LAD") },
<Select.Option value="LAG">{t("joblines.fields.lbr_types.LAG")}</Select.Option> { value: "LAE", label: t("joblines.fields.lbr_types.LAE") },
<Select.Option value="LAM">{t("joblines.fields.lbr_types.LAM")}</Select.Option> { value: "LAF", label: t("joblines.fields.lbr_types.LAF") },
<Select.Option value="LAR">{t("joblines.fields.lbr_types.LAR")}</Select.Option> { value: "LAG", label: t("joblines.fields.lbr_types.LAG") },
<Select.Option value="LAS">{t("joblines.fields.lbr_types.LAS")}</Select.Option> { value: "LAM", label: t("joblines.fields.lbr_types.LAM") },
<Select.Option value="LAU">{t("joblines.fields.lbr_types.LAU")}</Select.Option> { value: "LAR", label: t("joblines.fields.lbr_types.LAR") },
<Select.Option value="LA1">{t("joblines.fields.lbr_types.LA1")}</Select.Option> { value: "LAS", label: t("joblines.fields.lbr_types.LAS") },
<Select.Option value="LA2">{t("joblines.fields.lbr_types.LA2")}</Select.Option> { value: "LAU", label: t("joblines.fields.lbr_types.LAU") },
<Select.Option value="LA3">{t("joblines.fields.lbr_types.LA3")}</Select.Option> { value: "LA1", label: t("joblines.fields.lbr_types.LA1") },
<Select.Option value="LA4">{t("joblines.fields.lbr_types.LA4")}</Select.Option> { value: "LA2", label: t("joblines.fields.lbr_types.LA2") },
</Select> { value: "LA3", label: t("joblines.fields.lbr_types.LA3") },
{ value: "LA4", label: t("joblines.fields.lbr_types.LA4") }
]}
/>
</Form.Item> </Form.Item>
<Form.Item <Form.Item
label={t("joblines.fields.mod_lb_hrs")} label={t("joblines.fields.mod_lb_hrs")}
@@ -1068,17 +1071,20 @@ export function ShopInfoGeneral({ form }) {
key={`${index}part_type`} key={`${index}part_type`}
name={[field.name, "part_type"]} name={[field.name, "part_type"]}
> >
<Select allowClear> <Select
<Select.Option value="PAA">{t("joblines.fields.part_types.PAA")}</Select.Option> allowClear
<Select.Option value="PAC">{t("joblines.fields.part_types.PAC")}</Select.Option> options={[
<Select.Option value="PAE">{t("joblines.fields.part_types.PAE")}</Select.Option> { value: "PAA", label: t("joblines.fields.part_types.PAA") },
<Select.Option value="PAL">{t("joblines.fields.part_types.PAL")}</Select.Option> { value: "PAC", label: t("joblines.fields.part_types.PAC") },
<Select.Option value="PAM">{t("joblines.fields.part_types.PAM")}</Select.Option> { value: "PAE", label: t("joblines.fields.part_types.PAE") },
<Select.Option value="PAN">{t("joblines.fields.part_types.PAN")}</Select.Option> { value: "PAL", label: t("joblines.fields.part_types.PAL") },
<Select.Option value="PAO">{t("joblines.fields.part_types.PAO")}</Select.Option> { value: "PAM", label: t("joblines.fields.part_types.PAM") },
<Select.Option value="PAR">{t("joblines.fields.part_types.PAR")}</Select.Option> { value: "PAN", label: t("joblines.fields.part_types.PAN") },
<Select.Option value="PAS">{t("joblines.fields.part_types.PAS")}</Select.Option> { value: "PAO", label: t("joblines.fields.part_types.PAO") },
</Select> { value: "PAR", label: t("joblines.fields.part_types.PAR") },
{ value: "PAS", label: t("joblines.fields.part_types.PAS") }
]}
/>
</Form.Item> </Form.Item>
<Form.Item <Form.Item
label={t("joblines.fields.oem_partno")} label={t("joblines.fields.oem_partno")}

View File

@@ -51,13 +51,7 @@ export default function ShopInfoIntakeChecklistComponent({ form }) {
} }
]} ]}
> >
<Select> <Select options={Object.keys(ConfigFormTypes).map((i) => ({ value: i, label: i }))} />
{Object.keys(ConfigFormTypes).map((i) => (
<Select.Option key={i} value={i}>
{i}
</Select.Option>
))}
</Select>
</Form.Item> </Form.Item>
<Form.Item <Form.Item
label={t("jobs.fields.intake.label")} label={t("jobs.fields.intake.label")}
@@ -156,13 +150,13 @@ export default function ShopInfoIntakeChecklistComponent({ form }) {
} }
]} ]}
> >
<Select mode="multiple"> <Select
{Object.keys(TemplateListGenerated).map((i) => ( mode="multiple"
<Select.Option key={TemplateListGenerated[i].key} value={TemplateListGenerated[i].key}> options={Object.keys(TemplateListGenerated).map((i) => ({
{TemplateListGenerated[i].title} value: TemplateListGenerated[i].key,
</Select.Option> label: TemplateListGenerated[i].title
))} }))}
</Select> />
</Form.Item> </Form.Item>
<Form.Item <Form.Item
name={["intakechecklist", "next_contact_hours"]} name={["intakechecklist", "next_contact_hours"]}
@@ -205,13 +199,7 @@ export default function ShopInfoIntakeChecklistComponent({ form }) {
} }
]} ]}
> >
<Select> <Select options={Object.keys(ConfigFormTypes).map((i) => ({ value: i, label: i }))} />
{Object.keys(ConfigFormTypes).map((i) => (
<Select.Option key={i} value={i}>
{i}
</Select.Option>
))}
</Select>
</Form.Item> </Form.Item>
<Form.Item <Form.Item
@@ -310,13 +298,13 @@ export default function ShopInfoIntakeChecklistComponent({ form }) {
} }
]} ]}
> >
<Select mode="multiple"> <Select
{Object.keys(TemplateListGenerated).map((i) => ( mode="multiple"
<Select.Option key={TemplateListGenerated[i].key} value={TemplateListGenerated[i].key}> options={Object.keys(TemplateListGenerated).map((i) => ({
{TemplateListGenerated[i].title} value: TemplateListGenerated[i].key,
</Select.Option> label: TemplateListGenerated[i].title
))} }))}
</Select> />
</Form.Item> </Form.Item>
<Form.Item <Form.Item
name={["deliverchecklist", "actual_delivery"]} name={["deliverchecklist", "actual_delivery"]}

View File

@@ -80,13 +80,7 @@ export function ShopInfoROStatusComponent({ bodyshop, form }) {
} }
]} ]}
> >
<Select mode="multiple"> <Select mode="multiple" options={options.map((item) => ({ value: item, label: item }))} />
{options.map((item, idx) => (
<Select.Option key={idx} value={item}>
{item}
</Select.Option>
))}
</Select>
</Form.Item> </Form.Item>
<Form.Item <Form.Item
name={["md_ro_statuses", "pre_production_statuses"]} name={["md_ro_statuses", "pre_production_statuses"]}
@@ -99,13 +93,7 @@ export function ShopInfoROStatusComponent({ bodyshop, form }) {
} }
]} ]}
> >
<Select mode="multiple"> <Select mode="multiple" options={options.map((item) => ({ value: item, label: item }))} />
{options.map((item, idx) => (
<Select.Option key={idx} value={item}>
{item}
</Select.Option>
))}
</Select>
</Form.Item> </Form.Item>
<Form.Item <Form.Item
name={["md_ro_statuses", "production_statuses"]} name={["md_ro_statuses", "production_statuses"]}
@@ -118,13 +106,7 @@ export function ShopInfoROStatusComponent({ bodyshop, form }) {
} }
]} ]}
> >
<Select mode="multiple"> <Select mode="multiple" options={options.map((item) => ({ value: item, label: item }))} />
{options.map((item, idx) => (
<Select.Option key={idx} value={item}>
{item}
</Select.Option>
))}
</Select>
</Form.Item> </Form.Item>
<Form.Item <Form.Item
name={["md_ro_statuses", "post_production_statuses"]} name={["md_ro_statuses", "post_production_statuses"]}
@@ -137,13 +119,7 @@ export function ShopInfoROStatusComponent({ bodyshop, form }) {
} }
]} ]}
> >
<Select mode="multiple"> <Select mode="multiple" options={options.map((item) => ({ value: item, label: item }))} />
{options.map((item, idx) => (
<Select.Option key={idx} value={item}>
{item}
</Select.Option>
))}
</Select>
</Form.Item> </Form.Item>
<Form.Item <Form.Item
name={["md_ro_statuses", "ready_statuses"]} name={["md_ro_statuses", "ready_statuses"]}
@@ -156,13 +132,7 @@ export function ShopInfoROStatusComponent({ bodyshop, form }) {
} }
]} ]}
> >
<Select mode="multiple"> <Select mode="multiple" options={options.map((item) => ({ value: item, label: item }))} />
{options.map((item, idx) => (
<Select.Option key={idx} value={item}>
{item}
</Select.Option>
))}
</Select>
</Form.Item> </Form.Item>
<Form.Item <Form.Item
name={["md_ro_statuses", "additional_board_statuses"]} name={["md_ro_statuses", "additional_board_statuses"]}
@@ -175,13 +145,7 @@ export function ShopInfoROStatusComponent({ bodyshop, form }) {
} }
]} ]}
> >
<Select mode="multiple"> <Select mode="multiple" options={options.map((item) => ({ value: item, label: item }))} />
{options.map((item, idx) => (
<Select.Option key={idx} value={item}>
{item}
</Select.Option>
))}
</Select>
</Form.Item> </Form.Item>
<LayoutFormRow noDivider> <LayoutFormRow noDivider>
<Form.Item <Form.Item
@@ -194,13 +158,7 @@ export function ShopInfoROStatusComponent({ bodyshop, form }) {
]} ]}
name={["md_ro_statuses", "default_scheduled"]} name={["md_ro_statuses", "default_scheduled"]}
> >
<Select> <Select options={options.map((item) => ({ value: item, label: item }))} />
{options.map((item, idx) => (
<Select.Option key={idx} value={item}>
{item}
</Select.Option>
))}
</Select>
</Form.Item> </Form.Item>
<Form.Item <Form.Item
label={t("bodyshop.fields.statuses.default_arrived")} label={t("bodyshop.fields.statuses.default_arrived")}
@@ -212,13 +170,7 @@ export function ShopInfoROStatusComponent({ bodyshop, form }) {
]} ]}
name={["md_ro_statuses", "default_arrived"]} name={["md_ro_statuses", "default_arrived"]}
> >
<Select> <Select options={options.map((item) => ({ value: item, label: item }))} />
{options.map((item, idx) => (
<Select.Option key={idx} value={item}>
{item}
</Select.Option>
))}
</Select>
</Form.Item> </Form.Item>
<Form.Item <Form.Item
label={t("bodyshop.fields.statuses.default_exported")} label={t("bodyshop.fields.statuses.default_exported")}
@@ -230,13 +182,7 @@ export function ShopInfoROStatusComponent({ bodyshop, form }) {
]} ]}
name={["md_ro_statuses", "default_exported"]} name={["md_ro_statuses", "default_exported"]}
> >
<Select> <Select options={options.map((item) => ({ value: item, label: item }))} />
{options.map((item, idx) => (
<Select.Option key={idx} value={item}>
{item}
</Select.Option>
))}
</Select>
</Form.Item> </Form.Item>
<Form.Item <Form.Item
label={t("bodyshop.fields.statuses.default_imported")} label={t("bodyshop.fields.statuses.default_imported")}
@@ -248,13 +194,7 @@ export function ShopInfoROStatusComponent({ bodyshop, form }) {
]} ]}
name={["md_ro_statuses", "default_imported"]} name={["md_ro_statuses", "default_imported"]}
> >
<Select> <Select options={options.map((item) => ({ value: item, label: item }))} />
{options.map((item, idx) => (
<Select.Option key={idx} value={item}>
{item}
</Select.Option>
))}
</Select>
</Form.Item> </Form.Item>
<Form.Item <Form.Item
label={t("bodyshop.fields.statuses.default_invoiced")} label={t("bodyshop.fields.statuses.default_invoiced")}
@@ -266,13 +206,7 @@ export function ShopInfoROStatusComponent({ bodyshop, form }) {
]} ]}
name={["md_ro_statuses", "default_invoiced"]} name={["md_ro_statuses", "default_invoiced"]}
> >
<Select> <Select options={options.map((item) => ({ value: item, label: item }))} />
{options.map((item, idx) => (
<Select.Option key={idx} value={item}>
{item}
</Select.Option>
))}
</Select>
</Form.Item> </Form.Item>
<Form.Item <Form.Item
label={t("bodyshop.fields.statuses.default_completed")} label={t("bodyshop.fields.statuses.default_completed")}
@@ -284,13 +218,7 @@ export function ShopInfoROStatusComponent({ bodyshop, form }) {
]} ]}
name={["md_ro_statuses", "default_completed"]} name={["md_ro_statuses", "default_completed"]}
> >
<Select> <Select options={options.map((item) => ({ value: item, label: item }))} />
{options.map((item, idx) => (
<Select.Option key={idx} value={item}>
{item}
</Select.Option>
))}
</Select>
</Form.Item> </Form.Item>
<Form.Item <Form.Item
label={t("bodyshop.fields.statuses.default_delivered")} label={t("bodyshop.fields.statuses.default_delivered")}
@@ -302,13 +230,7 @@ export function ShopInfoROStatusComponent({ bodyshop, form }) {
]} ]}
name={["md_ro_statuses", "default_delivered"]} name={["md_ro_statuses", "default_delivered"]}
> >
<Select> <Select options={options.map((item) => ({ value: item, label: item }))} />
{options.map((item, idx) => (
<Select.Option key={idx} value={item}>
{item}
</Select.Option>
))}
</Select>
</Form.Item> </Form.Item>
<Form.Item <Form.Item
label={t("bodyshop.fields.statuses.default_void")} label={t("bodyshop.fields.statuses.default_void")}
@@ -320,13 +242,7 @@ export function ShopInfoROStatusComponent({ bodyshop, form }) {
]} ]}
name={["md_ro_statuses", "default_void"]} name={["md_ro_statuses", "default_void"]}
> >
<Select> <Select options={options.map((item) => ({ value: item, label: item }))} />
{options.map((item, idx) => (
<Select.Option key={idx} value={item}>
{item}
</Select.Option>
))}
</Select>
</Form.Item> </Form.Item>
</LayoutFormRow> </LayoutFormRow>
{Production_List_Status_Colors.treatment === "on" && ( {Production_List_Status_Colors.treatment === "on" && (
@@ -352,13 +268,7 @@ export function ShopInfoROStatusComponent({ bodyshop, form }) {
} }
]} ]}
> >
<Select> <Select options={productionStatus.map((item) => ({ value: item, label: item }))} />
{productionStatus.map((item, idx) => (
<Select.Option key={idx} value={item}>
{item}
</Select.Option>
))}
</Select>
</Form.Item> </Form.Item>
<DeleteFilled <DeleteFilled
onClick={() => { onClick={() => {

View File

@@ -60,13 +60,13 @@ export default function ShopInfoSpeedPrint() {
} }
]} ]}
> >
<Select mode="multiple"> <Select
{Object.keys(TemplateListGenerated).map((key, idx) => ( mode="multiple"
<Select.Option key={idx} value={TemplateListGenerated[key].key}> options={Object.keys(TemplateListGenerated).map((key) => ({
{TemplateListGenerated[key].title} value: TemplateListGenerated[key].key,
</Select.Option> label: TemplateListGenerated[key].title
))} }))}
</Select> />
</Form.Item> </Form.Item>
<Space wrap> <Space wrap>

View File

@@ -43,85 +43,43 @@ export function ShopInfoIntellipay({ bodyshop, form }) {
label={t("bodyshop.fields.intellipay_config.payment_map.visa")} label={t("bodyshop.fields.intellipay_config.payment_map.visa")}
name={["intellipay_config", "payment_map", "visa"]} name={["intellipay_config", "payment_map", "visa"]}
> >
<Select showSearch> <Select showSearch options={bodyshop.md_payment_types.map((item) => ({ value: item, label: item }))} />
{bodyshop.md_payment_types.map((item, idx) => (
<Select.Option key={idx} value={item}>
{item}
</Select.Option>
))}
</Select>
</Form.Item> </Form.Item>
<Form.Item <Form.Item
label={t("bodyshop.fields.intellipay_config.payment_map.mast")} label={t("bodyshop.fields.intellipay_config.payment_map.mast")}
name={["intellipay_config", "payment_map", "mast"]} name={["intellipay_config", "payment_map", "mast"]}
> >
<Select showSearch> <Select showSearch options={bodyshop.md_payment_types.map((item) => ({ value: item, label: item }))} />
{bodyshop.md_payment_types.map((item, idx) => (
<Select.Option key={idx} value={item}>
{item}
</Select.Option>
))}
</Select>
</Form.Item> </Form.Item>
<Form.Item <Form.Item
label={t("bodyshop.fields.intellipay_config.payment_map.amex")} label={t("bodyshop.fields.intellipay_config.payment_map.amex")}
name={["intellipay_config", "payment_map", "amex"]} name={["intellipay_config", "payment_map", "amex"]}
> >
<Select showSearch> <Select showSearch options={bodyshop.md_payment_types.map((item) => ({ value: item, label: item }))} />
{bodyshop.md_payment_types.map((item, idx) => (
<Select.Option key={idx} value={item}>
{item}
</Select.Option>
))}
</Select>
</Form.Item> </Form.Item>
<Form.Item <Form.Item
label={t("bodyshop.fields.intellipay_config.payment_map.disc")} label={t("bodyshop.fields.intellipay_config.payment_map.disc")}
name={["intellipay_config", "payment_map", "disc"]} name={["intellipay_config", "payment_map", "disc"]}
> >
<Select showSearch> <Select showSearch options={bodyshop.md_payment_types.map((item) => ({ value: item, label: item }))} />
{bodyshop.md_payment_types.map((item, idx) => (
<Select.Option key={idx} value={item}>
{item}
</Select.Option>
))}
</Select>
</Form.Item> </Form.Item>
<Form.Item <Form.Item
label={t("bodyshop.fields.intellipay_config.payment_map.dnrs")} label={t("bodyshop.fields.intellipay_config.payment_map.dnrs")}
name={["intellipay_config", "payment_map", "dnrs"]} name={["intellipay_config", "payment_map", "dnrs"]}
> >
<Select showSearch> <Select showSearch options={bodyshop.md_payment_types.map((item) => ({ value: item, label: item }))} />
{bodyshop.md_payment_types.map((item, idx) => (
<Select.Option key={idx} value={item}>
{item}
</Select.Option>
))}
</Select>
</Form.Item> </Form.Item>
<Form.Item <Form.Item
label={t("bodyshop.fields.intellipay_config.payment_map.jcb")} label={t("bodyshop.fields.intellipay_config.payment_map.jcb")}
name={["intellipay_config", "payment_map", "jcb"]} name={["intellipay_config", "payment_map", "jcb"]}
> >
<Select showSearch> <Select showSearch options={bodyshop.md_payment_types.map((item) => ({ value: item, label: item }))} />
{bodyshop.md_payment_types.map((item, idx) => (
<Select.Option key={idx} value={item}>
{item}
</Select.Option>
))}
</Select>
</Form.Item> </Form.Item>
<Form.Item <Form.Item
label={t("bodyshop.fields.intellipay_config.payment_map.intr")} label={t("bodyshop.fields.intellipay_config.payment_map.intr")}
name={["intellipay_config", "payment_map", "intr"]} name={["intellipay_config", "payment_map", "intr"]}
> >
<Select showSearch> <Select showSearch options={bodyshop.md_payment_types.map((item) => ({ value: item, label: item }))} />
{bodyshop.md_payment_types.map((item, idx) => (
<Select.Option key={idx} value={item}>
{item}
</Select.Option>
))}
</Select>
</Form.Item> </Form.Item>
</LayoutFormRow> </LayoutFormRow>
</> </>

View File

@@ -57,21 +57,23 @@ export function TechClockInComponent({ form, bodyshop, technician }) {
} }
]} ]}
> >
<Select> <Select
{emps && options={
emps.rates.map((item) => ( emps &&
<Select.Option key={item.cost_center} value={item.cost_center}> emps.rates.map((item) => ({
{item.cost_center === "timetickets.labels.shift" value: item.cost_center,
label:
item.cost_center === "timetickets.labels.shift"
? t(item.cost_center) ? t(item.cost_center)
: bodyshop.cdk_dealerid || : bodyshop.cdk_dealerid ||
bodyshop.pbs_serialnumber || bodyshop.pbs_serialnumber ||
bodyshop.rr_dealerid || bodyshop.rr_dealerid ||
Enhanced_Payroll.treatment === "on" Enhanced_Payroll.treatment === "on"
? t(`joblines.fields.lbr_types.${item.cost_center.toUpperCase()}`) ? t(`joblines.fields.lbr_types.${item.cost_center.toUpperCase()}`)
: item.cost_center} : item.cost_center
</Select.Option> }))
))} }
</Select> />
</Form.Item> </Form.Item>
</LayoutFormRow> </LayoutFormRow>
<Divider /> <Divider />

View File

@@ -201,22 +201,22 @@ export function TechClockOffButton({
} }
]} ]}
> >
<Select disabled={isShiftTicket}> <Select disabled={isShiftTicket}
{isShiftTicket ? ( options={
<Select.Option value="timetickets.labels.shift">{t("timetickets.labels.shift")}</Select.Option> isShiftTicket
) : ( ? [{ value: "timetickets.labels.shift", label: t("timetickets.labels.shift") }]
emps && : emps &&
emps.rates.map((item) => ( emps.rates.map((item) => ({
<Select.Option key={item.cost_center}> value: item.cost_center,
{item.cost_center === "timetickets.labels.shift" label:
? t(item.cost_center) item.cost_center === "timetickets.labels.shift"
: hasDmsKey ? t(item.cost_center)
? t(`joblines.fields.lbr_types.${item.cost_center.toUpperCase()}`) : hasDmsKey
: item.cost_center} ? t(`joblines.fields.lbr_types.${item.cost_center.toUpperCase()}`)
</Select.Option> : item.cost_center
)) }))
)} }
</Select> />
</Form.Item> </Form.Item>
{isShiftTicket ? ( {isShiftTicket ? (
@@ -232,11 +232,12 @@ export function TechClockOffButton({
} }
]} ]}
> >
<Select> <Select
{bodyshop.md_ro_statuses.production_statuses.map((item) => ( options={bodyshop.md_ro_statuses.production_statuses.map((item) => ({
<Select.Option key={item}></Select.Option> value: item,
))} label: item
</Select> }))}
/>
</Form.Item> </Form.Item>
)} )}

View File

@@ -91,21 +91,22 @@ export function TimeTicketModalComponent({
value={value === "timetickets.labels.shift" ? t(value) : value} value={value === "timetickets.labels.shift" ? t(value) : value}
{...props} {...props}
disabled={value === "timetickets.labels.shift" || disabled} disabled={value === "timetickets.labels.shift" || disabled}
> options={
{emps && emps &&
emps.rates.map((item) => ( emps.rates.map((item) => ({
<Select.Option key={item.cost_center} value={item.cost_center}> value: item.cost_center,
{item.cost_center === "timetickets.labels.shift" label:
item.cost_center === "timetickets.labels.shift"
? t(item.cost_center) ? t(item.cost_center)
: bodyshop.cdk_dealerid || : bodyshop.cdk_dealerid ||
bodyshop.pbs_serialnumber || bodyshop.pbs_serialnumber ||
bodyshop.rr_dealerid || bodyshop.rr_dealerid ||
Enhanced_Payroll.treatment === "on" Enhanced_Payroll.treatment === "on"
? t(`joblines.fields.lbr_types.${item.cost_center.toUpperCase()}`) ? t(`joblines.fields.lbr_types.${item.cost_center.toUpperCase()}`)
: item.cost_center} : item.cost_center
</Select.Option> }))
))} }
</Select> />
); );
const MemoInput = ({ value, ...props }) => ( const MemoInput = ({ value, ...props }) => (

View File

@@ -20,13 +20,15 @@ export function TimeTicketShiftFormComponent() {
} }
]} ]}
> >
<Select> <Select
<Select.Option value="timetickets.labels.amshift">{t("timetickets.labels.amshift")}</Select.Option> options={[
<Select.Option value="timetickets.labels.ambreak">{t("timetickets.labels.ambreak")}</Select.Option> { value: "timetickets.labels.amshift", label: t("timetickets.labels.amshift") },
<Select.Option value="timetickets.labels.lunch">{t("timetickets.labels.lunch")}</Select.Option> { value: "timetickets.labels.ambreak", label: t("timetickets.labels.ambreak") },
<Select.Option value="timetickets.labels.pmshift">{t("timetickets.labels.pmshift")}</Select.Option> { value: "timetickets.labels.lunch", label: t("timetickets.labels.lunch") },
<Select.Option value="timetickets.labels.pmbreak">{t("timetickets.labels.pmbreak")}</Select.Option> { value: "timetickets.labels.pmshift", label: t("timetickets.labels.pmshift") },
</Select> { value: "timetickets.labels.pmbreak", label: t("timetickets.labels.pmbreak") }
]}
/>
</Form.Item> </Form.Item>
</div> </div>
); );

View File

@@ -9,8 +9,6 @@ import {
} from "../../graphql/vehicles.queries"; } from "../../graphql/vehicles.queries";
import AlertComponent from "../alert/alert.component"; import AlertComponent from "../alert/alert.component";
const { Option } = Select;
const VehicleSearchSelect = ({ value, onChange, onBlur, disabled, ref }) => { const VehicleSearchSelect = ({ value, onChange, onBlur, disabled, ref }) => {
const [callSearch, { loading, error, data }] = useLazyQuery(SEARCH_VEHICLES_FOR_AUTOCOMPLETE); const [callSearch, { loading, error, data }] = useLazyQuery(SEARCH_VEHICLES_FOR_AUTOCOMPLETE);
@@ -73,15 +71,12 @@ const VehicleSearchSelect = ({ value, onChange, onBlur, disabled, ref }) => {
onSelect={handleSelect} onSelect={handleSelect}
notFoundContent={loading ? <LoadingOutlined /> : <Empty />} notFoundContent={loading ? <LoadingOutlined /> : <Empty />}
onBlur={onBlur} onBlur={onBlur}
> options={theOptions?.map((o) => ({
{theOptions key: o.id,
? theOptions.map((o) => ( value: o.id,
<Option key={o.id} value={o.id}> label: `${o.v_vin || ""} ${o.v_model_yr || ""} ${o.v_make_desc || ""} ${o.v_model_desc || ""} `
{`${o.v_vin || ""} ${o.v_model_yr || ""} ${o.v_make_desc || ""} ${o.v_model_desc || ""} `} }))}
</Option> />
))
: null}
</Select>
{idLoading || loading ? <LoadingOutlined /> : null} {idLoading || loading ? <LoadingOutlined /> : null}
{error ? <AlertComponent title={error.message} type="error" /> : null} {error ? <AlertComponent title={error.message} type="error" /> : null}
{idError ? <AlertComponent title={idError.message} type="error" /> : null} {idError ? <AlertComponent title={idError.message} type="error" /> : null}

View File

@@ -3,8 +3,6 @@ import { Select, Space, Tag } from "antd";
import { useEffect, useState } from "react"; import { useEffect, useState } from "react";
import PhoneNumberFormatter from "../../utils/PhoneFormatter"; import PhoneNumberFormatter from "../../utils/PhoneFormatter";
const { Option } = Select;
// To be used as a form element only. // To be used as a form element only.
const VendorSearchSelect = ({ value, onChange, options, onSelect, disabled, preferredMake, showPhone, ref }) => { const VendorSearchSelect = ({ value, onChange, options, onSelect, disabled, preferredMake, showPhone, ref }) => {
@@ -21,10 +19,57 @@ const VendorSearchSelect = ({ value, onChange, options, onSelect, disabled, pref
? options.filter((o) => o.favorite.filter((f) => f.toLowerCase() === preferredMake.toLowerCase()).length > 0) ? options.filter((o) => o.favorite.filter((f) => f.toLowerCase() === preferredMake.toLowerCase()).length > 0)
: []; : [];
const formatOption = (o, isFavorite = false) => ({
key: isFavorite ? `favorite-${o.id}` : o.id,
value: o.id,
name: o.name,
discount: o.discount,
label: (
<div
style={{
display: "flex",
alignItems: "center",
flexWrap: "nowrap",
width: "100%"
}}
>
<div
style={{
flex: 1,
minWidth: 0,
overflow: "hidden",
textOverflow: "ellipsis",
whiteSpace: "nowrap"
}}
>
{o.name}
</div>
<Space style={{ marginLeft: "1rem" }}>
{isFavorite && <HeartOutlined style={{ color: "red" }} />}
{!isFavorite &&
o.tags?.map((tag, idx) => (
<Tag key={idx} style={{ marginLeft: "0.5rem" }}>
{tag}
</Tag>
))}
{o.phone && showPhone && <PhoneNumberFormatter>{o.phone}</PhoneNumberFormatter>}
{o.discount && o.discount !== 0 ? <Tag color="green">{`${o.discount * 100}%`}</Tag> : null}
</Space>
</div>
)
});
const allOptions = [
...(favorites?.map((o) => formatOption(o, true)) || []),
...(options?.map((o) => formatOption(o, false)) || [])
];
return ( return (
<Select <Select
ref={ref} ref={ref}
showSearch showSearch={{
optionFilterProp: "name"
}}
value={option} value={option}
style={{ style={{
width: "100%" width: "100%"
@@ -59,76 +104,11 @@ const VendorSearchSelect = ({ value, onChange, options, onSelect, disabled, pref
}} }}
popupMatchSelectWidth={false} popupMatchSelectWidth={false}
onChange={setOption} onChange={setOption}
optionFilterProp="name"
onSelect={onSelect} onSelect={onSelect}
disabled={disabled || false} disabled={disabled || false}
optionLabelProp="name" optionLabelProp="name"
> options={allOptions}
{favorites && />
favorites.map((o) => (
<Option key={`favorite-${o.id}`} value={o.id} name={o.name} discount={o.discount}>
<div
style={{
display: "flex",
alignItems: "center",
flexWrap: "nowrap",
width: "100%"
}}
>
<div
style={{
flex: 1,
minWidth: 0,
overflow: "hidden",
textOverflow: "ellipsis",
whiteSpace: "nowrap"
}}
>
{o.name}
</div>
<Space style={{ marginLeft: "1rem" }}>
<HeartOutlined style={{ color: "red" }} />
{o.phone && showPhone && <PhoneNumberFormatter>{o.phone}</PhoneNumberFormatter>}
{o.discount && o.discount !== 0 ? <Tag color="green">{`${o.discount * 100}%`}</Tag> : null}
</Space>
</div>
</Option>
))}
{options &&
options.map((o) => (
<Option key={o.id} value={o.id} name={o.name} discount={o.discount}>
<div
style={{
display: "flex",
alignItems: "center",
flexWrap: "nowrap",
width: "100%"
}}
>
<div
style={{
flex: 1,
minWidth: 0,
overflow: "hidden",
textOverflow: "ellipsis",
whiteSpace: "nowrap"
}}
>
{o.name}
</div>
<Space style={{ marginLeft: "1rem" }}>
{o.tags?.map((tag, idx) => (
<Tag key={idx} style={{ marginLeft: "0.5rem" }}>
{tag}
</Tag>
))}
{o.phone && showPhone && <PhoneNumberFormatter>{o.phone}</PhoneNumberFormatter>}
{o.discount && o.discount !== 0 ? <Tag color="green">{`${o.discount * 100}%`}</Tag> : null}
</Space>
</div>
</Option>
))}
</Select>
); );
}; };
export default VendorSearchSelect; export default VendorSearchSelect;

View File

@@ -119,12 +119,13 @@ export function DmsContainer({ setBreadcrumbs, setSelectedHeader }) {
setLogLevel(value); setLogLevel(value);
socket.emit("set-log-level", value); socket.emit("set-log-level", value);
}} }}
> options={[
<Select.Option key="DEBUG">DEBUG</Select.Option> { key: "DEBUG", value: "DEBUG", label: "DEBUG" },
<Select.Option key="INFO">INFO</Select.Option> { key: "INFO", value: "INFO", label: "INFO" },
<Select.Option key="WARN">WARN</Select.Option> { key: "WARN", value: "WARN", label: "WARN" },
<Select.Option key="ERROR">ERROR</Select.Option> { key: "ERROR", value: "ERROR", label: "ERROR" }
</Select> ]}
/>
<Button onClick={() => setLogs([])}>Clear Logs</Button> <Button onClick={() => setLogs([])}>Clear Logs</Button>
<Button <Button
onClick={() => { onClick={() => {

View File

@@ -541,13 +541,14 @@ export function DmsContainer({ bodyshop, setBreadcrumbs, setSelectedHeader, inse
setLogLevel(value); setLogLevel(value);
setActiveLogLevel(value); setActiveLogLevel(value);
}} }}
> options={[
<Select.Option key="SILLY">SILLY</Select.Option> { key: "SILLY", value: "SILLY", label: "SILLY" },
<Select.Option key="DEBUG">DEBUG</Select.Option> { key: "DEBUG", value: "DEBUG", label: "DEBUG" },
<Select.Option key="INFO">INFO</Select.Option> { key: "INFO", value: "INFO", label: "INFO" },
<Select.Option key="WARN">WARN</Select.Option> { key: "WARN", value: "WARN", label: "WARN" },
<Select.Option key="ERROR">ERROR</Select.Option> { key: "ERROR", value: "ERROR", label: "ERROR" }
</Select> ]}
/>
<Button onClick={() => setLogs([])}>Clear Logs</Button> <Button onClick={() => setLogs([])}>Clear Logs</Button>
<Button <Button
onClick={() => { onClick={() => {

View File

@@ -440,13 +440,15 @@ export function JobsCloseComponent({ job, bodyshop, jobRO, insertAuditTrail, set
} }
]} ]}
> >
<Select style={{ minWidth: "12rem" }} disabled={jobRO}> <Select
{bodyshop.md_ins_cos.map((s) => ( style={{ minWidth: "12rem" }}
<Select.Option key={s.name} value={s.name}> disabled={jobRO}
{s.name} options={bodyshop.md_ins_cos.map((s) => ({
</Select.Option> key: s.name,
))} value: s.name,
</Select> label: s.name
}))}
/>
</Form.Item> </Form.Item>
<Form.Item <Form.Item

View File

@@ -1,44 +1,43 @@
import { Select } from "antd";
import i18n from "../translations/i18n"; import i18n from "../translations/i18n";
export default function CiecaSelect(parts = true, labor = true) { export default function CiecaSelect(parts = true, labor = true) {
return ( const options = [];
<>
{labor && ( if (labor) {
<> options.push(
<Select.Option value="LAA">{i18n.t("joblines.fields.lbr_types.LAA")}</Select.Option> { value: "LAA", label: i18n.t("joblines.fields.lbr_types.LAA") },
<Select.Option value="LAB">{i18n.t("joblines.fields.lbr_types.LAB")}</Select.Option> { value: "LAB", label: i18n.t("joblines.fields.lbr_types.LAB") },
<Select.Option value="LAD">{i18n.t("joblines.fields.lbr_types.LAD")}</Select.Option> { value: "LAD", label: i18n.t("joblines.fields.lbr_types.LAD") },
<Select.Option value="LAE">{i18n.t("joblines.fields.lbr_types.LAE")}</Select.Option> { value: "LAE", label: i18n.t("joblines.fields.lbr_types.LAE") },
<Select.Option value="LAF">{i18n.t("joblines.fields.lbr_types.LAF")}</Select.Option> { value: "LAF", label: i18n.t("joblines.fields.lbr_types.LAF") },
<Select.Option value="LAG">{i18n.t("joblines.fields.lbr_types.LAG")}</Select.Option> { value: "LAG", label: i18n.t("joblines.fields.lbr_types.LAG") },
<Select.Option value="LAM">{i18n.t("joblines.fields.lbr_types.LAM")}</Select.Option> { value: "LAM", label: i18n.t("joblines.fields.lbr_types.LAM") },
<Select.Option value="LAR">{i18n.t("joblines.fields.lbr_types.LAR")}</Select.Option> { value: "LAR", label: i18n.t("joblines.fields.lbr_types.LAR") },
<Select.Option value="LAS">{i18n.t("joblines.fields.lbr_types.LAS")}</Select.Option> { value: "LAS", label: i18n.t("joblines.fields.lbr_types.LAS") },
<Select.Option value="LAU">{i18n.t("joblines.fields.lbr_types.LAU")}</Select.Option> { value: "LAU", label: i18n.t("joblines.fields.lbr_types.LAU") },
<Select.Option value="LA1">{i18n.t("joblines.fields.lbr_types.LA1")}</Select.Option> { value: "LA1", label: i18n.t("joblines.fields.lbr_types.LA1") },
<Select.Option value="LA2">{i18n.t("joblines.fields.lbr_types.LA2")}</Select.Option> { value: "LA2", label: i18n.t("joblines.fields.lbr_types.LA2") },
<Select.Option value="LA3">{i18n.t("joblines.fields.lbr_types.LA3")}</Select.Option> { value: "LA3", label: i18n.t("joblines.fields.lbr_types.LA3") },
<Select.Option value="LA4">{i18n.t("joblines.fields.lbr_types.LA4")}</Select.Option> { value: "LA4", label: i18n.t("joblines.fields.lbr_types.LA4") }
</> );
)} }
{parts && (
<> if (parts) {
<Select.Option value="PAA">{i18n.t("joblines.fields.part_types.PAA")}</Select.Option> options.push(
<Select.Option value="PAC">{i18n.t("joblines.fields.part_types.PAC")}</Select.Option> { value: "PAA", label: i18n.t("joblines.fields.part_types.PAA") },
{ value: "PAC", label: i18n.t("joblines.fields.part_types.PAC") },
<Select.Option value="PAL">{i18n.t("joblines.fields.part_types.PAL")}</Select.Option> { value: "PAL", label: i18n.t("joblines.fields.part_types.PAL") },
<Select.Option value="PAG">{i18n.t("joblines.fields.part_types.PAG")}</Select.Option> { value: "PAG", label: i18n.t("joblines.fields.part_types.PAG") },
<Select.Option value="PAM">{i18n.t("joblines.fields.part_types.PAM")}</Select.Option> { value: "PAM", label: i18n.t("joblines.fields.part_types.PAM") },
<Select.Option value="PAP">{i18n.t("joblines.fields.part_types.PAP")}</Select.Option> { value: "PAP", label: i18n.t("joblines.fields.part_types.PAP") },
<Select.Option value="PAN">{i18n.t("joblines.fields.part_types.PAN")}</Select.Option> { value: "PAN", label: i18n.t("joblines.fields.part_types.PAN") },
<Select.Option value="PAO">{i18n.t("joblines.fields.part_types.PAO")}</Select.Option> { value: "PAO", label: i18n.t("joblines.fields.part_types.PAO") },
<Select.Option value="PAR">{i18n.t("joblines.fields.part_types.PAR")}</Select.Option> { value: "PAR", label: i18n.t("joblines.fields.part_types.PAR") },
<Select.Option value="PAS">{i18n.t("joblines.fields.part_types.PAS")}</Select.Option> { value: "PAS", label: i18n.t("joblines.fields.part_types.PAS") }
</> );
)} }
</>
); return options;
} }
export function GetPartTypeName(part_type) { export function GetPartTypeName(part_type) {

1062
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -18,23 +18,23 @@
"job-totals-fixtures:local": "docker exec node-app /usr/bin/node /app/download-job-totals-fixtures.js" "job-totals-fixtures:local": "docker exec node-app /usr/bin/node /app/download-job-totals-fixtures.js"
}, },
"dependencies": { "dependencies": {
"@aws-sdk/client-cloudwatch-logs": "^3.978.0", "@aws-sdk/client-cloudwatch-logs": "^3.992.0",
"@aws-sdk/client-elasticache": "^3.978.0", "@aws-sdk/client-elasticache": "^3.992.0",
"@aws-sdk/client-s3": "^3.978.0", "@aws-sdk/client-s3": "^3.992.0",
"@aws-sdk/client-secrets-manager": "^3.978.0", "@aws-sdk/client-secrets-manager": "^3.992.0",
"@aws-sdk/client-ses": "^3.978.0", "@aws-sdk/client-ses": "^3.992.0",
"@aws-sdk/credential-provider-node": "^3.972.3", "@aws-sdk/credential-provider-node": "^3.972.9",
"@aws-sdk/lib-storage": "^3.978.0", "@aws-sdk/lib-storage": "^3.992.0",
"@aws-sdk/s3-request-presigner": "^3.978.0", "@aws-sdk/s3-request-presigner": "^3.992.0",
"@opensearch-project/opensearch": "^2.13.0", "@opensearch-project/opensearch": "^2.13.0",
"@socket.io/admin-ui": "^0.5.1", "@socket.io/admin-ui": "^0.5.1",
"@socket.io/redis-adapter": "^8.3.0", "@socket.io/redis-adapter": "^8.3.0",
"archiver": "^7.0.1", "archiver": "^7.0.1",
"aws4": "^1.13.2", "aws4": "^1.13.2",
"axios": "^1.13.4", "axios": "^1.13.5",
"axios-curlirize": "^2.0.0", "axios-curlirize": "^2.0.0",
"better-queue": "^3.8.12", "better-queue": "^3.8.12",
"bullmq": "^5.67.2", "bullmq": "^5.69.3",
"chart.js": "^4.5.1", "chart.js": "^4.5.1",
"cloudinary": "^2.9.0", "cloudinary": "^2.9.0",
"compression": "^1.8.1", "compression": "^1.8.1",
@@ -42,17 +42,17 @@
"cors": "^2.8.6", "cors": "^2.8.6",
"crisp-status-reporter": "^1.2.2", "crisp-status-reporter": "^1.2.2",
"dinero.js": "^1.9.1", "dinero.js": "^1.9.1",
"dotenv": "^17.2.3", "dotenv": "^17.3.1",
"express": "^4.21.1", "express": "^4.21.1",
"fast-xml-parser": "^5.3.4", "fast-xml-parser": "^5.3.6",
"firebase-admin": "^13.6.0", "firebase-admin": "^13.6.1",
"graphql": "^16.12.0", "graphql": "^16.12.0",
"graphql-request": "^6.1.0", "graphql-request": "^6.1.0",
"intuit-oauth": "^4.2.2", "intuit-oauth": "^4.2.2",
"ioredis": "^5.9.2", "ioredis": "^5.9.3",
"json-2-csv": "^5.5.10", "json-2-csv": "^5.5.10",
"jsonwebtoken": "^9.0.3", "jsonwebtoken": "^9.0.3",
"juice": "^11.1.0", "juice": "^11.1.1",
"lodash": "^4.17.23", "lodash": "^4.17.23",
"moment": "^2.30.1", "moment": "^2.30.1",
"moment-timezone": "^0.6.0", "moment-timezone": "^0.6.0",
@@ -63,13 +63,13 @@
"phone": "^3.1.70", "phone": "^3.1.70",
"query-string": "7.1.3", "query-string": "7.1.3",
"recursive-diff": "^1.0.9", "recursive-diff": "^1.0.9",
"rimraf": "^6.1.2", "rimraf": "^6.1.3",
"skia-canvas": "^3.0.8", "skia-canvas": "^3.0.8",
"soap": "^1.6.4", "soap": "^1.7.1",
"socket.io": "^4.8.3", "socket.io": "^4.8.3",
"socket.io-adapter": "^2.5.6", "socket.io-adapter": "^2.5.6",
"ssh2-sftp-client": "^11.0.0", "ssh2-sftp-client": "^11.0.0",
"twilio": "^5.12.0", "twilio": "^5.12.2",
"uuid": "^11.1.0", "uuid": "^11.1.0",
"winston": "^3.19.0", "winston": "^3.19.0",
"winston-cloudwatch": "^6.3.0", "winston-cloudwatch": "^6.3.0",
@@ -82,7 +82,7 @@
"@eslint/js": "^9.39.2", "@eslint/js": "^9.39.2",
"eslint": "^9.39.2", "eslint": "^9.39.2",
"eslint-plugin-react": "^7.37.5", "eslint-plugin-react": "^7.37.5",
"globals": "^17.2.0", "globals": "^17.3.0",
"mock-require": "^3.0.3", "mock-require": "^3.0.3",
"p-limit": "^3.1.0", "p-limit": "^3.1.0",
"prettier": "^3.8.1", "prettier": "^3.8.1",