fix: simplify submit button disabled condition in TransactionCreate component
This commit is contained in:
parent
6e7a4044b6
commit
579a25cdff
@ -1032,16 +1032,7 @@ export default function TransactionCreate({
|
||||
type="submit"
|
||||
className="w-full"
|
||||
disabled={
|
||||
processing ||
|
||||
uploading ||
|
||||
!selectedProductId ||
|
||||
Object.values(quantities).every(
|
||||
(q) => q <= 0,
|
||||
) ||
|
||||
Object.entries(quantities).some(
|
||||
([id, q]) => q > 0 && getUnitPrice(Number(id)) <= 0,
|
||||
) ||
|
||||
total <= 0
|
||||
processing
|
||||
}
|
||||
>
|
||||
{processing
|
||||
|
||||
Loading…
Reference in New Issue
Block a user