Open mikeymicrophone opened 5 years ago
The note can have a type, probably stored by enum, and rich text. Markdown can be used, or Active Text with Trix could be used if compatible with our Rails 5.2 app.
Rather than using the admin flag as the condition for who can write and read these notes, we should add a grants table to interact with cancancan
.
A senior agent can add a note to a deal. Any agents working on the deal can see those notes. They should know which ones they have already seen. They should have the option to receive email or sms when a note is added. This can also be conditioned on what the status of the deal is. For example, while a deal is 'preliminary' and the agent is out with the client, they'll receive SMS. While the deal is 'pending', they'd receive email. When the deal is 'closed' they might not need any notification besides a new-note indicator in the Commissulator interface.
https://github.com/rails/actiontext/ can be used with Edge Rails. I don't know if it can be added to Rails 5. It might also require webpacker https://medium.com/@coorasse/goodbye-sprockets-welcome-webpacker-3-0-ff877fb8fa79
An admin can view all their agents, and some details about their deals and payouts. They should be able to write a note about the agent's performance, and view how much the agent earned in the last month.