From d0f10288201161483979802c86ecf02f2312d48a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Frane=20Poli=C4=87?= <16856471+fPolic@users.noreply.github.com> Date: Mon, 23 Sep 2024 11:07:51 +0200 Subject: [PATCH] fix(dashboard): prices validation in PL bulk editor (#9245) **What** - fix validation errors in bulk editor on Price List create flow --- FIXES CC-511 --- .../admin/dashboard/src/routes/price-lists/common/schemas.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/admin/dashboard/src/routes/price-lists/common/schemas.ts b/packages/admin/dashboard/src/routes/price-lists/common/schemas.ts index 344e43eb88..755c14add1 100644 --- a/packages/admin/dashboard/src/routes/price-lists/common/schemas.ts +++ b/packages/admin/dashboard/src/routes/price-lists/common/schemas.ts @@ -14,7 +14,7 @@ export const PriceListRulesSchema = z.object({ }) const PriceListCreateCurrencyPriceSchema = z.object({ - amount: z.string().optional(), + amount: z.string().or(z.number()).optional(), }) export type PriceListCreateCurrencyPrice = z.infer< @@ -22,7 +22,7 @@ export type PriceListCreateCurrencyPrice = z.infer< > const PriceListCreateRegionPriceSchema = z.object({ - amount: z.string().optional(), + amount: z.string().or(z.number()).optional(), }) export type PriceListCreateRegionPriceSchema = z.infer<