update product create mutation create handler
This commit is contained in:
parent
52cf01ed72
commit
6ae8fcebcd
4 changed files with 7 additions and 0 deletions
|
@ -145,6 +145,7 @@ export const productUpdateMutation = gql`
|
||||||
$name: String
|
$name: String
|
||||||
$basePrice: PositiveDecimal
|
$basePrice: PositiveDecimal
|
||||||
$seo: SeoInput
|
$seo: SeoInput
|
||||||
|
$slug: String
|
||||||
$visibleInListings: Boolean
|
$visibleInListings: Boolean
|
||||||
) {
|
) {
|
||||||
productUpdate(
|
productUpdate(
|
||||||
|
@ -160,6 +161,7 @@ export const productUpdateMutation = gql`
|
||||||
name: $name
|
name: $name
|
||||||
basePrice: $basePrice
|
basePrice: $basePrice
|
||||||
seo: $seo
|
seo: $seo
|
||||||
|
slug: $slug
|
||||||
visibleInListings: $visibleInListings
|
visibleInListings: $visibleInListings
|
||||||
}
|
}
|
||||||
) {
|
) {
|
||||||
|
@ -291,6 +293,7 @@ export const productCreateMutation = gql`
|
||||||
$productType: ID!
|
$productType: ID!
|
||||||
$sku: String
|
$sku: String
|
||||||
$seo: SeoInput
|
$seo: SeoInput
|
||||||
|
$slug: String
|
||||||
$stocks: [StockInput!]!
|
$stocks: [StockInput!]!
|
||||||
$trackInventory: Boolean!
|
$trackInventory: Boolean!
|
||||||
$weight: WeightScalar
|
$weight: WeightScalar
|
||||||
|
@ -310,6 +313,7 @@ export const productCreateMutation = gql`
|
||||||
productType: $productType
|
productType: $productType
|
||||||
sku: $sku
|
sku: $sku
|
||||||
seo: $seo
|
seo: $seo
|
||||||
|
slug: $slug
|
||||||
stocks: $stocks
|
stocks: $stocks
|
||||||
trackInventory: $trackInventory
|
trackInventory: $trackInventory
|
||||||
weight: $weight
|
weight: $weight
|
||||||
|
|
|
@ -244,6 +244,7 @@ export interface ProductCreateVariables {
|
||||||
productType: string;
|
productType: string;
|
||||||
sku?: string | null;
|
sku?: string | null;
|
||||||
seo?: SeoInput | null;
|
seo?: SeoInput | null;
|
||||||
|
slug?: string | null;
|
||||||
stocks: StockInput[];
|
stocks: StockInput[];
|
||||||
trackInventory: boolean;
|
trackInventory: boolean;
|
||||||
weight?: any | null;
|
weight?: any | null;
|
||||||
|
|
|
@ -243,5 +243,6 @@ export interface ProductUpdateVariables {
|
||||||
name?: string | null;
|
name?: string | null;
|
||||||
basePrice?: any | null;
|
basePrice?: any | null;
|
||||||
seo?: SeoInput | null;
|
seo?: SeoInput | null;
|
||||||
|
slug?: string | null;
|
||||||
visibleInListings?: boolean | null;
|
visibleInListings?: boolean | null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -95,6 +95,7 @@ export const ProductCreateView: React.FC = () => {
|
||||||
title: formData.seoTitle
|
title: formData.seoTitle
|
||||||
},
|
},
|
||||||
sku: formData.sku,
|
sku: formData.sku,
|
||||||
|
slug: formData.slug,
|
||||||
stocks: formData.stocks.map(stock => ({
|
stocks: formData.stocks.map(stock => ({
|
||||||
quantity: parseInt(stock.value, 0),
|
quantity: parseInt(stock.value, 0),
|
||||||
warehouse: stock.id
|
warehouse: stock.id
|
||||||
|
|
Loading…
Reference in a new issue