Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Change VoucherType from VALUE to ENTIRE_ORDER in dashboard-next
fowczarek9557291fa9a2
diff --git a/saleor/static/dashboard-next/discounts/components/VoucherCreatePage/VoucherCreatePage.tsx b/saleor/static/dashboard-next/discounts/components/VoucherCreatePage/VoucherCreatePage.tsxindex 46147595fd..55946a0d9b 100644--- a/saleor/static/dashboard-next/discounts/components/VoucherCreatePage/VoucherCreatePage.tsx+++ b/saleor/static/dashboard-next/discounts/components/VoucherCreatePage/VoucherCreatePage.tsx@@ -55,7 +55,7 @@ const VoucherCreatePage: React.StatelessComponent<VoucherCreatePageProps> = ({minAmountSpent: 0,name: "",startDate: "",- type: VoucherType.VALUE,+ type: VoucherType.ENTIRE_ORDER,usageLimit: 0,value: 0};diff --git a/saleor/static/dashboard-next/discounts/components/VoucherDetailsPage/VoucherDetailsPage.tsx b/saleor/static/dashboard-next/discounts/components/VoucherDetailsPage/VoucherDetailsPage.tsxindex fec9980d76..5babc458f6 100644--- a/saleor/static/dashboard-next/discounts/components/VoucherDetailsPage/VoucherDetailsPage.tsx+++ b/saleor/static/dashboard-next/discounts/components/VoucherDetailsPage/VoucherDetailsPage.tsx@@ -127,7 +127,7 @@ const VoucherDetailsPage: React.StatelessComponent<VoucherDetailsPageProps> = ({minAmountSpent: maybe(() => voucher.minAmountSpent.amount, 0),name: maybe(() => voucher.name, ""),startDate: maybe(() => voucher.startDate, ""),- type: maybe(() => voucher.type, VoucherType.VALUE),+ type: maybe(() => voucher.type, VoucherType.ENTIRE_ORDER),usageLimit: maybe(() => voucher.usageLimit || 0, 0),value: maybe(() => voucher.discountValue, 0)};diff --git a/saleor/static/dashboard-next/discounts/fixtures.ts b/saleor/static/dashboard-next/discounts/fixtures.tsindex baeae66f85..4756261ca7 100644--- a/saleor/static/dashboard-next/discounts/fixtures.ts+++ b/saleor/static/dashboard-next/discounts/fixtures.ts@@ -297,7 +297,7 @@ export const voucherDetails: VoucherDetails_voucher = {totalCount: 0},startDate: "2018-11-27",- type: VoucherType.VALUE,+ type: VoucherType.ENTIRE_ORDER,usageLimit: null,used: 0};diff --git a/saleor/static/dashboard-next/discounts/translations.ts b/saleor/static/dashboard-next/discounts/translations.tsindex b6f6af8e52..4463ee88a0 100644--- a/saleor/static/dashboard-next/discounts/translations.ts+++ b/saleor/static/dashboard-next/discounts/translations.ts@@ -6,5 +6,5 @@ export const translateVoucherTypes = () => ({[VoucherType.COLLECTION]: i18n.t("Selected Collections"),[VoucherType.PRODUCT]: i18n.t("Selected Products"),[VoucherType.SHIPPING]: i18n.t("Shipment"),- [VoucherType.VALUE]: i18n.t("All Products")+ [VoucherType.ENTIRE_ORDER]: i18n.t("Entire order")});diff --git a/saleor/static/dashboard-next/storybook/__snapshots__/Stories.test.ts.snap b/saleor/static/dashboard-next/storybook/__snapshots__/Stories.test.ts.snapindex 0e50e8e0cd..f80a688a2d 100644--- a/saleor/static/dashboard-next/storybook/__snapshots__/Stories.test.ts.snap+++ b/saleor/static/dashboard-next/storybook/__snapshots__/Stories.test.ts.snap@@ -6774,7 +6774,7 @@ exports[`Storyshots Views / Authentication / Log in error 1`] = `<spanclass="MuiTypography-root-id MuiTypography-caption-id">- Sorry, your username and/or password are incorrect.+ Sorry, your username and/or password are incorrect.<br />Please try again.</span>@@ -7055,7 +7055,7 @@ exports[`Storyshots Views / Categories / Category list default 1`] = `<spanclass="MuiButton-label-id">- Add category+ Add category<svgaria-hidden="true"class="MuiSvgIcon-root-id"@@ -7438,7 +7438,7 @@ exports[`Storyshots Views / Categories / Category list empty 1`] = `<spanclass="MuiButton-label-id">- Add category+ Add category<svgaria-hidden="true"class="MuiSvgIcon-root-id"@@ -7615,7 +7615,7 @@ exports[`Storyshots Views / Categories / Category list loading 1`] = `<spanclass="MuiButton-label-id">- Add category+ Add category<svgaria-hidden="true"class="MuiSvgIcon-root-id"@@ -25287,7 +25287,7 @@ exports[`Storyshots Views / Customers / Customer list default 1`] = `<spanclass="MuiButton-label-id">- Add customer+ Add customer<svgaria-hidden="true"class="MuiSvgIcon-root-id"@@ -26283,7 +26283,7 @@ exports[`Storyshots Views / Customers / Customer list loading 1`] = `<spanclass="MuiButton-label-id">- Add customer+ Add customer<svgaria-hidden="true"class="MuiSvgIcon-root-id"@@ -26493,7 +26493,7 @@ exports[`Storyshots Views / Customers / Customer list no data 1`] = `<spanclass="MuiButton-label-id">- Add customer+ Add customer<svgaria-hidden="true"class="MuiSvgIcon-root-id"@@ -29146,7 +29146,7 @@ exports[`Storyshots Views / Discounts / Sale details loading 1`] = `<spanclass="MuiTypography-root-id MuiTypography-h5-id CardTitle-title-id">- Categories assigned to+ Categories assigned to</span><divclass="CardTitle-toolbar-id"@@ -31204,12 +31204,12 @@ exports[`Storyshots Views / Discounts / Voucher create default 1`] = `role="button"tabindex="0">- All Products+ Entire order</div><inputname="type"type="hidden"- value="VALUE"+ value="ENTIRE_ORDER"/><svgaria-hidden="true"@@ -31620,12 +31620,12 @@ exports[`Storyshots Views / Discounts / Voucher create form errors 1`] = `role="button"tabindex="0">- All Products+ Entire order</div><inputname="type"type="hidden"- value="VALUE"+ value="ENTIRE_ORDER"/><svgaria-hidden="true"@@ -32040,12 +32040,12 @@ exports[`Storyshots Views / Discounts / Voucher details default 1`] = `id="select-type"role="button">- All Products+ Entire order</div><inputname="type"type="hidden"- value="VALUE"+ value="ENTIRE_ORDER"/><svgaria-hidden="true"@@ -32367,7 +32367,7 @@ exports[`Storyshots Views / Discounts / Voucher details default 1`] = `<pclass="MuiTypography-root-id MuiTypography-body2-id">- All Products+ Entire order</p><divclass="FormSpacer-spacer-id"@@ -32583,12 +32583,12 @@ exports[`Storyshots Views / Discounts / Voucher details form errors 1`] = `id="select-type"role="button">- All Products+ Entire order</div><inputname="type"type="hidden"- value="VALUE"+ value="ENTIRE_ORDER"/><svgaria-hidden="true"@@ -32930,7 +32930,7 @@ exports[`Storyshots Views / Discounts / Voucher details form errors 1`] = `<pclass="MuiTypography-root-id MuiTypography-body2-id">- All Products+ Entire order</p><divclass="FormSpacer-spacer-id"@@ -33143,12 +33143,12 @@ exports[`Storyshots Views / Discounts / Voucher details loading 1`] = `id="select-type"role="button">- All Products+ Entire order</div><inputname="type"type="hidden"- value="VALUE"+ value="ENTIRE_ORDER"/><svgaria-hidden="true"@@ -36984,7 +36984,7 @@ exports[`Storyshots Views / Navigation / Menu list default 1`] = `<spanclass="MuiButton-label-id">- Add Menu+ Add Menu<svgaria-hidden="true"class="MuiSvgIcon-root-id"@@ -37274,7 +37274,7 @@ exports[`Storyshots Views / Navigation / Menu list loading 1`] = `<spanclass="MuiButton-label-id">- Add Menu+ Add Menu<svgaria-hidden="true"class="MuiSvgIcon-root-id"@@ -37505,7 +37505,7 @@ exports[`Storyshots Views / Navigation / Menu list no data 1`] = `<spanclass="MuiButton-label-id">- Add Menu+ Add Menu<svgaria-hidden="true"class="MuiSvgIcon-root-id"@@ -37730,7 +37730,7 @@ exports[`Storyshots Views / Orders / Draft order list default 1`] = `<spanclass="MuiButton-label-id">- Create order+ Create order<svgaria-hidden="true"class="MuiSvgIcon-root-id"@@ -38816,7 +38816,7 @@ exports[`Storyshots Views / Orders / Draft order list loading 1`] = `<spanclass="MuiButton-label-id">- Create order+ Create order<svgaria-hidden="true"class="MuiSvgIcon-root-id"@@ -39047,7 +39047,7 @@ exports[`Storyshots Views / Orders / Draft order list when no data 1`] = `<spanclass="MuiButton-label-id">- Create order+ Create order<svgaria-hidden="true"class="MuiSvgIcon-root-id"@@ -53866,7 +53866,7 @@ exports[`Storyshots Views / Orders / Order list default 1`] = `<spanclass="MuiButton-label-id">- Create order+ Create order<svgaria-hidden="true"class="MuiSvgIcon-root-id"@@ -55431,7 +55431,7 @@ exports[`Storyshots Views / Orders / Order list loading 1`] = `<spanclass="MuiButton-label-id">- Create order+ Create order<svgaria-hidden="true"class="MuiSvgIcon-root-id"@@ -55800,7 +55800,7 @@ exports[`Storyshots Views / Orders / Order list when no data 1`] = `<spanclass="MuiButton-label-id">- Create order+ Create order<svgaria-hidden="true"class="MuiSvgIcon-root-id"@@ -56103,7 +56103,7 @@ exports[`Storyshots Views / Orders / Order list with custom filters 1`] = `<spanclass="MuiButton-label-id">- Create order+ Create order<svgaria-hidden="true"class="MuiSvgIcon-root-id"@@ -62245,7 +62245,7 @@ exports[`Storyshots Views / Product types / Product types list default 1`] = `<spanclass="MuiButton-label-id">- Add product type+ Add product type<svgaria-hidden="true"class="MuiSvgIcon-root-id"@@ -62620,7 +62620,7 @@ exports[`Storyshots Views / Product types / Product types list loading 1`] = `<spanclass="MuiButton-label-id">- Add product type+ Add product type<svgaria-hidden="true"class="MuiSvgIcon-root-id"@@ -72185,7 +72185,7 @@ exports[`Storyshots Views / Products / Product list default 1`] = `<spanclass="MuiButton-label-id">- Add product+ Add product<svgaria-hidden="true"class="MuiSvgIcon-root-id"@@ -73032,7 +73032,7 @@ exports[`Storyshots Views / Products / Product list loading 1`] = `<spanclass="MuiButton-label-id">- Add product+ Add product<svgaria-hidden="true"class="MuiSvgIcon-root-id"@@ -73398,7 +73398,7 @@ exports[`Storyshots Views / Products / Product list no data 1`] = `<spanclass="MuiButton-label-id">- Add product+ Add product<svgaria-hidden="true"class="MuiSvgIcon-root-id"@@ -73693,7 +73693,7 @@ exports[`Storyshots Views / Products / Product list with custom filters 1`] = `<spanclass="MuiButton-label-id">- Add product+ Add product<svgaria-hidden="true"class="MuiSvgIcon-root-id"