Skip to content

feat(interview-scheduler): frontend integration #225

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions app-constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,10 @@ const Interviews = {
Completed: 'Completed',
Cancelled: 'Cancelled'
},
// key: template name in x.ai, value: duration
XaiTemplate: {
'30MinInterview': '30-min-interview',
'60MinInterview': '60-min-interview'
'30-minutes': 30,
'60-minutes': 60
}
}

Expand Down
2 changes: 1 addition & 1 deletion config/default.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ module.exports = {
// SendGrid email template ID for interview invitation
INTERVIEW_INVITATION_SENDGRID_TEMPLATE_ID: process.env.INTERVIEW_INVITATION_SENDGRID_TEMPLATE_ID,
// The sender (aka `from`) email for invitation.
INTERVIEW_INVITATION_SENDER_EMAIL: process.env.INTERVIEW_INVITATION_SENDER_EMAIL,
INTERVIEW_INVITATION_SENDER_EMAIL: process.env.INTERVIEW_INVITATION_SENDER_EMAIL || 'scheduler@topcoder.com',
// the URL where TaaS App is hosted
TAAS_APP_URL: process.env.TAAS_APP_URL || 'https://platform.topcoder-dev.com/taas/myteams',
// environment variables for Payment Service
Expand Down
26 changes: 20 additions & 6 deletions config/email_template.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,17 +63,31 @@ module.exports = {

/* Request interview for a job candidate
*
* - interviewType: the x.ai interview type. Example: "30-min-interview"
* - interviewType: the x.ai interview type. Example: "30-minutes"
* - interviewRound: the round of the interview. Example: 2
* - interviewDuration: duration of the interview, in minutes. Example: 30
* - interviewerList: The list of interviewer email addresses. Example: "first@attendee.com, second@attendee.com"
* - candidateId: the id of the jobCandidate. Example: "cc562545-7b75-48bf-87e7-50b3c57e41b1"
* - candidateName: Full name of candidate. Example: "John Doe"
* - jobName: The title of the job. Example: "TaaS API Misc Updates"
* - customMessage: if it's needed, a custom message can be added to the end of email. Example: "I would like to invite you for an interview..."
*
* Template (defined in SendGrid):
* Subject: '/{{interviewType}} tech interview with {{candidateName}} for {{jobName}} is requested by the Customer'
* Subject: '{{interviewType}} tech interview with {{candidateName}} for {{jobName}} is requested by the Customer'
* Body:
* 'The customer has requested /{{interviewType}} with {{candidateName}} for {{jobName}}.'
* + 'In a few minutes you will receive an invitation from our scheduling tool. Please proceed with the invitation to agree on timing.'
* + '<br /><br />{{customMessage}}'
* 'Hello!
* <br /><br />
* Congratulations, you have been selected to participate in a Topcoder Gig Work Interview!
* <br /><br />
* Please monitor your email for a response to this where you can coordinate your availability.
* <br /><br />
* Interviewee: {{candidateName}}<br />
* Interviewer(s): {{interviewerList}}<br />
* Interview Length: {{interviewDuration}} minutes
* <br /><br />
* /{{interviewType}}
* <br /><br />
* Topcoder Info:<br />
* Note: "id: {{candidateId}}, round: {{interviewRound}}"'
*
* Note, that the template should be defined in SendGrid.
* The subject & body above (identical to actual SendGrid template) is for reference purposes.
Expand Down
30 changes: 15 additions & 15 deletions data/demo-data.json
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@
"id": "5191a860-4327-4c50-b76b-84beba04519b",
"jobId": "a5b3bf94-a8bf-4c7e-b685-70a29a4d7d6e",
"userId": "79ce2a3e-7679-48cf-8ac9-0a8ca4c4b463",
"status": "shortlist",
"status": "selected",
"externalId": null,
"resume": null,
"createdBy": "57646ff9-1cd3-4d3c-88ba-eb09a395366c",
Expand All @@ -282,7 +282,7 @@
"id": "e6d9635c-b122-4f69-9285-09fb1ab30106",
"jobId": "a5b3bf94-a8bf-4c7e-b685-70a29a4d7d6e",
"userId": "98ec2c16-442e-4b61-8ad1-66123ee37d3c",
"status": "rejected",
"status": "rejected - other",
"externalId": null,
"resume": null,
"createdBy": "57646ff9-1cd3-4d3c-88ba-eb09a395366c",
Expand Down Expand Up @@ -347,7 +347,7 @@
"id": "85d6649e-2682-4904-9480-a77b72fef27d",
"jobId": "2d5e2a52-e0dd-4cd9-8f4c-7cffa43951d0",
"userId": "213d2dd9-1fc3-4eda-ad97-2d56e2a84a1e",
"status": "selected",
"status": "placed",
"externalId": null,
"resume": null,
"createdBy": "57646ff9-1cd3-4d3c-88ba-eb09a395366c",
Expand All @@ -360,7 +360,7 @@
"id": "922dfce3-4e06-4387-9fdb-64f70675e86b",
"jobId": "2d5e2a52-e0dd-4cd9-8f4c-7cffa43951d0",
"userId": "dd5adacb-444d-4992-8b7b-0c349be598db",
"status": "selected",
"status": "placed",
"externalId": null,
"resume": null,
"createdBy": "57646ff9-1cd3-4d3c-88ba-eb09a395366c",
Expand All @@ -373,7 +373,7 @@
"id": "c26c38e2-a47d-405b-abc6-fe62a739561c",
"jobId": "2d5e2a52-e0dd-4cd9-8f4c-7cffa43951d0",
"userId": "6d0509c7-5f12-4d84-9a19-8e80ef7ddd66",
"status": "selected",
"status": "placed",
"externalId": null,
"resume": null,
"createdBy": "57646ff9-1cd3-4d3c-88ba-eb09a395366c",
Expand All @@ -386,7 +386,7 @@
"id": "7bef2b37-e1ee-4638-bfc1-c911787ac955",
"jobId": "2d5e2a52-e0dd-4cd9-8f4c-7cffa43951d0",
"userId": "f65e2104-2987-4136-839d-ee4632f0b2e5",
"status": "selected",
"status": "placed",
"externalId": null,
"resume": null,
"createdBy": "57646ff9-1cd3-4d3c-88ba-eb09a395366c",
Expand All @@ -399,7 +399,7 @@
"id": "e9716139-1f40-4bf1-9f8a-77ae4bcc621e",
"jobId": "2d5e2a52-e0dd-4cd9-8f4c-7cffa43951d0",
"userId": "e5e667ad-0950-43c2-8d1d-6e83ad7d1c7e",
"status": "selected",
"status": "placed",
"externalId": null,
"resume": null,
"createdBy": "57646ff9-1cd3-4d3c-88ba-eb09a395366c",
Expand All @@ -412,7 +412,7 @@
"id": "a1731d01-eac9-4eff-8e5a-8a3c99bc66e0",
"jobId": "2d5e2a52-e0dd-4cd9-8f4c-7cffa43951d0",
"userId": "bef43122-426b-4b2b-acdd-9b5b3bd1c0bf",
"status": "selected",
"status": "placed",
"externalId": null,
"resume": null,
"createdBy": "57646ff9-1cd3-4d3c-88ba-eb09a395366c",
Expand All @@ -425,7 +425,7 @@
"id": "25787cb2-d876-4883-b533-d5e628d213ce",
"jobId": "1324da27-9d7d-47d8-a04e-9fb3f35a67fa",
"userId": "95e7970f-12b4-43b7-ab35-38c34bf033c7",
"status": "open",
"status": "interview",
"externalId": "88774631",
"resume": "http://example.com",
"createdBy": "57646ff9-1cd3-4d3c-88ba-eb09a395366c",
Expand Down Expand Up @@ -468,7 +468,7 @@
"projectId": 111,
"userId": "213d2dd9-1fc3-4eda-ad97-2d56e2a84a1e",
"jobId": "2d5e2a52-e0dd-4cd9-8f4c-7cffa43951d0",
"status": "assigned",
"status": "placed",
"startDate": "2021-01-25",
"endDate": "2021-01-31",
"memberRate": 1000,
Expand Down Expand Up @@ -500,7 +500,7 @@
"projectId": 111,
"userId": "6d0509c7-5f12-4d84-9a19-8e80ef7ddd66",
"jobId": "2d5e2a52-e0dd-4cd9-8f4c-7cffa43951d0",
"status": "assigned",
"status": "placed",
"startDate": "2021-02-27",
"endDate": "2021-03-15",
"memberRate": 2000,
Expand Down Expand Up @@ -532,7 +532,7 @@
"projectId": 111,
"userId": "dd5adacb-444d-4992-8b7b-0c349be598db",
"jobId": "2d5e2a52-e0dd-4cd9-8f4c-7cffa43951d0",
"status": "assigned",
"status": "placed",
"startDate": "2021-03-18",
"endDate": "2021-05-28",
"memberRate": 800,
Expand All @@ -548,7 +548,7 @@
"projectId": 111,
"userId": "f65e2104-2987-4136-839d-ee4632f0b2e5",
"jobId": "2d5e2a52-e0dd-4cd9-8f4c-7cffa43951d0",
"status": "assigned",
"status": "placed",
"startDate": "2000-03-27",
"endDate": "2000-04-27",
"memberRate": 3000,
Expand All @@ -564,7 +564,7 @@
"projectId": 111,
"userId": "bef43122-426b-4b2b-acdd-9b5b3bd1c0bf",
"jobId": "2d5e2a52-e0dd-4cd9-8f4c-7cffa43951d0",
"status": "assigned",
"status": "placed",
"startDate": "2020-04-27",
"endDate": "2020-05-27",
"memberRate": 0,
Expand Down Expand Up @@ -612,7 +612,7 @@
"projectId": 111,
"userId": "e5e667ad-0950-43c2-8d1d-6e83ad7d1c7e",
"jobId": "2d5e2a52-e0dd-4cd9-8f4c-7cffa43951d0",
"status": "assigned",
"status": "placed",
"startDate": "2021-07-27",
"endDate": "2021-09-27",
"memberRate": 1700,
Expand Down
Loading