-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Employers Bank accounts
- Loading branch information
Showing
14 changed files
with
284 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
src/js/components/bankaccount-card/BankAccountExtendedCard.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import './style.scss'; | ||
import React from "react"; | ||
import PropTypes from 'prop-types'; | ||
import deleteIcon from "../../../img/icons/delete.png"; | ||
|
||
const BankAccountExtendedCard = ({ | ||
account, | ||
onDelete, | ||
}) => { | ||
return ( | ||
<tr> | ||
<td> | ||
<b>{account.institution_name}</b> | ||
</td> | ||
<td> | ||
<b>{account.name}</b> | ||
</td> | ||
<td> | ||
<img | ||
onClick={() => onDelete(account)} | ||
src={deleteIcon} | ||
className={"delete-icon"} | ||
/> | ||
</td> | ||
</tr>); | ||
}; | ||
BankAccountExtendedCard.propTypes = { | ||
account: PropTypes.object.isRequired, | ||
onDelete: PropTypes.func | ||
}; | ||
BankAccountExtendedCard.defaultProps = { | ||
account: {}, | ||
onDelete: null, | ||
}; | ||
|
||
export default BankAccountExtendedCard; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
@import '../theme/style.scss'; | ||
.delete-icon{ | ||
width: 15px; | ||
cursor: pointer; | ||
} | ||
.b{ | ||
word-wrap: break-word; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { snakeCase } from 'snake-case'; | ||
|
||
export const normalizeToSnakeCase = (map) => { | ||
const entries = Object.entries(map); | ||
const newMap = {}; | ||
entries.forEach(([key, value]) => { | ||
newMap[snakeCase(key)] = value; | ||
}); | ||
return newMap; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
65323fa
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Deployment failed with the following error: