Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
74 commits
Select commit Hold shift + click to select a range
ae3c5af
add create-react-app boilerplate
israelhenrique Apr 8, 2018
8ef189a
add eslint
israelhenrique Apr 8, 2018
21caf0b
fetch user list from api
israelhenrique Apr 8, 2018
fdaa3c9
add enzyme to test environment
israelhenrique Apr 10, 2018
b9bd479
add enzyme setup config
israelhenrique Apr 10, 2018
0fda16d
add UserData component
israelhenrique Apr 12, 2018
4f63913
add UserPanel component
israelhenrique Apr 13, 2018
0b0822a
add UserList component
israelhenrique Apr 13, 2018
a6dbf8c
add UserList to App
israelhenrique Apr 13, 2018
796818c
refactor UserData component
israelhenrique Apr 17, 2018
496a43e
improve UserData layout
israelhenrique Apr 17, 2018
ed2e5a4
refactor UserPanel component
israelhenrique Apr 17, 2018
6cf7291
add css
israelhenrique Apr 17, 2018
8a360f7
improve UserList layout
israelhenrique Apr 17, 2018
2a59b94
add PaymentButton to UserList
israelhenrique Apr 18, 2018
fd06389
refactor Button component
israelhenrique Apr 19, 2018
0ccb88f
add PaymentWindow component
israelhenrique Apr 19, 2018
8bf3e7c
add PaymentWindow behavior
israelhenrique Apr 21, 2018
e1a02ee
add payment request
israelhenrique Apr 21, 2018
e9226e9
add timestampToDate
israelhenrique Apr 22, 2018
6380921
add PaymentConfirmation component
israelhenrique Apr 22, 2018
7a36199
add ConfirmationWindow
israelhenrique Apr 22, 2018
42d6647
refactor PaymentWindow
israelhenrique Apr 22, 2018
8a964a8
add successful payment behavior
israelhenrique Apr 22, 2018
331e5bd
fetch users from API
israelhenrique Apr 23, 2018
0175fd1
improve PaymentWindow layout and behavior
israelhenrique Apr 23, 2018
1c37ac7
improve PaymentWindow and ConfirmationWindow layout
israelhenrique Apr 24, 2018
10c49eb
fix windows behaviors
israelhenrique Apr 24, 2018
0c45fe1
mock localStorage
israelhenrique Apr 25, 2018
62b8aa3
add credit card msg
israelhenrique Apr 25, 2018
ad98a37
add CreditCardForm component
israelhenrique Apr 25, 2018
f76284b
register credit card at localStorage
israelhenrique Apr 26, 2018
1e1c486
change card msg
israelhenrique Apr 26, 2018
672e0c1
lift up registerCard method and add registerd card to payments
israelhenrique Apr 26, 2018
cae2059
add CreditCardList component
israelhenrique Apr 27, 2018
759c225
add Roboto font
israelhenrique Apr 28, 2018
f1c3dbc
add Modal component
israelhenrique Apr 28, 2018
a6acfd7
refactor user list
israelhenrique Apr 28, 2018
2e3d79a
add font Nunito Sans
israelhenrique Apr 28, 2018
59c1d82
fix button margins
israelhenrique Apr 28, 2018
6d1c258
refactor PaymentWindow component
israelhenrique Apr 28, 2018
49b33c0
refactor UserList component
israelhenrique Apr 28, 2018
626581c
refactor App
israelhenrique Apr 28, 2018
c821cce
refactor test
israelhenrique Apr 28, 2018
7c8544e
refactor CreditCardForm component
israelhenrique Apr 30, 2018
d994834
refactor CreditCardList component
israelhenrique Apr 30, 2018
d29d68a
refactor modal routing
israelhenrique Apr 30, 2018
67dc10d
refactor ConfirmationWindow
israelhenrique Apr 30, 2018
3f94335
fix modal routing
israelhenrique Apr 30, 2018
4b5de03
add user list desktop layout
israelhenrique Apr 30, 2018
22b1f21
Merge pull request #1 from israelhenrique/refactor
israelhenrique Apr 30, 2018
983f745
add modal desktop layout
israelhenrique May 1, 2018
c8c3248
fix modal background
israelhenrique May 1, 2018
e0659da
adds desktop layout to payment window
israelhenrique May 1, 2018
0492559
add desktop layout to credit card form window
israelhenrique May 3, 2018
d4178d1
add desktop layout to credit card list
israelhenrique May 3, 2018
b683f49
remove useless images
israelhenrique May 3, 2018
649f05b
refactor credicard list
israelhenrique May 4, 2018
cd741c9
add desktop layout to recipe window
israelhenrique May 4, 2018
b7e8a5b
Merge pull request #2 from israelhenrique/desktop-layout
israelhenrique May 4, 2018
c243d81
fix responsiveness
israelhenrique May 4, 2018
58b515c
Merge pull request #3 from israelhenrique/fix/responsiveness
israelhenrique May 4, 2018
77348c0
add header
israelhenrique May 4, 2018
c19c95f
remove useless comments
israelhenrique May 4, 2018
0468251
fix scroll problem
israelhenrique May 4, 2018
e6a2295
fix some layout issues
israelhenrique May 7, 2018
448790d
add brl mask
israelhenrique May 7, 2018
a8251d3
add payment validation
israelhenrique May 7, 2018
22c61a1
refactor handleClick
israelhenrique May 7, 2018
bc2c32b
adds rejected payment screen
israelhenrique May 7, 2018
0365918
Update README.md
israelhenrique May 7, 2018
0f5faae
move css files to css folder
israelhenrique May 7, 2018
4aa9fbc
Merge branch 'master' of github.com:israelhenrique/trabalhe-conosco-f…
israelhenrique May 7, 2018
dbe5d8b
remove useless svg
israelhenrique May 7, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"extends": [
"react-app",
"plugin:import/errors",
"plugin:import/warnings",
"./config/eslint/detect-errors.js",
"./config/eslint/code-style.js",
]
}
21 changes: 21 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# See https://help.github.com/ignore-files/ for more about ignoring files.

