even more updates.

Signed-off-by: Dave Richer <dave@imexsystems.ca>
This commit is contained in:
Dave Richer
2023-12-14 16:27:00 -05:00
parent 1261e8001b
commit b2c8e45d5e
41 changed files with 7326 additions and 7388 deletions

View File

@@ -1,5 +1,5 @@
import { DeleteFilled } from "@ant-design/icons";
import { useTreatments } from "@splitsoftware/splitio-react";
import { useSplitTreatments } from "@splitsoftware/splitio-react";
import {
Button,
DatePicker,
@@ -35,13 +35,14 @@ const mapDispatchToProps = (dispatch) => ({
export default connect(mapStateToProps, mapDispatchToProps)(ShopInfoGeneral);
export function ShopInfoGeneral({ form, bodyshop }) {
const { t } = useTranslation();
const { ClosingPeriod } = useTreatments(
["ClosingPeriod"],
{},
bodyshop && bodyshop.imexshopid
);
const { t } = useTranslation();
const { treatments: {ClosingPeriod} } = useSplitTreatments({
attributes: {},
names: ["ClosingPeriod"],
splitKey: bodyshop && bodyshop.imexshopid,
});
return (
<div>
@@ -413,13 +414,12 @@ export function ShopInfoGeneral({ form, bodyshop }) {
{ClosingPeriod.treatment === "on" && (
<>
<Form.Item
allowClear
name={["accountingconfig", "ClosingPeriod"]}
label={t("bodyshop.fields.closingperiod")} //{t("reportcenter.labels.dates")}
>
<DatePicker.RangePicker
format="MM/DD/YYYY"
ranges={DatePickerRanges}
presets={DatePickerRanges}
/>
</Form.Item>
</>