-
Notifications
You must be signed in to change notification settings - Fork 10
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
#167891584 Notifications for new travel request(email notification) #46
#167891584 Notifications for new travel request(email notification) #46
Conversation
96c1aa0
to
b795db5
Compare
dc9635b
to
4ff8048
Compare
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 noticed that the Reads
table contains read notifications. What if you added a field in the notifications table to handle that instead
module.exports = { | ||
up: (queryInterface, Sequelize) => { | ||
return queryInterface.createTable('Notifications', { | ||
id: { |
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.
Kindly add a field that contains the notification recipient like recipientId
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.
Thank you, Maxwell.
Who should be the recipient? I understand that at the present we do not have a department manager. Why do you think need we recipientId
in the Notification table? What if I want to send a notification to a group of users?
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.
The user the notification is meant for. I think it's needed so we can fetch all notifications belonging to a particular user
049f8f9
to
579dffd
Compare
…ure for new travel request - [x] Create Notifications model and migration - [x] Create Reads model and migration - [x] Create an HTML template for travel request email notification - [x] Create a function that finds all admins - [x] Build template with data - [x] Send email message to administrators - [x] Add notification data to the database [Finishes #167891584]
579dffd
to
362e094
Compare
What does this PR do?
Have an email notification sent to admin users when new travel request is initiated
Description of Task to be completed?
How should this be manually tested?
Unit test
git pull
git checkout ft-emailNotification-forNewTravelRequest-167891584
npm install
database_name
Unit test
git pull
git checkout ft-emailNotification-configOpt-endpoint-167891584
npm install
database_name
Development test with Postman
npm run devstart
/api/v1/trips
{ "type": "oneway", "from": "xxxxxxxxxxxxxxxxx", "departureDate": "2000-09-09", "reason": "Just wanna travel", "destination": { "to": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "accomodation": "xxxxxxxxxxxxxxxxxxxxxxxxxxxx" } }
What are the relevant pivotal tracker stories?
#167891584
Any background context you want to add?
Nil
Screenshots
Nil