diff --git a/new-lamassu-admin/src/components/inputs/formik/Autocomplete.js b/new-lamassu-admin/src/components/inputs/formik/Autocomplete.js index ce09f0c9..6355e10e 100644 --- a/new-lamassu-admin/src/components/inputs/formik/Autocomplete.js +++ b/new-lamassu-admin/src/components/inputs/formik/Autocomplete.js @@ -31,7 +31,7 @@ const AutocompleteFormik = ({ options, onChange, ...props }) => { setFieldValue(name, item) }} onBlur={innerOnBlur} - value={value || ''} + value={value} error={error} open={open} options={innerOptions} diff --git a/new-lamassu-admin/src/pages/Commissions/helper.js b/new-lamassu-admin/src/pages/Commissions/helper.js index 4a7e072b..a81fd3f0 100644 --- a/new-lamassu-admin/src/pages/Commissions/helper.js +++ b/new-lamassu-admin/src/pages/Commissions/helper.js @@ -8,6 +8,7 @@ import { Autocomplete, NumberInput } from 'src/components/inputs/formik' import { bold } from 'src/styling/helpers' import { ReactComponent as TxInIcon } from 'src/styling/icons/direction/cash-in.svg' import { ReactComponent as TxOutIcon } from 'src/styling/icons/direction/cash-out.svg' +import { primaryColor, secondaryColorDark } from 'src/styling/variables' import { CURRENCY_MAX } from 'src/utils/constants' const ALL_MACHINES = { @@ -445,9 +446,9 @@ const getListCommissionsSchema = () => { }) } -// const getTextStyle = (obj, isEditing) => { -// return { color: obj.default ? primaryColor : secondaryColorDark } -// } +const getTextStyle = (obj, isEditing) => { + return { color: obj.default ? primaryColor : secondaryColorDark } +} const commissionsList = (auxData, currency, auxElements) => { const getData = R.path(R.__, auxData) @@ -482,7 +483,7 @@ const getListCommissionsFields = (getData, currency, defaults) => { input: NumberInput, textAlign: 'right', suffix: '%', - // textStyle: obj => getTextStyle(obj), + textStyle: obj => getTextStyle(obj), inputProps: { decimalPlaces: 3 } @@ -496,7 +497,7 @@ const getListCommissionsFields = (getData, currency, defaults) => { textAlign: 'right', greenText: true, suffix: '%', - // textStyle: obj => getTextStyle(obj), + textStyle: obj => getTextStyle(obj), inputProps: { decimalPlaces: 3 } @@ -509,7 +510,7 @@ const getListCommissionsFields = (getData, currency, defaults) => { doubleHeader: 'Cash-in only', textAlign: 'right', suffix: currency, - // textStyle: obj => getTextStyle(obj), + textStyle: obj => getTextStyle(obj), inputProps: { decimalPlaces: 2 } @@ -522,7 +523,7 @@ const getListCommissionsFields = (getData, currency, defaults) => { doubleHeader: 'Cash-in only', textAlign: 'right', suffix: currency, - // textStyle: obj => getTextStyle(obj), + textStyle: obj => getTextStyle(obj), inputProps: { decimalPlaces: 2 }