-
Notifications
You must be signed in to change notification settings - Fork 0
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
Feature/favorite max notification TM-1618 #819
Conversation
Note: deleted duplicate branch that I had unnecessarily branched off of Elizabeth's pagination PR |
src/Constants/SystemMessages.js
Outdated
@@ -51,6 +51,7 @@ export const DELETE_FAVORITE_SUCCESS = (pos, onToggle) => RemoveSuccess({ pos, o | |||
export const DELETE_FAVORITE_ERROR = () => "We're experiencing an error attempting to remove this position from your Favorites. Please try again."; | |||
export const ADD_FAVORITE_SUCCESS = pos => FavoriteSuccess({ pos }); | |||
export const ADD_FAVORITE_ERROR = () => "We're experiencing an error attempting to add this position to your Favorites. Please try again."; | |||
export const ADD_FAVORITE_LIMIT_ERROR = 'You have reached the favorites limit of 250. Please remove a favorite and try again.'; |
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 have the API own and send back the limit number? Then the front-end doesn't need to be a source of truth and would reduce any back and forth changes should we decide to change the limit.
Discussed in Slack, just putting here for consistency: Custom Toast notification for AP vs PV. Ex: You have reached favorites limit of 250 for Open Positions. Please remove an Open Positions favorite and try again. |
…MetaPhase-Consulting/State-TalentMAP into feature/favoriteMaxNotification
src/actions/userProfile.js
Outdated
if (remove) { | ||
message = SystemMessages.DELETE_FAVORITE_ERROR(); | ||
} else if (response.status === 507 && isPV) { | ||
message = SystemMessages.ADD_FAVORITE_LIMIT_ERROR_PV(limit); | ||
} else if (response.status === 507) { | ||
message = SystemMessages.ADD_FAVORITE_LIMIT_ERROR_AP(limit); | ||
} else { | ||
message = SystemMessages.ADD_FAVORITE_ERROR(); | ||
} |
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.
👍
Depends on: MetaPhase-Consulting/State-TalentMAP-API#367