-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Display my alerts #170
Display my alerts #170
Conversation
…into kw-my-alerts
src/services/activityReports.js
Outdated
[Op.and]: [ | ||
{ | ||
status: { | ||
[Op.ne]: 'approved', |
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.
Should approved reports be shown on the alerts? It seems like that would get pretty cluttered over time.
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.
True. No need to have approved reports.
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.
Hmm...Op.ne (not equal) should take care of not bringing in approved reports. Do you still see 'approved' in the alerts section?
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.
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.
|
||
const collaboratorsWithTags = collaborators.map((collaborator) => ( | ||
<Tag | ||
key={collaborator.fullName.slice(1, 13)} |
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.
Can we use collaborator.id
here?
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.
Changed.
<tr key={`my_alerts_${id}`}> | ||
<td> | ||
<Link | ||
to={`/activity-reports/${id}/activity-summary`} |
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.
If the /activity-summary
is removed the user will be redirected to the review
page if the report is not in draft mode (the report is waiting for approval or "Needs Action")
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.
Updated.
Yes, it blends a bit. Double checked the background color. It matches the design, but I'll run this by @arickalewis1 It also looks like |
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.
@dcmcand Good find! I changed the query condition.
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.
Looks good!
} | ||
|
||
MyAlerts.propTypes = { | ||
reports: PropTypes.node.isRequired, |
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.
I'm getting this in the console:
Warning: Failed prop type: Invalid prop
reportssupplied to
MyAlerts, expected a ReactNode
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.
Changed.
src/services/activityReports.js
Outdated
{ | ||
[Op.and]: [ | ||
{ | ||
status: { [Op.ne]: 'approved' }, |
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.
Do any of these status strings exist in a Constant? It'd be good to refer to the constants rather than hard coding in the query.
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.
Good catch!
Fixed.
Description of change
Displays alerts for managers, authors and collaborators. If there are no alerts, an empty area will be displayed with the text "You're all caught up" (per design).
How to test
Issue(s)
Checklist