Merge remote-tracking branch 'origin/master-AIO' into feature/IO-3291-Tasks-Notifications

This commit is contained in:
Dave Richer
2025-07-09 11:14:28 -04:00

View File

@@ -25,6 +25,7 @@ import BillFormContainer from "../bill-form/bill-form.container";
import { CalculateBillTotal } from "../bill-form/bill-form.totals.utility"; import { CalculateBillTotal } from "../bill-form/bill-form.totals.utility";
import { handleUpload as handleLocalUpload } from "../documents-local-upload/documents-local-upload.utility"; import { handleUpload as handleLocalUpload } from "../documents-local-upload/documents-local-upload.utility";
import { handleUpload } from "../documents-upload/documents-upload.utility"; import { handleUpload } from "../documents-upload/documents-upload.utility";
import { handleUpload as handleUploadToImageProxy } from "../documents-upload-imgproxy/documents-upload-imgproxy.utility";
const mapStateToProps = createStructuredSelector({ const mapStateToProps = createStructuredSelector({
billEnterModal: selectBillEnterModal, billEnterModal: selectBillEnterModal,
@@ -53,10 +54,10 @@ function BillEnterModalContainer({ billEnterModal, toggleModalVisible, bodyshop,
const notification = useNotification(); const notification = useNotification();
const { const {
treatments: { Enhanced_Payroll } treatments: { Enhanced_Payroll, Imgproxy }
} = useSplitTreatments({ } = useSplitTreatments({
attributes: {}, attributes: {},
names: ["Enhanced_Payroll"], names: ["Enhanced_Payroll", "Imgproxy"],
splitKey: bodyshop.imexshopid splitKey: bodyshop.imexshopid
}); });
@@ -298,20 +299,39 @@ function BillEnterModalContainer({ billEnterModal, toggleModalVisible, bodyshop,
}); });
}); });
} else { } else {
upload.forEach((u) => { //Check if using Imgproxy or cloudinary
handleUpload(
{ file: u.originFileObj }, if (Imgproxy.treatment === "on") {
{ upload.forEach((u) => {
bodyshop: bodyshop, handleUploadToImageProxy(
uploaded_by: currentUser.email, { file: u.originFileObj },
jobId: values.jobid, {
billId: billId, bodyshop: bodyshop,
tagsArray: null, uploaded_by: currentUser.email,
callback: null jobId: values.jobid,
}, billId: billId,
notification tagsArray: null,
); callback: null
}); },
notification
);
});
} else {
upload.forEach((u) => {
handleUpload(
{ file: u.originFileObj },
{
bodyshop: bodyshop,
uploaded_by: currentUser.email,
jobId: values.jobid,
billId: billId,
tagsArray: null,
callback: null
},
notification
);
});
}
} }
} }
/////////////////////////// ///////////////////////////