Skip to content

Commit 75ddf18

Browse files
committed
Merge branch 'feature/interview-scheduler2' of https://github.com/cagdas001/taas-apis into feature/interview-scheduler2
2 parents 2754bc4 + 04fe63d commit 75ddf18

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+13171
-5405
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@ web_modules/
5353
# Optional eslint cache
5454
.eslintcache
5555

56+
# Optional eslint options
57+
.eslintrc.y*ml
58+
5659
# Microbundle cache
5760
.rpt2_cache/
5861
.rts2_cache_cjs/

README.md

Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -78,18 +78,29 @@
7878
- after that, `taas-es-processor` would be started itself. Make sure it successfully connected to Kafka, you should see 9 lines with text `Subscribed to taas.`:
7979

8080
```
81-
tc-taas-es-processor | 2021-01-22T14:27:48.971Z DEBUG no-kafka-client Subscribed to taas.jobcandidate.create:0 offset 0 leader kafka:9093
82-
tc-taas-es-processor | 2021-01-22T14:27:48.972Z DEBUG no-kafka-client Subscribed to taas.job.create:0 offset 0 leader kafka:9093
83-
tc-taas-es-processor | 2021-01-22T14:27:48.972Z DEBUG no-kafka-client Subscribed to taas.resourcebooking.delete:0 offset 0 leader kafka:9093
84-
tc-taas-es-processor | 2021-01-22T14:27:48.973Z DEBUG no-kafka-client Subscribed to taas.jobcandidate.delete:0 offset 0 leader kafka:9093
85-
tc-taas-es-processor | 2021-01-22T14:27:48.974Z DEBUG no-kafka-client Subscribed to taas.jobcandidate.update:0 offset 0 leader kafka:9093
86-
tc-taas-es-processor | 2021-01-22T14:27:48.975Z DEBUG no-kafka-client Subscribed to taas.resourcebooking.create:0 offset 0 leader kafka:9093
87-
tc-taas-es-processor | 2021-01-22T14:27:48.976Z DEBUG no-kafka-client Subscribed to taas.job.delete:0 offset 0 leader kafka:9093
88-
tc-taas-es-processor | 2021-01-22T14:27:48.977Z DEBUG no-kafka-client Subscribed to taas.job.update:0 offset 0 leader kafka:9093
89-
tc-taas-es-processor | 2021-01-22T14:27:48.978Z DEBUG no-kafka-client Subscribed to taas.resourcebooking.update:0 offset 0 leader kafka:9093
90-
tc-taas-es-processor | 2021-01-22T14:27:48.979Z DEBUG no-kafka-client Subscribed to taas.workperiod.create:0 offset 0 leader kafka:9093
91-
tc-taas-es-processor | 2021-01-22T14:27:48.980Z DEBUG no-kafka-client Subscribed to taas.workperiod.update:0 offset 0 leader kafka:9093
92-
tc-taas-es-processor | 2021-01-22T14:27:48.981Z DEBUG no-kafka-client Subscribed to taas.workperiod.delete:0 offset 0 leader kafka:9093
81+
tc-taas-es-processor | [2021-04-09T21:20:19.035Z] app INFO : Starting kafka consumer
82+
tc-taas-es-processor | 2021-04-09T21:20:21.292Z INFO no-kafka-client Joined group taas-es-processor generationId 1 as no-kafka-client-076538fc-60dd-4ca4-a2b9-520bdf73bc9e
83+
tc-taas-es-processor | 2021-04-09T21:20:21.293Z INFO no-kafka-client Elected as group leader
84+
tc-taas-es-processor | 2021-04-09T21:20:21.452Z DEBUG no-kafka-client Subscribed to taas.jobcandidate.create:0 offset 0 leader kafka:9093
85+
tc-taas-es-processor | 2021-04-09T21:20:21.455Z DEBUG no-kafka-client Subscribed to taas.job.create:0 offset 0 leader kafka:9093
86+
tc-taas-es-processor | 2021-04-09T21:20:21.456Z DEBUG no-kafka-client Subscribed to taas.resourcebooking.delete:0 offset 0 leader kafka:9093
87+
tc-taas-es-processor | 2021-04-09T21:20:21.457Z DEBUG no-kafka-client Subscribed to taas.jobcandidate.delete:0 offset 0 leader kafka:9093
88+
tc-taas-es-processor | 2021-04-09T21:20:21.458Z DEBUG no-kafka-client Subscribed to taas.jobcandidate.update:0 offset 0 leader kafka:9093
89+
tc-taas-es-processor | 2021-04-09T21:20:21.459Z DEBUG no-kafka-client Subscribed to taas.resourcebooking.create:0 offset 0 leader kafka:9093
90+
tc-taas-es-processor | 2021-04-09T21:20:21.461Z DEBUG no-kafka-client Subscribed to taas.job.delete:0 offset 0 leader kafka:9093
91+
tc-taas-es-processor | 2021-04-09T21:20:21.463Z DEBUG no-kafka-client Subscribed to taas.workperiod.update:0 offset 0 leader kafka:9093
92+
tc-taas-es-processor | 2021-04-09T21:20:21.466Z DEBUG no-kafka-client Subscribed to taas.workperiod.delete:0 offset 0 leader kafka:9093
93+
tc-taas-es-processor | 2021-04-09T21:20:21.468Z DEBUG no-kafka-client Subscribed to taas.workperiod.create:0 offset 0 leader kafka:9093
94+
tc-taas-es-processor | 2021-04-09T21:20:21.469Z DEBUG no-kafka-client Subscribed to taas.workperiodpayment.update:0 offset 0 leader kafka:9093
95+
tc-taas-es-processor | 2021-04-09T21:20:21.470Z DEBUG no-kafka-client Subscribed to taas.workperiodpayment.delete:0 offset 0 leader kafka:9093
96+
tc-taas-es-processor | 2021-04-09T21:20:21.471Z DEBUG no-kafka-client Subscribed to taas.workperiodpayment.create:0 offset 0 leader kafka:9093
97+
tc-taas-es-processor | 2021-04-09T21:20:21.473Z DEBUG no-kafka-client Subscribed to taas.job.update:0 offset 0 leader kafka:9093
98+
tc-taas-es-processor | 2021-04-09T21:20:21.474Z DEBUG no-kafka-client Subscribed to taas.resourcebooking.update:0 offset 0 leader kafka:9093
99+
tc-taas-es-processor | [2021-04-09T21:20:21.475Z] app INFO : Initialized.......
100+
tc-taas-es-processor | [2021-04-09T21:20:21.479Z] app INFO : taas.job.create,taas.job.update,taas.job.delete,taas.jobcandidate.create,taas.jobcandidate.update,taas.jobcandidate.delete,taas.resourcebooking.create,taas.resourcebooking.update,taas.resourcebooking.delete,taas.workperiod.create,taas.workperiod.update,taas.workperiod.delete,taas.workperiodpayment.create,taas.workperiodpayment.update,taas.workperiodpayment.delete
101+
tc-taas-es-processor | [2021-04-09T21:20:21.480Z] app INFO : Kick Start.......
102+
tc-taas-es-processor | ********** Topcoder Health Check DropIn listening on port 3001
103+
tc-taas-es-processor | Topcoder Health Check DropIn started and ready to roll
93104
```
94105

