arrow_back
Back to Tickets
Edit Trouble Ticket
Update the ticket information below
Date Initiated
*
Status
*
Open
Pending
Completed
Terminated
Creator
*
Marcus
Priority
*
1
Urgent
Select urgency...
Urgent
Not Urgent
Important
Select importance...
Important
Not Important
Project Name
*
zfrika
Problem
*
update the contacts page
Question
do I pull the contacts and load them into the sessionStorage? only loading username , image, interests, location, gender, education. how do I get this data from the database? is there a query that I can run when contacts loads. it pulls all the users and lists them. so when contacts link is requested . need a post request that pulls data from the user tables and them uploads that data to the sessionStorage.
Root Cause
Notes
Strategy
the contacts should load in the uesrhomepage. because it will take time. once the user goes into user homepage. slowly load all the users. but what if the user leaves user home page quickly? does the data all load? You can only view someone profile person details if you are friends. Otherwise you are limited to a professional view .
Helpful People
Helpful Links
https://app.diagrams.net/#D254kenya%20website.drawio#%7B%22pageId%22%3A%229uNnpFMDgmv7cM9moAMJ%22%7D
Diagram
Previous Steps
is there a query that I can run when contacts loads. it pulls all the users and lists them. so when contacts link is requested . need a post request that pulls data from the user tables and them uploads that data to the sessionStorage. go to the post request page and pull a query from users and dump it and then capture it in sessionstroage. load the data to method lloadconnections() passing username doesn't match with expected values . mapped the user name and position.and status We will update the .select() to include the new fields (profession, city, industry, profileimageUrl) and then map through them to create the incrementing id. .map((user, index) => ...): This function iterates through every user found in the database. The index is the current position in the array (0, 1, 2...). id: index + 1: Since array indices start at 0, we add 1 to make your first user id: 1. Default Values (|| 'N/A'): If a user hasn't filled out their city or profession yet, this prevents your frontend from breaking by providing a fallback string. why do I have two connections_data in session Storage connect to user profile and view their profile . trace this code. you dont need to show the original user profile page. just create a new profile page for the contact list that shows who the user is. viewuserprofile.ejs will be the page that gets open. clean up all the code that could allow a user to view someone else data. only pass the data from the sessionStorage to view the other user profile. dont query the database for any data. create a route that calls the viewuserparofile.ejs page. now the same way we called a profile page by passing data,, we can call the view page. to load data. dont allow someone to be able to enter a username and pull data from the database. they can steal data. only . also reduce the number of queries to the database. only use the data on the sessionstorage. this makes less requests from the database. connected to connection-system.js load the contacts from the database on to connections. then show a link to their profile and link to email them. pass the that you gathered to the variable on the page. map everything out and configure the info List the data to be mapped. (see links above of the mapping) add a field for user name instead of first name and last name open the compose. if there is a recipient passed through, the open composed and assign id = recipient the value that pass passed. assign to id=recipient call startChat(userId) <- assign userID as recipient./ assign recipient to the sessionstorage so that it's available in messaging to retrieve. stop the window from popping up if you sent a message and are refreshing the page. you should close the compose box if the route request was :datatoken, open the compose box if the route request was :datatoken/:recipient
Next Steps
Solution
Insight
Date Resolved
save
Update Ticket
Cancel