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 c9109dd24..ee644654a 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 @@ -134,10 +134,10 @@ export function JobsDetailHeaderActions({ const notification = useNotification(); const { - treatments: { ImEXPay, Share_To_Teams } + treatments: { ImEXPay } } = useSplitTreatments({ attributes: {}, - names: ["ImEXPay", "Share_To_Teams"], + names: ["ImEXPay"], splitKey: bodyshop && bodyshop.imexshopid }); @@ -202,7 +202,10 @@ export function JobsDetailHeaderActions({ message: t("appointments.successes.created") }); } catch (error) { - notification.open({ type: "error", message: t("appointments.errors.saving", { error: error.message }) }); + notification.open({ + type: "error", + message: t("appointments.errors.saving", { error: error.message }) + }); } finally { setLoading(false); setVisibility(false); @@ -839,7 +842,7 @@ export function JobsDetailHeaderActions({ id: "job-actions-addtoproduction", disabled: !job.converted, label: t("jobs.actions.addtoproduction"), - onClick: () => AddToProduction(client, job.id, refetch, notification) + onClick: () => AddToProduction(client, job.id, refetch, false, notification) } ); @@ -972,7 +975,7 @@ export function JobsDetailHeaderActions({ } ); - if (Share_To_Teams?.treatment === "on") { + if (bodyshop?.md_functionality_toggles?.teams) { menuItems.push({ key: "sharetoteams", id: "job-actions-sharetoteams", diff --git a/client/src/components/jobs-detail-header-actions/jobs-detail-header-actions.toggle-production.jsx b/client/src/components/jobs-detail-header-actions/jobs-detail-header-actions.toggle-production.jsx index 4de06916f..f0df106f4 100644 --- a/client/src/components/jobs-detail-header-actions/jobs-detail-header-actions.toggle-production.jsx +++ b/client/src/components/jobs-detail-header-actions/jobs-detail-header-actions.toggle-production.jsx @@ -13,6 +13,7 @@ import AuditTrailMapping from "../../utils/AuditTrailMappings"; import { DateTimeFormatterFunction } from "../../utils/DateFormatter"; import FormDateTimePickerComponent from "../form-date-time-picker/form-date-time-picker.component"; import { useNotification } from "../../contexts/Notifications/notificationContext.jsx"; +import LoadingSpinner from "../loading-spinner/loading-spinner.component.jsx"; const mapStateToProps = createStructuredSelector({ //currentUser: selectCurrentUser, @@ -39,7 +40,7 @@ export function JobsDetailHeaderActionsToggleProduction({ const [form] = Form.useForm(); const notification = useNotification(); - const [getJobDetails] = useLazyQuery(GET_JOB_BY_PK_QUICK_INTAKE, { + const [getJobDetails, { loading: jobDetailsLoading }] = useLazyQuery(GET_JOB_BY_PK_QUICK_INTAKE, { variables: { id: job.id }, onCompleted: (data) => { if (data?.jobs_by_pk) { @@ -109,65 +110,69 @@ export function JobsDetailHeaderActionsToggleProduction({ const popMenu = (
e.stopPropagation()}> -
- {scenario === "pre" && ( - <> - - - - - - - - - - - )} - {scenario === "prod" && ( - <> - - - + {jobDetailsLoading ? ( + + ) : ( + + {scenario === "pre" && ( + <> + + + + + + + + + + + )} + {scenario === "prod" && ( + <> + + + - - - - - )} + + + + + )} - - - - + + + + + )}
); diff --git a/client/src/components/parts-order-list-table/parts-order-list-table.component.jsx b/client/src/components/parts-order-list-table/parts-order-list-table.component.jsx index 81d033e69..f0bc70e27 100644 --- a/client/src/components/parts-order-list-table/parts-order-list-table.component.jsx +++ b/client/src/components/parts-order-list-table/parts-order-list-table.component.jsx @@ -67,7 +67,6 @@ export function PartsOrderListTableComponent({ const parts_orders = billsQuery.data ? billsQuery.data.parts_orders : []; const { refetch } = billsQuery; - // label: const recordActions = (record, showView = false) => ( { - const newAlertFilter = !alertFilter; - setAlertFilter(newAlertFilter); - setFilter({ ...filter, alert: newAlertFilter }); + setFilter({ ...filter, alert: !filter.alert }); }; const toggleUnassignedFilter = () => { - const newUnassignedFilter = !unassignedFilter; - setUnassignedFilter(newUnassignedFilter); - setFilter({ ...filter, unassigned: newUnassignedFilter }); + setFilter({ ...filter, unassigned: !filter.unassigned }); }; return ( @@ -58,16 +51,16 @@ export function ProductionBoardFilters({ bodyshop, filter, setFilter, loading }) allowClear /> diff --git a/client/src/components/share-to-teams/share-to-teams.component.jsx b/client/src/components/share-to-teams/share-to-teams.component.jsx index 7f464d014..4b708c130 100644 --- a/client/src/components/share-to-teams/share-to-teams.component.jsx +++ b/client/src/components/share-to-teams/share-to-teams.component.jsx @@ -3,7 +3,6 @@ import { Button } from "antd"; import { useLocation } from "react-router-dom"; import { SiMicrosoftteams } from "react-icons/si"; import { useTranslation } from "react-i18next"; -import { useSplitTreatments } from "@splitsoftware/splitio-react"; import { connect } from "react-redux"; import { createStructuredSelector } from "reselect"; import { selectBodyshop } from "../../redux/user/user.selectors.js"; @@ -43,14 +42,6 @@ const ShareToTeamsComponent = ({ const location = useLocation(); const { t } = useTranslation(); - const { - treatments: { Share_To_Teams } - } = useSplitTreatments({ - attributes: {}, - names: ["Share_To_Teams"], - splitKey: bodyshop && bodyshop.imexshopid - }); - const currentUrl = urlOverride || encodeURIComponent(`${window.location.origin}${location.pathname}${location.search}${location.hash}`); @@ -78,7 +69,8 @@ const ShareToTeamsComponent = ({ window.open(teamsShareUrl, "_blank", windowFeatures); }; - if (Share_To_Teams?.treatment !== "on") { + // Feature is disabled + if (!bodyshop?.md_functionality_toggles?.teams) { return null; } 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 183561fb2..3d80a93ad 100644 --- a/client/src/components/shop-info/shop-info.general.component.jsx +++ b/client/src/components/shop-info/shop-info.general.component.jsx @@ -14,7 +14,7 @@ import FormItemEmail from "../form-items-formatted/email-form-item.component"; import PhoneFormItem, { PhoneItemFormatterValidation } from "../form-items-formatted/phone-form-item.component"; import FormListMoveArrows from "../form-list-move-arrows/form-list-move-arrows.component"; import LayoutFormRow from "../layout-form-row/layout-form-row.component"; -// TODO: Client Update, this might break + const timeZonesList = Intl.supportedValuesOf("timeZone"); const mapStateToProps = createStructuredSelector({ bodyshop: selectBodyshop @@ -642,6 +642,15 @@ export function ShopInfoGeneral({ form, bodyshop }) { + + + + + {(fields, { add, remove, move }) => { diff --git a/client/src/components/task-list/task-list.component.jsx b/client/src/components/task-list/task-list.component.jsx index 3711981c7..3258f29a2 100644 --- a/client/src/components/task-list/task-list.component.jsx +++ b/client/src/components/task-list/task-list.component.jsx @@ -269,7 +269,7 @@ function TaskListComponent({