SALEOR-1629 - Fix voucher page bugs (#1031)
This commit is contained in:
parent
0e054cc1e4
commit
8e038dc786
22 changed files with 133 additions and 72 deletions
|
@ -29,6 +29,7 @@ All notable, unreleased changes to this project will be documented in this file.
|
||||||
- Update CollectionBulkDelete error type - #1030 by @d-wysocki
|
- Update CollectionBulkDelete error type - #1030 by @d-wysocki
|
||||||
- Remove mailing settings - #1027 by @dominik-zeglen
|
- Remove mailing settings - #1027 by @dominik-zeglen
|
||||||
- Update schema to contain email plugin changes - #1029 by @dominik-zeglen
|
- Update schema to contain email plugin changes - #1029 by @dominik-zeglen
|
||||||
|
- Fix creating shipping voucher - #1031 by @orzechdev
|
||||||
- Unconfirmed order manipulation - #967 by @tomaszszymanski129
|
- Unconfirmed order manipulation - #967 by @tomaszszymanski129
|
||||||
- Add multiline field plugins - #974 by @dominik-zeglen
|
- Add multiline field plugins - #974 by @dominik-zeglen
|
||||||
- Handle limit reached error - #990 by @dominik-zeglen
|
- Handle limit reached error - #990 by @dominik-zeglen
|
||||||
|
|
|
@ -2,8 +2,9 @@ export const VOUCHERS_SELECTORS = {
|
||||||
createVoucherButton: "[data-test-id='create-voucher']",
|
createVoucherButton: "[data-test-id='create-voucher']",
|
||||||
voucherCodeInput: "[name='code']",
|
voucherCodeInput: "[name='code']",
|
||||||
discountRadioButtons: "[name='discountType']",
|
discountRadioButtons: "[name='discountType']",
|
||||||
percentageDiscountRadioButton: "[name='discountType'][value='PERCENTAGE']",
|
percentageDiscountRadioButton:
|
||||||
fixedDiscountRadioButton: "[name='discountType'][value='FIXED']",
|
"[name='discountType'][value='VALUE_PERCENTAGE']",
|
||||||
|
fixedDiscountRadioButton: "[name='discountType'][value='VALUE_FIXED']",
|
||||||
shippingDiscountRadioButton: "[name='discountType'][value='SHIPPING']",
|
shippingDiscountRadioButton: "[name='discountType'][value='SHIPPING']",
|
||||||
discountValueInputs: "[name='value']"
|
discountValueInputs: "[name='value']"
|
||||||
};
|
};
|
||||||
|
|
|
@ -8,18 +8,18 @@ import Form from "@saleor/components/Form";
|
||||||
import Grid from "@saleor/components/Grid";
|
import Grid from "@saleor/components/Grid";
|
||||||
import PageHeader from "@saleor/components/PageHeader";
|
import PageHeader from "@saleor/components/PageHeader";
|
||||||
import SaveButtonBar from "@saleor/components/SaveButtonBar";
|
import SaveButtonBar from "@saleor/components/SaveButtonBar";
|
||||||
import { createChannelsChangeHandler } from "@saleor/discounts/handlers";
|
import {
|
||||||
|
createChannelsChangeHandler,
|
||||||
|
createDiscountTypeChangeHandler
|
||||||
|
} from "@saleor/discounts/handlers";
|
||||||
import { DiscountErrorFragment } from "@saleor/fragments/types/DiscountErrorFragment";
|
import { DiscountErrorFragment } from "@saleor/fragments/types/DiscountErrorFragment";
|
||||||
import { sectionNames } from "@saleor/intl";
|
import { sectionNames } from "@saleor/intl";
|
||||||
import { validatePrice } from "@saleor/products/utils/validation";
|
import { validatePrice } from "@saleor/products/utils/validation";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { useIntl } from "react-intl";
|
import { useIntl } from "react-intl";
|
||||||
|
|
||||||
import {
|
import { VoucherTypeEnum } from "../../../types/globalTypes";
|
||||||
DiscountValueTypeEnum,
|
import { DiscountTypeEnum, RequirementsPicker } from "../../types";
|
||||||
VoucherTypeEnum
|
|
||||||
} from "../../../types/globalTypes";
|
|
||||||
import { RequirementsPicker } from "../../types";
|
|
||||||
import VoucherDates from "../VoucherDates";
|
import VoucherDates from "../VoucherDates";
|
||||||
import VoucherInfo from "../VoucherInfo";
|
import VoucherInfo from "../VoucherInfo";
|
||||||
import VoucherLimits from "../VoucherLimits";
|
import VoucherLimits from "../VoucherLimits";
|
||||||
|
@ -32,7 +32,7 @@ export interface FormData {
|
||||||
applyOncePerOrder: boolean;
|
applyOncePerOrder: boolean;
|
||||||
channelListings: ChannelVoucherData[];
|
channelListings: ChannelVoucherData[];
|
||||||
code: string;
|
code: string;
|
||||||
discountType: DiscountValueTypeEnum;
|
discountType: DiscountTypeEnum;
|
||||||
endDate: string;
|
endDate: string;
|
||||||
endTime: string;
|
endTime: string;
|
||||||
hasEndDate: boolean;
|
hasEndDate: boolean;
|
||||||
|
@ -78,7 +78,7 @@ const VoucherCreatePage: React.FC<VoucherCreatePageProps> = ({
|
||||||
applyOncePerOrder: false,
|
applyOncePerOrder: false,
|
||||||
channelListings,
|
channelListings,
|
||||||
code: "",
|
code: "",
|
||||||
discountType: DiscountValueTypeEnum.FIXED,
|
discountType: DiscountTypeEnum.VALUE_FIXED,
|
||||||
endDate: "",
|
endDate: "",
|
||||||
endTime: "",
|
endTime: "",
|
||||||
hasEndDate: false,
|
hasEndDate: false,
|
||||||
|
@ -95,17 +95,22 @@ const VoucherCreatePage: React.FC<VoucherCreatePageProps> = ({
|
||||||
return (
|
return (
|
||||||
<Form initial={initialForm} onSubmit={onSubmit}>
|
<Form initial={initialForm} onSubmit={onSubmit}>
|
||||||
{({ change, data, hasChanged, submit, triggerChange }) => {
|
{({ change, data, hasChanged, submit, triggerChange }) => {
|
||||||
|
const handleDiscountTypeChange = createDiscountTypeChangeHandler(
|
||||||
|
change
|
||||||
|
);
|
||||||
const handleChannelChange = createChannelsChangeHandler(
|
const handleChannelChange = createChannelsChangeHandler(
|
||||||
data.channelListings,
|
data.channelListings,
|
||||||
onChannelsChange,
|
onChannelsChange,
|
||||||
triggerChange
|
triggerChange
|
||||||
);
|
);
|
||||||
const formDisabled = data.channelListings?.some(
|
const formDisabled =
|
||||||
channel =>
|
data.discountType.toString() !== "SHIPPING" &&
|
||||||
validatePrice(channel.discountValue) ||
|
data.channelListings?.some(
|
||||||
(data.requirementsPicker === RequirementsPicker.ORDER &&
|
channel =>
|
||||||
validatePrice(channel.minSpent))
|
validatePrice(channel.discountValue) ||
|
||||||
);
|
(data.requirementsPicker === RequirementsPicker.ORDER &&
|
||||||
|
validatePrice(channel.minSpent))
|
||||||
|
);
|
||||||
return (
|
return (
|
||||||
<Container>
|
<Container>
|
||||||
<AppHeader onBack={onBack}>
|
<AppHeader onBack={onBack}>
|
||||||
|
@ -123,7 +128,7 @@ const VoucherCreatePage: React.FC<VoucherCreatePageProps> = ({
|
||||||
data={data}
|
data={data}
|
||||||
errors={errors}
|
errors={errors}
|
||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
onChange={change}
|
onChange={event => handleDiscountTypeChange(data, event)}
|
||||||
variant="create"
|
variant="create"
|
||||||
/>
|
/>
|
||||||
<CardSpacer />
|
<CardSpacer />
|
||||||
|
|
|
@ -11,8 +11,11 @@ import Grid from "@saleor/components/Grid";
|
||||||
import PageHeader from "@saleor/components/PageHeader";
|
import PageHeader from "@saleor/components/PageHeader";
|
||||||
import SaveButtonBar from "@saleor/components/SaveButtonBar";
|
import SaveButtonBar from "@saleor/components/SaveButtonBar";
|
||||||
import { Tab, TabContainer } from "@saleor/components/Tab";
|
import { Tab, TabContainer } from "@saleor/components/Tab";
|
||||||
import { createChannelsChangeHandler } from "@saleor/discounts/handlers";
|
import {
|
||||||
import { RequirementsPicker } from "@saleor/discounts/types";
|
createChannelsChangeHandler,
|
||||||
|
createDiscountTypeChangeHandler
|
||||||
|
} from "@saleor/discounts/handlers";
|
||||||
|
import { DiscountTypeEnum, RequirementsPicker } from "@saleor/discounts/types";
|
||||||
import { DiscountErrorFragment } from "@saleor/fragments/types/DiscountErrorFragment";
|
import { DiscountErrorFragment } from "@saleor/fragments/types/DiscountErrorFragment";
|
||||||
import { sectionNames } from "@saleor/intl";
|
import { sectionNames } from "@saleor/intl";
|
||||||
import { validatePrice } from "@saleor/products/utils/validation";
|
import { validatePrice } from "@saleor/products/utils/validation";
|
||||||
|
@ -56,7 +59,7 @@ export interface VoucherDetailsPageFormData {
|
||||||
applyOncePerOrder: boolean;
|
applyOncePerOrder: boolean;
|
||||||
channelListings: ChannelVoucherData[];
|
channelListings: ChannelVoucherData[];
|
||||||
code: string;
|
code: string;
|
||||||
discountType: DiscountValueTypeEnum;
|
discountType: DiscountTypeEnum;
|
||||||
endDate: string;
|
endDate: string;
|
||||||
endTime: string;
|
endTime: string;
|
||||||
hasEndDate: boolean;
|
hasEndDate: boolean;
|
||||||
|
@ -156,15 +159,19 @@ const VoucherDetailsPage: React.FC<VoucherDetailsPageProps> = ({
|
||||||
requirementsPickerInitValue = RequirementsPicker.NONE;
|
requirementsPickerInitValue = RequirementsPicker.NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const discountType =
|
||||||
|
voucher?.type === VoucherTypeEnum.SHIPPING
|
||||||
|
? DiscountTypeEnum.SHIPPING
|
||||||
|
: voucher?.discountValueType === DiscountValueTypeEnum.PERCENTAGE
|
||||||
|
? DiscountTypeEnum.VALUE_PERCENTAGE
|
||||||
|
: DiscountTypeEnum.VALUE_FIXED;
|
||||||
|
|
||||||
const initialForm: VoucherDetailsPageFormData = {
|
const initialForm: VoucherDetailsPageFormData = {
|
||||||
applyOncePerCustomer: voucher?.applyOncePerCustomer || false,
|
applyOncePerCustomer: voucher?.applyOncePerCustomer || false,
|
||||||
applyOncePerOrder: voucher?.applyOncePerOrder || false,
|
applyOncePerOrder: voucher?.applyOncePerOrder || false,
|
||||||
channelListings,
|
channelListings,
|
||||||
code: voucher?.code || "",
|
code: voucher?.code || "",
|
||||||
discountType: maybe(
|
discountType,
|
||||||
() => voucher.discountValueType,
|
|
||||||
DiscountValueTypeEnum.FIXED
|
|
||||||
),
|
|
||||||
endDate: splitDateTime(maybe(() => voucher.endDate, "")).date,
|
endDate: splitDateTime(maybe(() => voucher.endDate, "")).date,
|
||||||
endTime: splitDateTime(maybe(() => voucher.endDate, "")).time,
|
endTime: splitDateTime(maybe(() => voucher.endDate, "")).time,
|
||||||
hasEndDate: maybe(() => !!voucher.endDate),
|
hasEndDate: maybe(() => !!voucher.endDate),
|
||||||
|
@ -183,17 +190,22 @@ const VoucherDetailsPage: React.FC<VoucherDetailsPageProps> = ({
|
||||||
return (
|
return (
|
||||||
<Form initial={initialForm} onSubmit={onSubmit}>
|
<Form initial={initialForm} onSubmit={onSubmit}>
|
||||||
{({ change, data, hasChanged, submit, triggerChange }) => {
|
{({ change, data, hasChanged, submit, triggerChange }) => {
|
||||||
|
const handleDiscountTypeChange = createDiscountTypeChangeHandler(
|
||||||
|
change
|
||||||
|
);
|
||||||
const handleChannelChange = createChannelsChangeHandler(
|
const handleChannelChange = createChannelsChangeHandler(
|
||||||
data.channelListings,
|
data.channelListings,
|
||||||
onChannelsChange,
|
onChannelsChange,
|
||||||
triggerChange
|
triggerChange
|
||||||
);
|
);
|
||||||
const formDisabled = data.channelListings?.some(
|
const formDisabled =
|
||||||
channel =>
|
data.discountType.toString() !== "SHIPPING" &&
|
||||||
validatePrice(channel.discountValue) ||
|
data.channelListings?.some(
|
||||||
(data.requirementsPicker === RequirementsPicker.ORDER &&
|
channel =>
|
||||||
validatePrice(channel.minSpent))
|
validatePrice(channel.discountValue) ||
|
||||||
);
|
(data.requirementsPicker === RequirementsPicker.ORDER &&
|
||||||
|
validatePrice(channel.minSpent))
|
||||||
|
);
|
||||||
return (
|
return (
|
||||||
<Container>
|
<Container>
|
||||||
<AppHeader onBack={onBack}>
|
<AppHeader onBack={onBack}>
|
||||||
|
@ -214,7 +226,7 @@ const VoucherDetailsPage: React.FC<VoucherDetailsPageProps> = ({
|
||||||
data={data}
|
data={data}
|
||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
errors={errors}
|
errors={errors}
|
||||||
onChange={change}
|
onChange={event => handleDiscountTypeChange(data, event)}
|
||||||
/>
|
/>
|
||||||
<CardSpacer />
|
<CardSpacer />
|
||||||
{data.discountType.toString() !== "SHIPPING" ? (
|
{data.discountType.toString() !== "SHIPPING" ? (
|
||||||
|
|
|
@ -3,13 +3,13 @@ import CardContent from "@material-ui/core/CardContent";
|
||||||
import CardTitle from "@saleor/components/CardTitle";
|
import CardTitle from "@saleor/components/CardTitle";
|
||||||
import Grid from "@saleor/components/Grid";
|
import Grid from "@saleor/components/Grid";
|
||||||
import RadioGroupField from "@saleor/components/RadioGroupField";
|
import RadioGroupField from "@saleor/components/RadioGroupField";
|
||||||
|
import { DiscountTypeEnum } from "@saleor/discounts/types";
|
||||||
import { DiscountErrorFragment } from "@saleor/fragments/types/DiscountErrorFragment";
|
import { DiscountErrorFragment } from "@saleor/fragments/types/DiscountErrorFragment";
|
||||||
import { getFormErrors } from "@saleor/utils/errors";
|
import { getFormErrors } from "@saleor/utils/errors";
|
||||||
import getDiscountErrorMessage from "@saleor/utils/errors/discounts";
|
import getDiscountErrorMessage from "@saleor/utils/errors/discounts";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { useIntl } from "react-intl";
|
import { useIntl } from "react-intl";
|
||||||
|
|
||||||
import { DiscountValueTypeEnum } from "../../../types/globalTypes";
|
|
||||||
import { VoucherDetailsPageFormData } from "../VoucherDetailsPage";
|
import { VoucherDetailsPageFormData } from "../VoucherDetailsPage";
|
||||||
|
|
||||||
interface VoucherTypesProps {
|
interface VoucherTypesProps {
|
||||||
|
@ -35,21 +35,21 @@ const VoucherTypes = ({
|
||||||
defaultMessage: "Fixed Amount",
|
defaultMessage: "Fixed Amount",
|
||||||
description: "voucher discount type"
|
description: "voucher discount type"
|
||||||
}),
|
}),
|
||||||
value: DiscountValueTypeEnum.FIXED
|
value: DiscountTypeEnum.VALUE_FIXED
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: intl.formatMessage({
|
label: intl.formatMessage({
|
||||||
defaultMessage: "Percentage",
|
defaultMessage: "Percentage",
|
||||||
description: "voucher discount type"
|
description: "voucher discount type"
|
||||||
}),
|
}),
|
||||||
value: DiscountValueTypeEnum.PERCENTAGE
|
value: DiscountTypeEnum.VALUE_PERCENTAGE
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: intl.formatMessage({
|
label: intl.formatMessage({
|
||||||
defaultMessage: "Free Shipping",
|
defaultMessage: "Free Shipping",
|
||||||
description: "voucher discount type"
|
description: "voucher discount type"
|
||||||
}),
|
}),
|
||||||
value: "SHIPPING"
|
value: DiscountTypeEnum.SHIPPING
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
@ -14,6 +14,7 @@ import Skeleton from "@saleor/components/Skeleton";
|
||||||
import TableHead from "@saleor/components/TableHead";
|
import TableHead from "@saleor/components/TableHead";
|
||||||
import TextFieldWithChoice from "@saleor/components/TextFieldWithChoice";
|
import TextFieldWithChoice from "@saleor/components/TextFieldWithChoice";
|
||||||
import { ChannelInput } from "@saleor/discounts/handlers";
|
import { ChannelInput } from "@saleor/discounts/handlers";
|
||||||
|
import { DiscountTypeEnum } from "@saleor/discounts/types";
|
||||||
import { DiscountErrorFragment } from "@saleor/fragments/types/DiscountErrorFragment";
|
import { DiscountErrorFragment } from "@saleor/fragments/types/DiscountErrorFragment";
|
||||||
import { renderCollection } from "@saleor/misc";
|
import { renderCollection } from "@saleor/misc";
|
||||||
import { getFormErrors } from "@saleor/utils/errors";
|
import { getFormErrors } from "@saleor/utils/errors";
|
||||||
|
@ -21,7 +22,6 @@ import getDiscountErrorMessage from "@saleor/utils/errors/discounts";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { FormattedMessage, useIntl } from "react-intl";
|
import { FormattedMessage, useIntl } from "react-intl";
|
||||||
|
|
||||||
import { DiscountValueTypeEnum } from "../../../types/globalTypes";
|
|
||||||
import { translateVoucherTypes } from "../../translations";
|
import { translateVoucherTypes } from "../../translations";
|
||||||
import { VoucherDetailsPageFormData } from "../VoucherDetailsPage";
|
import { VoucherDetailsPageFormData } from "../VoucherDetailsPage";
|
||||||
import { useStyles } from "./styles";
|
import { useStyles } from "./styles";
|
||||||
|
@ -108,7 +108,7 @@ const VoucherValue: React.FC<VoucherValueProps> = props => {
|
||||||
ChoiceProps={{
|
ChoiceProps={{
|
||||||
label:
|
label:
|
||||||
data.discountType ===
|
data.discountType ===
|
||||||
DiscountValueTypeEnum.FIXED
|
DiscountTypeEnum.VALUE_FIXED
|
||||||
? listing.currency
|
? listing.currency
|
||||||
: "%",
|
: "%",
|
||||||
name: "discountType" as keyof FormData,
|
name: "discountType" as keyof FormData,
|
||||||
|
|
|
@ -153,6 +153,7 @@ export const voucherList: VoucherList_vouchers_edges_node[] = [
|
||||||
country: "Germany"
|
country: "Germany"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
type: "ENTIRE_ORDER" as VoucherTypeEnum,
|
||||||
discountValueType: "PERCENTAGE" as DiscountValueTypeEnum,
|
discountValueType: "PERCENTAGE" as DiscountValueTypeEnum,
|
||||||
endDate: null,
|
endDate: null,
|
||||||
id: "Vm91Y2hlcjox",
|
id: "Vm91Y2hlcjox",
|
||||||
|
@ -183,6 +184,7 @@ export const voucherList: VoucherList_vouchers_edges_node[] = [
|
||||||
],
|
],
|
||||||
code: "FREE2020",
|
code: "FREE2020",
|
||||||
countries: [],
|
countries: [],
|
||||||
|
type: "ENTIRE_ORDER" as VoucherTypeEnum,
|
||||||
discountValueType: "FIXED" as DiscountValueTypeEnum,
|
discountValueType: "FIXED" as DiscountValueTypeEnum,
|
||||||
endDate: null,
|
endDate: null,
|
||||||
id: "Vm91Y2hlcjoy",
|
id: "Vm91Y2hlcjoy",
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
import { ChannelSaleData, ChannelVoucherData } from "@saleor/channels/utils";
|
import { ChannelSaleData, ChannelVoucherData } from "@saleor/channels/utils";
|
||||||
import { SaleDetailsPageFormData } from "@saleor/discounts/components/SaleDetailsPage";
|
import { SaleDetailsPageFormData } from "@saleor/discounts/components/SaleDetailsPage";
|
||||||
import { VoucherDetailsPageFormData } from "@saleor/discounts/components/VoucherDetailsPage";
|
import { VoucherDetailsPageFormData } from "@saleor/discounts/components/VoucherDetailsPage";
|
||||||
import { RequirementsPicker } from "@saleor/discounts/types";
|
import { DiscountTypeEnum, RequirementsPicker } from "@saleor/discounts/types";
|
||||||
|
import { ChangeEvent, FormChange } from "@saleor/hooks/useForm";
|
||||||
import { RequireOnlyOne } from "@saleor/misc";
|
import { RequireOnlyOne } from "@saleor/misc";
|
||||||
|
import { VoucherTypeEnum } from "@saleor/types/globalTypes";
|
||||||
import { diff } from "fast-array-diff";
|
import { diff } from "fast-array-diff";
|
||||||
export interface ChannelArgs {
|
export interface ChannelArgs {
|
||||||
discountValue: string;
|
discountValue: string;
|
||||||
|
@ -14,6 +16,29 @@ export type ChannelInput = RequireOnlyOne<
|
||||||
"discountValue" | "minSpent"
|
"discountValue" | "minSpent"
|
||||||
>;
|
>;
|
||||||
|
|
||||||
|
export function createDiscountTypeChangeHandler(change: FormChange) {
|
||||||
|
return (formData: VoucherDetailsPageFormData, event: ChangeEvent) => {
|
||||||
|
if (formData.type === VoucherTypeEnum.SHIPPING) {
|
||||||
|
// if previously type was shipping
|
||||||
|
change({
|
||||||
|
target: {
|
||||||
|
name: "type",
|
||||||
|
value: VoucherTypeEnum.ENTIRE_ORDER
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else if (event.target.value === DiscountTypeEnum.SHIPPING) {
|
||||||
|
// if currently type should be shipping
|
||||||
|
change({
|
||||||
|
target: {
|
||||||
|
name: "type",
|
||||||
|
value: VoucherTypeEnum.ENTIRE_ORDER
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
change(event);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
export function createChannelsChangeHandler(
|
export function createChannelsChangeHandler(
|
||||||
channelListings: ChannelVoucherData[],
|
channelListings: ChannelVoucherData[],
|
||||||
updateChannels: (data: ChannelVoucherData[]) => void,
|
updateChannels: (data: ChannelVoucherData[]) => void,
|
||||||
|
|
|
@ -3,3 +3,9 @@ export enum RequirementsPicker {
|
||||||
ITEM = "ITEM",
|
ITEM = "ITEM",
|
||||||
NONE = "NONE"
|
NONE = "NONE"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export enum DiscountTypeEnum {
|
||||||
|
VALUE_FIXED = "VALUE_FIXED",
|
||||||
|
VALUE_PERCENTAGE = "VALUE_PERCENTAGE",
|
||||||
|
SHIPPING = "SHIPPING"
|
||||||
|
}
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
// @generated
|
// @generated
|
||||||
// This file was automatically generated and should not be edited.
|
// This file was automatically generated and should not be edited.
|
||||||
|
|
||||||
import { CatalogueInput, DiscountErrorCode, DiscountValueTypeEnum, VoucherTypeEnum } from "./../../types/globalTypes";
|
import { CatalogueInput, DiscountErrorCode, VoucherTypeEnum, DiscountValueTypeEnum } from "./../../types/globalTypes";
|
||||||
|
|
||||||
// ====================================================
|
// ====================================================
|
||||||
// GraphQL mutation operation: VoucherCataloguesAdd
|
// GraphQL mutation operation: VoucherCataloguesAdd
|
||||||
|
@ -172,11 +172,11 @@ export interface VoucherCataloguesAdd_voucherCataloguesAdd_voucher {
|
||||||
startDate: any;
|
startDate: any;
|
||||||
endDate: any | null;
|
endDate: any | null;
|
||||||
usageLimit: number | null;
|
usageLimit: number | null;
|
||||||
|
type: VoucherTypeEnum;
|
||||||
discountValueType: DiscountValueTypeEnum;
|
discountValueType: DiscountValueTypeEnum;
|
||||||
countries: (VoucherCataloguesAdd_voucherCataloguesAdd_voucher_countries | null)[] | null;
|
countries: (VoucherCataloguesAdd_voucherCataloguesAdd_voucher_countries | null)[] | null;
|
||||||
minCheckoutItemsQuantity: number | null;
|
minCheckoutItemsQuantity: number | null;
|
||||||
channelListings: VoucherCataloguesAdd_voucherCataloguesAdd_voucher_channelListings[] | null;
|
channelListings: VoucherCataloguesAdd_voucherCataloguesAdd_voucher_channelListings[] | null;
|
||||||
type: VoucherTypeEnum;
|
|
||||||
used: number;
|
used: number;
|
||||||
applyOncePerOrder: boolean;
|
applyOncePerOrder: boolean;
|
||||||
applyOncePerCustomer: boolean;
|
applyOncePerCustomer: boolean;
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
// @generated
|
// @generated
|
||||||
// This file was automatically generated and should not be edited.
|
// This file was automatically generated and should not be edited.
|
||||||
|
|
||||||
import { CatalogueInput, DiscountErrorCode, DiscountValueTypeEnum, VoucherTypeEnum } from "./../../types/globalTypes";
|
import { CatalogueInput, DiscountErrorCode, VoucherTypeEnum, DiscountValueTypeEnum } from "./../../types/globalTypes";
|
||||||
|
|
||||||
// ====================================================
|
// ====================================================
|
||||||
// GraphQL mutation operation: VoucherCataloguesRemove
|
// GraphQL mutation operation: VoucherCataloguesRemove
|
||||||
|
@ -172,11 +172,11 @@ export interface VoucherCataloguesRemove_voucherCataloguesRemove_voucher {
|
||||||
startDate: any;
|
startDate: any;
|
||||||
endDate: any | null;
|
endDate: any | null;
|
||||||
usageLimit: number | null;
|
usageLimit: number | null;
|
||||||
|
type: VoucherTypeEnum;
|
||||||
discountValueType: DiscountValueTypeEnum;
|
discountValueType: DiscountValueTypeEnum;
|
||||||
countries: (VoucherCataloguesRemove_voucherCataloguesRemove_voucher_countries | null)[] | null;
|
countries: (VoucherCataloguesRemove_voucherCataloguesRemove_voucher_countries | null)[] | null;
|
||||||
minCheckoutItemsQuantity: number | null;
|
minCheckoutItemsQuantity: number | null;
|
||||||
channelListings: VoucherCataloguesRemove_voucherCataloguesRemove_voucher_channelListings[] | null;
|
channelListings: VoucherCataloguesRemove_voucherCataloguesRemove_voucher_channelListings[] | null;
|
||||||
type: VoucherTypeEnum;
|
|
||||||
used: number;
|
used: number;
|
||||||
applyOncePerOrder: boolean;
|
applyOncePerOrder: boolean;
|
||||||
applyOncePerCustomer: boolean;
|
applyOncePerCustomer: boolean;
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
// @generated
|
// @generated
|
||||||
// This file was automatically generated and should not be edited.
|
// This file was automatically generated and should not be edited.
|
||||||
|
|
||||||
import { VoucherChannelListingInput, DiscountErrorCode, DiscountValueTypeEnum } from "./../../types/globalTypes";
|
import { VoucherChannelListingInput, DiscountErrorCode, VoucherTypeEnum, DiscountValueTypeEnum } from "./../../types/globalTypes";
|
||||||
|
|
||||||
// ====================================================
|
// ====================================================
|
||||||
// GraphQL mutation operation: VoucherChannelListingUpdate
|
// GraphQL mutation operation: VoucherChannelListingUpdate
|
||||||
|
@ -51,6 +51,7 @@ export interface VoucherChannelListingUpdate_voucherChannelListingUpdate_voucher
|
||||||
startDate: any;
|
startDate: any;
|
||||||
endDate: any | null;
|
endDate: any | null;
|
||||||
usageLimit: number | null;
|
usageLimit: number | null;
|
||||||
|
type: VoucherTypeEnum;
|
||||||
discountValueType: DiscountValueTypeEnum;
|
discountValueType: DiscountValueTypeEnum;
|
||||||
countries: (VoucherChannelListingUpdate_voucherChannelListingUpdate_voucher_countries | null)[] | null;
|
countries: (VoucherChannelListingUpdate_voucherChannelListingUpdate_voucher_countries | null)[] | null;
|
||||||
minCheckoutItemsQuantity: number | null;
|
minCheckoutItemsQuantity: number | null;
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
// @generated
|
// @generated
|
||||||
// This file was automatically generated and should not be edited.
|
// This file was automatically generated and should not be edited.
|
||||||
|
|
||||||
import { VoucherInput, DiscountErrorCode, DiscountValueTypeEnum } from "./../../types/globalTypes";
|
import { VoucherInput, DiscountErrorCode, VoucherTypeEnum, DiscountValueTypeEnum } from "./../../types/globalTypes";
|
||||||
|
|
||||||
// ====================================================
|
// ====================================================
|
||||||
// GraphQL mutation operation: VoucherCreate
|
// GraphQL mutation operation: VoucherCreate
|
||||||
|
@ -51,6 +51,7 @@ export interface VoucherCreate_voucherCreate_voucher {
|
||||||
startDate: any;
|
startDate: any;
|
||||||
endDate: any | null;
|
endDate: any | null;
|
||||||
usageLimit: number | null;
|
usageLimit: number | null;
|
||||||
|
type: VoucherTypeEnum;
|
||||||
discountValueType: DiscountValueTypeEnum;
|
discountValueType: DiscountValueTypeEnum;
|
||||||
countries: (VoucherCreate_voucherCreate_voucher_countries | null)[] | null;
|
countries: (VoucherCreate_voucherCreate_voucher_countries | null)[] | null;
|
||||||
minCheckoutItemsQuantity: number | null;
|
minCheckoutItemsQuantity: number | null;
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
// @generated
|
// @generated
|
||||||
// This file was automatically generated and should not be edited.
|
// This file was automatically generated and should not be edited.
|
||||||
|
|
||||||
import { DiscountValueTypeEnum, VoucherTypeEnum } from "./../../types/globalTypes";
|
import { VoucherTypeEnum, DiscountValueTypeEnum } from "./../../types/globalTypes";
|
||||||
|
|
||||||
// ====================================================
|
// ====================================================
|
||||||
// GraphQL query operation: VoucherDetails
|
// GraphQL query operation: VoucherDetails
|
||||||
|
@ -165,11 +165,11 @@ export interface VoucherDetails_voucher {
|
||||||
startDate: any;
|
startDate: any;
|
||||||
endDate: any | null;
|
endDate: any | null;
|
||||||
usageLimit: number | null;
|
usageLimit: number | null;
|
||||||
|
type: VoucherTypeEnum;
|
||||||
discountValueType: DiscountValueTypeEnum;
|
discountValueType: DiscountValueTypeEnum;
|
||||||
countries: (VoucherDetails_voucher_countries | null)[] | null;
|
countries: (VoucherDetails_voucher_countries | null)[] | null;
|
||||||
minCheckoutItemsQuantity: number | null;
|
minCheckoutItemsQuantity: number | null;
|
||||||
channelListings: VoucherDetails_voucher_channelListings[] | null;
|
channelListings: VoucherDetails_voucher_channelListings[] | null;
|
||||||
type: VoucherTypeEnum;
|
|
||||||
used: number;
|
used: number;
|
||||||
applyOncePerOrder: boolean;
|
applyOncePerOrder: boolean;
|
||||||
applyOncePerCustomer: boolean;
|
applyOncePerCustomer: boolean;
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
// @generated
|
// @generated
|
||||||
// This file was automatically generated and should not be edited.
|
// This file was automatically generated and should not be edited.
|
||||||
|
|
||||||
import { VoucherFilterInput, VoucherSortingInput, DiscountValueTypeEnum } from "./../../types/globalTypes";
|
import { VoucherFilterInput, VoucherSortingInput, VoucherTypeEnum, DiscountValueTypeEnum } from "./../../types/globalTypes";
|
||||||
|
|
||||||
// ====================================================
|
// ====================================================
|
||||||
// GraphQL query operation: VoucherList
|
// GraphQL query operation: VoucherList
|
||||||
|
@ -44,6 +44,7 @@ export interface VoucherList_vouchers_edges_node {
|
||||||
startDate: any;
|
startDate: any;
|
||||||
endDate: any | null;
|
endDate: any | null;
|
||||||
usageLimit: number | null;
|
usageLimit: number | null;
|
||||||
|
type: VoucherTypeEnum;
|
||||||
discountValueType: DiscountValueTypeEnum;
|
discountValueType: DiscountValueTypeEnum;
|
||||||
countries: (VoucherList_vouchers_edges_node_countries | null)[] | null;
|
countries: (VoucherList_vouchers_edges_node_countries | null)[] | null;
|
||||||
minCheckoutItemsQuantity: number | null;
|
minCheckoutItemsQuantity: number | null;
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
// @generated
|
// @generated
|
||||||
// This file was automatically generated and should not be edited.
|
// This file was automatically generated and should not be edited.
|
||||||
|
|
||||||
import { VoucherInput, DiscountErrorCode, DiscountValueTypeEnum } from "./../../types/globalTypes";
|
import { VoucherInput, DiscountErrorCode, VoucherTypeEnum, DiscountValueTypeEnum } from "./../../types/globalTypes";
|
||||||
|
|
||||||
// ====================================================
|
// ====================================================
|
||||||
// GraphQL mutation operation: VoucherUpdate
|
// GraphQL mutation operation: VoucherUpdate
|
||||||
|
@ -51,6 +51,7 @@ export interface VoucherUpdate_voucherUpdate_voucher {
|
||||||
startDate: any;
|
startDate: any;
|
||||||
endDate: any | null;
|
endDate: any | null;
|
||||||
usageLimit: number | null;
|
usageLimit: number | null;
|
||||||
|
type: VoucherTypeEnum;
|
||||||
discountValueType: DiscountValueTypeEnum;
|
discountValueType: DiscountValueTypeEnum;
|
||||||
countries: (VoucherUpdate_voucherUpdate_voucher_countries | null)[] | null;
|
countries: (VoucherUpdate_voucherUpdate_voucher_countries | null)[] | null;
|
||||||
minCheckoutItemsQuantity: number | null;
|
minCheckoutItemsQuantity: number | null;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { VoucherDetailsPageFormData } from "@saleor/discounts/components/VoucherDetailsPage";
|
import { VoucherDetailsPageFormData } from "@saleor/discounts/components/VoucherDetailsPage";
|
||||||
import { getChannelsVariables } from "@saleor/discounts/handlers";
|
import { getChannelsVariables } from "@saleor/discounts/handlers";
|
||||||
import { RequirementsPicker } from "@saleor/discounts/types";
|
import { DiscountTypeEnum, RequirementsPicker } from "@saleor/discounts/types";
|
||||||
import {
|
import {
|
||||||
VoucherChannelListingUpdate,
|
VoucherChannelListingUpdate,
|
||||||
VoucherChannelListingUpdateVariables
|
VoucherChannelListingUpdateVariables
|
||||||
|
@ -31,9 +31,11 @@ export function createHandler(
|
||||||
applyOncePerOrder: formData.applyOncePerOrder,
|
applyOncePerOrder: formData.applyOncePerOrder,
|
||||||
code: formData.code,
|
code: formData.code,
|
||||||
discountValueType:
|
discountValueType:
|
||||||
formData.discountType.toString() === "SHIPPING"
|
formData.discountType === DiscountTypeEnum.VALUE_PERCENTAGE
|
||||||
? DiscountValueTypeEnum.PERCENTAGE
|
? DiscountValueTypeEnum.PERCENTAGE
|
||||||
: formData.discountType,
|
: formData.discountType === DiscountTypeEnum.VALUE_FIXED
|
||||||
|
? DiscountValueTypeEnum.FIXED
|
||||||
|
: DiscountValueTypeEnum.PERCENTAGE,
|
||||||
endDate: formData.hasEndDate
|
endDate: formData.hasEndDate
|
||||||
? joinDateTime(formData.endDate, formData.endTime)
|
? joinDateTime(formData.endDate, formData.endTime)
|
||||||
: null,
|
: null,
|
||||||
|
@ -43,7 +45,7 @@ export function createHandler(
|
||||||
: parseFloat(formData.minCheckoutItemsQuantity),
|
: parseFloat(formData.minCheckoutItemsQuantity),
|
||||||
startDate: joinDateTime(formData.startDate, formData.startTime),
|
startDate: joinDateTime(formData.startDate, formData.startTime),
|
||||||
type:
|
type:
|
||||||
formData.discountType.toString() === "SHIPPING"
|
formData.discountType === DiscountTypeEnum.SHIPPING
|
||||||
? VoucherTypeEnum.SHIPPING
|
? VoucherTypeEnum.SHIPPING
|
||||||
: formData.type,
|
: formData.type,
|
||||||
usageLimit: formData.hasUsageLimit
|
usageLimit: formData.hasUsageLimit
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { ChannelVoucherData } from "@saleor/channels/utils";
|
import { ChannelVoucherData } from "@saleor/channels/utils";
|
||||||
import { VoucherDetailsPageFormData } from "@saleor/discounts/components/VoucherDetailsPage";
|
import { VoucherDetailsPageFormData } from "@saleor/discounts/components/VoucherDetailsPage";
|
||||||
import { getChannelsVariables } from "@saleor/discounts/handlers";
|
import { getChannelsVariables } from "@saleor/discounts/handlers";
|
||||||
import { RequirementsPicker } from "@saleor/discounts/types";
|
import { DiscountTypeEnum, RequirementsPicker } from "@saleor/discounts/types";
|
||||||
import {
|
import {
|
||||||
VoucherChannelListingUpdate,
|
VoucherChannelListingUpdate,
|
||||||
VoucherChannelListingUpdateVariables
|
VoucherChannelListingUpdateVariables
|
||||||
|
@ -28,17 +28,19 @@ export function createUpdateHandler(
|
||||||
variables: VoucherChannelListingUpdateVariables;
|
variables: VoucherChannelListingUpdateVariables;
|
||||||
}) => Promise<MutationFetchResult<VoucherChannelListingUpdate>>
|
}) => Promise<MutationFetchResult<VoucherChannelListingUpdate>>
|
||||||
) {
|
) {
|
||||||
return (formData: VoucherDetailsPageFormData) => {
|
return async (formData: VoucherDetailsPageFormData) => {
|
||||||
const { id } = voucher;
|
const { id } = voucher;
|
||||||
updateVoucher({
|
await updateVoucher({
|
||||||
id,
|
id,
|
||||||
input: {
|
input: {
|
||||||
applyOncePerCustomer: formData.applyOncePerCustomer,
|
applyOncePerCustomer: formData.applyOncePerCustomer,
|
||||||
applyOncePerOrder: formData.applyOncePerOrder,
|
applyOncePerOrder: formData.applyOncePerOrder,
|
||||||
discountValueType:
|
discountValueType:
|
||||||
formData.discountType.toString() === "SHIPPING"
|
formData.discountType === DiscountTypeEnum.VALUE_PERCENTAGE
|
||||||
? DiscountValueTypeEnum.PERCENTAGE
|
? DiscountValueTypeEnum.PERCENTAGE
|
||||||
: formData.discountType,
|
: formData.discountType === DiscountTypeEnum.VALUE_FIXED
|
||||||
|
? DiscountValueTypeEnum.FIXED
|
||||||
|
: DiscountValueTypeEnum.PERCENTAGE,
|
||||||
endDate: formData.hasEndDate
|
endDate: formData.hasEndDate
|
||||||
? joinDateTime(formData.endDate, formData.endTime)
|
? joinDateTime(formData.endDate, formData.endTime)
|
||||||
: null,
|
: null,
|
||||||
|
@ -48,7 +50,7 @@ export function createUpdateHandler(
|
||||||
: parseFloat(formData.minCheckoutItemsQuantity),
|
: parseFloat(formData.minCheckoutItemsQuantity),
|
||||||
startDate: joinDateTime(formData.startDate, formData.startTime),
|
startDate: joinDateTime(formData.startDate, formData.startTime),
|
||||||
type:
|
type:
|
||||||
formData.discountType.toString() === "SHIPPING"
|
formData.discountType === DiscountTypeEnum.SHIPPING
|
||||||
? VoucherTypeEnum.SHIPPING
|
? VoucherTypeEnum.SHIPPING
|
||||||
: formData.type,
|
: formData.type,
|
||||||
usageLimit: formData.hasUsageLimit
|
usageLimit: formData.hasUsageLimit
|
||||||
|
|
|
@ -91,6 +91,7 @@ export const voucherFragment = gql`
|
||||||
startDate
|
startDate
|
||||||
endDate
|
endDate
|
||||||
usageLimit
|
usageLimit
|
||||||
|
type
|
||||||
discountValueType
|
discountValueType
|
||||||
countries {
|
countries {
|
||||||
code
|
code
|
||||||
|
@ -120,7 +121,6 @@ export const voucherDetailsFragment = gql`
|
||||||
${channelListingProductWithoutPricingFragment}
|
${channelListingProductWithoutPricingFragment}
|
||||||
fragment VoucherDetailsFragment on Voucher {
|
fragment VoucherDetailsFragment on Voucher {
|
||||||
...VoucherFragment
|
...VoucherFragment
|
||||||
type
|
|
||||||
code
|
code
|
||||||
usageLimit
|
usageLimit
|
||||||
used
|
used
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
// @generated
|
// @generated
|
||||||
// This file was automatically generated and should not be edited.
|
// This file was automatically generated and should not be edited.
|
||||||
|
|
||||||
import { DiscountValueTypeEnum, VoucherTypeEnum } from "./../../types/globalTypes";
|
import { VoucherTypeEnum, DiscountValueTypeEnum } from "./../../types/globalTypes";
|
||||||
|
|
||||||
// ====================================================
|
// ====================================================
|
||||||
// GraphQL fragment: VoucherDetailsFragment
|
// GraphQL fragment: VoucherDetailsFragment
|
||||||
|
@ -165,11 +165,11 @@ export interface VoucherDetailsFragment {
|
||||||
startDate: any;
|
startDate: any;
|
||||||
endDate: any | null;
|
endDate: any | null;
|
||||||
usageLimit: number | null;
|
usageLimit: number | null;
|
||||||
|
type: VoucherTypeEnum;
|
||||||
discountValueType: DiscountValueTypeEnum;
|
discountValueType: DiscountValueTypeEnum;
|
||||||
countries: (VoucherDetailsFragment_countries | null)[] | null;
|
countries: (VoucherDetailsFragment_countries | null)[] | null;
|
||||||
minCheckoutItemsQuantity: number | null;
|
minCheckoutItemsQuantity: number | null;
|
||||||
channelListings: VoucherDetailsFragment_channelListings[] | null;
|
channelListings: VoucherDetailsFragment_channelListings[] | null;
|
||||||
type: VoucherTypeEnum;
|
|
||||||
used: number;
|
used: number;
|
||||||
applyOncePerOrder: boolean;
|
applyOncePerOrder: boolean;
|
||||||
applyOncePerCustomer: boolean;
|
applyOncePerCustomer: boolean;
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
// @generated
|
// @generated
|
||||||
// This file was automatically generated and should not be edited.
|
// This file was automatically generated and should not be edited.
|
||||||
|
|
||||||
import { DiscountValueTypeEnum } from "./../../types/globalTypes";
|
import { VoucherTypeEnum, DiscountValueTypeEnum } from "./../../types/globalTypes";
|
||||||
|
|
||||||
// ====================================================
|
// ====================================================
|
||||||
// GraphQL fragment: VoucherFragment
|
// GraphQL fragment: VoucherFragment
|
||||||
|
@ -44,6 +44,7 @@ export interface VoucherFragment {
|
||||||
startDate: any;
|
startDate: any;
|
||||||
endDate: any | null;
|
endDate: any | null;
|
||||||
usageLimit: number | null;
|
usageLimit: number | null;
|
||||||
|
type: VoucherTypeEnum;
|
||||||
discountValueType: DiscountValueTypeEnum;
|
discountValueType: DiscountValueTypeEnum;
|
||||||
countries: (VoucherFragment_countries | null)[] | null;
|
countries: (VoucherFragment_countries | null)[] | null;
|
||||||
minCheckoutItemsQuantity: number | null;
|
minCheckoutItemsQuantity: number | null;
|
||||||
|
|
|
@ -90535,7 +90535,7 @@ exports[`Storyshots Views / Discounts / Voucher create default 1`] = `
|
||||||
class="PrivateSwitchBase-input-id"
|
class="PrivateSwitchBase-input-id"
|
||||||
name="discountType"
|
name="discountType"
|
||||||
type="radio"
|
type="radio"
|
||||||
value="FIXED"
|
value="VALUE_FIXED"
|
||||||
/>
|
/>
|
||||||
<div
|
<div
|
||||||
class="PrivateRadioButtonIcon-root-id PrivateRadioButtonIcon-checked-id"
|
class="PrivateRadioButtonIcon-root-id PrivateRadioButtonIcon-checked-id"
|
||||||
|
@ -90583,7 +90583,7 @@ exports[`Storyshots Views / Discounts / Voucher create default 1`] = `
|
||||||
class="PrivateSwitchBase-input-id"
|
class="PrivateSwitchBase-input-id"
|
||||||
name="discountType"
|
name="discountType"
|
||||||
type="radio"
|
type="radio"
|
||||||
value="PERCENTAGE"
|
value="VALUE_PERCENTAGE"
|
||||||
/>
|
/>
|
||||||
<div
|
<div
|
||||||
class="PrivateRadioButtonIcon-root-id"
|
class="PrivateRadioButtonIcon-root-id"
|
||||||
|
@ -91957,7 +91957,7 @@ exports[`Storyshots Views / Discounts / Voucher create form errors 1`] = `
|
||||||
class="PrivateSwitchBase-input-id"
|
class="PrivateSwitchBase-input-id"
|
||||||
name="discountType"
|
name="discountType"
|
||||||
type="radio"
|
type="radio"
|
||||||
value="FIXED"
|
value="VALUE_FIXED"
|
||||||
/>
|
/>
|
||||||
<div
|
<div
|
||||||
class="PrivateRadioButtonIcon-root-id PrivateRadioButtonIcon-checked-id"
|
class="PrivateRadioButtonIcon-root-id PrivateRadioButtonIcon-checked-id"
|
||||||
|
@ -92005,7 +92005,7 @@ exports[`Storyshots Views / Discounts / Voucher create form errors 1`] = `
|
||||||
class="PrivateSwitchBase-input-id"
|
class="PrivateSwitchBase-input-id"
|
||||||
name="discountType"
|
name="discountType"
|
||||||
type="radio"
|
type="radio"
|
||||||
value="PERCENTAGE"
|
value="VALUE_PERCENTAGE"
|
||||||
/>
|
/>
|
||||||
<div
|
<div
|
||||||
class="PrivateRadioButtonIcon-root-id"
|
class="PrivateRadioButtonIcon-root-id"
|
||||||
|
@ -93377,7 +93377,7 @@ exports[`Storyshots Views / Discounts / Voucher details default 1`] = `
|
||||||
class="PrivateSwitchBase-input-id"
|
class="PrivateSwitchBase-input-id"
|
||||||
name="discountType"
|
name="discountType"
|
||||||
type="radio"
|
type="radio"
|
||||||
value="FIXED"
|
value="VALUE_FIXED"
|
||||||
/>
|
/>
|
||||||
<div
|
<div
|
||||||
class="PrivateRadioButtonIcon-root-id PrivateRadioButtonIcon-checked-id"
|
class="PrivateRadioButtonIcon-root-id PrivateRadioButtonIcon-checked-id"
|
||||||
|
@ -93425,7 +93425,7 @@ exports[`Storyshots Views / Discounts / Voucher details default 1`] = `
|
||||||
class="PrivateSwitchBase-input-id"
|
class="PrivateSwitchBase-input-id"
|
||||||
name="discountType"
|
name="discountType"
|
||||||
type="radio"
|
type="radio"
|
||||||
value="PERCENTAGE"
|
value="VALUE_PERCENTAGE"
|
||||||
/>
|
/>
|
||||||
<div
|
<div
|
||||||
class="PrivateRadioButtonIcon-root-id"
|
class="PrivateRadioButtonIcon-root-id"
|
||||||
|
@ -95577,7 +95577,7 @@ exports[`Storyshots Views / Discounts / Voucher details form errors 1`] = `
|
||||||
class="PrivateSwitchBase-input-id"
|
class="PrivateSwitchBase-input-id"
|
||||||
name="discountType"
|
name="discountType"
|
||||||
type="radio"
|
type="radio"
|
||||||
value="FIXED"
|
value="VALUE_FIXED"
|
||||||
/>
|
/>
|
||||||
<div
|
<div
|
||||||
class="PrivateRadioButtonIcon-root-id PrivateRadioButtonIcon-checked-id"
|
class="PrivateRadioButtonIcon-root-id PrivateRadioButtonIcon-checked-id"
|
||||||
|
@ -95625,7 +95625,7 @@ exports[`Storyshots Views / Discounts / Voucher details form errors 1`] = `
|
||||||
class="PrivateSwitchBase-input-id"
|
class="PrivateSwitchBase-input-id"
|
||||||
name="discountType"
|
name="discountType"
|
||||||
type="radio"
|
type="radio"
|
||||||
value="PERCENTAGE"
|
value="VALUE_PERCENTAGE"
|
||||||
/>
|
/>
|
||||||
<div
|
<div
|
||||||
class="PrivateRadioButtonIcon-root-id"
|
class="PrivateRadioButtonIcon-root-id"
|
||||||
|
@ -97799,7 +97799,7 @@ exports[`Storyshots Views / Discounts / Voucher details loading 1`] = `
|
||||||
disabled=""
|
disabled=""
|
||||||
name="discountType"
|
name="discountType"
|
||||||
type="radio"
|
type="radio"
|
||||||
value="FIXED"
|
value="VALUE_FIXED"
|
||||||
/>
|
/>
|
||||||
<div
|
<div
|
||||||
class="PrivateRadioButtonIcon-root-id PrivateRadioButtonIcon-checked-id"
|
class="PrivateRadioButtonIcon-root-id PrivateRadioButtonIcon-checked-id"
|
||||||
|
@ -97849,7 +97849,7 @@ exports[`Storyshots Views / Discounts / Voucher details loading 1`] = `
|
||||||
disabled=""
|
disabled=""
|
||||||
name="discountType"
|
name="discountType"
|
||||||
type="radio"
|
type="radio"
|
||||||
value="PERCENTAGE"
|
value="VALUE_PERCENTAGE"
|
||||||
/>
|
/>
|
||||||
<div
|
<div
|
||||||
class="PrivateRadioButtonIcon-root-id"
|
class="PrivateRadioButtonIcon-root-id"
|
||||||
|
|
Loading…
Reference in a new issue