diff --git a/.vscode/FastField.code-snippets b/.vscode/FastField.code-snippets new file mode 100644 index 000000000..1cd9b7fb6 --- /dev/null +++ b/.vscode/FastField.code-snippets @@ -0,0 +1,21 @@ +{ + // Place your Ratteb workspace snippets here. Each snippet is defined under a snippet name and has a scope, prefix, body and + // description. Add comma separated ids of the languages where the snippet is applicable in the scope field. If scope + // is left empty or omitted, the snippet gets applied to all languages. The prefix is what is + // used to trigger the snippet and the body will be expanded and inserted. Possible variables are: + // $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. + // Placeholders with the same ids are connected. + // Example: + "fastfield": { + "scope": "javascript,typescript", + "prefix": "fastfield", + "body": [ + "", + " {({ form, field: { value }, meta: { error, touched } }) => (", + "", + " )}", + "" + ], + "description": "Fast field component" + } +} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json index 16d3c53ab..ce96ff416 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -26,5 +26,5 @@ "editor.tabSize": 2, "editor.insertSpaces": true, "git.ignoreLimitWarning": true, - "god.tsconfig": "./tsconfig.json", + "god.tsconfig": "./server/tsconfig.json", } \ No newline at end of file diff --git a/client/src/components/AccountsSelectList.js b/client/src/components/AccountsSelectList.js index de1511753..4b1f67593 100644 --- a/client/src/components/AccountsSelectList.js +++ b/client/src/components/AccountsSelectList.js @@ -2,6 +2,7 @@ import React, { useCallback, useState, useEffect, useMemo } from 'react'; import { MenuItem, Button } from '@blueprintjs/core'; import { Select } from '@blueprintjs/select'; import { FormattedMessage as T } from 'react-intl'; +import classNames from 'classnames'; import { isEmpty } from 'lodash'; export default function AccountsSelectList({ @@ -103,6 +104,7 @@ export default function AccountsSelectList({ filterable={true} onItemSelect={onAccountSelect} disabled={disabled} + className={classNames('form-group--select-list')} > + + + + + ); +} + +export default compose( + withItems(({ itemsCurrentPage }) => ({ + itemsCurrentPage, + })), +)(ItemsEntriesTable); diff --git a/client/src/containers/Purchases/Bill/BillFloatingActions.js b/client/src/containers/Purchases/Bill/BillFloatingActions.js index 2373433a4..c71848ea5 100644 --- a/client/src/containers/Purchases/Bill/BillFloatingActions.js +++ b/client/src/containers/Purchases/Bill/BillFloatingActions.js @@ -1,12 +1,15 @@ import React from 'react'; import { Intent, Button } from '@blueprintjs/core'; import { FormattedMessage as T } from 'react-intl'; +import { saveInvoke } from 'utils'; export default function BillFloatingActions({ - formik: { isSubmitting }, + isSubmitting, onSubmitClick, + onSubmitAndNewClick, onCancelClick, - bill, + onClearClick, + billId, }) { return (
@@ -15,11 +18,11 @@ export default function BillFloatingActions({ loading={isSubmitting} intent={Intent.PRIMARY} type="submit" - onClick={() => { - onSubmitClick({ redirect: true }); + onClick={(event) => { + saveInvoke(onSubmitClick, event); }} > - {bill && bill.id ? : } + {billId ? : } -