Merge pull request #1753 from RafaelTaranto/backport/standadize-case

LAM-701 backport: standardize case
This commit is contained in:
Rafael Taranto 2024-11-28 08:42:48 +00:00 committed by GitHub
commit f54ec5a9d1
42 changed files with 111 additions and 103 deletions

View file

@ -9,7 +9,7 @@ import {
TDoubleLevelHead, TDoubleLevelHead,
ThDoubleLevel ThDoubleLevel
} from 'src/components/fake-table/Table' } from 'src/components/fake-table/Table'
import { startCase } from 'src/utils/string' import { sentenceCase } from 'src/utils/string'
import TableCtx from './Context' import TableCtx from './Context'
@ -99,7 +99,7 @@ const Header = () => {
<>{attachOrderedByToComplexHeader(header) ?? header}</> <>{attachOrderedByToComplexHeader(header) ?? header}</>
) : ( ) : (
<span className={orderClasses}> <span className={orderClasses}>
{!R.isNil(display) ? display : startCase(name)}{' '} {!R.isNil(display) ? display : sentenceCase(name)}{' '}
{!R.isNil(orderedBy) && R.equals(name, orderedBy.code) && '-'} {!R.isNil(orderedBy) && R.equals(name, orderedBy.code) && '-'}
</span> </span>
)} )}

View file

