add: submit tag distribution numbers validation
This commit is contained in:
@@ -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>
|
||||
</form>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user