diff --git a/client/src/components/bill-enter-modal/bill-enter-modal.container.jsx b/client/src/components/bill-enter-modal/bill-enter-modal.container.jsx index 1255353af..9ce7928f6 100644 --- a/client/src/components/bill-enter-modal/bill-enter-modal.container.jsx +++ b/client/src/components/bill-enter-modal/bill-enter-modal.container.jsx @@ -1,5 +1,5 @@ import { useApolloClient, useMutation } from "@apollo/client"; -import { useTreatments } from "@splitsoftware/splitio-react"; +import { useTreatmentsWithConfig } from "@splitsoftware/splitio-react"; import { Button, Checkbox, Form, Modal, Space } from "antd"; import _ from "lodash"; import { useEffect, useMemo, useState } from "react"; @@ -56,7 +56,7 @@ function BillEnterModalContainer({ billEnterModal, toggleModalVisible, bodyshop, const { treatments: { Enhanced_Payroll, Imgproxy } - } = useTreatments({ + } = useTreatmentsWithConfig({ attributes: {}, names: ["Enhanced_Payroll", "Imgproxy"], splitKey: bodyshop.imexshopid diff --git a/client/src/components/bill-form/bill-form.component.jsx b/client/src/components/bill-form/bill-form.component.jsx index c7d8c1f50..a64d66582 100644 --- a/client/src/components/bill-form/bill-form.component.jsx +++ b/client/src/components/bill-form/bill-form.component.jsx @@ -1,6 +1,6 @@ import Icon, { UploadOutlined } from "@ant-design/icons"; import { useApolloClient } from "@apollo/client"; -import { useTreatments } from "@splitsoftware/splitio-react"; +import { useTreatmentsWithConfig } from "@splitsoftware/splitio-react"; import { Alert, Divider, Form, Input, Select, Space, Statistic, Switch, Upload } from "antd"; import { useEffect, useState } from "react"; import { useTranslation } from "react-i18next"; @@ -51,7 +51,7 @@ export function BillFormComponent({ const { treatments: { Extended_Bill_Posting, ClosingPeriod } - } = useTreatments({ + } = useTreatmentsWithConfig({ attributes: {}, names: ["Extended_Bill_Posting", "ClosingPeriod"], splitKey: bodyshop.imexshopid diff --git a/client/src/components/bill-form/bill-form.container.jsx b/client/src/components/bill-form/bill-form.container.jsx index cd6d18aba..b09830179 100644 --- a/client/src/components/bill-form/bill-form.container.jsx +++ b/client/src/components/bill-form/bill-form.container.jsx @@ -1,5 +1,5 @@ import { useLazyQuery, useQuery } from "@apollo/client"; -import { useTreatments } from "@splitsoftware/splitio-react"; +import { useTreatmentsWithConfig } from "@splitsoftware/splitio-react"; import { connect } from "react-redux"; import { createStructuredSelector } from "reselect"; import { QUERY_OUTSTANDING_INVENTORY } from "../../graphql/inventory.queries"; @@ -18,7 +18,7 @@ const mapStateToProps = createStructuredSelector({ export function BillFormContainer({ bodyshop, form, billEdit, disabled, disableInvNumber, disableInHouse }) { const { treatments: { Simple_Inventory } - } = useTreatments({ + } = useTreatmentsWithConfig({ attributes: {}, names: ["Simple_Inventory"], splitKey: bodyshop && bodyshop.imexshopid diff --git a/client/src/components/bill-form/bill-form.lines.component.jsx b/client/src/components/bill-form/bill-form.lines.component.jsx index c4a398faa..c030878f0 100644 --- a/client/src/components/bill-form/bill-form.lines.component.jsx +++ b/client/src/components/bill-form/bill-form.lines.component.jsx @@ -1,5 +1,5 @@ import { DeleteFilled, DollarCircleFilled } from "@ant-design/icons"; -import { useTreatments } from "@splitsoftware/splitio-react"; +import { useTreatmentsWithConfig } from "@splitsoftware/splitio-react"; import { Button, Checkbox, Form, Input, InputNumber, Select, Space, Switch, Table, Tooltip } from "antd"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; @@ -34,7 +34,7 @@ export function BillEnterModalLinesComponent({ const { treatments: { Simple_Inventory, Enhanced_Payroll } - } = useTreatments({ + } = useTreatmentsWithConfig({ attributes: {}, names: ["Simple_Inventory", "Enhanced_Payroll"], splitKey: bodyshop && bodyshop.imexshopid diff --git a/client/src/components/breadcrumbs/breadcrumbs.component.jsx b/client/src/components/breadcrumbs/breadcrumbs.component.jsx index 3d1ea5a1e..2ca9fcde0 100644 --- a/client/src/components/breadcrumbs/breadcrumbs.component.jsx +++ b/client/src/components/breadcrumbs/breadcrumbs.component.jsx @@ -8,7 +8,7 @@ import { selectBodyshop } from "../../redux/user/user.selectors"; import GlobalSearch from "../global-search/global-search.component"; import GlobalSearchOs from "../global-search/global-search-os.component"; import "./breadcrumbs.styles.scss"; -import { useTreatments } from "@splitsoftware/splitio-react"; +import { useTreatmentsWithConfig } from "@splitsoftware/splitio-react"; const mapStateToProps = createStructuredSelector({ breadcrumbs: selectBreadcrumbs, @@ -19,7 +19,7 @@ const mapStateToProps = createStructuredSelector({ export function BreadCrumbs({ breadcrumbs, bodyshop, isPartsEntry }) { const { treatments: { OpenSearch } - } = useTreatments({ + } = useTreatmentsWithConfig({ attributes: {}, names: ["OpenSearch"], splitKey: bodyshop?.imexshopid diff --git a/client/src/components/chat-media-selector/chat-media-selector.component.jsx b/client/src/components/chat-media-selector/chat-media-selector.component.jsx index e64ed46e0..676aa4fef 100644 --- a/client/src/components/chat-media-selector/chat-media-selector.component.jsx +++ b/client/src/components/chat-media-selector/chat-media-selector.component.jsx @@ -1,6 +1,6 @@ import { PictureFilled } from "@ant-design/icons"; import { useQuery } from "@apollo/client"; -import { useTreatments } from "@splitsoftware/splitio-react"; +import { useTreatmentsWithConfig } from "@splitsoftware/splitio-react"; import { Badge, Popover } from "antd"; import { useEffect, useState } from "react"; import { useTranslation } from "react-i18next"; @@ -28,7 +28,7 @@ export function ChatMediaSelector({ bodyshop, selectedMedia, setSelectedMedia, c const [open, setOpen] = useState(false); const { treatments: { Imgproxy } - } = useTreatments({ + } = useTreatmentsWithConfig({ attributes: {}, names: ["Imgproxy"], splitKey: bodyshop && bodyshop.imexshopid diff --git a/client/src/components/dms-cdk-makes/dms-cdk-makes.refetch.component.jsx b/client/src/components/dms-cdk-makes/dms-cdk-makes.refetch.component.jsx index 0725bd02d..641f0e8c1 100644 --- a/client/src/components/dms-cdk-makes/dms-cdk-makes.refetch.component.jsx +++ b/client/src/components/dms-cdk-makes/dms-cdk-makes.refetch.component.jsx @@ -5,7 +5,7 @@ import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; import { createStructuredSelector } from "reselect"; import { selectBodyshop, selectCurrentUser } from "../../redux/user/user.selectors"; -import { useTreatments } from "@splitsoftware/splitio-react"; +import { useTreatmentsWithConfig } from "@splitsoftware/splitio-react"; const mapStateToProps = createStructuredSelector({ currentUser: selectCurrentUser, @@ -21,7 +21,7 @@ export function DmsCdkMakesRefetch({ currentUser, bodyshop }) { const { t } = useTranslation(); const { treatments: { Fortellis } - } = useTreatments({ + } = useTreatmentsWithConfig({ attributes: {}, names: ["Fortellis"], splitKey: bodyshop.imexshopid diff --git a/client/src/components/dms-post-form/cdklike-dms-post-form.jsx b/client/src/components/dms-post-form/cdklike-dms-post-form.jsx index d2ddebcb8..0132eaf9a 100644 --- a/client/src/components/dms-post-form/cdklike-dms-post-form.jsx +++ b/client/src/components/dms-post-form/cdklike-dms-post-form.jsx @@ -26,7 +26,7 @@ import DmsCdkMakesRefetch from "../dms-cdk-makes/dms-cdk-makes.refetch.component import DateTimePicker from "../form-date-time-picker/form-date-time-picker.component.jsx"; import CurrencyInput from "../form-items-formatted/currency-form-item.component"; import { DMS_MAP } from "../../utils/dmsUtils"; -import { useTreatments } from "@splitsoftware/splitio-react"; +import { useTreatmentsWithConfig } from "@splitsoftware/splitio-react"; /** * CDK-like DMS post form: @@ -50,7 +50,7 @@ export default function CdkLikePostForm({ bodyshop, socket, job, logsRef, mode, const { treatments: { Fortellis } - } = useTreatments({ + } = useTreatmentsWithConfig({ attributes: {}, names: ["Fortellis"], splitKey: bodyshop.imexshopid diff --git a/client/src/components/email-documents/email-documents.component.jsx b/client/src/components/email-documents/email-documents.component.jsx index 04124184c..8ce2427fc 100644 --- a/client/src/components/email-documents/email-documents.component.jsx +++ b/client/src/components/email-documents/email-documents.component.jsx @@ -9,7 +9,7 @@ import AlertComponent from "../alert/alert.component"; import JobDocumentsGalleryExternal from "../jobs-documents-gallery/jobs-documents-gallery.external.component"; import JobsDocumentsLocalGalleryExternalComponent from "../jobs-documents-local-gallery/jobs-documents-local-gallery.external.component"; import LoadingSpinner from "../loading-spinner/loading-spinner.component"; -import { useTreatments } from "@splitsoftware/splitio-react"; +import { useTreatmentsWithConfig } from "@splitsoftware/splitio-react"; import JobsDocumentImgproxyGalleryExternal from "../jobs-documents-imgproxy-gallery/jobs-documents-imgproxy-gallery.external.component"; const mapStateToProps = createStructuredSelector({ @@ -26,7 +26,7 @@ export function EmailDocumentsComponent({ emailConfig, form, selectedMediaState, const { t } = useTranslation(); const { treatments: { Imgproxy } - } = useTreatments({ + } = useTreatmentsWithConfig({ attributes: {}, names: ["Imgproxy"], splitKey: bodyshop?.imexshopid diff --git a/client/src/components/header/header.component.jsx b/client/src/components/header/header.component.jsx index e22c7616f..cf19f585f 100644 --- a/client/src/components/header/header.component.jsx +++ b/client/src/components/header/header.component.jsx @@ -2,7 +2,7 @@ import { BellFilled } from "@ant-design/icons"; import { useQuery } from "@apollo/client"; -import { useTreatments } from "@splitsoftware/splitio-react"; +import { useTreatmentsWithConfig } from "@splitsoftware/splitio-react"; import { Badge, Layout, Menu, Spin, Tooltip } from "antd"; import { useCallback, useEffect, useMemo, useRef, useState } from "react"; import { useTranslation } from "react-i18next"; @@ -106,7 +106,7 @@ function Header({ // Feature flags const { treatments: { ImEXPay, DmsAp, Simple_Inventory } - } = useTreatments({ + } = useTreatmentsWithConfig({ attributes: {}, names: ["ImEXPay", "DmsAp", "Simple_Inventory"], splitKey: bodyshop && bodyshop.imexshopid diff --git a/client/src/components/job-close-ro-guard/job-close-ro-gaurd.labor.jsx b/client/src/components/job-close-ro-guard/job-close-ro-gaurd.labor.jsx index f72483c0f..54adbbf2d 100644 --- a/client/src/components/job-close-ro-guard/job-close-ro-gaurd.labor.jsx +++ b/client/src/components/job-close-ro-guard/job-close-ro-gaurd.labor.jsx @@ -1,5 +1,5 @@ import { useQuery } from "@apollo/client"; -import { useTreatments } from "@splitsoftware/splitio-react"; +import { useTreatmentsWithConfig } from "@splitsoftware/splitio-react"; import { connect } from "react-redux"; import { createStructuredSelector } from "reselect"; import { GET_LINE_TICKET_BY_PK } from "../../graphql/jobs-lines.queries"; @@ -23,7 +23,7 @@ export function JobCloseRoGuardLabor({ job, bodyshop, warningCallback }) { }); const { treatments: { Enhanced_Payroll } - } = useTreatments({ + } = useTreatmentsWithConfig({ attributes: {}, names: ["Enhanced_Payroll"], splitKey: bodyshop.imexshopid diff --git a/client/src/components/job-create-iou/job-create-iou.component.jsx b/client/src/components/job-create-iou/job-create-iou.component.jsx index 0b752ea69..c850dcc8c 100644 --- a/client/src/components/job-create-iou/job-create-iou.component.jsx +++ b/client/src/components/job-create-iou/job-create-iou.component.jsx @@ -1,5 +1,5 @@ import { useApolloClient } from "@apollo/client"; -import { useTreatments } from "@splitsoftware/splitio-react"; +import { useTreatmentsWithConfig } from "@splitsoftware/splitio-react"; import { Button, Popconfirm } from "antd"; import { useState } from "react"; import { useTranslation } from "react-i18next"; @@ -32,7 +32,7 @@ export function JobCreateIOU({ bodyshop, currentUser, job, selectedJobLines, tec const { treatments: { IOU_Tracking } - } = useTreatments({ + } = useTreatmentsWithConfig({ attributes: {}, names: ["IOU_Tracking"], splitKey: bodyshop.imexshopid diff --git a/client/src/components/job-detail-lines/job-lines.component.jsx b/client/src/components/job-detail-lines/job-lines.component.jsx index 52d6e2014..6c13ab29f 100644 --- a/client/src/components/job-detail-lines/job-lines.component.jsx +++ b/client/src/components/job-detail-lines/job-lines.component.jsx @@ -29,7 +29,7 @@ import JobLinesBillRefernece from "../job-lines-bill-reference/job-lines-bill-re // import AllocationsAssignmentContainer from "../allocations-assignment/allocations-assignment.container"; // import AllocationsBulkAssignmentContainer from "../allocations-bulk-assignment/allocations-bulk-assignment.container"; // import AllocationsEmployeeLabelContainer from "../allocations-employee-label/allocations-employee-label.container"; -import { useTreatments } from "@splitsoftware/splitio-react"; +import { useTreatmentsWithConfig } from "@splitsoftware/splitio-react"; import _ from "lodash"; import { FaTasks } from "react-icons/fa"; import { selectBodyshop } from "../../redux/user/user.selectors"; @@ -85,7 +85,7 @@ export function JobLinesComponent({ const [deleteJobLine] = useMutation(DELETE_JOB_LINE_BY_PK); const { treatments: { Enhanced_Payroll } - } = useTreatments({ + } = useTreatmentsWithConfig({ attributes: {}, names: ["Enhanced_Payroll"], splitKey: bodyshop.imexshopid diff --git a/client/src/components/job-lines-upsert-modal/job-lines-upsert-modal.component.jsx b/client/src/components/job-lines-upsert-modal/job-lines-upsert-modal.component.jsx index 25fe74826..05362b55e 100644 --- a/client/src/components/job-lines-upsert-modal/job-lines-upsert-modal.component.jsx +++ b/client/src/components/job-lines-upsert-modal/job-lines-upsert-modal.component.jsx @@ -1,4 +1,4 @@ -import { useTreatments } from "@splitsoftware/splitio-react"; +import { useTreatmentsWithConfig } from "@splitsoftware/splitio-react"; import { Form, Input, InputNumber, Modal, Select, Switch } from "antd"; import { useEffect } from "react"; import { useTranslation } from "react-i18next"; @@ -28,7 +28,7 @@ export function JobLinesUpsertModalComponent({ bodyshop, open, jobLine, handleCa const { treatments: { Allow_Negative_Jobline_Price, Autohouse_Detail_line } - } = useTreatments({ + } = useTreatmentsWithConfig({ attributes: {}, names: ["Allow_Negative_Jobline_Price", "Autohouse_Detail_line"], splitKey: bodyshop.imexshopid diff --git a/client/src/components/job-lines-upsert-modal/job-lines-upsert-modal.container.jsx b/client/src/components/job-lines-upsert-modal/job-lines-upsert-modal.container.jsx index 01f924c40..cf9b88269 100644 --- a/client/src/components/job-lines-upsert-modal/job-lines-upsert-modal.container.jsx +++ b/client/src/components/job-lines-upsert-modal/job-lines-upsert-modal.container.jsx @@ -1,5 +1,5 @@ import { useMutation } from "@apollo/client"; -import { useTreatments } from "@splitsoftware/splitio-react"; +import { useTreatmentsWithConfig } from "@splitsoftware/splitio-react"; import Axios from "axios"; import Dinero from "dinero.js"; import { useState } from "react"; @@ -26,7 +26,7 @@ const mapDispatchToProps = (dispatch) => ({ function JobLinesUpsertModalContainer({ jobLineEditModal, toggleModalVisible, bodyshop }) { const { treatments: { CriticalPartsScanning } - } = useTreatments({ + } = useTreatmentsWithConfig({ attributes: {}, names: ["CriticalPartsScanning"], splitKey: bodyshop.imexshopid diff --git a/client/src/components/job-payments/job-payments.component.jsx b/client/src/components/job-payments/job-payments.component.jsx index 67f045e0a..9536761bd 100644 --- a/client/src/components/job-payments/job-payments.component.jsx +++ b/client/src/components/job-payments/job-payments.component.jsx @@ -15,7 +15,7 @@ import DataLabel from "../data-label/data-label.component"; import PaymentExpandedRowComponent from "../payment-expanded-row/payment-expanded-row.component"; import PaymentsGenerateLink from "../payments-generate-link/payments-generate-link.component"; import PrintWrapperComponent from "../print-wrapper/print-wrapper.component"; -import { useTreatments } from "@splitsoftware/splitio-react"; +import { useTreatmentsWithConfig } from "@splitsoftware/splitio-react"; const mapStateToProps = createStructuredSelector({ bodyshop: selectBodyshop @@ -35,7 +35,7 @@ const mapDispatchToProps = (dispatch) => ({ export function JobPayments({ job, bodyshop, setPaymentContext, setCardPaymentContext, refetch }) { const { treatments: { ImEXPay } - } = useTreatments({ + } = useTreatmentsWithConfig({ attributes: {}, names: ["ImEXPay"], splitKey: bodyshop?.imexshopid diff --git a/client/src/components/job-watcher-toggle/job-watcher-toggle.container.jsx b/client/src/components/job-watcher-toggle/job-watcher-toggle.container.jsx index 96147542a..5d366bacf 100644 --- a/client/src/components/job-watcher-toggle/job-watcher-toggle.container.jsx +++ b/client/src/components/job-watcher-toggle/job-watcher-toggle.container.jsx @@ -4,7 +4,7 @@ import { ADD_JOB_WATCHER, GET_JOB_WATCHERS, REMOVE_JOB_WATCHER } from "../../gra import { connect } from "react-redux"; import { createStructuredSelector } from "reselect"; import { selectBodyshop, selectCurrentUser } from "../../redux/user/user.selectors.js"; -import { useTreatments } from "@splitsoftware/splitio-react"; +import { useTreatmentsWithConfig } from "@splitsoftware/splitio-react"; import JobWatcherToggleComponent from "./job-watcher-toggle.component.jsx"; import { useIsEmployee } from "../../utils/useIsEmployee.js"; @@ -16,7 +16,7 @@ const mapStateToProps = createStructuredSelector({ function JobWatcherToggleContainer({ job, currentUser, bodyshop }) { const { treatments: { Enhanced_Payroll } - } = useTreatments({ + } = useTreatmentsWithConfig({ attributes: {}, names: ["Enhanced_Payroll"], splitKey: bodyshop && bodyshop.imexshopid 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 50b1778f9..f40a8c44b 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 @@ -1,5 +1,5 @@ import { gql, useApolloClient, useLazyQuery, useMutation, useQuery } from "@apollo/client"; -import { useTreatments } from "@splitsoftware/splitio-react"; +import { useTreatmentsWithConfig } from "@splitsoftware/splitio-react"; import { Col, Row } from "antd"; import Axios from "axios"; import _ from "lodash"; @@ -46,7 +46,7 @@ const mapDispatchToProps = (dispatch) => ({ export function JobsAvailableContainer({ bodyshop, currentUser, insertAuditTrail }) { const { treatments: { CriticalPartsScanning } - } = useTreatments({ + } = useTreatmentsWithConfig({ attributes: {}, names: ["CriticalPartsScanning"], splitKey: bodyshop.imexshopid 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 daed2d3da..05c779965 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 @@ -1,6 +1,6 @@ import { DownCircleFilled } from "@ant-design/icons"; import { useApolloClient, useMutation } from "@apollo/client"; -import { useTreatments } from "@splitsoftware/splitio-react"; +import { useTreatmentsWithConfig } from "@splitsoftware/splitio-react"; import { Button, Card, Dropdown, Form, Input, Modal, Popconfirm, Popover, Select, Space } from "antd"; import axios from "axios"; import parsePhoneNumber from "libphonenumber-js"; @@ -145,7 +145,7 @@ export function JobsDetailHeaderActions({ const { treatments: { ImEXPay } - } = useTreatments({ + } = useTreatmentsWithConfig({ attributes: {}, names: ["ImEXPay"], splitKey: bodyshop && bodyshop.imexshopid diff --git a/client/src/components/jobs-detail-labor/jobs-detail-labor.component.jsx b/client/src/components/jobs-detail-labor/jobs-detail-labor.component.jsx index 4b16e8589..092d7972d 100644 --- a/client/src/components/jobs-detail-labor/jobs-detail-labor.component.jsx +++ b/client/src/components/jobs-detail-labor/jobs-detail-labor.component.jsx @@ -6,7 +6,7 @@ import LaborAllocationsTableComponent from "../labor-allocations-table/labor-all import TimeTicketList from "../time-ticket-list/time-ticket-list.component"; import PayrollLaborAllocationsTable from "../labor-allocations-table/labor-allocations-table.payroll.component"; import { selectBodyshop } from "../../redux/user/user.selectors"; -import { useTreatments } from "@splitsoftware/splitio-react"; +import { useTreatmentsWithConfig } from "@splitsoftware/splitio-react"; const mapStateToProps = createStructuredSelector({ jobRO: selectJobReadOnly, @@ -64,7 +64,7 @@ export function JobsDetailLaborContainer({ }) { const { treatments: { Enhanced_Payroll } - } = useTreatments({ + } = useTreatmentsWithConfig({ attributes: {}, names: ["Enhanced_Payroll"], splitKey: bodyshop.imexshopid diff --git a/client/src/components/jobs-documents-gallery/jobs-document-gallery.download.component.jsx b/client/src/components/jobs-documents-gallery/jobs-document-gallery.download.component.jsx index f350674f7..ae7fa6d34 100644 --- a/client/src/components/jobs-documents-gallery/jobs-document-gallery.download.component.jsx +++ b/client/src/components/jobs-documents-gallery/jobs-document-gallery.download.component.jsx @@ -6,7 +6,7 @@ import { logImEXEvent } from "../../firebase/firebase.utils"; import cleanAxios from "../../utils/CleanAxios"; import formatBytes from "../../utils/formatbytes"; //import yauzl from "yauzl"; -import { useTreatments } from "@splitsoftware/splitio-react"; +import { useTreatmentsWithConfig } from "@splitsoftware/splitio-react"; import { connect } from "react-redux"; import { createStructuredSelector } from "reselect"; @@ -33,7 +33,7 @@ export function JobsDocumentsDownloadButton({ bodyshop, galleryImages, identifie const { treatments: { Direct_Media_Download } - } = useTreatments({ + } = useTreatmentsWithConfig({ attributes: {}, names: ["Direct_Media_Download"], splitKey: bodyshop.imexshopid diff --git a/client/src/components/jobs-documents-gallery/jobs-documents-gallery.container.jsx b/client/src/components/jobs-documents-gallery/jobs-documents-gallery.container.jsx index 0d1f2bdbc..5281e50ae 100644 --- a/client/src/components/jobs-documents-gallery/jobs-documents-gallery.container.jsx +++ b/client/src/components/jobs-documents-gallery/jobs-documents-gallery.container.jsx @@ -7,7 +7,7 @@ import JobDocuments from "./jobs-documents-gallery.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 @@ -34,7 +34,7 @@ export function JobsDocumentsContainer({ }) { const { treatments: { Imgproxy } - } = useTreatments({ + } = useTreatmentsWithConfig({ attributes: {}, names: ["Imgproxy"], splitKey: bodyshop?.imexshopid diff --git a/client/src/components/parts-order-modal/parts-order-modal.component.jsx b/client/src/components/parts-order-modal/parts-order-modal.component.jsx index befb4b7f1..463b589fe 100644 --- a/client/src/components/parts-order-modal/parts-order-modal.component.jsx +++ b/client/src/components/parts-order-modal/parts-order-modal.component.jsx @@ -1,5 +1,5 @@ import { DeleteFilled, DownOutlined, WarningFilled } from "@ant-design/icons"; -import { useTreatments } from "@splitsoftware/splitio-react"; +import { useTreatmentsWithConfig } from "@splitsoftware/splitio-react"; import { Checkbox, Divider, Dropdown, Form, Input, InputNumber, Radio, Select, Space, Tag } from "antd"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; @@ -36,7 +36,7 @@ export function PartsOrderModalComponent({ const { treatments: { OEConnection, OEConnection_PriceChange } - } = useTreatments({ + } = useTreatmentsWithConfig({ attributes: {}, names: ["OEConnection", "OEConnection_PriceChange"], splitKey: bodyshop.imexshopid diff --git a/client/src/components/parts-order-modal/parts-order-modal.container.jsx b/client/src/components/parts-order-modal/parts-order-modal.container.jsx index 3aef79bd2..c39b21704 100644 --- a/client/src/components/parts-order-modal/parts-order-modal.container.jsx +++ b/client/src/components/parts-order-modal/parts-order-modal.container.jsx @@ -20,7 +20,7 @@ import AlertComponent from "../alert/alert.component"; import LoadingSpinner from "../loading-spinner/loading-spinner.component"; import PartsOrderModalComponent from "./parts-order-modal.component"; import axios from "axios"; -import { useTreatments } from "@splitsoftware/splitio-react"; +import { useTreatmentsWithConfig } from "@splitsoftware/splitio-react"; import _ from "lodash"; import { UPDATE_JOB } from "../../graphql/jobs.queries"; import { useNotification } from "../../contexts/Notifications/notificationContext.jsx"; @@ -51,7 +51,7 @@ export function PartsOrderModalContainer({ const { treatments: { OEConnection_PriceChange } - } = useTreatments({ + } = useTreatmentsWithConfig({ attributes: {}, names: ["OEConnection_PriceChange"], splitKey: bodyshop.imexshopid diff --git a/client/src/components/payment-form/payment-form.component.jsx b/client/src/components/payment-form/payment-form.component.jsx index faacb6450..851ff6774 100644 --- a/client/src/components/payment-form/payment-form.component.jsx +++ b/client/src/components/payment-form/payment-form.component.jsx @@ -1,4 +1,4 @@ -import { useTreatments } from "@splitsoftware/splitio-react"; +import { useTreatmentsWithConfig } from "@splitsoftware/splitio-react"; import { Form, Input, Radio, Select } from "antd"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; @@ -17,7 +17,7 @@ const mapStateToProps = createStructuredSelector({ export function PaymentFormComponent({ form, bodyshop, disabled }) { const { treatments: { Qb_Multi_Ar } - } = useTreatments({ + } = useTreatmentsWithConfig({ attributes: {}, names: ["Qb_Multi_Ar"], splitKey: bodyshop?.imexshopid diff --git a/client/src/components/print-center-jobs/print-center-jobs-parts.component.jsx b/client/src/components/print-center-jobs/print-center-jobs-parts.component.jsx index 3afcb9cfb..e86db4255 100644 --- a/client/src/components/print-center-jobs/print-center-jobs-parts.component.jsx +++ b/client/src/components/print-center-jobs/print-center-jobs-parts.component.jsx @@ -1,4 +1,4 @@ -import { useTreatments } from "@splitsoftware/splitio-react"; +import { useTreatmentsWithConfig } from "@splitsoftware/splitio-react"; import { Button, Card, Col, Row, Space, Tooltip, Typography } from "antd"; import { connect } from "react-redux"; import { createStructuredSelector } from "reselect"; @@ -24,7 +24,7 @@ export function PrintCenterJobsPartsComponent({ printCenterModal, bodyshop, tech const notification = useNotification(); const { treatments: { Enhanced_Payroll } - } = useTreatments({ + } = useTreatmentsWithConfig({ attributes: {}, names: ["Enhanced_Payroll"], splitKey: bodyshop.imexshopid diff --git a/client/src/components/print-center-jobs/print-center-jobs.component.jsx b/client/src/components/print-center-jobs/print-center-jobs.component.jsx index 565c98635..2df39c0b5 100644 --- a/client/src/components/print-center-jobs/print-center-jobs.component.jsx +++ b/client/src/components/print-center-jobs/print-center-jobs.component.jsx @@ -1,4 +1,4 @@ -import { useTreatments } from "@splitsoftware/splitio-react"; +import { useTreatmentsWithConfig } from "@splitsoftware/splitio-react"; import { Card, Col, Input, Row, Space, Typography } from "antd"; import _ from "lodash"; import { useState } from "react"; @@ -27,7 +27,7 @@ export function PrintCenterJobsComponent({ printCenterModal, bodyshop }) { const { t } = useTranslation(); const { treatments: { Enhanced_Payroll } - } = useTreatments({ + } = useTreatmentsWithConfig({ attributes: {}, names: ["Enhanced_Payroll"], splitKey: bodyshop.imexshopid diff --git a/client/src/components/production-board-kanban/production-board-kanban.container.jsx b/client/src/components/production-board-kanban/production-board-kanban.container.jsx index 2635b1d44..50ab4083d 100644 --- a/client/src/components/production-board-kanban/production-board-kanban.container.jsx +++ b/client/src/components/production-board-kanban/production-board-kanban.container.jsx @@ -11,7 +11,7 @@ import { import { QUERY_KANBAN_SETTINGS } from "../../graphql/user.queries"; import { selectBodyshop, selectCurrentUser } from "../../redux/user/user.selectors"; import ProductionBoardKanbanComponent from "./production-board-kanban.component"; -import { useTreatments } from "@splitsoftware/splitio-react"; +import { useTreatmentsWithConfig } from "@splitsoftware/splitio-react"; import { useSocket } from "../../contexts/SocketIO/useSocket.js"; const mapStateToProps = createStructuredSelector({ @@ -29,7 +29,7 @@ function ProductionBoardKanbanContainer({ bodyshop, currentUser, subscriptionTyp const { treatments: { Websocket_Production } - } = useTreatments({ + } = useTreatmentsWithConfig({ attributes: {}, names: ["Websocket_Production"], splitKey: bodyshop && bodyshop.imexshopid diff --git a/client/src/components/production-list-columns/production-list-columns.add.component.jsx b/client/src/components/production-list-columns/production-list-columns.add.component.jsx index 0858c1694..c75834363 100644 --- a/client/src/components/production-list-columns/production-list-columns.add.component.jsx +++ b/client/src/components/production-list-columns/production-list-columns.add.component.jsx @@ -5,7 +5,7 @@ import { connect } from "react-redux"; import { createStructuredSelector } from "reselect"; import { selectTechnician } from "../../redux/tech/tech.selectors"; import { selectBodyshop } from "../../redux/user/user.selectors"; -import { useTreatments } from "@splitsoftware/splitio-react"; +import { useTreatmentsWithConfig } from "@splitsoftware/splitio-react"; const mapStateToProps = createStructuredSelector({ technician: selectTechnician, @@ -29,7 +29,7 @@ export function ProductionColumnsComponent({ const { t } = useTranslation(); const { treatments: { Enhanced_Payroll } - } = useTreatments({ + } = useTreatmentsWithConfig({ attributes: {}, names: ["Enhanced_Payroll"], splitKey: bodyshop.imexshopid diff --git a/client/src/components/production-list-table/production-list-config-manager.component.jsx b/client/src/components/production-list-table/production-list-config-manager.component.jsx index a0f4315c8..af920a4bc 100644 --- a/client/src/components/production-list-table/production-list-config-manager.component.jsx +++ b/client/src/components/production-list-table/production-list-config-manager.component.jsx @@ -6,7 +6,7 @@ import { useTranslation } from "react-i18next"; import { UPDATE_ACTIVE_PROD_LIST_VIEW } from "../../graphql/associations.queries"; import { UPDATE_SHOP } from "../../graphql/bodyshop.queries"; import ProductionListColumns from "../production-list-columns/production-list-columns.data"; -import { useTreatments } from "@splitsoftware/splitio-react"; +import { useTreatmentsWithConfig } from "@splitsoftware/splitio-react"; import { logImEXEvent } from "../../firebase/firebase.utils"; import { isFunction } from "lodash"; import { useNotification } from "../../contexts/Notifications/notificationContext.jsx"; @@ -104,7 +104,7 @@ export function ProductionListConfigManager({ const { treatments: { Enhanced_Payroll } - } = useTreatments({ + } = useTreatmentsWithConfig({ attributes: {}, names: ["Enhanced_Payroll"], splitKey: bodyshop.imexshopid diff --git a/client/src/components/production-list-table/production-list-table.component.jsx b/client/src/components/production-list-table/production-list-table.component.jsx index bad395130..4be08366c 100644 --- a/client/src/components/production-list-table/production-list-table.component.jsx +++ b/client/src/components/production-list-table/production-list-table.component.jsx @@ -1,6 +1,6 @@ import { SyncOutlined } from "@ant-design/icons"; import { PageHeader } from "@ant-design/pro-layout"; -import { useTreatments } from "@splitsoftware/splitio-react"; +import { useTreatmentsWithConfig } from "@splitsoftware/splitio-react"; import { Button, Dropdown, Input, Space, Statistic, Table } from "antd"; import _ from "lodash"; import { useEffect, useMemo, useRef, useState } from "react"; @@ -31,7 +31,7 @@ export function ProductionListTable({ loading, data, refetch, bodyshop, technici const [hasUnsavedChanges, setHasUnsavedChanges] = useState(false); const { treatments: { Production_List_Status_Colors, Enhanced_Payroll } - } = useTreatments({ + } = useTreatmentsWithConfig({ attributes: {}, names: ["Production_List_Status_Colors", "Enhanced_Payroll"], splitKey: bodyshop.imexshopid diff --git a/client/src/components/production-list-table/production-list-table.container.jsx b/client/src/components/production-list-table/production-list-table.container.jsx index be46b7f02..bb89d20b6 100644 --- a/client/src/components/production-list-table/production-list-table.container.jsx +++ b/client/src/components/production-list-table/production-list-table.container.jsx @@ -9,7 +9,7 @@ import { } from "../../graphql/jobs.queries"; import ProductionListTable from "./production-list-table.component"; import _ from "lodash"; -import { useTreatments } from "@splitsoftware/splitio-react"; +import { useTreatmentsWithConfig } from "@splitsoftware/splitio-react"; import { useSocket } from "../../contexts/SocketIO/useSocket.js"; export default function ProductionListTableContainer({ bodyshop, subscriptionType = "direct" }) { @@ -24,7 +24,7 @@ export default function ProductionListTableContainer({ bodyshop, subscriptionTyp // Get Split treatment const { treatments: { Websocket_Production } - } = useTreatments({ + } = useTreatmentsWithConfig({ attributes: {}, names: ["Websocket_Production"], splitKey: bodyshop && bodyshop.imexshopid diff --git a/client/src/components/report-center-modal/report-center-modal.component.jsx b/client/src/components/report-center-modal/report-center-modal.component.jsx index ed3170097..8ec8e68f4 100644 --- a/client/src/components/report-center-modal/report-center-modal.component.jsx +++ b/client/src/components/report-center-modal/report-center-modal.component.jsx @@ -1,5 +1,5 @@ import { useLazyQuery } from "@apollo/client"; -import { useTreatments } from "@splitsoftware/splitio-react"; +import { useTreatmentsWithConfig } from "@splitsoftware/splitio-react"; import { Button, Card, Col, DatePicker, Form, Input, Radio, Row, Typography } from "antd"; import _ from "lodash"; import { useState } from "react"; @@ -38,7 +38,7 @@ export function ReportCenterModalComponent({ reportCenterModal, bodyshop }) { const [search, setSearch] = useState(""); const { treatments: { Enhanced_Payroll, ADPPayroll } - } = useTreatments({ + } = useTreatmentsWithConfig({ attributes: {}, names: ["Enhanced_Payroll", "ADPPayroll"], splitKey: bodyshop.imexshopid diff --git a/client/src/components/shop-employees/shop-employees-form.component.jsx b/client/src/components/shop-employees/shop-employees-form.component.jsx index ff31bffc6..d8b4fe8d8 100644 --- a/client/src/components/shop-employees/shop-employees-form.component.jsx +++ b/client/src/components/shop-employees/shop-employees-form.component.jsx @@ -1,6 +1,6 @@ import { DeleteFilled } from "@ant-design/icons"; import { useApolloClient, useMutation, useQuery } from "@apollo/client"; -import { useTreatments } from "@splitsoftware/splitio-react"; +import { useTreatmentsWithConfig } from "@splitsoftware/splitio-react"; import { Button, Card, Form, Input, InputNumber, Select, Switch, Table } from "antd"; import { useForm } from "antd/es/form/Form"; import queryString from "query-string"; @@ -52,7 +52,7 @@ export function ShopEmployeesFormComponent({ bodyshop }) { const { treatments: { Enhanced_Payroll } - } = useTreatments({ + } = useTreatmentsWithConfig({ attributes: {}, names: ["Enhanced_Payroll"], splitKey: bodyshop.imexshopid diff --git a/client/src/components/shop-info/shop-info.component.jsx b/client/src/components/shop-info/shop-info.component.jsx index 172e0c348..8dd04843e 100644 --- a/client/src/components/shop-info/shop-info.component.jsx +++ b/client/src/components/shop-info/shop-info.component.jsx @@ -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 diff --git a/client/src/components/shop-info/shop-info.general.component.jsx b/client/src/components/shop-info/shop-info.general.component.jsx index 107b0b1ba..04bfb6563 100644 --- a/client/src/components/shop-info/shop-info.general.component.jsx +++ b/client/src/components/shop-info/shop-info.general.component.jsx @@ -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 diff --git a/client/src/components/shop-info/shop-info.orderstatus.component.jsx b/client/src/components/shop-info/shop-info.orderstatus.component.jsx index 8235f7c6d..e6b9c3cd4 100644 --- a/client/src/components/shop-info/shop-info.orderstatus.component.jsx +++ b/client/src/components/shop-info/shop-info.orderstatus.component.jsx @@ -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 diff --git a/client/src/components/shop-info/shop-info.rbac.component.jsx b/client/src/components/shop-info/shop-info.rbac.component.jsx index b9a9620d3..9ea247662 100644 --- a/client/src/components/shop-info/shop-info.rbac.component.jsx +++ b/client/src/components/shop-info/shop-info.rbac.component.jsx @@ -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 diff --git a/client/src/components/shop-info/shop-info.responsibilitycenters.component.jsx b/client/src/components/shop-info/shop-info.responsibilitycenters.component.jsx index 7dc80bc2e..5841e2cd7 100644 --- a/client/src/components/shop-info/shop-info.responsibilitycenters.component.jsx +++ b/client/src/components/shop-info/shop-info.responsibilitycenters.component.jsx @@ -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 diff --git a/client/src/components/shop-info/shop-info.rostatus.component.jsx b/client/src/components/shop-info/shop-info.rostatus.component.jsx index 3155ec214..6ae70185b 100644 --- a/client/src/components/shop-info/shop-info.rostatus.component.jsx +++ b/client/src/components/shop-info/shop-info.rostatus.component.jsx @@ -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 diff --git a/client/src/components/tech-job-clock-in-form/tech-job-clock-in-form.component.jsx b/client/src/components/tech-job-clock-in-form/tech-job-clock-in-form.component.jsx index 2b52f1c01..6db04d3be 100644 --- a/client/src/components/tech-job-clock-in-form/tech-job-clock-in-form.component.jsx +++ b/client/src/components/tech-job-clock-in-form/tech-job-clock-in-form.component.jsx @@ -7,7 +7,7 @@ import { selectBodyshop } from "../../redux/user/user.selectors"; import JobSearchSelect from "../job-search-select/job-search-select.component"; import JobsDetailLaborContainer from "../jobs-detail-labor/jobs-detail-labor.container"; import LayoutFormRow from "../layout-form-row/layout-form-row.component"; -import { useTreatments } from "@splitsoftware/splitio-react"; +import { useTreatmentsWithConfig } from "@splitsoftware/splitio-react"; const mapStateToProps = createStructuredSelector({ bodyshop: selectBodyshop, @@ -19,7 +19,7 @@ export function TechClockInComponent({ form, bodyshop, technician }) { const { treatments: { Enhanced_Payroll } - } = useTreatments({ + } = useTreatmentsWithConfig({ attributes: {}, names: ["Enhanced_Payroll"], splitKey: bodyshop.imexshopid diff --git a/client/src/components/tech-job-clock-in-form/tech-job-clock-in-form.container.jsx b/client/src/components/tech-job-clock-in-form/tech-job-clock-in-form.container.jsx index 7b93ac42a..b8ef08531 100644 --- a/client/src/components/tech-job-clock-in-form/tech-job-clock-in-form.container.jsx +++ b/client/src/components/tech-job-clock-in-form/tech-job-clock-in-form.container.jsx @@ -12,7 +12,7 @@ import { selectTechnician } from "../../redux/tech/tech.selectors"; import { selectBodyshop, selectCurrentUser } from "../../redux/user/user.selectors"; import TechJobPrintTickets from "../tech-job-print-tickets/tech-job-print-tickets.component"; import TechClockInComponent from "./tech-job-clock-in-form.component"; -import { useTreatments } from "@splitsoftware/splitio-react"; +import { useTreatmentsWithConfig } from "@splitsoftware/splitio-react"; import { useNotification } from "../../contexts/Notifications/notificationContext.jsx"; const mapStateToProps = createStructuredSelector({ @@ -27,7 +27,7 @@ const mapDispatchToProps = (dispatch) => ({ export function TechClockInContainer({ setTimeTicketContext, technician, bodyshop, currentUser }) { const { treatments: { Enhanced_Payroll } - } = useTreatments({ + } = useTreatmentsWithConfig({ attributes: {}, names: ["Enhanced_Payroll"], splitKey: bodyshop.imexshopid diff --git a/client/src/components/tech-job-clock-out-button/tech-job-clock-out-button.component.jsx b/client/src/components/tech-job-clock-out-button/tech-job-clock-out-button.component.jsx index 555868f7d..19580b98c 100644 --- a/client/src/components/tech-job-clock-out-button/tech-job-clock-out-button.component.jsx +++ b/client/src/components/tech-job-clock-out-button/tech-job-clock-out-button.component.jsx @@ -14,7 +14,7 @@ import { selectBodyshop } from "../../redux/user/user.selectors"; import { CalculateAllocationsTotals } from "../labor-allocations-table/labor-allocations-table.utility"; import TechJobClockoutDelete from "../tech-job-clock-out-delete/tech-job-clock-out-delete.component"; import { LaborAllocationContainer } from "../time-ticket-modal/time-ticket-modal.component"; -import { useTreatments } from "@splitsoftware/splitio-react"; +import { useTreatmentsWithConfig } from "@splitsoftware/splitio-react"; import { useNotification } from "../../contexts/Notifications/notificationContext.jsx"; import { bodyshopHasDmsKey } from "../../utils/dmsUtils.js"; @@ -39,7 +39,7 @@ export function TechClockOffButton({ const [form] = Form.useForm(); const { treatments: { Enhanced_Payroll } - } = useTreatments({ + } = useTreatmentsWithConfig({ attributes: {}, names: ["Enhanced_Payroll"], splitKey: bodyshop.imexshopid diff --git a/client/src/components/tech-sider/tech-sider.component.jsx b/client/src/components/tech-sider/tech-sider.component.jsx index 1e8dae049..e403b611f 100644 --- a/client/src/components/tech-sider/tech-sider.component.jsx +++ b/client/src/components/tech-sider/tech-sider.component.jsx @@ -11,7 +11,7 @@ import { createStructuredSelector } from "reselect"; import { techLogout } from "../../redux/tech/tech.actions"; import { selectTechnician } from "../../redux/tech/tech.selectors"; import { BsKanban } from "react-icons/bs"; -import { useTreatments } from "@splitsoftware/splitio-react"; +import { useTreatmentsWithConfig } from "@splitsoftware/splitio-react"; import { selectBodyshop } from "../../redux/user/user.selectors"; import { setModalContext } from "../../redux/modals/modals.actions"; @@ -35,7 +35,7 @@ export function TechSider({ technician, techLogout, bodyshop, setTimeTicketTaskC const { treatments: { Enhanced_Payroll } - } = useTreatments({ + } = useTreatmentsWithConfig({ attributes: {}, names: ["Enhanced_Payroll"], splitKey: bodyshop.imexshopid diff --git a/client/src/components/time-ticket-list/time-ticket-list.component.jsx b/client/src/components/time-ticket-list/time-ticket-list.component.jsx index 7c85b31d2..d166eeb68 100644 --- a/client/src/components/time-ticket-list/time-ticket-list.component.jsx +++ b/client/src/components/time-ticket-list/time-ticket-list.component.jsx @@ -1,5 +1,5 @@ import { EditFilled, SyncOutlined } from "@ant-design/icons"; -import { useTreatments } from "@splitsoftware/splitio-react"; +import { useTreatmentsWithConfig } from "@splitsoftware/splitio-react"; import { Button, Card, Checkbox, Space, Table } from "antd"; import { useMemo, useState } from "react"; import { useTranslation } from "react-i18next"; @@ -49,7 +49,7 @@ export function TimeTicketList({ const { t } = useTranslation(); const { treatments: { Enhanced_Payroll } - } = useTreatments({ + } = useTreatmentsWithConfig({ attributes: {}, names: ["Enhanced_Payroll"], splitKey: bodyshop.imexshopid 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 bcd503611..fe2547b64 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 @@ -1,5 +1,5 @@ import { useLazyQuery } from "@apollo/client"; -import { useTreatments } from "@splitsoftware/splitio-react"; +import { useTreatmentsWithConfig } from "@splitsoftware/splitio-react"; import { Card, Form, Input, InputNumber, Select, Space, Switch } from "antd"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; @@ -39,7 +39,7 @@ export function TimeTicketModalComponent({ const { t } = useTranslation(); const { treatments: { Enhanced_Payroll } - } = useTreatments({ + } = useTreatmentsWithConfig({ attributes: {}, names: ["Enhanced_Payroll"], splitKey: bodyshop.imexshopid diff --git a/client/src/components/time-ticket-modal/time-ticket-modal.container.jsx b/client/src/components/time-ticket-modal/time-ticket-modal.container.jsx index 7ca18f32a..19204d686 100644 --- a/client/src/components/time-ticket-modal/time-ticket-modal.container.jsx +++ b/client/src/components/time-ticket-modal/time-ticket-modal.container.jsx @@ -1,6 +1,6 @@ import { PageHeader } from "@ant-design/pro-layout"; import { useMutation, useQuery } from "@apollo/client"; -import { useTreatments } from "@splitsoftware/splitio-react"; +import { useTreatmentsWithConfig } from "@splitsoftware/splitio-react"; import { Button, Form, Modal, Space } from "antd"; import { useEffect, useState } from "react"; import { useTranslation } from "react-i18next"; @@ -33,7 +33,7 @@ export function TimeTicketModalContainer({ timeTicketModal, toggleModalVisible, const [updateTicket] = useMutation(UPDATE_TIME_TICKET); const { treatments: { Enhanced_Payroll } - } = useTreatments({ + } = useTreatmentsWithConfig({ attributes: {}, names: ["Enhanced_Payroll"], splitKey: bodyshop.imexshopid diff --git a/client/src/components/vendors-form/vendors-form.component.jsx b/client/src/components/vendors-form/vendors-form.component.jsx index 99d756857..0e3769a11 100644 --- a/client/src/components/vendors-form/vendors-form.component.jsx +++ b/client/src/components/vendors-form/vendors-form.component.jsx @@ -1,6 +1,6 @@ import { DeleteFilled } from "@ant-design/icons"; import { useApolloClient } from "@apollo/client"; -import { useTreatments } from "@splitsoftware/splitio-react"; +import { useTreatmentsWithConfig } from "@splitsoftware/splitio-react"; import { Button, Divider, Form, Input, InputNumber, Select, Space, Switch } from "antd"; import { PageHeader } from "@ant-design/pro-layout"; import { useTranslation } from "react-i18next"; @@ -31,7 +31,7 @@ export function VendorsFormComponent({ bodyshop, form, formLoading, handleDelete const { treatments: { DmsAp } - } = useTreatments({ + } = useTreatmentsWithConfig({ attributes: {}, names: ["DmsAp"], splitKey: bodyshop?.imexshopid diff --git a/client/src/contexts/SocketIO/socketProvider.jsx b/client/src/contexts/SocketIO/socketProvider.jsx index 22326df10..4bbd11796 100644 --- a/client/src/contexts/SocketIO/socketProvider.jsx +++ b/client/src/contexts/SocketIO/socketProvider.jsx @@ -14,7 +14,7 @@ import { } from "../../graphql/notifications.queries.js"; import { useMutation } from "@apollo/client"; import { useTranslation } from "react-i18next"; -import { useTreatments } from "@splitsoftware/splitio-react"; +import { useTreatmentsWithConfig } from "@splitsoftware/splitio-react"; import { INITIAL_NOTIFICATIONS, SocketContext } from "./useSocket.js"; const LIMIT = INITIAL_NOTIFICATIONS; @@ -38,7 +38,7 @@ const SocketProvider = ({ children, bodyshop, navigate, currentUser }) => { const { treatments: { Realtime_Notifications_UI } - } = useTreatments({ + } = useTreatmentsWithConfig({ attributes: {}, names: ["Realtime_Notifications_UI"], splitKey: bodyshop?.imexshopid diff --git a/client/src/pages/dms/dms.container.jsx b/client/src/pages/dms/dms.container.jsx index d7ef4fbec..1ce255a9a 100644 --- a/client/src/pages/dms/dms.container.jsx +++ b/client/src/pages/dms/dms.container.jsx @@ -6,7 +6,7 @@ import { createStructuredSelector } from "reselect"; import queryString from "query-string"; import { useQuery } from "@apollo/client"; import { Button, Card, Col, Result, Row, Select, Space, Switch } from "antd"; -import { useTreatments } from "@splitsoftware/splitio-react"; +import { useTreatmentsWithConfig } from "@splitsoftware/splitio-react"; import { useSocket } from "../../contexts/SocketIO/useSocket.js"; import { useNotification } from "../../contexts/Notifications/notificationContext.jsx"; @@ -68,7 +68,7 @@ const DMS_SOCKET_EVENTS = { export function DmsContainer({ bodyshop, setBreadcrumbs, setSelectedHeader, insertAuditTrail }) { const { treatments: { Fortellis } - } = useTreatments({ + } = useTreatmentsWithConfig({ attributes: {}, names: ["Fortellis"], splitKey: bodyshop.imexshopid diff --git a/client/src/pages/jobs-close/jobs-close.component.jsx b/client/src/pages/jobs-close/jobs-close.component.jsx index df9f3ae63..0fa054d1f 100644 --- a/client/src/pages/jobs-close/jobs-close.component.jsx +++ b/client/src/pages/jobs-close/jobs-close.component.jsx @@ -21,7 +21,7 @@ import { useState } from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; // import { useNavigate } from 'react-router-dom'; -import { useTreatments } from "@splitsoftware/splitio-react"; +import { useTreatmentsWithConfig } from "@splitsoftware/splitio-react"; import Dinero from "dinero.js"; import { Link } from "react-router-dom"; import { createStructuredSelector } from "reselect"; @@ -74,7 +74,7 @@ export function JobsCloseComponent({ job, bodyshop, jobRO, insertAuditTrail, set const { treatments: { Qb_Multi_Ar, ClosingPeriod } - } = useTreatments({ + } = useTreatmentsWithConfig({ attributes: {}, names: ["Qb_Multi_Ar", "ClosingPeriod"], splitKey: bodyshop && bodyshop.imexshopid diff --git a/client/src/pages/production-board/production-board.component.jsx b/client/src/pages/production-board/production-board.component.jsx index d22f3f347..6729acf65 100644 --- a/client/src/pages/production-board/production-board.component.jsx +++ b/client/src/pages/production-board/production-board.component.jsx @@ -2,7 +2,7 @@ import ProductionBoardKanbanContainer from "../../components/production-board-ka 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({ //currentUser: selectCurrentUser @@ -16,7 +16,7 @@ export default connect(mapStateToProps, mapDispatchToProps)(ProductionBoardCompo export function ProductionBoardComponent({ bodyshop }) { const { treatments: { Production_Use_View } - } = useTreatments({ + } = useTreatmentsWithConfig({ attributes: {}, names: ["Production_Use_View"], splitKey: bodyshop?.imexshopid diff --git a/client/src/pages/production-list/production-list.component.jsx b/client/src/pages/production-list/production-list.component.jsx index e7c75141d..7efc2c8e4 100644 --- a/client/src/pages/production-list/production-list.component.jsx +++ b/client/src/pages/production-list/production-list.component.jsx @@ -4,7 +4,7 @@ import ProductionListTable from "../../components/production-list-table/producti 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 @@ -17,7 +17,7 @@ export default connect(mapStateToProps, mapDispatchToProps)(ProductionListCompon export function ProductionListComponent({ bodyshop }) { const { treatments: { Production_Use_View } - } = useTreatments({ + } = useTreatmentsWithConfig({ attributes: {}, names: ["Production_Use_View"], splitKey: bodyshop?.imexshopid diff --git a/client/src/pages/tech-dispatched-parts/tech-dispatched-parts.page.jsx b/client/src/pages/tech-dispatched-parts/tech-dispatched-parts.page.jsx index 517e1f74e..8eeb1a142 100644 --- a/client/src/pages/tech-dispatched-parts/tech-dispatched-parts.page.jsx +++ b/client/src/pages/tech-dispatched-parts/tech-dispatched-parts.page.jsx @@ -12,7 +12,7 @@ import { GET_UNACCEPTED_PARTS_DISPATCH } from "../../graphql/parts-dispatch.quer import { selectTechnician } from "../../redux/tech/tech.selectors"; import { selectBodyshop } from "../../redux/user/user.selectors"; import { alphaSort } from "../../utils/sorters"; -import { useTreatments } from "@splitsoftware/splitio-react"; +import { useTreatmentsWithConfig } from "@splitsoftware/splitio-react"; const mapStateToProps = createStructuredSelector({ //currentUser: selectCurrentUser @@ -27,7 +27,7 @@ export function TechDispatchedParts({ technician, bodyshop }) { const { treatments: { Enhanced_Payroll } - } = useTreatments({ + } = useTreatmentsWithConfig({ attributes: {}, names: ["Enhanced_Payroll"], splitKey: bodyshop.imexshopid diff --git a/client/src/pages/temporary-docs/temporary-docs.component.jsx b/client/src/pages/temporary-docs/temporary-docs.component.jsx index 0e902c4fe..13b985a8c 100644 --- a/client/src/pages/temporary-docs/temporary-docs.component.jsx +++ b/client/src/pages/temporary-docs/temporary-docs.component.jsx @@ -4,7 +4,7 @@ import JobsDocumentsContainer from "../../components/jobs-documents-gallery/jobs import LoadingSpinner from "../../components/loading-spinner/loading-spinner.component"; import { QUERY_TEMPORARY_DOCS } from "../../graphql/documents.queries"; -import { useTreatments } from "@splitsoftware/splitio-react"; +import { useTreatmentsWithConfig } from "@splitsoftware/splitio-react"; import { connect } from "react-redux"; import { createStructuredSelector } from "reselect"; import JobsDocumentsLocalGallery from "../../components/jobs-documents-local-gallery/jobs-documents-local-gallery.container"; @@ -21,7 +21,7 @@ export default connect(mapStateToProps, mapDispatchToProps)(TemporaryDocsCompone export function TemporaryDocsComponent({ bodyshop }) { const { treatments: { Imgproxy } - } = useTreatments({ + } = useTreatmentsWithConfig({ attributes: {}, names: ["Imgproxy"], splitKey: bodyshop?.imexshopid diff --git a/client/src/pages/time-tickets/time-tickets.container.jsx b/client/src/pages/time-tickets/time-tickets.container.jsx index 32a14d881..619cb8159 100644 --- a/client/src/pages/time-tickets/time-tickets.container.jsx +++ b/client/src/pages/time-tickets/time-tickets.container.jsx @@ -18,7 +18,7 @@ import { setBreadcrumbs, setSelectedHeader } from "../../redux/application/appli import TimeTicketsCommit from "../../components/time-tickets-commit/time-tickets-commit.component"; import FeatureWrapperComponent from "../../components/feature-wrapper/feature-wrapper.component"; import InstanceRenderManager from "../../utils/instanceRenderMgr"; -import { useTreatments } from "@splitsoftware/splitio-react"; +import { useTreatmentsWithConfig } from "@splitsoftware/splitio-react"; import { selectBodyshop } from "../../redux/user/user.selectors"; import UpsellComponent, { upsellEnum } from "../../components/upsell/upsell.component"; @@ -34,7 +34,7 @@ const mapDispatchToProps = (dispatch) => ({ export function TimeTicketsContainer({ bodyshop, setBreadcrumbs, setSelectedHeader }) { const { treatments: { Enhanced_Payroll } - } = useTreatments({ + } = useTreatmentsWithConfig({ attributes: {}, names: ["Enhanced_Payroll"], splitKey: bodyshop.imexshopid