From b2b4ff79172f1c24bf4b49ee1de6127d248028d2 Mon Sep 17 00:00:00 2001 From: Dave Date: Tue, 9 Dec 2025 12:12:44 -0500 Subject: [PATCH] feature/IO-3357-Reynolds-DMS-API - Adjust useSplitTreatments to useTreatments --- .../bill-enter-modal/bill-enter-modal.container.jsx | 4 ++-- client/src/components/bill-form/bill-form.component.jsx | 4 ++-- client/src/components/bill-form/bill-form.container.jsx | 4 ++-- client/src/components/bill-form/bill-form.lines.component.jsx | 4 ++-- client/src/components/breadcrumbs/breadcrumbs.component.jsx | 4 ++-- .../chat-media-selector/chat-media-selector.component.jsx | 4 ++-- .../dms-cdk-makes/dms-cdk-makes.refetch.component.jsx | 4 ++-- client/src/components/dms-post-form/cdklike-dms-post-form.jsx | 4 ++-- .../components/email-documents/email-documents.component.jsx | 4 ++-- client/src/components/header/header.component.jsx | 4 ++-- .../job-close-ro-guard/job-close-ro-gaurd.labor.jsx | 4 ++-- .../components/job-create-iou/job-create-iou.component.jsx | 4 ++-- .../src/components/job-detail-lines/job-lines.component.jsx | 4 ++-- .../job-lines-upsert-modal.component.jsx | 4 ++-- .../job-lines-upsert-modal.container.jsx | 4 ++-- client/src/components/job-payments/job-payments.component.jsx | 4 ++-- .../job-watcher-toggle/job-watcher-toggle.container.jsx | 4 ++-- .../jobs-available-table/jobs-available-table.container.jsx | 4 ++-- .../jobs-detail-header-actions.component.jsx | 4 ++-- .../jobs-detail-labor/jobs-detail-labor.component.jsx | 4 ++-- .../jobs-document-gallery.download.component.jsx | 4 ++-- .../jobs-documents-gallery.container.jsx | 4 ++-- .../parts-order-modal/parts-order-modal.component.jsx | 4 ++-- .../parts-order-modal/parts-order-modal.container.jsx | 4 ++-- client/src/components/payment-form/payment-form.component.jsx | 4 ++-- .../print-center-jobs/print-center-jobs-parts.component.jsx | 4 ++-- .../print-center-jobs/print-center-jobs.component.jsx | 4 ++-- .../production-board-kanban.container.jsx | 4 ++-- .../production-list-columns.add.component.jsx | 4 ++-- .../production-list-config-manager.component.jsx | 4 ++-- .../production-list-table/production-list-table.component.jsx | 4 ++-- .../production-list-table/production-list-table.container.jsx | 4 ++-- .../report-center-modal/report-center-modal.component.jsx | 4 ++-- .../shop-employees/shop-employees-form.component.jsx | 4 ++-- client/src/components/shop-info/shop-info.component.jsx | 4 ++-- .../src/components/shop-info/shop-info.general.component.jsx | 4 ++-- .../components/shop-info/shop-info.orderstatus.component.jsx | 4 ++-- client/src/components/shop-info/shop-info.rbac.component.jsx | 4 ++-- .../shop-info/shop-info.responsibilitycenters.component.jsx | 4 ++-- .../src/components/shop-info/shop-info.rostatus.component.jsx | 4 ++-- .../tech-job-clock-in-form.component.jsx | 4 ++-- .../tech-job-clock-in-form.container.jsx | 4 ++-- .../tech-job-clock-out-button.component.jsx | 4 ++-- client/src/components/tech-sider/tech-sider.component.jsx | 4 ++-- .../time-ticket-list/time-ticket-list.component.jsx | 4 ++-- .../time-ticket-modal/time-ticket-modal.component.jsx | 4 ++-- .../time-ticket-modal/time-ticket-modal.container.jsx | 4 ++-- client/src/components/vendors-form/vendors-form.component.jsx | 4 ++-- client/src/contexts/SocketIO/socketProvider.jsx | 4 ++-- client/src/pages/dms/dms.container.jsx | 4 ++-- client/src/pages/jobs-close/jobs-close.component.jsx | 4 ++-- .../src/pages/production-board/production-board.component.jsx | 4 ++-- .../src/pages/production-list/production-list.component.jsx | 4 ++-- .../tech-dispatched-parts/tech-dispatched-parts.page.jsx | 4 ++-- client/src/pages/temporary-docs/temporary-docs.component.jsx | 4 ++-- client/src/pages/time-tickets/time-tickets.container.jsx | 4 ++-- 56 files changed, 112 insertions(+), 112 deletions(-) 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 123969389..1255353af 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 { useSplitTreatments } from "@splitsoftware/splitio-react"; +import { useTreatments } 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 } - } = useSplitTreatments({ + } = useTreatments({ 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 6cdd301fc..c7d8c1f50 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 { useSplitTreatments } from "@splitsoftware/splitio-react"; +import { useTreatments } 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 } - } = useSplitTreatments({ + } = useTreatments({ 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 6ba9bd39f..cd6d18aba 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 { useSplitTreatments } from "@splitsoftware/splitio-react"; +import { useTreatments } 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 } - } = useSplitTreatments({ + } = useTreatments({ 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 e36a5b628..c4a398faa 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 { useSplitTreatments } from "@splitsoftware/splitio-react"; +import { useTreatments } 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 } - } = useSplitTreatments({ + } = useTreatments({ 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 b9fa57fd4..3d1ea5a1e 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 { useSplitTreatments } from "@splitsoftware/splitio-react"; +import { useTreatments } 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 } - } = useSplitTreatments({ + } = useTreatments({ 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 ff2336f69..e64ed46e0 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 { useSplitTreatments } from "@splitsoftware/splitio-react"; +import { useTreatments } 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 } - } = useSplitTreatments({ + } = useTreatments({ 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 8879fcdfb..0725bd02d 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 { useSplitTreatments } from "@splitsoftware/splitio-react"; +import { useTreatments } from "@splitsoftware/splitio-react"; const mapStateToProps = createStructuredSelector({ currentUser: selectCurrentUser, @@ -21,7 +21,7 @@ export function DmsCdkMakesRefetch({ currentUser, bodyshop }) { const { t } = useTranslation(); const { treatments: { Fortellis } - } = useSplitTreatments({ + } = useTreatments({ 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 5bcf7cf1f..d2ddebcb8 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 { useSplitTreatments } from "@splitsoftware/splitio-react"; +import { useTreatments } 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 } - } = useSplitTreatments({ + } = useTreatments({ 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 1a1dc5e11..04124184c 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 { useSplitTreatments } from "@splitsoftware/splitio-react"; +import { useTreatments } 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 } - } = useSplitTreatments({ + } = useTreatments({ 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 c3fcd1342..e22c7616f 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 { useSplitTreatments } from "@splitsoftware/splitio-react"; +import { useTreatments } 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 } - } = useSplitTreatments({ + } = useTreatments({ 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 974a99faa..f72483c0f 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 { useSplitTreatments } from "@splitsoftware/splitio-react"; +import { useTreatments } 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 } - } = useSplitTreatments({ + } = useTreatments({ 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 a09b41224..0b752ea69 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 { useSplitTreatments } from "@splitsoftware/splitio-react"; +import { useTreatments } 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 } - } = useSplitTreatments({ + } = useTreatments({ 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 d6a0320e3..52d6e2014 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 { useSplitTreatments } from "@splitsoftware/splitio-react"; +import { useTreatments } 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 } - } = useSplitTreatments({ + } = useTreatments({ 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 c1ceac539..25fe74826 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 { useSplitTreatments } from "@splitsoftware/splitio-react"; +import { useTreatments } 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 } - } = useSplitTreatments({ + } = useTreatments({ 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 95ab7f461..01f924c40 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 { useSplitTreatments } from "@splitsoftware/splitio-react"; +import { useTreatments } 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 } - } = useSplitTreatments({ + } = useTreatments({ 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 8ae8c56a4..67f045e0a 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 { useSplitTreatments } from "@splitsoftware/splitio-react"; +import { useTreatments } 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 } - } = useSplitTreatments({ + } = useTreatments({ 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 c47360455..96147542a 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 { useSplitTreatments } from "@splitsoftware/splitio-react"; +import { useTreatments } 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 } - } = useSplitTreatments({ + } = useTreatments({ 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 f5e6589bd..50b1778f9 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 { useSplitTreatments } from "@splitsoftware/splitio-react"; +import { useTreatments } 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 } - } = useSplitTreatments({ + } = useTreatments({ 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 2dc1c18e6..daed2d3da 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 { useSplitTreatments } from "@splitsoftware/splitio-react"; +import { useTreatments } 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 } - } = useSplitTreatments({ + } = useTreatments({ 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 93608d2aa..4b16e8589 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 { useSplitTreatments } from "@splitsoftware/splitio-react"; +import { useTreatments } from "@splitsoftware/splitio-react"; const mapStateToProps = createStructuredSelector({ jobRO: selectJobReadOnly, @@ -64,7 +64,7 @@ export function JobsDetailLaborContainer({ }) { const { treatments: { Enhanced_Payroll } - } = useSplitTreatments({ + } = useTreatments({ 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 5f4583dd6..f350674f7 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 { useSplitTreatments } from "@splitsoftware/splitio-react"; +import { useTreatments } 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 } - } = useSplitTreatments({ + } = useTreatments({ 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 22dde88ed..0d1f2bdbc 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 { useSplitTreatments } from "@splitsoftware/splitio-react"; +import { useTreatments } from "@splitsoftware/splitio-react"; const mapStateToProps = createStructuredSelector({ bodyshop: selectBodyshop @@ -34,7 +34,7 @@ export function JobsDocumentsContainer({ }) { const { treatments: { Imgproxy } - } = useSplitTreatments({ + } = useTreatments({ 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 858dd4563..befb4b7f1 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 { useSplitTreatments } from "@splitsoftware/splitio-react"; +import { useTreatments } 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 } - } = useSplitTreatments({ + } = useTreatments({ 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 74c6e02dd..3aef79bd2 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 { useSplitTreatments } from "@splitsoftware/splitio-react"; +import { useTreatments } 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 } - } = useSplitTreatments({ + } = useTreatments({ 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 8e4daaad7..faacb6450 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 { useSplitTreatments } from "@splitsoftware/splitio-react"; +import { useTreatments } 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 } - } = useSplitTreatments({ + } = useTreatments({ 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 5650ab919..3afcb9cfb 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 { useSplitTreatments } from "@splitsoftware/splitio-react"; +import { useTreatments } 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 } - } = useSplitTreatments({ + } = useTreatments({ 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 e7ca39bf1..565c98635 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 { useSplitTreatments } from "@splitsoftware/splitio-react"; +import { useTreatments } 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 } - } = useSplitTreatments({ + } = useTreatments({ 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 b8227ab36..2635b1d44 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 { useSplitTreatments } from "@splitsoftware/splitio-react"; +import { useTreatments } 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 } - } = useSplitTreatments({ + } = useTreatments({ 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 1e8f0fb1e..0858c1694 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 { useSplitTreatments } from "@splitsoftware/splitio-react"; +import { useTreatments } from "@splitsoftware/splitio-react"; const mapStateToProps = createStructuredSelector({ technician: selectTechnician, @@ -29,7 +29,7 @@ export function ProductionColumnsComponent({ const { t } = useTranslation(); const { treatments: { Enhanced_Payroll } - } = useSplitTreatments({ + } = useTreatments({ 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 d67d244fb..a0f4315c8 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 { useSplitTreatments } from "@splitsoftware/splitio-react"; +import { useTreatments } 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 } - } = useSplitTreatments({ + } = useTreatments({ 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 868e1464a..bad395130 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 { useSplitTreatments } from "@splitsoftware/splitio-react"; +import { useTreatments } 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 } - } = useSplitTreatments({ + } = useTreatments({ 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 5d07b94f1..be46b7f02 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 { useSplitTreatments } from "@splitsoftware/splitio-react"; +import { useTreatments } 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 } - } = useSplitTreatments({ + } = useTreatments({ 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 915154af2..ed3170097 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 { useSplitTreatments } from "@splitsoftware/splitio-react"; +import { useTreatments } 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 } - } = useSplitTreatments({ + } = useTreatments({ 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 aadcd7b64..ff31bffc6 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 { useSplitTreatments } from "@splitsoftware/splitio-react"; +import { useTreatments } 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 } - } = useSplitTreatments({ + } = useTreatments({ 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 55bbeaa95..172e0c348 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 { useSplitTreatments } from "@splitsoftware/splitio-react"; +import { useTreatments } 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 } - } = useSplitTreatments({ + } = useTreatments({ 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 acf553bb5..107b0b1ba 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 { useSplitTreatments } from "@splitsoftware/splitio-react"; +import { useTreatments } 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 } - } = useSplitTreatments({ + } = useTreatments({ 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 b1925a756..8235f7c6d 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 { useSplitTreatments } from "@splitsoftware/splitio-react"; +import { useTreatments } from "@splitsoftware/splitio-react"; const mapStateToProps = createStructuredSelector({ bodyshop: selectBodyshop @@ -19,7 +19,7 @@ export function ShopInfoOrderStatusComponent({ bodyshop }) { const { treatments: { OEConnection } - } = useSplitTreatments({ + } = useTreatments({ 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 dd840dddf..b9a9620d3 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 { useSplitTreatments } from "@splitsoftware/splitio-react"; +import { useTreatments } 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 } - } = useSplitTreatments({ + } = useTreatments({ 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 d0e781455..7dc80bc2e 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 { useSplitTreatments } from "@splitsoftware/splitio-react"; +import { useTreatments } 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 } - } = useSplitTreatments({ + } = useTreatments({ 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 75a84cb32..3155ec214 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 { useSplitTreatments } from "@splitsoftware/splitio-react"; +import { useTreatments } from "@splitsoftware/splitio-react"; const mapStateToProps = createStructuredSelector({ bodyshop: selectBodyshop @@ -31,7 +31,7 @@ export function ShopInfoROStatusComponent({ bodyshop, form }) { const { treatments: { Production_List_Status_Colors } - } = useSplitTreatments({ + } = useTreatments({ 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 e6edc648b..2b52f1c01 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 { useSplitTreatments } from "@splitsoftware/splitio-react"; +import { useTreatments } from "@splitsoftware/splitio-react"; const mapStateToProps = createStructuredSelector({ bodyshop: selectBodyshop, @@ -19,7 +19,7 @@ export function TechClockInComponent({ form, bodyshop, technician }) { const { treatments: { Enhanced_Payroll } - } = useSplitTreatments({ + } = useTreatments({ 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 1641c097d..7b93ac42a 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 { useSplitTreatments } from "@splitsoftware/splitio-react"; +import { useTreatments } 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 } - } = useSplitTreatments({ + } = useTreatments({ 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 5cc607dc9..555868f7d 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 { useSplitTreatments } from "@splitsoftware/splitio-react"; +import { useTreatments } 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 } - } = useSplitTreatments({ + } = useTreatments({ 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 3a3dcfb09..1e8dae049 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 { useSplitTreatments } from "@splitsoftware/splitio-react"; +import { useTreatments } 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 } - } = useSplitTreatments({ + } = useTreatments({ 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 a8ffd2248..7c85b31d2 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 { useSplitTreatments } from "@splitsoftware/splitio-react"; +import { useTreatments } 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 } - } = useSplitTreatments({ + } = useTreatments({ 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 aa72dea96..bcd503611 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 { useSplitTreatments } from "@splitsoftware/splitio-react"; +import { useTreatments } 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 } - } = useSplitTreatments({ + } = useTreatments({ 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 8ecb4c2b5..7ca18f32a 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 { useSplitTreatments } from "@splitsoftware/splitio-react"; +import { useTreatments } 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 } - } = useSplitTreatments({ + } = useTreatments({ 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 df93e08d3..99d756857 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 { useSplitTreatments } from "@splitsoftware/splitio-react"; +import { useTreatments } 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 } - } = useSplitTreatments({ + } = useTreatments({ attributes: {}, names: ["DmsAp"], splitKey: bodyshop?.imexshopid diff --git a/client/src/contexts/SocketIO/socketProvider.jsx b/client/src/contexts/SocketIO/socketProvider.jsx index b194450e7..22326df10 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 { useSplitTreatments } from "@splitsoftware/splitio-react"; +import { useTreatments } 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 } - } = useSplitTreatments({ + } = useTreatments({ 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 abaace018..d7ef4fbec 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 { useSplitTreatments } from "@splitsoftware/splitio-react"; +import { useTreatments } 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 } - } = useSplitTreatments({ + } = useTreatments({ 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 747ada2da..df9f3ae63 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 { useSplitTreatments } from "@splitsoftware/splitio-react"; +import { useTreatments } 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 } - } = useSplitTreatments({ + } = useTreatments({ 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 6d4f7b806..d22f3f347 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 { useSplitTreatments } from "@splitsoftware/splitio-react"; +import { useTreatments } 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 } - } = useSplitTreatments({ + } = useTreatments({ 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 9c924c647..e7c75141d 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 { useSplitTreatments } from "@splitsoftware/splitio-react"; +import { useTreatments } 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 } - } = useSplitTreatments({ + } = useTreatments({ 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 59aef669e..517e1f74e 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 { useSplitTreatments } from "@splitsoftware/splitio-react"; +import { useTreatments } from "@splitsoftware/splitio-react"; const mapStateToProps = createStructuredSelector({ //currentUser: selectCurrentUser @@ -27,7 +27,7 @@ export function TechDispatchedParts({ technician, bodyshop }) { const { treatments: { Enhanced_Payroll } - } = useSplitTreatments({ + } = useTreatments({ 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 939cc7131..0e902c4fe 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 { useSplitTreatments } from "@splitsoftware/splitio-react"; +import { useTreatments } 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 } - } = useSplitTreatments({ + } = useTreatments({ 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 49d048f9c..32a14d881 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 { useSplitTreatments } from "@splitsoftware/splitio-react"; +import { useTreatments } 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 } - } = useSplitTreatments({ + } = useTreatments({ attributes: {}, names: ["Enhanced_Payroll"], splitKey: bodyshop.imexshopid