Merged in release/2021-12-17 (pull request #314)
release/2021-12-17 Approved-by: Patrick Fic
This commit is contained in:
@@ -4,7 +4,24 @@ import { useTranslation } from "react-i18next";
|
||||
import InputCurrency from "../form-items-formatted/currency-form-item.component";
|
||||
import LayoutFormRow from "../layout-form-row/layout-form-row.component";
|
||||
import JoblinesPreset from "../job-lines-preset-button/job-lines-preset-button.component";
|
||||
export default function JobLinesUpsertModalComponent({
|
||||
import { useTreatments } from "@splitsoftware/splitio-react";
|
||||
|
||||
import { connect } from "react-redux";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
bodyshop: selectBodyshop,
|
||||
});
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
//setUserLanguage: language => dispatch(setUserLanguage(language))
|
||||
});
|
||||
export default connect(
|
||||
mapStateToProps,
|
||||
mapDispatchToProps
|
||||
)(JobLinesUpsertModalComponent);
|
||||
|
||||
export function JobLinesUpsertModalComponent({
|
||||
bodyshop,
|
||||
visible,
|
||||
jobLine,
|
||||
handleCancel,
|
||||
@@ -18,6 +35,12 @@ export default function JobLinesUpsertModalComponent({
|
||||
form.resetFields();
|
||||
}, [visible, form]);
|
||||
|
||||
const { Allow_Negative_Jobline_Price } = useTreatments(
|
||||
["Allow_Negative_Jobline_Price"],
|
||||
{},
|
||||
bodyshop.imexshopid
|
||||
);
|
||||
|
||||
return (
|
||||
<Modal
|
||||
title={
|
||||
@@ -213,7 +236,10 @@ export default function JobLinesUpsertModalComponent({
|
||||
}),
|
||||
]}
|
||||
>
|
||||
<InputCurrency precision={2} min={0} />
|
||||
<InputCurrency
|
||||
precision={2}
|
||||
min={Allow_Negative_Jobline_Price.treatment === "on" ? null : 0}
|
||||
/>
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
label={t("joblines.fields.prt_dsmk_p")}
|
||||
|
||||
@@ -43,10 +43,11 @@ export function ProductionListTable({
|
||||
currentUser,
|
||||
}) {
|
||||
const [searchText, setSearchText] = useState("");
|
||||
const { Production_List_Status_Colors } = useTreatments([
|
||||
"Production_List_Status_Colors",
|
||||
bodyshop.imexshopid,
|
||||
]);
|
||||
const { Production_List_Status_Colors } = useTreatments(
|
||||
["Production_List_Status_Colors"],
|
||||
{},
|
||||
bodyshop.imexshopid
|
||||
);
|
||||
const assoc = bodyshop.associations.find(
|
||||
(a) => a.useremail === currentUser.email
|
||||
);
|
||||
|
||||
@@ -29,10 +29,11 @@ const SelectorDiv = styled.div`
|
||||
`;
|
||||
export function ShopInfoROStatusComponent({ bodyshop, form }) {
|
||||
const { t } = useTranslation();
|
||||
const { Production_List_Status_Colors } = useTreatments([
|
||||
"Production_List_Status_Colors",
|
||||
bodyshop.imexshopid,
|
||||
]);
|
||||
const { Production_List_Status_Colors } = useTreatments(
|
||||
["Production_List_Status_Colors"],
|
||||
{},
|
||||
bodyshop.imexshopid
|
||||
);
|
||||
|
||||
const [options, setOptions] = useState(
|
||||
form.getFieldValue(["md_ro_statuses", "statuses"]) || []
|
||||
|
||||
Reference in New Issue
Block a user