omou-org / front-end

2 stars 1 forks source link

Fix gc integration mutation #775

Closed andrewjknapp closed 3 years ago

andrewjknapp commented 3 years ago

Fix (GClass Integration) Various Improvements

Goal

  1. Validate that response from Google contains a valid email for integration
  2. Refactor Google Integration mutations
  3. Create popup to display when Google response errors out

1

Created an isEmail() function in utils which uses regex to test if a string is a valid email Regex pattern taken from i Hate Regex simple email This is used on the Google response upon integrating to ensure an email was received. Mutations to consider the user integrated are only called if a valid email was received.

2

Refactored mutations to

3

Created a Dialog on Admin Profile Settings to display when there is an error communicating with Google to get the user's Google account email. Here is a demonstration of the current popup. The design and contents of the popup are not finalized.

https://user-images.githubusercontent.com/16299570/118562047-d8426b00-b720-11eb-95f9-9514ad64e637.mp4