fix: simplify submit button disabled condition in TransactionCreate component

This commit is contained in:
Yoga Pangestu 2026-08-25 09:58:18 +07:00
parent 6e7a4044b6
commit 579a25cdff

View File

@ -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