fix: BIG-352 Add terms and conditions/notes field to a warehouse transfer.

This commit is contained in:
a.bouhuolia
2022-03-28 19:06:38 +02:00
parent d842722183
commit 767d807490
10 changed files with 80 additions and 58 deletions

View File

@@ -1,5 +1,6 @@
import React from 'react';
import styled from 'styled-components';
import intl from 'react-intl-universal';
import { FFormGroup, FEditableText, FormattedMessage as T } from 'components';
export function WarehouseTransferFormFooterLeft() {
@@ -7,14 +8,12 @@ export function WarehouseTransferFormFooterLeft() {
<React.Fragment>
{/* --------- Terms and conditions --------- */}
<TermsConditsFormGroup
label={<T id={'terms_conditions'} />}
label={<T id={'warehouse_transfer.form.reason.label'} />}
name={'reason'}
>
<FEditableText
name={'reason'}
placeholder={
'Enter the terms and conditions of your business to be displayed in your transaction'
}
placeholder={intl.get('warehouse_transfer.form.reason.placeholder')}
/>
</TermsConditsFormGroup>
</React.Fragment>

View File

@@ -1,7 +1,5 @@
import React from 'react';
import classNames from 'classnames';
import { useFormikContext } from 'formik';
import intl from 'react-intl-universal';
import { CLASSES } from 'common/classes';
import WarehouseTransferFormHeaderFields from './WarehouseTransferFormHeaderFields';

View File

@@ -183,20 +183,6 @@ function WarehouseTransferFormHeaderFields({
</FormGroup>
)}
</FastField>
{/*------------ reason -----------*/}
<FastField name={'reason'}>
{({ field, meta: { error, touched } }) => (
<FormGroup
label={<T id={'reason'} />}
className={'form-group--reason'}
intent={inputIntent({ error, touched })}
inline={true}
helperText={<ErrorMessage name={'reason'} />}
>
<InputGroup minimal={true} {...field} />
</FormGroup>
)}
</FastField>
</div>
);
}