-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #296 from Jozian/develop_send_email_on_field_change
Send email alerts on certain field changes.
- Loading branch information
Showing
40 changed files
with
726 additions
and
69 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
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
24 changes: 24 additions & 0 deletions
24
app/javascript/components/internal-alert/components/dismiss-button/component.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,24 @@ | ||
import { IconButton } from "@material-ui/core"; | ||
import CloseIcon from "@material-ui/icons/Close"; | ||
import PropTypes from "prop-types"; | ||
|
||
import css from "./styles.css"; | ||
|
||
const Component = ({ handler }) => { | ||
const handlerWrapper = event => { | ||
event.stopPropagation(); | ||
handler(); | ||
}; | ||
|
||
return ( | ||
<IconButton className={css.dismissButton} onClick={handlerWrapper}> | ||
<CloseIcon /> | ||
</IconButton> | ||
); | ||
}; | ||
|
||
Component.displayName = "InternalAlertDismissButton"; | ||
Component.propTypes = { | ||
handler: PropTypes.func.isRequired | ||
}; | ||
export default Component; |
1 change: 1 addition & 0 deletions
1
app/javascript/components/internal-alert/components/dismiss-button/index.js
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 @@ | ||
export { default } from "./component"; |
3 changes: 3 additions & 0 deletions
3
app/javascript/components/internal-alert/components/dismiss-button/styles.css
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,3 @@ | ||
.dismissButton { | ||
pointer-events: auto; | ||
} |
21 changes: 21 additions & 0 deletions
21
app/javascript/components/internal-alert/components/item/component.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,21 @@ | ||
import PropTypes from "prop-types"; | ||
|
||
import InternalAlertDismissButton from "../dismiss-button"; | ||
|
||
import css from "./styles.css"; | ||
|
||
const Component = ({ item }) => { | ||
return ( | ||
<div className={css.alertItemElement}> | ||
<span>{item.get("message")}</span> | ||
{item.get("onDismiss") && InternalAlertDismissButton({ handler: item.get("onDismiss") })} | ||
</div> | ||
); | ||
}; | ||
|
||
Component.displayName = "InternalAlertItem"; | ||
Component.propTypes = { | ||
item: PropTypes.object.isRequired | ||
}; | ||
|
||
export default Component; |
1 change: 1 addition & 0 deletions
1
app/javascript/components/internal-alert/components/item/index.js
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 @@ | ||
export { default } from "./component"; |
7 changes: 7 additions & 0 deletions
7
app/javascript/components/internal-alert/components/item/styles.css
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,7 @@ | ||
.alertItemElement { | ||
display: flex; | ||
flex-wrap: nowrap; | ||
align-items: center; | ||
justify-content: space-between; | ||
flex-grow: 1; | ||
} |
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
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
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
Oops, something went wrong.