codeforpdx / PASS

PASS project - with HMIS module integration
MIT License
26 stars 25 forks source link

Enhancement: Add "Message" action to contacts list #414

Closed timbot1789 closed 8 months ago

timbot1789 commented 10 months ago

Currently, the contacts list only has a few actions: go to pod, pin contact, and delete

image

Another useful action to have on this table would be to message the client. Add a button to each contact in this list that launches the "send message" modal when clicked, that prepopulates the "to" field with the webId of the contact.

andycwilliams commented 10 months ago

Since I'm already working on #343 I can just pick this one up too. I think it'd be easier that way.

andycwilliams commented 10 months ago

So I added the modal and now am setting it up to populate the To: field. What is the most efficient way to do this? Would it be to utilize the oldMessage parameter (I'm guessing via message.recipientPodUrl in the new message modal)?

timbot1789 commented 9 months ago

You should be able to pull the value of the to field from the webId of the contact, in the contactsList. Take a look at src/hooks/useContactsList.js.