From 1ff2d924d07bfe482306a13c834fbc2b73a29cf9 Mon Sep 17 00:00:00 2001 From: Ahmed Bouhuolia Date: Sat, 7 Nov 2020 22:01:10 +0200 Subject: [PATCH] WIP: customer form styling. fix: journal increment number settings. --- client/src/common/classes.js | 6 +- client/src/components/CurrenciesSelectList.js | 40 +- client/src/components/DisplayNameList.js | 43 ++ client/src/components/RequiredHint.js | 5 + client/src/components/SalutationList.js | 22 + client/src/components/index.js | 11 +- .../Accounting/MakeJournalEntriesForm.js | 31 +- .../Accounting/MakeJournalEntriesHeader.js | 48 +- .../Accounting/withManualJournalsActions.js | 4 - .../Customers/CustomerAddressTabs.js | 493 +++++++++++------- .../Customers/CustomerFinancialPanel.js | 87 ++++ ...erFooter.js => CustomerFloatingActions.js} | 23 +- .../src/containers/Customers/CustomerForm.js | 243 ++------- .../CustomerFormAfterPrimarySection.js | 70 +++ .../Customers/CustomerFormPrimarySection.js | 125 +++++ .../Customers/CustomerTypeRadioField.js | 35 +- .../src/containers/Customers/CustomersTabs.js | 32 +- .../JournalNumberDialogContent.js | 21 +- .../Sales/Estimate/EntriesItemsTable.js | 1 - client/src/lang/en/index.js | 9 +- .../manualJournals/manualJournals.reducers.js | 4 - client/src/style/App.scss | 1 - client/src/style/objects/form.scss | 1 + client/src/style/pages/customer.scss | 286 +++++++--- server/src/models/Account.js | 2 +- 25 files changed, 1037 insertions(+), 606 deletions(-) create mode 100644 client/src/components/DisplayNameList.js create mode 100644 client/src/components/RequiredHint.js create mode 100644 client/src/components/SalutationList.js create mode 100644 client/src/containers/Customers/CustomerFinancialPanel.js rename client/src/containers/Customers/{CustomerFooter.js => CustomerFloatingActions.js} (66%) create mode 100644 client/src/containers/Customers/CustomerFormAfterPrimarySection.js create mode 100644 client/src/containers/Customers/CustomerFormPrimarySection.js diff --git a/client/src/common/classes.js b/client/src/common/classes.js index ca94a067a..dca1f9ad9 100644 --- a/client/src/common/classes.js +++ b/client/src/common/classes.js @@ -10,6 +10,7 @@ const CLASSES = { PAGE_FORM_HEADER_PRIMARY: 'page-form__primary-section', PAGE_FORM_HEADER_FIELDS: 'page-form__header-fields', PAGE_FORM_HEADER_BIG_NUMBERS: 'page-form__big-numbers', + PAGE_FORM_TABS: 'page-form__tabs', PAGE_FORM_FOOTER: 'page-form__footer', PAGE_FORM_FLOATING_ACTIONS: 'page-form__floating-actions', @@ -20,6 +21,9 @@ const CLASSES = { PAGE_FORM_RECEIPT: 'page-form--receipt', PAGE_FORM_PAYMENT_MADE: 'page-form--payment-made', PAGE_FORM_PAYMENT_RECEIVE: 'page-form--payment-receive', + PAGE_FORM_CUSTOMER: 'page-form--customer', + + FORM_GROUP_LIST_SELECT: 'form-group--select-list', CLOUD_SPINNER: 'cloud-spinner', IS_LOADING: 'is-loading', @@ -28,4 +32,4 @@ const CLASSES = { export { CLASSES, -} \ No newline at end of file +} diff --git a/client/src/components/CurrenciesSelectList.js b/client/src/components/CurrenciesSelectList.js index 2ae5788e5..fd15b44b7 100644 --- a/client/src/components/CurrenciesSelectList.js +++ b/client/src/components/CurrenciesSelectList.js @@ -2,18 +2,14 @@ import React, {useCallback} from 'react'; import { - FormGroup, MenuItem, Button, } from '@blueprintjs/core'; import { Select } from '@blueprintjs/select'; -import classNames from 'classnames'; -import { FormattedMessage as T } from 'react-intl'; export default function CurrenciesSelectList({ - formGroupProps, selectProps, onItemSelect, className, @@ -43,30 +39,18 @@ export default function CurrenciesSelectList({ }; return ( - } - className={ - classNames( - 'form-group--select-list', - 'form-group--currency', - className, - ) - } - {...formGroupProps} + } - itemRenderer={currencyItem} - itemPredicate={filterCurrenciesPredicator} - popoverProps={{ minimal: true }} - onItemSelect={onCurrencySelect} - {...selectProps} - > - - -