Add inventory status to variant list
This commit is contained in:
parent
8f02117865
commit
92d16effb3
15 changed files with 145 additions and 37 deletions
|
@ -15,7 +15,6 @@ import Checkbox from "@saleor/components/Checkbox";
|
||||||
import Money from "@saleor/components/Money";
|
import Money from "@saleor/components/Money";
|
||||||
import ResponsiveTable from "@saleor/components/ResponsiveTable";
|
import ResponsiveTable from "@saleor/components/ResponsiveTable";
|
||||||
import Skeleton from "@saleor/components/Skeleton";
|
import Skeleton from "@saleor/components/Skeleton";
|
||||||
import StatusLabel from "@saleor/components/StatusLabel";
|
|
||||||
import TableHead from "@saleor/components/TableHead";
|
import TableHead from "@saleor/components/TableHead";
|
||||||
import { maybe, renderCollection } from "../../../misc";
|
import { maybe, renderCollection } from "../../../misc";
|
||||||
import { ListActions } from "../../../types";
|
import { ListActions } from "../../../types";
|
||||||
|
@ -25,17 +24,20 @@ import { ProductVariant_costPrice } from "../../types/ProductVariant";
|
||||||
const useStyles = makeStyles(
|
const useStyles = makeStyles(
|
||||||
theme => ({
|
theme => ({
|
||||||
[theme.breakpoints.up("lg")]: {
|
[theme.breakpoints.up("lg")]: {
|
||||||
|
colInventory: {
|
||||||
|
width: 300
|
||||||
|
},
|
||||||
colName: {},
|
colName: {},
|
||||||
colPrice: {
|
colPrice: {
|
||||||
width: 200
|
width: 150
|
||||||
},
|
},
|
||||||
colSku: {
|
colSku: {
|
||||||
width: 250
|
|
||||||
},
|
|
||||||
colStatus: {
|
|
||||||
width: 200
|
width: 200
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
colInventory: {
|
||||||
|
textAlign: "right"
|
||||||
|
},
|
||||||
colName: {},
|
colName: {},
|
||||||
colPrice: {
|
colPrice: {
|
||||||
textAlign: "right"
|
textAlign: "right"
|
||||||
|
@ -148,12 +150,6 @@ export const ProductVariants: React.FC<ProductVariantsProps> = props => {
|
||||||
description="product variant name"
|
description="product variant name"
|
||||||
/>
|
/>
|
||||||
</TableCell>
|
</TableCell>
|
||||||
<TableCell className={classes.colStatus}>
|
|
||||||
<FormattedMessage
|
|
||||||
defaultMessage="Status"
|
|
||||||
description="product variant status"
|
|
||||||
/>
|
|
||||||
</TableCell>
|
|
||||||
<TableCell className={classes.colSku}>
|
<TableCell className={classes.colSku}>
|
||||||
<FormattedMessage defaultMessage="SKU" />
|
<FormattedMessage defaultMessage="SKU" />
|
||||||
</TableCell>
|
</TableCell>
|
||||||
|
@ -165,10 +161,20 @@ export const ProductVariants: React.FC<ProductVariantsProps> = props => {
|
||||||
/>
|
/>
|
||||||
</TableCell>
|
</TableCell>
|
||||||
</Hidden>
|
</Hidden>
|
||||||
|
<TableCell className={classes.colInventory}>
|
||||||
|
<FormattedMessage
|
||||||
|
defaultMessage="Inventory"
|
||||||
|
description="product variant inventory status"
|
||||||
|
/>
|
||||||
|
</TableCell>
|
||||||
</TableHead>
|
</TableHead>
|
||||||
<TableBody>
|
<TableBody>
|
||||||
{renderCollection(variants, variant => {
|
{renderCollection(variants, variant => {
|
||||||
const isSelected = variant ? isChecked(variant.id) : false;
|
const isSelected = variant ? isChecked(variant.id) : false;
|
||||||
|
const numAvailable =
|
||||||
|
variant && variant.stock
|
||||||
|
? variant.stock.reduce((acc, s) => acc + s.quantity, 0)
|
||||||
|
: null;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<TableRow
|
<TableRow
|
||||||
|
@ -189,32 +195,6 @@ export const ProductVariants: React.FC<ProductVariantsProps> = props => {
|
||||||
<TableCell className={classes.colName} data-tc="name">
|
<TableCell className={classes.colName} data-tc="name">
|
||||||
{variant ? variant.name || variant.sku : <Skeleton />}
|
{variant ? variant.name || variant.sku : <Skeleton />}
|
||||||
</TableCell>
|
</TableCell>
|
||||||
<TableCell
|
|
||||||
className={classes.colStatus}
|
|
||||||
data-tc="isAvailable"
|
|
||||||
data-tc-is-available={maybe(
|
|
||||||
() => variant.stockQuantity > 0
|
|
||||||
)}
|
|
||||||
>
|
|
||||||
{variant ? (
|
|
||||||
<StatusLabel
|
|
||||||
status={variant.stockQuantity > 0 ? "success" : "error"}
|
|
||||||
label={
|
|
||||||
variant.stockQuantity > 0
|
|
||||||
? intl.formatMessage({
|
|
||||||
defaultMessage: "Available",
|
|
||||||
description: "product variant status"
|
|
||||||
})
|
|
||||||
: intl.formatMessage({
|
|
||||||
defaultMessage: "Unavailable",
|
|
||||||
description: "product variant status"
|
|
||||||
})
|
|
||||||
}
|
|
||||||
/>
|
|
||||||
) : (
|
|
||||||
<Skeleton />
|
|
||||||
)}
|
|
||||||
</TableCell>
|
|
||||||
<TableCell className={classes.colSku} data-tc="sku">
|
<TableCell className={classes.colSku} data-tc="sku">
|
||||||
{variant ? variant.sku : <Skeleton />}
|
{variant ? variant.sku : <Skeleton />}
|
||||||
</TableCell>
|
</TableCell>
|
||||||
|
@ -233,6 +213,28 @@ export const ProductVariants: React.FC<ProductVariantsProps> = props => {
|
||||||
)}
|
)}
|
||||||
</TableCell>
|
</TableCell>
|
||||||
</Hidden>
|
</Hidden>
|
||||||
|
<TableCell
|
||||||
|
className={classes.colInventory}
|
||||||
|
data-tc="inventory"
|
||||||
|
>
|
||||||
|
{numAvailable === null ? (
|
||||||
|
<Skeleton />
|
||||||
|
) : numAvailable === 0 ? (
|
||||||
|
<FormattedMessage
|
||||||
|
defaultMessage="Unavailable in all locations"
|
||||||
|
description="product variant inventory"
|
||||||
|
/>
|
||||||
|
) : (
|
||||||
|
<FormattedMessage
|
||||||
|
defaultMessage="{numAvailable} available at {numLocations} {numLocations,plural,one{location} other{locations}}"
|
||||||
|
description="product variant inventory"
|
||||||
|
values={{
|
||||||
|
numAvailable,
|
||||||
|
numLocations: variant.stock.length
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
</TableCell>
|
||||||
</TableRow>
|
</TableRow>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
|
|
|
@ -146,6 +146,10 @@ export const productFragmentDetails = gql`
|
||||||
quantity
|
quantity
|
||||||
quantityAllocated
|
quantityAllocated
|
||||||
stockQuantity
|
stockQuantity
|
||||||
|
stock {
|
||||||
|
id
|
||||||
|
quantity
|
||||||
|
}
|
||||||
}
|
}
|
||||||
productType {
|
productType {
|
||||||
id
|
id
|
||||||
|
@ -212,6 +216,10 @@ export const fragmentVariant = gql`
|
||||||
sku
|
sku
|
||||||
quantity
|
quantity
|
||||||
quantityAllocated
|
quantityAllocated
|
||||||
|
stock {
|
||||||
|
id
|
||||||
|
quantity
|
||||||
|
}
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
|
|
@ -127,6 +127,12 @@ export interface Product_variants_priceOverride {
|
||||||
currency: string;
|
currency: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface Product_variants_stock {
|
||||||
|
__typename: "Stock";
|
||||||
|
id: string;
|
||||||
|
quantity: number;
|
||||||
|
}
|
||||||
|
|
||||||
export interface Product_variants {
|
export interface Product_variants {
|
||||||
__typename: "ProductVariant";
|
__typename: "ProductVariant";
|
||||||
id: string;
|
id: string;
|
||||||
|
@ -137,6 +143,7 @@ export interface Product_variants {
|
||||||
quantity: number;
|
quantity: number;
|
||||||
quantityAllocated: number | null;
|
quantityAllocated: number | null;
|
||||||
stockQuantity: number;
|
stockQuantity: number;
|
||||||
|
stock: (Product_variants_stock | null)[] | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface Product_productType {
|
export interface Product_productType {
|
||||||
|
|
|
@ -133,6 +133,12 @@ export interface ProductCreate_productCreate_product_variants_priceOverride {
|
||||||
currency: string;
|
currency: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface ProductCreate_productCreate_product_variants_stock {
|
||||||
|
__typename: "Stock";
|
||||||
|
id: string;
|
||||||
|
quantity: number;
|
||||||
|
}
|
||||||
|
|
||||||
export interface ProductCreate_productCreate_product_variants {
|
export interface ProductCreate_productCreate_product_variants {
|
||||||
__typename: "ProductVariant";
|
__typename: "ProductVariant";
|
||||||
id: string;
|
id: string;
|
||||||
|
@ -143,6 +149,7 @@ export interface ProductCreate_productCreate_product_variants {
|
||||||
quantity: number;
|
quantity: number;
|
||||||
quantityAllocated: number | null;
|
quantityAllocated: number | null;
|
||||||
stockQuantity: number;
|
stockQuantity: number;
|
||||||
|
stock: (ProductCreate_productCreate_product_variants_stock | null)[] | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ProductCreate_productCreate_product_productType {
|
export interface ProductCreate_productCreate_product_productType {
|
||||||
|
|
|
@ -127,6 +127,12 @@ export interface ProductDetails_product_variants_priceOverride {
|
||||||
currency: string;
|
currency: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface ProductDetails_product_variants_stock {
|
||||||
|
__typename: "Stock";
|
||||||
|
id: string;
|
||||||
|
quantity: number;
|
||||||
|
}
|
||||||
|
|
||||||
export interface ProductDetails_product_variants {
|
export interface ProductDetails_product_variants {
|
||||||
__typename: "ProductVariant";
|
__typename: "ProductVariant";
|
||||||
id: string;
|
id: string;
|
||||||
|
@ -137,6 +143,7 @@ export interface ProductDetails_product_variants {
|
||||||
quantity: number;
|
quantity: number;
|
||||||
quantityAllocated: number | null;
|
quantityAllocated: number | null;
|
||||||
stockQuantity: number;
|
stockQuantity: number;
|
||||||
|
stock: (ProductDetails_product_variants_stock | null)[] | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ProductDetails_product_productType_variantAttributes_values {
|
export interface ProductDetails_product_productType_variantAttributes_values {
|
||||||
|
|
|
@ -133,6 +133,12 @@ export interface ProductImageCreate_productImageCreate_product_variants_priceOve
|
||||||
currency: string;
|
currency: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface ProductImageCreate_productImageCreate_product_variants_stock {
|
||||||
|
__typename: "Stock";
|
||||||
|
id: string;
|
||||||
|
quantity: number;
|
||||||
|
}
|
||||||
|
|
||||||
export interface ProductImageCreate_productImageCreate_product_variants {
|
export interface ProductImageCreate_productImageCreate_product_variants {
|
||||||
__typename: "ProductVariant";
|
__typename: "ProductVariant";
|
||||||
id: string;
|
id: string;
|
||||||
|
@ -143,6 +149,7 @@ export interface ProductImageCreate_productImageCreate_product_variants {
|
||||||
quantity: number;
|
quantity: number;
|
||||||
quantityAllocated: number | null;
|
quantityAllocated: number | null;
|
||||||
stockQuantity: number;
|
stockQuantity: number;
|
||||||
|
stock: (ProductImageCreate_productImageCreate_product_variants_stock | null)[] | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ProductImageCreate_productImageCreate_product_productType {
|
export interface ProductImageCreate_productImageCreate_product_productType {
|
||||||
|
|
|
@ -133,6 +133,12 @@ export interface ProductImageUpdate_productImageUpdate_product_variants_priceOve
|
||||||
currency: string;
|
currency: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface ProductImageUpdate_productImageUpdate_product_variants_stock {
|
||||||
|
__typename: "Stock";
|
||||||
|
id: string;
|
||||||
|
quantity: number;
|
||||||
|
}
|
||||||
|
|
||||||
export interface ProductImageUpdate_productImageUpdate_product_variants {
|
export interface ProductImageUpdate_productImageUpdate_product_variants {
|
||||||
__typename: "ProductVariant";
|
__typename: "ProductVariant";
|
||||||
id: string;
|
id: string;
|
||||||
|
@ -143,6 +149,7 @@ export interface ProductImageUpdate_productImageUpdate_product_variants {
|
||||||
quantity: number;
|
quantity: number;
|
||||||
quantityAllocated: number | null;
|
quantityAllocated: number | null;
|
||||||
stockQuantity: number;
|
stockQuantity: number;
|
||||||
|
stock: (ProductImageUpdate_productImageUpdate_product_variants_stock | null)[] | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ProductImageUpdate_productImageUpdate_product_productType {
|
export interface ProductImageUpdate_productImageUpdate_product_productType {
|
||||||
|
|
|
@ -133,6 +133,12 @@ export interface ProductUpdate_productUpdate_product_variants_priceOverride {
|
||||||
currency: string;
|
currency: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface ProductUpdate_productUpdate_product_variants_stock {
|
||||||
|
__typename: "Stock";
|
||||||
|
id: string;
|
||||||
|
quantity: number;
|
||||||
|
}
|
||||||
|
|
||||||
export interface ProductUpdate_productUpdate_product_variants {
|
export interface ProductUpdate_productUpdate_product_variants {
|
||||||
__typename: "ProductVariant";
|
__typename: "ProductVariant";
|
||||||
id: string;
|
id: string;
|
||||||
|
@ -143,6 +149,7 @@ export interface ProductUpdate_productUpdate_product_variants {
|
||||||
quantity: number;
|
quantity: number;
|
||||||
quantityAllocated: number | null;
|
quantityAllocated: number | null;
|
||||||
stockQuantity: number;
|
stockQuantity: number;
|
||||||
|
stock: (ProductUpdate_productUpdate_product_variants_stock | null)[] | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ProductUpdate_productUpdate_product_productType {
|
export interface ProductUpdate_productUpdate_product_productType {
|
||||||
|
|
|
@ -89,6 +89,12 @@ export interface ProductVariant_product {
|
||||||
variants: (ProductVariant_product_variants | null)[] | null;
|
variants: (ProductVariant_product_variants | null)[] | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface ProductVariant_stock {
|
||||||
|
__typename: "Stock";
|
||||||
|
id: string;
|
||||||
|
quantity: number;
|
||||||
|
}
|
||||||
|
|
||||||
export interface ProductVariant {
|
export interface ProductVariant {
|
||||||
__typename: "ProductVariant";
|
__typename: "ProductVariant";
|
||||||
id: string;
|
id: string;
|
||||||
|
@ -101,4 +107,5 @@ export interface ProductVariant {
|
||||||
sku: string;
|
sku: string;
|
||||||
quantity: number;
|
quantity: number;
|
||||||
quantityAllocated: number | null;
|
quantityAllocated: number | null;
|
||||||
|
stock: (ProductVariant_stock | null)[] | null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -89,6 +89,12 @@ export interface ProductVariantDetails_productVariant_product {
|
||||||
variants: (ProductVariantDetails_productVariant_product_variants | null)[] | null;
|
variants: (ProductVariantDetails_productVariant_product_variants | null)[] | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface ProductVariantDetails_productVariant_stock {
|
||||||
|
__typename: "Stock";
|
||||||
|
id: string;
|
||||||
|
quantity: number;
|
||||||
|
}
|
||||||
|
|
||||||
export interface ProductVariantDetails_productVariant {
|
export interface ProductVariantDetails_productVariant {
|
||||||
__typename: "ProductVariant";
|
__typename: "ProductVariant";
|
||||||
id: string;
|
id: string;
|
||||||
|
@ -101,6 +107,7 @@ export interface ProductVariantDetails_productVariant {
|
||||||
sku: string;
|
sku: string;
|
||||||
quantity: number;
|
quantity: number;
|
||||||
quantityAllocated: number | null;
|
quantityAllocated: number | null;
|
||||||
|
stock: (ProductVariantDetails_productVariant_stock | null)[] | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ProductVariantDetails {
|
export interface ProductVariantDetails {
|
||||||
|
|
|
@ -133,6 +133,12 @@ export interface SimpleProductUpdate_productUpdate_product_variants_priceOverrid
|
||||||
currency: string;
|
currency: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface SimpleProductUpdate_productUpdate_product_variants_stock {
|
||||||
|
__typename: "Stock";
|
||||||
|
id: string;
|
||||||
|
quantity: number;
|
||||||
|
}
|
||||||
|
|
||||||
export interface SimpleProductUpdate_productUpdate_product_variants {
|
export interface SimpleProductUpdate_productUpdate_product_variants {
|
||||||
__typename: "ProductVariant";
|
__typename: "ProductVariant";
|
||||||
id: string;
|
id: string;
|
||||||
|
@ -143,6 +149,7 @@ export interface SimpleProductUpdate_productUpdate_product_variants {
|
||||||
quantity: number;
|
quantity: number;
|
||||||
quantityAllocated: number | null;
|
quantityAllocated: number | null;
|
||||||
stockQuantity: number;
|
stockQuantity: number;
|
||||||
|
stock: (SimpleProductUpdate_productUpdate_product_variants_stock | null)[] | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface SimpleProductUpdate_productUpdate_product_productType {
|
export interface SimpleProductUpdate_productUpdate_product_productType {
|
||||||
|
@ -271,6 +278,12 @@ export interface SimpleProductUpdate_productVariantUpdate_productVariant_product
|
||||||
variants: (SimpleProductUpdate_productVariantUpdate_productVariant_product_variants | null)[] | null;
|
variants: (SimpleProductUpdate_productVariantUpdate_productVariant_product_variants | null)[] | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface SimpleProductUpdate_productVariantUpdate_productVariant_stock {
|
||||||
|
__typename: "Stock";
|
||||||
|
id: string;
|
||||||
|
quantity: number;
|
||||||
|
}
|
||||||
|
|
||||||
export interface SimpleProductUpdate_productVariantUpdate_productVariant {
|
export interface SimpleProductUpdate_productVariantUpdate_productVariant {
|
||||||
__typename: "ProductVariant";
|
__typename: "ProductVariant";
|
||||||
id: string;
|
id: string;
|
||||||
|
@ -283,6 +296,7 @@ export interface SimpleProductUpdate_productVariantUpdate_productVariant {
|
||||||
sku: string;
|
sku: string;
|
||||||
quantity: number;
|
quantity: number;
|
||||||
quantityAllocated: number | null;
|
quantityAllocated: number | null;
|
||||||
|
stock: (SimpleProductUpdate_productVariantUpdate_productVariant_stock | null)[] | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface SimpleProductUpdate_productVariantUpdate {
|
export interface SimpleProductUpdate_productVariantUpdate {
|
||||||
|
|
|
@ -97,6 +97,12 @@ export interface VariantCreate_productVariantCreate_productVariant_product {
|
||||||
variants: (VariantCreate_productVariantCreate_productVariant_product_variants | null)[] | null;
|
variants: (VariantCreate_productVariantCreate_productVariant_product_variants | null)[] | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface VariantCreate_productVariantCreate_productVariant_stock {
|
||||||
|
__typename: "Stock";
|
||||||
|
id: string;
|
||||||
|
quantity: number;
|
||||||
|
}
|
||||||
|
|
||||||
export interface VariantCreate_productVariantCreate_productVariant {
|
export interface VariantCreate_productVariantCreate_productVariant {
|
||||||
__typename: "ProductVariant";
|
__typename: "ProductVariant";
|
||||||
id: string;
|
id: string;
|
||||||
|
@ -109,6 +115,7 @@ export interface VariantCreate_productVariantCreate_productVariant {
|
||||||
sku: string;
|
sku: string;
|
||||||
quantity: number;
|
quantity: number;
|
||||||
quantityAllocated: number | null;
|
quantityAllocated: number | null;
|
||||||
|
stock: (VariantCreate_productVariantCreate_productVariant_stock | null)[] | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface VariantCreate_productVariantCreate {
|
export interface VariantCreate_productVariantCreate {
|
||||||
|
|
|
@ -97,6 +97,12 @@ export interface VariantImageAssign_variantImageAssign_productVariant_product {
|
||||||
variants: (VariantImageAssign_variantImageAssign_productVariant_product_variants | null)[] | null;
|
variants: (VariantImageAssign_variantImageAssign_productVariant_product_variants | null)[] | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface VariantImageAssign_variantImageAssign_productVariant_stock {
|
||||||
|
__typename: "Stock";
|
||||||
|
id: string;
|
||||||
|
quantity: number;
|
||||||
|
}
|
||||||
|
|
||||||
export interface VariantImageAssign_variantImageAssign_productVariant {
|
export interface VariantImageAssign_variantImageAssign_productVariant {
|
||||||
__typename: "ProductVariant";
|
__typename: "ProductVariant";
|
||||||
id: string;
|
id: string;
|
||||||
|
@ -109,6 +115,7 @@ export interface VariantImageAssign_variantImageAssign_productVariant {
|
||||||
sku: string;
|
sku: string;
|
||||||
quantity: number;
|
quantity: number;
|
||||||
quantityAllocated: number | null;
|
quantityAllocated: number | null;
|
||||||
|
stock: (VariantImageAssign_variantImageAssign_productVariant_stock | null)[] | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface VariantImageAssign_variantImageAssign {
|
export interface VariantImageAssign_variantImageAssign {
|
||||||
|
|
|
@ -97,6 +97,12 @@ export interface VariantImageUnassign_variantImageUnassign_productVariant_produc
|
||||||
variants: (VariantImageUnassign_variantImageUnassign_productVariant_product_variants | null)[] | null;
|
variants: (VariantImageUnassign_variantImageUnassign_productVariant_product_variants | null)[] | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface VariantImageUnassign_variantImageUnassign_productVariant_stock {
|
||||||
|
__typename: "Stock";
|
||||||
|
id: string;
|
||||||
|
quantity: number;
|
||||||
|
}
|
||||||
|
|
||||||
export interface VariantImageUnassign_variantImageUnassign_productVariant {
|
export interface VariantImageUnassign_variantImageUnassign_productVariant {
|
||||||
__typename: "ProductVariant";
|
__typename: "ProductVariant";
|
||||||
id: string;
|
id: string;
|
||||||
|
@ -109,6 +115,7 @@ export interface VariantImageUnassign_variantImageUnassign_productVariant {
|
||||||
sku: string;
|
sku: string;
|
||||||
quantity: number;
|
quantity: number;
|
||||||
quantityAllocated: number | null;
|
quantityAllocated: number | null;
|
||||||
|
stock: (VariantImageUnassign_variantImageUnassign_productVariant_stock | null)[] | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface VariantImageUnassign_variantImageUnassign {
|
export interface VariantImageUnassign_variantImageUnassign {
|
||||||
|
|
|
@ -97,6 +97,12 @@ export interface VariantUpdate_productVariantUpdate_productVariant_product {
|
||||||
variants: (VariantUpdate_productVariantUpdate_productVariant_product_variants | null)[] | null;
|
variants: (VariantUpdate_productVariantUpdate_productVariant_product_variants | null)[] | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface VariantUpdate_productVariantUpdate_productVariant_stock {
|
||||||
|
__typename: "Stock";
|
||||||
|
id: string;
|
||||||
|
quantity: number;
|
||||||
|
}
|
||||||
|
|
||||||
export interface VariantUpdate_productVariantUpdate_productVariant {
|
export interface VariantUpdate_productVariantUpdate_productVariant {
|
||||||
__typename: "ProductVariant";
|
__typename: "ProductVariant";
|
||||||
id: string;
|
id: string;
|
||||||
|
@ -109,6 +115,7 @@ export interface VariantUpdate_productVariantUpdate_productVariant {
|
||||||
sku: string;
|
sku: string;
|
||||||
quantity: number;
|
quantity: number;
|
||||||
quantityAllocated: number | null;
|
quantityAllocated: number | null;
|
||||||
|
stock: (VariantUpdate_productVariantUpdate_productVariant_stock | null)[] | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface VariantUpdate_productVariantUpdate {
|
export interface VariantUpdate_productVariantUpdate {
|
||||||
|
|
Loading…
Reference in a new issue