diff --git a/_reference/BodyshopFeatures.json b/_reference/BodyshopFeatures.json index a179d729b..cb67a2940 100644 --- a/_reference/BodyshopFeatures.json +++ b/_reference/BodyshopFeatures.json @@ -8,5 +8,7 @@ "export": "date", "csi": "Date", "courtesycars": "date", - "media": "date" + "media": "date", + "visualboard": "date", + "scoreboard": "date" } diff --git a/client/public/firebase-messaging-sw.js b/client/public/firebase-messaging-sw.js index 1cfcaeab7..388ea0614 100644 --- a/client/public/firebase-messaging-sw.js +++ b/client/public/firebase-messaging-sw.js @@ -28,8 +28,10 @@ switch (this.location.hostname) { // measurementId: "${config.measurementId}", }; break; - //TODO:AIO Update this for pro manager and include all .env files for server and client. case "romeonline.io": + case "test.romeonline.io": + case "test.promanager.web-est.com": + case "promanager.web-est.com": firebaseConfig = { apiKey: "AIzaSyAuLQR9SV5LsVxjU8wh9hvFLdhcAHU6cxE", authDomain: "rome-prod-1.firebaseapp.com", @@ -40,6 +42,7 @@ switch (this.location.hostname) { measurementId: "G-G8Z9DRHTZS", }; break; + case "imex.online": default: firebaseConfig = { diff --git a/client/src/App/themeProvider.js b/client/src/App/themeProvider.js index 13c2d250a..f8947ccc0 100644 --- a/client/src/App/themeProvider.js +++ b/client/src/App/themeProvider.js @@ -24,13 +24,15 @@ const defaultTheme = { }, }, token: { - colorPrimary: InstanceRenderMgr({ //TODO:AIO Add in ProMan colors. + colorPrimary: InstanceRenderMgr({ imex: '#1890ff', rome: '#326ade', + promanager:"#1d69a6" }), colorInfo: InstanceRenderMgr({ imex: '#1890ff', rome: '#326ade', + promanager:"#1d69a6" }), }, }; diff --git a/client/src/components/header/header.component.jsx b/client/src/components/header/header.component.jsx index 2ab7f92e9..dbe4bb026 100644 --- a/client/src/components/header/header.component.jsx +++ b/client/src/components/header/header.component.jsx @@ -343,19 +343,38 @@ function Header({ icon: , label: {t('menus.header.productionlist')}, }, - { - key: 'productionboard', - icon: , - label: {t('menus.header.productionboard')}, - }, - { - type: 'divider', - }, - { - key: 'scoreboard', - icon: , - label: {t('menus.header.scoreboard')}, - }, + ...(InstanceRenderManager({ + imex: true, + rome: true, + promanager: HasFeatureAccess({ featureName: 'visualboard', bodyshop }), + }) + ? [ + { + key: 'productionboard', + icon: , + label: ( + {t('menus.header.productionboard')} + ), + }, + ] + : []), + + ...(InstanceRenderManager({ + imex: true, + rome: true, + promanager: HasFeatureAccess({ featureName: 'scoreboard', bodyshop }), + }) + ? [ + { + type: 'divider', + }, + { + key: 'scoreboard', + icon: , + label: {t('menus.header.scoreboard')}, + }, + ] + : []), ], }, { 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 f8e700616..e808702d7 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 @@ -28,6 +28,7 @@ import {DateTimeFormatter} from "../../utils/DateFormatter"; import FormDateTimePickerComponent from "../form-date-time-picker/form-date-time-picker.component"; import dayjs from "../../utils/day"; import {useSplitTreatments} from "@splitsoftware/splitio-react"; +import InstanceRenderManager from "../../utils/instanceRenderMgr"; const mapStateToProps = createStructuredSelector({ bodyshop: selectBodyshop, @@ -635,36 +636,40 @@ export function JobsDetailHeaderActions({ disabled: job.status !== bodyshop.md_ro_statuses.default_scheduled, label: t("menus.jobsactions.cancelallappointments") }, - { - key: 'intake', - disabled: !!job.intakechecklist || !jobInPreProduction || !job.converted || jobRO, - label: !!job.intakechecklist || !jobInPreProduction || !job.converted || jobRO ? ( - t("jobs.actions.intake") - ) : ( - - {t("jobs.actions.intake")} - - ) - }, - { - key: 'deliver', - disabled: !jobInProduction || jobRO, - label: !jobInProduction ? ( - t("jobs.actions.deliver") - ) : ( - - {t("jobs.actions.deliver")} - - ) - }, - { - key: 'checklist', - disabled: !job.converted, - label: - {t("jobs.actions.viewchecklist")} - - }, - { + ...InstanceRenderManager({imex: [ { + key: 'intake', + disabled: !!job.intakechecklist || !jobInPreProduction || !job.converted || jobRO, + label: !!job.intakechecklist || !jobInPreProduction || !job.converted || jobRO ? ( + t("jobs.actions.intake") + ) : ( + + {t("jobs.actions.intake")} + + ) + }, + { + key: 'deliver', + disabled: !jobInProduction || jobRO, + label: !jobInProduction ? ( + t("jobs.actions.deliver") + ) : ( + + {t("jobs.actions.deliver")} + + ) + }, + { + key: 'checklist', + disabled: !job.converted, + label: + {t("jobs.actions.viewchecklist")} + + },], rome: "USE_IMEX", promanager:[]}), + ...(InstanceRenderManager({ + imex: true, + rome: "USE_IMEX", + promanager: HasFeatureAccess({ featureName: 'timetickets', bodyshop }), + }) ? [ { key: "entertimetickets", disabled: !job.converted || (!bodyshop.tt_allow_post_to_invoiced && job.date_invoiced), label: t("timetickets.actions.enter"), @@ -681,7 +686,8 @@ export function JobsDetailHeaderActions({ }, }); } - }]; + }] : []) + ]; if (bodyshop.md_tasks_presets.enable_tasks) { menuItems.push({ @@ -729,13 +735,15 @@ export function JobsDetailHeaderActions({ ); } - menuItems.push({ - key: 'cccontract', - disabled: jobRO || !job.converted, - label: - {t("menus.jobsactions.newcccontract")} - - }); + if(HasFeatureAccess({featureName: 'courtesycars'})){ + menuItems.push({ + key: 'cccontract', + disabled: jobRO || !job.converted, + label: + {t("menus.jobsactions.newcccontract")} + + }); + } menuItems.push( job.inproduction ? @@ -800,7 +808,11 @@ export function JobsDetailHeaderActions({ } ] }, - { + ... InstanceRenderManager({ + imex: true, + rome: true, + promanager: HasFeatureAccess({ featureName: 'bills', bodyshop }), + }) ? [ { key: 'postbills', disabled: !job.converted, label: t("jobs.actions.postbills"), @@ -814,7 +826,8 @@ export function JobsDetailHeaderActions({ }, }); } - }, + },] : [], + { key: 'addtopartsqueue', disabled: !job.converted || !jobInProduction || jobRO, @@ -867,14 +880,21 @@ export function JobsDetailHeaderActions({ } ); - menuItems.push( - { - key: 'exportcustdata', - disabled: !job.converted, - label: t("jobs.actions.exportcustdata"), - onClick: handleExportCustData - } - ); + if( InstanceRenderManager({ + imex: true, + rome: true, + promanager: HasFeatureAccess({ featureName: 'export', bodyshop }), + })){ + + menuItems.push( + { + key: 'exportcustdata', + disabled: !job.converted, + label: t("jobs.actions.exportcustdata"), + onClick: handleExportCustData + } + ); + } if (HasFeatureAccess({featureName: "csi", bodyshop})) { const children = [ diff --git a/client/src/components/jobs-detail-rates/jobs-detail-rates.taxes.component.jsx b/client/src/components/jobs-detail-rates/jobs-detail-rates.taxes.component.jsx index 739d3a3f9..165cf6e52 100644 --- a/client/src/components/jobs-detail-rates/jobs-detail-rates.taxes.component.jsx +++ b/client/src/components/jobs-detail-rates/jobs-detail-rates.taxes.component.jsx @@ -29,6 +29,7 @@ export function JobsDetailRatesTaxes({ rootElements: true, bodyshop, jobRO, + key: `root${tyCounter}` }) ); @@ -39,11 +40,13 @@ export function JobsDetailRatesTaxes({ typeNumIterator: iterator, rootElements: false, jobRO, + key: `nonroot${iterator}` + }) ); } formItems.push(<> - + {section} @@ -71,13 +74,15 @@ function TaxFormItems({ rootElements, bodyshopjobRO, jobRO, + key }) { const {t} = useTranslation(); if (rootElements) return ( - <> + - + ); return ( @@ -102,6 +107,7 @@ function TaxFormItems({ typeNum, typeNumIterator, })} + key={key + "tax_tier"} rules={[ { required: true, @@ -117,6 +123,7 @@ function TaxFormItems({ typeNum, typeNumIterator, })} + key={key + "tax_thres"} rules={[ { required: true, @@ -132,6 +139,7 @@ function TaxFormItems({ typeNum, typeNumIterator, })} + key={key + "tax_rate"} rules={[ { required: true, @@ -147,6 +155,7 @@ function TaxFormItems({ typeNum, typeNumIterator, })} + key={key + "tax_sur"} rules={[ { required: true, diff --git a/client/src/components/production-board-kanban/production-board-kanban.component.jsx b/client/src/components/production-board-kanban/production-board-kanban.component.jsx index 08a0b0df1..46de15a16 100644 --- a/client/src/components/production-board-kanban/production-board-kanban.component.jsx +++ b/client/src/components/production-board-kanban/production-board-kanban.component.jsx @@ -130,7 +130,6 @@ export function ProductionBoardKanbanComponent({ newChildCard ? newChildCard.id : null, newChildCardNewParent ), - // TODO: optimisticResponse }); insertAuditTrail({ jobid: card.id, diff --git a/client/src/components/time-ticket-modal/time-ticket-modal.component.jsx b/client/src/components/time-ticket-modal/time-ticket-modal.component.jsx index 3b56e7f09..08e77ac5b 100644 --- a/client/src/components/time-ticket-modal/time-ticket-modal.component.jsx +++ b/client/src/components/time-ticket-modal/time-ticket-modal.component.jsx @@ -244,15 +244,14 @@ export function TimeTicketModalComponent({ > - { - // TODO:AIO Check if this is still needed? - } - - form.setFieldsValue({productivehrs}) - } - /> + { + // + // form.setFieldsValue({productivehrs}) + // } + // /> + } )} diff --git a/client/src/pages/production-board/production-board.container.jsx b/client/src/pages/production-board/production-board.container.jsx index 33d60ebc6..a91c26dcb 100644 --- a/client/src/pages/production-board/production-board.container.jsx +++ b/client/src/pages/production-board/production-board.container.jsx @@ -37,7 +37,7 @@ export function ProductionBoardContainer({ }, [t, setBreadcrumbs, setSelectedHeader]); return ( - + diff --git a/client/src/redux/user/user.sagas.js b/client/src/redux/user/user.sagas.js index 4e238cda2..6b19ab2c6 100644 --- a/client/src/redux/user/user.sagas.js +++ b/client/src/redux/user/user.sagas.js @@ -260,8 +260,7 @@ export function* sendPasswordResetEmailSaga({payload}) { try { yield sendPasswordResetEmail(auth, payload, { url: - InstanceRenderManager({imex: "https://imex.online/passwordreset", rome:"https://romeonline.io/passwordreset"}) - //TODO:AIO Update for Promanager firebase instance. + InstanceRenderManager({imex: "https://imex.online/passwordreset", rome:"https://romeonline.io/passwordreset", promanager:"https:promanager.web-est.com/passwordreset"}) , });