@ -187,7 +187,7 @@ const MachineActions = memo(({ machine, onActionSuccess }) => {
display: 'Restart services for' display: 'Restart services for'
}) })
}}> }}>
Restart Services Restart services
</ActionButton> </ActionButton>
{machine.model === 'aveiro' && ( {machine.model === 'aveiro' && (
<ActionButton <ActionButton

View file

@ -29,7 +29,7 @@ const useStyles = makeStyles(styles)
const MACHINE_OPTIONS = [{ code: 'all', display: 'All machines' }] const MACHINE_OPTIONS = [{ code: 'all', display: 'All machines' }]
const REPRESENTING_OPTIONS = [ const REPRESENTING_OPTIONS = [
{ code: 'overTime', display: 'Over time' }, { code: 'overTime', display: 'Over time' },
{ code: 'topMachines', display: 'Top Machines' }, { code: 'topMachines', display: 'Top machines' },
{ code: 'hourOfTheDay', display: 'Hour of the day' } { code: 'hourOfTheDay', display: 'Hour of the day' }
] ]
const PERIOD_OPTIONS = [ const PERIOD_OPTIONS = [

View file

@ -134,7 +134,7 @@ const WizardStep = ({
to zero. Make sure you physically put cash inside the cash to zero. Make sure you physically put cash inside the cash
cassettes to allow the machine to dispense it to your users. If cassettes to allow the machine to dispense it to your users. If
you already did, make sure you set the correct cash cassette bill you already did, make sure you set the correct cash cassette bill
count for this machine on your Cash Boxes & Cassettes tab under count for this machine on your Cash boxes & cassettes tab under
Maintenance. Maintenance.
</P> </P>
<Info2 className={classes.title}>Default Commissions</Info2> <Info2 className={classes.title}>Default Commissions</Info2>

View file

@ -37,7 +37,7 @@ const SHOW_ALL = {
const ORDER_OPTIONS = [ const ORDER_OPTIONS = [
{ {
code: 'machine', code: 'machine',
display: 'Machine Name' display: 'Machine name'
}, },
{ {
code: 'cryptoCurrencies', code: 'cryptoCurrencies',
@ -53,7 +53,7 @@ const ORDER_OPTIONS = [
}, },
{ {
code: 'fixedFee', code: 'fixedFee',
display: 'Fixed Fee' display: 'Fixed fee'
}, },
{ {
code: 'minimumTx', code: 'minimumTx',

View file

@ -245,7 +245,7 @@ const getSchema = locale => {
.max(percentMax) .max(percentMax)
.required(), .required(),
fixedFee: Yup.number() fixedFee: Yup.number()
.label('Fixed Fee') .label('Fixed fee')
.min(0) .min(0)
.max(highestBill) .max(highestBill)
.required(), .required(),
@ -326,7 +326,7 @@ const getOverridesSchema = (values, rawData, locale) => {
return true return true
} }
}) })
.label('Crypto Currencies') .label('Crypto currencies')
.required() .required()
.min(1), .min(1),
cashIn: Yup.number() cashIn: Yup.number()
@ -340,7 +340,7 @@ const getOverridesSchema = (values, rawData, locale) => {
.max(percentMax) .max(percentMax)
.required(), .required(),
fixedFee: Yup.number() fixedFee: Yup.number()
.label('Fixed Fee') .label('Fixed fee')
.min(0) .min(0)
.max(highestBill) .max(highestBill)
.required(), .required(),
@ -437,7 +437,7 @@ const getListCommissionsSchema = locale => {
.label('Machine') .label('Machine')
.required(), .required(),
cryptoCurrencies: Yup.array() cryptoCurrencies: Yup.array()
.label('Crypto Currency') .label('Crypto currency')
.required() .required()
.min(1), .min(1),
cashIn: Yup.number() cashIn: Yup.number()
@ -451,7 +451,7 @@ const getListCommissionsSchema = locale => {
.max(percentMax) .max(percentMax)
.required(), .required(),
fixedFee: Yup.number() fixedFee: Yup.number()
.label('Fixed Fee') .label('Fixed fee')
.min(0) .min(0)
.max(highestBill) .max(highestBill)
.required(), .required(),

View file

@ -36,7 +36,7 @@ const CustomersList = ({
view: getName view: getName
}, },
{ {
header: 'Total TXs', header: 'Total Txs',
width: 126, width: 126,
textAlign: 'right', textAlign: 'right',
view: it => `${Number.parseInt(it.totalTxs)}` view: it => `${Number.parseInt(it.totalTxs)}`

View file

@ -26,7 +26,7 @@ const CustomerSidebar = ({ isSelected, onClick }) => {
}, },
{ {
code: 'customerData', code: 'customerData',
display: 'Customer Data', display: 'Customer data',
Icon: CustomerDataIcon, Icon: CustomerDataIcon,
InverseIcon: CustomerDataReversedIcon InverseIcon: CustomerDataReversedIcon
}, },

View file

@ -32,7 +32,7 @@ const IdDataCard = memo(({ customerData, updateCustomer }) => {
size: 160 size: 160
}, },
{ {
header: 'Birth Date', header: 'Birth date',
display: display:
(rawDob && (rawDob &&
format('yyyy-MM-dd')(parse(new Date(), 'yyyyMMdd', rawDob))) ?? format('yyyy-MM-dd')(parse(new Date(), 'yyyyMMdd', rawDob))) ??
@ -61,7 +61,7 @@ const IdDataCard = memo(({ customerData, updateCustomer }) => {
size: 120 size: 120
}, },
{ {
header: 'Expiration Date', header: 'Expiration date',
display: ifNotNull( display: ifNotNull(
rawExpirationDate, rawExpirationDate,
format('yyyy-MM-dd', rawExpirationDate) format('yyyy-MM-dd', rawExpirationDate)

View file

@ -411,7 +411,7 @@ const customerDataElements = {
}, },
{ {
name: 'expirationDate', name: 'expirationDate',
label: 'Expiration Date', label: 'Expiration date',
component: TextInput, component: TextInput,
editable: true editable: true
}, },

View file

@ -164,7 +164,7 @@ const Funding = () => {
{funding.length && ( {funding.length && (
<div className={classes.total}> <div className={classes.total}>
<Label1 className={classes.totalTitle}> <Label1 className={classes.totalTitle}>
Total Crypto Balance Total crypto balance
</Label1> </Label1>
<Info1 noMargin> <Info1 noMargin>
{getConfirmedTotal(funding)} {getConfirmedTotal(funding)}

View file

@ -157,7 +157,7 @@ const LocaleSchema = Yup.object().shape({
.label('Country') .label('Country')
.required(), .required(),
fiatCurrency: Yup.string() fiatCurrency: Yup.string()
.label('Fiat Currency') .label('Fiat currency')
.required(), .required(),
languages: Yup.array() languages: Yup.array()
.label('Languages') .label('Languages')
@ -165,7 +165,7 @@ const LocaleSchema = Yup.object().shape({
.min(1) .min(1)
.max(4), .max(4),
cryptoCurrencies: Yup.array() cryptoCurrencies: Yup.array()
.label('Crypto Currencies') .label('Crypto currencies')
.required() .required()
.min(1), .min(1),
timezone: Yup.string() timezone: Yup.string()
@ -186,7 +186,7 @@ const OverridesSchema = Yup.object().shape({
.min(1) .min(1)
.max(4), .max(4),
cryptoCurrencies: Yup.array() cryptoCurrencies: Yup.array()
.label('Crypto Currencies') .label('Crypto currencies')
.required() .required()
.min(1) .min(1)
}) })

View file

@ -111,7 +111,7 @@ const Logs = () => {
<> <>
<div className={classes.titleWrapper}> <div className={classes.titleWrapper}>
<div className={classes.titleAndButtonsContainer}> <div className={classes.titleAndButtonsContainer}>
<Title>Machine Logs</Title> <Title>Machine logs</Title>
{logsResponse && ( {logsResponse && (
<div className={classes.buttonsWrapper}> <div className={classes.buttonsWrapper}>
<LogsDowloaderPopover <LogsDowloaderPopover

View file

@ -204,7 +204,7 @@ const CashCassettes = () => {
!dataLoading && ( !dataLoading && (
<> <>
<TitleSection <TitleSection
title="Cash Boxes & Cassettes" title="Cash boxes & cassettes"
buttons={[ buttons={[
{ {
text: 'Cash box history', text: 'Cash box history',

View file

@ -158,7 +158,7 @@ const CashboxHistory = ({ machines, currency, timezone }) => {
}, },
{ {
name: 'billCount', name: 'billCount',
header: 'Bill Count', header: 'Bill count',
width: 115, width: 115,
textAlign: 'left', textAlign: 'left',
input: NumberInput, input: NumberInput,

View file

@ -92,7 +92,7 @@ const MachineDetailsRow = ({ it: machine, onActionSuccess, timezone }) => {
<Item xs> <Item xs>
<Container className={classes.row}> <Container className={classes.row}>
<Item xs={2}> <Item xs={2}>
<Label>Machine Model</Label> <Label>Machine model</Label>
<span>{modelPrettifier[machine.model]}</span> <span>{modelPrettifier[machine.model]}</span>
</Item> </Item>
<Item xs={4}> <Item xs={4}>
@ -126,7 +126,7 @@ const MachineDetailsRow = ({ it: machine, onActionSuccess, timezone }) => {
</span> </span>
</Item> </Item>
<Item xs={2}> <Item xs={2}>
<Label>Packet Loss</Label> <Label>Packet loss</Label>
<span> <span>
{machine.packetLoss {machine.packetLoss
? new BigNumber(machine.packetLoss).toFixed(3).toString() + ? new BigNumber(machine.packetLoss).toFixed(3).toString() +

View file

@ -74,7 +74,7 @@ const MachineStatus = () => {
const elements = [ const elements = [
{ {
header: 'Machine Name', header: 'Machine name',
width: 250, width: 250,
size: 'sm', size: 'sm',
textAlign: 'left', textAlign: 'left',
@ -111,7 +111,7 @@ const MachineStatus = () => {
: 'unknown' : 'unknown'
}, },
{ {
header: 'Software Version', header: 'Software version',
width: 200, width: 200,
size: 'sm', size: 'sm',
textAlign: 'left', textAlign: 'left',
@ -134,7 +134,7 @@ const MachineStatus = () => {
<> <>
<div className={classes.titleWrapper}> <div className={classes.titleWrapper}>
<div className={classes.titleAndButtonsContainer}> <div className={classes.titleAndButtonsContainer}>
<Title>Machine Status</Title> <Title>Machine status</Title>
</div> </div>
<div className={classes.headerLabels}> <div className={classes.headerLabels}>
<div> <div>

View file

@ -32,7 +32,7 @@ const CryptoBalanceAlerts = ({ section, fieldWidth }) => {
section={section} section={section}
decoration={currency} decoration={currency}
className={classes.cryptoBalanceAlertsForm} className={classes.cryptoBalanceAlertsForm}
title="Default (Low Balance)" title="Default (Low balance)"
label="Alert me under" label="Alert me under"
editing={isEditing(LOW_BALANCE_KEY)} editing={isEditing(LOW_BALANCE_KEY)}
disabled={isDisabled(LOW_BALANCE_KEY)} disabled={isDisabled(LOW_BALANCE_KEY)}
@ -49,7 +49,7 @@ const CryptoBalanceAlerts = ({ section, fieldWidth }) => {
save={save} save={save}
decoration={currency} decoration={currency}
className={classes.cryptoBalanceAlertsSecondForm} className={classes.cryptoBalanceAlertsSecondForm}
title="Default (High Balance)" title="Default (High balance)"
label="Alert me over" label="Alert me over"
editing={isEditing(HIGH_BALANCE_KEY)} editing={isEditing(HIGH_BALANCE_KEY)}
disabled={isDisabled(HIGH_BALANCE_KEY)} disabled={isDisabled(HIGH_BALANCE_KEY)}

View file

@ -62,7 +62,7 @@ const CryptoBalanceOverrides = ({ section }) => {
.nullable() .nullable()
.required(), .required(),
[LOW_BALANCE_KEY]: Yup.number() [LOW_BALANCE_KEY]: Yup.number()
.label('Low Balance') .label('Low balance')
.when(HIGH_BALANCE_KEY, { .when(HIGH_BALANCE_KEY, {
is: HIGH_BALANCE_KEY => !HIGH_BALANCE_KEY, is: HIGH_BALANCE_KEY => !HIGH_BALANCE_KEY,
then: Yup.number().required() then: Yup.number().required()
@ -73,7 +73,7 @@ const CryptoBalanceOverrides = ({ section }) => {
.max(CURRENCY_MAX) .max(CURRENCY_MAX)
.nullable(), .nullable(),
[HIGH_BALANCE_KEY]: Yup.number() [HIGH_BALANCE_KEY]: Yup.number()
.label('High Balance') .label('High balance')
.when(LOW_BALANCE_KEY, { .when(LOW_BALANCE_KEY, {
is: LOW_BALANCE_KEY => !LOW_BALANCE_KEY, is: LOW_BALANCE_KEY => !LOW_BALANCE_KEY,
then: Yup.number().required() then: Yup.number().required()

View file

@ -12,7 +12,7 @@ import {
} from 'src/components/fake-table/Table' } from 'src/components/fake-table/Table'
import { Switch } from 'src/components/inputs' import { Switch } from 'src/components/inputs'
import { fromNamespace, toNamespace } from 'src/utils/config' import { fromNamespace, toNamespace } from 'src/utils/config'
import { startCase } from 'src/utils/string' import { sentenceCase } from 'src/utils/string'
import NotificationsCtx from '../NotificationsContext' import NotificationsCtx from '../NotificationsContext'
@ -62,7 +62,7 @@ const Row = ({
return ( return (
<Tr> <Tr>
<Td width={channelSize}> <Td width={channelSize}>
{shouldUpperCase ? R.toUpper(namespace) : startCase(namespace)} {shouldUpperCase ? R.toUpper(namespace) : sentenceCase(namespace)}
</Td> </Td>
<Cell name="balance" disabled={disabled} /> <Cell name="balance" disabled={disabled} />
<Cell name="transactions" disabled={disabled} /> <Cell name="transactions" disabled={disabled} />
@ -127,7 +127,7 @@ const Setup = ({ wizard, forceDisable }) => {
<Th width={channelSize - widthAdjust}>Channel</Th> <Th width={channelSize - widthAdjust}>Channel</Th>
{Object.keys(sizes).map(it => ( {Object.keys(sizes).map(it => (
<Th key={it} width={sizes[it] - widthAdjust} textAlign="center"> <Th key={it} width={sizes[it] - widthAdjust} textAlign="center">
{startCase(it)} {sentenceCase(it)}
</Th> </Th>
))} ))}
</THead> </THead>

View file

@ -136,7 +136,7 @@ const ContactInfo = ({ wizard }) => {
const fields = [ const fields = [
{ {
name: 'name', name: 'name',
label: 'Full name', label: 'Company name',
value: info.name ?? '', value: info.name ?? '',
component: TextInput component: TextInput
}, },
@ -160,7 +160,7 @@ const ContactInfo = ({ wizard }) => {
}, },
{ {
name: 'companyNumber', name: 'companyNumber',
label: 'Company number', label: 'Company registration number',
value: info.companyNumber ?? '', value: info.companyNumber ?? '',
component: TextInput component: TextInput
} }

View file

@ -109,7 +109,7 @@ const ReceiptPrinting = memo(({ wizard }) => {
}, },
{ {
name: 'companyNumber', name: 'companyNumber',
display: 'Company number' display: 'Company registration number'
}, },
{ {
name: 'machineLocation', name: 'machineLocation',

View file

@ -103,7 +103,7 @@ const Services = () => {
return ( return (
<div className={classes.wrapper}> <div className={classes.wrapper}>
<TitleSection title="3rd Party Services" /> <TitleSection title="Third-Party services" />
<Grid container spacing={4}> <Grid container spacing={4}>
{R.values(schemas).map(schema => ( {R.values(schemas).map(schema => (
<Grid item key={schema.code}> <Grid item key={schema.code}>

View file

@ -12,14 +12,14 @@ export default {
elements: [ elements: [
{ {
code: 'apiKey', code: 'apiKey',
display: 'API Key', display: 'API key',
component: TextInputFormik, component: TextInputFormik,
face: true, face: true,
long: true long: true
}, },
{ {
code: 'privateKey', code: 'privateKey',
display: 'Private Key', display: 'Private key',
component: SecretInputFormik component: SecretInputFormik
} }
], ],

View file

@ -12,14 +12,14 @@ export default {
elements: [ elements: [
{ {
code: 'apiKey', code: 'apiKey',
display: 'API Key', display: 'API key',
component: TextInputFormik, component: TextInputFormik,
face: true, face: true,
long: true long: true
}, },
{ {
code: 'privateKey', code: 'privateKey',
display: 'Private Key', display: 'Private key',
component: SecretInputFormik component: SecretInputFormik
} }
], ],

View file

@ -26,7 +26,7 @@ export default {
elements: [ elements: [
{ {
code: 'token', code: 'token',
display: 'API Token', display: 'API token',
component: TextInput, component: TextInput,
face: true, face: true,
long: true long: true
@ -47,52 +47,52 @@ export default {
}, },
{ {
code: 'BTCWalletId', code: 'BTCWalletId',
display: 'BTC Wallet ID', display: 'BTC wallet ID',
component: TextInput component: TextInput
}, },
{ {
code: 'BTCWalletPassphrase', code: 'BTCWalletPassphrase',
display: 'BTC Wallet Passphrase', display: 'BTC wallet passphrase',
component: SecretInput component: SecretInput
}, },
{ {
code: 'LTCWalletId', code: 'LTCWalletId',
display: 'LTC Wallet ID', display: 'LTC wallet ID',
component: TextInput component: TextInput
}, },
{ {
code: 'LTCWalletPassphrase', code: 'LTCWalletPassphrase',
display: 'LTC Wallet Passphrase', display: 'LTC wallet passphrase',
component: SecretInput component: SecretInput
}, },
{ {
code: 'ZECWalletId', code: 'ZECWalletId',
display: 'ZEC Wallet ID', display: 'ZEC wallet ID',
component: TextInput component: TextInput
}, },
{ {
code: 'ZECWalletPassphrase', code: 'ZECWalletPassphrase',
display: 'ZEC Wallet Passphrase', display: 'ZEC wallet passphrase',
component: SecretInput component: SecretInput
}, },
{ {
code: 'BCHWalletId', code: 'BCHWalletId',
display: 'BCH Wallet ID', display: 'BCH wallet ID',
component: TextInput component: TextInput
}, },
{ {
code: 'BCHWalletPassphrase', code: 'BCHWalletPassphrase',
display: 'BCH Wallet Passphrase', display: 'BCH wallet passphrase',
component: SecretInput component: SecretInput
}, },
{ {
code: 'DASHWalletId', code: 'DASHWalletId',
display: 'DASH Wallet ID', display: 'DASH wallet ID',
component: TextInput component: TextInput
}, },
{ {
code: 'DASHWalletPassphrase', code: 'DASHWalletPassphrase',
display: 'DASH Wallet Passphrase', display: 'DASH wallet passphrase',
component: SecretInput component: SecretInput
} }
], ],

View file

@ -19,14 +19,14 @@ export default {
}, },
{ {
code: 'key', code: 'key',
display: 'API Key', display: 'API key',
component: TextInputFormik, component: TextInputFormik,
face: true, face: true,
long: true long: true
}, },
{ {
code: 'secret', code: 'secret',
display: 'API Secret', display: 'API secret',
component: SecretInputFormik component: SecretInputFormik
} }
], ],

View file

@ -9,14 +9,14 @@ export default {
elements: [ elements: [
{ {
code: 'token', code: 'token',
display: 'API Token', display: 'API token',
component: TextInput, component: TextInput,
face: true, face: true,
long: true long: true
}, },
{ {
code: 'confidenceFactor', code: 'confidenceFactor',
display: 'Confidence Factor', display: 'Confidence factor',
component: NumberInput, component: NumberInput,
face: true face: true
}, },

View file

@ -12,14 +12,14 @@ export default {
elements: [ elements: [
{ {
code: 'apiKey', code: 'apiKey',
display: 'API Key', display: 'API key',
component: TextInputFormik, component: TextInputFormik,
face: true, face: true,
long: true long: true
}, },
{ {
code: 'privateKey', code: 'privateKey',
display: 'Private Key', display: 'Private key',
component: SecretInputFormik component: SecretInputFormik
} }
], ],

View file

@ -26,12 +26,12 @@ export default {
}, },
{ {
code: 'clientKey', code: 'clientKey',
display: 'Client Key', display: 'Client key',
component: TextInputFormik component: TextInputFormik
}, },
{ {
code: 'clientSecret', code: 'clientSecret',
display: 'Client Secret', display: 'Client secret',
component: SecretInputFormik component: SecretInputFormik
} }
], ],

View file

@ -12,14 +12,14 @@ export default {
elements: [ elements: [
{ {
code: 'apiKey', code: 'apiKey',
display: 'API Key', display: 'API key',
component: TextInputFormik, component: TextInputFormik,
face: true, face: true,
long: true long: true
}, },
{ {
code: 'privateKey', code: 'privateKey',
display: 'Private Key', display: 'Private key',
component: SecretInputFormik component: SecretInputFormik
} }
], ],

View file

@ -9,7 +9,7 @@ export default {
elements: [ elements: [
{ {
code: 'apiKey', code: 'apiKey',
display: 'API Key', display: 'API key',
component: TextInputFormik component: TextInputFormik
}, },
{ {
@ -19,13 +19,13 @@ export default {
}, },
{ {
code: 'fromEmail', code: 'fromEmail',
display: 'From Email', display: 'From email',
component: TextInputFormik, component: TextInputFormik,
face: true face: true
}, },
{ {
code: 'toEmail', code: 'toEmail',
display: 'To Email', display: 'To email',
component: TextInputFormik, component: TextInputFormik,
face: true face: true
} }

View file

@ -13,7 +13,7 @@ const singleBitgo = code => ({
elements: [ elements: [
{ {
code: 'token', code: 'token',
display: 'API Token', display: 'API token',
component: TextInput, component: TextInput,
face: true, face: true,
long: true long: true
@ -34,12 +34,12 @@ const singleBitgo = code => ({
}, },
{ {
code: `${code}WalletId`, code: `${code}WalletId`,
display: `${code} Wallet ID`, display: `${code} wallet ID`,
component: TextInput component: TextInput
}, },
{ {
code: `${code}WalletPassphrase`, code: `${code}WalletPassphrase`,
display: `${code} Wallet Passphrase`, display: `${code} wallet passphrase`,
component: SecretInput component: SecretInput
} }
], ],

View file

@ -17,18 +17,18 @@ export default {
}, },
{ {
code: 'authToken', code: 'authToken',
display: 'Auth Token', display: 'Auth token',
component: SecretInputFormik component: SecretInputFormik
}, },
{ {
code: 'fromNumber', code: 'fromNumber',
display: 'Twilio Number (international format)', display: 'Twilio number (international format)',
component: TextInputFormik, component: TextInputFormik,
face: true face: true
}, },
{ {
code: 'toNumber', code: 'toNumber',
display: 'Notifications Number (international format)', display: 'Notifications number (international format)',
component: TextInputFormik, component: TextInputFormik,
face: true face: true
} }

View file

@ -108,7 +108,7 @@ const SessionManagement = () => {
return ( return (
<> <>
<TitleSection title="Session Management" /> <TitleSection title="Session management" />
<DataTable <DataTable
loading={loading} loading={loading}
elements={elements} elements={elements}

View file

@ -323,7 +323,7 @@ const Transactions = () => {
loading={filtersLoading} loading={filtersLoading}
filters={filters} filters={filters}
options={filterOptions} options={filterOptions}
inputPlaceholder={'Search Transactions'} inputPlaceholder={'Search transactions'}
onChange={onFilterChange} onChange={onFilterChange}
/> />
</div> </div>

View file

@ -241,7 +241,7 @@ const Users = () => {
return ( return (
<> <>
<TitleSection title="User Management" /> <TitleSection title="User management" />
<Box <Box
marginBottom={3} marginBottom={3}
marginTop={-5} marginTop={-5}

View file

@ -115,7 +115,7 @@ const Wallet = ({ name: SCREEN_KEY }) => {
<> <>
<div className={classes.header}> <div className={classes.header}>
<TitleSection <TitleSection
title="Wallet Settings" title="Wallet settings"
buttons={[ buttons={[
{ {
text: 'Advanced settings', text: 'Advanced settings',

View file

@ -108,7 +108,7 @@ const getAdvancedWalletElements = () => {
}, },
{ {
name: 'allowTransactionBatching', name: 'allowTransactionBatching',
header: `Allow BTC Transaction Batching`, header: `Allow BTC transaction batching`,
size: 'sm', size: 'sm',
stripe: true, stripe: true,
width: 260, width: 260,
@ -119,7 +119,7 @@ const getAdvancedWalletElements = () => {
}, },
{ {
name: 'feeMultiplier', name: 'feeMultiplier',
header: `BTC Miner's Fee`, header: `BTC miner's fee`,
size: 'sm', size: 'sm',
stripe: true, stripe: true,
width: 250, width: 250,
@ -179,7 +179,7 @@ const getAdvancedWalletElementsOverrides = (
}, },
{ {
name: 'feeMultiplier', name: 'feeMultiplier',
header: `Miner's Fee`, header: `Miner's fee`,
size: 'sm', size: 'sm',
stripe: true, stripe: true,
width: 250, width: 250,
@ -280,7 +280,7 @@ const getElements = (cryptoCurrencies, accounts, onChange, wizard = false) => {
}, },
{ {
name: 'zeroConf', name: 'zeroConf',
header: 'Confidence Checking', header: 'Confidence checking',
size: 'sm', size: 'sm',
stripe: true, stripe: true,
view: (it, row) => { view: (it, row) => {
@ -304,7 +304,7 @@ const getElements = (cryptoCurrencies, accounts, onChange, wizard = false) => {
}, },
{ {
name: 'zeroConfLimit', name: 'zeroConfLimit',
header: '0-conf Limit', header: '0-conf limit',
size: 'sm', size: 'sm',
stripe: true, stripe: true,
view: (it, row) => view: (it, row) =>

View file

@ -49,7 +49,7 @@ const getLamassuRoutes = () => [
children: [ children: [
{ {
key: 'cash_units', key: 'cash_units',
label: 'Cash Units', label: 'Cash units',
route: '/maintenance/cash-units', route: '/maintenance/cash-units',
allowedRoles: [ROLES.USER, ROLES.SUPERUSER], allowedRoles: [ROLES.USER, ROLES.SUPERUSER],
component: CashUnits component: CashUnits
@ -63,14 +63,14 @@ const getLamassuRoutes = () => [
}, },
{ {
key: 'logs', key: 'logs',
label: 'Machine Logs', label: 'Machine logs',
route: '/maintenance/logs', route: '/maintenance/logs',
allowedRoles: [ROLES.USER, ROLES.SUPERUSER], allowedRoles: [ROLES.USER, ROLES.SUPERUSER],
component: MachineLogs component: MachineLogs
}, },
{ {
key: 'machine-status', key: 'machine-status',
label: 'Machine Status', label: 'Machine status',
route: '/maintenance/machine-status', route: '/maintenance/machine-status',
allowedRoles: [ROLES.USER, ROLES.SUPERUSER], allowedRoles: [ROLES.USER, ROLES.SUPERUSER],
component: MachineStatus component: MachineStatus
@ -130,7 +130,7 @@ const getLamassuRoutes = () => [
}, },
{ {
key: 'services', key: 'services',
label: '3rd Party Services', label: 'Third-party services',
route: '/settings/3rd-party-services', route: '/settings/3rd-party-services',
allowedRoles: [ROLES.USER, ROLES.SUPERUSER], allowedRoles: [ROLES.USER, ROLES.SUPERUSER],
component: Services component: Services
@ -144,9 +144,9 @@ const getLamassuRoutes = () => [
}, },
{ {
key: namespaces.OPERATOR_INFO, key: namespaces.OPERATOR_INFO,
label: 'Operator Info', label: 'Operator info',
route: '/settings/operator-info', route: '/settings/operator-info',
title: 'Operator Information', title: 'Operator information',
allowedRoles: [ROLES.USER, ROLES.SUPERUSER], allowedRoles: [ROLES.USER, ROLES.SUPERUSER],
get component() { get component() {
return () => ( return () => (
@ -232,7 +232,7 @@ const getLamassuRoutes = () => [
key: 'loyalty', key: 'loyalty',
label: 'Loyalty', label: 'Loyalty',
route: '/compliance/loyalty', route: '/compliance/loyalty',
title: 'Loyalty Panel', title: 'Loyalty panel',
allowedRoles: [ROLES.USER, ROLES.SUPERUSER], allowedRoles: [ROLES.USER, ROLES.SUPERUSER],
get component() { get component() {
return () => ( return () => (
@ -247,14 +247,14 @@ const getLamassuRoutes = () => [
children: [ children: [
{ {
key: 'individual-discounts', key: 'individual-discounts',
label: 'Individual Discounts', label: 'Individual discounts',
route: '/compliance/loyalty/individual-discounts', route: '/compliance/loyalty/individual-discounts',
allowedRoles: [ROLES.USER, ROLES.SUPERUSER], allowedRoles: [ROLES.USER, ROLES.SUPERUSER],
component: IndividualDiscounts component: IndividualDiscounts
}, },
{ {
key: 'promo-codes', key: 'promo-codes',
label: 'Promo Codes', label: 'Promo codes',
route: '/compliance/loyalty/codes', route: '/compliance/loyalty/codes',
allowedRoles: [ROLES.USER, ROLES.SUPERUSER], allowedRoles: [ROLES.USER, ROLES.SUPERUSER],
component: PromoCodes component: PromoCodes
@ -280,14 +280,14 @@ const getLamassuRoutes = () => [
children: [ children: [
{ {
key: 'user-management', key: 'user-management',
label: 'User Management', label: 'User management',
route: '/system/user-management', route: '/system/user-management',
allowedRoles: [ROLES.SUPERUSER], allowedRoles: [ROLES.SUPERUSER],
component: UserManagement component: UserManagement
}, },
{ {
key: 'session-management', key: 'session-management',
label: 'Session Management', label: 'Session management',
route: '/system/session-management', route: '/system/session-management',
allowedRoles: [ROLES.SUPERUSER], allowedRoles: [ROLES.SUPERUSER],
component: SessionManagement component: SessionManagement

View file

@ -56,14 +56,14 @@ const getPazuzRoutes = () => [
}, },
{ {
key: 'logs', key: 'logs',
label: 'Machine Logs', label: 'Machine logs',
route: '/maintenance/logs', route: '/maintenance/logs',
allowedRoles: [ROLES.USER, ROLES.SUPERUSER], allowedRoles: [ROLES.USER, ROLES.SUPERUSER],
component: MachineLogs component: MachineLogs
}, },
{ {
key: 'machine-status', key: 'machine-status',
label: 'Machine Status', label: 'Machine status',
route: '/maintenance/machine-status', route: '/maintenance/machine-status',
allowedRoles: [ROLES.USER, ROLES.SUPERUSER], allowedRoles: [ROLES.USER, ROLES.SUPERUSER],
component: MachineStatus component: MachineStatus
@ -123,9 +123,9 @@ const getPazuzRoutes = () => [
}, },
{ {
key: namespaces.OPERATOR_INFO, key: namespaces.OPERATOR_INFO,
label: 'Operator Info', label: 'Operator info',
route: '/settings/operator-info', route: '/settings/operator-info',
title: 'Operator Information', title: 'Operator information',
allowedRoles: [ROLES.USER, ROLES.SUPERUSER], allowedRoles: [ROLES.USER, ROLES.SUPERUSER],
get component() { get component() {
return () => ( return () => (
@ -225,14 +225,14 @@ const getPazuzRoutes = () => [
children: [ children: [
{ {
key: 'individual-discounts', key: 'individual-discounts',
label: 'Individual Discounts', label: 'Individual discounts',
route: '/compliance/loyalty/individual-discounts', route: '/compliance/loyalty/individual-discounts',
allowedRoles: [ROLES.USER, ROLES.SUPERUSER], allowedRoles: [ROLES.USER, ROLES.SUPERUSER],
component: IndividualDiscounts component: IndividualDiscounts
}, },
{ {
key: 'promo-codes', key: 'promo-codes',
label: 'Promo Codes', label: 'Promo codes',
route: '/compliance/loyalty/codes', route: '/compliance/loyalty/codes',
allowedRoles: [ROLES.USER, ROLES.SUPERUSER], allowedRoles: [ROLES.USER, ROLES.SUPERUSER],
component: PromoCodes component: PromoCodes
@ -290,14 +290,14 @@ const getPazuzRoutes = () => [
children: [ children: [
{ {
key: 'user-management', key: 'user-management',
label: 'User Management', label: 'User management',
route: '/system/user-management', route: '/system/user-management',
allowedRoles: [ROLES.SUPERUSER], allowedRoles: [ROLES.SUPERUSER],
component: UserManagement component: UserManagement
}, },
{ {
key: 'session-management', key: 'session-management',
label: 'Session Management', label: 'Session management',
route: '/system/session-management', route: '/system/session-management',
allowedRoles: [ROLES.SUPERUSER], allowedRoles: [ROLES.SUPERUSER],
component: SessionManagement component: SessionManagement

View file

@ -26,7 +26,15 @@ const startCase = R.compose(
splitOnUpper splitOnUpper
) )
const sentenceCase = R.compose(onlyFirstToUpper, S.joinWith(' '), splitOnUpper)
const singularOrPlural = (amount, singularStr, pluralStr) => const singularOrPlural = (amount, singularStr, pluralStr) =>
parseInt(amount) === 1 ? singularStr : pluralStr parseInt(amount) === 1 ? singularStr : pluralStr
export { startCase, onlyFirstToUpper, formatLong, singularOrPlural } export {
startCase,
onlyFirstToUpper,
formatLong,
singularOrPlural,
sentenceCase
}