feature/IO-3357-Reynolds-and-Reynolds-DMS-API-Integration - Update useTreatments with useTreatmentsWithConfig

This commit is contained in:
Dave
2025-12-15 19:17:28 -05:00
parent 007bfef791
commit d8815e3e08
56 changed files with 112 additions and 112 deletions

View File

@@ -1,4 +1,4 @@
import { useTreatments } from "@splitsoftware/splitio-react";
import { useTreatmentsWithConfig } from "@splitsoftware/splitio-react";
import { Button, Card, Tabs } from "antd";
import queryString from "query-string";
import { useTranslation } from "react-i18next";
@@ -36,7 +36,7 @@ export default connect(mapStateToProps, mapDispatchToProps)(ShopInfoComponent);
export function ShopInfoComponent({ bodyshop, form, saveLoading }) {
const {
treatments: { CriticalPartsScanning, Enhanced_Payroll }
} = useTreatments({
} = useTreatmentsWithConfig({
attributes: {},
names: ["CriticalPartsScanning", "Enhanced_Payroll"],
splitKey: bodyshop.imexshopid

View File

@@ -1,5 +1,5 @@
import { DeleteFilled } from "@ant-design/icons";
import { useTreatments } from "@splitsoftware/splitio-react";
import { useTreatmentsWithConfig } from "@splitsoftware/splitio-react";
import { Button, DatePicker, Form, Input, InputNumber, Radio, Select, Space, Switch } from "antd";
import { useTranslation } from "react-i18next";
import { connect } from "react-redux";
@@ -28,7 +28,7 @@ export function ShopInfoGeneral({ form, bodyshop }) {
const {
treatments: { ClosingPeriod, ADPPayroll }
} = useTreatments({
} = useTreatmentsWithConfig({
attributes: {},
names: ["ClosingPeriod", "ADPPayroll"],
splitKey: bodyshop?.imexshopid

View File

@@ -4,7 +4,7 @@ import LayoutFormRow from "../layout-form-row/layout-form-row.component";
import { connect } from "react-redux";
import { createStructuredSelector } from "reselect";
import { selectBodyshop } from "../../redux/user/user.selectors";
import { useTreatments } from "@splitsoftware/splitio-react";
import { useTreatmentsWithConfig } from "@splitsoftware/splitio-react";
const mapStateToProps = createStructuredSelector({
bodyshop: selectBodyshop
@@ -19,7 +19,7 @@ export function ShopInfoOrderStatusComponent({ bodyshop }) {
const {
treatments: { OEConnection }
} = useTreatments({
} = useTreatmentsWithConfig({
attributes: {},
names: ["OEConnection"],
splitKey: bodyshop.imexshopid

View File

@@ -1,4 +1,4 @@
import { useTreatments } from "@splitsoftware/splitio-react";
import { useTreatmentsWithConfig } from "@splitsoftware/splitio-react";
import { Form, InputNumber } from "antd";
import { useTranslation } from "react-i18next";
import { connect } from "react-redux";
@@ -20,7 +20,7 @@ export function ShopInfoRbacComponent({ bodyshop }) {
const { t } = useTranslation();
const {
treatments: { Simple_Inventory }
} = useTreatments({
} = useTreatmentsWithConfig({
attributes: {},
names: ["Simple_Inventory"],
splitKey: bodyshop && bodyshop.imexshopid

View File

@@ -1,5 +1,5 @@
import { DeleteFilled } from "@ant-design/icons";
import { useTreatments } from "@splitsoftware/splitio-react";
import { useTreatmentsWithConfig } from "@splitsoftware/splitio-react";
import { Button, Form, Input, InputNumber, Select, Space, Switch } from "antd";
import { useState } from "react";
import { useTranslation } from "react-i18next";
@@ -36,7 +36,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
const {
treatments: { Qb_Multi_Ar, DmsAp }
} = useTreatments({
} = useTreatmentsWithConfig({
attributes: {},
names: ["Qb_Multi_Ar", "DmsAp"],
splitKey: bodyshop?.imexshopid

View File

@@ -9,7 +9,7 @@ import LayoutFormRow from "../layout-form-row/layout-form-row.component";
import { connect } from "react-redux";
import { createStructuredSelector } from "reselect";
import { selectBodyshop } from "../../redux/user/user.selectors";
import { useTreatments } from "@splitsoftware/splitio-react";
import { useTreatmentsWithConfig } from "@splitsoftware/splitio-react";
const mapStateToProps = createStructuredSelector({
bodyshop: selectBodyshop
@@ -31,7 +31,7 @@ export function ShopInfoROStatusComponent({ bodyshop, form }) {
const {
treatments: { Production_List_Status_Colors }
} = useTreatments({
} = useTreatmentsWithConfig({
attributes: {},
names: ["Production_List_Status_Colors"],
splitKey: bodyshop.imexshopid