-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enabling notifications for adding, editing, and deleting a flyer (#118)
* Implemented getAllFlyerCategories and tests * update jest * update jest * implemented suggestions from zach, vin, and archit * got rid of ESLint comment * fixed names for tests * Added loops to test cases * Fixed test case to create flyers with the same category * Changed 'push' to 'concat' * Enabled notifications for adding, editing, and deleting a flyer - Created a function in NotificationRepo.ts called notifyFlyersForOrganization that takes in a flyerID and a title of the notification - the title of the notification should reflect the action performed (add, edit, delete) - This function is called in FlyerResolver.ts * Added more specific body text for updating flyers, removed notifyNewFlyers * Addressed Vin's Comments - used enums for action commparison instead of strings - used template strings instead of concat - added documentation for the various branches of the if statement in the notification for editing a flyer * Addressing Vin's Comments - changed nested if statements to a switch block - used proper capitlization for Enums * add num flyers for organizations * Changed edit and delete flyer notifications to only be sent to users who have flyers bookmarked - in UserRepo added getUsersBookmarkedFlyers to get a list of all the users that have the desired flyer bookmarked - in NotificationRepo, factored out a function titled notifyFlyersForBookmarks - in FlyerResolver, for edit/delete flyers notifyFlyersForBookmarks will be called instead of notifyFlyersForOrganizations * fixed specs for added functions * addressing vin's comments --------- Co-authored-by: Cindy <[email protected]> Co-authored-by: Vin Bui <[email protected]>
- Loading branch information
1 parent
8acc8fa
commit 6fe1c48
Showing
5 changed files
with
147 additions
and
5 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
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