From 9d0b6a136f5684cd92eeafdabc011d333b1a2717 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Frane=20Poli=C4=87?= <16856471+fPolic@users.noreply.github.com> Date: Fri, 11 Apr 2025 13:30:32 +0200 Subject: [PATCH] fix(dashboard): display null sku (#12155) --- .../manage-variant-inventory-items-form.tsx | 2 +- .../product-create-inventory-kit-section.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/admin/dashboard/src/routes/product-variants/product-variant-manage-inventory-items/components/manage-variant-inventory-items-form/manage-variant-inventory-items-form.tsx b/packages/admin/dashboard/src/routes/product-variants/product-variant-manage-inventory-items/components/manage-variant-inventory-items-form/manage-variant-inventory-items-form.tsx index 6f1a4a8fe0..e768d6ef00 100644 --- a/packages/admin/dashboard/src/routes/product-variants/product-variant-manage-inventory-items/components/manage-variant-inventory-items-form/manage-variant-inventory-items-form.tsx +++ b/packages/admin/dashboard/src/routes/product-variants/product-variant-manage-inventory-items/components/manage-variant-inventory-items-form/manage-variant-inventory-items-form.tsx @@ -91,7 +91,7 @@ export function ManageVariantInventoryItemsForm({ queryFn: (params) => sdk.admin.inventoryItem.list(params), getOptions: (data) => data.inventory_items.map((item) => ({ - label: `${item.title} (${item.sku})`, + label: `${item.title} ${item.sku ? `(${item.sku})` : ""}`, value: item.id!, })), defaultValue: variant.inventory_items?.[0]?.inventory_item_id, diff --git a/packages/admin/dashboard/src/routes/products/product-create/components/product-create-inventory-kit-form/components/product-create-inventory-kit-section/product-create-inventory-kit-section.tsx b/packages/admin/dashboard/src/routes/products/product-create/components/product-create-inventory-kit-form/components/product-create-inventory-kit-section/product-create-inventory-kit-section.tsx index eb045a4f9e..dfb20324fe 100644 --- a/packages/admin/dashboard/src/routes/products/product-create/components/product-create-inventory-kit-form/components/product-create-inventory-kit-section/product-create-inventory-kit-section.tsx +++ b/packages/admin/dashboard/src/routes/products/product-create/components/product-create-inventory-kit-form/components/product-create-inventory-kit-section/product-create-inventory-kit-section.tsx @@ -33,7 +33,7 @@ function VariantSection({ form, variant, index }: VariantSectionProps) { queryFn: (params) => sdk.admin.inventoryItem.list(params), getOptions: (data) => data.inventory_items.map((item) => ({ - label: `${item.title} (${item.sku})`, + label: `${item.title} ${item.sku ? `(${item.sku})` : ""}`, value: item.id, })), })