95106
</details>

app-constants.js

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,11 @@ const Scopes = {
4040
UPDATE_WORK_PERIOD: 'update:taas-workPeriods',
4141
DELETE_WORK_PERIOD: 'delete:taas-workPeriods',
4242
ALL_WORK_PERIOD: 'all:taas-workPeriods',
43+
// work period payment
44+
READ_WORK_PERIOD_PAYMENT: 'read:taas-workPeriodPayments',
45+
CREATE_WORK_PERIOD_PAYMENT: 'create:taas-workPeriodPayments',
46+
UPDATE_WORK_PERIOD_PAYMENT: 'update:taas-workPeriodPayments',
47+
ALL_WORK_PERIOD_PAYMENT: 'all:taas-workPeriodPayments',
4348
// interview
4449
READ_INTERVIEW: 'read:taas-interviews',
4550
CREATE_INTERVIEW: 'create:taas-interviews',
@@ -63,9 +68,22 @@ const Interviews = {
6368
}
6469
}
6570

71+
const ChallengeStatus = {
72+
DRAFT: 'Draft',
73+
ACTIVE: 'Active',
74+
COMPLETED: 'Completed'
75+
}
76+
77+
const PaymentProcessingSwitch = {
78+
ON: 'ON',
79+
OFF: 'OFF'
80+
}
81+
6682
module.exports = {
6783
UserRoles,
6884
FullManagePermissionRoles,
6985
Scopes,
70-
Interviews
86+
Interviews,
87+
ChallengeStatus,
88+
PaymentProcessingSwitch
7189
}

