Merge branch 'master' into fix/minor-bugs
This commit is contained in:
commit
ad18fc727c
19 changed files with 1271 additions and 204 deletions
|
@ -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 attribute errors - #216 by @dominik-zeglen
|
||||||
- Fix column picker - #228 by @dominik-zeglen
|
- Fix column picker - #228 by @dominik-zeglen
|
||||||
- Add readonly mode - #229 by @dominik-zeglen
|
- Add readonly mode - #229 by @dominik-zeglen
|
||||||
|
- Add mailing configuration - #222 by @dominik-zeglen
|
||||||
- Fix minor bugs - #230 by @dominik-zeglen
|
- Fix minor bugs - #230 by @dominik-zeglen
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
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-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
|
@ -1467,6 +1467,14 @@ msgctxt "section header"
|
||||||
msgid "Authentication Keys"
|
msgid "Authentication Keys"
|
||||||
msgstr ""
|
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
|
#: build/locale/src/siteSettings/components/SiteSettingsKeys/SiteSettingsKeys.json
|
||||||
#. [src.siteSettings.components.SiteSettingsKeys.1270286507] - authentication provider name
|
#. [src.siteSettings.components.SiteSettingsKeys.1270286507] - authentication provider name
|
||||||
#. defaultMessage is:
|
#. defaultMessage is:
|
||||||
|
@ -1476,11 +1484,11 @@ msgid "Authentication Type"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: build/locale/src/siteSettings/components/SiteSettingsPage/SiteSettingsPage.json
|
#: build/locale/src/siteSettings/components/SiteSettingsPage/SiteSettingsPage.json
|
||||||
#. [src.siteSettings.components.SiteSettingsPage.2824577864]
|
#. [src.siteSettings.components.SiteSettingsPage.3619898341]
|
||||||
#. defaultMessage is:
|
#. defaultMessage is:
|
||||||
#. Authentication keys
|
#. Authentication method defines additional ways that customers can log in to your ecommerce.
|
||||||
msgctxt "description"
|
msgctxt "description"
|
||||||
msgid "Authentication keys"
|
msgid "Authentication method defines additional ways that customers can log in to your ecommerce."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: build/locale/src/siteSettings/components/SiteSettingsKeyDialog/SiteSettingsKeyDialog.json
|
#: build/locale/src/siteSettings/components/SiteSettingsKeyDialog/SiteSettingsKeyDialog.json
|
||||||
|
@ -1992,11 +2000,11 @@ msgid "Company"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: build/locale/src/siteSettings/components/SiteSettingsPage/SiteSettingsPage.json
|
#: build/locale/src/siteSettings/components/SiteSettingsPage/SiteSettingsPage.json
|
||||||
#. [src.siteSettings.components.SiteSettingsPage.3817101936]
|
#. [src.siteSettings.components.SiteSettingsPage.2768400497] - section header
|
||||||
#. defaultMessage is:
|
#. defaultMessage is:
|
||||||
#. Company information
|
#. Company Information
|
||||||
msgctxt "description"
|
msgctxt "section header"
|
||||||
msgid "Company information"
|
msgid "Company Information"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: build/locale/src/translations/components/TranslationsEntitiesList/TranslationsEntitiesList.json
|
#: build/locale/src/translations/components/TranslationsEntitiesList/TranslationsEntitiesList.json
|
||||||
|
@ -2023,6 +2031,14 @@ msgctxt "product type"
|
||||||
msgid "Configurable"
|
msgid "Configurable"
|
||||||
msgstr ""
|
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
|
#: build/locale/src/intl.json
|
||||||
#. [src.configuration] - configuration section name
|
#. [src.configuration] - configuration section name
|
||||||
#. defaultMessage is:
|
#. defaultMessage is:
|
||||||
|
@ -2731,6 +2747,14 @@ msgctxt "event"
|
||||||
msgid "Customer created"
|
msgid "Customer created"
|
||||||
msgstr ""
|
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
|
#: build/locale/src/customers/components/CustomerDetails/CustomerDetails.json
|
||||||
#. [src.customers.components.CustomerDetails.2200102325] - section subheader
|
#. [src.customers.components.CustomerDetails.2200102325] - section subheader
|
||||||
#. defaultMessage is:
|
#. defaultMessage is:
|
||||||
|
@ -3603,6 +3627,14 @@ msgctxt "description"
|
||||||
msgid "Email Address"
|
msgid "Email Address"
|
||||||
msgstr ""
|
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
|
#: build/locale/src/intl.json
|
||||||
#. [src.endDate]
|
#. [src.endDate]
|
||||||
#. defaultMessage is:
|
#. defaultMessage is:
|
||||||
|
@ -4351,6 +4383,42 @@ msgctxt "button"
|
||||||
msgid "Login"
|
msgid "Login"
|
||||||
msgstr ""
|
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
|
#: build/locale/src/intl.json
|
||||||
#. [src.manage] - button
|
#. [src.manage] - button
|
||||||
#. defaultMessage is:
|
#. 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."
|
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 ""
|
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
|
#: build/locale/src/webhooks/components/WebhookInfo/WebhookInfo.json
|
||||||
#. [src.webhooks.components.WebhookInfo.3763861707] - webhook target url help text
|
#. [src.webhooks.components.WebhookInfo.3763861707] - webhook target url help text
|
||||||
#. defaultMessage is:
|
#. defaultMessage is:
|
||||||
|
@ -8059,6 +8143,14 @@ msgctxt "webhook target url help text"
|
||||||
msgid "This URL will receive webhook POST requests"
|
msgid "This URL will receive webhook POST requests"
|
||||||
msgstr ""
|
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
|
#: build/locale/src/plugins/components/PluginsDetailsPage/PluginsDetailsPage.json
|
||||||
#. [src.plugins.components.PluginsDetailsPage.4241018152]
|
#. [src.plugins.components.PluginsDetailsPage.4241018152]
|
||||||
#. defaultMessage is:
|
#. defaultMessage is:
|
||||||
|
@ -8159,6 +8251,14 @@ msgctxt "product attribute error"
|
||||||
msgid "This variant already exists"
|
msgid "This variant already exists"
|
||||||
msgstr ""
|
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
|
#: build/locale/src/shipping/components/ShippingZoneRateDialog/ShippingZoneRateDialog.json
|
||||||
#. [src.shipping.components.ShippingZoneRateDialog.1486599614]
|
#. [src.shipping.components.ShippingZoneRateDialog.1486599614]
|
||||||
#. defaultMessage is:
|
#. defaultMessage is:
|
||||||
|
@ -8167,6 +8267,14 @@ msgctxt "description"
|
||||||
msgid "This will be shown to customers at checkout"
|
msgid "This will be shown to customers at checkout"
|
||||||
msgstr ""
|
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
|
#: build/locale/src/pages/components/PageInfo/PageInfo.json
|
||||||
#. [src.pages.components.PageInfo.1124600214] - page title
|
#. [src.pages.components.PageInfo.1124600214] - page title
|
||||||
#. defaultMessage is:
|
#. defaultMessage is:
|
||||||
|
@ -8443,6 +8551,14 @@ msgctxt "description"
|
||||||
msgid "URL Linked"
|
msgid "URL Linked"
|
||||||
msgstr ""
|
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
|
#: build/locale/src/siteSettings/components/SiteSettingsDetails/SiteSettingsDetails.json
|
||||||
#. [src.siteSettings.components.SiteSettingsDetails.3808773492]
|
#. [src.siteSettings.components.SiteSettingsDetails.3808773492]
|
||||||
#. defaultMessage is:
|
#. defaultMessage is:
|
||||||
|
@ -8735,6 +8851,14 @@ msgctxt "voucher value requirement"
|
||||||
msgid "Usage Limit"
|
msgid "Usage Limit"
|
||||||
msgstr ""
|
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
|
#: build/locale/src/attributes/components/AttributeProperties/AttributeProperties.json
|
||||||
#. [src.attributes.components.AttributeProperties.714335445] - use attribute in filtering
|
#. [src.attributes.components.AttributeProperties.714335445] - use attribute in filtering
|
||||||
#. defaultMessage is:
|
#. defaultMessage is:
|
||||||
|
@ -8743,14 +8867,6 @@ msgctxt "use attribute in filtering"
|
||||||
msgid "Use in Filtering"
|
msgid "Use in Filtering"
|
||||||
msgstr ""
|
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
|
#: build/locale/src/attributes/components/AttributeList/AttributeList.json
|
||||||
#. [src.attributes.components.AttributeList.2186555805] - attribute can be searched in storefront
|
#. [src.attributes.components.AttributeList.2186555805] - attribute can be searched in storefront
|
||||||
#. defaultMessage is:
|
#. defaultMessage is:
|
||||||
|
|
|
@ -54,6 +54,8 @@ const styles = (theme: Theme) =>
|
||||||
},
|
},
|
||||||
uploadText: {
|
uploadText: {
|
||||||
color: theme.typography.body2.color,
|
color: theme.typography.body2.color,
|
||||||
|
fontSize: 12,
|
||||||
|
fontWeight: 600,
|
||||||
textTransform: "uppercase"
|
textTransform: "uppercase"
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -93,7 +95,7 @@ export const ImageUpload = withStyles(styles, { name: "ImageUpload" })(
|
||||||
>
|
>
|
||||||
<input {...getInputProps()} className={classes.fileField} />
|
<input {...getInputProps()} className={classes.fileField} />
|
||||||
<ImageIcon className={classes.photosIcon} />
|
<ImageIcon className={classes.photosIcon} />
|
||||||
<Typography className={classes.uploadText} variant="body1">
|
<Typography className={classes.uploadText}>
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
defaultMessage="Drop here to upload"
|
defaultMessage="Drop here to upload"
|
||||||
description="image upload"
|
description="image upload"
|
||||||
|
|
|
@ -0,0 +1,130 @@
|
||||||
|
import Card from "@material-ui/core/Card";
|
||||||
|
import CardContent from "@material-ui/core/CardContent";
|
||||||
|
import { Theme } from "@material-ui/core/styles";
|
||||||
|
import TextField from "@material-ui/core/TextField";
|
||||||
|
import Typography from "@material-ui/core/Typography";
|
||||||
|
import { makeStyles } from "@material-ui/styles";
|
||||||
|
import React from "react";
|
||||||
|
import { FormattedMessage, useIntl } from "react-intl";
|
||||||
|
|
||||||
|
import CardTitle from "@saleor/components/CardTitle";
|
||||||
|
import FormSpacer from "@saleor/components/FormSpacer";
|
||||||
|
import Hr from "@saleor/components/Hr";
|
||||||
|
import { FormErrors } from "@saleor/types";
|
||||||
|
|
||||||
|
export interface SiteSettingsMailingFormData {
|
||||||
|
defaultMailSenderName: string;
|
||||||
|
defaultMailSenderAddress: string;
|
||||||
|
customerSetPasswordUrl: string;
|
||||||
|
}
|
||||||
|
interface SiteSettingsMailingProps {
|
||||||
|
data: SiteSettingsMailingFormData;
|
||||||
|
errors: FormErrors<
|
||||||
|
| "defaultMailSenderAddress"
|
||||||
|
| "defaultMailSenderName"
|
||||||
|
| "customerSetPasswordUrl"
|
||||||
|
>;
|
||||||
|
disabled: boolean;
|
||||||
|
onChange: (event: React.ChangeEvent<any>) => 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<SiteSettingsMailingProps> = props => {
|
||||||
|
const { data, disabled, errors, onChange } = props;
|
||||||
|
const classes = useStyles(props);
|
||||||
|
const intl = useIntl();
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Card>
|
||||||
|
<CardTitle
|
||||||
|
title={intl.formatMessage({
|
||||||
|
defaultMessage: "Mailing Configuration",
|
||||||
|
description: "section header"
|
||||||
|
})}
|
||||||
|
/>
|
||||||
|
<CardContent>
|
||||||
|
<Typography className={classes.cardHelperText}>
|
||||||
|
<FormattedMessage
|
||||||
|
defaultMessage="Mailing Configuration"
|
||||||
|
description="helper text"
|
||||||
|
id="siteSettingsMailingHelperText"
|
||||||
|
/>
|
||||||
|
</Typography>
|
||||||
|
<Typography className={classes.cardHelperTextCaption} variant="body1">
|
||||||
|
<FormattedMessage defaultMessage="Configurate your email address from which all automatic emails will be sent to your customers." />
|
||||||
|
</Typography>
|
||||||
|
<TextField
|
||||||
|
disabled={disabled}
|
||||||
|
error={!!errors.defaultMailSenderAddress}
|
||||||
|
fullWidth
|
||||||
|
name="defaultMailSenderAddress"
|
||||||
|
label={intl.formatMessage({
|
||||||
|
defaultMessage: "Mailing email address"
|
||||||
|
})}
|
||||||
|
helperText={errors.defaultMailSenderAddress}
|
||||||
|
value={data.defaultMailSenderAddress}
|
||||||
|
onChange={onChange}
|
||||||
|
/>
|
||||||
|
<FormSpacer />
|
||||||
|
<TextField
|
||||||
|
disabled={disabled}
|
||||||
|
error={!!errors.defaultMailSenderName}
|
||||||
|
fullWidth
|
||||||
|
name="defaultMailSenderName"
|
||||||
|
label={intl.formatMessage({
|
||||||
|
defaultMessage: "Mailing email sender"
|
||||||
|
})}
|
||||||
|
helperText={
|
||||||
|
errors.defaultMailSenderName ||
|
||||||
|
intl.formatMessage({
|
||||||
|
defaultMessage: 'This will be visible as "from" name',
|
||||||
|
description: "email sender"
|
||||||
|
})
|
||||||
|
}
|
||||||
|
value={data.defaultMailSenderName}
|
||||||
|
onChange={onChange}
|
||||||
|
/>
|
||||||
|
<FormSpacer />
|
||||||
|
<Hr />
|
||||||
|
<FormSpacer />
|
||||||
|
<TextField
|
||||||
|
disabled={disabled}
|
||||||
|
error={!!errors.customerSetPasswordUrl}
|
||||||
|
fullWidth
|
||||||
|
name="customerSetPasswordUrl"
|
||||||
|
label={intl.formatMessage({
|
||||||
|
defaultMessage: "Customer password reset URL"
|
||||||
|
})}
|
||||||
|
placeholder={intl.formatMessage({
|
||||||
|
defaultMessage: "URL address"
|
||||||
|
})}
|
||||||
|
helperText={
|
||||||
|
errors.customerSetPasswordUrl ||
|
||||||
|
intl.formatMessage({
|
||||||
|
defaultMessage:
|
||||||
|
"This URL will be used as a main URL for password resets. It will be sent via email."
|
||||||
|
})
|
||||||
|
}
|
||||||
|
value={data.customerSetPasswordUrl}
|
||||||
|
onChange={onChange}
|
||||||
|
/>
|
||||||
|
</CardContent>
|
||||||
|
</Card>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
SiteSettingsMailing.displayName = "SiteSettingsMailing";
|
||||||
|
export default SiteSettingsMailing;
|
2
src/siteSettings/components/SiteSettingsMailing/index.ts
Normal file
2
src/siteSettings/components/SiteSettingsMailing/index.ts
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
export { default } from "./SiteSettingsMailing";
|
||||||
|
export * from "./SiteSettingsMailing";
|
|
@ -1,4 +1,6 @@
|
||||||
|
import { Theme } from "@material-ui/core/styles";
|
||||||
import Typography from "@material-ui/core/Typography";
|
import Typography from "@material-ui/core/Typography";
|
||||||
|
import { makeStyles } from "@material-ui/styles";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { FormattedMessage, useIntl } from "react-intl";
|
import { FormattedMessage, useIntl } from "react-intl";
|
||||||
|
|
||||||
|
@ -7,6 +9,7 @@ import { ConfirmButtonTransitionState } from "@saleor/components/ConfirmButton";
|
||||||
import Container from "@saleor/components/Container";
|
import Container from "@saleor/components/Container";
|
||||||
import Form from "@saleor/components/Form";
|
import Form from "@saleor/components/Form";
|
||||||
import Grid from "@saleor/components/Grid";
|
import Grid from "@saleor/components/Grid";
|
||||||
|
import Hr from "@saleor/components/Hr";
|
||||||
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 useStateFromProps from "@saleor/hooks/useStateFromProps";
|
import useStateFromProps from "@saleor/hooks/useStateFromProps";
|
||||||
|
@ -20,6 +23,9 @@ import { SiteSettings_shop } from "../../types/SiteSettings";
|
||||||
import SiteSettingsAddress from "../SiteSettingsAddress/SiteSettingsAddress";
|
import SiteSettingsAddress from "../SiteSettingsAddress/SiteSettingsAddress";
|
||||||
import SiteSettingsDetails from "../SiteSettingsDetails/SiteSettingsDetails";
|
import SiteSettingsDetails from "../SiteSettingsDetails/SiteSettingsDetails";
|
||||||
import SiteSettingsKeys from "../SiteSettingsKeys/SiteSettingsKeys";
|
import SiteSettingsKeys from "../SiteSettingsKeys/SiteSettingsKeys";
|
||||||
|
import SiteSettingsMailing, {
|
||||||
|
SiteSettingsMailingFormData
|
||||||
|
} from "../SiteSettingsMailing";
|
||||||
|
|
||||||
export interface SiteSettingsPageAddressFormData {
|
export interface SiteSettingsPageAddressFormData {
|
||||||
city: string;
|
city: string;
|
||||||
|
@ -33,7 +39,8 @@ export interface SiteSettingsPageAddressFormData {
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface SiteSettingsPageFormData
|
export interface SiteSettingsPageFormData
|
||||||
extends SiteSettingsPageAddressFormData {
|
extends SiteSettingsPageAddressFormData,
|
||||||
|
SiteSettingsMailingFormData {
|
||||||
description: string;
|
description: string;
|
||||||
domain: string;
|
domain: string;
|
||||||
name: string;
|
name: string;
|
||||||
|
@ -50,34 +57,54 @@ export interface SiteSettingsPageProps {
|
||||||
onSubmit: (data: SiteSettingsPageFormData) => void;
|
onSubmit: (data: SiteSettingsPageFormData) => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
const SiteSettingsPage: React.StatelessComponent<SiteSettingsPageProps> = ({
|
const useStyles = makeStyles(
|
||||||
disabled,
|
(theme: Theme) => ({
|
||||||
errors,
|
hr: {
|
||||||
saveButtonBarState,
|
gridColumnEnd: "span 2",
|
||||||
shop,
|
margin: `${theme.spacing.unit}px 0`
|
||||||
onBack,
|
}
|
||||||
onKeyAdd,
|
}),
|
||||||
onKeyRemove,
|
{
|
||||||
onSubmit
|
name: "SiteSettingsPage"
|
||||||
}) => {
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
const SiteSettingsPage: React.FC<SiteSettingsPageProps> = props => {
|
||||||
|
const {
|
||||||
|
disabled,
|
||||||
|
errors,
|
||||||
|
saveButtonBarState,
|
||||||
|
shop,
|
||||||
|
onBack,
|
||||||
|
onKeyAdd,
|
||||||
|
onKeyRemove,
|
||||||
|
onSubmit
|
||||||
|
} = props;
|
||||||
|
const classes = useStyles(props);
|
||||||
const intl = useIntl();
|
const intl = useIntl();
|
||||||
const [displayCountry, setDisplayCountry] = useStateFromProps(
|
const [displayCountry, setDisplayCountry] = useStateFromProps(
|
||||||
maybe(() => shop.companyAddress.country.code, "")
|
maybe(() => shop.companyAddress.country.code, "")
|
||||||
);
|
);
|
||||||
|
|
||||||
const initialForm: SiteSettingsPageFormData = {
|
const initialFormAddress: SiteSettingsPageAddressFormData = {
|
||||||
city: maybe(() => shop.companyAddress.city, ""),
|
city: maybe(() => shop.companyAddress.city, ""),
|
||||||
companyName: maybe(() => shop.companyAddress.companyName, ""),
|
companyName: maybe(() => shop.companyAddress.companyName, ""),
|
||||||
country: maybe(() => shop.companyAddress.country.code, ""),
|
country: maybe(() => shop.companyAddress.country.code, ""),
|
||||||
countryArea: maybe(() => shop.companyAddress.countryArea, ""),
|
countryArea: maybe(() => shop.companyAddress.countryArea, ""),
|
||||||
description: maybe(() => shop.description, ""),
|
|
||||||
domain: maybe(() => shop.domain.host, ""),
|
|
||||||
name: maybe(() => shop.name, ""),
|
|
||||||
phone: maybe(() => shop.companyAddress.phone, ""),
|
phone: maybe(() => shop.companyAddress.phone, ""),
|
||||||
postalCode: maybe(() => shop.companyAddress.postalCode, ""),
|
postalCode: maybe(() => shop.companyAddress.postalCode, ""),
|
||||||
streetAddress1: maybe(() => shop.companyAddress.streetAddress1, ""),
|
streetAddress1: maybe(() => shop.companyAddress.streetAddress1, ""),
|
||||||
streetAddress2: maybe(() => shop.companyAddress.streetAddress2, "")
|
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 (
|
return (
|
||||||
<Form
|
<Form
|
||||||
|
@ -105,18 +132,51 @@ const SiteSettingsPage: React.StatelessComponent<SiteSettingsPageProps> = ({
|
||||||
title={intl.formatMessage(commonMessages.generalInformations)}
|
title={intl.formatMessage(commonMessages.generalInformations)}
|
||||||
/>
|
/>
|
||||||
<Grid variant="inverted">
|
<Grid variant="inverted">
|
||||||
<Typography variant="h6">
|
<div>
|
||||||
{intl.formatMessage(sectionNames.siteSettings)}
|
<Typography>
|
||||||
</Typography>
|
{intl.formatMessage(sectionNames.siteSettings)}
|
||||||
|
</Typography>
|
||||||
|
<Typography variant="body1">
|
||||||
|
<FormattedMessage defaultMessage="These are general information about your store. They define what is the URL of your store and what is shown in browsers taskbar." />
|
||||||
|
</Typography>
|
||||||
|
</div>
|
||||||
<SiteSettingsDetails
|
<SiteSettingsDetails
|
||||||
data={data}
|
data={data}
|
||||||
errors={formErrors}
|
errors={formErrors}
|
||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
onChange={change}
|
onChange={change}
|
||||||
/>
|
/>
|
||||||
<Typography variant="h6">
|
<Hr className={classes.hr} />
|
||||||
<FormattedMessage defaultMessage="Company information" />
|
<div>
|
||||||
</Typography>
|
<Typography>
|
||||||
|
<FormattedMessage
|
||||||
|
defaultMessage="Mailing Configuration"
|
||||||
|
description="section header"
|
||||||
|
/>
|
||||||
|
</Typography>
|
||||||
|
<Typography variant="body1">
|
||||||
|
<FormattedMessage defaultMessage="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." />
|
||||||
|
</Typography>
|
||||||
|
</div>
|
||||||
|
<SiteSettingsMailing
|
||||||
|
data={data}
|
||||||
|
errors={formErrors}
|
||||||
|
disabled={disabled}
|
||||||
|
onChange={change}
|
||||||
|
/>
|
||||||
|
<Hr className={classes.hr} />
|
||||||
|
<div>
|
||||||
|
<Typography>
|
||||||
|
<FormattedMessage
|
||||||
|
defaultMessage="Company Information"
|
||||||
|
description="section header"
|
||||||
|
/>
|
||||||
|
</Typography>
|
||||||
|
<Typography variant="body1">
|
||||||
|
<FormattedMessage defaultMessage="This adress will be used to generate invoices and calculate shipping rates." />
|
||||||
|
<FormattedMessage defaultMessage="Email adress you provide here will be used as a contact adress for your customers." />
|
||||||
|
</Typography>
|
||||||
|
</div>
|
||||||
<SiteSettingsAddress
|
<SiteSettingsAddress
|
||||||
data={data}
|
data={data}
|
||||||
displayCountry={displayCountry}
|
displayCountry={displayCountry}
|
||||||
|
@ -126,9 +186,18 @@ const SiteSettingsPage: React.StatelessComponent<SiteSettingsPageProps> = ({
|
||||||
onChange={change}
|
onChange={change}
|
||||||
onCountryChange={handleCountryChange}
|
onCountryChange={handleCountryChange}
|
||||||
/>
|
/>
|
||||||
<Typography variant="h6">
|
<Hr className={classes.hr} />
|
||||||
<FormattedMessage defaultMessage="Authentication keys" />
|
<div>
|
||||||
</Typography>
|
<Typography>
|
||||||
|
<FormattedMessage
|
||||||
|
defaultMessage="Authentication Methods"
|
||||||
|
description="section header"
|
||||||
|
/>
|
||||||
|
</Typography>
|
||||||
|
<Typography variant="body1">
|
||||||
|
<FormattedMessage defaultMessage="Authentication method defines additional ways that customers can log in to your ecommerce. " />
|
||||||
|
</Typography>
|
||||||
|
</div>
|
||||||
<SiteSettingsKeys
|
<SiteSettingsKeys
|
||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
keys={maybe(() => shop.authorizationKeys)}
|
keys={maybe(() => shop.authorizationKeys)}
|
||||||
|
@ -148,5 +217,6 @@ const SiteSettingsPage: React.StatelessComponent<SiteSettingsPageProps> = ({
|
||||||
</Form>
|
</Form>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
SiteSettingsPage.displayName = "SiteSettingsPage";
|
SiteSettingsPage.displayName = "SiteSettingsPage";
|
||||||
export default SiteSettingsPage;
|
export default SiteSettingsPage;
|
||||||
|
|
|
@ -36,6 +36,9 @@ export const shop: SiteSettings_shop = {
|
||||||
country: "United Arab Emirates"
|
country: "United Arab Emirates"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
customerSetPasswordUrl: "https://example.com/reset-password",
|
||||||
|
defaultMailSenderAddress: "noreply@example.com",
|
||||||
|
defaultMailSenderName: "Saleor",
|
||||||
description: "Lorem ipsum dolor sit amet",
|
description: "Lorem ipsum dolor sit amet",
|
||||||
domain: {
|
domain: {
|
||||||
__typename: "Domain",
|
__typename: "Domain",
|
||||||
|
|
|
@ -63,7 +63,7 @@ const shopSettingsUpdate = gql`
|
||||||
mutation ShopSettingsUpdate(
|
mutation ShopSettingsUpdate(
|
||||||
$shopDomainInput: SiteDomainInput!
|
$shopDomainInput: SiteDomainInput!
|
||||||
$shopSettingsInput: ShopSettingsInput!
|
$shopSettingsInput: ShopSettingsInput!
|
||||||
$addressInput: AddressInput!
|
$addressInput: AddressInput
|
||||||
) {
|
) {
|
||||||
shopSettingsUpdate(input: $shopSettingsInput) {
|
shopSettingsUpdate(input: $shopSettingsInput) {
|
||||||
errors {
|
errors {
|
||||||
|
|
|
@ -17,6 +17,9 @@ export const shopFragment = gql`
|
||||||
code
|
code
|
||||||
country
|
country
|
||||||
}
|
}
|
||||||
|
customerSetPasswordUrl
|
||||||
|
defaultMailSenderAddress
|
||||||
|
defaultMailSenderName
|
||||||
description
|
description
|
||||||
domain {
|
domain {
|
||||||
host
|
host
|
||||||
|
|
|
@ -58,6 +58,9 @@ export interface AuthorizationKeyAdd_authorizationKeyAdd_shop {
|
||||||
authorizationKeys: (AuthorizationKeyAdd_authorizationKeyAdd_shop_authorizationKeys | null)[];
|
authorizationKeys: (AuthorizationKeyAdd_authorizationKeyAdd_shop_authorizationKeys | null)[];
|
||||||
companyAddress: AuthorizationKeyAdd_authorizationKeyAdd_shop_companyAddress | null;
|
companyAddress: AuthorizationKeyAdd_authorizationKeyAdd_shop_companyAddress | null;
|
||||||
countries: (AuthorizationKeyAdd_authorizationKeyAdd_shop_countries | null)[];
|
countries: (AuthorizationKeyAdd_authorizationKeyAdd_shop_countries | null)[];
|
||||||
|
customerSetPasswordUrl: string | null;
|
||||||
|
defaultMailSenderAddress: string | null;
|
||||||
|
defaultMailSenderName: string | null;
|
||||||
description: string | null;
|
description: string | null;
|
||||||
domain: AuthorizationKeyAdd_authorizationKeyAdd_shop_domain;
|
domain: AuthorizationKeyAdd_authorizationKeyAdd_shop_domain;
|
||||||
name: string;
|
name: string;
|
||||||
|
|
|
@ -58,6 +58,9 @@ export interface AuthorizationKeyDelete_authorizationKeyDelete_shop {
|
||||||
authorizationKeys: (AuthorizationKeyDelete_authorizationKeyDelete_shop_authorizationKeys | null)[];
|
authorizationKeys: (AuthorizationKeyDelete_authorizationKeyDelete_shop_authorizationKeys | null)[];
|
||||||
companyAddress: AuthorizationKeyDelete_authorizationKeyDelete_shop_companyAddress | null;
|
companyAddress: AuthorizationKeyDelete_authorizationKeyDelete_shop_companyAddress | null;
|
||||||
countries: (AuthorizationKeyDelete_authorizationKeyDelete_shop_countries | null)[];
|
countries: (AuthorizationKeyDelete_authorizationKeyDelete_shop_countries | null)[];
|
||||||
|
customerSetPasswordUrl: string | null;
|
||||||
|
defaultMailSenderAddress: string | null;
|
||||||
|
defaultMailSenderName: string | null;
|
||||||
description: string | null;
|
description: string | null;
|
||||||
domain: AuthorizationKeyDelete_authorizationKeyDelete_shop_domain;
|
domain: AuthorizationKeyDelete_authorizationKeyDelete_shop_domain;
|
||||||
name: string;
|
name: string;
|
||||||
|
|
|
@ -52,6 +52,9 @@ export interface ShopFragment {
|
||||||
authorizationKeys: (ShopFragment_authorizationKeys | null)[];
|
authorizationKeys: (ShopFragment_authorizationKeys | null)[];
|
||||||
companyAddress: ShopFragment_companyAddress | null;
|
companyAddress: ShopFragment_companyAddress | null;
|
||||||
countries: (ShopFragment_countries | null)[];
|
countries: (ShopFragment_countries | null)[];
|
||||||
|
customerSetPasswordUrl: string | null;
|
||||||
|
defaultMailSenderAddress: string | null;
|
||||||
|
defaultMailSenderName: string | null;
|
||||||
description: string | null;
|
description: string | null;
|
||||||
domain: ShopFragment_domain;
|
domain: ShopFragment_domain;
|
||||||
name: string;
|
name: string;
|
||||||
|
|
|
@ -58,6 +58,9 @@ export interface ShopSettingsUpdate_shopSettingsUpdate_shop {
|
||||||
authorizationKeys: (ShopSettingsUpdate_shopSettingsUpdate_shop_authorizationKeys | null)[];
|
authorizationKeys: (ShopSettingsUpdate_shopSettingsUpdate_shop_authorizationKeys | null)[];
|
||||||
companyAddress: ShopSettingsUpdate_shopSettingsUpdate_shop_companyAddress | null;
|
companyAddress: ShopSettingsUpdate_shopSettingsUpdate_shop_companyAddress | null;
|
||||||
countries: (ShopSettingsUpdate_shopSettingsUpdate_shop_countries | null)[];
|
countries: (ShopSettingsUpdate_shopSettingsUpdate_shop_countries | null)[];
|
||||||
|
customerSetPasswordUrl: string | null;
|
||||||
|
defaultMailSenderAddress: string | null;
|
||||||
|
defaultMailSenderName: string | null;
|
||||||
description: string | null;
|
description: string | null;
|
||||||
domain: ShopSettingsUpdate_shopSettingsUpdate_shop_domain;
|
domain: ShopSettingsUpdate_shopSettingsUpdate_shop_domain;
|
||||||
name: string;
|
name: string;
|
||||||
|
|
|
@ -52,6 +52,9 @@ export interface SiteSettings_shop {
|
||||||
authorizationKeys: (SiteSettings_shop_authorizationKeys | null)[];
|
authorizationKeys: (SiteSettings_shop_authorizationKeys | null)[];
|
||||||
companyAddress: SiteSettings_shop_companyAddress | null;
|
companyAddress: SiteSettings_shop_companyAddress | null;
|
||||||
countries: (SiteSettings_shop_countries | null)[];
|
countries: (SiteSettings_shop_countries | null)[];
|
||||||
|
customerSetPasswordUrl: string | null;
|
||||||
|
defaultMailSenderAddress: string | null;
|
||||||
|
defaultMailSenderName: string | null;
|
||||||
description: string | null;
|
description: string | null;
|
||||||
domain: SiteSettings_shop_domain;
|
domain: SiteSettings_shop_domain;
|
||||||
name: string;
|
name: string;
|
||||||
|
|
|
@ -13,6 +13,7 @@ import SiteSettingsKeyDialog, {
|
||||||
SiteSettingsKeyDialogForm
|
SiteSettingsKeyDialogForm
|
||||||
} from "../components/SiteSettingsKeyDialog";
|
} from "../components/SiteSettingsKeyDialog";
|
||||||
import SiteSettingsPage, {
|
import SiteSettingsPage, {
|
||||||
|
SiteSettingsPageAddressFormData,
|
||||||
SiteSettingsPageFormData
|
SiteSettingsPageFormData
|
||||||
} from "../components/SiteSettingsPage";
|
} from "../components/SiteSettingsPage";
|
||||||
import {
|
import {
|
||||||
|
@ -124,10 +125,21 @@ export const SiteSettings: React.StatelessComponent<SiteSettingsProps> = ({
|
||||||
});
|
});
|
||||||
const handleUpdateShopSettings = (
|
const handleUpdateShopSettings = (
|
||||||
data: SiteSettingsPageFormData
|
data: SiteSettingsPageFormData
|
||||||
) =>
|
) => {
|
||||||
updateShopSettings({
|
const areAddressInputFieldsModified = ([
|
||||||
variables: {
|
"city",
|
||||||
addressInput: {
|
"companyName",
|
||||||
|
"country",
|
||||||
|
"countryArea",
|
||||||
|
"phone",
|
||||||
|
"postalCode",
|
||||||
|
"streetAddress1",
|
||||||
|
"streetAddress2"
|
||||||
|
] as Array<keyof SiteSettingsPageAddressFormData>)
|
||||||
|
.map(key => data[key])
|
||||||
|
.some(field => field !== "");
|
||||||
|
const addressInput = areAddressInputFieldsModified
|
||||||
|
? {
|
||||||
city: data.city,
|
city: data.city,
|
||||||
companyName: data.companyName,
|
companyName: data.companyName,
|
||||||
country: findInEnum(data.country, CountryCode),
|
country: findInEnum(data.country, CountryCode),
|
||||||
|
@ -136,16 +148,25 @@ export const SiteSettings: React.StatelessComponent<SiteSettingsProps> = ({
|
||||||
postalCode: data.postalCode,
|
postalCode: data.postalCode,
|
||||||
streetAddress1: data.streetAddress1,
|
streetAddress1: data.streetAddress1,
|
||||||
streetAddress2: data.streetAddress2
|
streetAddress2: data.streetAddress2
|
||||||
},
|
}
|
||||||
|
: null;
|
||||||
|
updateShopSettings({
|
||||||
|
variables: {
|
||||||
|
addressInput,
|
||||||
shopDomainInput: {
|
shopDomainInput: {
|
||||||
domain: data.domain,
|
domain: data.domain,
|
||||||
name: data.name
|
name: data.name
|
||||||
},
|
},
|
||||||
shopSettingsInput: {
|
shopSettingsInput: {
|
||||||
|
customerSetPasswordUrl: data.customerSetPasswordUrl,
|
||||||
|
defaultMailSenderAddress:
|
||||||
|
data.defaultMailSenderAddress,
|
||||||
|
defaultMailSenderName: data.defaultMailSenderName,
|
||||||
description: data.description
|
description: data.description
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
};
|
||||||
|
|
||||||
const formTransitionState = getMutationState(
|
const formTransitionState = getMutationState(
|
||||||
updateShopSettingsOpts.called,
|
updateShopSettingsOpts.called,
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -53,7 +53,13 @@ storiesOf("Views / Categories / Update category", module)
|
||||||
/>
|
/>
|
||||||
))
|
))
|
||||||
.add("no background", () => (
|
.add("no background", () => (
|
||||||
<CategoryUpdatePage {...updateProps} category={category} />
|
<CategoryUpdatePage
|
||||||
|
{...updateProps}
|
||||||
|
category={{
|
||||||
|
...category,
|
||||||
|
backgroundImage: null
|
||||||
|
}}
|
||||||
|
/>
|
||||||
))
|
))
|
||||||
.add("no subcategories", () => (
|
.add("no subcategories", () => (
|
||||||
<CategoryUpdatePage {...updateProps} subcategories={[]} />
|
<CategoryUpdatePage {...updateProps} subcategories={[]} />
|
||||||
|
|
|
@ -29,6 +29,13 @@ storiesOf("Views / Site settings / Page", module)
|
||||||
.add("form errors", () => (
|
.add("form errors", () => (
|
||||||
<SiteSettingsPage
|
<SiteSettingsPage
|
||||||
{...props}
|
{...props}
|
||||||
errors={["description", "domain", "name"].map(field => formError(field))}
|
errors={[
|
||||||
|
"description",
|
||||||
|
"domain",
|
||||||
|
"name",
|
||||||
|
"defaultMailSenderAddress",
|
||||||
|
"defaultMailSenderName",
|
||||||
|
"customerSetPasswordUrl"
|
||||||
|
].map(field => formError(field))}
|
||||||
/>
|
/>
|
||||||
));
|
));
|
||||||
|
|
|
@ -523,8 +523,7 @@ export default (colors: IThemeColors): Theme =>
|
||||||
fontFamily
|
fontFamily
|
||||||
},
|
},
|
||||||
body1: {
|
body1: {
|
||||||
fontSize: "0.75rem",
|
fontSize: 14
|
||||||
fontWeight: 600 as 600
|
|
||||||
},
|
},
|
||||||
body2: {
|
body2: {
|
||||||
fontSize: "1rem"
|
fontSize: "1rem"
|
||||||
|
|
Loading…
Reference in a new issue