Update storybook with no warehouses case
This commit is contained in:
parent
61723bd045
commit
992816c641
5 changed files with 4990 additions and 0 deletions
|
@ -140,6 +140,17 @@ storiesOf(
|
||||||
step={ProductVariantCreatorStep.prices}
|
step={ProductVariantCreatorStep.prices}
|
||||||
warehouses={[props.warehouses[0]]}
|
warehouses={[props.warehouses[0]]}
|
||||||
/>
|
/>
|
||||||
|
))
|
||||||
|
.add("ship when no warehouses", () => (
|
||||||
|
<ProductVariantCreatorContent
|
||||||
|
{...props}
|
||||||
|
data={{
|
||||||
|
...data,
|
||||||
|
warehouses: []
|
||||||
|
}}
|
||||||
|
step={ProductVariantCreatorStep.prices}
|
||||||
|
warehouses={[]}
|
||||||
|
/>
|
||||||
));
|
));
|
||||||
|
|
||||||
storiesOf("Views / Products / Create multiple variants / summary", module)
|
storiesOf("Views / Products / Create multiple variants / summary", module)
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -105,6 +105,25 @@ storiesOf("Views / Products / Product edit", module)
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
))
|
))
|
||||||
|
.add("no stock, no variants and no warehouses", () => (
|
||||||
|
<ProductUpdatePage
|
||||||
|
{...props}
|
||||||
|
warehouses={[]}
|
||||||
|
product={{
|
||||||
|
...product,
|
||||||
|
productType: {
|
||||||
|
...product.productType,
|
||||||
|
hasVariants: false
|
||||||
|
},
|
||||||
|
variants: [
|
||||||
|
{
|
||||||
|
...product.variants[0],
|
||||||
|
stocks: []
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
))
|
||||||
.add("no product attributes", () => (
|
.add("no product attributes", () => (
|
||||||
<ProductUpdatePage
|
<ProductUpdatePage
|
||||||
{...props}
|
{...props}
|
||||||
|
|
|
@ -98,4 +98,21 @@ storiesOf("Views / Products / Create product variant", module)
|
||||||
warehouses={warehouseList}
|
warehouses={warehouseList}
|
||||||
onWarehouseConfigure={() => undefined}
|
onWarehouseConfigure={() => undefined}
|
||||||
/>
|
/>
|
||||||
|
))
|
||||||
|
.add("no warehouses", () => (
|
||||||
|
<ProductVariantCreatePage
|
||||||
|
currencySymbol="USD"
|
||||||
|
weightUnit="kg"
|
||||||
|
disabled={false}
|
||||||
|
errors={[]}
|
||||||
|
header="Add variant"
|
||||||
|
product={product}
|
||||||
|
onBack={() => undefined}
|
||||||
|
onSubmit={() => undefined}
|
||||||
|
onVariantClick={undefined}
|
||||||
|
onVariantReorder={() => undefined}
|
||||||
|
saveButtonBarState="default"
|
||||||
|
warehouses={[]}
|
||||||
|
onWarehouseConfigure={() => undefined}
|
||||||
|
/>
|
||||||
));
|
));
|
||||||
|
|
|
@ -51,6 +51,25 @@ storiesOf("Views / Products / Product variant details", module)
|
||||||
onWarehouseConfigure={() => undefined}
|
onWarehouseConfigure={() => undefined}
|
||||||
/>
|
/>
|
||||||
))
|
))
|
||||||
|
.add("no warehouses", () => (
|
||||||
|
<ProductVariantPage
|
||||||
|
defaultWeightUnit="kg"
|
||||||
|
header={variant.name || variant.sku}
|
||||||
|
errors={[]}
|
||||||
|
variant={variant}
|
||||||
|
onAdd={() => undefined}
|
||||||
|
onBack={() => undefined}
|
||||||
|
onDelete={undefined}
|
||||||
|
onSetDefaultVariant={() => undefined}
|
||||||
|
onImageSelect={() => undefined}
|
||||||
|
onSubmit={() => undefined}
|
||||||
|
onVariantClick={() => undefined}
|
||||||
|
onVariantReorder={() => undefined}
|
||||||
|
saveButtonBarState="default"
|
||||||
|
warehouses={[]}
|
||||||
|
onWarehouseConfigure={() => undefined}
|
||||||
|
/>
|
||||||
|
))
|
||||||
.add("attribute errors", () => (
|
.add("attribute errors", () => (
|
||||||
<ProductVariantPage
|
<ProductVariantPage
|
||||||
defaultWeightUnit="kg"
|
defaultWeightUnit="kg"
|
||||||
|
|
Loading…
Reference in a new issue