mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-21 07:10:33 +00:00
-- amend
This commit is contained in:
@@ -26,7 +26,7 @@ import AppToaster from 'components/AppToaster';
|
|||||||
import Dragzone from 'components/Dragzone';
|
import Dragzone from 'components/Dragzone';
|
||||||
|
|
||||||
import useMedia from 'hooks/useMedia';
|
import useMedia from 'hooks/useMedia';
|
||||||
import { compose } from 'utils';
|
import { compose, repeatValue } from 'utils';
|
||||||
|
|
||||||
function ExpenseForm({
|
function ExpenseForm({
|
||||||
// #withMedia
|
// #withMedia
|
||||||
@@ -135,10 +135,7 @@ function ExpenseForm({
|
|||||||
reference_no: '',
|
reference_no: '',
|
||||||
currency_code: '',
|
currency_code: '',
|
||||||
categories: [
|
categories: [
|
||||||
defaultCategory,
|
...repeatValue(defaultCategory, 4),
|
||||||
defaultCategory,
|
|
||||||
defaultCategory,
|
|
||||||
defaultCategory,
|
|
||||||
],
|
],
|
||||||
}),
|
}),
|
||||||
[defaultCategory],
|
[defaultCategory],
|
||||||
@@ -267,7 +264,7 @@ function ExpenseForm({
|
|||||||
const handleSubmitClick = useCallback(
|
const handleSubmitClick = useCallback(
|
||||||
(payload) => {
|
(payload) => {
|
||||||
setPayload(payload);
|
setPayload(payload);
|
||||||
formik.resetForm();
|
formik.submitForm();
|
||||||
},
|
},
|
||||||
[setPayload, formik],
|
[setPayload, formik],
|
||||||
);
|
);
|
||||||
@@ -301,7 +298,9 @@ function ExpenseForm({
|
|||||||
const handleClearAllLines = () => {
|
const handleClearAllLines = () => {
|
||||||
formik.setFieldValue(
|
formik.setFieldValue(
|
||||||
'categories',
|
'categories',
|
||||||
orderingCategoriesIndex([defaultCategory, defaultCategory, defaultCategory, defaultCategory]),
|
orderingCategoriesIndex([
|
||||||
|
...repeatValue(defaultCategory, 4),
|
||||||
|
]),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user