fix(form footer):missing.

This commit is contained in:
elforjani13
2022-03-21 17:58:20 +02:00
parent 90c77d80eb
commit 70e1e94a4a
15 changed files with 49 additions and 35 deletions

View File

@@ -12,9 +12,7 @@ export function MakeJournalFormFooterLeft() {
>
<FEditableText
name={'description'}
placeholder={
'Enter the description of your business to be displayed in your transaction'
}
placeholder={<T id={'make_jorunal.decscrption.placeholder'} />}
/>
</DescriptionFormGroup>
</React.Fragment>

View File

@@ -52,7 +52,7 @@ function WarehouseTransferNumberDialogContent({
return;
}
// Transformes the form values to settings to save it.
const options = transformFormToSettings(values, 'warehouse_transfer');
const options = transformFormToSettings(values, 'warehouse_transfers');
// Save the settings.
saveSettings({ options }).then(handleSuccess).catch(handleErrors);

View File

@@ -12,9 +12,7 @@ export function ExpenseFormFooterLeft() {
>
<FEditableText
name={'description'}
placeholder={
'Enter the description of your business to be displayed in your transaction'
}
placeholder={<T id={'expenses.decscrption.placeholder'} />}
/>
</DescriptionFormGroup>
</React.Fragment>

View File

@@ -13,7 +13,9 @@ export function PaymentMadeFormFooterLeft() {
>
<FEditableText
name={'statement'}
placeholder={'Thanks for your business and have a great day!'}
placeholder={
<T id={'thanks_for_your_business_and_have_a_great_day'} />
}
/>
</StatementFormGroup>
</React.Fragment>

View File

@@ -1,7 +1,7 @@
import React from 'react';
import moment from 'moment';
import intl from 'react-intl-universal';
import { pick, first } from 'lodash';
import { pick, first, sumBy } from 'lodash';
import { useFormikContext } from 'formik';
import { Intent } from '@blueprintjs/core';
import { AppToaster } from 'components';
@@ -143,7 +143,10 @@ export const usePaymentMadeTotals = () => {
} = useFormikContext();
// Retrieves the invoice entries total.
const total = React.useMemo(() => getEntriesTotal(entries), [entries]);
const total = React.useMemo(
() => sumBy(entries, 'payment_amount'),
[entries],
);
// Retrieves the formatted total money.
const formattedTotal = React.useMemo(

View File

@@ -13,7 +13,9 @@ export function CreditNoteFormFooterLeft() {
>
<FEditableText
name={'note'}
placeholder={'Thanks for your business and have a great day!'}
placeholder={
<T id={'thanks_for_your_business_and_have_a_great_day'} />
}
/>
</CreditNoteMsgFormGroup>
{/* --------- Terms and conditions --------- */}
@@ -23,9 +25,7 @@ export function CreditNoteFormFooterLeft() {
>
<FEditableText
name={'terms_conditions'}
placeholder={
'Enter the terms and conditions of your business to be displayed in your transaction'
}
placeholder={<T id={'terms_and_conditions.placeholder'} />}
/>
</TermsConditsFormGroup>
</React.Fragment>

View File

@@ -13,7 +13,9 @@ export function EstimateFormFooterLeft() {
>
<FEditableText
name={'note'}
placeholder={'Thanks for your business and have a great day!'}
placeholder={
<T id={'thanks_for_your_business_and_have_a_great_day'} />
}
/>
</EstimateMsgFormGroup>
@@ -24,9 +26,7 @@ export function EstimateFormFooterLeft() {
>
<FEditableText
name={'terms_conditions'}
placeholder={
'Enter the terms and conditions of your business to be displayed in your transaction'
}
placeholder={<T id={'terms_and_conditions.placeholder'} />}
/>
</TermsConditsFormGroup>
</React.Fragment>

View File

@@ -13,7 +13,9 @@ export function InvoiceFormFooterLeft() {
>
<FEditableText
name={'invoice_message'}
placeholder={'Thanks for your business and have a great day!'}
placeholder={
<T id={'thanks_for_your_business_and_have_a_great_day'} />
}
/>
</InvoiceMsgFormGroup>
@@ -24,9 +26,7 @@ export function InvoiceFormFooterLeft() {
>
<FEditableText
name={'terms_conditions'}
placeholder={
'Enter the terms and conditions of your business to be displayed in your transaction'
}
placeholder={<T id={'terms_and_conditions.placeholder'} />}
/>
</TermsConditsFormGroup>
</React.Fragment>
@@ -49,7 +49,6 @@ const InvoiceMsgFormGroup = styled(FFormGroup)`
const TermsConditsFormGroup = styled(FFormGroup)`
&.bp3-form-group {
.bp3-label {
font-size: 12px;
margin-bottom: 12px;

View File

@@ -13,7 +13,9 @@ export function PaymentReceiveFormFootetLeft() {
>
<FEditableText
name={'statement'}
placeholder={'Thanks for your business and have a great day!'}
placeholder={
<T id={'thanks_for_your_business_and_have_a_great_day'} />
}
/>
</TermsConditsFormGroup>
</React.Fragment>
@@ -31,4 +33,3 @@ const TermsConditsFormGroup = styled(FFormGroup)`
}
}
`;

View File

@@ -1,7 +1,7 @@
import React from 'react';
import moment from 'moment';
import intl from 'react-intl-universal';
import { omit, pick, first } from 'lodash';
import { omit, pick, first, sumBy } from 'lodash';
import { useFormikContext } from 'formik';
import { Intent } from '@blueprintjs/core';
import { AppToaster } from 'components';
@@ -226,7 +226,10 @@ export const usePaymentReceiveTotals = () => {
} = useFormikContext();
// Retrieves the invoice entries total.
const total = React.useMemo(() => getEntriesTotal(entries), [entries]);
const total = React.useMemo(
() => sumBy(entries, 'payment_amount'),
[entries],
);
// Retrieves the formatted total money.
const formattedTotal = React.useMemo(

View File

@@ -13,7 +13,9 @@ export function ReceiptFormFooterLeft() {
>
<FEditableText
name={'receipt_message'}
placeholder={'Thanks for your business and have a great day!'}
placeholder={
<T id={'thanks_for_your_business_and_have_a_great_day'} />
}
/>
</ReceiptMsgFormGroup>

View File

@@ -66,7 +66,7 @@ function WarehouseTransfersActionsBar({
// Handle table row size change.
const handleTableRowSizeChange = (size) => {
addSetting('warehouseTransfer', 'tableSize', size);
addSetting('warehouseTransfers', 'tableSize', size);
};
return (