[$150] Show syncing message and wait if calendar is not yet synced when scheduling interview #588
Description
We can schedule an interview with a connected Google/Microsoft calendar or without connected calendar (it would use Nyals virtual calendar internally).
When we connect Google/Microsoft calendar successfully it might still take time to sync it in the background, and until then we cannot schedule an interview. So when we schedule interview we have to check if calendar was already synced, and if no, then show loading indicator until calendar is fully synced.
When the user clicks "confirm" we have to check if the current primary l calendar has calendarId
.
- if the primary calendar has
calendarId
it means that the calendar is already synced so we just send a request to schedule an interview as we do now - if primary calendar
calendarId === null
it means that the calendar is not yet synced, so we have to do the next thing:- show loading indicator with text saying
syncing your new calendar calendar@email.address, it might take a few minutes...
https://monosnap.com/file/To2Cl4d0d34axc6UROSXikYnXiHDYq - in the background reload UserMeetingSettings to check if the calendar was already synced or not (check
calendarId
is null or no) https://monosnap.com/file/4woLY2plEwzr6ADY9dj4ezeWhz0rvk - if
calendarId
is already not null, then hide textsyncing your new calendar calendar@email.address, it might take a few minutes...
and show textscheduling interview...
and call request to schedule an interview as the calendar is already synced https://monosnap.com/file/KPY7Y1kHTT1M7EW7aOVm8pj96wfWEe - if
calendarId
is stillnull
then we have repeat checking for some time:- wait for
10
seconds and try getting UserMeetingSettings again and check ifcalendarId
is stillnull
or no - repeat these steps for 2 minutes
- if after 2 minutes
calendarId
is tillnull
then show message inside popup https://monosnap.com/file/jo1nGlWs8kXqk77tS6KRS9yOpuCCiy
Strange, it takes too long to sync your calendar calendar@email.address. Please, try re-connecting your calendar by clicking "manage connected calendars". Would you have any issues, please don't hesitate to reach out to us by support@topcoder.com.
- And show button "OK". When we click "OK" we have to see the screen to "confirm" the interview again https://monosnap.com/file/0ybLRG60nGNboByjS8EP3LnAs5SHky
- If we click "manage connected calendars" link we have to see a screen to remove/connect calendars https://monosnap.com/file/9q1Z7l0rEc0u5tc3qYFRUmFJ9lywG5
- wait for
- show loading indicator with text saying
Verification
We have to verify this somehow when working locally. As this issue would happen only when we connect Google/Microsoft account the first time it would be better to find some other way for testing.
- For example, run TaaS API locally and manually changing the value in DB and reindex data to ES
- Or create some kind of proxy and override that value in the endpoint on the fly. For example by creating proxy similar to this one recommender-proxy.zip if this possible.