add: submit tag distribution numbers validation

This commit is contained in:
2026-01-24 12:01:56 +03:30
parent 3550e1fec7
commit cfc4b8cc53

View File

@@ -249,7 +249,21 @@ export const SubmitTagDistribution = ({ item, getData }: any) => {
/> />
))} ))}
<Button type="submit">{isEdit ? "ویرایش" : "ثبت"}</Button> <Button
disabled={
batches.length === 0 ||
batches.some(
(b) =>
b.count === "" ||
b.count === undefined ||
b.count === null ||
Number(b.count) <= 0
)
}
type="submit"
>
{isEdit ? "ویرایش" : "ثبت"}
</Button>
</Grid> </Grid>
</form> </form>
); );