diff --git a/src/containers/Preferences/Accountant/AccountantFormProvider.js b/src/containers/Preferences/Accountant/AccountantFormProvider.js index 9e2305120..4ff29b567 100644 --- a/src/containers/Preferences/Accountant/AccountantFormProvider.js +++ b/src/containers/Preferences/Accountant/AccountantFormProvider.js @@ -1,5 +1,8 @@ import React from 'react'; import classNames from 'classnames'; +import styled from 'styled-components'; + +import { Card } from 'components'; import { CLASSES } from 'common/classes'; import { useAccounts, useSaveSettings, useSettings } from 'hooks/query'; import PreferencesPageLoader from '../PreferencesPageLoader'; @@ -35,16 +38,21 @@ function AccountantFormProvider({ ...props }) { CLASSES.PREFERENCES_PAGE_INSIDE_CONTENT_ACCOUNTANT, )} > -
+ {isLoading ? ( ) : ( )} -
+ ); } const useAccountantFormContext = () => React.useContext(AccountantFormContext); + export { AccountantFormProvider, useAccountantFormContext }; + +const AccountantFormCard = styled(Card)` + padding: 25px; +`; diff --git a/src/containers/Preferences/Currencies/Currencies.js b/src/containers/Preferences/Currencies/Currencies.js index e110e72df..92d4e94c4 100644 --- a/src/containers/Preferences/Currencies/Currencies.js +++ b/src/containers/Preferences/Currencies/Currencies.js @@ -1,20 +1,26 @@ - - import React from 'react'; import classNames from 'classnames'; +import styled from 'styled-components'; +import { Card } from 'components'; import { CLASSES } from 'common/classes'; import CurrenciesList from './CurrenciesList'; export default function PreferencesCurrenciesPage() { return ( -
-
+
+ -
+
- ) -} \ No newline at end of file + ); +} + +const CurrenciesCard = styled(Card)` + padding: 0; +`; diff --git a/src/containers/Preferences/General/GeneralFormProvider.js b/src/containers/Preferences/General/GeneralFormProvider.js index e51da73cd..a6c450c3f 100644 --- a/src/containers/Preferences/General/GeneralFormProvider.js +++ b/src/containers/Preferences/General/GeneralFormProvider.js @@ -1,5 +1,8 @@ import React, { createContext } from 'react'; import classNames from 'classnames'; +import styled from 'styled-components'; + +import { Card } from 'components'; import { CLASSES } from 'common/classes'; import { useCurrentOrganization, @@ -45,13 +48,13 @@ function GeneralFormProvider({ ...props }) { CLASSES.PREFERENCES_PAGE_INSIDE_CONTENT_GENERAL, )} > -
+ {isOrganizationLoading || isDateFormatsLoading ? ( ) : ( )} -
+
); } @@ -59,3 +62,7 @@ function GeneralFormProvider({ ...props }) { const useGeneralFormContext = () => React.useContext(GeneralFormContext); export { GeneralFormProvider, useGeneralFormContext }; + +const GeneralFormCard = styled(Card)` + padding: 25px; +`; diff --git a/src/containers/Preferences/Item/ItemPreferencesFormProvider.js b/src/containers/Preferences/Item/ItemPreferencesFormProvider.js index 2b6162693..fd15c8122 100644 --- a/src/containers/Preferences/Item/ItemPreferencesFormProvider.js +++ b/src/containers/Preferences/Item/ItemPreferencesFormProvider.js @@ -1,7 +1,9 @@ import React, { useContext, createContext } from 'react'; import classNames from 'classnames'; -import { CLASSES } from 'common/classes'; +import styled from 'styled-components'; +import { CLASSES } from 'common/classes'; +import { Card } from 'components'; import { useSettingsItems, useAccounts, useSaveSettings } from 'hooks/query'; import PreferencesPageLoader from '../PreferencesPageLoader'; @@ -38,13 +40,13 @@ function ItemPreferencesFormProvider({ ...props }) { CLASSES.PREFERENCES_PAGE_INSIDE_CONTENT_ACCOUNTANT, )} > -
+ {isLoading ? ( ) : ( )} -
+ ); } @@ -52,3 +54,7 @@ function ItemPreferencesFormProvider({ ...props }) { const useItemPreferencesFormContext = () => useContext(ItemFormContext); export { useItemPreferencesFormContext, ItemPreferencesFormProvider }; + +const ItemsPreferencesCard = styled(Card)` + padding: 25px; +`; diff --git a/src/containers/Preferences/SMSIntegration/SMSIntegrationTabs.js b/src/containers/Preferences/SMSIntegration/SMSIntegrationTabs.js index ebad8a644..30c2062a1 100644 --- a/src/containers/Preferences/SMSIntegration/SMSIntegrationTabs.js +++ b/src/containers/Preferences/SMSIntegration/SMSIntegrationTabs.js @@ -1,10 +1,12 @@ import React from 'react'; import intl from 'react-intl-universal'; - import { Tabs, Tab } from '@blueprintjs/core'; import classNames from 'classnames'; +import styled from 'styled-components'; + import { CLASSES } from 'common/classes'; import SMSMessagesDataTable from './SMSMessagesDataTable'; +import { Card } from 'components'; import '../../../style/pages/Preferences/SMSIntegration.scss'; @@ -12,6 +14,10 @@ import withDashboardActions from 'containers/Dashboard/withDashboardActions'; import { compose } from 'utils'; +/** + * SMS Integration Tabs. + * @returns {React.JSX} + */ function SMSIntegrationTabs({ // #withDashboardActions changePreferencesPageTitle, @@ -21,7 +27,7 @@ function SMSIntegrationTabs({ }, [changePreferencesPageTitle]); return ( -
+
-
+ ); } export default compose(withDashboardActions)(SMSIntegrationTabs); + +const SMSIntegrationCard = styled(Card)` + padding: 0; +`; diff --git a/src/containers/Preferences/Users/Users.js b/src/containers/Preferences/Users/Users.js index 4f453d0b6..f6b3388a5 100644 --- a/src/containers/Preferences/Users/Users.js +++ b/src/containers/Preferences/Users/Users.js @@ -2,9 +2,11 @@ import React from 'react'; import { Tabs, Tab } from '@blueprintjs/core'; import intl from 'react-intl-universal'; import classNames from 'classnames'; +import styled from 'styled-components'; import 'style/pages/Preferences/Users.scss'; +import { Card } from 'components'; import { CLASSES } from 'common/classes'; import PreferencesSubContent from 'components/Preferences/PreferencesSubContent'; @@ -23,7 +25,7 @@ function UsersPreferences({ openDialog }) { CLASSES.PREFERENCES_PAGE_INSIDE_CONTENT_USERS, )} > -
+
-
+ ); } export default withUserPreferences(UsersPreferences); + +const UsersPereferencesCard = styled(Card)` + padding: 0; +`;