feat: add filterByTypes

This commit is contained in:
elforjani13
2021-12-07 11:00:57 +02:00
parent ac99a6ca75
commit 192bcdc696
4 changed files with 14 additions and 2 deletions

View File

@@ -34,7 +34,7 @@ function RefundCreditNoteFloatingActions({
<Button <Button
intent={Intent.PRIMARY} intent={Intent.PRIMARY}
loading={isSubmitting} loading={isSubmitting}
style={{ minWidth: '75px' }} style={{ minWidth: '85px' }}
type="submit" type="submit"
text={<T id={'refund'} />} text={<T id={'refund'} />}
/> />

View File

@@ -28,6 +28,7 @@ import {
compose, compose,
} from 'utils'; } from 'utils';
import { useAutofocus } from 'hooks'; import { useAutofocus } from 'hooks';
import { ACCOUNT_TYPE } from 'common/accountTypes';
import { useRefundCreditNoteContext } from './RefundCreditNoteFormProvider'; import { useRefundCreditNoteContext } from './RefundCreditNoteFormProvider';
import withSettings from 'containers/Settings/withSettings'; import withSettings from 'containers/Settings/withSettings';
@@ -137,6 +138,11 @@ function RefundCreditNoteFormFields() {
inputProps={{ inputProps={{
placeholder: intl.get('select_account'), placeholder: intl.get('select_account'),
}} }}
filterByTypes={[
ACCOUNT_TYPE.BANK,
ACCOUNT_TYPE.CASH,
ACCOUNT_TYPE.FIXED_ASSET,
]}
/> />
</FormGroup> </FormGroup>
)} )}

View File

@@ -33,7 +33,7 @@ function RefundVendorCreditFloatingActions({
<Button <Button
intent={Intent.PRIMARY} intent={Intent.PRIMARY}
loading={isSubmitting} loading={isSubmitting}
style={{ minWidth: '75px' }} style={{ minWidth: '85px' }}
type="submit" type="submit"
text="Refund" text="Refund"
/> />

View File

@@ -28,6 +28,7 @@ import {
compose, compose,
} from 'utils'; } from 'utils';
import { useAutofocus } from 'hooks'; import { useAutofocus } from 'hooks';
import { ACCOUNT_TYPE } from 'common/accountTypes';
import { useRefundVendorCreditContext } from './RefundVendorCreditFormProvider'; import { useRefundVendorCreditContext } from './RefundVendorCreditFormProvider';
import withSettings from 'containers/Settings/withSettings'; import withSettings from 'containers/Settings/withSettings';
@@ -138,6 +139,11 @@ function RefundVendorCreditFormFields() {
inputProps={{ inputProps={{
placeholder: intl.get('select_account'), placeholder: intl.get('select_account'),
}} }}
filterByTypes={[
ACCOUNT_TYPE.BANK,
ACCOUNT_TYPE.CASH,
ACCOUNT_TYPE.FIXED_ASSET,
]}
/> />
</FormGroup> </FormGroup>
)} )}