diff --git a/.vscode/settings.json b/.vscode/settings.json index e499a11be..dd6a1330b 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,5 +1,4 @@ { - "eslint.workingDirectories": ["./client", "./"], "xml.fileAssociations": [ { "pattern": "**/Test.xml", diff --git a/bodyshop_translations.babel b/bodyshop_translations.babel index 34fb89708..23707d6e7 100644 --- a/bodyshop_translations.babel +++ b/bodyshop_translations.babel @@ -3665,6 +3665,27 @@ + + addpartsrule + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + addspeedprint false @@ -4572,6 +4593,27 @@ + + enforce_conversion_category + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + enforce_conversion_csr false @@ -5411,6 +5453,27 @@ + + md_lost_sale_reasons + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + md_parts_order_comment false @@ -5432,6 +5495,53 @@ + + md_parts_scan + + + expression + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + + + flags + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + + + md_payment_types false @@ -9609,6 +9719,27 @@ + + partsscan + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + printlater false @@ -20758,6 +20889,27 @@ + + sendpartspricechange + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + sendtodms false @@ -21204,6 +21356,27 @@ + + partspricechange + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + saving false @@ -24153,6 +24326,27 @@ + + lost_sale_reason + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + ma2s false @@ -40775,6 +40969,27 @@ + + customer_list + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + cycle_time_analysis false @@ -42780,6 +42995,27 @@ + + ins_co_nm_filter + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + intake false diff --git a/client/src/components/job-at-change/schedule-event.component.jsx b/client/src/components/job-at-change/schedule-event.component.jsx index e0c0ccc4d..612f03421 100644 --- a/client/src/components/job-at-change/schedule-event.component.jsx +++ b/client/src/components/job-at-change/schedule-event.component.jsx @@ -3,9 +3,11 @@ import { Button, Divider, Dropdown, + Form, Menu, notification, Popover, + Select, Space, } from "antd"; import parsePhoneNumber from "libphonenumber-js"; @@ -59,7 +61,10 @@ export function ScheduleEventComponent({ const blockContent = (
-
@@ -203,10 +208,46 @@ export function ScheduleEventComponent({ ) : null} - - + { + handleCancel({ id: event.id, lost_sale_reason }); + }} + > + + + {bodyshop.md_categories.map((s) => ( + + {s} + + ))} + + + )} + + + ); diff --git a/client/src/components/jobs-detail-header-actions/jobs-detail-header-actions.component.jsx b/client/src/components/jobs-detail-header-actions/jobs-detail-header-actions.component.jsx index 5002a0e5d..879fb7426 100644 --- a/client/src/components/jobs-detail-header-actions/jobs-detail-header-actions.component.jsx +++ b/client/src/components/jobs-detail-header-actions/jobs-detail-header-actions.component.jsx @@ -1,6 +1,15 @@ import { DownCircleFilled } from "@ant-design/icons"; import { useApolloClient, useMutation } from "@apollo/client"; -import { Button, Dropdown, Menu, notification, Popconfirm } from "antd"; +import { + Button, + Dropdown, + Form, + Menu, + notification, + Popconfirm, + Popover, + Select, +} from "antd"; import React, { useMemo } from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; @@ -127,35 +136,63 @@ export function JobsDetailHeaderActions({ - e.stopPropagation()} + { - const jobUpdate = await cancelAllAppointments({ - variables: { - jobid: job.id, - job: { - date_scheduled: null, - scheduled_in: null, - scheduled_completion: null, - status: bodyshop.md_ro_statuses.default_imported, - }, - }, - }); - if (!jobUpdate.errors) { - notification["success"]({ - message: t("appointments.successes.canceled"), - }); - return; - } - }} - getPopupContainer={(trigger) => trigger.parentNode} + content={ +
{ + const jobUpdate = await cancelAllAppointments({ + variables: { + jobid: job.id, + job: { + date_scheduled: null, + scheduled_in: null, + scheduled_completion: null, + lost_sale_reason, + status: bodyshop.md_ro_statuses.default_imported, + }, + }, + }); + if (!jobUpdate.errors) { + notification["success"]({ + message: t("appointments.successes.canceled"), + }); + return; + } + }} + > + + setFilter({ ...filter, ins_co_nm: [] })} + value={filter?.ins_co_nm} + onChange={(e) => { + setFilter({ ...filter, ins_co_nm: e }); + }} + options={bodyshop.md_ins_cos.map((i) => ({ + label: i.name, + value: i.name, + }))} + /> { diff --git a/client/src/components/schedule-job-modal/schedule-job-modal.container.jsx b/client/src/components/schedule-job-modal/schedule-job-modal.container.jsx index 08bb4747e..ed3eace05 100644 --- a/client/src/components/schedule-job-modal/schedule-job-modal.container.jsx +++ b/client/src/components/schedule-job-modal/schedule-job-modal.container.jsx @@ -148,6 +148,7 @@ export function ScheduleJobModalContainer({ date_scheduled: new Date(), scheduled_in: values.start, scheduled_completion: values.scheduled_completion, + lost_sale_reason: null, }, }, }); diff --git a/client/src/components/shop-info/shop-info.component.jsx b/client/src/components/shop-info/shop-info.component.jsx index df6410e6c..9baeb2c58 100644 --- a/client/src/components/shop-info/shop-info.component.jsx +++ b/client/src/components/shop-info/shop-info.component.jsx @@ -1,3 +1,4 @@ +import { useTreatments } from "@splitsoftware/splitio-react"; import { Button, Card, Tabs } from "antd"; import React from "react"; import { useTranslation } from "react-i18next"; @@ -8,6 +9,7 @@ import ShopInfoGeneral from "./shop-info.general.component"; import ShopInfoIntakeChecklistComponent from "./shop-info.intake.component"; import ShopInfoLaborRates from "./shop-info.laborrates.component"; import ShopInfoOrderStatusComponent from "./shop-info.orderstatus.component"; +import ShopInfoPartsScan from "./shop-info.parts-scan"; import ShopInfoRbacComponent from "./shop-info.rbac.component"; import ShopInfoResponsibilityCenterComponent from "./shop-info.responsibilitycenters.component"; import ShopInfoROStatusComponent from "./shop-info.rostatus.component"; @@ -23,6 +25,11 @@ const mapDispatchToProps = (dispatch) => ({ export default connect(mapStateToProps, mapDispatchToProps)(ShopInfoComponent); export function ShopInfoComponent({ bodyshop, form, saveLoading }) { + const { CriticalPartsScanning } = useTreatments( + ["CriticalPartsScanning"], + {}, + bodyshop.imexshopid + ); const { t } = useTranslation(); return ( + {CriticalPartsScanning.treatment === "on" && ( + + + + )} ); diff --git a/client/src/components/shop-info/shop-info.general.component.jsx b/client/src/components/shop-info/shop-info.general.component.jsx index f01e10aba..3e9b1ed2c 100644 --- a/client/src/components/shop-info/shop-info.general.component.jsx +++ b/client/src/components/shop-info/shop-info.general.component.jsx @@ -473,6 +473,13 @@ export default function ShopInfoGeneral({ form }) { > + + + + + + {(fields, { add, remove, move }) => { + return ( +
+ {fields.map((field, index) => ( + + + + + + + + + + + { + remove(field.name); + }} + /> + + + + + ))} + + + +
+ ); + }} +
+
+ + ); +} diff --git a/client/src/components/shop-info/shop-info.scheduling.component.jsx b/client/src/components/shop-info/shop-info.scheduling.component.jsx index 85e64c555..d1d50bac4 100644 --- a/client/src/components/shop-info/shop-info.scheduling.component.jsx +++ b/client/src/components/shop-info/shop-info.scheduling.component.jsx @@ -76,6 +76,19 @@ export default function ShopInfoSchedulingComponent({ form }) { >
+ +