refactoring: payment made form.

This commit is contained in:
a.bouhuolia
2021-02-21 13:00:06 +02:00
parent 265198103d
commit df2d215071
25 changed files with 542 additions and 145 deletions

View File

@@ -4,7 +4,7 @@ import { Intent } from '@blueprintjs/core';
import classNames from 'classnames';
import { useIntl } from 'react-intl';
import { useHistory } from 'react-router-dom';
import { sumBy, isEmpty, omit } from 'lodash';
import { isEmpty, omit } from 'lodash';
import { CLASSES } from 'common/classes';
import { EditBillFormSchema, CreateBillFormSchema } from './BillForm.schema';
@@ -68,7 +68,7 @@ export default function BillForm() {
const entries = values.entries.filter(
(item) => item.item_id && item.quantity,
);
const totalQuantity = safeSumBy(entries, (entry) => entry.quantity);
const totalQuantity = safeSumBy(entries, 'quantity');
if (totalQuantity === 0) {
AppToaster.show({

View File

@@ -1,6 +1,8 @@
import React from 'react';
import { DashboardContentTable, DashboardPageContent } from 'components';
import 'style/pages/Bills/List.scss';
import { BillsListProvider } from './BillsListProvider';
import BillsActionsBar from './BillsActionsBar';