|
|
|
|
@@ -12,6 +12,8 @@ import FormListMoveArrows from "../form-list-move-arrows/form-list-move-arrows.c
|
|
|
|
|
import { buildSectionActionButton, renderListOrEmpty } from "../layout-form-row/config-list-actions.utils.jsx";
|
|
|
|
|
import InlineValidatedFormRow from "../layout-form-row/inline-validated-form-row.component.jsx";
|
|
|
|
|
import LayoutFormRow from "../layout-form-row/layout-form-row.component";
|
|
|
|
|
import { selectBodyshop } from "../../redux/user/user.selectors";
|
|
|
|
|
import { bodyshopHasDmsKey, DMS_MAP, getDmsMode } from "../../utils/dmsUtils.js";
|
|
|
|
|
import {
|
|
|
|
|
INLINE_TITLE_GROUP_STYLE,
|
|
|
|
|
INLINE_TITLE_HANDLE_STYLE,
|
|
|
|
|
@@ -25,16 +27,21 @@ import {
|
|
|
|
|
|
|
|
|
|
const timeZonesList = Intl.supportedValuesOf("timeZone");
|
|
|
|
|
|
|
|
|
|
const mapStateToProps = createStructuredSelector({});
|
|
|
|
|
const mapStateToProps = createStructuredSelector({
|
|
|
|
|
bodyshop: selectBodyshop
|
|
|
|
|
});
|
|
|
|
|
const mapDispatchToProps = () => ({
|
|
|
|
|
//setUserLanguage: language => dispatch(setUserLanguage(language))
|
|
|
|
|
});
|
|
|
|
|
export default connect(mapStateToProps, mapDispatchToProps)(ShopInfoGeneral);
|
|
|
|
|
|
|
|
|
|
export function ShopInfoGeneral({ form }) {
|
|
|
|
|
export function ShopInfoGeneral({ form, bodyshop }) {
|
|
|
|
|
const { t } = useTranslation();
|
|
|
|
|
const insuranceCompanies = Form.useWatch(["md_ins_cos"], form) || [];
|
|
|
|
|
const duplicateInsuranceCompanyIndexes = getDuplicateIndexSetByNormalizedName(insuranceCompanies, "name");
|
|
|
|
|
const hasDMSKey = bodyshop ? bodyshopHasDmsKey(bodyshop) : false;
|
|
|
|
|
const dmsMode = bodyshop ? getDmsMode(bodyshop, "off") : "none";
|
|
|
|
|
const isReynoldsMode = hasDMSKey && dmsMode === DMS_MAP.reynolds;
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<div>
|
|
|
|
|
@@ -174,7 +181,9 @@ export function ShopInfoGeneral({ form }) {
|
|
|
|
|
>
|
|
|
|
|
<div aria-hidden style={INLINE_TITLE_SEPARATOR_STYLE} />
|
|
|
|
|
<div style={INLINE_TITLE_SWITCH_GROUP_STYLE}>
|
|
|
|
|
<div style={INLINE_TITLE_LABEL_STYLE}>{t("bodyshop.fields.scoreboard_setup.ignore_blocked_days")}</div>
|
|
|
|
|
<div style={INLINE_TITLE_LABEL_STYLE}>
|
|
|
|
|
{t("bodyshop.fields.scoreboard_setup.ignore_blocked_days")}
|
|
|
|
|
</div>
|
|
|
|
|
<Form.Item noStyle name={["scoreboard_target", "ignoreblockeddays"]} valuePropName="checked">
|
|
|
|
|
<Switch />
|
|
|
|
|
</Form.Item>
|
|
|
|
|
@@ -311,7 +320,12 @@ export function ShopInfoGeneral({ form }) {
|
|
|
|
|
</Form.Item>
|
|
|
|
|
</Col>
|
|
|
|
|
<Col xs={24} sm={12} xl={8}>
|
|
|
|
|
<Form.Item key="use_fippa" label={t("bodyshop.fields.use_fippa")} name={["use_fippa"]} valuePropName="checked">
|
|
|
|
|
<Form.Item
|
|
|
|
|
key="use_fippa"
|
|
|
|
|
label={t("bodyshop.fields.use_fippa")}
|
|
|
|
|
name={["use_fippa"]}
|
|
|
|
|
valuePropName="checked"
|
|
|
|
|
>
|
|
|
|
|
<Switch />
|
|
|
|
|
</Form.Item>
|
|
|
|
|
</Col>
|
|
|
|
|
@@ -478,7 +492,12 @@ export function ShopInfoGeneral({ form }) {
|
|
|
|
|
<div style={INLINE_TITLE_LABEL_STYLE}>
|
|
|
|
|
{t("bodyshop.fields.system_settings.job_costing.use_paint_scale_data")}
|
|
|
|
|
</div>
|
|
|
|
|
<Form.Item noStyle key="use_paint_scale_data" name={["use_paint_scale_data"]} valuePropName="checked">
|
|
|
|
|
<Form.Item
|
|
|
|
|
noStyle
|
|
|
|
|
key="use_paint_scale_data"
|
|
|
|
|
name={["use_paint_scale_data"]}
|
|
|
|
|
valuePropName="checked"
|
|
|
|
|
>
|
|
|
|
|
<Switch />
|
|
|
|
|
</Form.Item>
|
|
|
|
|
</div>
|
|
|
|
|
@@ -558,7 +577,12 @@ export function ShopInfoGeneral({ form }) {
|
|
|
|
|
</Form.Item>
|
|
|
|
|
</LayoutFormRow>
|
|
|
|
|
|
|
|
|
|
<LayoutFormRow header={t("bodyshop.labels.shop_enabled_features")} id="sharing" grow style={{ marginBottom: 0 }}>
|
|
|
|
|
<LayoutFormRow
|
|
|
|
|
header={t("bodyshop.labels.shop_enabled_features")}
|
|
|
|
|
id="sharing"
|
|
|
|
|
grow
|
|
|
|
|
style={{ marginBottom: 0 }}
|
|
|
|
|
>
|
|
|
|
|
<Form.Item
|
|
|
|
|
label={t("general.actions.sharetoteams")}
|
|
|
|
|
valuePropName="checked"
|
|
|
|
|
@@ -566,6 +590,16 @@ export function ShopInfoGeneral({ form }) {
|
|
|
|
|
>
|
|
|
|
|
<Switch />
|
|
|
|
|
</Form.Item>
|
|
|
|
|
{isReynoldsMode && (
|
|
|
|
|
<Form.Item
|
|
|
|
|
initialValue
|
|
|
|
|
label={t("bodyshop.fields.md_functionality_toggles.enhanced_early_ros")}
|
|
|
|
|
name={["md_functionality_toggles", "enhanced_early_ros"]}
|
|
|
|
|
valuePropName="checked"
|
|
|
|
|
>
|
|
|
|
|
<Switch />
|
|
|
|
|
</Form.Item>
|
|
|
|
|
)}
|
|
|
|
|
</LayoutFormRow>
|
|
|
|
|
</div>
|
|
|
|
|
</>
|
|
|
|
|
|