Skip to content

Commit

Permalink
Merge c8d57ec into 12a4876
Browse files Browse the repository at this point in the history
  • Loading branch information
JackNeto committed Aug 9, 2019
2 parents 12a4876 + c8d57ec commit cc86e6d
Show file tree
Hide file tree
Showing 13 changed files with 449 additions and 441 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"lint": "eslint src --ext '.js,.jsx' --config .eslintrc",
"lint:fix": "npm run lint --fix",
"deploy:staging": "npm run build && aws s3 sync build/ s3://entaxy-staging",
"deploy:production": "npm run build && aws s3 sync build/ s3://entaxy-production",
"deploy:test": "npm run build && aws s3 sync build/ s3://entaxy-test"
},
"dependencies": {
Expand Down Expand Up @@ -102,4 +103,4 @@
"git add"
]
}
}
}
25 changes: 0 additions & 25 deletions src/common/Header/__tests__/__snapshots__/index.test.jsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -57,31 +57,6 @@ exports[`Header matches snapshot 1`] = `
Dashboard
</span>
</a>
<a
aria-disabled={false}
className="MuiButtonBase-root MuiButton-root MuiButton-text MuiButton-colorInherit"
href="/accounts"
onBlur={[Function]}
onClick={[Function]}
onDragLeave={[Function]}
onFocus={[Function]}
onKeyDown={[Function]}
onKeyUp={[Function]}
onMouseDown={[Function]}
onMouseLeave={[Function]}
onMouseUp={[Function]}
onTouchEnd={[Function]}
onTouchMove={[Function]}
onTouchStart={[Function]}
role="button"
tabIndex={0}
>
<span
className="MuiButton-label"
>
Accounts
</span>
</a>
<button
aria-owns={null}
className="MuiButtonBase-root MuiButton-root MuiButton-text MuiButton-colorInherit"
Expand Down
1 change: 0 additions & 1 deletion src/common/Header/__tests__/index.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import store from '../../../store'
import Header from '..'

jest.mock('../../LoginButton', () => 'LoginButton')
jest.mock('../../../core/Accounts', () => 'Accounts')

describe('Header', () => {
it('matches snapshot', () => {
Expand Down
6 changes: 0 additions & 6 deletions src/common/Header/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,6 @@ const Header = ({ children, match }) => {
>
Dashboard
</Button>
<Button
color={buttonColourFor(['/accounts', '/institutions'])}
component={LinkTo('/accounts')}
>
Accounts
</Button>
<Button
color={buttonColourFor('/budget')}
aria-owns={open ? 'budget-menu-list-grow' : null}
Expand Down
4 changes: 2 additions & 2 deletions src/common/ModalDialog/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import CloseIcon from '@material-ui/icons/Close'
import Typography from '@material-ui/core/Typography'

const styles = () => ({
formwrapper: {
formWrapper: {
marginLeft: 15,
marginRight: 15
},
Expand Down Expand Up @@ -48,7 +48,7 @@ const ModalDialog = ({
onClose={onCancel}
className={className}
>
<div className={classes.formwrapper}>
<div className={classes.formWrapper}>
<DialogTitle disableTypography className={classes.formHeader}>
<Typography variant="h6">{title}</Typography>
<IconButton aria-label="Close" onClick={onCancel} className={classes.closeButton}>
Expand Down
116 changes: 61 additions & 55 deletions src/core/Accounts/Transactions/TransactionDialog.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { withStyles } from '@material-ui/core/styles'
import { withFormik } from 'formik'
import * as Yup from 'yup'
import PropTypes from 'prop-types'
import Grid from '@material-ui/core/Grid'
import TextField from '@material-ui/core/TextField'
import format from 'date-fns/format'
import parse from 'date-fns/parse'
Expand All @@ -15,6 +16,7 @@ import { createTransaction, updateTransaction } from '../../../store/transaction

const styles = theme => ({
root: {
minWidth: 600
},
input: {
marginBottom: theme.spacing(1),
Expand Down Expand Up @@ -89,61 +91,65 @@ export const TransactionDialogComponent = ({
onCancel={onCancel}
className={classes.root}
>
<TextField
label="Description"
inputProps={{
'aria-label': 'Description',
maxLength: 256
}}
className={classes.input}
value={values.description}
name="description"
onChange={handleChange}
error={errors.description && touched.description}
helperText={errors.description}
/>
<AutoComplete
className={classes.input}
label="Category"
name="categoryId"
value={values.categoryId}
options={budget.categoryTree}
onChange={setFieldValue}
error={errors.categoryId && touched.categoryId}
helperText={errors.categoryId}
styles={colourStyles}
/>
<TextField
type="number"
label="Amount"
inputProps={{
'aria-label': 'Amount',
maxLength: 10,
min: Number.MIN_SAFE_INTEGER,
max: Number.MAX_SAFE_INTEGER,
step: 0.01
}}
className={classes.input}
value={values.amount}
name="amount"
onChange={handleChange}
error={errors.amount && touched.amount}
helperText={errors.amount}
/>
<TextField
type="date"
label="Date"
InputLabelProps={{
shrink: true,
'aria-label': 'Date'
}}
name="createdAt"
className={classes.input}
value={values.createdAt}
onChange={handleChange}
error={errors.createdAt && touched.createdAt}
helperText={errors.createdAt}
/>
<Grid container>
<Grid item xs={12}>
<TextField
label="Description"
inputProps={{
'aria-label': 'Description',
maxLength: 256
}}
className={classes.input}
value={values.description}
name="description"
onChange={handleChange}
error={errors.description && touched.description}
helperText={errors.description}
/>
<AutoComplete
className={classes.input}
label="Category"
name="categoryId"
value={values.categoryId}
options={budget.categoryTree}
onChange={setFieldValue}
error={errors.categoryId && touched.categoryId}
helperText={errors.categoryId}
styles={colourStyles}
/>
<TextField
type="number"
label="Amount"
inputProps={{
'aria-label': 'Amount',
maxLength: 10,
min: Number.MIN_SAFE_INTEGER,
max: Number.MAX_SAFE_INTEGER,
step: 0.01
}}
className={classes.input}
value={values.amount}
name="amount"
onChange={handleChange}
error={errors.amount && touched.amount}
helperText={errors.amount}
/>
<TextField
type="date"
label="Date"
InputLabelProps={{
shrink: true,
'aria-label': 'Date'
}}
name="createdAt"
className={classes.input}
value={values.createdAt}
onChange={handleChange}
error={errors.createdAt && touched.createdAt}
helperText={errors.createdAt}
/>
</Grid>
</Grid>
</ModalDialog>
)

Expand Down
Loading

0 comments on commit cc86e6d

Please sign in to comment.