Shift employee cost centers to follow DMS standard.

This commit is contained in:
Patrick Fic
2023-08-14 15:28:10 -07:00
parent 3e8660bb61
commit ad7ff62b56
7 changed files with 44 additions and 19 deletions

View File

@@ -36,6 +36,7 @@ import FormDatePicker from "../form-date-picker/form-date-picker.component";
import FormListMoveArrows from "../form-list-move-arrows/form-list-move-arrows.component";
import LayoutFormRow from "../layout-form-row/layout-form-row.component";
import ShopEmployeeAddVacation from "./shop-employees-add-vacation.component";
import { useTreatments } from "@splitsoftware/splitio-react";
const mapStateToProps = createStructuredSelector({
bodyshop: selectBodyshop,
@@ -56,7 +57,11 @@ export function ShopEmployeesFormComponent({ bodyshop }) {
fetchPolicy: "network-only",
nextFetchPolicy: "network-only",
});
const { Enhanced_Payroll } = useTreatments(
["Enhanced_Payroll"],
{},
bodyshop.imexshopid
);
const client = useApolloClient();
useEffect(() => {
if (data && data.employees_by_pk) form.setFieldsValue(data.employees_by_pk);
@@ -362,7 +367,7 @@ export function ShopEmployeesFormComponent({ bodyshop }) {
{t("timetickets.labels.shift")}
</Select.Option>
{bodyshop.cdk_dealerid || bodyshop.pbs_serialnumber
{bodyshop.cdk_dealerid || bodyshop.pbs_serialnumber || Enhanced_Payroll.treatment === "on"
? CiecaSelect(false, true)
: bodyshop.md_responsibility_centers.costs.map(
(c) => (