config/default.js

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,12 +113,19 @@ module.exports = {
113113
// the delete resource booking entity Kafka message topic
114114
TAAS_RESOURCE_BOOKING_DELETE_TOPIC: process.env.TAAS_RESOURCE_BOOKING_DELETE_TOPIC || 'taas.resourcebooking.delete',
115115
// topics for work period service
116-
// the create rwork period entity Kafka message topic
116+
// the create work period entity Kafka message topic
117117
TAAS_WORK_PERIOD_CREATE_TOPIC: process.env.TAAS_WORK_PERIOD_CREATE_TOPIC || 'taas.workperiod.create',
118118
// the update work period entity Kafka message topic
119119
TAAS_WORK_PERIOD_UPDATE_TOPIC: process.env.TAAS_WORK_PERIOD_UPDATE_TOPIC || 'taas.workperiod.update',
120120
// the delete work period entity Kafka message topic
121121
TAAS_WORK_PERIOD_DELETE_TOPIC: process.env.TAAS_WORK_PERIOD_DELETE_TOPIC || 'taas.workperiod.delete',
122+
// topics for work period payment service
123+
// the create work period payment entity Kafka message topic
124+
TAAS_WORK_PERIOD_PAYMENT_CREATE_TOPIC: process.env.TAAS_WORK_PERIOD_PAYMENT_CREATE_TOPIC || 'taas.workperiodpayment.create',
125+
// the update work period payment entity Kafka message topic
126+
TAAS_WORK_PERIOD_PAYMENT_UPDATE_TOPIC: process.env.TAAS_WORK_PERIOD_PAYMENT_UPDATE_TOPIC || 'taas.workperiodpayment.update',
127+
// the delete work period payment entity Kafka message topic
128+
TAAS_WORK_PERIOD_PAYMENT_DELETE_TOPIC: process.env.TAAS_WORK_PERIOD_PAYMENT_DELETE_TOPIC || 'taas.workperiodpayment.delete',
122129
// topics for interview service
123130
// the request interview Kafka message topic
124131
TAAS_INTERVIEW_REQUEST_TOPIC: process.env.TAAS_INTERVIEW_REQUEST_TOPIC || 'taas.interview.requested',
@@ -148,5 +155,14 @@ module.exports = {
148155
// The sender (aka `from`) email for invitation.
149156
INTERVIEW_INVITATION_SENDER_EMAIL: process.env.INTERVIEW_INVITATION_SENDER_EMAIL,
150157
// the URL where TaaS App is hosted
151-
TAAS_APP_URL: process.env.TAAS_APP_URL || 'https://platform.topcoder-dev.com/taas/myteams'
158+
TAAS_APP_URL: process.env.TAAS_APP_URL || 'https://platform.topcoder-dev.com/taas/myteams',
159+
// environment variables for Payment Service
160+
ROLE_ID_SUBMITTER: process.env.ROLE_ID_SUBMITTER || '732339e7-8e30-49d7-9198-cccf9451e221',
161+
TYPE_ID_TASK: process.env.TYPE_ID_TASK || 'ecd58c69-238f-43a4-a4bb-d172719b9f31',
162+
DEFAULT_TIMELINE_TEMPLATE_ID: process.env.DEFAULT_TIMELINE_TEMPLATE_ID || '53a307ce-b4b3-4d6f-b9a1-3741a58f77e6',
163+
DEFAULT_TRACK_ID: process.env.DEFAULT_TRACK_ID || '9b6fc876-f4d9-4ccb-9dfd-419247628825',
164+
165+
// default time zone for Work Periods
166+
WORK_PERIOD_TIME_ZONE: process.env.WORK_PERIOD_TIME_ZONE || 'America/New_York',
167+
PAYMENT_PROCESSING_SWITCH: process.env.PAYMENT_PROCESSING_SWITCH || 'OFF'
152168
}

config/test.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,6 @@ module.exports = {
44
AUTH0_AUDIENCE: 'http://example.com',
55
AUTH0_AUDIENCE_UBAHN: 'http://example.com',
66
AUTH0_CLIENT_ID: 'fake_id',
7-
AUTH0_CLIENT_SECRET: 'fake_secret'
7+
AUTH0_CLIENT_SECRET: 'fake_secret',
8+
WORK_PERIOD_TIME_ZONE: 'America/New_York'
89
}

data/demo-data.json

Lines changed: 2386 additions & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)