From d0fe352d9505ba9caab66cf322bbb45728b676c7 Mon Sep 17 00:00:00 2001 From: Patrick Fic <> Date: Mon, 27 Dec 2021 12:25:32 -0800 Subject: [PATCH 01/12] IO-1584 Updated Bill Posting WIP. --- .../bill-form-lines-extended.component.jsx | 135 ++++++++ ...form-lines.extended.formitem.component.jsx | 288 ++++++++++++++++++ .../bill-form/bill-form.component.jsx | 33 +- .../bill-form/bill-form.lines.component.jsx | 2 +- 4 files changed, 449 insertions(+), 9 deletions(-) create mode 100644 client/src/components/bill-form-lines-extended/bill-form-lines-extended.component.jsx create mode 100644 client/src/components/bill-form-lines-extended/bill-form-lines.extended.formitem.component.jsx diff --git a/client/src/components/bill-form-lines-extended/bill-form-lines-extended.component.jsx b/client/src/components/bill-form-lines-extended/bill-form-lines-extended.component.jsx new file mode 100644 index 000000000..ad356cae0 --- /dev/null +++ b/client/src/components/bill-form-lines-extended/bill-form-lines-extended.component.jsx @@ -0,0 +1,135 @@ +import { Form, Input, Table } from "antd"; +import React, { useState } from "react"; +import { useTranslation } from "react-i18next"; +import CurrencyFormatter from "../../utils/CurrencyFormatter"; +import { alphaSort } from "../../utils/sorters"; +import BillFormItemsExtendedFormItem from "./bill-form-lines.extended.formitem.component"; +export default function BillFormLinesExtended({ + lineData, + discount, + form, + responsibilityCenters, + disabled, +}) { + const [search, setSearch] = useState(""); + const { t } = useTranslation(); + const columns = [ + { + title: t("joblines.fields.line_desc"), + dataIndex: "line_desc", + key: "line_desc", + width: "10%", + sorter: (a, b) => alphaSort(a.line_desc, b.line_desc), + }, + { + title: t("joblines.fields.oem_partno"), + dataIndex: "oem_partno", + key: "oem_partno", + width: "10%", + sorter: (a, b) => alphaSort(a.oem_partno, b.oem_partno), + }, + { + title: t("joblines.fields.part_type"), + dataIndex: "part_type", + key: "part_type", + width: "10%", + filters: [ + { + text: t("jobs.labels.partsfilter"), + value: ["PAN", "PAP", "PAL", "PAA", "PAS", "PASL"], + }, + { + text: t("joblines.fields.part_types.PAN"), + value: ["PAN", "PAP"], + }, + { + text: t("joblines.fields.part_types.PAL"), + value: ["PAL"], + }, + { + text: t("joblines.fields.part_types.PAA"), + value: ["PAA"], + }, + { + text: t("joblines.fields.part_types.PAS"), + value: ["PAS", "PASL"], + }, + ], + onFilter: (value, record) => value.includes(record.part_type), + render: (text, record) => + record.part_type + ? t(`joblines.fields.part_types.${record.part_type}`) + : null, + }, + + { + title: t("joblines.fields.act_price"), + dataIndex: "act_price", + key: "act_price", + width: "10%", + sorter: (a, b) => a.act_price - b.act_price, + shouldCellUpdate: false, + render: (text, record) => ( + <> + + {record.db_ref === "900510" || record.db_ref === "900511" + ? record.prt_dsmk_m + : record.act_price} + + {record.part_qty ? `(x ${record.part_qty})` : null} + {record.prt_dsmk_p && record.prt_dsmk_p !== 0 ? ( + {`(${record.prt_dsmk_p}%)`} + ) : ( + <> + )} + + ), + }, + { + title: t("billlines.fields.posting"), + dataIndex: "posting", + key: "posting", + + render: (text, record, index) => ( + + + + ), + }, + ]; + + const data = + search === "" + ? lineData + : lineData.filter( + (l) => + (l.line_desc && + l.line_desc.toLowerCase().includes(search.toLowerCase())) || + (l.oem_partno && + l.oem_partno.toLowerCase().includes(search.toLowerCase())) || + (l.act_price && + l.act_price.toString().startsWith(search.toString())) + ); + + return ( + + + setSearch(e.target.value)} allowClear /> + + + ); +} diff --git a/client/src/components/bill-form-lines-extended/bill-form-lines.extended.formitem.component.jsx b/client/src/components/bill-form-lines-extended/bill-form-lines.extended.formitem.component.jsx new file mode 100644 index 000000000..32824e50e --- /dev/null +++ b/client/src/components/bill-form-lines-extended/bill-form-lines.extended.formitem.component.jsx @@ -0,0 +1,288 @@ +import React from "react"; +import { + PlusCircleFilled, + MinusCircleFilled, + WarningOutlined, +} from "@ant-design/icons"; +import { Form, Button, InputNumber, Input, Select, Switch, Space } from "antd"; +import { useTranslation } from "react-i18next"; + +import { connect } from "react-redux"; +import { createStructuredSelector } from "reselect"; +import { selectBodyshop } from "../../redux/user/user.selectors"; +import CurrencyInput from "../form-items-formatted/currency-form-item.component"; +import CiecaSelect from "../../utils/Ciecaselect"; + +const mapStateToProps = createStructuredSelector({ + bodyshop: selectBodyshop, +}); +const mapDispatchToProps = (dispatch) => ({ + //setUserLanguage: language => dispatch(setUserLanguage(language)) +}); +export default connect( + mapStateToProps, + mapDispatchToProps +)(BillFormItemsExtendedFormItem); + +export function BillFormItemsExtendedFormItem({ + value, + bodyshop, + form, + record, + index, + disabled, + responsibilityCenters, + discount, +}) { + // const { billlineskeys } = form.getFieldsValue("billlineskeys"); + + const { t } = useTranslation(); + if (!value) + return ( + + ); + + return ( + + + + + + + + + { + const { billlineskeys } = form.getFieldsValue("billlineskeys"); + form.setFieldsValue({ + billlineskeys: { + ...billlineskeys, + [record.id]: { + ...billlineskeys[billlineskeys], + actual_cost: !!billlineskeys[billlineskeys].actual_cost + ? billlineskeys[billlineskeys].actual_cost + : Math.round( + (parseFloat(e.target.value) * (1 - discount) + + Number.EPSILON) * + 100 + ) / 100, + }, + }, + }); + }} + /> + + + + + + {() => { + const line = value; + if (!!!line) return null; + const lineDiscount = ( + 1 - + Math.round((line.actual_cost / line.actual_price) * 100) / 100 + ).toPrecision(2); + + if (lineDiscount - discount === 0) return
; + return ; + }} + + + + + + + + + + + + {() => { + if ( + form.getFieldsValue("billlineskeys").billlineskeys[record.id] + .deductedfromlbr + ) + return ( +
+ + + + + + +
+ ); + return <>; + }} +
+ + + + + + + + + + + + + + ); +} diff --git a/client/src/components/bill-form/bill-form.component.jsx b/client/src/components/bill-form/bill-form.component.jsx index 60e48509a..c6a979d56 100644 --- a/client/src/components/bill-form/bill-form.component.jsx +++ b/client/src/components/bill-form/bill-form.component.jsx @@ -28,6 +28,8 @@ import LayoutFormRow from "../layout-form-row/layout-form-row.component"; import VendorSearchSelect from "../vendor-search-select/vendor-search-select.component"; import BillFormLines from "./bill-form.lines.component"; import { CalculateBillTotal } from "./bill-form.totals.utility"; +import { useTreatments } from "@splitsoftware/splitio-react"; +import BillFormLinesExtended from "../bill-form-lines-extended/bill-form-lines-extended.component"; const mapStateToProps = createStructuredSelector({ bodyshop: selectBodyshop, @@ -49,7 +51,11 @@ export function BillFormComponent({ const { t } = useTranslation(); const client = useApolloClient(); const [discount, setDiscount] = useState(0); - + const { Extended_Bill_Posting } = useTreatments( + ["Extended_Bill_Posting"], + {}, + bodyshop.imexshopid + ); const handleVendorSelect = (props, opt) => { setDiscount(opt.discount); }; @@ -357,13 +363,24 @@ export function BillFormComponent({ {t("bills.labels.bill_lines")} - + + {Extended_Bill_Posting.treatment === "on" ? ( + + ) : ( + + )} Date: Mon, 27 Dec 2021 12:40:52 -0800 Subject: [PATCH 02/12] IO-1602 Add customer portions to CDK posting screen. --- .../dms-post-form/dms-post-form.component.jsx | 19 ++++++++++++++- client/src/graphql/jobs.queries.js | 2 ++ client/src/pages/dms/dms.container.jsx | 23 ++++++++++++------- 3 files changed, 35 insertions(+), 9 deletions(-) diff --git a/client/src/components/dms-post-form/dms-post-form.component.jsx b/client/src/components/dms-post-form/dms-post-form.component.jsx index 44b1f86fb..10dc51566 100644 --- a/client/src/components/dms-post-form/dms-post-form.component.jsx +++ b/client/src/components/dms-post-form/dms-post-form.component.jsx @@ -80,7 +80,8 @@ export function DmsPostForm({ bodyshop, socket, job, logsRef }) { initialValues={{ story: t("jobs.labels.dms.defaultstory", { ro_number: job.ro_number, - area_of_damage: job.area_of_damage && job.area_of_damage.impact1, + area_of_damage: + (job.area_of_damage && job.area_of_damage.impact1) || "UNKNOWN", }).substr(0, 239), }} > @@ -174,6 +175,22 @@ export function DmsPostForm({ bodyshop, socket, job, logsRef }) { + + + + + {(fields, { add, remove }) => { return ( diff --git a/client/src/graphql/jobs.queries.js b/client/src/graphql/jobs.queries.js index a9e6c1478..6ec415432 100644 --- a/client/src/graphql/jobs.queries.js +++ b/client/src/graphql/jobs.queries.js @@ -2032,6 +2032,8 @@ export const QUERY_JOB_EXPORT_DMS = gql` po_number clm_no job_totals + ded_amt + ded_status ownr_fn ownr_ln ownr_co_nm diff --git a/client/src/pages/dms/dms.container.jsx b/client/src/pages/dms/dms.container.jsx index 48d3a69d3..8fc496718 100644 --- a/client/src/pages/dms/dms.container.jsx +++ b/client/src/pages/dms/dms.container.jsx @@ -13,7 +13,7 @@ import queryString from "query-string"; import React, { useEffect, useRef, useState } from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; -import { useHistory, useLocation } from "react-router-dom"; +import { useHistory, useLocation, Link } from "react-router-dom"; import { createStructuredSelector } from "reselect"; import SocketIO from "socket.io-client"; import AlertComponent from "../../components/alert/alert.component"; @@ -138,13 +138,20 @@ export function DmsContainer({ bodyshop, setBreadcrumbs, setSelectedHeader }) {
+ {`${ + data && data.jobs_by_pk && data.jobs_by_pk.ro_number + }`} + {` | ${data.jobs_by_pk.ownr_fn || ""} ${ + data.jobs_by_pk.ownr_ln || "" + } ${data.jobs_by_pk.ownr_co_nm || ""} | ${ + data.jobs_by_pk.v_model_yr || "" + } ${data.jobs_by_pk.v_make_desc || ""} ${ + data.jobs_by_pk.v_model_desc || "" + }`} + + } socket={socket} jobId={jobId} /> From 8a42a995f7fb22dcc868fe8520ec28136a475ddd Mon Sep 17 00:00:00 2001 From: Patrick Fic <> Date: Mon, 27 Dec 2021 13:12:45 -0800 Subject: [PATCH 03/12] IO-1591 added labels to print center. --- bodyshop_translations.babel | 89 +++++++++++++++++++ client/package.json | 4 + .../print-center-jobs-labels.component.jsx | 83 +++++++++++++++++ .../print-center-jobs.component.jsx | 2 + client/src/translations/en_us/common.json | 6 ++ client/src/translations/es/common.json | 6 ++ client/src/translations/fr/common.json | 6 ++ client/src/utils/TemplateConstants.js | 6 ++ client/yarn.lock | 8 +- 9 files changed, 206 insertions(+), 4 deletions(-) create mode 100644 client/src/components/print-center-jobs-labels/print-center-jobs-labels.component.jsx diff --git a/bodyshop_translations.babel b/bodyshop_translations.babel index c6fbd2117..23adaf98d 100644 --- a/bodyshop_translations.babel +++ b/bodyshop_translations.babel @@ -14010,6 +14010,27 @@ + + print + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + refresh false @@ -34070,6 +34091,74 @@ + + labels + + + count + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + + + labels + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + + + position + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + + + mpi_animal_checklist false diff --git a/client/package.json b/client/package.json index 34ae41cea..71d7bfa89 100644 --- a/client/package.json +++ b/client/package.json @@ -111,9 +111,13 @@ "last 1 safari version" ] }, + "resolutions": { + "react-error-overlay": "6.0.9" + }, "devDependencies": { "@sentry/webpack-plugin": "^1.18.3", "@testing-library/cypress": "^8.0.2", + "react-error-overlay": "6.0.9", "cypress": "^9.1.1", "eslint-plugin-cypress": "^2.12.1", "redux-logger": "^3.0.6", diff --git a/client/src/components/print-center-jobs-labels/print-center-jobs-labels.component.jsx b/client/src/components/print-center-jobs-labels/print-center-jobs-labels.component.jsx new file mode 100644 index 000000000..a45339d56 --- /dev/null +++ b/client/src/components/print-center-jobs-labels/print-center-jobs-labels.component.jsx @@ -0,0 +1,83 @@ +import { Button, Card, Form, InputNumber, Popover } from "antd"; +import React, { useState } from "react"; +import { useTranslation } from "react-i18next"; +import { connect } from "react-redux"; +import { createStructuredSelector } from "reselect"; +import { selectBodyshop } from "../../redux/user/user.selectors"; +import { GenerateDocument } from "../../utils/RenderTemplate"; +import { TemplateList } from "../../utils/TemplateConstants"; + +const mapStateToProps = createStructuredSelector({ + bodyshop: selectBodyshop, +}); +const mapDispatchToProps = (dispatch) => ({ + //setUserLanguage: language => dispatch(setUserLanguage(language)) +}); +export default connect( + mapStateToProps, + mapDispatchToProps +)(PrintCenterJobsLabels); + +export function PrintCenterJobsLabels({ bodyshop, jobId }) { + const [isModalVisible, setIsModalVisible] = useState(false); + const [loading, setLoading] = useState(false); + const { t } = useTranslation(); + const [form] = Form.useForm(); + + const handleOk = () => { + form.submit(); + setIsModalVisible(false); + }; + + const handleCancel = () => { + setIsModalVisible(false); + setLoading(false); + }; + const handleFinish = async (values) => { + const { sendtype, ...restVals } = values; + setLoading(true); + await GenerateDocument( + { + name: TemplateList("job_special").folder_label_multiple.key, + variables: { id: jobId }, + context: restVals, + }, + {}, + "p" + ); + setLoading(false); + setIsModalVisible(false); + }; + + const content = ( + +
+ + + + + + + + + +
+ ); + return ( + + + + ); +} diff --git a/client/src/components/print-center-jobs/print-center-jobs.component.jsx b/client/src/components/print-center-jobs/print-center-jobs.component.jsx index 7773a89df..bd21a6e25 100644 --- a/client/src/components/print-center-jobs/print-center-jobs.component.jsx +++ b/client/src/components/print-center-jobs/print-center-jobs.component.jsx @@ -9,6 +9,7 @@ import { selectBodyshop } from "../../redux/user/user.selectors"; import { TemplateList } from "../../utils/TemplateConstants"; import Jobd3RdPartyModal from "../job-3rd-party-modal/job-3rd-party-modal.component"; import PrintCenterItem from "../print-center-item/print-center-item.component"; +import PrintCenterJobsLabels from "../print-center-jobs-labels/print-center-jobs-labels.component"; import PrintCenterSpeedPrint from "../print-center-speed-print/print-center-speed-print.component"; const mapStateToProps = createStructuredSelector({ printCenterModal: selectPrintCenter, @@ -52,6 +53,7 @@ export function PrintCenterJobsComponent({ printCenterModal, bodyshop }) { + setSearch(e.target.value)} diff --git a/client/src/translations/en_us/common.json b/client/src/translations/en_us/common.json index bfabd708d..78d35cd95 100644 --- a/client/src/translations/en_us/common.json +++ b/client/src/translations/en_us/common.json @@ -890,6 +890,7 @@ "deselectall": "Deselect All", "edit": "Edit", "login": "Login", + "print": "Print", "refresh": "Refresh", "remove": "Remove", "reset": "Reset your changes.", @@ -2032,6 +2033,11 @@ "job_costing_ro": "Job Costing", "job_notes": "Job Notes", "key_tag": "Key Tag", + "labels": { + "count": "Count", + "labels": "Labels", + "position": "Starting Position" + }, "mpi_animal_checklist": "MPI - Animal Checklist", "mpi_eglass_auth": "MPI - eGlass Auth", "mpi_final_acct_sheet": "MPI - Final Accounting Sheet", diff --git a/client/src/translations/es/common.json b/client/src/translations/es/common.json index 0edd70d22..758e2aa00 100644 --- a/client/src/translations/es/common.json +++ b/client/src/translations/es/common.json @@ -890,6 +890,7 @@ "deselectall": "", "edit": "Editar", "login": "", + "print": "", "refresh": "", "remove": "", "reset": " Restablecer a original.", @@ -2032,6 +2033,11 @@ "job_costing_ro": "", "job_notes": "", "key_tag": "", + "labels": { + "count": "", + "labels": "", + "position": "" + }, "mpi_animal_checklist": "", "mpi_eglass_auth": "", "mpi_final_acct_sheet": "", diff --git a/client/src/translations/fr/common.json b/client/src/translations/fr/common.json index f1debe9fd..5ec013d95 100644 --- a/client/src/translations/fr/common.json +++ b/client/src/translations/fr/common.json @@ -890,6 +890,7 @@ "deselectall": "", "edit": "modifier", "login": "", + "print": "", "refresh": "", "remove": "", "reset": " Rétablir l'original.", @@ -2032,6 +2033,11 @@ "job_costing_ro": "", "job_notes": "", "key_tag": "", + "labels": { + "count": "", + "labels": "", + "position": "" + }, "mpi_animal_checklist": "", "mpi_eglass_auth": "", "mpi_final_acct_sheet": "", diff --git a/client/src/utils/TemplateConstants.js b/client/src/utils/TemplateConstants.js index a62804e8b..b0cb049ab 100644 --- a/client/src/utils/TemplateConstants.js +++ b/client/src/utils/TemplateConstants.js @@ -464,6 +464,12 @@ export const TemplateList = (type, context) => { key: "special_thirdpartypayer", disabled: false, }, + folder_label_multiple: { + title: i18n.t("printcenter.jobs.folder_label_multiple"), + description: "Folder Label Multiple", + key: "folder_label_multiple", + disabled: false, + }, csi_invitation_action: { title: i18n.t("printcenter.jobs.csi_invitation_action"), description: "CSI invite", diff --git a/client/yarn.lock b/client/yarn.lock index 6f354ec84..cb4de1d5b 100644 --- a/client/yarn.lock +++ b/client/yarn.lock @@ -11842,10 +11842,10 @@ react-draggable@^4.0.0, react-draggable@^4.0.3: clsx "^1.1.1" prop-types "^15.6.0" -react-error-overlay@^6.0.9: - version "6.0.10" - resolved "https://registry.yarnpkg.com/react-error-overlay/-/react-error-overlay-6.0.10.tgz#0fe26db4fa85d9dbb8624729580e90e7159a59a6" - integrity sha512-mKR90fX7Pm5seCOfz8q9F+66VCc1PGsWSBxKbITjfKVQHMNF2zudxHnMdJiB1fRCb+XsbQV9sO9DCkgsMQgBIA== +react-error-overlay@6.0.9, react-error-overlay@^6.0.9: + version "6.0.9" + resolved "https://registry.yarnpkg.com/react-error-overlay/-/react-error-overlay-6.0.9.tgz#3c743010c9359608c375ecd6bc76f35d93995b0a" + integrity sha512-nQTTcUu+ATDbrSD1BZHr5kgSD4oF8OFjxun8uAaL8RwPBacGBNPf/yAuVVdx17N8XNzRDMrZ9XcKZHCjPW+9ew== react-grid-gallery@^0.5.5: version "0.5.5" From 4a46bdb9e8d03e6db2c0a368eea4e62f3586b1ce Mon Sep 17 00:00:00 2001 From: Patrick Fic <> Date: Tue, 28 Dec 2021 09:17:16 -0800 Subject: [PATCH 04/12] IO-1578 Add employee sorting to prod board. --- client/cypress/fixtures/users.json | 233 +----------------- .../production-list-columns.add.component.jsx | 1 + .../production-list-columns.data.js | 35 ++- ...ction-list-table-view-select.component.jsx | 1 + .../production-list-table.component.jsx | 1 + client/src/redux/store.js | 4 + 6 files changed, 42 insertions(+), 233 deletions(-) diff --git a/client/cypress/fixtures/users.json b/client/cypress/fixtures/users.json index 79b699aa7..fe51488c7 100644 --- a/client/cypress/fixtures/users.json +++ b/client/cypress/fixtures/users.json @@ -1,232 +1 @@ -[ - { - "id": 1, - "name": "Leanne Graham", - "username": "Bret", - "email": "Sincere@april.biz", - "address": { - "street": "Kulas Light", - "suite": "Apt. 556", - "city": "Gwenborough", - "zipcode": "92998-3874", - "geo": { - "lat": "-37.3159", - "lng": "81.1496" - } - }, - "phone": "1-770-736-8031 x56442", - "website": "hildegard.org", - "company": { - "name": "Romaguera-Crona", - "catchPhrase": "Multi-layered client-server neural-net", - "bs": "harness real-time e-markets" - } - }, - { - "id": 2, - "name": "Ervin Howell", - "username": "Antonette", - "email": "Shanna@melissa.tv", - "address": { - "street": "Victor Plains", - "suite": "Suite 879", - "city": "Wisokyburgh", - "zipcode": "90566-7771", - "geo": { - "lat": "-43.9509", - "lng": "-34.4618" - } - }, - "phone": "010-692-6593 x09125", - "website": "anastasia.net", - "company": { - "name": "Deckow-Crist", - "catchPhrase": "Proactive didactic contingency", - "bs": "synergize scalable supply-chains" - } - }, - { - "id": 3, - "name": "Clementine Bauch", - "username": "Samantha", - "email": "Nathan@yesenia.net", - "address": { - "street": "Douglas Extension", - "suite": "Suite 847", - "city": "McKenziehaven", - "zipcode": "59590-4157", - "geo": { - "lat": "-68.6102", - "lng": "-47.0653" - } - }, - "phone": "1-463-123-4447", - "website": "ramiro.info", - "company": { - "name": "Romaguera-Jacobson", - "catchPhrase": "Face to face bifurcated interface", - "bs": "e-enable strategic applications" - } - }, - { - "id": 4, - "name": "Patricia Lebsack", - "username": "Karianne", - "email": "Julianne.OConner@kory.org", - "address": { - "street": "Hoeger Mall", - "suite": "Apt. 692", - "city": "South Elvis", - "zipcode": "53919-4257", - "geo": { - "lat": "29.4572", - "lng": "-164.2990" - } - }, - "phone": "493-170-9623 x156", - "website": "kale.biz", - "company": { - "name": "Robel-Corkery", - "catchPhrase": "Multi-tiered zero tolerance productivity", - "bs": "transition cutting-edge web services" - } - }, - { - "id": 5, - "name": "Chelsey Dietrich", - "username": "Kamren", - "email": "Lucio_Hettinger@annie.ca", - "address": { - "street": "Skiles Walks", - "suite": "Suite 351", - "city": "Roscoeview", - "zipcode": "33263", - "geo": { - "lat": "-31.8129", - "lng": "62.5342" - } - }, - "phone": "(254)954-1289", - "website": "demarco.info", - "company": { - "name": "Keebler LLC", - "catchPhrase": "User-centric fault-tolerant solution", - "bs": "revolutionize end-to-end systems" - } - }, - { - "id": 6, - "name": "Mrs. Dennis Schulist", - "username": "Leopoldo_Corkery", - "email": "Karley_Dach@jasper.info", - "address": { - "street": "Norberto Crossing", - "suite": "Apt. 950", - "city": "South Christy", - "zipcode": "23505-1337", - "geo": { - "lat": "-71.4197", - "lng": "71.7478" - } - }, - "phone": "1-477-935-8478 x6430", - "website": "ola.org", - "company": { - "name": "Considine-Lockman", - "catchPhrase": "Synchronised bottom-line interface", - "bs": "e-enable innovative applications" - } - }, - { - "id": 7, - "name": "Kurtis Weissnat", - "username": "Elwyn.Skiles", - "email": "Telly.Hoeger@billy.biz", - "address": { - "street": "Rex Trail", - "suite": "Suite 280", - "city": "Howemouth", - "zipcode": "58804-1099", - "geo": { - "lat": "24.8918", - "lng": "21.8984" - } - }, - "phone": "210.067.6132", - "website": "elvis.io", - "company": { - "name": "Johns Group", - "catchPhrase": "Configurable multimedia task-force", - "bs": "generate enterprise e-tailers" - } - }, - { - "id": 8, - "name": "Nicholas Runolfsdottir V", - "username": "Maxime_Nienow", - "email": "Sherwood@rosamond.me", - "address": { - "street": "Ellsworth Summit", - "suite": "Suite 729", - "city": "Aliyaview", - "zipcode": "45169", - "geo": { - "lat": "-14.3990", - "lng": "-120.7677" - } - }, - "phone": "586.493.6943 x140", - "website": "jacynthe.com", - "company": { - "name": "Abernathy Group", - "catchPhrase": "Implemented secondary concept", - "bs": "e-enable extensible e-tailers" - } - }, - { - "id": 9, - "name": "Glenna Reichert", - "username": "Delphine", - "email": "Chaim_McDermott@dana.io", - "address": { - "street": "Dayna Park", - "suite": "Suite 449", - "city": "Bartholomebury", - "zipcode": "76495-3109", - "geo": { - "lat": "24.6463", - "lng": "-168.8889" - } - }, - "phone": "(775)976-6794 x41206", - "website": "conrad.com", - "company": { - "name": "Yost and Sons", - "catchPhrase": "Switchable contextually-based project", - "bs": "aggregate real-time technologies" - } - }, - { - "id": 10, - "name": "Clementina DuBuque", - "username": "Moriah.Stanton", - "email": "Rey.Padberg@karina.biz", - "address": { - "street": "Kattie Turnpike", - "suite": "Suite 198", - "city": "Lebsackbury", - "zipcode": "31428-2261", - "geo": { - "lat": "-38.2386", - "lng": "57.2232" - } - }, - "phone": "024-648-3804", - "website": "ambrose.net", - "company": { - "name": "Hoeger LLC", - "catchPhrase": "Centralized empowering task-force", - "bs": "target end-to-end models" - } - } -] \ No newline at end of file +[] diff --git a/client/src/components/production-list-columns/production-list-columns.add.component.jsx b/client/src/components/production-list-columns/production-list-columns.add.component.jsx index 8b671c54c..fb3575f5d 100644 --- a/client/src/components/production-list-columns/production-list-columns.add.component.jsx +++ b/client/src/components/production-list-columns/production-list-columns.add.component.jsx @@ -33,6 +33,7 @@ export function ProductionColumnsComponent({ setColumns([ ...columns, ...dataSource({ + bodyshop, technician, state: tableState, activeStatuses: bodyshop.md_ro_statuses.active_statuses, diff --git a/client/src/components/production-list-columns/production-list-columns.data.js b/client/src/components/production-list-columns/production-list-columns.data.js index 593c1b1ee..0072c0ca5 100644 --- a/client/src/components/production-list-columns/production-list-columns.data.js +++ b/client/src/components/production-list-columns/production-list-columns.data.js @@ -18,7 +18,7 @@ import ProductionListColumnNote from "./production-list-columns.productionnote.c import ProductionListColumnStatus from "./production-list-columns.status.component"; import ProductionlistColumnTouchTime from "./prodution-list-columns.touchtime.component"; -const r = ({ technician, state, activeStatuses }) => { +const r = ({ technician, state, activeStatuses, bodyshop }) => { return [ { title: i18n.t("jobs.actions.viewdetail"), @@ -353,6 +353,14 @@ const r = ({ technician, state, activeStatuses }) => { title: i18n.t("jobs.fields.employee_body"), dataIndex: "employee_body", key: "employee_body", + sortOrder: + state.sortedInfo.columnKey === "employee_body" && + state.sortedInfo.order, + sorter: (a, b) => + alphaSort( + bodyshop.employees.find((e) => e.id === a.employee_body)?.first_name, + bodyshop.employees.find((e) => e.id === b.employee_body)?.first_name + ), render: (text, record) => ( { title: i18n.t("jobs.fields.employee_prep"), dataIndex: "employee_prep", key: "employee_prep", + sortOrder: + state.sortedInfo.columnKey === "employee_prep" && + state.sortedInfo.order, + sorter: (a, b) => + alphaSort( + bodyshop.employees.find((e) => e.id === a.employee_prep)?.first_name, + bodyshop.employees.find((e) => e.id === b.employee_prep)?.first_name + ), render: (text, record) => ( { title: i18n.t("jobs.fields.employee_csr"), dataIndex: "employee_csr", key: "employee_csr", + sortOrder: + state.sortedInfo.columnKey === "employee_csr" && state.sortedInfo.order, + sorter: (a, b) => + alphaSort( + bodyshop.employees.find((e) => e.id === a.employee_csr)?.first_name, + bodyshop.employees.find((e) => e.id === b.employee_csr)?.first_name + ), render: (text, record) => ( ), @@ -383,6 +406,16 @@ const r = ({ technician, state, activeStatuses }) => { title: i18n.t("jobs.fields.employee_refinish"), dataIndex: "employee_refinish", key: "employee_refinish", + sortOrder: + state.sortedInfo.columnKey === "employee_refinish" && + state.sortedInfo.order, + sorter: (a, b) => + alphaSort( + bodyshop.employees.find((e) => e.id === a.employee_refinish) + ?.first_name, + bodyshop.employees.find((e) => e.id === b.employee_refinish) + ?.first_name + ), render: (text, record) => ( { return { ...ProductionListColumns({ + bodyshop, technician, state, activeStatuses: bodyshop.md_ro_statuses.active_statuses, diff --git a/client/src/components/production-list-table/production-list-table.component.jsx b/client/src/components/production-list-table/production-list-table.component.jsx index fe84a9f3a..dd2c5fc32 100644 --- a/client/src/components/production-list-table/production-list-table.component.jsx +++ b/client/src/components/production-list-table/production-list-table.component.jsx @@ -76,6 +76,7 @@ export function ProductionListTable({ matchingColumnConfig.columns.columnKeys.map((k) => { return { ...ProductionListColumns({ + bodyshop, technician, state, activeStatuses: bodyshop.md_ro_statuses.active_statuses, diff --git a/client/src/redux/store.js b/client/src/redux/store.js index e5aa4d5ed..852a371c2 100644 --- a/client/src/redux/store.js +++ b/client/src/redux/store.js @@ -48,3 +48,7 @@ initMessageListener(store); export const persistor = persistStore(store); const e = { store, persistStore }; export default e; + +if (window.Cypress) { + window.store = store; +} From 5ef1530d37456e6b823c59be72c141c6233613e8 Mon Sep 17 00:00:00 2001 From: Patrick Fic <> Date: Tue, 28 Dec 2021 09:42:23 -0800 Subject: [PATCH 05/12] IO-1542 Automatically set next contact date on intake. --- bodyshop_translations.babel | 23 ++++++++++++++++++- .../job-checklist-form.component.jsx | 10 ++++++++ .../shop-info/shop-info.intake.component.jsx | 6 +++++ client/src/translations/en_us/common.json | 1 + client/src/translations/es/common.json | 1 + client/src/translations/fr/common.json | 1 + 6 files changed, 41 insertions(+), 1 deletion(-) diff --git a/bodyshop_translations.babel b/bodyshop_translations.babel index 23adaf98d..7b94abb2f 100644 --- a/bodyshop_translations.babel +++ b/bodyshop_translations.babel @@ -1,4 +1,4 @@ - +