diff --git a/bodyshop_translations.babel b/bodyshop_translations.babel index f3cad4697..735dea603 100644 --- a/bodyshop_translations.babel +++ b/bodyshop_translations.babel @@ -16045,6 +16045,27 @@ + + ins_co_nm_short + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + ins_ct_fn false diff --git a/client/package.json b/client/package.json index 9561bdf8b..b61b47ab6 100644 --- a/client/package.json +++ b/client/package.json @@ -61,6 +61,7 @@ "analyze": "source-map-explorer 'build/static/js/*.js'", "start": "craco start", "build": "REACT_APP_GIT_SHA=`git rev-parse --short HEAD` craco build", + "buildcra": "REACT_APP_GIT_SHA=`git rev-parse --short HEAD` react-scripts build", "build-deploy": "REACT_APP_GIT_SHA=`git rev-parse --short HEAD` craco build && s3cmd sync build/* s3://imex-online-production && echo '🚀 Deployed!'", "test": "craco test", "eject": "react-scripts eject", diff --git a/client/src/App/App.container.jsx b/client/src/App/App.container.jsx index 48d94ebe6..e91795b0d 100644 --- a/client/src/App/App.container.jsx +++ b/client/src/App/App.container.jsx @@ -15,7 +15,7 @@ export default function AppContainer() { return ( diff --git a/client/src/App/App.jsx b/client/src/App/App.jsx index df68084f2..c07f5cc6b 100644 --- a/client/src/App/App.jsx +++ b/client/src/App/App.jsx @@ -1,4 +1,3 @@ - import React, { lazy, Suspense, useEffect } from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; @@ -48,48 +47,46 @@ export function App({ checkUserSession, currentUser }) { } return ( -
- - }> - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ + }> + + + + + + + + + + + + + + + + + + + + + + + + + + ); } diff --git a/client/src/App/App.styles.scss b/client/src/App/App.styles.scss index d5c268956..ae6596dd5 100644 --- a/client/src/App/App.styles.scss +++ b/client/src/App/App.styles.scss @@ -77,7 +77,7 @@ .ant-picker-input, .ant-picker, .ant-select { - width: 100%; + width: 100% !important; } .production-alert { diff --git a/client/src/components/breadcrumbs/breadcrumbs.styles.scss b/client/src/components/breadcrumbs/breadcrumbs.styles.scss index e5a1661df..945243db3 100644 --- a/client/src/components/breadcrumbs/breadcrumbs.styles.scss +++ b/client/src/components/breadcrumbs/breadcrumbs.styles.scss @@ -1,3 +1,3 @@ .breadcrumb-container { - margin: 0.5rem 4rem; + margin: 0.2rem 0.2rem 0.8rem 0.2rem; } diff --git a/client/src/components/chat-open-button/chat-open-button.component.jsx b/client/src/components/chat-open-button/chat-open-button.component.jsx index b47fd1918..31929af57 100644 --- a/client/src/components/chat-open-button/chat-open-button.component.jsx +++ b/client/src/components/chat-open-button/chat-open-button.component.jsx @@ -1,10 +1,10 @@ -import { MessageFilled } from "@ant-design/icons"; import { notification } from "antd"; import parsePhoneNumber from "libphonenumber-js"; import React from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; import { openChatByPhone } from "../../redux/messaging/messaging.actions"; +import PhoneNumberFormatter from "../../utils/PhoneFormatter"; const mapDispatchToProps = (dispatch) => ({ openChatByPhone: (phone) => dispatch(openChatByPhone(phone)), @@ -12,16 +12,13 @@ const mapDispatchToProps = (dispatch) => ({ export function ChatOpenButton({ phone, jobid, openChatByPhone }) { const { t } = useTranslation(); + if (!phone) return <>; return ( - { e.stopPropagation(); const p = parsePhoneNumber(phone, "CA"); - console.log( - "🚀 ~ file: chat-open-button.component.jsx ~ line 21 ~ p", - p - ); if (p && p.isValid()) { openChatByPhone({ phone_num: p.formatInternational(), jobid: jobid }); @@ -29,7 +26,9 @@ export function ChatOpenButton({ phone, jobid, openChatByPhone }) { notification["error"]({ message: t("messaging.error.invalidphone") }); } }} - /> + > + {phone} + ); } export default connect(null, mapDispatchToProps)(ChatOpenButton); diff --git a/client/src/components/data-label/data-label.component.jsx b/client/src/components/data-label/data-label.component.jsx index 3e28c056e..ebb4bd252 100644 --- a/client/src/components/data-label/data-label.component.jsx +++ b/client/src/components/data-label/data-label.component.jsx @@ -1,3 +1,4 @@ +import { Typography } from "antd"; import React from "react"; export default function DataLabel({ @@ -11,14 +12,28 @@ export default function DataLabel({ if (!visible || (hideIfNull && !!!children)) return null; return ( -
+
{`${label}: `}
-
- {children} + }} + > + {`${label}:`} +
+
+ {typeof children === "string" ? ( + {children} + ) : ( + children + )}
); diff --git a/client/src/components/form-fields-changed-alert/form-fields-changed-alert.component.jsx b/client/src/components/form-fields-changed-alert/form-fields-changed-alert.component.jsx index 60c84e059..b040db770 100644 --- a/client/src/components/form-fields-changed-alert/form-fields-changed-alert.component.jsx +++ b/client/src/components/form-fields-changed-alert/form-fields-changed-alert.component.jsx @@ -13,10 +13,7 @@ export default function FormsFieldChanged({ form }) { const loc = useLocation(); return ( - + {() => { if (form.isFieldsTouched()) return ( diff --git a/client/src/components/header/header.component.jsx b/client/src/components/header/header.component.jsx index c7df31bd2..6a96c399b 100644 --- a/client/src/components/header/header.component.jsx +++ b/client/src/components/header/header.component.jsx @@ -14,7 +14,7 @@ import Icon, { UnorderedListOutlined, UserOutlined, } from "@ant-design/icons"; -import { Avatar, Menu } from "antd"; +import { Menu } from "antd"; import React from "react"; import { useTranslation } from "react-i18next"; import { BsKanban } from "react-icons/bs"; @@ -67,10 +67,10 @@ function Header({ const { t } = useTranslation(); return ( -
+
{t("menus.header.shop_csi")} - - - + + + + - {currentUser.photoURL ? ( - - ) : ( - } - /> - )} - - {currentUser.displayName || - currentUser.email || - t("general.labels.unknown")} -
+ currentUser.displayName || + currentUser.email || + t("general.labels.unknown") } > signOutStart()}> diff --git a/client/src/components/jira-support-widget/jira-support-widget.component.jsx b/client/src/components/jira-support-widget/jira-support-widget.component.jsx index 4e727708b..83eb45367 100644 --- a/client/src/components/jira-support-widget/jira-support-widget.component.jsx +++ b/client/src/components/jira-support-widget/jira-support-widget.component.jsx @@ -8,17 +8,8 @@ export default function JiraSupportComponent() { const useScript = () => { useEffect(() => { - console.log("Creating JIRA widget."); const script = document.createElement("script"); script.src = "https://jsd-widget.atlassian.com/assets/embed.js"; - // script["data-jsd-embedded"] = true; - // script["data-key"] = "d69bb65c-1dd3-483f-b109-66a970d03f44"; - // script["data-base-url"] = "https://jsd-widget.atlassian.com"; - - // script.attributes.setNamedItem("data-jsd-embedded"); - // script.attributes.setNamedItem("data-key"); - // script.attributes.setNamedItem("data-base-url"); - script.setAttribute("data-jsd-embedded", true); script.setAttribute("data-key", "d69bb65c-1dd3-483f-b109-66a970d03f44"); script.setAttribute("data-base-url", "https://jsd-widget.atlassian.com"); diff --git a/client/src/components/job-costing-modal/job-costing-modal.component.jsx b/client/src/components/job-costing-modal/job-costing-modal.component.jsx index ab99d2512..24d277ca2 100644 --- a/client/src/components/job-costing-modal/job-costing-modal.component.jsx +++ b/client/src/components/job-costing-modal/job-costing-modal.component.jsx @@ -136,7 +136,7 @@ export function JobCostingModalComponent({ bodyshop, job }) { let gppercentFormatted; if (isNaN(gppercent)) gppercentFormatted = "0%"; - else if (!isFinite(gppercent)) gppercentFormatted = "-∞"; + else if (!isFinite(gppercent)) gppercentFormatted = "- ∞"; else { gppercentFormatted = `${gppercent}%`; } diff --git a/client/src/components/job-detail-cards/job-detail-cards.component.jsx b/client/src/components/job-detail-cards/job-detail-cards.component.jsx index 253204d41..4f49d5b39 100644 --- a/client/src/components/job-detail-cards/job-detail-cards.component.jsx +++ b/client/src/components/job-detail-cards/job-detail-cards.component.jsx @@ -1,6 +1,6 @@ import { PrinterFilled } from "@ant-design/icons"; import { useQuery } from "@apollo/client"; -import { Button, Col, Drawer, Grid, PageHeader, Row, Space, Tag } from "antd"; +import { Button, Card, Drawer, Grid, PageHeader, Space, Tag } from "antd"; import queryString from "query-string"; import React from "react"; import { useTranslation } from "react-i18next"; @@ -25,15 +25,6 @@ const mapDispatchToProps = (dispatch) => ({ dispatch(setModalContext({ context: context, modal: "printCenter" })), }); -const colBreakPoints = { - xs: { - span: 24, - }, - sm: { - span: 12, - }, -}; - export function JobDetailCards({ setPrintCenterContext }) { const selectedBreakpoint = Object.entries(Grid.useBreakpoint()) .filter((screen) => !!screen[1]) @@ -69,20 +60,23 @@ export function JobDetailCards({ setPrintCenterContext }) { }), }); }; - + const gridStyle = { + width: "25%", + textAlign: "center", + }; return ( {loading ? : null} {error ? : null} {data ? ( , , @@ -99,79 +93,80 @@ export function JobDetailCards({ setPrintCenterContext }) { {t("jobs.labels.inproduction")} , ]} - title={ - - {data.jobs_by_pk.ro_number || t("general.labels.na")} - - } subTitle={data.jobs_by_pk.status} - extra={ - - - - - - - } > - - + + {data.jobs_by_pk.ro_number || t("general.labels.na")} + + } + extra={ + + + + + + + } + > + - - + + - - + + - - + + - - + + - - + + - - + + - - + + ) : null} diff --git a/client/src/components/jobs-available-table/jobs-available-table.container.jsx b/client/src/components/jobs-available-table/jobs-available-table.container.jsx index ddaf92432..f985741c2 100644 --- a/client/src/components/jobs-available-table/jobs-available-table.container.jsx +++ b/client/src/components/jobs-available-table/jobs-available-table.container.jsx @@ -246,10 +246,6 @@ export function JobsAvailableContainer({ bodyshop, currentUser }) { const newTotals = await Axios.post("/job/totalsssu", { id: selectedJob, }); - console.log( - "🚀 ~ file: jobs-available-table.container.jsx ~ line 247 ~ newTotals", - newTotals - ); if (newTotals.status !== 200) { notification["error"]({ diff --git a/client/src/components/jobs-change-status/jobs-change-status.component.jsx b/client/src/components/jobs-change-status/jobs-change-status.component.jsx index 4cde14909..441f2f8a9 100644 --- a/client/src/components/jobs-change-status/jobs-change-status.component.jsx +++ b/client/src/components/jobs-change-status/jobs-change-status.component.jsx @@ -1,7 +1,7 @@ import { DownCircleFilled } from "@ant-design/icons"; +import { useMutation } from "@apollo/client"; import { Button, Dropdown, Menu, notification } from "antd"; import React, { useEffect, useState } from "react"; -import { useMutation } from "@apollo/client"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; import { createStructuredSelector } from "reselect"; @@ -90,14 +90,15 @@ export function JobsChangeStatus({ job, bodyshop, jobRO }) { return ( - ); diff --git a/client/src/components/jobs-convert-button/jobs-convert-button.component.jsx b/client/src/components/jobs-convert-button/jobs-convert-button.component.jsx index 1c8366813..43b581252 100644 --- a/client/src/components/jobs-convert-button/jobs-convert-button.component.jsx +++ b/client/src/components/jobs-convert-button/jobs-convert-button.component.jsx @@ -110,13 +110,14 @@ export function JobsConvertButton({ bodyshop, job, refetch, jobRO }) {
); + if (job.converted) return <>; + return ( ); diff --git a/client/src/components/jobs-detail-header/jobs-detail-header.component.jsx b/client/src/components/jobs-detail-header/jobs-detail-header.component.jsx index ef59daafc..81f71d1e9 100644 --- a/client/src/components/jobs-detail-header/jobs-detail-header.component.jsx +++ b/client/src/components/jobs-detail-header/jobs-detail-header.component.jsx @@ -1,21 +1,15 @@ -import { PrinterFilled } from "@ant-design/icons"; -import { Button, Divider, PageHeader, Tag } from "antd"; +import { Card, Col, Row, Tag } from "antd"; import React, { useMemo } from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; +import { Link } from "react-router-dom"; import { createStructuredSelector } from "reselect"; import { selectJobReadOnly } from "../../redux/application/application.selectors"; import { setModalContext } from "../../redux/modals/modals.actions"; import { selectBodyshop } from "../../redux/user/user.selectors"; import CurrencyFormatter from "../../utils/CurrencyFormatter"; -import JobEmployeeAssignments from "../job-employee-assignments/job-employee-assignments.container"; -import JobSyncButton from "../job-sync-button/job-sync-button.component"; -import JobsChangeStatus from "../jobs-change-status/jobs-change-status.component"; -import JobsConvertButton from "../jobs-convert-button/jobs-convert-button.component"; -import JobsDetailHeaderActions from "../jobs-detail-header-actions/jobs-detail-header-actions.component"; -import OwnerTagPopoverComponent from "../owner-tag-popover/owner-tag-popover.component"; -import ProductionListColumnProductionNote from "../production-list-columns/production-list-columns.productionnote.component"; -import VehicleTagPopoverComponent from "../vehicle-tag-popover/vehicle-tag-popover.component"; +import ChatOpenButton from "../chat-open-button/chat-open-button.component"; +import DataLabel from "../data-label/data-label.component"; import "./jobs-detail-header.styles.scss"; const mapStateToProps = createStructuredSelector({ @@ -45,80 +39,127 @@ export function JobsDetailHeader({ ); }, [job.status, bodyshop.md_ro_statuses.post_production_statuses]); - const menuExtra = ( -
- - - - - - -
- ); + const gridStyle = { + flex: 1, + //textAlign: "center", + }; return ( - , - , - - {t("jobs.labels.inproduction")} - , - - {job.clm_total} - / - {job.owner_owing} - , - ]} - extra={menuExtra} - > -
- {(job.inproduction || jobInPostProduction) && ( - <> -
-
- {t("jobs.fields.production_vars.note")} -
- + + + +
+ + {job.status} + {job.inproduction && ( + + + {t("jobs.labels.inproduction")} + + + )} + + + {job.ins_co_nm} + + {job.clm_no} + + {job.clm_total} + / + {job.owner_owing} + +
+
+ + + + +
+ + {job.ownr_ph1 || ""} + + + {`${job.ownr_addr1 || ""} ${job.ownr_addr2 || ""} ${ + job.ownr_city || "" + } ${job.ownr_st || ""} ${job.ownr_zip || ""}`} + + + {job.ownr_ea || ""} +
- - - )} - - -
- + + + + + + +
+ + {`${job.plate_no || t("general.labels.na")} (${`${ + job.plate_st || t("general.labels.na") + }`})`} + + + {`${job.v_vin || t("general.labels.na")}`} + +
+
+ + + ); + + // return ( + // , + // , + // + // {t("jobs.labels.inproduction")} + // , + // + // {job.clm_total} + // / + // {job.owner_owing} + // , + // ]} + // extra={menuExtra} + // > + //
+ // {(job.inproduction || jobInPostProduction) && ( + // <> + //
+ //
+ // {t("jobs.fields.production_vars.note")} + //
+ // + //
+ // + // + // )} + + // + //
+ //
+ // ); } export default connect(mapStateToProps, mapDispatchToProps)(JobsDetailHeader); diff --git a/client/src/components/jobs-list/jobs-list.component.jsx b/client/src/components/jobs-list/jobs-list.component.jsx index 46c133059..91fc0d2f1 100644 --- a/client/src/components/jobs-list/jobs-list.component.jsx +++ b/client/src/components/jobs-list/jobs-list.component.jsx @@ -1,6 +1,6 @@ import { SyncOutlined } from "@ant-design/icons"; import { useQuery } from "@apollo/client"; -import { Button, Input, Table } from "antd"; +import { Button, Card, Input, Space, Table } from "antd"; import queryString from "query-string"; import React, { useState } from "react"; import { useTranslation } from "react-i18next"; @@ -11,7 +11,6 @@ import { QUERY_ALL_ACTIVE_JOBS } from "../../graphql/jobs.queries"; import { selectBodyshop } from "../../redux/user/user.selectors"; import { onlyUnique } from "../../utils/arrayHelper"; import CurrencyFormatter from "../../utils/CurrencyFormatter"; -import PhoneFormatter from "../../utils/PhoneFormatter"; import { alphaSort } from "../../utils/sorters"; import AlertComponent from "../alert/alert.component"; import StartChatButton from "../chat-open-button/chat-open-button.component"; @@ -130,14 +129,10 @@ export function JobsList({ bodyshop }) { dataIndex: "ownr_ph1", key: "ownr_ph1", ellipsis: true, - render: (text, record) => { - return record.ownr_ph1 ? ( - - {record.ownr_ph1} - - - ) : null; - }, + responsive: ["md"], + render: (text, record) => ( + + ), }, { @@ -160,9 +155,6 @@ export function JobsList({ bodyshop }) { })) || [], onFilter: (value, record) => value.includes(record.status), - render: (text, record) => { - return record.status || t("general.labels.na"); - }, }, { @@ -188,28 +180,20 @@ export function JobsList({ bodyshop }) { title: t("vehicles.fields.plate_no"), dataIndex: "plate_no", key: "plate_no", + responsive: ["md"], sorter: (a, b) => alphaSort(a.plate_no, b.plate_no), sortOrder: state.sortedInfo.columnKey === "plate_no" && state.sortedInfo.order, - render: (text, record) => { - return record.plate_no ? record.plate_no : ""; - }, }, { title: t("jobs.fields.clm_no"), dataIndex: "clm_no", key: "clm_no", ellipsis: true, + responsive: ["md"], sorter: (a, b) => alphaSort(a.clm_no, b.clm_no), sortOrder: state.sortedInfo.columnKey === "clm_no" && state.sortedInfo.order, - render: (text, record) => { - return record.clm_no ? ( - {record.clm_no} - ) : ( - t("general.labels.unknown") - ); - }, }, { title: t("jobs.fields.ins_co_nm"), @@ -224,68 +208,65 @@ export function JobsList({ bodyshop }) { sorter: (a, b) => a.clm_total - b.clm_total, sortOrder: state.sortedInfo.columnKey === "clm_total" && state.sortedInfo.order, - render: (text, record) => { - return record.clm_total ? ( - {record.clm_total} - ) : ( - t("general.labels.unknown") - ); - }, - }, - { - title: t("jobs.fields.owner_owing"), - dataIndex: "owner_owing", - key: "owner_owing", render: (text, record) => ( - {record.owner_owing} + {record.clm_total} ), }, + // { + // title: t("jobs.fields.owner_owing"), + // dataIndex: "owner_owing", + // key: "owner_owing", + // responsive: ["md"], + // render: (text, record) => ( + // {record.owner_owing} + // ), + // }, ]; return ( - { - return ( -
- - { - setSearchText(e.target.value); - }} - value={searchText} - enterButton - /> -
- ); - }} - rowSelection={{ - onSelect: (record) => { - handleOnRowClick(record); - }, - selectedRowKeys: [selected], - type: "radio", - }} - onChange={handleTableChange} - onRow={(record, rowIndex) => { - return { - onClick: (event) => { + + + { + setSearchText(e.target.value); + }} + value={searchText} + enterButton + /> + + } + > +
{ handleOnRowClick(record); }, - }; - }} - /> + selectedRowKeys: [selected], + type: "radio", + }} + onChange={handleTableChange} + onRow={(record, rowIndex) => { + return { + onClick: (event) => { + handleOnRowClick(record); + }, + }; + }} + /> + ); } diff --git a/client/src/components/rbac-wrapper/rbac-wrapper.component.jsx b/client/src/components/rbac-wrapper/rbac-wrapper.component.jsx index 6da4f06a2..107adbb89 100644 --- a/client/src/components/rbac-wrapper/rbac-wrapper.component.jsx +++ b/client/src/components/rbac-wrapper/rbac-wrapper.component.jsx @@ -35,7 +35,8 @@ function RbacWrapper({ authLevel || (!bodyshop.md_rbac && rbacDefaults[action] <= authLevel) ) - return
{React.cloneElement(children, restProps)}
; + return children; + //return
{React.cloneElement(children, restProps)}
; return ( noauth || ( diff --git a/client/src/index.js b/client/src/index.js index 84daa4195..b4bd1b00c 100644 --- a/client/src/index.js +++ b/client/src/index.js @@ -42,7 +42,7 @@ ReactDOM.render( } + loading={} persistor={persistor} > @@ -54,7 +54,6 @@ ReactDOM.render( const onServiceWorkerUpdate = (registration) => { console.log("onServiceWorkerUpdate", registration); - const key = `open${Date.now()}`; const btn = ( + + + + + ); + return ( - } - > +
@@ -146,23 +140,16 @@ export function JobsDetailPage({ onFinish={handleFinish} {...formItemLayout} autoComplete={"off"} - initialValues={{ - ...job, - loss_date: job.loss_date ? moment(job.loss_date) : null, - date_estimated: job.date_estimated - ? moment(job.date_estimated) - : null, - }} + initialValues={transormJobToForm(job)} > - - - window.history.back()} + title={job.ro_number || t("general.labels.na")} + extra={menuExtra} /> + + + history.push({ search: `?tab=${key}` })} @@ -271,33 +258,17 @@ export function JobsDetailPage({ > - { - // - // - // {t("jobs.labels.audit")} - // - // } - // key="audit" - // > - // - // - // - // - // {t("jobs.labels.checklists")} - // - // } - // key="checklists" - // > - // - // - } - +
); } -export default connect(mapStateToProps, null)(JobsDetailPage); +export default connect(mapStateToProps, mapDispatchToProps)(JobsDetailPage); + +const transormJobToForm = (job) => { + return { + ...job, + loss_date: job.loss_date ? moment(job.loss_date) : null, + date_estimated: job.date_estimated ? moment(job.date_estimated) : null, + }; +}; diff --git a/client/src/pages/jobs/jobs.page.jsx b/client/src/pages/jobs/jobs.page.jsx index 9c106e594..865d8a6f7 100644 --- a/client/src/pages/jobs/jobs.page.jsx +++ b/client/src/pages/jobs/jobs.page.jsx @@ -3,11 +3,11 @@ import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; import JobDetailCards from "../../components/job-detail-cards/job-detail-cards.component"; import JobsList from "../../components/jobs-list/jobs-list.component"; +import RbacWrapper from "../../components/rbac-wrapper/rbac-wrapper.component"; import { setBreadcrumbs, setSelectedHeader, } from "../../redux/application/application.actions"; -import RbacWrapper from "../../components/rbac-wrapper/rbac-wrapper.component"; const mapDispatchToProps = (dispatch) => ({ setBreadcrumbs: (breadcrumbs) => dispatch(setBreadcrumbs(breadcrumbs)), @@ -27,10 +27,8 @@ export function JobsPage({ setBreadcrumbs, setSelectedHeader }) { return ( -
- - -
+ +
); } diff --git a/client/src/pages/manage/manage.page.component.jsx b/client/src/pages/manage/manage.page.component.jsx index ea7af17dc..26bc8e504 100644 --- a/client/src/pages/manage/manage.page.component.jsx +++ b/client/src/pages/manage/manage.page.component.jsx @@ -12,15 +12,14 @@ import ChatAffixContainer from "../../components/chat-affix/chat-affix.container import ConflictComponent from "../../components/conflict/conflict.component"; import ErrorBoundary from "../../components/error-boundary/error-boundary.component"; import FcmNotification from "../../components/fcm-notification/fcm-notification.component"; -import ShopSubStatusComponent from "../../components/shop-sub-status/shop-sub-status.component"; //import FooterComponent from "../../components/footer/footer.component"; //Component Imports - import HeaderContainer from "../../components/header/header.container"; import JiraSupportComponent from "../../components/jira-support-widget/jira-support-widget.component"; import LoadingSpinner from "../../components/loading-spinner/loading-spinner.component"; import PartnerPingComponent from "../../components/partner-ping/partner-ping.component"; import PrintCenterModalContainer from "../../components/print-center-modal/print-center-modal.container"; +import ShopSubStatusComponent from "../../components/shop-sub-status/shop-sub-status.component"; import TestComponent from "../../components/_test/test.component"; import { QUERY_STRIPE_ID } from "../../graphql/bodyshop.queries"; import { @@ -34,6 +33,7 @@ const ManageRootPage = lazy(() => import("../manage-root/manage-root.page.container") ); const JobsPage = lazy(() => import("../jobs/jobs.page")); + const JobsDetailPage = lazy(() => import("../jobs-detail/jobs-detail.page.container") ); @@ -154,7 +154,7 @@ const EmailTest = lazy(() => import("../../components/email-test/email-test-component") ); -const { Content, Header } = Layout; +const { Content, Footer } = Layout; const stripePromise = new Promise((resolve, reject) => { client.query({ query: QUERY_STRIPE_ID }).then((resp) => { @@ -197,7 +197,6 @@ export function Manage({ match, conflict, bodyshop }) { - -
- -
+ + {PageContent} - -
-
- {`ImEX Online V.${process.env.NODE_ENV} - ${ - process.env.REACT_APP_GIT_SHA - } - ${preval`module.exports = new Date().toLocaleString();`}`} +
+
+
+ {`ImEX Online V.${process.env.NODE_ENV} - ${ + process.env.REACT_APP_GIT_SHA + } - ${preval`module.exports = new Date().toLocaleString();`}`} +
+ + Disclaimer + +
- - Disclaimer - - -
+ ); diff --git a/client/src/pages/manage/manage.page.container.jsx b/client/src/pages/manage/manage.page.container.jsx index c3e5903b6..047a2d4d3 100644 --- a/client/src/pages/manage/manage.page.container.jsx +++ b/client/src/pages/manage/manage.page.container.jsx @@ -2,21 +2,17 @@ import { useQuery } from "@apollo/client"; import React, { useEffect } from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; -import { createStructuredSelector } from "reselect"; import AlertComponent from "../../components/alert/alert.component"; import LoadingSpinner from "../../components/loading-spinner/loading-spinner.component"; import { QUERY_BODYSHOP } from "../../graphql/bodyshop.queries"; import { setBodyshop } from "../../redux/user/user.actions"; -import { selectBodyshop } from "../../redux/user/user.selectors"; import ManagePage from "./manage.page.component"; -const mapStateToProps = createStructuredSelector({ bodyshop: selectBodyshop }); - const mapDispatchToProps = (dispatch) => ({ setBodyshop: (bs) => dispatch(setBodyshop(bs)), }); -function ManagePageContainer({ match, setBodyshop, bodyshop }) { +function ManagePageContainer({ match, setBodyshop }) { const { loading, error, data } = useQuery(QUERY_BODYSHOP, { fetchPolicy: "network-only", }); @@ -34,7 +30,4 @@ function ManagePageContainer({ match, setBodyshop, bodyshop }) { return ; } -export default connect( - mapStateToProps, - mapDispatchToProps -)(ManagePageContainer); +export default connect(null, mapDispatchToProps)(ManagePageContainer); diff --git a/client/src/pages/manage/manage.page.styles.scss b/client/src/pages/manage/manage.page.styles.scss index 3584339fe..845ead709 100644 --- a/client/src/pages/manage/manage.page.styles.scss +++ b/client/src/pages/manage/manage.page.styles.scss @@ -1,12 +1,8 @@ .content-container { - overflow-y: auto; - margin: 1rem 1rem 0rem 1rem; - padding: 0.25rem 2.5rem 1rem 2.5rem; - border-radius: 4px; - background: #fff; - padding-bottom: 3rem; + padding: 1rem; } .layout-container { height: 100vh; + overflow-y: auto; } diff --git a/client/src/translations/en_us/common.json b/client/src/translations/en_us/common.json index 8bc03ecc1..4331073ae 100644 --- a/client/src/translations/en_us/common.json +++ b/client/src/translations/en_us/common.json @@ -1001,6 +1001,7 @@ "ins_city": "Insurance City", "ins_co_id": "Insurance Co. ID", "ins_co_nm": "Insurance Company Name", + "ins_co_nm_short": "Ins. Co.", "ins_ct_fn": "File Handler First Name", "ins_ct_ln": "File Handler Last Name", "ins_ea": "File Handler Email", diff --git a/client/src/translations/es/common.json b/client/src/translations/es/common.json index cbf8d7cb7..f65be0f01 100644 --- a/client/src/translations/es/common.json +++ b/client/src/translations/es/common.json @@ -1001,6 +1001,7 @@ "ins_city": "Ciudad de seguros", "ins_co_id": "ID de la compañía de seguros", "ins_co_nm": "Nombre de la compañía de seguros", + "ins_co_nm_short": "", "ins_ct_fn": "Nombre del controlador de archivos", "ins_ct_ln": "Apellido del manejador de archivos", "ins_ea": "Correo electrónico del controlador de archivos", diff --git a/client/src/translations/fr/common.json b/client/src/translations/fr/common.json index d8e896df9..326d033bf 100644 --- a/client/src/translations/fr/common.json +++ b/client/src/translations/fr/common.json @@ -1001,6 +1001,7 @@ "ins_city": "Insurance City", "ins_co_id": "ID de la compagnie d'assurance", "ins_co_nm": "Nom de la compagnie d'assurance", + "ins_co_nm_short": "", "ins_ct_fn": "Prénom du gestionnaire de fichiers", "ins_ct_ln": "Nom du gestionnaire de fichiers", "ins_ea": "Courriel du gestionnaire de fichiers", diff --git a/client/src/utils/usetraceupdate.jsx b/client/src/utils/usetraceupdate.jsx new file mode 100644 index 000000000..acf37bbcb --- /dev/null +++ b/client/src/utils/usetraceupdate.jsx @@ -0,0 +1,18 @@ +import React, { useEffect, useRef } from "react"; +function useTraceUpdate(props) { + const prev = useRef(props); + useEffect(() => { + const changedProps = Object.entries(props).reduce((ps, [k, v]) => { + if (prev.current[k] !== v) { + ps[k] = [prev.current[k], v]; + } + return ps; + }, {}); + if (Object.keys(changedProps).length > 0) { + console.log("Changed props:", changedProps); + } + prev.current = props; + }); +} + +export default useTraceUpdate;