merchant-backoffice

ZZZ: Inactive/Deprecated
Log | Files | Refs | Submodules | README

commit abc489d8ebd294dd1b2e86b330cfa626017debdb
parent 3c0355ff41c77b780ac34c39e9c2c7556b7db6f7
Author: Sebastian <sebasjm@gmail.com>
Date:   Wed, 18 May 2022 16:18:12 -0300

fix: use amounts.isZero instead of value

Diffstat:
Mpackages/merchant-backoffice/src/paths/instance/orders/create/CreatePage.tsx | 2+-
Mpackages/merchant-backoffice/src/paths/instance/products/list/Table.tsx | 2+-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/packages/merchant-backoffice/src/paths/instance/orders/create/CreatePage.tsx b/packages/merchant-backoffice/src/paths/instance/orders/create/CreatePage.tsx @@ -152,7 +152,7 @@ export function CreatePage({ summary: !value.pricing?.summary ? i18n`required` : undefined, order_price: !value.pricing?.order_price ? i18n`required` - : (Amounts.parse(value.pricing.order_price)?.value || 0) <= 0 + : Amounts.isZero(value.pricing.order_price) ? i18n`must be greater than 0` : undefined, }), diff --git a/packages/merchant-backoffice/src/paths/instance/products/list/Table.tsx b/packages/merchant-backoffice/src/paths/instance/products/list/Table.tsx @@ -173,7 +173,7 @@ function Table({ ); } - const isFree = Amounts.parseOrThrow(i.price).value === 0; + const isFree = Amounts.isZero(Amounts.parseOrThrow(i.price)); return ( <Fragment key={i.id}>