ImEX and App Improvements.

This commit is contained in:
Patrick Fic
2024-03-15 09:29:49 -07:00
parent 7e01f667b3
commit f279fc1e81
16 changed files with 141 additions and 88 deletions

View File

@@ -13,6 +13,7 @@ import {GET_UNACCEPTED_PARTS_DISPATCH} from "../../graphql/parts-dispatch.querie
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";
const mapStateToProps = createStructuredSelector({
//currentUser: selectCurrentUser
@@ -25,6 +26,12 @@ export function TechDispatchedParts({technician, bodyshop}) {
const searchParams = queryString.parse(useLocation().search);
const {page} = searchParams;
const {treatments: {Enhanced_Payroll}} = useSplitTreatments({
attributes: {},
names: ["Enhanced_Payroll"],
splitKey: bodyshop.imexshopid,
});
const {loading, error, data, refetch} = useQuery(
GET_UNACCEPTED_PARTS_DISPATCH,
{
@@ -73,7 +80,7 @@ export function TechDispatchedParts({technician, bodyshop}) {
} ${record.job.v_model_desc || ""}`}</span>
),
},
{
...Enhanced_Payroll.treatment=== 'on' ? [ {
title: t("general.labels.actions"),
dataIndex: "actions",
key: "actions",
@@ -83,7 +90,9 @@ export function TechDispatchedParts({technician, bodyshop}) {
{t("timetickets.actions.claimtasks")}
</Button>
),
},
},] : []
];
const handleTableChange = (pagination, filters, sorter) => {
searchParams.page = pagination.current;