|
@@ -96,7 +96,8 @@ const StockInForm: React.FC<Props> = ({ |
|
|
console.log(expiryDate); |
|
|
console.log(expiryDate); |
|
|
if (expiryDate) clearErrors(); |
|
|
if (expiryDate) clearErrors(); |
|
|
if (productionDate) clearErrors(); |
|
|
if (productionDate) clearErrors(); |
|
|
}, [productionDate, expiryDate]); |
|
|
|
|
|
|
|
|
}, [productionDate, expiryDate, clearErrors]); |
|
|
|
|
|
|
|
|
return ( |
|
|
return ( |
|
|
<Grid container justifyContent="flex-start" alignItems="flex-start"> |
|
|
<Grid container justifyContent="flex-start" alignItems="flex-start"> |
|
|
<Grid item xs={12}> |
|
|
<Grid item xs={12}> |
|
@@ -111,6 +112,30 @@ const StockInForm: React.FC<Props> = ({ |
|
|
spacing={2} |
|
|
spacing={2} |
|
|
sx={{ mt: 0.5 }} |
|
|
sx={{ mt: 0.5 }} |
|
|
> |
|
|
> |
|
|
|
|
|
<Grid item xs={6}> |
|
|
|
|
|
<TextField |
|
|
|
|
|
label={t("dnNo")} |
|
|
|
|
|
fullWidth |
|
|
|
|
|
{...register("dnNo", { |
|
|
|
|
|
// required: "productLotNo required!", |
|
|
|
|
|
})} |
|
|
|
|
|
disabled={disabled} |
|
|
|
|
|
// error={Boolean(errors.productLotNo)} |
|
|
|
|
|
// helperText={errors.productLotNo?.message} |
|
|
|
|
|
/> |
|
|
|
|
|
</Grid> |
|
|
|
|
|
<Grid item xs={6}> |
|
|
|
|
|
<TextField |
|
|
|
|
|
label={t("invoiceNo")} |
|
|
|
|
|
fullWidth |
|
|
|
|
|
{...register("invoiceNo", { |
|
|
|
|
|
// required: "productLotNo required!", |
|
|
|
|
|
})} |
|
|
|
|
|
disabled={disabled} |
|
|
|
|
|
// error={Boolean(errors.productLotNo)} |
|
|
|
|
|
// helperText={errors.productLotNo?.message} |
|
|
|
|
|
/> |
|
|
|
|
|
</Grid> |
|
|
<Grid item xs={4}> |
|
|
<Grid item xs={4}> |
|
|
<TextField |
|
|
<TextField |
|
|
label={t("productLotNo")} |
|
|
label={t("productLotNo")} |
|
|