diff --git a/CHANGELOG.md b/CHANGELOG.md index d64a9df47..9ec62614f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -46,4 +46,5 @@ All notable, unreleased changes to this project will be documented in this file. - Fix attribute errors - #216 by @dominik-zeglen - Fix column picker - #228 by @dominik-zeglen - Add readonly mode - #229 by @dominik-zeglen +- Add mailing configuration - #222 by @dominik-zeglen - Fix minor bugs - #230 by @dominik-zeglen diff --git a/locale/messages.pot b/locale/messages.pot index 4f579a4ac..7814d1e13 100644 --- a/locale/messages.pot +++ b/locale/messages.pot @@ -1,6 +1,6 @@ msgid "" msgstr "" -"POT-Creation-Date: 2019-10-24T12:11:32.946Z\n" +"POT-Creation-Date: 2019-10-24T13:17:27.157Z\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "MIME-Version: 1.0\n" @@ -1467,6 +1467,14 @@ msgctxt "section header" msgid "Authentication Keys" msgstr "" +#: build/locale/src/siteSettings/components/SiteSettingsPage/SiteSettingsPage.json +#. [src.siteSettings.components.SiteSettingsPage.4088830385] - section header +#. defaultMessage is: +#. Authentication Methods +msgctxt "section header" +msgid "Authentication Methods" +msgstr "" + #: build/locale/src/siteSettings/components/SiteSettingsKeys/SiteSettingsKeys.json #. [src.siteSettings.components.SiteSettingsKeys.1270286507] - authentication provider name #. defaultMessage is: @@ -1476,11 +1484,11 @@ msgid "Authentication Type" msgstr "" #: build/locale/src/siteSettings/components/SiteSettingsPage/SiteSettingsPage.json -#. [src.siteSettings.components.SiteSettingsPage.2824577864] +#. [src.siteSettings.components.SiteSettingsPage.3619898341] #. defaultMessage is: -#. Authentication keys +#. Authentication method defines additional ways that customers can log in to your ecommerce. msgctxt "description" -msgid "Authentication keys" +msgid "Authentication method defines additional ways that customers can log in to your ecommerce." msgstr "" #: build/locale/src/siteSettings/components/SiteSettingsKeyDialog/SiteSettingsKeyDialog.json @@ -1992,11 +2000,11 @@ msgid "Company" msgstr "" #: build/locale/src/siteSettings/components/SiteSettingsPage/SiteSettingsPage.json -#. [src.siteSettings.components.SiteSettingsPage.3817101936] +#. [src.siteSettings.components.SiteSettingsPage.2768400497] - section header #. defaultMessage is: -#. Company information -msgctxt "description" -msgid "Company information" +#. Company Information +msgctxt "section header" +msgid "Company Information" msgstr "" #: build/locale/src/translations/components/TranslationsEntitiesList/TranslationsEntitiesList.json @@ -2023,6 +2031,14 @@ msgctxt "product type" msgid "Configurable" msgstr "" +#: build/locale/src/siteSettings/components/SiteSettingsMailing/SiteSettingsMailing.json +#. [src.siteSettings.components.SiteSettingsMailing.297689661] +#. defaultMessage is: +#. Configurate your email address from which all automatic emails will be sent to your customers. +msgctxt "description" +msgid "Configurate your email address from which all automatic emails will be sent to your customers." +msgstr "" + #: build/locale/src/intl.json #. [src.configuration] - configuration section name #. defaultMessage is: @@ -2731,6 +2747,14 @@ msgctxt "event" msgid "Customer created" msgstr "" +#: build/locale/src/siteSettings/components/SiteSettingsMailing/SiteSettingsMailing.json +#. [src.siteSettings.components.SiteSettingsMailing.3211348653] +#. defaultMessage is: +#. Customer password reset URL +msgctxt "description" +msgid "Customer password reset URL" +msgstr "" + #: build/locale/src/customers/components/CustomerDetails/CustomerDetails.json #. [src.customers.components.CustomerDetails.2200102325] - section subheader #. defaultMessage is: @@ -3603,6 +3627,14 @@ msgctxt "description" msgid "Email Address" msgstr "" +#: build/locale/src/siteSettings/components/SiteSettingsPage/SiteSettingsPage.json +#. [src.siteSettings.components.SiteSettingsPage.3657173399] +#. defaultMessage is: +#. Email adress you provide here will be used as a contact adress for your customers. +msgctxt "description" +msgid "Email adress you provide here will be used as a contact adress for your customers." +msgstr "" + #: build/locale/src/intl.json #. [src.endDate] #. defaultMessage is: @@ -4351,6 +4383,42 @@ msgctxt "button" msgid "Login" msgstr "" +#: build/locale/src/siteSettings/components/SiteSettingsMailing/SiteSettingsMailing.json +#. [src.siteSettings.components.SiteSettingsMailing.280712237] - section header +#. defaultMessage is: +#. Mailing Configuration +#: build/locale/src/siteSettings/components/SiteSettingsPage/SiteSettingsPage.json +#. [src.siteSettings.components.SiteSettingsPage.280712237] - section header +#. defaultMessage is: +#. Mailing Configuration +msgctxt "section header" +msgid "Mailing Configuration" +msgstr "" + +#: build/locale/src/siteSettings/components/SiteSettingsMailing/SiteSettingsMailing.json +#. [siteSettingsMailingHelperText] - helper text +#. defaultMessage is: +#. Mailing Configuration +msgctxt "helper text" +msgid "Mailing Configuration" +msgstr "" + +#: build/locale/src/siteSettings/components/SiteSettingsMailing/SiteSettingsMailing.json +#. [src.siteSettings.components.SiteSettingsMailing.1124962330] +#. defaultMessage is: +#. Mailing email address +msgctxt "description" +msgid "Mailing email address" +msgstr "" + +#: build/locale/src/siteSettings/components/SiteSettingsMailing/SiteSettingsMailing.json +#. [src.siteSettings.components.SiteSettingsMailing.70179174] +#. defaultMessage is: +#. Mailing email sender +msgctxt "description" +msgid "Mailing email sender" +msgstr "" + #: build/locale/src/intl.json #. [src.manage] - button #. defaultMessage is: @@ -8051,6 +8119,22 @@ msgctxt "description" msgid "These are general information about your store. They define what is the URL of your store and what is shown in brow sers taskbar." msgstr "" +#: build/locale/src/siteSettings/components/SiteSettingsPage/SiteSettingsPage.json +#. [src.siteSettings.components.SiteSettingsPage.3799756739] +#. defaultMessage is: +#. These are general information about your store. They define what is the URL of your store and what is shown in browsers taskbar. +msgctxt "description" +msgid "These are general information about your store. They define what is the URL of your store and what is shown in browsers taskbar." +msgstr "" + +#: build/locale/src/siteSettings/components/SiteSettingsMailing/SiteSettingsMailing.json +#. [src.siteSettings.components.SiteSettingsMailing.3447841451] +#. defaultMessage is: +#. This URL will be used as a main URL for password resets. It will be sent via email. +msgctxt "description" +msgid "This URL will be used as a main URL for password resets. It will be sent via email." +msgstr "" + #: build/locale/src/webhooks/components/WebhookInfo/WebhookInfo.json #. [src.webhooks.components.WebhookInfo.3763861707] - webhook target url help text #. defaultMessage is: @@ -8059,6 +8143,14 @@ msgctxt "webhook target url help text" msgid "This URL will receive webhook POST requests" msgstr "" +#: build/locale/src/siteSettings/components/SiteSettingsPage/SiteSettingsPage.json +#. [src.siteSettings.components.SiteSettingsPage.1004240342] +#. defaultMessage is: +#. This adress will be used to generate invoices and calculate shipping rates. +msgctxt "description" +msgid "This adress will be used to generate invoices and calculate shipping rates." +msgstr "" + #: build/locale/src/plugins/components/PluginsDetailsPage/PluginsDetailsPage.json #. [src.plugins.components.PluginsDetailsPage.4241018152] #. defaultMessage is: @@ -8159,6 +8251,14 @@ msgctxt "product attribute error" msgid "This variant already exists" msgstr "" +#: build/locale/src/siteSettings/components/SiteSettingsPage/SiteSettingsPage.json +#. [src.siteSettings.components.SiteSettingsPage.866304242] +#. defaultMessage is: +#. This where you will find all of the settings determining your stores e-mails. You can determine main email address and some of the contents of your emails. +msgctxt "description" +msgid "This where you will find all of the settings determining your stores e-mails. You can determine main email address and some of the contents of your emails." +msgstr "" + #: build/locale/src/shipping/components/ShippingZoneRateDialog/ShippingZoneRateDialog.json #. [src.shipping.components.ShippingZoneRateDialog.1486599614] #. defaultMessage is: @@ -8167,6 +8267,14 @@ msgctxt "description" msgid "This will be shown to customers at checkout" msgstr "" +#: build/locale/src/siteSettings/components/SiteSettingsMailing/SiteSettingsMailing.json +#. [src.siteSettings.components.SiteSettingsMailing.1672275992] - email sender +#. defaultMessage is: +#. This will be visible as "from" name +msgctxt "email sender" +msgid "This will be visible as \"from\" name" +msgstr "" + #: build/locale/src/pages/components/PageInfo/PageInfo.json #. [src.pages.components.PageInfo.1124600214] - page title #. defaultMessage is: @@ -8443,6 +8551,14 @@ msgctxt "description" msgid "URL Linked" msgstr "" +#: build/locale/src/siteSettings/components/SiteSettingsMailing/SiteSettingsMailing.json +#. [src.siteSettings.components.SiteSettingsMailing.50742153] +#. defaultMessage is: +#. URL address +msgctxt "description" +msgid "URL address" +msgstr "" + #: build/locale/src/siteSettings/components/SiteSettingsDetails/SiteSettingsDetails.json #. [src.siteSettings.components.SiteSettingsDetails.3808773492] #. defaultMessage is: @@ -8735,6 +8851,14 @@ msgctxt "voucher value requirement" msgid "Usage Limit" msgstr "" +#: build/locale/src/attributes/components/AttributeProperties/AttributeProperties.json +#. [src.attributes.components.AttributeProperties.1318123158] - attribute is filterable in storefront +#. defaultMessage is: +#. Use in Faceted Navigation +msgctxt "attribute is filterable in storefront" +msgid "Use in Faceted Navigation" +msgstr "" + #: build/locale/src/attributes/components/AttributeProperties/AttributeProperties.json #. [src.attributes.components.AttributeProperties.714335445] - use attribute in filtering #. defaultMessage is: @@ -8743,14 +8867,6 @@ msgctxt "use attribute in filtering" msgid "Use in Filtering" msgstr "" -#: build/locale/src/attributes/components/AttributeProperties/AttributeProperties.json -#. [src.attributes.components.AttributeProperties.1564730914] - attribute is filterable in storefront -#. defaultMessage is: -#. Use in faceted navigation -msgctxt "attribute is filterable in storefront" -msgid "Use in faceted navigation" -msgstr "" - #: build/locale/src/attributes/components/AttributeList/AttributeList.json #. [src.attributes.components.AttributeList.2186555805] - attribute can be searched in storefront #. defaultMessage is: diff --git a/src/components/ImageUpload/ImageUpload.tsx b/src/components/ImageUpload/ImageUpload.tsx index 431b96186..5ffc05d7f 100644 --- a/src/components/ImageUpload/ImageUpload.tsx +++ b/src/components/ImageUpload/ImageUpload.tsx @@ -54,6 +54,8 @@ const styles = (theme: Theme) => }, uploadText: { color: theme.typography.body2.color, + fontSize: 12, + fontWeight: 600, textTransform: "uppercase" } }); @@ -93,7 +95,7 @@ export const ImageUpload = withStyles(styles, { name: "ImageUpload" })( > - + ; + disabled: boolean; + onChange: (event: React.ChangeEvent) => void; +} + +const useStyles = makeStyles( + (theme: Theme) => ({ + cardHelperText: { + position: "relative", + top: -theme.spacing.unit + }, + cardHelperTextCaption: { + marginBottom: theme.spacing.unit * 2 + } + }), + { + name: "SiteSettingsMailing" + } +); + +const SiteSettingsMailing: React.FC = props => { + const { data, disabled, errors, onChange } = props; + const classes = useStyles(props); + const intl = useIntl(); + + return ( + + + + + + + + + + + + + +
+ + +
+
+ ); +}; +SiteSettingsMailing.displayName = "SiteSettingsMailing"; +export default SiteSettingsMailing; diff --git a/src/siteSettings/components/SiteSettingsMailing/index.ts b/src/siteSettings/components/SiteSettingsMailing/index.ts new file mode 100644 index 000000000..424ec5bea --- /dev/null +++ b/src/siteSettings/components/SiteSettingsMailing/index.ts @@ -0,0 +1,2 @@ +export { default } from "./SiteSettingsMailing"; +export * from "./SiteSettingsMailing"; diff --git a/src/siteSettings/components/SiteSettingsPage/SiteSettingsPage.tsx b/src/siteSettings/components/SiteSettingsPage/SiteSettingsPage.tsx index 6b90808de..cddd97e51 100644 --- a/src/siteSettings/components/SiteSettingsPage/SiteSettingsPage.tsx +++ b/src/siteSettings/components/SiteSettingsPage/SiteSettingsPage.tsx @@ -1,4 +1,6 @@ +import { Theme } from "@material-ui/core/styles"; import Typography from "@material-ui/core/Typography"; +import { makeStyles } from "@material-ui/styles"; import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; @@ -7,6 +9,7 @@ import { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton"; import Container from "@saleor/components/Container"; import Form from "@saleor/components/Form"; import Grid from "@saleor/components/Grid"; +import Hr from "@saleor/components/Hr"; import PageHeader from "@saleor/components/PageHeader"; import SaveButtonBar from "@saleor/components/SaveButtonBar"; import useStateFromProps from "@saleor/hooks/useStateFromProps"; @@ -20,6 +23,9 @@ import { SiteSettings_shop } from "../../types/SiteSettings"; import SiteSettingsAddress from "../SiteSettingsAddress/SiteSettingsAddress"; import SiteSettingsDetails from "../SiteSettingsDetails/SiteSettingsDetails"; import SiteSettingsKeys from "../SiteSettingsKeys/SiteSettingsKeys"; +import SiteSettingsMailing, { + SiteSettingsMailingFormData +} from "../SiteSettingsMailing"; export interface SiteSettingsPageAddressFormData { city: string; @@ -33,7 +39,8 @@ export interface SiteSettingsPageAddressFormData { } export interface SiteSettingsPageFormData - extends SiteSettingsPageAddressFormData { + extends SiteSettingsPageAddressFormData, + SiteSettingsMailingFormData { description: string; domain: string; name: string; @@ -50,34 +57,54 @@ export interface SiteSettingsPageProps { onSubmit: (data: SiteSettingsPageFormData) => void; } -const SiteSettingsPage: React.StatelessComponent = ({ - disabled, - errors, - saveButtonBarState, - shop, - onBack, - onKeyAdd, - onKeyRemove, - onSubmit -}) => { +const useStyles = makeStyles( + (theme: Theme) => ({ + hr: { + gridColumnEnd: "span 2", + margin: `${theme.spacing.unit}px 0` + } + }), + { + name: "SiteSettingsPage" + } +); + +const SiteSettingsPage: React.FC = props => { + const { + disabled, + errors, + saveButtonBarState, + shop, + onBack, + onKeyAdd, + onKeyRemove, + onSubmit + } = props; + const classes = useStyles(props); const intl = useIntl(); const [displayCountry, setDisplayCountry] = useStateFromProps( maybe(() => shop.companyAddress.country.code, "") ); - const initialForm: SiteSettingsPageFormData = { + const initialFormAddress: SiteSettingsPageAddressFormData = { city: maybe(() => shop.companyAddress.city, ""), companyName: maybe(() => shop.companyAddress.companyName, ""), country: maybe(() => shop.companyAddress.country.code, ""), countryArea: maybe(() => shop.companyAddress.countryArea, ""), - description: maybe(() => shop.description, ""), - domain: maybe(() => shop.domain.host, ""), - name: maybe(() => shop.name, ""), phone: maybe(() => shop.companyAddress.phone, ""), postalCode: maybe(() => shop.companyAddress.postalCode, ""), streetAddress1: maybe(() => shop.companyAddress.streetAddress1, ""), streetAddress2: maybe(() => shop.companyAddress.streetAddress2, "") }; + const initialForm: SiteSettingsPageFormData = { + ...initialFormAddress, + customerSetPasswordUrl: maybe(() => shop.customerSetPasswordUrl, ""), + defaultMailSenderAddress: maybe(() => shop.defaultMailSenderAddress, ""), + defaultMailSenderName: maybe(() => shop.defaultMailSenderName, ""), + description: maybe(() => shop.description, ""), + domain: maybe(() => shop.domain.host, ""), + name: maybe(() => shop.name, "") + }; return (
= ({ title={intl.formatMessage(commonMessages.generalInformations)} /> - - {intl.formatMessage(sectionNames.siteSettings)} - +
+ + {intl.formatMessage(sectionNames.siteSettings)} + + + + +
- - - +
+
+ + + + + + +
+ +
+
+ + + + + + + +
= ({ onChange={change} onCountryChange={handleCountryChange} /> - - - +
+
+ + + + + + +
shop.authorizationKeys)} @@ -148,5 +217,6 @@ const SiteSettingsPage: React.StatelessComponent = ({ ); }; + SiteSettingsPage.displayName = "SiteSettingsPage"; export default SiteSettingsPage; diff --git a/src/siteSettings/fixtures.ts b/src/siteSettings/fixtures.ts index 59e41ca41..78bbd3a72 100644 --- a/src/siteSettings/fixtures.ts +++ b/src/siteSettings/fixtures.ts @@ -36,6 +36,9 @@ export const shop: SiteSettings_shop = { country: "United Arab Emirates" } ], + customerSetPasswordUrl: "https://example.com/reset-password", + defaultMailSenderAddress: "noreply@example.com", + defaultMailSenderName: "Saleor", description: "Lorem ipsum dolor sit amet", domain: { __typename: "Domain", diff --git a/src/siteSettings/mutations.ts b/src/siteSettings/mutations.ts index 048217b7a..09f7ef0f0 100644 --- a/src/siteSettings/mutations.ts +++ b/src/siteSettings/mutations.ts @@ -63,7 +63,7 @@ const shopSettingsUpdate = gql` mutation ShopSettingsUpdate( $shopDomainInput: SiteDomainInput! $shopSettingsInput: ShopSettingsInput! - $addressInput: AddressInput! + $addressInput: AddressInput ) { shopSettingsUpdate(input: $shopSettingsInput) { errors { diff --git a/src/siteSettings/queries.ts b/src/siteSettings/queries.ts index b6a57c61a..d4e01c203 100644 --- a/src/siteSettings/queries.ts +++ b/src/siteSettings/queries.ts @@ -17,6 +17,9 @@ export const shopFragment = gql` code country } + customerSetPasswordUrl + defaultMailSenderAddress + defaultMailSenderName description domain { host diff --git a/src/siteSettings/types/AuthorizationKeyAdd.ts b/src/siteSettings/types/AuthorizationKeyAdd.ts index a326a9cca..bc8205925 100644 --- a/src/siteSettings/types/AuthorizationKeyAdd.ts +++ b/src/siteSettings/types/AuthorizationKeyAdd.ts @@ -58,6 +58,9 @@ export interface AuthorizationKeyAdd_authorizationKeyAdd_shop { authorizationKeys: (AuthorizationKeyAdd_authorizationKeyAdd_shop_authorizationKeys | null)[]; companyAddress: AuthorizationKeyAdd_authorizationKeyAdd_shop_companyAddress | null; countries: (AuthorizationKeyAdd_authorizationKeyAdd_shop_countries | null)[]; + customerSetPasswordUrl: string | null; + defaultMailSenderAddress: string | null; + defaultMailSenderName: string | null; description: string | null; domain: AuthorizationKeyAdd_authorizationKeyAdd_shop_domain; name: string; diff --git a/src/siteSettings/types/AuthorizationKeyDelete.ts b/src/siteSettings/types/AuthorizationKeyDelete.ts index 024e7f599..2e6451869 100644 --- a/src/siteSettings/types/AuthorizationKeyDelete.ts +++ b/src/siteSettings/types/AuthorizationKeyDelete.ts @@ -58,6 +58,9 @@ export interface AuthorizationKeyDelete_authorizationKeyDelete_shop { authorizationKeys: (AuthorizationKeyDelete_authorizationKeyDelete_shop_authorizationKeys | null)[]; companyAddress: AuthorizationKeyDelete_authorizationKeyDelete_shop_companyAddress | null; countries: (AuthorizationKeyDelete_authorizationKeyDelete_shop_countries | null)[]; + customerSetPasswordUrl: string | null; + defaultMailSenderAddress: string | null; + defaultMailSenderName: string | null; description: string | null; domain: AuthorizationKeyDelete_authorizationKeyDelete_shop_domain; name: string; diff --git a/src/siteSettings/types/ShopFragment.ts b/src/siteSettings/types/ShopFragment.ts index d27566ab8..aaf4326c9 100644 --- a/src/siteSettings/types/ShopFragment.ts +++ b/src/siteSettings/types/ShopFragment.ts @@ -52,6 +52,9 @@ export interface ShopFragment { authorizationKeys: (ShopFragment_authorizationKeys | null)[]; companyAddress: ShopFragment_companyAddress | null; countries: (ShopFragment_countries | null)[]; + customerSetPasswordUrl: string | null; + defaultMailSenderAddress: string | null; + defaultMailSenderName: string | null; description: string | null; domain: ShopFragment_domain; name: string; diff --git a/src/siteSettings/types/ShopSettingsUpdate.ts b/src/siteSettings/types/ShopSettingsUpdate.ts index 2fa80ac0d..f583dc589 100644 --- a/src/siteSettings/types/ShopSettingsUpdate.ts +++ b/src/siteSettings/types/ShopSettingsUpdate.ts @@ -58,6 +58,9 @@ export interface ShopSettingsUpdate_shopSettingsUpdate_shop { authorizationKeys: (ShopSettingsUpdate_shopSettingsUpdate_shop_authorizationKeys | null)[]; companyAddress: ShopSettingsUpdate_shopSettingsUpdate_shop_companyAddress | null; countries: (ShopSettingsUpdate_shopSettingsUpdate_shop_countries | null)[]; + customerSetPasswordUrl: string | null; + defaultMailSenderAddress: string | null; + defaultMailSenderName: string | null; description: string | null; domain: ShopSettingsUpdate_shopSettingsUpdate_shop_domain; name: string; diff --git a/src/siteSettings/types/SiteSettings.ts b/src/siteSettings/types/SiteSettings.ts index ee049f738..6b0064451 100644 --- a/src/siteSettings/types/SiteSettings.ts +++ b/src/siteSettings/types/SiteSettings.ts @@ -52,6 +52,9 @@ export interface SiteSettings_shop { authorizationKeys: (SiteSettings_shop_authorizationKeys | null)[]; companyAddress: SiteSettings_shop_companyAddress | null; countries: (SiteSettings_shop_countries | null)[]; + customerSetPasswordUrl: string | null; + defaultMailSenderAddress: string | null; + defaultMailSenderName: string | null; description: string | null; domain: SiteSettings_shop_domain; name: string; diff --git a/src/siteSettings/views/index.tsx b/src/siteSettings/views/index.tsx index 776c1d5ea..50f8eaad4 100644 --- a/src/siteSettings/views/index.tsx +++ b/src/siteSettings/views/index.tsx @@ -13,6 +13,7 @@ import SiteSettingsKeyDialog, { SiteSettingsKeyDialogForm } from "../components/SiteSettingsKeyDialog"; import SiteSettingsPage, { + SiteSettingsPageAddressFormData, SiteSettingsPageFormData } from "../components/SiteSettingsPage"; import { @@ -124,10 +125,21 @@ export const SiteSettings: React.StatelessComponent = ({ }); const handleUpdateShopSettings = ( data: SiteSettingsPageFormData - ) => - updateShopSettings({ - variables: { - addressInput: { + ) => { + const areAddressInputFieldsModified = ([ + "city", + "companyName", + "country", + "countryArea", + "phone", + "postalCode", + "streetAddress1", + "streetAddress2" + ] as Array) + .map(key => data[key]) + .some(field => field !== ""); + const addressInput = areAddressInputFieldsModified + ? { city: data.city, companyName: data.companyName, country: findInEnum(data.country, CountryCode), @@ -136,16 +148,25 @@ export const SiteSettings: React.StatelessComponent = ({ postalCode: data.postalCode, streetAddress1: data.streetAddress1, streetAddress2: data.streetAddress2 - }, + } + : null; + updateShopSettings({ + variables: { + addressInput, shopDomainInput: { domain: data.domain, name: data.name }, shopSettingsInput: { + customerSetPasswordUrl: data.customerSetPasswordUrl, + defaultMailSenderAddress: + data.defaultMailSenderAddress, + defaultMailSenderName: data.defaultMailSenderName, description: data.description } } }); + }; const formTransitionState = getMutationState( updateShopSettingsOpts.called, diff --git a/src/storybook/__snapshots__/Stories.test.ts.snap b/src/storybook/__snapshots__/Stories.test.ts.snap index 50452b961..d3f3bcc56 100644 --- a/src/storybook/__snapshots__/Stories.test.ts.snap +++ b/src/storybook/__snapshots__/Stories.test.ts.snap @@ -18587,118 +18587,54 @@ Ctrl + K" class="CardTitle-hr-id" />
-
-
- -
-
- -
-
-
-
-
- -
- -
- - -
-
+ + + + +

- (Optional) + Drop here to upload

@@ -27859,7 +27795,7 @@ Ctrl + K"

Drop here to upload

@@ -28568,7 +28504,7 @@ Ctrl + K"

Drop here to upload

@@ -91946,7 +91882,7 @@ Ctrl + K"

Drop here to upload

@@ -93436,7 +93372,7 @@ Ctrl + K"

Drop here to upload

@@ -95193,7 +95129,7 @@ Ctrl + K"

Drop here to upload

@@ -98008,7 +97944,7 @@ Ctrl + K"

Drop here to upload

@@ -99672,7 +99608,7 @@ Ctrl + K"

Drop here to upload

@@ -116326,11 +116262,18 @@ exports[`Storyshots Views / Site settings / Page default 1`] = `
-
- Site Settings -
+
+

+ Site Settings +

+

+ These are general information about your store. They define what is the URL of your store and what is shown in browsers taskbar. +

+
@@ -116478,11 +116421,200 @@ exports[`Storyshots Views / Site settings / Page default 1`] = `
-
+
+

+ Mailing Configuration +

+

+ This where you will find all of the settings determining your stores e-mails. You can determine main email address and some of the contents of your emails. +

+
+
- Company information -
+
+ + Mailing Configuration + +
+
+
+
+
+

+ Mailing Configuration +

+

+ Configurate your email address from which all automatic emails will be sent to your customers. +

+
+ +
+ + +
+
+
+
+ +
+ + +
+

+ This will be visible as "from" name +

+
+
+
+
+
+ +
+ + +
+

+ This URL will be used as a main URL for password resets. It will be sent via email. +

+
+
+
+
+
+

+ Company Information +

+

+ This adress will be used to generate invoices and calculate shipping rates.Email adress you provide here will be used as a contact adress for your customers. +

+
@@ -116834,11 +116966,21 @@ exports[`Storyshots Views / Site settings / Page default 1`] = `
-
- Authentication keys -
+
+
+

+ Authentication Methods +

+

+ Authentication method defines additional ways that customers can log in to your ecommerce. +

+
@@ -116981,11 +117123,18 @@ exports[`Storyshots Views / Site settings / Page form errors 1`] = `
-
- Site Settings -
+
+

+ Site Settings +

+

+ These are general information about your store. They define what is the URL of your store and what is shown in browsers taskbar. +

+
@@ -117138,11 +117287,205 @@ exports[`Storyshots Views / Site settings / Page form errors 1`] = `
-
+
+

+ Mailing Configuration +

+

+ This where you will find all of the settings determining your stores e-mails. You can determine main email address and some of the contents of your emails. +

+
+
- Company information -
+
+ + Mailing Configuration + +
+
+
+
+
+

+ Mailing Configuration +

+

+ Configurate your email address from which all automatic emails will be sent to your customers. +

+
+ +
+ + +
+

+ Generic form error +

+
+
+
+ +
+ + +
+

+ Generic form error +

+
+
+
+
+
+ +
+ + +
+

+ Generic form error +

+
+
+
+
+
+

+ Company Information +

+

+ This adress will be used to generate invoices and calculate shipping rates.Email adress you provide here will be used as a contact adress for your customers. +

+
@@ -117494,11 +117837,21 @@ exports[`Storyshots Views / Site settings / Page form errors 1`] = `
-
- Authentication keys -
+
+
+

+ Authentication Methods +

+

+ Authentication method defines additional ways that customers can log in to your ecommerce. +

+
@@ -117641,11 +117994,18 @@ exports[`Storyshots Views / Site settings / Page loading 1`] = `
-
- Site Settings -
+
+

+ Site Settings +

+

+ These are general information about your store. They define what is the URL of your store and what is shown in browsers taskbar. +

+
@@ -117796,11 +118156,203 @@ exports[`Storyshots Views / Site settings / Page loading 1`] = `
-
+
+

+ Mailing Configuration +

+

+ This where you will find all of the settings determining your stores e-mails. You can determine main email address and some of the contents of your emails. +

+
+
- Company information -
+
+ + Mailing Configuration + +
+
+
+
+
+

+ Mailing Configuration +

+

+ Configurate your email address from which all automatic emails will be sent to your customers. +

+
+ +
+ + +
+
+
+
+ +
+ + +
+

+ This will be visible as "from" name +

+
+
+
+
+
+ +
+ + +
+

+ This URL will be used as a main URL for password resets. It will be sent via email. +

+
+
+
+
+
+

+ Company Information +

+

+ This adress will be used to generate invoices and calculate shipping rates.Email adress you provide here will be used as a contact adress for your customers. +

+
@@ -118162,11 +118714,21 @@ exports[`Storyshots Views / Site settings / Page loading 1`] = `
-
- Authentication keys -
+
+
+

+ Authentication Methods +

+

+ Authentication method defines additional ways that customers can log in to your ecommerce. +

+
@@ -123206,6 +123768,27 @@ exports[`Storyshots Views / Webhooks / Create webhook default 1`] = `
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +