-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Overview
We want employees to be able to go to iam.staff.library.ucdavis.edu, and opt in to being CCed on RTs submitted by all of their reports (not just their direct reports). By default, we will only CC someone's direct supervisor and their department head.
Schema Change
I foresee us having to store many random employee preferences, and not just RT preferences, so let's prepare for that. Make an employee metadata table similar to how wordpress does it, with column ids metadata_id, metadata_key, metadata_value, employee_id. This should be placed in a db-entrypoint file, and then can be executed with the psql command from the cli container, which has a db-entrypoint:/app-sql bind mount.
Employee Model Query
Make an option to include employee metadata on the getById method
This option should be OFF by default
And will need an updateMetadata(id, key, value, idType) method
Public API
The public api should have a corresponding url parameter. https://github.com/UCDavisLibrary/ucdlib-iam-support/blob/main/utils/api/routes/employees.js
Cork model
Will need new getMetadata and updateMetadata methods on the Employee Cork model
App Client
Will need a settings page for the user to control preferences.
- Create new page with title 'User Settings'
- Create a section for RT, and place checkbox for toggling all-reports notifications
- Wire up to cork model
- Place link to page next to the logout link in top-right of header