Skip to content

Commit 18b3860

Browse files
committed
wp-wpp fields update
1 parent fe9dd0b commit 18b3860

File tree

4 files changed

+12
-6
lines changed

4 files changed

+12
-6
lines changed

src/bootstrap.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Joi.resourceBookingStatus = () => Joi.string().valid('placed', 'closed', 'cancel
1515
Joi.jobCandidateStatus = () => Joi.string().valid('open', 'placed', 'selected', 'client rejected - screening', 'client rejected - interview', 'rejected - other', 'cancelled', 'interview', 'topcoder-rejected', 'applied', 'rejected-pre-screen', 'skills-test', 'skills-test', 'phone-screen', 'job-closed', 'offered')
1616
Joi.workload = () => Joi.string().valid('full-time', 'fractional')
1717
Joi.title = () => Joi.string().max(128)
18-
Joi.paymentStatus = () => Joi.string().valid('pending', 'partially-completed', 'completed', 'cancelled')
18+
Joi.paymentStatus = () => Joi.string().valid('pending', 'in-progress', 'partially-completed', 'completed', 'failed', 'noDays')
1919
Joi.xaiTemplate = () => Joi.string().valid(...allowedXAITemplates)
2020
Joi.interviewStatus = () => Joi.string().valid(...allowedInterviewStatuses)
2121
Joi.workPeriodPaymentStatus = () => Joi.string().valid('completed', 'scheduled', 'in-progress', 'failed', 'cancelled')

src/scripts/createIndex.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,15 +119,18 @@ async function createIndex () {
119119
startDate: { type: 'date', format: 'yyyy-MM-dd' },
120120
endDate: { type: 'date', format: 'yyyy-MM-dd' },
121121
daysWorked: { type: 'integer' },
122-
memberRate: { type: 'float' },
123-
customerRate: { type: 'float' },
122+
daysPaid: { type: 'integer' },
123+
paymentTotal: { type: 'float' },
124124
paymentStatus: { type: 'keyword' },
125125
payments: {
126126
type: 'nested',
127127
properties: {
128128
id: { type: 'keyword' },
129129
workPeriodId: { type: 'keyword' },
130130
challengeId: { type: 'keyword' },
131+
memberRate: { type: 'float' },
132+
customerRate: { type: 'float' },
133+
days: { type: 'integer' },
131134
amount: { type: 'float' },
132135
status: { type: 'keyword' },
133136
statusDetails: {

src/services/WorkPeriodPaymentProcessorService.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@ processCreate.schema = {
6767
id: Joi.string().uuid().required(),
6868
workPeriodId: Joi.string().uuid().required(),
6969
challengeId: Joi.string().uuid().allow(null),
70+
memberRate: Joi.number().required(),
71+
customerRate: Joi.number().allow(null),
72+
days: Joi.number().integer().min(1).max(5).required(),
7073
amount: Joi.number().greater(0).allow(null),
7174
status: Joi.workPeriodPaymentStatus().required(),
7275
billingAccountId: Joi.number().allow(null),

src/services/WorkPeriodProcessorService.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,9 @@ processCreate.schema = {
7777
projectId: Joi.number().integer().required(),
7878
startDate: Joi.string().required(),
7979
endDate: Joi.string().required(),
80-
daysWorked: Joi.number().integer().min(0).allow(null),
81-
memberRate: Joi.number().allow(null),
82-
customerRate: Joi.number().allow(null),
80+
daysWorked: Joi.number().integer().min(0).max(5).required(),
81+
daysPaid: Joi.number().integer().min(0).max(5).required(),
82+
paymentTotal: Joi.number().min(0).required(),
8383
paymentStatus: Joi.paymentStatus().required(),
8484
createdAt: Joi.date().required(),
8585
createdBy: Joi.string().uuid().required(),

0 commit comments

Comments
 (0)