Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

[$60] Allowing to go back after confirming a time for an interview #562

Open
sdgun opened this issue Nov 1, 2021 · 17 comments
Open

[$60] Allowing to go back after confirming a time for an interview #562

sdgun opened this issue Nov 1, 2021 · 17 comments

Comments

@sdgun
Copy link

sdgun commented Nov 1, 2021

Steps
Click 'Select Interview Time' link from an email
Select a date and submit
click back button

User can select another date and submit but it doesn't send out any email on the second or third time and also the name and email fields are empty when going back

Is there any point in letting them to go back to the initial page on this screen?

@sdgun sdgun added question Further information is requested Interview_Scheduler labels Nov 1, 2021
@maxceem
Copy link
Contributor

maxceem commented Nov 5, 2021

This is a built-in functionality of the Nylas. I'll ask them if we can disable this functionality somehow.

@maxceem maxceem removed the question Further information is requested label Nov 20, 2021
@maxceem
Copy link
Contributor

maxceem commented Nov 20, 2021

When Job Candidate schedules or reschedule interview they can click the Back button and choose another time.

image

We don't want user to be able to select another time, once they already selected one. Nylas doesn't allow to hide the back button. But what we can do is show our own custom confirmation page after time was selected.

To do so, when we create Nylas page in TaaS in API we have to define a URL that would be loaded as custom thank you page (see Nylas API https://developer.nylas.com/docs/api/scheduler#post/manage/pages, thank_you_redirect parameter).

TaaS App using BFF (backend for frontend)

TaaS APP (this repo) branch dev

  • We have to create an endpoint that would return such a custom HTML page. TaaS API usually returns JSON without HTML and CSS, so it's not the best place. So we could use server which is built-in inside the TaaS APP, see https://github.com/topcoder-platform/taas-app/blob/3cbcdc5a79bd66de433b722a4da378d44e12792c/server.js. We would add an endpoint to this server inside TaaS App to return a custom thank you page.

  • Create an endpoint that would return a custom thank you page: GET https://platform.topcoder-dev.com/taas/misc/interview-thank-you-page. Locally it would be https://localhost:8501/taas-app/misc/interview-thank-you-page.

  • This endpoint should return a page that would shown inside an iframe, once Job Candidate selects time https://monosnap.com/file/BbZsC9B28o88PlvkKyI3vi9uBSL9Ht

  • This page should look the same as Nylas page button without "back" button and without "checkmark":
    image

  • Note, that when the thank you page URL is triggered Nylas passes details about the scheduled interview inside the URL query params:

    query: {
      "account_id": "6tgk8uqu1diju33p72tzuigkt",
      "additional_values": "{\"name\":\"Maksym1 Dev\"}",
      "calendar_id": "7m0vnugpvwdb2ajoswssp4d2i",
      "edit_hash": "",
      "email": "",
      "end_time": "1637587800",
      "event_id": "9cu495ltlthh59ystot2gk52h",
      "location": "Location TBD",
      "name": "Maksym1 Dev",
      "page_slug": "tc-taas-interview-e897b547-fb8f-43b5-9d5d-73fb3418d171",
      "prefilled_readonly": "true",
      "start_time": "1637586000",
      "tz": "Europe/London"
    }
  • Update TaaS API so when Nylas page is created we set thank_you_redirect so it points this URL: ${TAAS_APP_BASE_URL}/misc/interview-thank-you-page. Branch in TaaS API feature/interview-update-part-2

    image

  • For verification purposes, please share the screenshot of the thank you page as it shown inside iframe after time was confirmed.

@maxceem maxceem changed the title Allowing to go back after confirming a time for an interview [$80] Allowing to go back after confirming a time for an interview Nov 20, 2021
@maxceem maxceem added the CF label Nov 20, 2021
@maxceem maxceem changed the title [$80] Allowing to go back after confirming a time for an interview [$100] Allowing to go back after confirming a time for an interview Nov 20, 2021
@maxceem
Copy link
Contributor

maxceem commented Nov 23, 2021

Half of the task above has been done. API has been updated, and now when Job Candidate select time to schedule or reschedule interview it shows custom thank you page:

image

What is left to do:

@maxceem maxceem changed the title [$100] Allowing to go back after confirming a time for an interview [$60] Allowing to go back after confirming a time for an interview Nov 23, 2021
@maxceem
Copy link
Contributor

maxceem commented Nov 23, 2021

@yoution this is also open for pick up.

The initial task was #562 (comment).
But I've made all server-side changes, so now we only need to implement UI as described here #562 (comment).

So no need to local setup TaaS API, only TaaS App.

@yoution
Copy link
Contributor

yoution commented Nov 23, 2021

@maxceem please assign to me

@yoution
Copy link
Contributor

yoution commented Nov 24, 2021

@maxceem we should use vanilla js, and write code in one file?

@maxceem
Copy link
Contributor

maxceem commented Nov 24, 2021

Yes @yoution it's better to use vanilla js in this file.

@maxceem
Copy link
Contributor

maxceem commented Nov 24, 2021

@yoution actually, I think we don't need js in this file. It just has to render HTML with CSS.

@yoution
Copy link
Contributor

yoution commented Nov 24, 2021

@maxceem this value is from url query?
image

@maxceem
Copy link
Contributor

maxceem commented Nov 24, 2021

hmm @yoution, let me see where we can get it. We don't have it in query.

@yoution
Copy link
Contributor

yoution commented Nov 24, 2021

@maxceem please ignore, I find it
image

@maxceem
Copy link
Contributor

maxceem commented Nov 24, 2021

@yoution not, that's different. Maksym Dev is name of user who was invited for the interview, but not the title.

I found one way to get it using 1 ajax request:

Would it work? I think we can use fetch method call this URL.

yoution added a commit to yoution/taas-app that referenced this issue Nov 25, 2021
yoution added a commit to yoution/taas-app that referenced this issue Nov 25, 2021
yoution added a commit to yoution/taas-app that referenced this issue Nov 26, 2021
yoution added a commit to yoution/taas-app that referenced this issue Nov 26, 2021
maxceem added a commit that referenced this issue Nov 26, 2021
@maxceem
Copy link
Contributor

maxceem commented Nov 26, 2021

@sdgun this is ready for testing/

@sdgun
Copy link
Author

sdgun commented Nov 29, 2021

Verified in Dev.

image

@maxceem
Copy link
Contributor

maxceem commented Dec 5, 2021

Challenge https://www.topcoder.com/challenges/d3eb505b-a0d7-436f-8395-f9d7db2a7cd6 has been created for this ticket.

This is an automated message for maxceem via Topcoder X

@maxceem
Copy link
Contributor

maxceem commented Dec 5, 2021

Challenge https://www.topcoder.com/challenges/d3eb505b-a0d7-436f-8395-f9d7db2a7cd6 has been assigned to yoution.

This is an automated message for maxceem via Topcoder X

@maxceem
Copy link
Contributor

maxceem commented Dec 5, 2021

Payment task has been updated: https://www.topcoder.com/challenges/d3eb505b-a0d7-436f-8395-f9d7db2a7cd6
Payments Complete
Winner: yoution
Copilot: maxceem
Challenge d3eb505b-a0d7-436f-8395-f9d7db2a7cd6 has been paid and closed.

This is an automated message for maxceem via Topcoder X

@maxceem maxceem reopened this Dec 5, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants