fix: general screen fixes
This commit is contained in:
parent
ea53d782ad
commit
b07c0e180a
10 changed files with 32 additions and 226 deletions
|
|
@ -29,7 +29,7 @@ const AutocompleteFormik = ({ options, ...props }) => {
|
||||||
error={error}
|
error={error}
|
||||||
open={open}
|
open={open}
|
||||||
options={innerOptions}
|
options={innerOptions}
|
||||||
onOpen={() => setOpen(value.length !== props.limit)}
|
onOpen={() => setOpen(value?.length !== props?.limit)}
|
||||||
onClose={() => setOpen(false)}
|
onClose={() => setOpen(false)}
|
||||||
{...props}
|
{...props}
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
|
|
@ -1,94 +0,0 @@
|
||||||
import { makeStyles } from '@material-ui/core'
|
|
||||||
import React, { useState } from 'react'
|
|
||||||
|
|
||||||
import { Button } from 'src/components/buttons'
|
|
||||||
import { ReactComponent as CompleteIcon } from 'src/styling/icons/stage/spring/complete.svg'
|
|
||||||
import { ReactComponent as CurrentIcon } from 'src/styling/icons/stage/spring/current.svg'
|
|
||||||
import { ReactComponent as EmptyIcon } from 'src/styling/icons/stage/spring/empty.svg'
|
|
||||||
|
|
||||||
import { mainStyles } from './Wizard.styles'
|
|
||||||
|
|
||||||
const useStyles = makeStyles(mainStyles)
|
|
||||||
|
|
||||||
const Wizard = ({ header, nextStepText, finalStepText, finish, children }) => {
|
|
||||||
const [currentStepIndex, setCurrentStepIndex] = useState(0)
|
|
||||||
|
|
||||||
const classes = useStyles()
|
|
||||||
|
|
||||||
const handleMoveToNextStep = nextStepIndex => {
|
|
||||||
const finalStepIndex = children.length - 1
|
|
||||||
|
|
||||||
if (nextStepIndex > finalStepIndex) {
|
|
||||||
finish()
|
|
||||||
} else {
|
|
||||||
setCurrentStepIndex(nextStepIndex)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const currentStep = children[currentStepIndex]
|
|
||||||
const finalStepIndex = children.length - 1
|
|
||||||
const isFinalStep = currentStepIndex === finalStepIndex
|
|
||||||
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<div>{header}</div>
|
|
||||||
<div className={classes.body}>
|
|
||||||
<div className={classes.columnWrapper}>
|
|
||||||
{/* TODO: wizard steps icons are a little strange... */}
|
|
||||||
<div className={classes.wizardStepsWrapper}>
|
|
||||||
{children.map((e, i) => {
|
|
||||||
const elementToRender = []
|
|
||||||
|
|
||||||
if (i < currentStepIndex)
|
|
||||||
elementToRender.push(
|
|
||||||
<CompleteIcon
|
|
||||||
key={elementToRender.length}
|
|
||||||
className={classes.wizardStepIcon}
|
|
||||||
/>
|
|
||||||
)
|
|
||||||
else if (i === currentStepIndex)
|
|
||||||
elementToRender.push(
|
|
||||||
<CurrentIcon
|
|
||||||
key={elementToRender.length}
|
|
||||||
className={classes.wizardStepIcon}
|
|
||||||
/>
|
|
||||||
)
|
|
||||||
else
|
|
||||||
elementToRender.push(
|
|
||||||
<EmptyIcon
|
|
||||||
key={elementToRender.length}
|
|
||||||
className={classes.wizardStepIcon}
|
|
||||||
/>
|
|
||||||
)
|
|
||||||
|
|
||||||
if (i < currentStepIndex)
|
|
||||||
elementToRender.push(
|
|
||||||
<div
|
|
||||||
className={classes.reachedStepLine}
|
|
||||||
key={elementToRender.length}
|
|
||||||
/>
|
|
||||||
)
|
|
||||||
else if (i < finalStepIndex)
|
|
||||||
elementToRender.push(
|
|
||||||
<div
|
|
||||||
className={classes.unreachedStepLine}
|
|
||||||
key={elementToRender.length}
|
|
||||||
/>
|
|
||||||
)
|
|
||||||
|
|
||||||
return elementToRender
|
|
||||||
})}
|
|
||||||
</div>
|
|
||||||
{currentStep}
|
|
||||||
<div className={classes.bottomRightAligned}>
|
|
||||||
<Button onClick={() => handleMoveToNextStep(currentStepIndex + 1)}>
|
|
||||||
{isFinalStep ? finalStepText : nextStepText}
|
|
||||||
</Button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
export default Wizard
|
|
||||||
|
|
@ -1,41 +0,0 @@
|
||||||
import { disabledColor, secondaryColor } from 'src/styling/variables'
|
|
||||||
|
|
||||||
const mainStyles = {
|
|
||||||
columnWrapper: {
|
|
||||||
display: 'flex',
|
|
||||||
flexDirection: 'column',
|
|
||||||
height: '100%',
|
|
||||||
width: '100%'
|
|
||||||
},
|
|
||||||
bottomRightAligned: {
|
|
||||||
alignSelf: 'flex-end',
|
|
||||||
marginLeft: 'auto',
|
|
||||||
marginTop: 'auto'
|
|
||||||
},
|
|
||||||
body: {
|
|
||||||
display: 'flex',
|
|
||||||
height: '100%'
|
|
||||||
},
|
|
||||||
wizardStepsWrapper: {
|
|
||||||
display: 'flex',
|
|
||||||
alignItems: 'center',
|
|
||||||
position: 'relative',
|
|
||||||
flex: 'wrap'
|
|
||||||
},
|
|
||||||
wizardStepIcon: {
|
|
||||||
width: 24,
|
|
||||||
height: 24
|
|
||||||
},
|
|
||||||
unreachedStepLine: {
|
|
||||||
width: 24,
|
|
||||||
height: 2,
|
|
||||||
border: `solid 1px ${disabledColor}`
|
|
||||||
},
|
|
||||||
reachedStepLine: {
|
|
||||||
width: 24,
|
|
||||||
height: 2,
|
|
||||||
border: `solid 1px ${secondaryColor}`
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export { mainStyles }
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
import Wizard from './Wizard'
|
|
||||||
|
|
||||||
export { Wizard }
|
|
||||||
|
|
@ -44,6 +44,7 @@ const TransactionsList = ({ data }) => {
|
||||||
{
|
{
|
||||||
header: 'Cash',
|
header: 'Cash',
|
||||||
width: 146,
|
width: 146,
|
||||||
|
textAlign: 'right',
|
||||||
view: it => (
|
view: it => (
|
||||||
<>
|
<>
|
||||||
{`${Number.parseFloat(it.fiat)} `}
|
{`${Number.parseFloat(it.fiat)} `}
|
||||||
|
|
@ -54,6 +55,7 @@ const TransactionsList = ({ data }) => {
|
||||||
{
|
{
|
||||||
header: 'Crypto',
|
header: 'Crypto',
|
||||||
width: 142,
|
width: 142,
|
||||||
|
textAlign: 'right',
|
||||||
view: it => (
|
view: it => (
|
||||||
<>
|
<>
|
||||||
{`${toUnit(new BigNumber(it.cryptoAtoms), it.cryptoCode).toFormat(
|
{`${toUnit(new BigNumber(it.cryptoAtoms), it.cryptoCode).toFormat(
|
||||||
|
|
|
||||||
|
|
@ -78,7 +78,6 @@ const Cashboxes = () => {
|
||||||
name: 'name',
|
name: 'name',
|
||||||
header: 'Machine',
|
header: 'Machine',
|
||||||
width: 254,
|
width: 254,
|
||||||
textAlign: 'left',
|
|
||||||
view: name => <>{name}</>,
|
view: name => <>{name}</>,
|
||||||
input: ({ field: { value: name } }) => <>{name}</>
|
input: ({ field: { value: name } }) => <>{name}</>
|
||||||
},
|
},
|
||||||
|
|
@ -86,7 +85,7 @@ const Cashboxes = () => {
|
||||||
name: 'cassette1',
|
name: 'cassette1',
|
||||||
header: 'Cash-out 1',
|
header: 'Cash-out 1',
|
||||||
width: 265,
|
width: 265,
|
||||||
textAlign: 'left',
|
textAlign: 'right',
|
||||||
input: NumberInput,
|
input: NumberInput,
|
||||||
inputProps: {
|
inputProps: {
|
||||||
decimalPlaces: 0
|
decimalPlaces: 0
|
||||||
|
|
@ -96,7 +95,7 @@ const Cashboxes = () => {
|
||||||
name: 'cassette2',
|
name: 'cassette2',
|
||||||
header: 'Cash-out 2',
|
header: 'Cash-out 2',
|
||||||
width: 265,
|
width: 265,
|
||||||
textAlign: 'left',
|
textAlign: 'right',
|
||||||
input: NumberInput,
|
input: NumberInput,
|
||||||
inputProps: {
|
inputProps: {
|
||||||
decimalPlaces: 0
|
decimalPlaces: 0
|
||||||
|
|
|
||||||
|
|
@ -166,6 +166,7 @@ const ContactInfo = () => {
|
||||||
name: 'phone',
|
name: 'phone',
|
||||||
label: 'Phone number',
|
label: 'Phone number',
|
||||||
value:
|
value:
|
||||||
|
info.phone &&
|
||||||
parsePhoneNumberFromString(
|
parsePhoneNumberFromString(
|
||||||
info.phone,
|
info.phone,
|
||||||
locale.country
|
locale.country
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@ import infura from './infura'
|
||||||
import itbit from './itbit'
|
import itbit from './itbit'
|
||||||
import kraken from './kraken'
|
import kraken from './kraken'
|
||||||
import mailgun from './mailgun'
|
import mailgun from './mailgun'
|
||||||
import strike from './strike'
|
|
||||||
import twilio from './twilio'
|
import twilio from './twilio'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|
@ -16,6 +15,5 @@ export default {
|
||||||
[itbit.code]: itbit,
|
[itbit.code]: itbit,
|
||||||
[kraken.code]: kraken,
|
[kraken.code]: kraken,
|
||||||
[mailgun.code]: mailgun,
|
[mailgun.code]: mailgun,
|
||||||
[strike.code]: strike,
|
|
||||||
[twilio.code]: twilio
|
[twilio.code]: twilio
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,23 +0,0 @@
|
||||||
import * as Yup from 'yup'
|
|
||||||
|
|
||||||
import TextInputFormik from 'src/components/inputs/formik/TextInput'
|
|
||||||
|
|
||||||
export default {
|
|
||||||
code: 'strike',
|
|
||||||
name: 'Strike',
|
|
||||||
title: 'Strike (Lightning Payments)',
|
|
||||||
elements: [
|
|
||||||
{
|
|
||||||
code: 'token',
|
|
||||||
display: 'API Token',
|
|
||||||
component: TextInputFormik,
|
|
||||||
face: true,
|
|
||||||
long: true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
validationSchema: Yup.object().shape({
|
|
||||||
token: Yup.string()
|
|
||||||
.max(100, 'Too long')
|
|
||||||
.required('Required')
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
@ -1,81 +1,48 @@
|
||||||
Overall:
|
Overall:
|
||||||
- caching the page
|
- caching the page
|
||||||
- validation is bad rn, negatives being allowed
|
- transitions
|
||||||
- right aligned numbers on all tables
|
- error handling
|
||||||
- locale based mil separators 1.000 1,000
|
- validation is bad rn, negatives being allowed
|
||||||
|
- locale based mil separators 1.000 1,000
|
||||||
Cashboxes:
|
- Table should be loaded on slow internet (we want to load the table with no data)
|
||||||
- right aligned number
|
- font sizes could be better
|
||||||
|
- tooltip like components should close on esc
|
||||||
|
- saving should be a one time thing. disable buttons so user doesnt spam it
|
||||||
|
- disable edit on non-everrides => overrides
|
||||||
|
- splash screens and home
|
||||||
|
- maybe a indication that there's more to search on dropdown
|
||||||
|
- required signifier on form fields - (required) or *
|
||||||
|
- stop line breaking on multi select
|
||||||
|
- input width should be enough to hold values without cutting text
|
||||||
|
|
||||||
Locale:
|
Locale:
|
||||||
- Only allow one override per machine
|
- Only allow one override per machine
|
||||||
|
|
||||||
Notifications:
|
Notifications:
|
||||||
- one of the crypto balance alerts has to be optional because of migration
|
- one of the crypto balance alerts has to be optional because of migration
|
||||||
|
|
||||||
UI:
|
|
||||||
- tooltip like components should close on esc
|
|
||||||
- saving should be a one time thing. disable buttons so user doesnt spam it
|
|
||||||
- transitions
|
|
||||||
- error handling
|
|
||||||
- select components
|
|
||||||
- talk with nunu + neal: Hover css for edit buttons + first first cancel later
|
|
||||||
- disable edit on non-everrides => overrides
|
|
||||||
- splash screens and home
|
|
||||||
- maybe a indication that there's more to search on dropdown
|
|
||||||
- required signifier on form fields - (required) or *
|
|
||||||
- USD should show as a suffix (validate all screens)
|
|
||||||
- stop line breaking on multi select
|
|
||||||
- input width should be enough to hold values without cutting text
|
|
||||||
- font sizes could be better
|
|
||||||
- min height in virtualized table (rows get hidden if not enough height in browser)
|
|
||||||
|
|
||||||
Machine status:
|
Machine status:
|
||||||
- font-size of the 'write to confirm'
|
- font-size of the 'write to confirm'
|
||||||
|
|
||||||
Migrate:
|
|
||||||
- Need to write config migration.
|
|
||||||
- Rewrite config validate
|
|
||||||
- remove apply defaults
|
|
||||||
|
|
||||||
Cash out:
|
|
||||||
- ask nuno about zero conf limit
|
|
||||||
|
|
||||||
Server:
|
Server:
|
||||||
- Takes too long to load. Investigate
|
- Takes too long to load. Investigate
|
||||||
|
|
||||||
Review slow internet loading:
|
|
||||||
- Table should be loaded (we want to load the table with no data)
|
|
||||||
|
|
||||||
3rd party services:
|
|
||||||
- remove strike
|
|
||||||
- ask neal anyone uses itbit
|
|
||||||
|
|
||||||
Wallet:
|
|
||||||
- ask neal and nuno how to handle unconfigured third party services on the table edit
|
|
||||||
|
|
||||||
Operator Info:
|
Operator Info:
|
||||||
- That should be paginated with routes!
|
- That should be paginated with routes!
|
||||||
|
|
||||||
CoinATMRadar:
|
CoinATMRadar:
|
||||||
- relay facephoto info
|
- relay facephoto info
|
||||||
- we should show the highest amount that requires a requirement
|
- we should show the highest amount that per requirement
|
||||||
|
|
||||||
Customers:
|
Customers:
|
||||||
- add status
|
- add status
|
||||||
- cash-in cash-out are reversed
|
|
||||||
|
|
||||||
Sms/email:
|
|
||||||
- There's no place to pick a third party provider anymore. (sms.js, email.js) neal + nuno
|
|
||||||
|
|
||||||
Machine name:
|
Machine name:
|
||||||
- update the db with whatever name is on the old config
|
- update the db with whatever name is on the old config (check 1509439657189-add_machine_name_to_devices)
|
||||||
- where to change name of the mahcines NUNO + NEAL
|
|
||||||
|
|
||||||
Compliance:
|
Compliance:
|
||||||
- Reject Address Reuse missing (MAKE BLACKLIST SCREEN AND PUT IT THERE)
|
- Currently admin only handles { type: 'amount', direction: 'both' }
|
||||||
- Currently admin only handles { type: 'amount', direction: 'both' }
|
- Sanctions should have more care in customers.js, currently just looking if is active as if old config
|
||||||
- Sanctions should have more care in customers.js, currently just looking if is active as if old config
|
|
||||||
|
|
||||||
Ideas
|
Ideas
|
||||||
- Transactions could have a link to the customer
|
- Transactions could have a link to the customer
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue