Update product variant creator

This commit is contained in:
Dawid Tarasiuk 2020-06-12 13:19:44 +02:00
parent 0a32479327
commit 43aeff8e68
14 changed files with 89 additions and 399 deletions

View file

@ -28,7 +28,7 @@ import ProductVariantPrice from "../ProductVariantPrice";
interface ProductVariantCreatePageFormData { interface ProductVariantCreatePageFormData {
costPrice: string; costPrice: string;
images: string[]; images: string[];
priceOverride: string; price: string;
quantity: string; quantity: string;
sku: string; sku: string;
trackInventory: boolean; trackInventory: boolean;
@ -83,7 +83,7 @@ const ProductVariantCreatePage: React.FC<ProductVariantCreatePageProps> = ({
const initialForm: ProductVariantCreatePageFormData = { const initialForm: ProductVariantCreatePageFormData = {
costPrice: "", costPrice: "",
images: maybe(() => product.images.map(image => image.id)), images: maybe(() => product.images.map(image => image.id)),
priceOverride: "", price: "",
quantity: "0", quantity: "0",
sku: "", sku: "",
trackInventory: true trackInventory: true
@ -130,7 +130,7 @@ const ProductVariantCreatePage: React.FC<ProductVariantCreatePageProps> = ({
<CardSpacer /> <CardSpacer />
<ProductVariantPrice <ProductVariantPrice
errors={errors} errors={errors}
priceOverride={data.priceOverride} price={data.price}
currencySymbol={currencySymbol} currencySymbol={currencySymbol}
costPrice={data.costPrice} costPrice={data.costPrice}
loading={disabled} loading={disabled}

View file

@ -203,7 +203,7 @@ const ProductVariantCreatorSummary: React.FC<ProductVariantCreatorSummaryProps>
error => error.index === variantIndex error => error.index === variantIndex
); );
const variantFormErrors = getFormErrors( const variantFormErrors = getFormErrors(
["priceOverride", "quantity", "sku"], ["price", "quantity", "sku"],
variantErrors variantErrors
); );
@ -234,9 +234,9 @@ const ProductVariantCreatorSummary: React.FC<ProductVariantCreatorSummaryProps>
endAdornment: currencySymbol endAdornment: currencySymbol
}} }}
className={classes.input} className={classes.input}
error={!!variantFormErrors.priceOverride} error={!!variantFormErrors.price}
helperText={getBulkProductErrorMessage( helperText={getBulkProductErrorMessage(
variantFormErrors.priceOverride, variantFormErrors.price,
intl intl
)} )}
inputProps={{ inputProps={{
@ -244,7 +244,7 @@ const ProductVariantCreatorSummary: React.FC<ProductVariantCreatorSummaryProps>
type: "number" type: "number"
}} }}
fullWidth fullWidth
value={variant.priceOverride} value={variant.price}
onChange={event => onChange={event =>
onVariantDataChange( onVariantDataChange(
variantIndex, variantIndex,

View file

@ -87,7 +87,7 @@ Object {
], ],
}, },
], ],
"priceOverride": "24.99", "price": "24.99",
"sku": "", "sku": "",
"stocks": Array [ "stocks": Array [
Object { Object {
@ -129,7 +129,7 @@ Object {
], ],
}, },
], ],
"priceOverride": "24.99", "price": "24.99",
"sku": "", "sku": "",
"stocks": Array [ "stocks": Array [
Object { Object {
@ -171,7 +171,7 @@ Object {
], ],
}, },
], ],
"priceOverride": "26.99", "price": "26.99",
"sku": "", "sku": "",
"stocks": Array [ "stocks": Array [
Object { Object {
@ -213,7 +213,7 @@ Object {
], ],
}, },
], ],
"priceOverride": "49.99", "price": "49.99",
"sku": "", "sku": "",
"stocks": Array [ "stocks": Array [
Object { Object {
@ -255,7 +255,7 @@ Object {
], ],
}, },
], ],
"priceOverride": "24.99", "price": "24.99",
"sku": "", "sku": "",
"stocks": Array [ "stocks": Array [
Object { Object {
@ -297,7 +297,7 @@ Object {
], ],
}, },
], ],
"priceOverride": "24.99", "price": "24.99",
"sku": "", "sku": "",
"stocks": Array [ "stocks": Array [
Object { Object {
@ -339,7 +339,7 @@ Object {
], ],
}, },
], ],
"priceOverride": "26.99", "price": "26.99",
"sku": "", "sku": "",
"stocks": Array [ "stocks": Array [
Object { Object {
@ -381,7 +381,7 @@ Object {
], ],
}, },
], ],
"priceOverride": "26.99", "price": "26.99",
"sku": "", "sku": "",
"stocks": Array [ "stocks": Array [
Object { Object {
@ -499,7 +499,7 @@ Object {
], ],
}, },
], ],
"priceOverride": "24.99", "price": "24.99",
"sku": "", "sku": "",
"stocks": Array [ "stocks": Array [
Object { Object {
@ -541,7 +541,7 @@ Object {
], ],
}, },
], ],
"priceOverride": "24.99", "price": "24.99",
"sku": "", "sku": "",
"stocks": Array [ "stocks": Array [
Object { Object {
@ -583,7 +583,7 @@ Object {
], ],
}, },
], ],
"priceOverride": "26.99", "price": "26.99",
"sku": "", "sku": "",
"stocks": Array [ "stocks": Array [
Object { Object {
@ -625,7 +625,7 @@ Object {
], ],
}, },
], ],
"priceOverride": "26.99", "price": "26.99",
"sku": "", "sku": "",
"stocks": Array [ "stocks": Array [
Object { Object {
@ -667,7 +667,7 @@ Object {
], ],
}, },
], ],
"priceOverride": "24.99", "price": "24.99",
"sku": "", "sku": "",
"stocks": Array [ "stocks": Array [
Object { Object {
@ -709,7 +709,7 @@ Object {
], ],
}, },
], ],
"priceOverride": "24.99", "price": "24.99",
"sku": "", "sku": "",
"stocks": Array [ "stocks": Array [
Object { Object {
@ -751,7 +751,7 @@ Object {
], ],
}, },
], ],
"priceOverride": "26.99", "price": "26.99",
"sku": "", "sku": "",
"stocks": Array [ "stocks": Array [
Object { Object {
@ -793,7 +793,7 @@ Object {
], ],
}, },
], ],
"priceOverride": "26.99", "price": "26.99",
"sku": "", "sku": "",
"stocks": Array [ "stocks": Array [
Object { Object {
@ -930,7 +930,7 @@ Object {
], ],
}, },
], ],
"priceOverride": "45.99", "price": "45.99",
"sku": "", "sku": "",
"stocks": Array [ "stocks": Array [
Object { Object {
@ -972,7 +972,7 @@ Object {
], ],
}, },
], ],
"priceOverride": "45.99", "price": "45.99",
"sku": "", "sku": "",
"stocks": Array [ "stocks": Array [
Object { Object {
@ -1014,7 +1014,7 @@ Object {
], ],
}, },
], ],
"priceOverride": "45.99", "price": "45.99",
"sku": "", "sku": "",
"stocks": Array [ "stocks": Array [
Object { Object {
@ -1056,7 +1056,7 @@ Object {
], ],
}, },
], ],
"priceOverride": "45.99", "price": "45.99",
"sku": "", "sku": "",
"stocks": Array [ "stocks": Array [
Object { Object {
@ -1098,7 +1098,7 @@ Object {
], ],
}, },
], ],
"priceOverride": "45.99", "price": "45.99",
"sku": "", "sku": "",
"stocks": Array [ "stocks": Array [
Object { Object {
@ -1140,7 +1140,7 @@ Object {
], ],
}, },
], ],
"priceOverride": "45.99", "price": "45.99",
"sku": "", "sku": "",
"stocks": Array [ "stocks": Array [
Object { Object {
@ -1182,7 +1182,7 @@ Object {
], ],
}, },
], ],
"priceOverride": "45.99", "price": "45.99",
"sku": "", "sku": "",
"stocks": Array [ "stocks": Array [
Object { Object {
@ -1224,7 +1224,7 @@ Object {
], ],
}, },
], ],
"priceOverride": "45.99", "price": "45.99",
"sku": "", "sku": "",
"stocks": Array [ "stocks": Array [
Object { Object {
@ -1328,7 +1328,7 @@ Object {
], ],
}, },
], ],
"priceOverride": "45.99", "price": "45.99",
"sku": "", "sku": "",
"stocks": Array [ "stocks": Array [
Object { Object {
@ -1370,7 +1370,7 @@ Object {
], ],
}, },
], ],
"priceOverride": "45.99", "price": "45.99",
"sku": "", "sku": "",
"stocks": Array [ "stocks": Array [
Object { Object {
@ -1412,7 +1412,7 @@ Object {
], ],
}, },
], ],
"priceOverride": "45.99", "price": "45.99",
"sku": "", "sku": "",
"stocks": Array [ "stocks": Array [
Object { Object {
@ -1454,7 +1454,7 @@ Object {
], ],
}, },
], ],
"priceOverride": "45.99", "price": "45.99",
"sku": "", "sku": "",
"stocks": Array [ "stocks": Array [
Object { Object {
@ -1496,7 +1496,7 @@ Object {
], ],
}, },
], ],
"priceOverride": "51.99", "price": "51.99",
"sku": "", "sku": "",
"stocks": Array [ "stocks": Array [
Object { Object {
@ -1538,7 +1538,7 @@ Object {
], ],
}, },
], ],
"priceOverride": "51.99", "price": "51.99",
"sku": "", "sku": "",
"stocks": Array [ "stocks": Array [
Object { Object {
@ -1580,7 +1580,7 @@ Object {
], ],
}, },
], ],
"priceOverride": "51.99", "price": "51.99",
"sku": "", "sku": "",
"stocks": Array [ "stocks": Array [
Object { Object {
@ -1622,7 +1622,7 @@ Object {
], ],
}, },
], ],
"priceOverride": "51.99", "price": "51.99",
"sku": "", "sku": "",
"stocks": Array [ "stocks": Array [
Object { Object {
@ -1717,7 +1717,7 @@ Object {
], ],
}, },
], ],
"priceOverride": "10.99", "price": "10.99",
"sku": "", "sku": "",
"stocks": Array [ "stocks": Array [
Object { Object {
@ -1759,7 +1759,7 @@ Object {
], ],
}, },
], ],
"priceOverride": "10.99", "price": "10.99",
"sku": "", "sku": "",
"stocks": Array [ "stocks": Array [
Object { Object {
@ -1801,7 +1801,7 @@ Object {
], ],
}, },
], ],
"priceOverride": "10.99", "price": "10.99",
"sku": "", "sku": "",
"stocks": Array [ "stocks": Array [
Object { Object {
@ -1843,7 +1843,7 @@ Object {
], ],
}, },
], ],
"priceOverride": "10.99", "price": "10.99",
"sku": "", "sku": "",
"stocks": Array [ "stocks": Array [
Object { Object {
@ -1885,7 +1885,7 @@ Object {
], ],
}, },
], ],
"priceOverride": "10.99", "price": "10.99",
"sku": "", "sku": "",
"stocks": Array [ "stocks": Array [
Object { Object {
@ -1927,7 +1927,7 @@ Object {
], ],
}, },
], ],
"priceOverride": "10.99", "price": "10.99",
"sku": "", "sku": "",
"stocks": Array [ "stocks": Array [
Object { Object {
@ -1969,7 +1969,7 @@ Object {
], ],
}, },
], ],
"priceOverride": "10.99", "price": "10.99",
"sku": "", "sku": "",
"stocks": Array [ "stocks": Array [
Object { Object {
@ -2011,7 +2011,7 @@ Object {
], ],
}, },
], ],
"priceOverride": "10.99", "price": "10.99",
"sku": "", "sku": "",
"stocks": Array [ "stocks": Array [
Object { Object {
@ -2119,7 +2119,7 @@ Object {
], ],
}, },
], ],
"priceOverride": "10.99", "price": "10.99",
"sku": "", "sku": "",
"stocks": Array [ "stocks": Array [
Object { Object {
@ -2149,7 +2149,7 @@ Object {
], ],
}, },
], ],
"priceOverride": "10.99", "price": "10.99",
"sku": "", "sku": "",
"stocks": Array [ "stocks": Array [
Object { Object {
@ -2179,7 +2179,7 @@ Object {
], ],
}, },
], ],
"priceOverride": "10.99", "price": "10.99",
"sku": "", "sku": "",
"stocks": Array [ "stocks": Array [
Object { Object {
@ -2209,7 +2209,7 @@ Object {
], ],
}, },
], ],
"priceOverride": "10.99", "price": "10.99",
"sku": "", "sku": "",
"stocks": Array [ "stocks": Array [
Object { Object {
@ -2239,7 +2239,7 @@ Object {
], ],
}, },
], ],
"priceOverride": "10.99", "price": "10.99",
"sku": "", "sku": "",
"stocks": Array [ "stocks": Array [
Object { Object {
@ -2269,7 +2269,7 @@ Object {
], ],
}, },
], ],
"priceOverride": "10.99", "price": "10.99",
"sku": "", "sku": "",
"stocks": Array [ "stocks": Array [
Object { Object {
@ -2299,7 +2299,7 @@ Object {
], ],
}, },
], ],
"priceOverride": "10.99", "price": "10.99",
"sku": "", "sku": "",
"stocks": Array [ "stocks": Array [
Object { Object {
@ -2329,7 +2329,7 @@ Object {
], ],
}, },
], ],
"priceOverride": "10.99", "price": "10.99",
"sku": "", "sku": "",
"stocks": Array [ "stocks": Array [
Object { Object {

View file

@ -43,7 +43,7 @@ describe("Creates variant matrix", () => {
); );
variants.forEach(variant => { variants.forEach(variant => {
expect(variant.priceOverride).toBe(price); expect(variant.price).toBe(price);
variant.stocks.forEach((_, stockIndex) => { variant.stocks.forEach((_, stockIndex) => {
expect(variant.stocks[stockIndex].quantity).toBe(stock[stockIndex]); expect(variant.stocks[stockIndex].quantity).toBe(stock[stockIndex]);
}); });
@ -98,7 +98,7 @@ describe("Creates variant matrix", () => {
).values[0] === attributeValue ).values[0] === attributeValue
) )
.forEach(variant => { .forEach(variant => {
expect(variant.priceOverride).toBe( expect(variant.price).toBe(
(price * (attributeValueIndex + 1)).toString() (price * (attributeValueIndex + 1)).toString()
); );
}); });
@ -141,7 +141,7 @@ describe("Creates variant matrix", () => {
); );
variants.forEach(variant => { variants.forEach(variant => {
expect(variant.priceOverride).toBe(price); expect(variant.price).toBe(price);
}); });
attribute.values.forEach((attributeValue, attributeValueIndex) => { attribute.values.forEach((attributeValue, attributeValueIndex) => {
@ -210,7 +210,7 @@ describe("Creates variant matrix", () => {
).values[0] === attributeValue ).values[0] === attributeValue
) )
.forEach(variant => { .forEach(variant => {
expect(variant.priceOverride).toBe( expect(variant.price).toBe(
(price * (attributeValueIndex + 1)).toString() (price * (attributeValueIndex + 1)).toString()
); );
}); });

View file

@ -46,7 +46,7 @@ function createVariant(
data: ProductVariantCreateFormData, data: ProductVariantCreateFormData,
attributes: CreateVariantInput attributes: CreateVariantInput
): ProductVariantBulkCreateInput { ): ProductVariantBulkCreateInput {
const priceOverride = getValueFromMode(attributes, data.price, "0"); const price = getValueFromMode(attributes, data.price, "0");
const stocks = getValueFromMode( const stocks = getValueFromMode(
attributes, attributes,
data.stock, data.stock,
@ -58,7 +58,7 @@ function createVariant(
id: attribute.attributeId, id: attribute.attributeId,
values: [attribute.attributeValueSlug] values: [attribute.attributeValueSlug]
})), })),
priceOverride, price,
sku: "", sku: "",
stocks: stocks.map((quantity, stockIndex) => ({ stocks: stocks.map((quantity, stockIndex) => ({
quantity, quantity,

View file

@ -250,9 +250,9 @@ describe("Reducer is able to", () => {
} }
]); ]);
expect(state.variants[variantIndex].priceOverride).toBe(value); expect(state.variants[variantIndex].price).toBe(value);
expect(state.variants[variantIndex - 1].priceOverride).toBe( expect(state.variants[variantIndex - 1].price).toBe(
fourthStep.variants[variantIndex - 1].priceOverride fourthStep.variants[variantIndex - 1].price
); );
expect(state).toMatchSnapshot(); expect(state).toMatchSnapshot();
}); });

View file

@ -301,7 +301,7 @@ function changeVariantData(
...state.variants[variantIndex] ...state.variants[variantIndex]
}; };
if (field === "price") { if (field === "price") {
variant.priceOverride = value; variant.price = value;
} else if (field === "sku") { } else if (field === "sku") {
variant.sku = value; variant.sku = value;
} }

View file

@ -32,7 +32,7 @@ import ProductVariantPrice from "../ProductVariantPrice";
export interface ProductVariantPageFormData { export interface ProductVariantPageFormData {
costPrice: string; costPrice: string;
priceOverride: string; price: string;
sku: string; sku: string;
trackInventory: boolean; trackInventory: boolean;
} }
@ -110,7 +110,7 @@ const ProductVariantPage: React.FC<ProductVariantPageProps> = ({
const initialForm: ProductVariantPageFormData = { const initialForm: ProductVariantPageFormData = {
costPrice: maybe(() => variant.costPrice.amount.toString(), ""), costPrice: maybe(() => variant.costPrice.amount.toString(), ""),
priceOverride: maybe(() => variant.priceOverride.amount.toString(), ""), price: maybe(() => variant.price.amount.toString(), ""),
sku: maybe(() => variant.sku, ""), sku: maybe(() => variant.sku, ""),
trackInventory: variant?.trackInventory trackInventory: variant?.trackInventory
}; };
@ -182,10 +182,10 @@ const ProductVariantPage: React.FC<ProductVariantPageProps> = ({
<CardSpacer /> <CardSpacer />
<ProductVariantPrice <ProductVariantPrice
errors={errors} errors={errors}
priceOverride={data.priceOverride} price={data.price}
currencySymbol={ currencySymbol={
variant && variant.priceOverride variant && variant.price
? variant.priceOverride.currency ? variant.price.currency
: variant && variant.costPrice : variant && variant.costPrice
? variant.costPrice.currency ? variant.costPrice.currency
: "" : ""

View file

@ -21,7 +21,7 @@ const useStyles = makeStyles(
interface ProductVariantPriceProps { interface ProductVariantPriceProps {
currencySymbol?: string; currencySymbol?: string;
priceOverride?: string; price?: string;
costPrice?: string; costPrice?: string;
errors: ProductErrorFragment[]; errors: ProductErrorFragment[];
loading?: boolean; loading?: boolean;
@ -29,14 +29,7 @@ interface ProductVariantPriceProps {
} }
const ProductVariantPrice: React.FC<ProductVariantPriceProps> = props => { const ProductVariantPrice: React.FC<ProductVariantPriceProps> = props => {
const { const { currencySymbol, costPrice, errors, price, loading, onChange } = props;
currencySymbol,
costPrice,
errors,
priceOverride,
loading,
onChange
} = props;
const classes = useStyles(props); const classes = useStyles(props);
const intl = useIntl(); const intl = useIntl();
@ -56,7 +49,7 @@ const ProductVariantPrice: React.FC<ProductVariantPriceProps> = props => {
<div> <div>
<PriceField <PriceField
error={!!formErrors.price_override} error={!!formErrors.price_override}
name="priceOverride" name="price"
label={intl.formatMessage({ label={intl.formatMessage({
defaultMessage: "Selling price override" defaultMessage: "Selling price override"
})} })}
@ -65,10 +58,10 @@ const ProductVariantPrice: React.FC<ProductVariantPriceProps> = props => {
intl.formatMessage({ intl.formatMessage({
defaultMessage: "Optional", defaultMessage: "Optional",
description: "optional field", description: "optional field",
id: "productVariantPriceOptionalPriceOverrideField" id: "productVariantPriceOptionalPriceField"
}) })
} }
value={priceOverride} value={price}
currencySymbol={currencySymbol} currencySymbol={currencySymbol}
onChange={onChange} onChange={onChange}
disabled={loading} disabled={loading}

View file

@ -327,8 +327,8 @@ export const ProductVariants: React.FC<ProductVariantsProps> = props => {
<Hidden smDown> <Hidden smDown>
<TableCell className={classes.colPrice} data-tc="price"> <TableCell className={classes.colPrice} data-tc="price">
{variant ? ( {variant ? (
variant.priceOverride ? ( variant.price ? (
<Money money={variant.priceOverride} /> <Money money={variant.price} />
) : fallbackPrice ? ( ) : fallbackPrice ? (
<Money money={fallbackPrice} /> <Money money={fallbackPrice} />
) : ( ) : (

View file

@ -256,7 +256,7 @@ export const product: (
], ],
margin: 2, margin: 2,
name: "Cordoba Oro", name: "Cordoba Oro",
priceOverride: { price: {
__typename: "Money", __typename: "Money",
amount: 678.78, amount: 678.78,
currency: "USD" currency: "USD"
@ -297,7 +297,7 @@ export const product: (
], ],
margin: 7, margin: 7,
name: "silver", name: "silver",
priceOverride: null, price: null,
sku: "69055-15190", sku: "69055-15190",
stocks: [ stocks: [
{ {
@ -1121,7 +1121,7 @@ export const variant = (placeholderImage: string): ProductVariant => ({
} }
], ],
name: "Extended Hard", name: "Extended Hard",
priceOverride: { price: {
__typename: "Money", __typename: "Money",
amount: 100, amount: 100,
currency: "USD" currency: "USD"

View file

@ -155,7 +155,7 @@ export const ProductVariant: React.FC<ProductUpdateProps> = ({
})), })),
costPrice: decimal(data.costPrice), costPrice: decimal(data.costPrice),
id: variantId, id: variantId,
priceOverride: decimal(data.priceOverride), price: decimal(data.price),
removeStocks: data.removeStocks, removeStocks: data.removeStocks,
sku: data.sku, sku: data.sku,
stocks: data.updateStocks.map( stocks: data.updateStocks.map(

View file

@ -75,7 +75,7 @@ export const ProductVariant: React.FC<ProductVariantCreateProps> = ({
values: [attribute.value] values: [attribute.value]
})), })),
costPrice: decimal(formData.costPrice), costPrice: decimal(formData.costPrice),
priceOverride: decimal(formData.priceOverride), price: decimal(formData.price),
product: productId, product: productId,
sku: formData.sku, sku: formData.sku,
stocks: formData.stocks.map(stock => ({ stocks: formData.stocks.map(stock => ({

View file

@ -105754,109 +105754,6 @@ Ctrl + K"
<div <div
class="CardSpacer-spacer-id" class="CardSpacer-spacer-id"
/> />
<div
class="MuiPaper-root-id MuiPaper-elevation0-id MuiCard-root-id MuiPaper-rounded-id"
>
<div
class="CardTitle-root-id"
>
<span
class="MuiTypography-root-id CardTitle-title-id MuiTypography-h5-id"
>
Pricing
</span>
<div
class="CardTitle-toolbar-id"
/>
</div>
<div
class="CardTitle-children-id"
>
<label
class="MuiFormControlLabel-root-id MuiFormControlLabel-disabled-id"
>
<button
class="MuiButtonBase-root-id Checkbox-root-id MuiButtonBase-disabled-id"
disabled=""
tabindex="-1"
type="button"
>
<input
class="Checkbox-box-id Checkbox-disabled-id"
disabled=""
name="chargeTaxes"
type="checkbox"
value="false"
/>
</button>
<span
class="MuiTypography-root-id MuiFormControlLabel-label-id MuiFormControlLabel-disabled-id MuiTypography-body1-id"
>
Charge taxes for this item
</span>
</label>
</div>
<hr
class="CardTitle-hr-id"
/>
<div
class="MuiCardContent-root-id"
>
<div
class="ProductPricing-root-id"
>
<div
class="MuiFormControl-root-id MuiTextField-root-id MuiFormControl-fullWidth-id"
>
<label
class="MuiFormLabel-root-id MuiInputLabel-root-id MuiInputLabel-formControl-id MuiInputLabel-animated-id MuiInputLabel-shrink-id MuiInputLabel-outlined-id MuiFormLabel-disabled-id MuiInputLabel-disabled-id MuiFormLabel-filled-id"
data-shrink="true"
>
Price
</label>
<div
class="MuiInputBase-root-id MuiOutlinedInput-root-id MuiInputBase-disabled-id MuiOutlinedInput-disabled-id MuiInputBase-fullWidth-id MuiInputBase-formControl-id MuiInputBase-adornedEnd-id MuiOutlinedInput-adornedEnd-id"
>
<input
aria-invalid="false"
class="MuiInputBase-input-id MuiOutlinedInput-input-id MuiInputBase-disabled-id MuiOutlinedInput-disabled-id MuiInputBase-inputAdornedEnd-id MuiOutlinedInput-inputAdornedEnd-id"
disabled=""
min="0"
name="basePrice"
type="number"
value="0"
/>
<div
class="MuiInputAdornment-root-id PriceField-currencySymbol-id MuiInputAdornment-positionEnd-id"
>
<div
class="MuiTypography-root-id MuiTypography-body1-id MuiTypography-colorTextSecondary-id"
>
USD
</div>
</div>
<fieldset
aria-hidden="true"
class="PrivateNotchedOutline-root-id MuiOutlinedInput-notchedOutline-id"
style="padding-left:8px"
>
<legend
class="PrivateNotchedOutline-legend-id"
style="width:0"
>
<span>
</span>
</legend>
</fieldset>
</div>
</div>
</div>
</div>
</div>
<div
class="CardSpacer-spacer-id"
/>
<div <div
class="MuiPaper-root-id MuiPaper-elevation0-id MuiCard-root-id MuiPaper-rounded-id" class="MuiPaper-root-id MuiPaper-elevation0-id MuiCard-root-id MuiPaper-rounded-id"
> >
@ -106719,106 +106616,6 @@ Ctrl + K"
<div <div
class="CardSpacer-spacer-id" class="CardSpacer-spacer-id"
/> />
<div
class="MuiPaper-root-id MuiPaper-elevation0-id MuiCard-root-id MuiPaper-rounded-id"
>
<div
class="CardTitle-root-id"
>
<span
class="MuiTypography-root-id CardTitle-title-id MuiTypography-h5-id"
>
Pricing
</span>
<div
class="CardTitle-toolbar-id"
/>
</div>
<div
class="CardTitle-children-id"
>
<label
class="MuiFormControlLabel-root-id"
>
<button
class="MuiButtonBase-root-id Checkbox-root-id"
tabindex="0"
type="button"
>
<input
class="Checkbox-box-id"
name="chargeTaxes"
type="checkbox"
value="false"
/>
</button>
<span
class="MuiTypography-root-id MuiFormControlLabel-label-id MuiTypography-body1-id"
>
Charge taxes for this item
</span>
</label>
</div>
<hr
class="CardTitle-hr-id"
/>
<div
class="MuiCardContent-root-id"
>
<div
class="ProductPricing-root-id"
>
<div
class="MuiFormControl-root-id MuiTextField-root-id MuiFormControl-fullWidth-id"
>
<label
class="MuiFormLabel-root-id MuiInputLabel-root-id MuiInputLabel-formControl-id MuiInputLabel-animated-id MuiInputLabel-shrink-id MuiInputLabel-outlined-id MuiFormLabel-filled-id"
data-shrink="true"
>
Price
</label>
<div
class="MuiInputBase-root-id MuiOutlinedInput-root-id MuiInputBase-fullWidth-id MuiInputBase-formControl-id MuiInputBase-adornedEnd-id MuiOutlinedInput-adornedEnd-id"
>
<input
aria-invalid="false"
class="MuiInputBase-input-id MuiOutlinedInput-input-id MuiInputBase-inputAdornedEnd-id MuiOutlinedInput-inputAdornedEnd-id"
min="0"
name="basePrice"
type="number"
value="0"
/>
<div
class="MuiInputAdornment-root-id PriceField-currencySymbol-id MuiInputAdornment-positionEnd-id"
>
<div
class="MuiTypography-root-id MuiTypography-body1-id MuiTypography-colorTextSecondary-id"
>
USD
</div>
</div>
<fieldset
aria-hidden="true"
class="PrivateNotchedOutline-root-id MuiOutlinedInput-notchedOutline-id"
style="padding-left:8px"
>
<legend
class="PrivateNotchedOutline-legend-id"
style="width:0"
>
<span>
</span>
</legend>
</fieldset>
</div>
</div>
</div>
</div>
</div>
<div
class="CardSpacer-spacer-id"
/>
<div <div
class="MuiPaper-root-id MuiPaper-elevation0-id MuiCard-root-id MuiPaper-rounded-id" class="MuiPaper-root-id MuiPaper-elevation0-id MuiCard-root-id MuiPaper-rounded-id"
> >
@ -107680,106 +107477,6 @@ Ctrl + K"
<div <div
class="CardSpacer-spacer-id" class="CardSpacer-spacer-id"
/> />
<div
class="MuiPaper-root-id MuiPaper-elevation0-id MuiCard-root-id MuiPaper-rounded-id"
>
<div
class="CardTitle-root-id"
>
<span
class="MuiTypography-root-id CardTitle-title-id MuiTypography-h5-id"
>
Pricing
</span>
<div
class="CardTitle-toolbar-id"
/>
</div>
<div
class="CardTitle-children-id"
>
<label
class="MuiFormControlLabel-root-id"
>
<button
class="MuiButtonBase-root-id Checkbox-root-id"
tabindex="0"
type="button"
>
<input
class="Checkbox-box-id"
name="chargeTaxes"
type="checkbox"
value="false"
/>
</button>
<span
class="MuiTypography-root-id MuiFormControlLabel-label-id MuiTypography-body1-id"
>
Charge taxes for this item
</span>
</label>
</div>
<hr
class="CardTitle-hr-id"
/>
<div
class="MuiCardContent-root-id"
>
<div
class="ProductPricing-root-id"
>
<div
class="MuiFormControl-root-id MuiTextField-root-id MuiFormControl-fullWidth-id"
>
<label
class="MuiFormLabel-root-id MuiInputLabel-root-id MuiInputLabel-formControl-id MuiInputLabel-animated-id MuiInputLabel-shrink-id MuiInputLabel-outlined-id MuiFormLabel-filled-id"
data-shrink="true"
>
Price
</label>
<div
class="MuiInputBase-root-id MuiOutlinedInput-root-id MuiInputBase-fullWidth-id MuiInputBase-formControl-id MuiInputBase-adornedEnd-id MuiOutlinedInput-adornedEnd-id"
>
<input
aria-invalid="false"
class="MuiInputBase-input-id MuiOutlinedInput-input-id MuiInputBase-inputAdornedEnd-id MuiOutlinedInput-inputAdornedEnd-id"
min="0"
name="basePrice"
type="number"
value="0"
/>
<div
class="MuiInputAdornment-root-id PriceField-currencySymbol-id MuiInputAdornment-positionEnd-id"
>
<div
class="MuiTypography-root-id MuiTypography-body1-id MuiTypography-colorTextSecondary-id"
>
USD
</div>
</div>
<fieldset
aria-hidden="true"
class="PrivateNotchedOutline-root-id MuiOutlinedInput-notchedOutline-id"
style="padding-left:8px"
>
<legend
class="PrivateNotchedOutline-legend-id"
style="width:0"
>
<span>
</span>
</legend>
</fieldset>
</div>
</div>
</div>
</div>
</div>
<div
class="CardSpacer-spacer-id"
/>
<div <div
class="MuiPaper-root-id MuiPaper-elevation0-id MuiCard-root-id MuiPaper-rounded-id" class="MuiPaper-root-id MuiPaper-elevation0-id MuiCard-root-id MuiPaper-rounded-id"
> >
@ -108490,7 +108187,7 @@ exports[`Storyshots Views / Products / Create product variant add first variant
<input <input
aria-invalid="false" aria-invalid="false"
class="MuiInputBase-input-id MuiOutlinedInput-input-id MuiInputBase-inputAdornedEnd-id MuiOutlinedInput-inputAdornedEnd-id" class="MuiInputBase-input-id MuiOutlinedInput-input-id MuiInputBase-inputAdornedEnd-id MuiOutlinedInput-inputAdornedEnd-id"
name="priceOverride" name="price"
type="number" type="number"
value="" value=""
/> />
@ -109084,7 +108781,7 @@ exports[`Storyshots Views / Products / Create product variant default 1`] = `
<input <input
aria-invalid="false" aria-invalid="false"
class="MuiInputBase-input-id MuiOutlinedInput-input-id MuiInputBase-inputAdornedEnd-id MuiOutlinedInput-inputAdornedEnd-id" class="MuiInputBase-input-id MuiOutlinedInput-input-id MuiInputBase-inputAdornedEnd-id MuiOutlinedInput-inputAdornedEnd-id"
name="priceOverride" name="price"
type="number" type="number"
value="" value=""
/> />
@ -109601,7 +109298,7 @@ exports[`Storyshots Views / Products / Create product variant when loading data
aria-invalid="false" aria-invalid="false"
class="MuiInputBase-input-id MuiOutlinedInput-input-id MuiInputBase-disabled-id MuiOutlinedInput-disabled-id MuiInputBase-inputAdornedEnd-id MuiOutlinedInput-inputAdornedEnd-id" class="MuiInputBase-input-id MuiOutlinedInput-input-id MuiInputBase-disabled-id MuiOutlinedInput-disabled-id MuiInputBase-inputAdornedEnd-id MuiOutlinedInput-inputAdornedEnd-id"
disabled="" disabled=""
name="priceOverride" name="price"
type="number" type="number"
value="" value=""
/> />
@ -110212,7 +109909,7 @@ exports[`Storyshots Views / Products / Create product variant with errors 1`] =
<input <input
aria-invalid="false" aria-invalid="false"
class="MuiInputBase-input-id MuiOutlinedInput-input-id MuiInputBase-inputAdornedEnd-id MuiOutlinedInput-inputAdornedEnd-id" class="MuiInputBase-input-id MuiOutlinedInput-input-id MuiInputBase-inputAdornedEnd-id MuiOutlinedInput-inputAdornedEnd-id"
name="priceOverride" name="price"
type="number" type="number"
value="" value=""
/> />
@ -129831,7 +129528,7 @@ exports[`Storyshots Views / Products / Product variant details attribute errors
<input <input
aria-invalid="false" aria-invalid="false"
class="MuiInputBase-input-id MuiOutlinedInput-input-id MuiInputBase-inputAdornedEnd-id MuiOutlinedInput-inputAdornedEnd-id" class="MuiInputBase-input-id MuiOutlinedInput-input-id MuiInputBase-inputAdornedEnd-id MuiOutlinedInput-inputAdornedEnd-id"
name="priceOverride" name="price"
type="number" type="number"
value="100" value="100"
/> />
@ -130723,7 +130420,7 @@ exports[`Storyshots Views / Products / Product variant details when loaded data
<input <input
aria-invalid="false" aria-invalid="false"
class="MuiInputBase-input-id MuiOutlinedInput-input-id MuiInputBase-inputAdornedEnd-id MuiOutlinedInput-inputAdornedEnd-id" class="MuiInputBase-input-id MuiOutlinedInput-input-id MuiInputBase-inputAdornedEnd-id MuiOutlinedInput-inputAdornedEnd-id"
name="priceOverride" name="price"
type="number" type="number"
value="100" value="100"
/> />
@ -131396,7 +131093,7 @@ exports[`Storyshots Views / Products / Product variant details when loading data
aria-invalid="false" aria-invalid="false"
class="MuiInputBase-input-id MuiOutlinedInput-input-id MuiInputBase-disabled-id MuiOutlinedInput-disabled-id MuiInputBase-inputAdornedEnd-id MuiOutlinedInput-inputAdornedEnd-id" class="MuiInputBase-input-id MuiOutlinedInput-input-id MuiInputBase-disabled-id MuiOutlinedInput-disabled-id MuiInputBase-inputAdornedEnd-id MuiOutlinedInput-inputAdornedEnd-id"
disabled="" disabled=""
name="priceOverride" name="price"
type="number" type="number"
value="" value=""
/> />