Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Resolves #3847
Description
I have created seed data for the BroadcastAnnouncment model, one created from a super-admin for banks to be able to see and one created from banks for partners to be able to see. I have created 2 additional users and given them 2 different roles and then created seed data for the announcement.
Another solution is to not create 2 additional users and add specific roles to 2 existing random users and then create the seed data. Like this
u = random_record(User)
Please fell free to let me know if you prefer this solution or if you want to change the messages that banks and partners see to something else.
PS.
Sorry for the delay in this pull request,but faced some challenges in the past weeks in my area.
Type of change
How Has This Been Tested?
First, i run
bin/rails db:drop
Then
bin/rails db:setup
to seed with the new data in the seeds file.Also if you run a query in the rails console
BroadcastAnnouncement.all
you can see the screenshots, one for the banks and one for the partners.
Screenshots
Announcement for the Banks
Announcement for the partners