1alyciaoliveira / JobJourney

This dynamic app showcases the implementation of React, GraphQL, and MongoDB, hosted on Heroku. It represents the successful culmination of our boot camp journey, highlighting our skills and dedication to creating impactful, practical solutions. Welcome to a new era of efficient job hunting!
https://ancient-everglades-97703-e6a603057067.herokuapp.com/
3 stars 0 forks source link

Show Interview Ratio and Pending Interviews in dashboard #69

Closed 1alyciaoliveira closed 1 year ago

Maelikah commented 1 year ago

Verify main reload functionality for total count, intervie ratio, etc

1alyciaoliveira commented 1 year ago

To reload info and update the total job application is necessary to add 1 line of code to Main.js

add window.location.reload(); to line 112

Screenshot 2023-08-17 at 22 41 24
1alyciaoliveira commented 1 year ago

Already added the window.location.reload(); to the code.

AlexTrejo92 commented 1 year ago

A bug was discovered while the coding of this functionality.

The code will break if the MeData state hasn't been updated. It seems that the call for the data is taking more time than the execution of the rest of the code, so when that happens the code breaks as it is looking for information that is still not inside the Me object. At first login the code will break . Comment these out to check functionality once the Me query executes correctly.

Right now the logic and operations to get the ratio and pending interviews are done, but in order for it to work properly, the issue regarding the async functionality of the query must be solved.

In this screenshot you can see that the data is being called from the database and logged on the console.

image

TODO's in order of priority:

  1. Fix the bug regarding the code executing without waiting for the response of the useQuery hook. (Tried using useState and useEffect but it doesn't seem to work). Will try a different solution.

  2. Make changes to the styling of the buttons so that it looks a bit more like the mockup from figma.

AlexTrejo92 commented 1 year ago

Update on the issue:

1.The bug was somewhat solved using state variables to store the information that will be later fetched from the DB. There is a warning that triggers at login but it does not seem to affect the functionality of the page.

  1. Slightly modified styling with the bootstrap existing classes on the tags that hold jobCount, interviewRatio and PendingInterviews to look more like the figma mockup. Had to add a styles variable to change the font color and size for the numbers inside the tag.

Issue will be closed once revision and approval with another team member.

image