# dependencies
/node_modules

# testing
/coverage

# production
/build

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
![PicPay](https://user-images.githubusercontent.com/1765696/26998603-711fcf30-4d5c-11e7-9281-0d9eb20337ad.png)

# Como rodar o projeto

Primeiro instale as dependencias:

`npm install`

Então execute o projeto:

`npm start`

# Teste Frontend

O teste deve ser feito para Web com layout responsivo e é uma simulação de envio de dinheiro para uma outra pessoa via cartão de crédito.
Expand Down
231 changes: 231 additions & 0 deletions config/eslint/code-style.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,231 @@
/* global module */

/*
* User experience rules (bug prevention) should be added as "error".
* Developer experience (code quality) rules should be added as "warn".
* PS.: this file works better after applying create-react-app eslint config
*/

module.exports = {
rules: {

// Enforce line breaks after opening and before closing array brackets
'array-bracket-newline': ['warn'],

// Disallow or enforce spaces inside of brackets
'array-bracket-spacing': ['warn', 'never'],

// Require space before/after arrow function’s arrow
'arrow-spacing': [
'warn', {
before: true,
after: true,
},
],

// Disallow or enforce spaces inside of blocks after opening block and before closing block
'block-spacing': ['warn', 'always'],

// Require Brace Style
'brace-style': ['warn', '1tbs', { allowSingleLine: true }],

// Require Camelcase
camelcase: ['warn', { properties: 'never' }],

// Require or disallow trailing commas
'comma-dangle': [
'warn', {
arrays: 'always-multiline',
objects: 'always-multiline',
imports: 'always-multiline',
exports: 'always-multiline',
functions: 'always-multiline',
},
],

// Enforces spacing around commas
'comma-spacing': ['warn', { before: false, after: true }],

// Require or disallow newline at the end of files
'eol-last': ['warn', 'always'],

// Require or disallow spacing between function identifiers and their invocations
'func-call-spacing': ['warn'],

// Enforce consistent line breaks inside function parentheses
// 'function-paren-newline': ["warn", "multiline"],

// Enforce consistent spacing around the asterisk in generator functions
'generator-star-spacing': ['warn'],

// Ensure consistent use of file extension within the import path
'import/extensions': ['warn', { js: 'never' }],

// Enforce consistent indentation
indent: ['warn', 2],

// Enforce the consistent use of either double or single quotes in JSX attributes
'jsx-quotes': ['warn', 'prefer-double'],

// Enforce consistent spacing between keys and values in object literal properties
'key-spacing': ['warn', { beforeColon: false, afterColon: true }],

// Enforce consistent spacing before and after keywords
'keyword-spacing': [
'warn', {
before: true,
after: true,
overrides: {
return: { after: true },
throw: { after: true },
case: { after: true },
},
},
],

// Enforce consistent linebreak style
// Ps.: disabling because we are not confident about how git manages line ending
'linebreak-style': ['warn', 'unix'],

// Require or disallow an empty line between class members
'lines-between-class-members': ['warn', 'always'],

// require a capital letter for constructors
'new-cap': [
'warn', {
newIsCap: true,
newIsCapExceptions: [],
capIsNew: false,
capIsNewExceptions: [],
},
],

// Disallow bitwise operators
// Ps.: this is generally a programming error.
'no-bitwise': ['error'],

// Disallow mixed spaces and tabs for indentation
'no-mixed-spaces-and-tabs': ['warn'],

// Disallow Use of Chained Assignment Expressions
'no-multi-assign': ['warn'],

// Disallow multiple empty lines
'no-multiple-empty-lines': ['warn', { max: 1 }],

// Enforce the location of single-line statements
'nonblock-statement-body-position': ['warn', 'beside', { overrides: {} }],

// Disallow all tabs
'no-tabs': ['warn'],

// Disallow trailing whitespace at the end of lines
'no-trailing-spaces': ['warn'],

// Disallow ternary operators when simpler alternatives exist
'no-unneeded-ternary': ['error', { defaultAssignment: false }],

// Enforce consistent spacing inside braces
'object-curly-spacing': ['warn', 'always'],

// Enforce consistent line breaks inside braces
'object-curly-newline': [
'warn', {
ObjectExpression: { minProperties: 4, multiline: true, consistent: true },
ObjectPattern: { minProperties: 4, multiline: true, consistent: true },
},
],

// Enforce placing object properties on separate lines
'object-property-newline': [
'warn', {
allowMultiplePropertiesPerLine: true,
},
],

// Enforce variables to be declared either together or separately in functions
'one-var': ['warn', { initialized: 'never' }],

// Require or disallow assignment operator shorthand where possible
'operator-assignment': ['warn', 'always'],

// Enforce consistent linebreak style for operators
'operator-linebreak': ['warn'],

// Require or disallow padding within blocks
'padded-blocks': ['warn', 'never'],

// Suggest using template literals instead of string concatenation
'prefer-template': ['warn'],

// Require quotes around object literal property names
'quote-props': ['warn', 'as-needed', { keywords: false, unnecessary: true, numbers: false }],

// Enforce the consistent use of either backticks, double, or single quotes
quotes: ['warn', 'single', { avoidEscape: true }],

// Validate closing bracket location in JSX
// 'react/jsx-closing-bracket-location': ['warn', 'line-aligned'],

// Configure the position of the first property
// 'react/jsx-first-prop-new-line': ['warn', 'multiline'],

// Validate props indentation in JSX
// 'react/jsx-indent-props': ['warn', 2],

// Validate JSX indentation
// 'react/jsx-indent': ['warn', 2],

// Prevent definitions of unused prop types
// 'react/no-unused-prop-types': ['warn'],

// Enforce spacing before and after semicolons
'semi-spacing': ['warn'],

// Enforce location of semicolons
'semi-style': ['warn', 'last'],

// Require or disallow semicolons instead of ASI
semi: ['warn', 'never'],

// Require Or Disallow Space Before Blocks
'space-before-blocks': ['warn'],

// Require or disallow a space before function parenthesis
'space-before-function-paren': [
'warn', {
anonymous: 'always',
named: 'never',
asyncArrow: 'always',
},
],

// Require or disallow spaces before/after unary operators
'space-unary-ops': [
'warn', {
words: true,
nonwords: false,
overrides: {
},
},
],

// Requires or disallows a whitespace (space or tab) beginning a comment
'spaced-comment': ['warn', 'always'],

// Disallow or enforce spaces inside of parentheses
'space-in-parens': ['warn', 'never'],

// Require spacing around infix operators
'space-infix-ops': ['warn'],

// Enforce spacing around colons of switch statements
'switch-colon-spacing': ['warn', { after: true, before: false }],

// Enforce Usage of Spacing in Template Strings
'template-curly-spacing': ['warn', 'never'],

// Require or disallow spacing between template tags and their literals
'template-tag-spacing': ['warn', 'always'],
},
}
Loading