mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-20 13:32:00 +00:00
refactor(FE): Set maxSourceQuantity in edit mode using existing data
This commit is contained in:
@@ -478,6 +478,16 @@ const TransferToLayingFormModal = () => {
|
||||
}
|
||||
}, [totalTransferedChicken]);
|
||||
|
||||
useEffect(() => {
|
||||
if (
|
||||
formik.values.flockSourceKandangs.length > 0 &&
|
||||
formik.values.flockSourceKandangs[0].maxQuantity &&
|
||||
maxSourceQuantity === 0
|
||||
) {
|
||||
setMaxSourceQuantity(formik.values.flockSourceKandangs[0].maxQuantity);
|
||||
}
|
||||
}, [formik.values.flockSourceKandangs, maxSourceQuantity]);
|
||||
|
||||
return (
|
||||
<>
|
||||
<Modal
|
||||
|
||||
Reference in New Issue
Block a user