Merge branch 'test-AIO' into feature/IO-2458-RO-Closer

# Conflicts:
#	client/src/components/job-bills-total/job-bills-total.component.jsx
#	client/src/components/job-costing-statistics/job-costing-statistics.component.jsx
#	client/src/components/job-lifecycle/job-lifecycle.component.jsx
#	client/src/components/job-payments/job-payments.component.jsx
#	client/src/components/labor-allocations-table/labor-allocations-table.component.jsx
#	client/src/components/labor-allocations-table/labor-allocations-table.payroll.component.jsx
#	client/src/components/shop-info/shop-info.component.jsx
#	client/src/graphql/bodyshop.queries.js
#	client/src/graphql/jobs.queries.js
#	client/src/pages/jobs-close/jobs-close.component.jsx
#	client/src/utils/instanceRenderMgr.js
This commit is contained in:
Patrick Fic
2024-04-04 11:12:49 -07:00
878 changed files with 101740 additions and 115371 deletions

View File

@@ -1,10 +1,10 @@
import { useSplitTreatments } from '@splitsoftware/splitio-react';
import { Button, Card, Tabs } from 'antd';
import { useSplitTreatments } from '@splitsoftware/splitio-react';
import { Button, Card, Tabs } from 'antd';
import React from 'react';
import { useTranslation } from 'react-i18next';
import { connect } from 'react-redux';
import { createStructuredSelector } from 'reselect';
import { selectBodyshop } from '../../redux/user/user.selectors';
import { useTranslation } from 'react-i18next';
import { connect } from 'react-redux';
import { createStructuredSelector } from 'reselect';
import { selectBodyshop } from '../../redux/user/user.selectors';
import ShopInfoGeneral from './shop-info.general.component';
import ShopInfoIntakeChecklistComponent from './shop-info.intake.component';
import ShopInfoLaborRates from './shop-info.laborrates.component';
@@ -15,14 +15,14 @@ import ShopInfoResponsibilityCenterComponent from './shop-info.responsibilitycen
import ShopInfoROStatusComponent from './shop-info.rostatus.component';
import ShopInfoSchedulingComponent from './shop-info.scheduling.component';
import ShopInfoSpeedPrint from './shop-info.speedprint.component';
import { useLocation, useNavigate } from 'react-router-dom';
import { useLocation, useNavigate } from 'react-router-dom';
import ShopInfoTaskPresets from './shop-info.task-presets.component';
import queryString from 'query-string';
import InstanceRenderManager from '../../utils/instanceRenderMgr';
import ShopInfoRoGuard from './shop-info.roguard.component';
const mapStateToProps = createStructuredSelector({
bodyshop: selectBodyshop,
bodyshop: selectBodyshop
});
const mapDispatchToProps = (dispatch) => ({
//setUserLanguage: language => dispatch(setUserLanguage(language))
@@ -31,11 +31,11 @@ export default connect(mapStateToProps, mapDispatchToProps)(ShopInfoComponent);
export function ShopInfoComponent({ bodyshop, form, saveLoading }) {
const {
treatments: { CriticalPartsScanning, Enhanced_Payroll },
treatments: { CriticalPartsScanning, Enhanced_Payroll }
} = useSplitTreatments({
attributes: {},
names: ['CriticalPartsScanning', 'Enhanced_Payroll'],
splitKey: bodyshop.imexshopid,
names: ["CriticalPartsScanning", "Enhanced_Payroll"],
splitKey: bodyshop.imexshopid
});
const { t } = useTranslation();
@@ -45,91 +45,91 @@ export function ShopInfoComponent({ bodyshop, form, saveLoading }) {
const tabItems = [
{
key: 'general',
label: t('bodyshop.labels.shopinfo'),
children: <ShopInfoGeneral form={form} />,
key: "general",
label: t("bodyshop.labels.shopinfo"),
children: <ShopInfoGeneral form={form} />
},
{
key: 'speedprint',
label: t('bodyshop.labels.speedprint'),
children: <ShopInfoSpeedPrint form={form} />,
key: "speedprint",
label: t("bodyshop.labels.speedprint"),
children: <ShopInfoSpeedPrint form={form} />
},
{
key: 'rbac',
label: t('bodyshop.labels.rbac'),
children: <ShopInfoRbacComponent form={form} />,
key: "rbac",
label: t("bodyshop.labels.rbac"),
children: <ShopInfoRbacComponent form={form} />
},
{
key: 'roStatus',
label: t('bodyshop.labels.jobstatuses'),
children: <ShopInfoROStatusComponent form={form} />,
key: "roStatus",
label: t("bodyshop.labels.jobstatuses"),
children: <ShopInfoROStatusComponent form={form} />
},
{
key: 'scheduling',
label: t('bodyshop.labels.scheduling'),
children: <ShopInfoSchedulingComponent form={form} />,
key: "scheduling",
label: t("bodyshop.labels.scheduling"),
children: <ShopInfoSchedulingComponent form={form} />
},
{
key: 'orderStatus',
label: t('bodyshop.labels.orderstatuses'),
children: <ShopInfoOrderStatusComponent form={form} />,
key: "orderStatus",
label: t("bodyshop.labels.orderstatuses"),
children: <ShopInfoOrderStatusComponent form={form} />
},
{
key: 'responsibilityCenters',
label: t('bodyshop.labels.responsibilitycenters.title'),
children: <ShopInfoResponsibilityCenterComponent form={form} />,
key: "responsibilityCenters",
label: t("bodyshop.labels.responsibilitycenters.title"),
children: <ShopInfoResponsibilityCenterComponent form={form} />
},
...InstanceRenderManager({
imex: [
{
key: 'checklists',
label: t('bodyshop.labels.checklists'),
children: <ShopInfoIntakeChecklistComponent form={form} />,
},
key: "checklists",
label: t("bodyshop.labels.checklists"),
children: <ShopInfoIntakeChecklistComponent form={form} />
}
],
rome: 'USE_IMEX',
promanager: [],
rome: "USE_IMEX",
promanager: []
}),
{
key: 'laborrates',
label: t('bodyshop.labels.laborrates'),
children: <ShopInfoLaborRates form={form} />,
key: "laborrates",
label: t("bodyshop.labels.laborrates"),
children: <ShopInfoLaborRates form={form} />
},
...(CriticalPartsScanning.treatment === 'on'
...(CriticalPartsScanning.treatment === "on"
? [
{
key: 'partsscan',
label: t('bodyshop.labels.partsscan'),
children: <ShopInfoPartsScan form={form} />,
},
key: "partsscan",
label: t("bodyshop.labels.partsscan"),
children: <ShopInfoPartsScan form={form} />
}
]
: []),
...(Enhanced_Payroll.treatment === 'on'
...(Enhanced_Payroll.treatment === "on"
? [
{
key: 'task-presets',
label: t('bodyshop.labels.task-presets'),
children: <ShopInfoTaskPresets form={form} />,
},
key: "task-presets",
label: t("bodyshop.labels.task-presets"),
children: <ShopInfoTaskPresets form={form} />
}
]
: []),
...InstanceRenderManager({
imex: [
{
key: 'roguard',
label: t('bodyshop.labels.roguard.title'),
children: <ShopInfoRoGuard form={form} />,
},
],
rome: 'USE_IMEX',
promanager: [],
}),
...InstanceRenderManager({
imex: [
{
key: 'roguard',
label: t('bodyshop.labels.roguard.title'),
children: <ShopInfoRoGuard form={form} />,
},
],
rome: 'USE_IMEX',
promanager: [],
}),
];
return (
<Card
extra={
<Button type="primary" loading={saveLoading} onClick={() => form.submit()}>
{t('general.actions.save')}
{t("general.actions.save")}
</Button>
}
>
@@ -137,7 +137,7 @@ export function ShopInfoComponent({ bodyshop, form, saveLoading }) {
defaultActiveKey={search.subtab}
onChange={(key) =>
history({
search: `?tab=${search.tab}&subtab=${key}`,
search: `?tab=${search.tab}&subtab=${key}`
})
}
items={tabItems}