Skip to content

Commit 7634476

Browse files
authored
Merge pull request #225 from cagdas001/feature/interview-scheduler2
feat(interview-scheduler): frontend integration
2 parents 9e294ac + 8e2a5a0 commit 7634476

19 files changed

+310
-175
lines changed

app-constants.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,10 @@ const Interviews = {
6262
Completed: 'Completed',
6363
Cancelled: 'Cancelled'
6464
},
65+
// key: template name in x.ai, value: duration
6566
XaiTemplate: {
66-
'30MinInterview': '30-min-interview',
67-
'60MinInterview': '60-min-interview'
67+
'30-minutes': 30,
68+
'60-minutes': 60
6869
}
6970
}
7071

config/default.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ module.exports = {
153153
// SendGrid email template ID for interview invitation
154154
INTERVIEW_INVITATION_SENDGRID_TEMPLATE_ID: process.env.INTERVIEW_INVITATION_SENDGRID_TEMPLATE_ID,
155155
// The sender (aka `from`) email for invitation.
156-
INTERVIEW_INVITATION_SENDER_EMAIL: process.env.INTERVIEW_INVITATION_SENDER_EMAIL,
156+
INTERVIEW_INVITATION_SENDER_EMAIL: process.env.INTERVIEW_INVITATION_SENDER_EMAIL || 'scheduler@topcoder.com',
157157
// the URL where TaaS App is hosted
158158
TAAS_APP_URL: process.env.TAAS_APP_URL || 'https://platform.topcoder-dev.com/taas/myteams',
159159
// environment variables for Payment Service

config/email_template.config.js

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,17 +63,31 @@ module.exports = {
6363

6464
/* Request interview for a job candidate
6565
*
66-
* - interviewType: the x.ai interview type. Example: "30-min-interview"
66+
* - interviewType: the x.ai interview type. Example: "30-minutes"
67+
* - interviewRound: the round of the interview. Example: 2
68+
* - interviewDuration: duration of the interview, in minutes. Example: 30
69+
* - interviewerList: The list of interviewer email addresses. Example: "first@attendee.com, second@attendee.com"
70+
* - candidateId: the id of the jobCandidate. Example: "cc562545-7b75-48bf-87e7-50b3c57e41b1"
6771
* - candidateName: Full name of candidate. Example: "John Doe"
6872
* - jobName: The title of the job. Example: "TaaS API Misc Updates"
69-
* - 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..."
7073
*
7174
* Template (defined in SendGrid):
72-
* Subject: '/{{interviewType}} tech interview with {{candidateName}} for {{jobName}} is requested by the Customer'
75+
* Subject: '{{interviewType}} tech interview with {{candidateName}} for {{jobName}} is requested by the Customer'
7376
* Body:
74-
* 'The customer has requested /{{interviewType}} with {{candidateName}} for {{jobName}}.'
75-
* + 'In a few minutes you will receive an invitation from our scheduling tool. Please proceed with the invitation to agree on timing.'
76-
* + '<br /><br />{{customMessage}}'
77+
* 'Hello!
78+
* <br /><br />
79+
* Congratulations, you have been selected to participate in a Topcoder Gig Work Interview!
80+
* <br /><br />
81+
* Please monitor your email for a response to this where you can coordinate your availability.
82+
* <br /><br />
83+
* Interviewee: {{candidateName}}<br />
84+
* Interviewer(s): {{interviewerList}}<br />
85+
* Interview Length: {{interviewDuration}} minutes
86+
* <br /><br />
87+
* /{{interviewType}}
88+
* <br /><br />
89+
* Topcoder Info:<br />
90+
* Note: "id: {{candidateId}}, round: {{interviewRound}}"'
7791
*
7892
* Note, that the template should be defined in SendGrid.
7993
* The subject & body above (identical to actual SendGrid template) is for reference purposes.

data/demo-data.json

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@
269269
"id": "5191a860-4327-4c50-b76b-84beba04519b",
270270
"jobId": "a5b3bf94-a8bf-4c7e-b685-70a29a4d7d6e",
271271
"userId": "79ce2a3e-7679-48cf-8ac9-0a8ca4c4b463",
272-
"status": "shortlist",
272+
"status": "selected",
273273
"externalId": null,
274274
"resume": null,
275275
"createdBy": "57646ff9-1cd3-4d3c-88ba-eb09a395366c",
@@ -282,7 +282,7 @@
282282
"id": "e6d9635c-b122-4f69-9285-09fb1ab30106",
283283
"jobId": "a5b3bf94-a8bf-4c7e-b685-70a29a4d7d6e",
284284
"userId": "98ec2c16-442e-4b61-8ad1-66123ee37d3c",
285-
"status": "rejected",
285+
"status": "rejected - other",
286286
"externalId": null,
287287
"resume": null,
288288
"createdBy": "57646ff9-1cd3-4d3c-88ba-eb09a395366c",
@@ -347,7 +347,7 @@
347347
"id": "85d6649e-2682-4904-9480-a77b72fef27d",
348348
"jobId": "2d5e2a52-e0dd-4cd9-8f4c-7cffa43951d0",
349349
"userId": "213d2dd9-1fc3-4eda-ad97-2d56e2a84a1e",
350-
"status": "selected",
350+
"status": "placed",
351351
"externalId": null,
352352
"resume": null,
353353
"createdBy": "57646ff9-1cd3-4d3c-88ba-eb09a395366c",
@@ -360,7 +360,7 @@
360360
"id": "922dfce3-4e06-4387-9fdb-64f70675e86b",
361361
"jobId": "2d5e2a52-e0dd-4cd9-8f4c-7cffa43951d0",
362362
"userId": "dd5adacb-444d-4992-8b7b-0c349be598db",
363-
"status": "selected",
363+
"status": "placed",
364364
"externalId": null,
365365
"resume": null,
366366
"createdBy": "57646ff9-1cd3-4d3c-88ba-eb09a395366c",
@@ -373,7 +373,7 @@
373373
"id": "c26c38e2-a47d-405b-abc6-fe62a739561c",
374374
"jobId": "2d5e2a52-e0dd-4cd9-8f4c-7cffa43951d0",
375375
"userId": "6d0509c7-5f12-4d84-9a19-8e80ef7ddd66",
376-
"status": "selected",
376+
"status": "placed",
377377
"externalId": null,
378378
"resume": null,
379379
"createdBy": "57646ff9-1cd3-4d3c-88ba-eb09a395366c",
@@ -386,7 +386,7 @@
386386
"id": "7bef2b37-e1ee-4638-bfc1-c911787ac955",
387387
"jobId": "2d5e2a52-e0dd-4cd9-8f4c-7cffa43951d0",
388388
"userId": "f65e2104-2987-4136-839d-ee4632f0b2e5",
389-
"status": "selected",
389+
"status": "placed",
390390
"externalId": null,
391391
"resume": null,
392392
"createdBy": "57646ff9-1cd3-4d3c-88ba-eb09a395366c",
@@ -399,7 +399,7 @@
399399
"id": "e9716139-1f40-4bf1-9f8a-77ae4bcc621e",
400400
"jobId": "2d5e2a52-e0dd-4cd9-8f4c-7cffa43951d0",
401401
"userId": "e5e667ad-0950-43c2-8d1d-6e83ad7d1c7e",
402-
"status": "selected",
402+
"status": "placed",
403403
"externalId": null,
404404
"resume": null,
405405
"createdBy": "57646ff9-1cd3-4d3c-88ba-eb09a395366c",
@@ -412,7 +412,7 @@
412412
"id": "a1731d01-eac9-4eff-8e5a-8a3c99bc66e0",
413413
"jobId": "2d5e2a52-e0dd-4cd9-8f4c-7cffa43951d0",
414414
"userId": "bef43122-426b-4b2b-acdd-9b5b3bd1c0bf",
415-
"status": "selected",
415+
"status": "placed",
416416
"externalId": null,
417417
"resume": null,
418418
"createdBy": "57646ff9-1cd3-4d3c-88ba-eb09a395366c",
@@ -425,7 +425,7 @@
425425
"id": "25787cb2-d876-4883-b533-d5e628d213ce",
426426
"jobId": "1324da27-9d7d-47d8-a04e-9fb3f35a67fa",
427427
"userId": "95e7970f-12b4-43b7-ab35-38c34bf033c7",
428-
"status": "open",
428+
"status": "interview",
429429
"externalId": "88774631",
430430
"resume": "http://example.com",
431431
"createdBy": "57646ff9-1cd3-4d3c-88ba-eb09a395366c",
@@ -468,7 +468,7 @@
468468
"projectId": 111,
469469
"userId": "213d2dd9-1fc3-4eda-ad97-2d56e2a84a1e",
470470
"jobId": "2d5e2a52-e0dd-4cd9-8f4c-7cffa43951d0",
471-
"status": "assigned",
471+
"status": "placed",
472472
"startDate": "2021-01-25",
473473
"endDate": "2021-01-31",
474474
"memberRate": 1000,
@@ -500,7 +500,7 @@
500500
"projectId": 111,
501501
"userId": "6d0509c7-5f12-4d84-9a19-8e80ef7ddd66",
502502
"jobId": "2d5e2a52-e0dd-4cd9-8f4c-7cffa43951d0",
503-
"status": "assigned",
503+
"status": "placed",
504504
"startDate": "2021-02-27",
505505
"endDate": "2021-03-15",
506506
"memberRate": 2000,
@@ -532,7 +532,7 @@
532532
"projectId": 111,
533533
"userId": "dd5adacb-444d-4992-8b7b-0c349be598db",
534534
"jobId": "2d5e2a52-e0dd-4cd9-8f4c-7cffa43951d0",
535-
"status": "assigned",
535+
"status": "placed",
536536
"startDate": "2021-03-18",
537537
"endDate": "2021-05-28",
538538
"memberRate": 800,
@@ -548,7 +548,7 @@
548548
"projectId": 111,
549549
"userId": "f65e2104-2987-4136-839d-ee4632f0b2e5",
550550
"jobId": "2d5e2a52-e0dd-4cd9-8f4c-7cffa43951d0",
551-
"status": "assigned",
551+
"status": "placed",
552552
"startDate": "2000-03-27",
553553
"endDate": "2000-04-27",
554554
"memberRate": 3000,
@@ -564,7 +564,7 @@
564564
"projectId": 111,
565565
"userId": "bef43122-426b-4b2b-acdd-9b5b3bd1c0bf",
566566
"jobId": "2d5e2a52-e0dd-4cd9-8f4c-7cffa43951d0",
567-
"status": "assigned",
567+
"status": "placed",
568568
"startDate": "2020-04-27",
569569
"endDate": "2020-05-27",
570570
"memberRate": 0,
@@ -612,7 +612,7 @@
612612
"projectId": 111,
613613
"userId": "e5e667ad-0950-43c2-8d1d-6e83ad7d1c7e",
614614
"jobId": "2d5e2a52-e0dd-4cd9-8f4c-7cffa43951d0",
615-
"status": "assigned",
615+
"status": "placed",
616616
"startDate": "2021-07-27",
617617
"endDate": "2021-09-27",
618618
"memberRate": 1700,

0 commit comments

Comments
 (0)