Finalize the Messages Page
Closed this issue · 0 comments
Your task is to finish implementing the dropdown in the messages page.
When you click the ellipse in the top right corner of the chat, a dropdown opens up.
- If a patient clicks "Mark as Unread" in the dropdown,
messagesUnreadByPatient
should be set to 1. . If a psychiatrist clicks "Mark as Unread" in the dropdown,messagesUnreadByPsych
should be set to 1. This is just to mark some message as unread in the conversation (1 is arbitrary). Make sure the conversation moves to the "Unread Messages" section when this is clicked. - Create the following modal, so that clicking "Delete Message Thread" in the dropdown should open it up. Use
/src/assets/cancel.svg
for the cancel button. Infrontend/src/assets
, create a file calleddelete.svg
. In the OKB Figma, get the SVG code for the delete button and add it todelete.svg
.
-
If a patient clicks the "Delete" button in the modal,
deletedByPatient
should be set to True for the corresponding conversation, and the conversation should be removed from the patient's view but should still be visible on the psychiatrist's end as long as the psychiatrist hasn't deleted the thread. -
If both
deletedByPatient
anddeletedByPsych
are set to True, then we delete the conversation from theConversations
collection, as well as all documents in theChats
collection where theuid
andrecipientId
are the participants of the deleted conversation thread. This ensures you delete the entire message thread properly.