diff --git a/README.md b/README.md index 8a4496cd..a7698cde 100644 --- a/README.md +++ b/README.md @@ -278,6 +278,7 @@ The following parameters can be set in the config file or via env variables: - Split code into reusable methods where applicable. - Lint should pass. +- Unit tests should pass. ### Documentation and Utils diff --git a/config/default.js b/config/default.js index c67a54c3..8db522af 100644 --- a/config/default.js +++ b/config/default.js @@ -162,7 +162,5 @@ module.exports = { DEFAULT_TIMELINE_TEMPLATE_ID: process.env.DEFAULT_TIMELINE_TEMPLATE_ID || '53a307ce-b4b3-4d6f-b9a1-3741a58f77e6', DEFAULT_TRACK_ID: process.env.DEFAULT_TRACK_ID || '9b6fc876-f4d9-4ccb-9dfd-419247628825', - // default time zone for Work Periods - WORK_PERIOD_TIME_ZONE: process.env.WORK_PERIOD_TIME_ZONE || 'America/New_York', PAYMENT_PROCESSING_SWITCH: process.env.PAYMENT_PROCESSING_SWITCH || 'OFF' } diff --git a/config/test.js b/config/test.js index 561ce3a3..761b6ada 100644 --- a/config/test.js +++ b/config/test.js @@ -4,6 +4,5 @@ module.exports = { AUTH0_AUDIENCE: 'http://example.com', AUTH0_AUDIENCE_UBAHN: 'http://example.com', AUTH0_CLIENT_ID: 'fake_id', - AUTH0_CLIENT_SECRET: 'fake_secret', - WORK_PERIOD_TIME_ZONE: 'America/New_York' + AUTH0_CLIENT_SECRET: 'fake_secret' } diff --git a/data/demo-data.json b/data/demo-data.json index d34d0aed..2947b5d3 100644 --- a/data/demo-data.json +++ b/data/demo-data.json @@ -469,8 +469,8 @@ "userId": "213d2dd9-1fc3-4eda-ad97-2d56e2a84a1e", "jobId": "2d5e2a52-e0dd-4cd9-8f4c-7cffa43951d0", "status": "assigned", - "startDate": "2021-01-25T19:39:28.000Z", - "endDate": "2021-01-31T19:39:28.000Z", + "startDate": "2021-01-25", + "endDate": "2021-01-31", "memberRate": 1000, "customerRate": 1200, "rateType": "weekly", @@ -485,8 +485,8 @@ "userId": "05e988b7-7d54-4c10-ada1-1a04870a88a8", "jobId": "2d5e2a52-e0dd-4cd9-8f4c-7cffa43951d0", "status": "in-review", - "startDate": "2021-03-25T19:39:34.000Z", - "endDate": "2021-05-31T19:39:34.000Z", + "startDate": "2021-03-25", + "endDate": "2021-05-31", "memberRate": 1000, "customerRate": 1200, "rateType": "weekly", @@ -501,8 +501,8 @@ "userId": "6d0509c7-5f12-4d84-9a19-8e80ef7ddd66", "jobId": "2d5e2a52-e0dd-4cd9-8f4c-7cffa43951d0", "status": "assigned", - "startDate": "2021-02-27T08:40:03.000Z", - "endDate": "2021-03-15T09:40:03.000Z", + "startDate": "2021-02-27", + "endDate": "2021-03-15", "memberRate": 2000, "customerRate": 2500, "rateType": "weekly", @@ -517,8 +517,8 @@ "userId": "a2ffdeed-704d-4cf7-b70a-93fcf61de598", "jobId": "2d5e2a52-e0dd-4cd9-8f4c-7cffa43951d0", "status": "closed", - "startDate": "2021-02-25T13:39:39.000Z", - "endDate": "2021-04-01T05:39:39.000Z", + "startDate": "2021-02-25", + "endDate": "2021-04-01", "memberRate": 1000, "customerRate": 1200, "rateType": "weekly", @@ -533,8 +533,8 @@ "userId": "dd5adacb-444d-4992-8b7b-0c349be598db", "jobId": "2d5e2a52-e0dd-4cd9-8f4c-7cffa43951d0", "status": "assigned", - "startDate": "2021-03-18T04:39:58.000Z", - "endDate": "2021-05-28T09:39:58.000Z", + "startDate": "2021-03-18", + "endDate": "2021-05-28", "memberRate": 800, "customerRate": 1000, "rateType": "weekly", @@ -549,8 +549,8 @@ "userId": "f65e2104-2987-4136-839d-ee4632f0b2e5", "jobId": "2d5e2a52-e0dd-4cd9-8f4c-7cffa43951d0", "status": "assigned", - "startDate": "2000-03-27T11:17:23.000Z", - "endDate": "2000-04-27T22:17:23.000Z", + "startDate": "2000-03-27", + "endDate": "2000-04-27", "memberRate": 3000, "customerRate": 3500, "rateType": "weekly", @@ -565,8 +565,8 @@ "userId": "bef43122-426b-4b2b-acdd-9b5b3bd1c0bf", "jobId": "2d5e2a52-e0dd-4cd9-8f4c-7cffa43951d0", "status": "assigned", - "startDate": "2020-04-27T14:17:23.000Z", - "endDate": "2020-05-27T04:17:23.000Z", + "startDate": "2020-04-27", + "endDate": "2020-05-27", "memberRate": 0, "customerRate": 0, "rateType": "weekly", @@ -581,8 +581,8 @@ "userId": "4709473d-f060-4102-87f8-4d51ff0b34c1", "jobId": "2d5e2a52-e0dd-4cd9-8f4c-7cffa43951d0", "status": "cancelled", - "startDate": "2021-04-25T20:39:45.000Z", - "endDate": "2021-04-30T21:39:45.000Z", + "startDate": "2021-04-25", + "endDate": "2021-04-30", "memberRate": 1000, "customerRate": 1200, "rateType": "weekly", @@ -597,8 +597,8 @@ "userId": "39c7376e-2d5c-4601-bc47-6b60f505814d", "jobId": "2d5e2a52-e0dd-4cd9-8f4c-7cffa43951d0", "status": "sourcing", - "startDate": "2021-05-25T16:39:50.000Z", - "endDate": "2021-07-31T17:39:50.000Z", + "startDate": "2021-05-25", + "endDate": "2021-07-31", "memberRate": 1000, "customerRate": 1200, "rateType": "weekly", @@ -613,8 +613,8 @@ "userId": "e5e667ad-0950-43c2-8d1d-6e83ad7d1c7e", "jobId": "2d5e2a52-e0dd-4cd9-8f4c-7cffa43951d0", "status": "assigned", - "startDate": "2021-07-27T08:17:23.131Z", - "endDate": "2021-09-27T02:17:23.000Z", + "startDate": "2021-07-27", + "endDate": "2021-09-27", "memberRate": 1700, "customerRate": 1900, "rateType": "weekly", @@ -626,1105 +626,1193 @@ ], "WorkPeriod": [ { - "id": "db3ac57b-8e78-4b68-a0f7-4e928f3059af", - "resourceBookingId": "08f5e4b9-1088-496d-91a7-5b22a3583e3c", - "userHandle": "ritesh_cs", + "id": "07783b60-b726-41c2-8955-7766a27c1ec5", + "resourceBookingId": "7d967fed-9792-4768-98a7-0b644aa84f2e", + "userHandle": "sachin-wipro", "projectId": 111, - "startDate": "2021-01-24", - "endDate": "2021-01-30", - "daysWorked": 5, - "memberRate": null, - "customerRate": null, + "startDate": "2021-03-21", + "endDate": "2021-03-27", + "daysWorked": 2, + "memberRate": 4.8, + "customerRate": 4.95, "paymentStatus": "pending", "createdBy": "00000000-0000-0000-0000-000000000000", "updatedBy": null, - "createdAt": "2021-04-14T22:01:45.105Z", + "createdAt": "2021-04-21T20:24:52.705Z", "updatedAt": null }, { - "id": "a6c83e0d-de12-42f2-b689-85ad56470941", - "resourceBookingId": "08f5e4b9-1088-496d-91a7-5b22a3583e3c", - "userHandle": "ritesh_cs", + "id": "6ed667a5-275e-4f27-984b-34dff5f8a1ff", + "resourceBookingId": "dc4477ec-07f8-4c8e-a8fe-ffe38dd290fa", + "userHandle": "nskumar278", "projectId": 111, - "startDate": "2021-01-31", - "endDate": "2021-02-06", - "daysWorked": 0, - "memberRate": null, - "customerRate": null, + "startDate": "2021-08-01", + "endDate": "2021-08-07", + "daysWorked": 5, + "memberRate": 25.21, + "customerRate": 10.05, "paymentStatus": "pending", "createdBy": "00000000-0000-0000-0000-000000000000", "updatedBy": null, - "createdAt": "2021-04-14T22:01:45.105Z", + "createdAt": "2021-04-21T20:24:52.703Z", "updatedAt": null }, { - "id": "5342924e-a1ed-4164-a885-7ebb87215aa5", + "id": "d049e7bc-c827-482b-9ec6-b87d9289d1cd", "resourceBookingId": "8173579e-4b3c-418d-a9a1-c999caa38404", "userHandle": "testcat", "projectId": 111, - "startDate": "2020-04-26", - "endDate": "2020-05-02", - "daysWorked": 5, - "memberRate": null, - "customerRate": null, + "startDate": "2020-05-24", + "endDate": "2020-05-30", + "daysWorked": 3, + "memberRate": 24.46, + "customerRate": 18.76, "paymentStatus": "pending", "createdBy": "00000000-0000-0000-0000-000000000000", "updatedBy": null, - "createdAt": "2021-04-14T22:01:45.117Z", + "createdAt": "2021-04-21T20:24:52.806Z", "updatedAt": null }, { - "id": "b8390807-8ea7-4824-9f17-4500f46f893c", - "resourceBookingId": "8173579e-4b3c-418d-a9a1-c999caa38404", - "userHandle": "testcat", + "id": "1b633124-f62c-4026-b679-213cf5812689", + "resourceBookingId": "51b45f5d-5df2-46d5-9c3d-8a1323df38dd", + "userHandle": "amy_admin", "projectId": 111, - "startDate": "2020-05-03", - "endDate": "2020-05-09", + "startDate": "2021-03-28", + "endDate": "2021-04-03", "daysWorked": 5, - "memberRate": null, - "customerRate": null, + "memberRate": 23.35, + "customerRate": 18.76, "paymentStatus": "pending", "createdBy": "00000000-0000-0000-0000-000000000000", "updatedBy": null, - "createdAt": "2021-04-14T22:01:45.117Z", + "createdAt": "2021-04-21T20:24:52.704Z", "updatedAt": null }, { - "id": "da056ecd-6660-4fd8-aba4-acc7ec089926", - "resourceBookingId": "8173579e-4b3c-418d-a9a1-c999caa38404", - "userHandle": "testcat", + "id": "30c89d78-df85-44ed-92b2-b683d8960fc2", + "resourceBookingId": "51b45f5d-5df2-46d5-9c3d-8a1323df38dd", + "userHandle": "amy_admin", "projectId": 111, - "startDate": "2020-05-10", - "endDate": "2020-05-16", + "startDate": "2021-04-04", + "endDate": "2021-04-10", "daysWorked": 5, - "memberRate": null, - "customerRate": null, + "memberRate": 3.96, + "customerRate": 4.95, "paymentStatus": "pending", "createdBy": "00000000-0000-0000-0000-000000000000", "updatedBy": null, - "createdAt": "2021-04-14T22:01:45.117Z", + "createdAt": "2021-04-21T20:24:52.704Z", "updatedAt": null }, { - "id": "2cd7a726-9909-4764-9f24-8d9a8f3d011a", - "resourceBookingId": "8173579e-4b3c-418d-a9a1-c999caa38404", - "userHandle": "testcat", + "id": "531754f3-405e-42eb-932a-c1ce7b9386e7", + "resourceBookingId": "35e1abd8-1890-4664-bb52-aade382d7b66", + "userHandle": "lakshmiaconnmgr", "projectId": 111, - "startDate": "2020-05-24", - "endDate": "2020-05-30", - "daysWorked": 3, - "memberRate": null, - "customerRate": null, + "startDate": "2021-02-28", + "endDate": "2021-03-06", + "daysWorked": 5, + "memberRate": 3.62, + "customerRate": 10.05, "paymentStatus": "pending", "createdBy": "00000000-0000-0000-0000-000000000000", "updatedBy": null, - "createdAt": "2021-04-14T22:01:45.117Z", + "createdAt": "2021-04-21T20:24:52.695Z", "updatedAt": null }, { - "id": "7f646975-f984-4967-8788-f10c8db86b25", - "resourceBookingId": "d38a6223-3f91-4300-9ecb-6e5fee173625", - "userHandle": "nithyaasworld", + "id": "442b0543-e887-42be-9ff5-5fee825526be", + "resourceBookingId": "0a6799d7-f5d1-456b-8bf1-90619284b295", + "userHandle": "aaaa", "projectId": 111, - "startDate": "2021-05-23", - "endDate": "2021-05-29", - "daysWorked": 4, - "memberRate": null, - "customerRate": null, + "startDate": "2021-03-14", + "endDate": "2021-03-20", + "daysWorked": 1, + "memberRate": 23.81, + "customerRate": 15.49, "paymentStatus": "pending", "createdBy": "00000000-0000-0000-0000-000000000000", "updatedBy": null, - "createdAt": "2021-04-14T22:01:45.120Z", + "createdAt": "2021-04-21T20:24:52.694Z", "updatedAt": null }, { - "id": "459e0127-7f1b-41f6-9d62-d354ed537779", - "resourceBookingId": "d38a6223-3f91-4300-9ecb-6e5fee173625", - "userHandle": "nithyaasworld", + "id": "18a73600-5ee8-484b-9747-70ea80ce2bd9", + "resourceBookingId": "7d967fed-9792-4768-98a7-0b644aa84f2e", + "userHandle": "sachin-wipro", "projectId": 111, - "startDate": "2021-05-30", - "endDate": "2021-06-05", + "startDate": "2021-05-16", + "endDate": "2021-05-22", "daysWorked": 5, - "memberRate": null, - "customerRate": null, - "paymentStatus": "pending", + "memberRate": 28.76, + "customerRate": 25.9, + "paymentStatus": "completed", "createdBy": "00000000-0000-0000-0000-000000000000", "updatedBy": null, - "createdAt": "2021-04-14T22:01:45.120Z", + "createdAt": "2021-04-21T20:24:52.705Z", "updatedAt": null }, { - "id": "42f757a6-7bb3-48c2-a6cb-455d27a8821b", - "resourceBookingId": "d38a6223-3f91-4300-9ecb-6e5fee173625", - "userHandle": "nithyaasworld", + "id": "5392acee-b504-4720-95fa-dab585acb607", + "resourceBookingId": "0a6799d7-f5d1-456b-8bf1-90619284b295", + "userHandle": "aaaa", "projectId": 111, - "startDate": "2021-06-06", - "endDate": "2021-06-12", + "startDate": "2021-03-07", + "endDate": "2021-03-13", "daysWorked": 5, - "memberRate": null, - "customerRate": null, + "memberRate": 14.77, + "customerRate": 26.72, "paymentStatus": "pending", "createdBy": "00000000-0000-0000-0000-000000000000", "updatedBy": null, - "createdAt": "2021-04-14T22:01:45.120Z", + "createdAt": "2021-04-21T20:24:52.693Z", "updatedAt": null }, { - "id": "c17d9081-c442-4d55-be58-65916662653e", - "resourceBookingId": "d38a6223-3f91-4300-9ecb-6e5fee173625", - "userHandle": "nithyaasworld", + "id": "1bbc86c8-8c74-4d78-9706-25c4c99721f3", + "resourceBookingId": "35e1abd8-1890-4664-bb52-aade382d7b66", + "userHandle": "lakshmiaconnmgr", "projectId": 111, - "startDate": "2021-06-20", - "endDate": "2021-06-26", + "startDate": "2021-03-21", + "endDate": "2021-03-27", "daysWorked": 5, - "memberRate": null, - "customerRate": null, + "memberRate": 3.62, + "customerRate": 25.9, "paymentStatus": "pending", "createdBy": "00000000-0000-0000-0000-000000000000", "updatedBy": null, - "createdAt": "2021-04-14T22:01:45.120Z", + "createdAt": "2021-04-21T20:24:52.695Z", "updatedAt": null }, { - "id": "6768d502-5510-49d0-873f-346390ccf14d", - "resourceBookingId": "d38a6223-3f91-4300-9ecb-6e5fee173625", - "userHandle": "nithyaasworld", + "id": "8b7b49de-29b1-4a0c-bb67-e70cc700fcfd", + "resourceBookingId": "51b45f5d-5df2-46d5-9c3d-8a1323df38dd", + "userHandle": "amy_admin", "projectId": 111, - "startDate": "2021-06-27", - "endDate": "2021-07-03", + "startDate": "2021-04-25", + "endDate": "2021-05-01", "daysWorked": 5, - "memberRate": null, - "customerRate": null, + "memberRate": 24.68, + "customerRate": 23.15, "paymentStatus": "pending", "createdBy": "00000000-0000-0000-0000-000000000000", "updatedBy": null, - "createdAt": "2021-04-14T22:01:45.120Z", + "createdAt": "2021-04-21T20:24:52.704Z", "updatedAt": null }, { - "id": "7808d9ac-3c93-4c3f-ad35-12a0a45d51c6", - "resourceBookingId": "d38a6223-3f91-4300-9ecb-6e5fee173625", - "userHandle": "nithyaasworld", + "id": "b8a8b558-0cb9-46d0-ba9d-2222f3fbdb63", + "resourceBookingId": "dc4477ec-07f8-4c8e-a8fe-ffe38dd290fa", + "userHandle": "nskumar278", "projectId": 111, - "startDate": "2021-07-04", - "endDate": "2021-07-10", + "startDate": "2021-09-05", + "endDate": "2021-09-11", "daysWorked": 5, - "memberRate": null, - "customerRate": null, + "memberRate": 27.42, + "customerRate": 27.91, "paymentStatus": "pending", "createdBy": "00000000-0000-0000-0000-000000000000", "updatedBy": null, - "createdAt": "2021-04-14T22:01:45.120Z", + "createdAt": "2021-04-21T20:24:52.703Z", "updatedAt": null }, { - "id": "724815e6-5a66-44c7-8dd6-7a5005ec4367", - "resourceBookingId": "d38a6223-3f91-4300-9ecb-6e5fee173625", - "userHandle": "nithyaasworld", + "id": "f70509c0-baed-4ff1-8022-12441251f7af", + "resourceBookingId": "51b45f5d-5df2-46d5-9c3d-8a1323df38dd", + "userHandle": "amy_admin", "projectId": 111, - "startDate": "2021-07-11", - "endDate": "2021-07-17", + "startDate": "2021-03-14", + "endDate": "2021-03-20", + "daysWorked": 2, + "memberRate": 30.24, + "customerRate": 9.88, + "paymentStatus": "pending", + "createdBy": "00000000-0000-0000-0000-000000000000", + "updatedBy": null, + "createdAt": "2021-04-21T20:24:52.704Z", + "updatedAt": null + }, + { + "id": "da8abd64-2878-4e09-b3b1-41a27a0576d4", + "resourceBookingId": "dc4477ec-07f8-4c8e-a8fe-ffe38dd290fa", + "userHandle": "nskumar278", + "projectId": 111, + "startDate": "2021-09-12", + "endDate": "2021-09-18", "daysWorked": 5, - "memberRate": null, - "customerRate": null, + "memberRate": 16.86, + "customerRate": 4.05, "paymentStatus": "pending", "createdBy": "00000000-0000-0000-0000-000000000000", "updatedBy": null, - "createdAt": "2021-04-14T22:01:45.120Z", + "createdAt": "2021-04-21T20:24:52.703Z", "updatedAt": null }, { - "id": "57210895-2e2a-46f1-a0cc-05af4c30b188", - "resourceBookingId": "d38a6223-3f91-4300-9ecb-6e5fee173625", - "userHandle": "nithyaasworld", + "id": "b5261ee2-bc4d-4c3a-9d30-6703bfdcfbc5", + "resourceBookingId": "51b45f5d-5df2-46d5-9c3d-8a1323df38dd", + "userHandle": "amy_admin", "projectId": 111, - "startDate": "2021-07-25", - "endDate": "2021-07-31", + "startDate": "2021-05-23", + "endDate": "2021-05-29", "daysWorked": 5, - "memberRate": null, - "customerRate": null, + "memberRate": 24.68, + "customerRate": 27.91, + "paymentStatus": "completed", + "createdBy": "00000000-0000-0000-0000-000000000000", + "updatedBy": null, + "createdAt": "2021-04-21T20:24:52.704Z", + "updatedAt": null + }, + { + "id": "829165cb-0150-48e7-995c-f5b4d1a51d3b", + "resourceBookingId": "dc4477ec-07f8-4c8e-a8fe-ffe38dd290fa", + "userHandle": "nskumar278", + "projectId": 111, + "startDate": "2021-09-26", + "endDate": "2021-10-02", + "daysWorked": 1, + "memberRate": 4.8, + "customerRate": 10.59, "paymentStatus": "pending", "createdBy": "00000000-0000-0000-0000-000000000000", "updatedBy": null, - "createdAt": "2021-04-14T22:01:45.120Z", + "createdAt": "2021-04-21T20:24:52.703Z", "updatedAt": null }, { - "id": "3534343e-5b06-4299-b657-11b3b5175dce", - "resourceBookingId": "7d967fed-9792-4768-98a7-0b644aa84f2e", - "userHandle": "sachin-wipro", + "id": "2430fb35-826a-4e9f-8fb6-8dbcb035d505", + "resourceBookingId": "dc4477ec-07f8-4c8e-a8fe-ffe38dd290fa", + "userHandle": "nskumar278", "projectId": 111, - "startDate": "2021-03-21", - "endDate": "2021-03-27", - "daysWorked": 2, - "memberRate": null, - "customerRate": null, + "startDate": "2021-08-22", + "endDate": "2021-08-28", + "daysWorked": 5, + "memberRate": 6.18, + "customerRate": 4.05, "paymentStatus": "pending", "createdBy": "00000000-0000-0000-0000-000000000000", "updatedBy": null, - "createdAt": "2021-04-14T22:01:45.122Z", + "createdAt": "2021-04-21T20:24:52.703Z", "updatedAt": null }, { - "id": "50788ef6-73d9-455c-a5ea-44028d7b3bf2", - "resourceBookingId": "7d967fed-9792-4768-98a7-0b644aa84f2e", - "userHandle": "sachin-wipro", + "id": "c7ff2acc-a4c2-4e8b-a905-813dd9d1b293", + "resourceBookingId": "35e1abd8-1890-4664-bb52-aade382d7b66", + "userHandle": "lakshmiaconnmgr", "projectId": 111, "startDate": "2021-03-28", "endDate": "2021-04-03", - "daysWorked": 5, - "memberRate": null, - "customerRate": null, + "daysWorked": 4, + "memberRate": 24.46, + "customerRate": 4.05, "paymentStatus": "pending", "createdBy": "00000000-0000-0000-0000-000000000000", "updatedBy": null, - "createdAt": "2021-04-14T22:01:45.122Z", + "createdAt": "2021-04-21T20:24:52.695Z", "updatedAt": null }, { - "id": "2b2df620-fd88-4233-a0b8-242e0bb6ecb7", - "resourceBookingId": "7d967fed-9792-4768-98a7-0b644aa84f2e", - "userHandle": "sachin-wipro", + "id": "731db5d7-bb79-45f4-b1b2-9f60d30f7966", + "resourceBookingId": "08f5e4b9-1088-496d-91a7-5b22a3583e3c", + "userHandle": "ritesh_cs", "projectId": 111, - "startDate": "2021-04-04", - "endDate": "2021-04-10", - "daysWorked": 5, - "memberRate": null, - "customerRate": null, + "startDate": "2021-01-31", + "endDate": "2021-02-06", + "daysWorked": 0, + "memberRate": 27.42, + "customerRate": 4.4, "paymentStatus": "pending", "createdBy": "00000000-0000-0000-0000-000000000000", "updatedBy": null, - "createdAt": "2021-04-14T22:01:45.122Z", + "createdAt": "2021-04-21T20:24:52.775Z", "updatedAt": null }, { - "id": "970a2bbc-c5b7-4be5-ae63-3d9009ccf83b", - "resourceBookingId": "7d967fed-9792-4768-98a7-0b644aa84f2e", - "userHandle": "sachin-wipro", + "id": "b682660e-488e-4033-aaf3-ef37248abc90", + "resourceBookingId": "0a6799d7-f5d1-456b-8bf1-90619284b295", + "userHandle": "aaaa", "projectId": 111, - "startDate": "2021-04-11", - "endDate": "2021-04-17", - "daysWorked": 5, - "memberRate": null, - "customerRate": null, + "startDate": "2021-02-21", + "endDate": "2021-02-27", + "daysWorked": 0, + "memberRate": 24.46, + "customerRate": 2.55, "paymentStatus": "pending", "createdBy": "00000000-0000-0000-0000-000000000000", "updatedBy": null, - "createdAt": "2021-04-14T22:01:45.122Z", + "createdAt": "2021-04-21T20:24:52.693Z", "updatedAt": null }, { - "id": "c3b83d2b-f27b-4e4d-8f87-9f324f80a9bc", - "resourceBookingId": "7d967fed-9792-4768-98a7-0b644aa84f2e", - "userHandle": "sachin-wipro", + "id": "b4566e24-4fa8-4e82-9950-f62134bb00df", + "resourceBookingId": "dc4477ec-07f8-4c8e-a8fe-ffe38dd290fa", + "userHandle": "nskumar278", "projectId": 111, - "startDate": "2021-04-25", - "endDate": "2021-05-01", + "startDate": "2021-08-29", + "endDate": "2021-09-04", "daysWorked": 5, - "memberRate": null, - "customerRate": null, + "memberRate": 4.8, + "customerRate": 4.4, "paymentStatus": "pending", "createdBy": "00000000-0000-0000-0000-000000000000", "updatedBy": null, - "createdAt": "2021-04-14T22:01:45.122Z", + "createdAt": "2021-04-21T20:24:52.703Z", "updatedAt": null }, { - "id": "8dd12749-ef1d-4295-b050-8c3ecee1f846", - "resourceBookingId": "7d967fed-9792-4768-98a7-0b644aa84f2e", - "userHandle": "sachin-wipro", + "id": "584c931b-da72-416e-a011-eac5fe34f42f", + "resourceBookingId": "dc4477ec-07f8-4c8e-a8fe-ffe38dd290fa", + "userHandle": "nskumar278", "projectId": 111, - "startDate": "2021-05-09", - "endDate": "2021-05-15", + "startDate": "2021-07-25", + "endDate": "2021-07-31", + "daysWorked": 4, + "memberRate": 14.77, + "customerRate": 4.4, + "paymentStatus": "pending", + "createdBy": "00000000-0000-0000-0000-000000000000", + "updatedBy": null, + "createdAt": "2021-04-21T20:24:52.703Z", + "updatedAt": null + }, + { + "id": "703bc625-9144-4a9f-a91b-445e171d8ea9", + "resourceBookingId": "dc4477ec-07f8-4c8e-a8fe-ffe38dd290fa", + "userHandle": "nskumar278", + "projectId": 111, + "startDate": "2021-09-19", + "endDate": "2021-09-25", "daysWorked": 5, - "memberRate": null, - "customerRate": null, + "memberRate": 27.42, + "customerRate": 5.77, "paymentStatus": "pending", "createdBy": "00000000-0000-0000-0000-000000000000", "updatedBy": null, - "createdAt": "2021-04-14T22:01:45.122Z", + "createdAt": "2021-04-21T20:24:52.703Z", "updatedAt": null }, { - "id": "db0d8eab-13b0-4fd6-98fd-d2a82cd566ad", - "resourceBookingId": "7d967fed-9792-4768-98a7-0b644aa84f2e", - "userHandle": "sachin-wipro", + "id": "c9685cb2-9f4a-497e-ae99-deed7b16cc34", + "resourceBookingId": "35e1abd8-1890-4664-bb52-aade382d7b66", + "userHandle": "lakshmiaconnmgr", "projectId": 111, - "startDate": "2021-05-02", - "endDate": "2021-05-08", + "startDate": "2021-03-07", + "endDate": "2021-03-13", "daysWorked": 5, - "memberRate": null, - "customerRate": null, + "memberRate": 14.77, + "customerRate": 16.55, "paymentStatus": "completed", "createdBy": "00000000-0000-0000-0000-000000000000", "updatedBy": null, - "createdAt": "2021-04-14T22:01:45.122Z", + "createdAt": "2021-04-21T20:24:52.695Z", "updatedAt": null }, { - "id": "278bc7a0-a242-41a4-9d00-086f5d48d5da", + "id": "428fec88-b305-4816-b5ef-be2b4e91c21a", "resourceBookingId": "7d967fed-9792-4768-98a7-0b644aa84f2e", "userHandle": "sachin-wipro", "projectId": 111, - "startDate": "2021-04-18", - "endDate": "2021-04-24", + "startDate": "2021-04-04", + "endDate": "2021-04-10", "daysWorked": 5, - "memberRate": null, - "customerRate": null, - "paymentStatus": "cancelled", + "memberRate": 8.55, + "customerRate": 16.55, + "paymentStatus": "pending", "createdBy": "00000000-0000-0000-0000-000000000000", "updatedBy": null, - "createdAt": "2021-04-14T22:01:45.122Z", + "createdAt": "2021-04-21T20:24:52.705Z", "updatedAt": null }, { - "id": "0679b699-520b-4f8b-8eb6-a6aa53ec473c", + "id": "374e2065-40cb-4651-a55c-81a0675dc00d", "resourceBookingId": "8173579e-4b3c-418d-a9a1-c999caa38404", "userHandle": "testcat", "projectId": 111, "startDate": "2020-05-17", "endDate": "2020-05-23", "daysWorked": 5, - "memberRate": null, - "customerRate": null, - "paymentStatus": "completed", + "memberRate": 16.86, + "customerRate": 1.89, + "paymentStatus": "pending", "createdBy": "00000000-0000-0000-0000-000000000000", "updatedBy": null, - "createdAt": "2021-04-14T22:01:45.117Z", + "createdAt": "2021-04-21T20:24:52.806Z", "updatedAt": null }, { - "id": "c73aa1a0-cb32-4301-af96-5b33bdbda20f", - "resourceBookingId": "d38a6223-3f91-4300-9ecb-6e5fee173625", - "userHandle": "nithyaasworld", + "id": "4bfdc253-e39a-4cfa-9a45-2cfc6e93cc6f", + "resourceBookingId": "61f5d474-e41f-490b-ab58-9f983e3d4916", + "userHandle": "sonu628", "projectId": 111, - "startDate": "2021-06-13", - "endDate": "2021-06-19", + "startDate": "2000-04-16", + "endDate": "2000-04-22", "daysWorked": 5, - "memberRate": null, - "customerRate": null, - "paymentStatus": "partially-completed", + "memberRate": 20.16, + "customerRate": 13.92, + "paymentStatus": "pending", "createdBy": "00000000-0000-0000-0000-000000000000", "updatedBy": null, - "createdAt": "2021-04-14T22:01:45.120Z", + "createdAt": "2021-04-21T20:24:52.858Z", "updatedAt": null }, { - "id": "5b0eefe1-e45d-4150-b14e-a83ce19599eb", - "resourceBookingId": "d38a6223-3f91-4300-9ecb-6e5fee173625", - "userHandle": "nithyaasworld", + "id": "0ba1a0b3-7bee-4fe6-9083-d36d8ca9d052", + "resourceBookingId": "35e1abd8-1890-4664-bb52-aade382d7b66", + "userHandle": "lakshmiaconnmgr", "projectId": 111, - "startDate": "2021-07-18", - "endDate": "2021-07-24", + "startDate": "2021-03-14", + "endDate": "2021-03-20", "daysWorked": 5, - "memberRate": null, - "customerRate": null, - "paymentStatus": "partially-completed", + "memberRate": 24.46, + "customerRate": 1.44, + "paymentStatus": "pending", "createdBy": "00000000-0000-0000-0000-000000000000", "updatedBy": null, - "createdAt": "2021-04-14T22:01:45.120Z", + "createdAt": "2021-04-21T20:24:52.695Z", "updatedAt": null }, { - "id": "651a97b2-8019-49b7-9a8e-4c384c0615b7", - "resourceBookingId": "7d967fed-9792-4768-98a7-0b644aa84f2e", - "userHandle": "sachin-wipro", + "id": "6da7d347-7492-43b1-a49d-8a6e1daf9b22", + "resourceBookingId": "51b45f5d-5df2-46d5-9c3d-8a1323df38dd", + "userHandle": "amy_admin", "projectId": 111, - "startDate": "2021-05-16", - "endDate": "2021-05-22", + "startDate": "2021-04-18", + "endDate": "2021-04-24", "daysWorked": 5, - "memberRate": null, - "customerRate": null, + "memberRate": 25.21, + "customerRate": 1.44, "paymentStatus": "pending", "createdBy": "00000000-0000-0000-0000-000000000000", "updatedBy": null, - "createdAt": "2021-04-14T22:01:45.122Z", + "createdAt": "2021-04-21T20:24:52.704Z", "updatedAt": null }, { - "id": "fcdedc90-7c76-47ed-bb95-fb05ec3cd53a", - "resourceBookingId": "7d967fed-9792-4768-98a7-0b644aa84f2e", - "userHandle": "sachin-wipro", + "id": "8c8cedf3-0bb6-4063-8a3a-faf1626da384", + "resourceBookingId": "61f5d474-e41f-490b-ab58-9f983e3d4916", + "userHandle": "sonu628", "projectId": 111, - "startDate": "2021-05-23", - "endDate": "2021-05-29", + "startDate": "2000-04-09", + "endDate": "2000-04-15", + "daysWorked": 5, + "memberRate": 14.77, + "customerRate": 4.95, + "paymentStatus": "pending", + "createdBy": "00000000-0000-0000-0000-000000000000", + "updatedBy": null, + "createdAt": "2021-04-21T20:24:52.858Z", + "updatedAt": null + }, + { + "id": "10394696-47f4-4761-8d14-ffdf012cde23", + "resourceBookingId": "d38a6223-3f91-4300-9ecb-6e5fee173625", + "userHandle": "nithyaasworld", + "projectId": 111, + "startDate": "2021-07-25", + "endDate": "2021-07-31", "daysWorked": 5, - "memberRate": null, - "customerRate": null, + "memberRate": 3.62, + "customerRate": 4.95, "paymentStatus": "pending", "createdBy": "00000000-0000-0000-0000-000000000000", "updatedBy": null, - "createdAt": "2021-04-14T22:01:45.122Z", + "createdAt": "2021-04-21T20:24:52.706Z", "updatedAt": null }, { - "id": "0b65d948-0232-4f32-a455-b480da63320d", + "id": "64de2244-6fcf-45ac-8a89-a9b3420e4476", "resourceBookingId": "7d967fed-9792-4768-98a7-0b644aa84f2e", "userHandle": "sachin-wipro", "projectId": 111, - "startDate": "2021-05-30", - "endDate": "2021-06-05", - "daysWorked": 1, - "memberRate": null, - "customerRate": null, + "startDate": "2021-04-18", + "endDate": "2021-04-24", + "daysWorked": 5, + "memberRate": 22.57, + "customerRate": 18.23, "paymentStatus": "pending", "createdBy": "00000000-0000-0000-0000-000000000000", "updatedBy": null, - "createdAt": "2021-04-14T22:01:45.122Z", + "createdAt": "2021-04-21T20:24:52.705Z", "updatedAt": null }, { - "id": "1f106c81-7a0d-4fb1-9bf4-851d450709d8", - "resourceBookingId": "61f5d474-e41f-490b-ab58-9f983e3d4916", - "userHandle": "sonu628", + "id": "2cbe3836-5961-4d58-b8f7-44b84ddf3fc5", + "resourceBookingId": "7d967fed-9792-4768-98a7-0b644aa84f2e", + "userHandle": "sachin-wipro", "projectId": 111, - "startDate": "2000-03-26", - "endDate": "2000-04-01", + "startDate": "2021-04-11", + "endDate": "2021-04-17", "daysWorked": 5, - "memberRate": null, - "customerRate": null, + "memberRate": 25.21, + "customerRate": 2.64, "paymentStatus": "pending", "createdBy": "00000000-0000-0000-0000-000000000000", "updatedBy": null, - "createdAt": "2021-04-14T22:01:45.324Z", + "createdAt": "2021-04-21T20:24:52.705Z", "updatedAt": null }, { - "id": "84a9d3e9-ee3f-495b-98de-f9fe0f6a9371", - "resourceBookingId": "61f5d474-e41f-490b-ab58-9f983e3d4916", - "userHandle": "sonu628", + "id": "bc8611f0-4ac2-49b2-b776-59ed2b759d1d", + "resourceBookingId": "d38a6223-3f91-4300-9ecb-6e5fee173625", + "userHandle": "nithyaasworld", "projectId": 111, - "startDate": "2000-04-09", - "endDate": "2000-04-15", + "startDate": "2021-07-04", + "endDate": "2021-07-10", "daysWorked": 5, - "memberRate": null, - "customerRate": null, + "memberRate": 16.86, + "customerRate": 5.77, "paymentStatus": "pending", "createdBy": "00000000-0000-0000-0000-000000000000", "updatedBy": null, - "createdAt": "2021-04-14T22:01:45.324Z", + "createdAt": "2021-04-21T20:24:52.706Z", "updatedAt": null }, { - "id": "5f9dce2b-9426-4287-b3ab-7507ff3a2671", - "resourceBookingId": "61f5d474-e41f-490b-ab58-9f983e3d4916", - "userHandle": "sonu628", + "id": "9b6fc85b-3694-4e6c-9ebf-fe9ccf7881ba", + "resourceBookingId": "d38a6223-3f91-4300-9ecb-6e5fee173625", + "userHandle": "nithyaasworld", "projectId": 111, - "startDate": "2000-04-16", - "endDate": "2000-04-22", + "startDate": "2021-06-13", + "endDate": "2021-06-19", "daysWorked": 5, - "memberRate": null, - "customerRate": null, + "memberRate": 14.77, + "customerRate": 15.86, "paymentStatus": "pending", "createdBy": "00000000-0000-0000-0000-000000000000", "updatedBy": null, - "createdAt": "2021-04-14T22:01:45.324Z", + "createdAt": "2021-04-21T20:24:52.706Z", "updatedAt": null }, { - "id": "724b2338-c5bb-46ec-8e99-2417929eeab9", - "resourceBookingId": "61f5d474-e41f-490b-ab58-9f983e3d4916", - "userHandle": "sonu628", + "id": "4a2c581f-c626-44cb-8ada-58f0172e8b4d", + "resourceBookingId": "d38a6223-3f91-4300-9ecb-6e5fee173625", + "userHandle": "nithyaasworld", "projectId": 111, - "startDate": "2000-04-23", - "endDate": "2000-04-29", - "daysWorked": 4, - "memberRate": null, - "customerRate": null, + "startDate": "2021-05-30", + "endDate": "2021-06-05", + "daysWorked": 5, + "memberRate": 28.76, + "customerRate": 15.49, "paymentStatus": "pending", "createdBy": "00000000-0000-0000-0000-000000000000", "updatedBy": null, - "createdAt": "2021-04-14T22:01:45.324Z", + "createdAt": "2021-04-21T20:24:52.706Z", "updatedAt": null }, { - "id": "10de7920-5e12-4284-b95f-08adc0ff1c17", - "resourceBookingId": "a098e8d8-ce5b-47d9-afee-38b050d16745", - "userHandle": "TCConnCopilot", + "id": "90d99323-ba57-4a18-b50f-78f387033c70", + "resourceBookingId": "61f5d474-e41f-490b-ab58-9f983e3d4916", + "userHandle": "sonu628", "projectId": 111, - "startDate": "2021-04-25", - "endDate": "2021-05-01", + "startDate": "2000-04-02", + "endDate": "2000-04-08", "daysWorked": 5, - "memberRate": null, - "customerRate": null, - "paymentStatus": "pending", + "memberRate": 24.46, + "customerRate": 25.9, + "paymentStatus": "completed", "createdBy": "00000000-0000-0000-0000-000000000000", "updatedBy": null, - "createdAt": "2021-04-14T22:01:45.325Z", + "createdAt": "2021-04-21T20:24:52.858Z", "updatedAt": null }, { - "id": "c0fb6f01-7b71-471a-b85b-ea470d4dbd85", - "resourceBookingId": "35e1abd8-1890-4664-bb52-aade382d7b66", - "userHandle": "lakshmiaconnmgr", + "id": "5ddc132b-3205-45e3-bfe9-f1a4f939885e", + "resourceBookingId": "51b45f5d-5df2-46d5-9c3d-8a1323df38dd", + "userHandle": "amy_admin", "projectId": 111, - "startDate": "2021-02-21", - "endDate": "2021-02-27", - "daysWorked": 2, - "memberRate": null, - "customerRate": null, - "paymentStatus": "pending", + "startDate": "2021-03-21", + "endDate": "2021-03-27", + "daysWorked": 5, + "memberRate": 21.53, + "customerRate": 25.9, + "paymentStatus": "completed", "createdBy": "00000000-0000-0000-0000-000000000000", "updatedBy": null, - "createdAt": "2021-04-14T22:01:45.326Z", + "createdAt": "2021-04-21T20:24:52.704Z", "updatedAt": null }, { - "id": "0a3df77a-7841-4256-bb2c-d7e0fa17dc3f", - "resourceBookingId": "35e1abd8-1890-4664-bb52-aade382d7b66", - "userHandle": "lakshmiaconnmgr", + "id": "437d4281-43ec-4de3-85e4-51d298388ce5", + "resourceBookingId": "0a6799d7-f5d1-456b-8bf1-90619284b295", + "userHandle": "aaaa", "projectId": 111, "startDate": "2021-02-28", "endDate": "2021-03-06", "daysWorked": 5, - "memberRate": null, - "customerRate": null, - "paymentStatus": "pending", + "memberRate": 26.19, + "customerRate": 28.03, + "paymentStatus": "completed", "createdBy": "00000000-0000-0000-0000-000000000000", "updatedBy": null, - "createdAt": "2021-04-14T22:01:45.326Z", + "createdAt": "2021-04-21T20:24:52.693Z", "updatedAt": null }, { - "id": "9e0d10c3-f4c8-4ba6-8c11-333d9cdab634", - "resourceBookingId": "35e1abd8-1890-4664-bb52-aade382d7b66", - "userHandle": "lakshmiaconnmgr", + "id": "a35bb205-361b-4b2d-9828-55501ae9d190", + "resourceBookingId": "d38a6223-3f91-4300-9ecb-6e5fee173625", + "userHandle": "nithyaasworld", "projectId": 111, - "startDate": "2021-03-14", - "endDate": "2021-03-20", + "startDate": "2021-07-11", + "endDate": "2021-07-17", "daysWorked": 5, - "memberRate": null, - "customerRate": null, + "memberRate": 27.42, + "customerRate": 28.03, "paymentStatus": "pending", "createdBy": "00000000-0000-0000-0000-000000000000", "updatedBy": null, - "createdAt": "2021-04-14T22:01:45.326Z", + "createdAt": "2021-04-21T20:24:52.706Z", "updatedAt": null }, { - "id": "66d47a95-a4f8-43a5-bfe2-af8f5a2b64ac", - "resourceBookingId": "35e1abd8-1890-4664-bb52-aade382d7b66", - "userHandle": "lakshmiaconnmgr", + "id": "40ae1e8f-24be-4b51-885c-51f08e15f0df", + "resourceBookingId": "08f5e4b9-1088-496d-91a7-5b22a3583e3c", + "userHandle": "ritesh_cs", "projectId": 111, - "startDate": "2021-03-21", - "endDate": "2021-03-27", + "startDate": "2021-01-24", + "endDate": "2021-01-30", "daysWorked": 5, - "memberRate": null, - "customerRate": null, + "memberRate": 16.86, + "customerRate": 28.03, "paymentStatus": "pending", "createdBy": "00000000-0000-0000-0000-000000000000", "updatedBy": null, - "createdAt": "2021-04-14T22:01:45.326Z", + "createdAt": "2021-04-21T20:24:52.775Z", "updatedAt": null }, { - "id": "c10cca56-b0c4-4e87-a64f-9a14d7445436", - "resourceBookingId": "51b45f5d-5df2-46d5-9c3d-8a1323df38dd", - "userHandle": "amy_admin", + "id": "e19bddc5-38ac-43c9-8273-bc9069de26b3", + "resourceBookingId": "61f5d474-e41f-490b-ab58-9f983e3d4916", + "userHandle": "sonu628", "projectId": 111, - "startDate": "2021-03-21", - "endDate": "2021-03-27", + "startDate": "2000-04-23", + "endDate": "2000-04-29", "daysWorked": 5, - "memberRate": null, - "customerRate": null, + "memberRate": 6.18, + "customerRate": 9.12, "paymentStatus": "pending", "createdBy": "00000000-0000-0000-0000-000000000000", "updatedBy": null, - "createdAt": "2021-04-14T22:01:45.361Z", + "createdAt": "2021-04-21T20:24:52.858Z", "updatedAt": null }, { - "id": "c8d38387-b4a2-49f8-bbba-2f10f50c99db", - "resourceBookingId": "51b45f5d-5df2-46d5-9c3d-8a1323df38dd", - "userHandle": "amy_admin", + "id": "bf61dad8-841a-4913-93f6-b2ae516b8b11", + "resourceBookingId": "d38a6223-3f91-4300-9ecb-6e5fee173625", + "userHandle": "nithyaasworld", "projectId": 111, - "startDate": "2021-03-28", - "endDate": "2021-04-03", + "startDate": "2021-06-06", + "endDate": "2021-06-12", "daysWorked": 5, - "memberRate": null, - "customerRate": null, + "memberRate": 6.18, + "customerRate": 4.4, "paymentStatus": "pending", "createdBy": "00000000-0000-0000-0000-000000000000", "updatedBy": null, - "createdAt": "2021-04-14T22:01:45.361Z", + "createdAt": "2021-04-21T20:24:52.706Z", "updatedAt": null }, { - "id": "07dd0d62-e5cc-49a8-8b4c-966a2348095f", - "resourceBookingId": "51b45f5d-5df2-46d5-9c3d-8a1323df38dd", - "userHandle": "amy_admin", + "id": "93b0f03b-219b-41d5-bb1e-f125651b1b0e", + "resourceBookingId": "8173579e-4b3c-418d-a9a1-c999caa38404", + "userHandle": "testcat", "projectId": 111, - "startDate": "2021-04-04", - "endDate": "2021-04-10", + "startDate": "2020-05-03", + "endDate": "2020-05-09", "daysWorked": 5, - "memberRate": null, - "customerRate": null, + "memberRate": 24.46, + "customerRate": 1.89, "paymentStatus": "pending", "createdBy": "00000000-0000-0000-0000-000000000000", "updatedBy": null, - "createdAt": "2021-04-14T22:01:45.361Z", + "createdAt": "2021-04-21T20:24:52.806Z", "updatedAt": null }, { - "id": "c3c4593a-2a06-4ee8-8cbb-5a3ffad8ad7d", - "resourceBookingId": "51b45f5d-5df2-46d5-9c3d-8a1323df38dd", - "userHandle": "amy_admin", + "id": "93e69f99-cb1c-418e-aa41-ab2181b4bcfd", + "resourceBookingId": "d38a6223-3f91-4300-9ecb-6e5fee173625", + "userHandle": "nithyaasworld", "projectId": 111, - "startDate": "2021-04-11", - "endDate": "2021-04-17", + "startDate": "2021-06-27", + "endDate": "2021-07-03", "daysWorked": 5, - "memberRate": null, - "customerRate": null, + "memberRate": 17.2, + "customerRate": 13.92, "paymentStatus": "pending", "createdBy": "00000000-0000-0000-0000-000000000000", "updatedBy": null, - "createdAt": "2021-04-14T22:01:45.361Z", + "createdAt": "2021-04-21T20:24:52.706Z", "updatedAt": null }, { - "id": "9f117273-bb2f-48ab-bf3a-c13652483ea3", - "resourceBookingId": "51b45f5d-5df2-46d5-9c3d-8a1323df38dd", - "userHandle": "amy_admin", + "id": "619a0835-730f-47ec-820e-3959821aec51", + "resourceBookingId": "7d967fed-9792-4768-98a7-0b644aa84f2e", + "userHandle": "sachin-wipro", "projectId": 111, - "startDate": "2021-04-18", - "endDate": "2021-04-24", - "daysWorked": 5, - "memberRate": null, - "customerRate": null, + "startDate": "2021-05-30", + "endDate": "2021-06-05", + "daysWorked": 1, + "memberRate": 4.8, + "customerRate": 13.92, "paymentStatus": "pending", "createdBy": "00000000-0000-0000-0000-000000000000", "updatedBy": null, - "createdAt": "2021-04-14T22:01:45.361Z", + "createdAt": "2021-04-21T20:24:52.705Z", "updatedAt": null }, { - "id": "3a909050-444a-4a82-9961-d390212e86f5", - "resourceBookingId": "51b45f5d-5df2-46d5-9c3d-8a1323df38dd", - "userHandle": "amy_admin", + "id": "558b4685-4932-492e-99e1-2830c10f8275", + "resourceBookingId": "7d967fed-9792-4768-98a7-0b644aa84f2e", + "userHandle": "sachin-wipro", "projectId": 111, "startDate": "2021-04-25", "endDate": "2021-05-01", "daysWorked": 5, - "memberRate": null, - "customerRate": null, + "memberRate": 4.8, + "customerRate": 13.92, "paymentStatus": "pending", "createdBy": "00000000-0000-0000-0000-000000000000", "updatedBy": null, - "createdAt": "2021-04-14T22:01:45.361Z", + "createdAt": "2021-04-21T20:24:52.705Z", + "updatedAt": null + }, + { + "id": "84431dac-019d-4987-9817-15f5f000d2db", + "resourceBookingId": "61f5d474-e41f-490b-ab58-9f983e3d4916", + "userHandle": "sonu628", + "projectId": 111, + "startDate": "2000-03-26", + "endDate": "2000-04-01", + "daysWorked": 5, + "memberRate": 27.42, + "customerRate": 4.05, + "paymentStatus": "partially-completed", + "createdBy": "00000000-0000-0000-0000-000000000000", + "updatedBy": null, + "createdAt": "2021-04-21T20:24:52.858Z", "updatedAt": null }, { - "id": "b9a8ac04-5b06-4093-ac50-ce556d25b421", + "id": "f575df2d-f170-4251-9042-b17ca5e99ca5", "resourceBookingId": "51b45f5d-5df2-46d5-9c3d-8a1323df38dd", "userHandle": "amy_admin", "projectId": 111, "startDate": "2021-05-02", "endDate": "2021-05-08", "daysWorked": 5, - "memberRate": null, - "customerRate": null, - "paymentStatus": "pending", + "memberRate": 4.82, + "customerRate": 4.05, + "paymentStatus": "completed", "createdBy": "00000000-0000-0000-0000-000000000000", "updatedBy": null, - "createdAt": "2021-04-14T22:01:45.361Z", + "createdAt": "2021-04-21T20:24:52.704Z", "updatedAt": null }, { - "id": "a2b708d1-e234-4573-b5ca-7dc36a20c0d7", + "id": "3829c216-ef3f-466c-93da-3a88a961442f", "resourceBookingId": "51b45f5d-5df2-46d5-9c3d-8a1323df38dd", "userHandle": "amy_admin", "projectId": 111, - "startDate": "2021-05-16", - "endDate": "2021-05-22", + "startDate": "2021-05-09", + "endDate": "2021-05-15", "daysWorked": 5, - "memberRate": null, - "customerRate": null, - "paymentStatus": "pending", + "memberRate": 6.18, + "customerRate": 4.4, + "paymentStatus": "cancelled", "createdBy": "00000000-0000-0000-0000-000000000000", "updatedBy": null, - "createdAt": "2021-04-14T22:01:45.361Z", + "createdAt": "2021-04-21T20:24:52.704Z", "updatedAt": null }, { - "id": "768051e3-9765-498f-9b58-17c3377eced8", - "resourceBookingId": "51b45f5d-5df2-46d5-9c3d-8a1323df38dd", - "userHandle": "amy_admin", + "id": "bd54bcaf-5278-467f-a166-865048774d0e", + "resourceBookingId": "a098e8d8-ce5b-47d9-afee-38b050d16745", + "userHandle": "TCConnCopilot", "projectId": 111, - "startDate": "2021-05-23", - "endDate": "2021-05-29", + "startDate": "2021-04-25", + "endDate": "2021-05-01", "daysWorked": 5, - "memberRate": null, - "customerRate": null, - "paymentStatus": "pending", + "memberRate": 16.86, + "customerRate": 1.89, + "paymentStatus": "partially-completed", "createdBy": "00000000-0000-0000-0000-000000000000", "updatedBy": null, - "createdAt": "2021-04-14T22:01:45.361Z", + "createdAt": "2021-04-21T20:24:52.696Z", "updatedAt": null }, { - "id": "d94e0c2f-15de-4d07-a098-200daaa05f54", + "id": "7f8f3a25-b1d2-4e36-a543-fcaae57a32f5", "resourceBookingId": "dc4477ec-07f8-4c8e-a8fe-ffe38dd290fa", "userHandle": "nskumar278", "projectId": 111, - "startDate": "2021-07-25", - "endDate": "2021-07-31", - "daysWorked": 4, - "memberRate": null, - "customerRate": null, - "paymentStatus": "pending", + "startDate": "2021-08-15", + "endDate": "2021-08-21", + "daysWorked": 5, + "memberRate": 8.13, + "customerRate": 1.89, + "paymentStatus": "cancelled", "createdBy": "00000000-0000-0000-0000-000000000000", "updatedBy": null, - "createdAt": "2021-04-14T22:01:45.390Z", + "createdAt": "2021-04-21T20:24:52.703Z", "updatedAt": null }, { - "id": "93910ea8-28ac-40a3-91b0-35eab59405da", + "id": "6e1dc024-d437-4d9f-92e9-561db713a19a", "resourceBookingId": "dc4477ec-07f8-4c8e-a8fe-ffe38dd290fa", "userHandle": "nskumar278", "projectId": 111, - "startDate": "2021-08-01", - "endDate": "2021-08-07", + "startDate": "2021-08-08", + "endDate": "2021-08-14", "daysWorked": 5, - "memberRate": null, - "customerRate": null, - "paymentStatus": "pending", + "memberRate": 3.62, + "customerRate": 18.14, + "paymentStatus": "partially-completed", "createdBy": "00000000-0000-0000-0000-000000000000", "updatedBy": null, - "createdAt": "2021-04-14T22:01:45.390Z", + "createdAt": "2021-04-21T20:24:52.703Z", "updatedAt": null }, { - "id": "33561804-7a27-4cff-9e57-c09c914bbf12", - "resourceBookingId": "dc4477ec-07f8-4c8e-a8fe-ffe38dd290fa", - "userHandle": "nskumar278", + "id": "c5f6ae8f-2976-46d1-bd66-58eeb58ca045", + "resourceBookingId": "d38a6223-3f91-4300-9ecb-6e5fee173625", + "userHandle": "nithyaasworld", "projectId": 111, - "startDate": "2021-08-15", - "endDate": "2021-08-21", + "startDate": "2021-06-20", + "endDate": "2021-06-26", "daysWorked": 5, - "memberRate": null, - "customerRate": null, - "paymentStatus": "pending", + "memberRate": 25.41, + "customerRate": 13.92, + "paymentStatus": "cancelled", "createdBy": "00000000-0000-0000-0000-000000000000", "updatedBy": null, - "createdAt": "2021-04-14T22:01:45.390Z", + "createdAt": "2021-04-21T20:24:52.706Z", "updatedAt": null }, { - "id": "2e874752-81e1-451d-b5c9-7455135daee9", - "resourceBookingId": "dc4477ec-07f8-4c8e-a8fe-ffe38dd290fa", - "userHandle": "nskumar278", + "id": "0f480aa7-1c5d-42fe-aad6-c774e58c2e17", + "resourceBookingId": "7d967fed-9792-4768-98a7-0b644aa84f2e", + "userHandle": "sachin-wipro", "projectId": 111, - "startDate": "2021-08-22", - "endDate": "2021-08-28", + "startDate": "2021-05-09", + "endDate": "2021-05-15", "daysWorked": 5, - "memberRate": null, - "customerRate": null, - "paymentStatus": "pending", + "memberRate": 4.82, + "customerRate": 4.95, + "paymentStatus": "cancelled", "createdBy": "00000000-0000-0000-0000-000000000000", "updatedBy": null, - "createdAt": "2021-04-14T22:01:45.390Z", + "createdAt": "2021-04-21T20:24:52.705Z", "updatedAt": null }, { - "id": "3313e61b-8733-496e-9c79-9b1e3ff5e074", - "resourceBookingId": "dc4477ec-07f8-4c8e-a8fe-ffe38dd290fa", - "userHandle": "nskumar278", + "id": "098ca553-6ea4-4cae-a18e-762f47e93d82", + "resourceBookingId": "51b45f5d-5df2-46d5-9c3d-8a1323df38dd", + "userHandle": "amy_admin", "projectId": 111, - "startDate": "2021-09-12", - "endDate": "2021-09-18", + "startDate": "2021-05-16", + "endDate": "2021-05-22", "daysWorked": 5, - "memberRate": null, - "customerRate": null, - "paymentStatus": "pending", + "memberRate": 3.96, + "customerRate": 4.95, + "paymentStatus": "completed", "createdBy": "00000000-0000-0000-0000-000000000000", "updatedBy": null, - "createdAt": "2021-04-14T22:01:45.390Z", + "createdAt": "2021-04-21T20:24:52.704Z", "updatedAt": null }, { - "id": "8019e0c4-201a-469f-901b-8e84f43f577b", - "resourceBookingId": "dc4477ec-07f8-4c8e-a8fe-ffe38dd290fa", - "userHandle": "nskumar278", + "id": "729a2396-2b33-4185-8ce8-d929dbf4a472", + "resourceBookingId": "7d967fed-9792-4768-98a7-0b644aa84f2e", + "userHandle": "sachin-wipro", "projectId": 111, - "startDate": "2021-09-19", - "endDate": "2021-09-25", + "startDate": "2021-05-23", + "endDate": "2021-05-29", "daysWorked": 5, - "memberRate": null, - "customerRate": null, - "paymentStatus": "pending", + "memberRate": 17.2, + "customerRate": 4.95, + "paymentStatus": "completed", "createdBy": "00000000-0000-0000-0000-000000000000", "updatedBy": null, - "createdAt": "2021-04-14T22:01:45.390Z", + "createdAt": "2021-04-21T20:24:52.705Z", "updatedAt": null }, { - "id": "2b660631-fbd0-47fb-9ab4-f4e809650e44", - "resourceBookingId": "dc4477ec-07f8-4c8e-a8fe-ffe38dd290fa", - "userHandle": "nskumar278", - "projectId": 111, - "startDate": "2021-09-26", - "endDate": "2021-10-02", - "daysWorked": 0, - "memberRate": null, - "customerRate": null, - "paymentStatus": "pending", - "createdBy": "00000000-0000-0000-0000-000000000000", - "updatedBy": null, - "createdAt": "2021-04-14T22:01:45.390Z", - "updatedAt": null - }, - { - "id": "f93b73e0-25eb-4c67-a6f0-1b658186ae29", - "resourceBookingId": "0a6799d7-f5d1-456b-8bf1-90619284b295", - "userHandle": "aaaa", - "projectId": 111, - "startDate": "2021-02-21", - "endDate": "2021-02-27", - "daysWorked": 0, - "memberRate": null, - "customerRate": null, - "paymentStatus": "pending", - "createdBy": "00000000-0000-0000-0000-000000000000", - "updatedBy": null, - "createdAt": "2021-04-14T22:01:45.523Z", - "updatedAt": null - }, - { - "id": "e2d7651c-b8b6-453a-b472-478fe679a22f", - "resourceBookingId": "0a6799d7-f5d1-456b-8bf1-90619284b295", - "userHandle": "aaaa", + "id": "9bfbd49a-e6bb-45c3-965d-ed4f95f0878a", + "resourceBookingId": "d38a6223-3f91-4300-9ecb-6e5fee173625", + "userHandle": "nithyaasworld", "projectId": 111, - "startDate": "2021-02-28", - "endDate": "2021-03-06", + "startDate": "2021-07-18", + "endDate": "2021-07-24", "daysWorked": 5, - "memberRate": null, - "customerRate": null, - "paymentStatus": "pending", + "memberRate": 23.35, + "customerRate": 5.77, + "paymentStatus": "completed", "createdBy": "00000000-0000-0000-0000-000000000000", "updatedBy": null, - "createdAt": "2021-04-14T22:01:45.523Z", + "createdAt": "2021-04-21T20:24:52.706Z", "updatedAt": null }, { - "id": "0ed89458-ab82-485e-9727-858e7c25d477", - "resourceBookingId": "0a6799d7-f5d1-456b-8bf1-90619284b295", - "userHandle": "aaaa", + "id": "dcc310cf-ea4a-4637-9bf5-5baaabea67b3", + "resourceBookingId": "d38a6223-3f91-4300-9ecb-6e5fee173625", + "userHandle": "nithyaasworld", "projectId": 111, - "startDate": "2021-03-14", - "endDate": "2021-03-20", - "daysWorked": 1, - "memberRate": null, - "customerRate": null, - "paymentStatus": "pending", + "startDate": "2021-05-23", + "endDate": "2021-05-29", + "daysWorked": 4, + "memberRate": 14.77, + "customerRate": 1.44, + "paymentStatus": "partially-completed", "createdBy": "00000000-0000-0000-0000-000000000000", "updatedBy": null, - "createdAt": "2021-04-14T22:01:45.523Z", + "createdAt": "2021-04-21T20:24:52.706Z", "updatedAt": null }, { - "id": "c1de1dd6-64b9-4dc6-b463-48c280a01465", - "resourceBookingId": "0a6799d7-f5d1-456b-8bf1-90619284b295", - "userHandle": "aaaa", + "id": "309f65e8-b0b5-4cbb-ba60-9b36ccba4bd5", + "resourceBookingId": "51b45f5d-5df2-46d5-9c3d-8a1323df38dd", + "userHandle": "amy_admin", "projectId": 111, - "startDate": "2021-03-07", - "endDate": "2021-03-13", + "startDate": "2021-04-11", + "endDate": "2021-04-17", "daysWorked": 5, - "memberRate": null, - "customerRate": null, + "memberRate": 14.77, + "customerRate": 15.49, "paymentStatus": "completed", "createdBy": "00000000-0000-0000-0000-000000000000", "updatedBy": null, - "createdAt": "2021-04-14T22:01:45.523Z", + "createdAt": "2021-04-21T20:24:52.704Z", "updatedAt": null }, { - "id": "4b5ce032-7c8d-423a-bec3-f469cb869088", - "resourceBookingId": "35e1abd8-1890-4664-bb52-aade382d7b66", - "userHandle": "lakshmiaconnmgr", + "id": "1e2c732e-ac1f-47ad-939b-22b2078124e5", + "resourceBookingId": "7d967fed-9792-4768-98a7-0b644aa84f2e", + "userHandle": "sachin-wipro", "projectId": 111, "startDate": "2021-03-28", "endDate": "2021-04-03", - "daysWorked": 4, - "memberRate": null, - "customerRate": null, + "daysWorked": 5, + "memberRate": 17.2, + "customerRate": 15.49, "paymentStatus": "partially-completed", "createdBy": "00000000-0000-0000-0000-000000000000", "updatedBy": null, - "createdAt": "2021-04-14T22:01:45.326Z", + "createdAt": "2021-04-21T20:24:52.705Z", "updatedAt": null }, { - "id": "1b5e7460-c197-4f38-8f53-80e651ee32fe", - "resourceBookingId": "35e1abd8-1890-4664-bb52-aade382d7b66", - "userHandle": "lakshmiaconnmgr", + "id": "2463003f-ee60-4aba-b989-b63babcd9b8b", + "resourceBookingId": "7d967fed-9792-4768-98a7-0b644aa84f2e", + "userHandle": "sachin-wipro", "projectId": 111, - "startDate": "2021-03-07", - "endDate": "2021-03-13", + "startDate": "2021-05-02", + "endDate": "2021-05-08", "daysWorked": 5, - "memberRate": null, - "customerRate": null, + "memberRate": 4.8, + "customerRate": 15.49, "paymentStatus": "cancelled", "createdBy": "00000000-0000-0000-0000-000000000000", "updatedBy": null, - "createdAt": "2021-04-14T22:01:45.326Z", + "createdAt": "2021-04-21T20:24:52.705Z", "updatedAt": null }, { - "id": "6aae6de0-0f64-4af6-a4a4-a9920cf873fa", - "resourceBookingId": "51b45f5d-5df2-46d5-9c3d-8a1323df38dd", - "userHandle": "amy_admin", + "id": "6a1180b8-38af-4bd0-8a5f-a60626e0bc95", + "resourceBookingId": "8173579e-4b3c-418d-a9a1-c999caa38404", + "userHandle": "testcat", "projectId": 111, - "startDate": "2021-03-14", - "endDate": "2021-03-20", - "daysWorked": 2, - "memberRate": null, - "customerRate": null, + "startDate": "2020-04-26", + "endDate": "2020-05-02", + "daysWorked": 5, + "memberRate": 26.19, + "customerRate": 28.03, "paymentStatus": "completed", "createdBy": "00000000-0000-0000-0000-000000000000", "updatedBy": null, - "createdAt": "2021-04-14T22:01:45.361Z", + "createdAt": "2021-04-21T20:24:52.806Z", "updatedAt": null }, { - "id": "87f41144-95d3-427d-b5bf-161250a6b9e4", - "resourceBookingId": "51b45f5d-5df2-46d5-9c3d-8a1323df38dd", - "userHandle": "amy_admin", + "id": "b21f921a-4b23-423d-814b-d31f5cba7f64", + "resourceBookingId": "35e1abd8-1890-4664-bb52-aade382d7b66", + "userHandle": "lakshmiaconnmgr", "projectId": 111, - "startDate": "2021-05-09", - "endDate": "2021-05-15", - "daysWorked": 5, - "memberRate": null, - "customerRate": null, - "paymentStatus": "completed", + "startDate": "2021-02-21", + "endDate": "2021-02-27", + "daysWorked": 2, + "memberRate": 15.77, + "customerRate": 28.03, + "paymentStatus": "partially-completed", "createdBy": "00000000-0000-0000-0000-000000000000", "updatedBy": null, - "createdAt": "2021-04-14T22:01:45.361Z", + "createdAt": "2021-04-21T20:24:52.695Z", "updatedAt": null }, { - "id": "06fda3ca-e583-4466-baeb-70dac8952151", - "resourceBookingId": "61f5d474-e41f-490b-ab58-9f983e3d4916", - "userHandle": "sonu628", + "id": "4db82b0b-4d6f-4e9a-b957-ab405b2c2df2", + "resourceBookingId": "8173579e-4b3c-418d-a9a1-c999caa38404", + "userHandle": "testcat", "projectId": 111, - "startDate": "2000-04-02", - "endDate": "2000-04-08", + "startDate": "2020-05-10", + "endDate": "2020-05-16", "daysWorked": 5, - "memberRate": null, - "customerRate": null, + "memberRate": 24.46, + "customerRate": 28.03, "paymentStatus": "partially-completed", "createdBy": "00000000-0000-0000-0000-000000000000", "updatedBy": null, - "createdAt": "2021-04-14T22:01:45.324Z", + "createdAt": "2021-04-21T20:24:52.806Z", "updatedAt": null + } + ], + "WorkPeriodPayment": [ + { + "id": "2c488b36-0868-4db6-8978-20b1ce174496", + "workPeriodId": "07783b60-b726-41c2-8955-7766a27c1ec5", + "challengeId": "0de972b8-6cc9-4625-9760-1c77561c29e9", + "amount": 200, + "status": "completed", + "createdBy": "57646ff9-1cd3-4d3c-88ba-eb09a395366c", + "updatedBy": null, + "createdAt": "2021-04-14T19:13:23.714Z", + "updatedAt": "2021-04-21T20:19:56.934Z" }, { - "id": "2530239e-fcd7-43a1-81ca-1df38e8744fc", - "resourceBookingId": "dc4477ec-07f8-4c8e-a8fe-ffe38dd290fa", - "userHandle": "nskumar278", - "projectId": 111, - "startDate": "2021-08-29", - "endDate": "2021-09-04", - "daysWorked": 5, - "memberRate": null, - "customerRate": null, - "paymentStatus": "completed", - "createdBy": "00000000-0000-0000-0000-000000000000", + "id": "d0f61c2d-271c-48b2-8416-50c1c32ad32b", + "workPeriodId": "098ca553-6ea4-4cae-a18e-762f47e93d82", + "challengeId": "aa8c1945-904c-42a7-9b00-1e4f9a49dcdb", + "amount": 450, + "status": "completed", + "createdBy": "57646ff9-1cd3-4d3c-88ba-eb09a395366c", "updatedBy": null, - "createdAt": "2021-04-14T22:01:45.390Z", - "updatedAt": null + "createdAt": "2021-04-14T22:01:45.361Z", + "updatedAt": "2021-04-21T20:19:56.934Z" }, { - "id": "7f58f304-800f-4304-9aa1-21c7c5aad882", - "resourceBookingId": "dc4477ec-07f8-4c8e-a8fe-ffe38dd290fa", - "userHandle": "nskumar278", - "projectId": 111, - "startDate": "2021-09-05", - "endDate": "2021-09-11", - "daysWorked": 5, - "memberRate": null, - "customerRate": null, - "paymentStatus": "cancelled", - "createdBy": "00000000-0000-0000-0000-000000000000", + "id": "90bb43bd-d9e7-4eab-a46b-ab03338be11a", + "workPeriodId": "0ba1a0b3-7bee-4fe6-9083-d36d8ca9d052", + "challengeId": "8b6f4040-d7ae-4264-b60b-b1171c9365e4", + "amount": 400, + "status": "completed", + "createdBy": "57646ff9-1cd3-4d3c-88ba-eb09a395366c", "updatedBy": null, "createdAt": "2021-04-14T22:01:45.390Z", - "updatedAt": null + "updatedAt": "2021-04-21T20:19:56.934Z" }, { - "id": "08b5fc47-0e40-48d5-be46-24ecfd9031b5", - "resourceBookingId": "dc4477ec-07f8-4c8e-a8fe-ffe38dd290fa", - "userHandle": "nskumar278", - "projectId": 111, - "startDate": "2021-08-08", - "endDate": "2021-08-14", - "daysWorked": 5, - "memberRate": null, - "customerRate": null, - "paymentStatus": "completed", - "createdBy": "00000000-0000-0000-0000-000000000000", + "id": "58681a3e-2266-4153-afd5-7be218966da2", + "workPeriodId": "0f480aa7-1c5d-42fe-aad6-c774e58c2e17", + "challengeId": "2bafdd9a-ab4a-4624-8a06-7b1adfb8dac2", + "amount": 1200, + "status": "completed", + "createdBy": "57646ff9-1cd3-4d3c-88ba-eb09a395366c", "updatedBy": null, - "createdAt": "2021-04-14T22:01:45.390Z", - "updatedAt": null - } - ], - "WorkPeriodPayment": [ + "createdAt": "2021-04-14T22:01:45.326Z", + "updatedAt": "2021-04-21T20:19:56.934Z" + }, { - "id": "2a122a93-e778-4eb9-868c-5f38b8b9bb4e", - "workPeriodId": "db3ac57b-8e78-4b68-a0f7-4e928f3059af", - "challengeId": "25a7c442-427b-4b6d-9c41-112dbd420c0d", + "id": "b342d615-d36d-48b2-a3e8-1f498b58ab68", + "workPeriodId": "10394696-47f4-4761-8d14-ffdf012cde23", + "challengeId": "0de972b8-6cc9-4625-9760-1c77561c29e9", + "amount": 400, + "status": "completed", + "createdBy": "57646ff9-1cd3-4d3c-88ba-eb09a395366c", + "updatedBy": null, + "createdAt": "2021-04-16T19:13:23.714Z", + "updatedAt": "2021-04-21T20:19:56.934Z" + }, + { + "id": "63cec011-7714-4ab6-944f-e76b9fa2bd1a", + "workPeriodId": "18a73600-5ee8-484b-9747-70ea80ce2bd9", + "challengeId": "1bdf092e-e117-4d42-bb5d-e49816171c0d", + "amount": 500, + "status": "completed", + "createdBy": "57646ff9-1cd3-4d3c-88ba-eb09a395366c", + "updatedBy": null, + "createdAt": "2021-04-14T22:01:45.523Z", + "updatedAt": "2021-04-21T20:19:56.934Z" + }, + { + "id": "8a0c0877-b88a-420b-a3f7-645c18793b4b", + "workPeriodId": "1b633124-f62c-4026-b679-213cf5812689", + "challengeId": "4332acc6-3a33-4b7b-af4c-bd2c1ffcfb8e", + "amount": 1400, + "status": "completed", + "createdBy": "57646ff9-1cd3-4d3c-88ba-eb09a395366c", + "updatedBy": null, + "createdAt": "2021-04-14T22:01:45.325Z", + "updatedAt": "2021-04-21T20:19:56.934Z" + }, + { + "id": "04ef47ac-8f4d-402f-b9fd-48b2b1d9003d", + "workPeriodId": "1bbc86c8-8c74-4d78-9706-25c4c99721f3", + "challengeId": "fa909769-f5f7-41fb-94bb-80db62e21a5e", "amount": 800, + "status": "cancelled", + "createdBy": "57646ff9-1cd3-4d3c-88ba-eb09a395366c", + "updatedBy": null, + "createdAt": "2021-04-14T22:01:45.326Z", + "updatedAt": "2021-04-21T20:19:56.934Z" + }, + { + "id": "84c1c956-e03d-4e19-a5a8-a4086c9658eb", + "workPeriodId": "1e2c732e-ac1f-47ad-939b-22b2078124e5", + "challengeId": "604910b2-7644-4b9d-a185-0054e61c83fc", + "amount": 1800, "status": "completed", "createdBy": "57646ff9-1cd3-4d3c-88ba-eb09a395366c", "updatedBy": null, - "createdAt": "2021-04-14T19:13:23.714Z", - "updatedAt": null + "createdAt": "2021-04-14T22:01:45.324Z", + "updatedAt": "2021-04-21T20:19:56.934Z" }, { - "id": "2417df2c-8e29-4868-aeb8-5ec0ff67713e", - "workPeriodId": "a6c83e0d-de12-42f2-b689-85ad56470941", - "challengeId": "f01ba8da-c891-472d-9ed6-74b91ed9b407", + "id": "c051c3da-34bb-4deb-8921-04e5d2fa0bcc", + "workPeriodId": "2430fb35-826a-4e9f-8fb6-8dbcb035d505", + "challengeId": "25fd805c-49cd-443f-ba0d-813c33a6d8ad", "amount": 400, "status": "completed", "createdBy": "57646ff9-1cd3-4d3c-88ba-eb09a395366c", "updatedBy": null, - "createdAt": "2021-04-14T19:13:23.714Z", - "updatedAt": null + "createdAt": "2021-04-14T22:01:45.390Z", + "updatedAt": "2021-04-21T20:19:56.934Z" }, { - "id": "8ca85158-a850-4cae-97f0-5873a9225ff8", - "workPeriodId": "5342924e-a1ed-4164-a885-7ebb87215aa5", - "challengeId": "b42b8f40-9a4d-45d1-814e-59da5c7a1fd9", + "id": "cc13acfd-fc06-40e5-aefe-5050429ee4f2", + "workPeriodId": "2463003f-ee60-4aba-b989-b63babcd9b8b", + "challengeId": "0de972b8-6cc9-4625-9760-1c77561c29e9", "amount": 1200, "status": "completed", "createdBy": "57646ff9-1cd3-4d3c-88ba-eb09a395366c", "updatedBy": null, "createdAt": "2021-04-14T19:13:23.714Z", - "updatedAt": null + "updatedAt": "2021-04-21T20:19:56.934Z" }, { - "id": "5116d4ea-2c1a-4be6-b335-bd531b8d5734", - "workPeriodId": "b8390807-8ea7-4824-9f17-4500f46f893c", - "challengeId": "b42b8f40-9a4d-45d1-814e-59da5c7a1fd9", - "amount": 600, + "id": "58c6431a-061a-41bd-a3bd-c8effba62e11", + "workPeriodId": "2cbe3836-5961-4d58-b8f7-44b84ddf3fc5", + "challengeId": "0de972b8-6cc9-4625-9760-1c77561c29e9", + "amount": 900, "status": "completed", "createdBy": "57646ff9-1cd3-4d3c-88ba-eb09a395366c", - "updatedBy": "57646ff9-1cd3-4d3c-88ba-eb09a395366c", + "updatedBy": null, "createdAt": "2021-04-14T19:13:23.714Z", - "updatedAt": "2021-04-16T19:13:23.714Z" + "updatedAt": "2021-04-21T20:19:56.934Z" }, { - "id": "8fad32f7-cb40-416f-ab24-86cf1c7870ef", - "workPeriodId": "da056ecd-6660-4fd8-aba4-acc7ec089926", - "challengeId": "f7e40a0c-a302-4989-a3bd-7587fee3c367", - "amount": 600, + "id": "efe0e4b5-e6dd-4c1a-a0e5-1f5e0ff91df9", + "workPeriodId": "309f65e8-b0b5-4cbb-ba60-9b36ccba4bd5", + "challengeId": "01332fa9-0505-416d-9084-39b136dbd300", + "amount": 1200, "status": "completed", "createdBy": "57646ff9-1cd3-4d3c-88ba-eb09a395366c", "updatedBy": null, - "createdAt": "2021-04-14T19:13:23.714Z", - "updatedAt": null + "createdAt": "2021-04-14T22:01:45.390Z", + "updatedAt": "2021-04-21T20:19:56.934Z" }, { "id": "298ac627-e6d7-47b0-ad1d-83de291addf7", - "workPeriodId": "2cd7a726-9909-4764-9f24-8d9a8f3d011a", + "workPeriodId": "30c89d78-df85-44ed-92b2-b683d8960fc2", "challengeId": "f7e40a0c-a302-4989-a3bd-7587fee3c367", "amount": 300, "status": "cancelled", @@ -1734,87 +1822,76 @@ "updatedAt": "2021-04-16T19:13:23.714Z" }, { - "id": "e8aee371-1f26-4475-8459-9c134fa6f3c6", - "workPeriodId": "7f646975-f984-4967-8788-f10c8db86b25", - "challengeId": "ee9bcdd0-0d0d-4414-88cb-d14255f996a5", - "amount": 700, - "status": "cancelled", - "createdBy": "57646ff9-1cd3-4d3c-88ba-eb09a395366c", - "updatedBy": null, - "createdAt": "2021-04-14T19:13:23.714Z", - "updatedAt": null - }, - { - "id": "4ce8cf4a-2585-4454-81d4-e5446c9a3f75", - "workPeriodId": "459e0127-7f1b-41f6-9d62-d354ed537779", - "challengeId": "ee9bcdd0-0d0d-4414-88cb-d14255f996a5", - "amount": 350, + "id": "bf80eca9-8323-4f96-9a3b-8553d6f1e0ce", + "workPeriodId": "374e2065-40cb-4651-a55c-81a0675dc00d", + "challengeId": "03c69d02-9188-436e-b4c9-08f39e46f413", + "amount": 800, "status": "completed", "createdBy": "57646ff9-1cd3-4d3c-88ba-eb09a395366c", - "updatedBy": "57646ff9-1cd3-4d3c-88ba-eb09a395366c", - "createdAt": "2021-04-14T19:13:23.714Z", - "updatedAt": "2021-04-16T19:13:23.714Z" + "updatedBy": null, + "createdAt": "2021-04-14T22:01:45.390Z", + "updatedAt": "2021-04-21T20:19:56.934Z" }, { - "id": "11c07a5c-a077-4719-83ba-c48db7e63c01", - "workPeriodId": "42f757a6-7bb3-48c2-a6cb-455d27a8821b", - "challengeId": "d7c21199-a435-41b8-a2ac-5e5bdd021c5e", + "id": "338d2d7d-2c59-4513-b560-55e8982fd7c7", + "workPeriodId": "3829c216-ef3f-466c-93da-3a88a961442f", + "challengeId": "2a0db660-def2-4117-90e8-01cd1271c726", "amount": 1400, - "status": "cancelled", + "status": "completed", "createdBy": "57646ff9-1cd3-4d3c-88ba-eb09a395366c", "updatedBy": null, - "createdAt": "2021-04-14T19:13:23.714Z", - "updatedAt": null + "createdAt": "2021-04-14T22:01:45.390Z", + "updatedAt": "2021-04-21T20:19:56.934Z" }, { - "id": "b8d44e83-922c-4c2c-8567-5764794e03f3", - "workPeriodId": "c17d9081-c442-4d55-be58-65916662653e", - "challengeId": "d7c21199-a435-41b8-a2ac-5e5bdd021c5e", - "amount": 700, + "id": "491f6e93-e80f-46eb-9637-ee84fe7ace9b", + "workPeriodId": "40ae1e8f-24be-4b51-885c-51f08e15f0df", + "challengeId": "c2b7a2cc-4633-4f3a-ab39-f7122a6890b6", + "amount": 1600, "status": "completed", "createdBy": "57646ff9-1cd3-4d3c-88ba-eb09a395366c", - "updatedBy": "57646ff9-1cd3-4d3c-88ba-eb09a395366c", - "createdAt": "2021-04-14T19:13:23.714Z", - "updatedAt": "2021-04-16T19:13:23.714Z" + "updatedBy": null, + "createdAt": "2021-04-14T22:01:45.390Z", + "updatedAt": "2021-04-21T20:19:56.934Z" }, { - "id": "f950e52e-5a52-4ee8-af5f-e6c42e9b400b", - "workPeriodId": "6768d502-5510-49d0-873f-346390ccf14d", - "challengeId": "6c04d456-bb38-43c8-a538-f5cc6caaa540", - "amount": 800, + "id": "cb94d710-fa3c-4333-b8a9-39ec053a665d", + "workPeriodId": "428fec88-b305-4816-b5ef-be2b4e91c21a", + "challengeId": "93f594e9-5396-416a-8212-87bee614a38f", + "amount": 1200, "status": "completed", "createdBy": "57646ff9-1cd3-4d3c-88ba-eb09a395366c", "updatedBy": null, "createdAt": "2021-04-14T19:13:23.714Z", - "updatedAt": null + "updatedAt": "2021-04-21T20:19:56.934Z" }, { - "id": "9fe78619-5c1c-4b22-8d6f-ebf9a9502432", - "workPeriodId": "7808d9ac-3c93-4c3f-ad35-12a0a45d51c6", - "challengeId": "6c04d456-bb38-43c8-a538-f5cc6caaa540", - "amount": 400, + "id": "155eaab2-ef74-484c-b1d7-6534dde58b66", + "workPeriodId": "437d4281-43ec-4de3-85e4-51d298388ce5", + "challengeId": "5ba2d9df-b3ba-4f5f-bee5-228eb46b2c37", + "amount": 600, "status": "completed", "createdBy": "57646ff9-1cd3-4d3c-88ba-eb09a395366c", "updatedBy": null, - "createdAt": "2021-04-14T19:13:23.714Z", - "updatedAt": null + "createdAt": "2021-04-14T22:01:45.361Z", + "updatedAt": "2021-04-21T20:19:56.934Z" }, { - "id": "09ea6f03-4489-496c-817c-e9279a58c0ad", - "workPeriodId": "724815e6-5a66-44c7-8dd6-7a5005ec4367", - "challengeId": "78154e5c-feed-4dbf-84ec-775395139211", - "amount": 400, - "status": "completed", + "id": "11c07a5c-a077-4719-83ba-c48db7e63c01", + "workPeriodId": "442b0543-e887-42be-9ff5-5fee825526be", + "challengeId": "d7c21199-a435-41b8-a2ac-5e5bdd021c5e", + "amount": 1400, + "status": "cancelled", "createdBy": "57646ff9-1cd3-4d3c-88ba-eb09a395366c", "updatedBy": null, "createdAt": "2021-04-14T19:13:23.714Z", - "updatedAt": null + "updatedAt": "2021-04-21T20:19:56.934Z" }, { - "id": "4a81c6a3-18d9-441b-ae64-3aa9def336ef", - "workPeriodId": "57210895-2e2a-46f1-a0cc-05af4c30b188", - "challengeId": "78154e5c-feed-4dbf-84ec-775395139211", - "amount": 200, + "id": "4ce8cf4a-2585-4454-81d4-e5446c9a3f75", + "workPeriodId": "4a2c581f-c626-44cb-8ada-58f0172e8b4d", + "challengeId": "ee9bcdd0-0d0d-4414-88cb-d14255f996a5", + "amount": 350, "status": "completed", "createdBy": "57646ff9-1cd3-4d3c-88ba-eb09a395366c", "updatedBy": "57646ff9-1cd3-4d3c-88ba-eb09a395366c", @@ -1822,19 +1899,19 @@ "updatedAt": "2021-04-16T19:13:23.714Z" }, { - "id": "cb94d710-fa3c-4333-b8a9-39ec053a665d", - "workPeriodId": "3534343e-5b06-4299-b657-11b3b5175dce", - "challengeId": "93f594e9-5396-416a-8212-87bee614a38f", - "amount": 1200, - "status": "completed", + "id": "8ff6188f-b4e6-4f6e-b2d4-2a622ae50c4f", + "workPeriodId": "4bfdc253-e39a-4cfa-9a45-2cfc6e93cc6f", + "challengeId": "f151a5a1-6b28-4f59-bdde-6e73498faa84", + "amount": 450, + "status": "cancelled", "createdBy": "57646ff9-1cd3-4d3c-88ba-eb09a395366c", "updatedBy": null, - "createdAt": "2021-04-14T19:13:23.714Z", - "updatedAt": null + "createdAt": "2021-04-14T22:01:45.326Z", + "updatedAt": "2021-04-21T20:19:56.934Z" }, { "id": "5192e519-30f5-42d6-877f-5c2b786d91c7", - "workPeriodId": "50788ef6-73d9-455c-a5ea-44028d7b3bf2", + "workPeriodId": "4db82b0b-4d6f-4e9a-b957-ab405b2c2df2", "challengeId": "93f594e9-5396-416a-8212-87bee614a38f", "amount": 600, "status": "cancelled", @@ -1844,543 +1921,466 @@ "updatedAt": "2021-04-16T19:13:23.714Z" }, { - "id": "58c6431a-061a-41bd-a3bd-c8effba62e11", - "workPeriodId": "2b2df620-fd88-4233-a0b8-242e0bb6ecb7", - "challengeId": "0de972b8-6cc9-4625-9760-1c77561c29e9", - "amount": 900, + "id": "8ca85158-a850-4cae-97f0-5873a9225ff8", + "workPeriodId": "531754f3-405e-42eb-932a-c1ce7b9386e7", + "challengeId": "b42b8f40-9a4d-45d1-814e-59da5c7a1fd9", + "amount": 1200, "status": "completed", "createdBy": "57646ff9-1cd3-4d3c-88ba-eb09a395366c", "updatedBy": null, "createdAt": "2021-04-14T19:13:23.714Z", - "updatedAt": null + "updatedAt": "2021-04-21T20:19:56.934Z" }, { - "id": "56cb3aef-531b-4a26-817e-4b9629212c9a", - "workPeriodId": "970a2bbc-c5b7-4be5-ae63-3d9009ccf83b", - "challengeId": "0de972b8-6cc9-4625-9760-1c77561c29e9", - "amount": 450, + "id": "4a81c6a3-18d9-441b-ae64-3aa9def336ef", + "workPeriodId": "5392acee-b504-4720-95fa-dab585acb607", + "challengeId": "78154e5c-feed-4dbf-84ec-775395139211", + "amount": 200, "status": "completed", "createdBy": "57646ff9-1cd3-4d3c-88ba-eb09a395366c", - "updatedBy": null, + "updatedBy": "57646ff9-1cd3-4d3c-88ba-eb09a395366c", "createdAt": "2021-04-14T19:13:23.714Z", - "updatedAt": null + "updatedAt": "2021-04-16T19:13:23.714Z" }, { - "id": "fda2013c-da68-4601-8d13-d0f4cffd081c", - "workPeriodId": "c3b83d2b-f27b-4e4d-8f87-9f324f80a9bc", + "id": "a26b8cae-a1df-4843-a192-0735f235bf78", + "workPeriodId": "558b4685-4932-492e-99e1-2830c10f8275", "challengeId": "0de972b8-6cc9-4625-9760-1c77561c29e9", - "amount": 800, + "amount": 600, "status": "completed", "createdBy": "57646ff9-1cd3-4d3c-88ba-eb09a395366c", "updatedBy": null, "createdAt": "2021-04-14T19:13:23.714Z", - "updatedAt": null + "updatedAt": "2021-04-21T20:19:56.934Z" }, { - "id": "8c9ed23c-12c7-4a8b-8e91-6fd3b3fc43a4", - "workPeriodId": "8dd12749-ef1d-4295-b050-8c3ecee1f846", - "challengeId": "0de972b8-6cc9-4625-9760-1c77561c29e9", - "amount": 450, - "status": "completed", - "createdBy": "57646ff9-1cd3-4d3c-88ba-eb09a395366c", - "updatedBy": null, - "createdAt": "2021-04-14T19:13:23.714Z", - "updatedAt": null - }, - { - "id": "310384cb-6e85-4f7d-a6d2-8c03ca27871d", - "workPeriodId": "db0d8eab-13b0-4fd6-98fd-d2a82cd566ad", - "challengeId": "0de972b8-6cc9-4625-9760-1c77561c29e9", - "amount": 900, + "id": "a94b6f43-de89-4fd2-9a1d-d8a2cce02702", + "workPeriodId": "584c931b-da72-416e-a011-eac5fe34f42f", + "challengeId": "d55fae30-3072-462e-b8bd-eb2eec664e65", + "amount": 1600, "status": "completed", "createdBy": "57646ff9-1cd3-4d3c-88ba-eb09a395366c", "updatedBy": null, - "createdAt": "2021-04-14T19:13:23.714Z", - "updatedAt": null + "createdAt": "2021-04-14T22:01:45.324Z", + "updatedAt": "2021-04-21T20:19:56.934Z" }, { - "id": "cc13acfd-fc06-40e5-aefe-5050429ee4f2", - "workPeriodId": "278bc7a0-a242-41a4-9d00-086f5d48d5da", + "id": "eb63dfc7-14d7-4cae-a25e-3e33a04601cf", + "workPeriodId": "5ddc132b-3205-45e3-bfe9-f1a4f939885e", "challengeId": "0de972b8-6cc9-4625-9760-1c77561c29e9", - "amount": 1200, + "amount": 300, "status": "completed", "createdBy": "57646ff9-1cd3-4d3c-88ba-eb09a395366c", "updatedBy": null, "createdAt": "2021-04-14T19:13:23.714Z", - "updatedAt": null + "updatedAt": "2021-04-21T20:19:56.934Z" }, { - "id": "2c488b36-0868-4db6-8978-20b1ce174496", - "workPeriodId": "0679b699-520b-4f8b-8eb6-a6aa53ec473c", - "challengeId": "0de972b8-6cc9-4625-9760-1c77561c29e9", - "amount": 200, + "id": "d827ed01-5153-4774-8450-bace2521a6d1", + "workPeriodId": "619a0835-730f-47ec-820e-3959821aec51", + "challengeId": "d40cb9c5-b3bd-45a1-802c-a50fefb020b9", + "amount": 1000, "status": "completed", "createdBy": "57646ff9-1cd3-4d3c-88ba-eb09a395366c", "updatedBy": null, - "createdAt": "2021-04-14T19:13:23.714Z", - "updatedAt": null + "createdAt": "2021-04-14T22:01:45.326Z", + "updatedAt": "2021-04-21T20:19:56.934Z" }, { - "id": "efa8cd14-c93f-4e6c-be53-596f02db8c96", - "workPeriodId": "c73aa1a0-cb32-4301-af96-5b33bdbda20f", - "challengeId": "0de972b8-6cc9-4625-9760-1c77561c29e9", + "id": "f950e52e-5a52-4ee8-af5f-e6c42e9b400b", + "workPeriodId": "64de2244-6fcf-45ac-8a89-a9b3420e4476", + "challengeId": "6c04d456-bb38-43c8-a538-f5cc6caaa540", "amount": 800, "status": "completed", "createdBy": "57646ff9-1cd3-4d3c-88ba-eb09a395366c", "updatedBy": null, "createdAt": "2021-04-14T19:13:23.714Z", - "updatedAt": null + "updatedAt": "2021-04-21T20:19:56.934Z" }, { - "id": "a26b8cae-a1df-4843-a192-0735f235bf78", - "workPeriodId": "5b0eefe1-e45d-4150-b14e-a83ce19599eb", - "challengeId": "0de972b8-6cc9-4625-9760-1c77561c29e9", - "amount": 600, + "id": "283f9c3b-7f0a-4792-9661-ced7cbdb340d", + "workPeriodId": "6a1180b8-38af-4bd0-8a5f-a60626e0bc95", + "challengeId": "9a995b78-0542-41be-a926-f3df57c2f873", + "amount": 400, "status": "completed", "createdBy": "57646ff9-1cd3-4d3c-88ba-eb09a395366c", "updatedBy": null, - "createdAt": "2021-04-14T19:13:23.714Z", - "updatedAt": null + "createdAt": "2021-04-14T22:01:45.361Z", + "updatedAt": "2021-04-21T20:19:56.934Z" }, { - "id": "eb63dfc7-14d7-4cae-a25e-3e33a04601cf", - "workPeriodId": "651a97b2-8019-49b7-9a8e-4c384c0615b7", - "challengeId": "0de972b8-6cc9-4625-9760-1c77561c29e9", - "amount": 300, + "id": "09ea6f03-4489-496c-817c-e9279a58c0ad", + "workPeriodId": "6da7d347-7492-43b1-a49d-8a6e1daf9b22", + "challengeId": "78154e5c-feed-4dbf-84ec-775395139211", + "amount": 400, "status": "completed", "createdBy": "57646ff9-1cd3-4d3c-88ba-eb09a395366c", "updatedBy": null, "createdAt": "2021-04-14T19:13:23.714Z", - "updatedAt": null + "updatedAt": "2021-04-21T20:19:56.934Z" }, { - "id": "11ea987f-f218-4d2b-b656-0741208539f2", - "workPeriodId": "fcdedc90-7c76-47ed-bb95-fb05ec3cd53a", - "challengeId": "0de972b8-6cc9-4625-9760-1c77561c29e9", - "amount": 600, - "status": "completed", - "createdBy": "57646ff9-1cd3-4d3c-88ba-eb09a395366c", - "updatedBy": null, - "createdAt": "2021-04-16T19:13:23.714Z", - "updatedAt": null - }, - { - "id": "b342d615-d36d-48b2-a3e8-1f498b58ab68", - "workPeriodId": "0b65d948-0232-4f32-a455-b480da63320d", - "challengeId": "0de972b8-6cc9-4625-9760-1c77561c29e9", - "amount": 400, + "id": "7d782624-243e-497b-90ca-cc00ae29ebf2", + "workPeriodId": "6e1dc024-d437-4d9f-92e9-561db713a19a", + "challengeId": "afcbc3bc-9077-4978-bf9c-acddb48e6518", + "amount": 800, "status": "completed", "createdBy": "57646ff9-1cd3-4d3c-88ba-eb09a395366c", "updatedBy": null, - "createdAt": "2021-04-16T19:13:23.714Z", - "updatedAt": null + "createdAt": "2021-04-14T22:01:45.324Z", + "updatedAt": "2021-04-21T20:19:56.934Z" }, { - "id": "84c1c956-e03d-4e19-a5a8-a4086c9658eb", - "workPeriodId": "1f106c81-7a0d-4fb1-9bf4-851d450709d8", - "challengeId": "604910b2-7644-4b9d-a185-0054e61c83fc", - "amount": 1800, + "id": "11918ff9-5f18-445d-ae90-762b3ebe44ca", + "workPeriodId": "6ed667a5-275e-4f27-984b-34dff5f8a1ff", + "challengeId": "c89d357f-afd1-4757-824f-2cf94e2890c6", + "amount": 250, "status": "completed", "createdBy": "57646ff9-1cd3-4d3c-88ba-eb09a395366c", "updatedBy": null, - "createdAt": "2021-04-14T22:01:45.324Z", - "updatedAt": null + "createdAt": "2021-04-14T22:01:45.361Z", + "updatedAt": "2021-04-21T20:19:56.934Z" }, { - "id": "c4e316ca-a46f-4fbc-96a6-6fe6665c3b49", - "workPeriodId": "84a9d3e9-ee3f-495b-98de-f9fe0f6a9371", - "challengeId": "d937a822-4a9b-40db-afe6-fe1285e3f7f9", - "amount": 900, + "id": "9fe78619-5c1c-4b22-8d6f-ebf9a9502432", + "workPeriodId": "703bc625-9144-4a9f-a91b-445e171d8ea9", + "challengeId": "6c04d456-bb38-43c8-a538-f5cc6caaa540", + "amount": 400, "status": "completed", "createdBy": "57646ff9-1cd3-4d3c-88ba-eb09a395366c", "updatedBy": null, - "createdAt": "2021-04-14T22:01:45.324Z", - "updatedAt": null + "createdAt": "2021-04-14T19:13:23.714Z", + "updatedAt": "2021-04-21T20:19:56.934Z" }, { - "id": "a94b6f43-de89-4fd2-9a1d-d8a2cce02702", - "workPeriodId": "5f9dce2b-9426-4287-b3ab-7507ff3a2671", - "challengeId": "d55fae30-3072-462e-b8bd-eb2eec664e65", - "amount": 1600, - "status": "completed", + "id": "7cf85ce0-ef8c-4152-8623-9a1325db6daa", + "workPeriodId": "729a2396-2b33-4185-8ce8-d929dbf4a472", + "challengeId": "fbf8efda-fe4b-4b72-99dd-573b79d27bd8", + "amount": 200, + "status": "cancelled", "createdBy": "57646ff9-1cd3-4d3c-88ba-eb09a395366c", "updatedBy": null, - "createdAt": "2021-04-14T22:01:45.324Z", - "updatedAt": null + "createdAt": "2021-04-14T22:01:45.390Z", + "updatedAt": "2021-04-21T20:19:56.934Z" }, { - "id": "7d782624-243e-497b-90ca-cc00ae29ebf2", - "workPeriodId": "724b2338-c5bb-46ec-8e99-2417929eeab9", - "challengeId": "afcbc3bc-9077-4978-bf9c-acddb48e6518", - "amount": 800, - "status": "completed", + "id": "e8aee371-1f26-4475-8459-9c134fa6f3c6", + "workPeriodId": "731db5d7-bb79-45f4-b1b2-9f60d30f7966", + "challengeId": "ee9bcdd0-0d0d-4414-88cb-d14255f996a5", + "amount": 700, + "status": "cancelled", "createdBy": "57646ff9-1cd3-4d3c-88ba-eb09a395366c", "updatedBy": null, - "createdAt": "2021-04-14T22:01:45.324Z", - "updatedAt": null + "createdAt": "2021-04-14T19:13:23.714Z", + "updatedAt": "2021-04-21T20:19:56.934Z" }, { - "id": "8a0c0877-b88a-420b-a3f7-645c18793b4b", - "workPeriodId": "10de7920-5e12-4284-b95f-08adc0ff1c17", - "challengeId": "4332acc6-3a33-4b7b-af4c-bd2c1ffcfb8e", - "amount": 1400, + "id": "dec8615b-c823-4fff-bc77-fa0614b8d09c", + "workPeriodId": "7f8f3a25-b1d2-4e36-a543-fcaae57a32f5", + "challengeId": "fe3e4056-82e3-4df4-b699-a1f3d8ab5e53", + "amount": 700, "status": "completed", "createdBy": "57646ff9-1cd3-4d3c-88ba-eb09a395366c", "updatedBy": null, - "createdAt": "2021-04-14T22:01:45.325Z", - "updatedAt": null + "createdAt": "2021-04-14T22:01:45.390Z", + "updatedAt": "2021-04-21T20:19:56.934Z" }, { - "id": "dd9c842a-f577-43c2-8f17-cc940f26f0d8", - "workPeriodId": "c0fb6f01-7b71-471a-b85b-ea470d4dbd85", - "challengeId": "b67cbbc5-3384-4ea6-8504-d3fe83a6e238", - "amount": 700, + "id": "c4e316ca-a46f-4fbc-96a6-6fe6665c3b49", + "workPeriodId": "829165cb-0150-48e7-995c-f5b4d1a51d3b", + "challengeId": "d937a822-4a9b-40db-afe6-fe1285e3f7f9", + "amount": 900, "status": "completed", "createdBy": "57646ff9-1cd3-4d3c-88ba-eb09a395366c", "updatedBy": null, - "createdAt": "2021-04-14T22:01:45.326Z", - "updatedAt": null + "createdAt": "2021-04-14T22:01:45.324Z", + "updatedAt": "2021-04-21T20:19:56.934Z" }, { - "id": "58681a3e-2266-4153-afd5-7be218966da2", - "workPeriodId": "0a3df77a-7841-4256-bb2c-d7e0fa17dc3f", - "challengeId": "2bafdd9a-ab4a-4624-8a06-7b1adfb8dac2", - "amount": 1200, + "id": "12b0bcfc-59ae-478c-bb32-cb18d1d0244c", + "workPeriodId": "84431dac-019d-4987-9817-15f5f000d2db", + "challengeId": "a07ea88f-c52b-4023-8730-c4364efd0dd2", + "amount": 600, "status": "completed", "createdBy": "57646ff9-1cd3-4d3c-88ba-eb09a395366c", "updatedBy": null, - "createdAt": "2021-04-14T22:01:45.326Z", - "updatedAt": null + "createdAt": "2021-04-14T22:01:45.361Z", + "updatedAt": "2021-04-21T20:19:56.934Z" }, { - "id": "a1ffc559-703a-4c35-8ba3-73a03c3454af", - "workPeriodId": "9e0d10c3-f4c8-4ba6-8c11-333d9cdab634", - "challengeId": "9fca67f9-3641-4982-8a82-e86b1850efc8", - "amount": 600, + "id": "8c9ed23c-12c7-4a8b-8e91-6fd3b3fc43a4", + "workPeriodId": "8b7b49de-29b1-4a0c-bb67-e70cc700fcfd", + "challengeId": "0de972b8-6cc9-4625-9760-1c77561c29e9", + "amount": 450, "status": "completed", "createdBy": "57646ff9-1cd3-4d3c-88ba-eb09a395366c", "updatedBy": null, - "createdAt": "2021-04-14T22:01:45.326Z", - "updatedAt": null + "createdAt": "2021-04-14T19:13:23.714Z", + "updatedAt": "2021-04-21T20:19:56.934Z" }, { - "id": "d827ed01-5153-4774-8450-bace2521a6d1", - "workPeriodId": "66d47a95-a4f8-43a5-bfe2-af8f5a2b64ac", - "challengeId": "d40cb9c5-b3bd-45a1-802c-a50fefb020b9", - "amount": 1000, + "id": "621d793b-0ead-4d99-a119-e32af526ece7", + "workPeriodId": "8c8cedf3-0bb6-4063-8a3a-faf1626da384", + "challengeId": "ad04dcee-9a3c-4345-b0b5-783ce98e94b2", + "amount": 900, "status": "completed", "createdBy": "57646ff9-1cd3-4d3c-88ba-eb09a395366c", "updatedBy": null, - "createdAt": "2021-04-14T22:01:45.326Z", - "updatedAt": null + "createdAt": "2021-04-14T22:01:45.390Z", + "updatedAt": "2021-04-21T20:19:56.934Z" }, { - "id": "7e41ca7f-d3c0-4d70-9daf-ee52c93695c7", - "workPeriodId": "c10cca56-b0c4-4e87-a64f-9a14d7445436", - "challengeId": "9d49655f-99f6-4e67-9819-a117ef746272", - "amount": 500, + "id": "56cb3aef-531b-4a26-817e-4b9629212c9a", + "workPeriodId": "90d99323-ba57-4a18-b50f-78f387033c70", + "challengeId": "0de972b8-6cc9-4625-9760-1c77561c29e9", + "amount": 450, "status": "completed", "createdBy": "57646ff9-1cd3-4d3c-88ba-eb09a395366c", "updatedBy": null, - "createdAt": "2021-04-14T22:01:45.361Z", - "updatedAt": null + "createdAt": "2021-04-14T19:13:23.714Z", + "updatedAt": "2021-04-21T20:19:56.934Z" }, { - "id": "eb9c9a83-fe94-4f51-b9f0-c2d9671e87f6", - "workPeriodId": "c8d38387-b4a2-49f8-bbba-2f10f50c99db", - "challengeId": "68e6a32e-6c31-4266-ba3b-9d2f63be4274", - "amount": 900, + "id": "a1ffc559-703a-4c35-8ba3-73a03c3454af", + "workPeriodId": "93b0f03b-219b-41d5-bb1e-f125651b1b0e", + "challengeId": "9fca67f9-3641-4982-8a82-e86b1850efc8", + "amount": 600, "status": "completed", "createdBy": "57646ff9-1cd3-4d3c-88ba-eb09a395366c", "updatedBy": null, - "createdAt": "2021-04-14T22:01:45.361Z", - "updatedAt": null + "createdAt": "2021-04-14T22:01:45.326Z", + "updatedAt": "2021-04-21T20:19:56.934Z" }, { - "id": "d0f61c2d-271c-48b2-8416-50c1c32ad32b", - "workPeriodId": "07dd0d62-e5cc-49a8-8b4c-966a2348095f", - "challengeId": "aa8c1945-904c-42a7-9b00-1e4f9a49dcdb", - "amount": 450, + "id": "a5904ae3-7524-4709-b798-20c4a2193f10", + "workPeriodId": "93e69f99-cb1c-418e-aa41-ab2181b4bcfd", + "challengeId": "ed56a1c7-a965-4ab6-9cf0-0d7c14cd7db3", + "amount": 400, "status": "completed", "createdBy": "57646ff9-1cd3-4d3c-88ba-eb09a395366c", "updatedBy": null, "createdAt": "2021-04-14T22:01:45.361Z", - "updatedAt": null + "updatedAt": "2021-04-21T20:19:56.934Z" }, { - "id": "be07bfc8-032c-41f7-a247-a4724f65617c", - "workPeriodId": "c3c4593a-2a06-4ee8-8cbb-5a3ffad8ad7d", - "challengeId": "45e33cee-7c83-4288-8187-6858b0c759eb", - "amount": 800, + "id": "821b38e8-657d-4f72-b27a-dd975c506ced", + "workPeriodId": "9b6fc85b-3694-4e6c-9ebf-fe9ccf7881ba", + "challengeId": "61f5185b-4ee1-4df3-9c6f-52f5bf0cbfc5", + "amount": 500, "status": "completed", "createdBy": "57646ff9-1cd3-4d3c-88ba-eb09a395366c", "updatedBy": null, "createdAt": "2021-04-14T22:01:45.361Z", - "updatedAt": null + "updatedAt": "2021-04-21T20:19:56.934Z" }, { - "id": "a5904ae3-7524-4709-b798-20c4a2193f10", - "workPeriodId": "9f117273-bb2f-48ab-bf3a-c13652483ea3", - "challengeId": "ed56a1c7-a965-4ab6-9cf0-0d7c14cd7db3", + "id": "2417df2c-8e29-4868-aeb8-5ec0ff67713e", + "workPeriodId": "9bfbd49a-e6bb-45c3-965d-ed4f95f0878a", + "challengeId": "f01ba8da-c891-472d-9ed6-74b91ed9b407", "amount": 400, "status": "completed", "createdBy": "57646ff9-1cd3-4d3c-88ba-eb09a395366c", "updatedBy": null, - "createdAt": "2021-04-14T22:01:45.361Z", - "updatedAt": null + "createdAt": "2021-04-14T19:13:23.714Z", + "updatedAt": "2021-04-21T20:19:56.934Z" }, { - "id": "155eaab2-ef74-484c-b1d7-6534dde58b66", - "workPeriodId": "3a909050-444a-4a82-9961-d390212e86f5", - "challengeId": "5ba2d9df-b3ba-4f5f-bee5-228eb46b2c37", + "id": "5116d4ea-2c1a-4be6-b335-bd531b8d5734", + "workPeriodId": "a35bb205-361b-4b2d-9828-55501ae9d190", + "challengeId": "b42b8f40-9a4d-45d1-814e-59da5c7a1fd9", "amount": 600, "status": "completed", "createdBy": "57646ff9-1cd3-4d3c-88ba-eb09a395366c", - "updatedBy": null, - "createdAt": "2021-04-14T22:01:45.361Z", - "updatedAt": null + "updatedBy": "57646ff9-1cd3-4d3c-88ba-eb09a395366c", + "createdAt": "2021-04-14T19:13:23.714Z", + "updatedAt": "2021-04-16T19:13:23.714Z" }, { "id": "8fdfe90b-2155-4a71-a610-4689106ced34", - "workPeriodId": "b9a8ac04-5b06-4093-ac50-ce556d25b421", + "workPeriodId": "b21f921a-4b23-423d-814b-d31f5cba7f64", "challengeId": "963784fd-4174-458c-a311-a5b8333d66ab", "amount": 300, "status": "completed", "createdBy": "57646ff9-1cd3-4d3c-88ba-eb09a395366c", "updatedBy": null, "createdAt": "2021-04-14T22:01:45.361Z", - "updatedAt": null + "updatedAt": "2021-04-21T20:19:56.934Z" }, { - "id": "821b38e8-657d-4f72-b27a-dd975c506ced", - "workPeriodId": "a2b708d1-e234-4573-b5ca-7dc36a20c0d7", - "challengeId": "61f5185b-4ee1-4df3-9c6f-52f5bf0cbfc5", - "amount": 500, + "id": "dd9c842a-f577-43c2-8f17-cc940f26f0d8", + "workPeriodId": "b4566e24-4fa8-4e82-9950-f62134bb00df", + "challengeId": "b67cbbc5-3384-4ea6-8504-d3fe83a6e238", + "amount": 700, "status": "completed", "createdBy": "57646ff9-1cd3-4d3c-88ba-eb09a395366c", "updatedBy": null, - "createdAt": "2021-04-14T22:01:45.361Z", - "updatedAt": null + "createdAt": "2021-04-14T22:01:45.326Z", + "updatedAt": "2021-04-21T20:19:56.934Z" }, { - "id": "11918ff9-5f18-445d-ae90-762b3ebe44ca", - "workPeriodId": "768051e3-9765-498f-9b58-17c3377eced8", - "challengeId": "c89d357f-afd1-4757-824f-2cf94e2890c6", - "amount": 250, + "id": "7e41ca7f-d3c0-4d70-9daf-ee52c93695c7", + "workPeriodId": "b5261ee2-bc4d-4c3a-9d30-6703bfdcfbc5", + "challengeId": "9d49655f-99f6-4e67-9819-a117ef746272", + "amount": 500, "status": "completed", "createdBy": "57646ff9-1cd3-4d3c-88ba-eb09a395366c", "updatedBy": null, "createdAt": "2021-04-14T22:01:45.361Z", - "updatedAt": null + "updatedAt": "2021-04-21T20:19:56.934Z" }, { - "id": "c20796c8-76b0-40e8-9bee-db406c93daaf", - "workPeriodId": "d94e0c2f-15de-4d07-a098-200daaa05f54", - "challengeId": "513ab4c6-0aa4-482b-a184-87f8447b145b", - "amount": 1800, + "id": "b8d44e83-922c-4c2c-8567-5764794e03f3", + "workPeriodId": "b682660e-488e-4033-aaf3-ef37248abc90", + "challengeId": "d7c21199-a435-41b8-a2ac-5e5bdd021c5e", + "amount": 700, "status": "completed", "createdBy": "57646ff9-1cd3-4d3c-88ba-eb09a395366c", - "updatedBy": null, - "createdAt": "2021-04-14T22:01:45.390Z", - "updatedAt": null + "updatedBy": "57646ff9-1cd3-4d3c-88ba-eb09a395366c", + "createdAt": "2021-04-14T19:13:23.714Z", + "updatedAt": "2021-04-16T19:13:23.714Z" }, { - "id": "621d793b-0ead-4d99-a119-e32af526ece7", - "workPeriodId": "93910ea8-28ac-40a3-91b0-35eab59405da", - "challengeId": "ad04dcee-9a3c-4345-b0b5-783ce98e94b2", + "id": "c117de76-965f-4069-aefb-8dd97f95112c", + "workPeriodId": "b8a8b558-0cb9-46d0-ba9d-2222f3fbdb63", + "challengeId": "59d08064-e1b4-4e78-82d8-b2d7ffa6f0b1", "amount": 900, "status": "completed", "createdBy": "57646ff9-1cd3-4d3c-88ba-eb09a395366c", "updatedBy": null, - "createdAt": "2021-04-14T22:01:45.390Z", - "updatedAt": null + "createdAt": "2021-04-14T22:01:45.523Z", + "updatedAt": "2021-04-21T20:19:56.934Z" }, { - "id": "491f6e93-e80f-46eb-9637-ee84fe7ace9b", - "workPeriodId": "33561804-7a27-4cff-9e57-c09c914bbf12", - "challengeId": "c2b7a2cc-4633-4f3a-ab39-f7122a6890b6", - "amount": 1600, + "id": "fda2013c-da68-4601-8d13-d0f4cffd081c", + "workPeriodId": "bc8611f0-4ac2-49b2-b776-59ed2b759d1d", + "challengeId": "0de972b8-6cc9-4625-9760-1c77561c29e9", + "amount": 800, "status": "completed", "createdBy": "57646ff9-1cd3-4d3c-88ba-eb09a395366c", "updatedBy": null, - "createdAt": "2021-04-14T22:01:45.390Z", - "updatedAt": null + "createdAt": "2021-04-14T19:13:23.714Z", + "updatedAt": "2021-04-21T20:19:56.934Z" }, { - "id": "bf80eca9-8323-4f96-9a3b-8553d6f1e0ce", - "workPeriodId": "2e874752-81e1-451d-b5c9-7455135daee9", - "challengeId": "03c69d02-9188-436e-b4c9-08f39e46f413", + "id": "be07bfc8-032c-41f7-a247-a4724f65617c", + "workPeriodId": "bd54bcaf-5278-467f-a166-865048774d0e", + "challengeId": "45e33cee-7c83-4288-8187-6858b0c759eb", "amount": 800, "status": "completed", "createdBy": "57646ff9-1cd3-4d3c-88ba-eb09a395366c", "updatedBy": null, - "createdAt": "2021-04-14T22:01:45.390Z", - "updatedAt": null + "createdAt": "2021-04-14T22:01:45.361Z", + "updatedAt": "2021-04-21T20:19:56.934Z" }, { - "id": "338d2d7d-2c59-4513-b560-55e8982fd7c7", - "workPeriodId": "3313e61b-8733-496e-9c79-9b1e3ff5e074", - "challengeId": "2a0db660-def2-4117-90e8-01cd1271c726", - "amount": 1400, + "id": "efa8cd14-c93f-4e6c-be53-596f02db8c96", + "workPeriodId": "bf61dad8-841a-4913-93f6-b2ae516b8b11", + "challengeId": "0de972b8-6cc9-4625-9760-1c77561c29e9", + "amount": 800, "status": "completed", "createdBy": "57646ff9-1cd3-4d3c-88ba-eb09a395366c", "updatedBy": null, - "createdAt": "2021-04-14T22:01:45.390Z", - "updatedAt": null + "createdAt": "2021-04-14T19:13:23.714Z", + "updatedAt": "2021-04-21T20:19:56.934Z" }, { - "id": "dec8615b-c823-4fff-bc77-fa0614b8d09c", - "workPeriodId": "8019e0c4-201a-469f-901b-8e84f43f577b", - "challengeId": "fe3e4056-82e3-4df4-b699-a1f3d8ab5e53", - "amount": 700, + "id": "eb9c9a83-fe94-4f51-b9f0-c2d9671e87f6", + "workPeriodId": "c5f6ae8f-2976-46d1-bd66-58eeb58ca045", + "challengeId": "68e6a32e-6c31-4266-ba3b-9d2f63be4274", + "amount": 900, "status": "completed", "createdBy": "57646ff9-1cd3-4d3c-88ba-eb09a395366c", "updatedBy": null, - "createdAt": "2021-04-14T22:01:45.390Z", - "updatedAt": null + "createdAt": "2021-04-14T22:01:45.361Z", + "updatedAt": "2021-04-21T20:19:56.934Z" }, { - "id": "efe0e4b5-e6dd-4c1a-a0e5-1f5e0ff91df9", - "workPeriodId": "2b660631-fbd0-47fb-9ab4-f4e809650e44", - "challengeId": "01332fa9-0505-416d-9084-39b136dbd300", - "amount": 1200, + "id": "c20796c8-76b0-40e8-9bee-db406c93daaf", + "workPeriodId": "c7ff2acc-a4c2-4e8b-a905-813dd9d1b293", + "challengeId": "513ab4c6-0aa4-482b-a184-87f8447b145b", + "amount": 1800, "status": "completed", "createdBy": "57646ff9-1cd3-4d3c-88ba-eb09a395366c", "updatedBy": null, "createdAt": "2021-04-14T22:01:45.390Z", - "updatedAt": null + "updatedAt": "2021-04-21T20:19:56.934Z" }, { - "id": "50f7a6fa-a04d-4873-8fd0-037be2f14425", - "workPeriodId": "f93b73e0-25eb-4c67-a6f0-1b658186ae29", - "challengeId": "419fbb3d-921d-4613-a87e-337f38d21885", + "id": "8fad32f7-cb40-416f-ab24-86cf1c7870ef", + "workPeriodId": "c9685cb2-9f4a-497e-ae99-deed7b16cc34", + "challengeId": "f7e40a0c-a302-4989-a3bd-7587fee3c367", "amount": 600, "status": "completed", "createdBy": "57646ff9-1cd3-4d3c-88ba-eb09a395366c", "updatedBy": null, - "createdAt": "2021-04-14T22:01:45.523Z", - "updatedAt": null + "createdAt": "2021-04-14T19:13:23.714Z", + "updatedAt": "2021-04-21T20:19:56.934Z" }, { - "id": "767897c3-bbc2-4b1a-9843-5a6bd82e29b0", - "workPeriodId": "e2d7651c-b8b6-453a-b472-478fe679a22f", - "challengeId": "61044188-965e-40df-94c4-9fa9a9499b25", - "amount": 1000, + "id": "310384cb-6e85-4f7d-a6d2-8c03ca27871d", + "workPeriodId": "d049e7bc-c827-482b-9ec6-b87d9289d1cd", + "challengeId": "0de972b8-6cc9-4625-9760-1c77561c29e9", + "amount": 900, "status": "completed", "createdBy": "57646ff9-1cd3-4d3c-88ba-eb09a395366c", "updatedBy": null, - "createdAt": "2021-04-14T22:01:45.523Z", - "updatedAt": null + "createdAt": "2021-04-14T19:13:23.714Z", + "updatedAt": "2021-04-21T20:19:56.934Z" }, { - "id": "63cec011-7714-4ab6-944f-e76b9fa2bd1a", - "workPeriodId": "0ed89458-ab82-485e-9727-858e7c25d477", - "challengeId": "1bdf092e-e117-4d42-bb5d-e49816171c0d", - "amount": 500, + "id": "2a122a93-e778-4eb9-868c-5f38b8b9bb4e", + "workPeriodId": "da8abd64-2878-4e09-b3b1-41a27a0576d4", + "challengeId": "25a7c442-427b-4b6d-9c41-112dbd420c0d", + "amount": 800, "status": "completed", "createdBy": "57646ff9-1cd3-4d3c-88ba-eb09a395366c", "updatedBy": null, - "createdAt": "2021-04-14T22:01:45.523Z", - "updatedAt": null + "createdAt": "2021-04-14T19:13:23.714Z", + "updatedAt": "2021-04-21T20:19:56.934Z" }, { - "id": "c117de76-965f-4069-aefb-8dd97f95112c", - "workPeriodId": "c1de1dd6-64b9-4dc6-b463-48c280a01465", - "challengeId": "59d08064-e1b4-4e78-82d8-b2d7ffa6f0b1", - "amount": 900, + "id": "767897c3-bbc2-4b1a-9843-5a6bd82e29b0", + "workPeriodId": "dcc310cf-ea4a-4637-9bf5-5baaabea67b3", + "challengeId": "61044188-965e-40df-94c4-9fa9a9499b25", + "amount": 1000, "status": "completed", "createdBy": "57646ff9-1cd3-4d3c-88ba-eb09a395366c", "updatedBy": null, "createdAt": "2021-04-14T22:01:45.523Z", - "updatedAt": null - }, - { - "id": "8ff6188f-b4e6-4f6e-b2d4-2a622ae50c4f", - "workPeriodId": "4b5ce032-7c8d-423a-bec3-f469cb869088", - "challengeId": "f151a5a1-6b28-4f59-bdde-6e73498faa84", - "amount": 450, - "status": "cancelled", - "createdBy": "57646ff9-1cd3-4d3c-88ba-eb09a395366c", - "updatedBy": null, - "createdAt": "2021-04-14T22:01:45.326Z", - "updatedAt": null - }, - { - "id": "04ef47ac-8f4d-402f-b9fd-48b2b1d9003d", - "workPeriodId": "1b5e7460-c197-4f38-8f53-80e651ee32fe", - "challengeId": "fa909769-f5f7-41fb-94bb-80db62e21a5e", - "amount": 800, - "status": "cancelled", - "createdBy": "57646ff9-1cd3-4d3c-88ba-eb09a395366c", - "updatedBy": null, - "createdAt": "2021-04-14T22:01:45.326Z", - "updatedAt": null + "updatedAt": "2021-04-21T20:19:56.934Z" }, { - "id": "283f9c3b-7f0a-4792-9661-ced7cbdb340d", - "workPeriodId": "6aae6de0-0f64-4af6-a4a4-a9920cf873fa", - "challengeId": "9a995b78-0542-41be-a926-f3df57c2f873", - "amount": 400, + "id": "50f7a6fa-a04d-4873-8fd0-037be2f14425", + "workPeriodId": "e19bddc5-38ac-43c9-8273-bc9069de26b3", + "challengeId": "419fbb3d-921d-4613-a87e-337f38d21885", + "amount": 600, "status": "completed", "createdBy": "57646ff9-1cd3-4d3c-88ba-eb09a395366c", "updatedBy": null, - "createdAt": "2021-04-14T22:01:45.361Z", - "updatedAt": null + "createdAt": "2021-04-14T22:01:45.523Z", + "updatedAt": "2021-04-21T20:19:56.934Z" }, { - "id": "12b0bcfc-59ae-478c-bb32-cb18d1d0244c", - "workPeriodId": "87f41144-95d3-427d-b5bf-161250a6b9e4", - "challengeId": "a07ea88f-c52b-4023-8730-c4364efd0dd2", + "id": "11ea987f-f218-4d2b-b656-0741208539f2", + "workPeriodId": "f575df2d-f170-4251-9042-b17ca5e99ca5", + "challengeId": "0de972b8-6cc9-4625-9760-1c77561c29e9", "amount": 600, "status": "completed", "createdBy": "57646ff9-1cd3-4d3c-88ba-eb09a395366c", "updatedBy": null, - "createdAt": "2021-04-14T22:01:45.361Z", - "updatedAt": null + "createdAt": "2021-04-16T19:13:23.714Z", + "updatedAt": "2021-04-21T20:19:56.934Z" }, { "id": "2519d7f9-81c8-448c-aec2-aa78d6d6a962", - "workPeriodId": "06fda3ca-e583-4466-baeb-70dac8952151", + "workPeriodId": "f70509c0-baed-4ff1-8022-12441251f7af", "challengeId": "fd051497-6050-4edf-b8f7-780128f64dc5", "amount": 300, "status": "cancelled", "createdBy": "57646ff9-1cd3-4d3c-88ba-eb09a395366c", "updatedBy": null, "createdAt": "2021-04-14T22:01:45.324Z", - "updatedAt": null - }, - { - "id": "c051c3da-34bb-4deb-8921-04e5d2fa0bcc", - "workPeriodId": "2530239e-fcd7-43a1-81ca-1df38e8744fc", - "challengeId": "25fd805c-49cd-443f-ba0d-813c33a6d8ad", - "amount": 400, - "status": "completed", - "createdBy": "57646ff9-1cd3-4d3c-88ba-eb09a395366c", - "updatedBy": null, - "createdAt": "2021-04-14T22:01:45.390Z", - "updatedAt": null - }, - { - "id": "7cf85ce0-ef8c-4152-8623-9a1325db6daa", - "workPeriodId": "7f58f304-800f-4304-9aa1-21c7c5aad882", - "challengeId": "fbf8efda-fe4b-4b72-99dd-573b79d27bd8", - "amount": 200, - "status": "cancelled", - "createdBy": "57646ff9-1cd3-4d3c-88ba-eb09a395366c", - "updatedBy": null, - "createdAt": "2021-04-14T22:01:45.390Z", - "updatedAt": null - }, - { - "id": "90bb43bd-d9e7-4eab-a46b-ab03338be11a", - "workPeriodId": "08b5fc47-0e40-48d5-be46-24ecfd9031b5", - "challengeId": "8b6f4040-d7ae-4264-b60b-b1171c9365e4", - "amount": 400, - "status": "completed", - "createdBy": "57646ff9-1cd3-4d3c-88ba-eb09a395366c", - "updatedBy": null, - "createdAt": "2021-04-14T22:01:45.390Z", - "updatedAt": null + "updatedAt": "2021-04-21T20:19:56.934Z" } ] } diff --git a/docs/Topcoder-bookings-api.postman_collection.json b/docs/Topcoder-bookings-api.postman_collection.json index 3d0a9670..f40394d5 100644 --- a/docs/Topcoder-bookings-api.postman_collection.json +++ b/docs/Topcoder-bookings-api.postman_collection.json @@ -1,6 +1,6 @@ { "info": { - "_postman_id": "2ec8ba88-98dd-4719-8e72-53ed706f071c", + "_postman_id": "f26164a2-4129-4e0a-89fb-75c6756b4a79", "name": "Topcoder-bookings-api", "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" }, @@ -3118,7 +3118,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"projectId\": {{projectId}},\n \"externalId\": \"88774632\",\n \"description\": \"Dummy Description\",\n \"startDate\": \"2020-09-27T04:17:23.131Z\",\n \"duration\": 1,\n \"numPositions\": 13,\n \"resourceType\": \"Dummy Resource Type\",\n \"rateType\": \"hourly\",\n \"workload\": \"full-time\",\n \"skills\": [\n \"23e00d92-207a-4b5b-b3c9-4c5662644941\",\n \"7d076384-ccf6-4e43-a45d-1b24b1e624aa\",\n \"cbac57a3-7180-4316-8769-73af64893158\",\n \"a2b4bc11-c641-4a19-9eb7-33980378f82e\"\n ],\n \"title\": \"Dummy title - at most 64 characters\"\n}", + "raw": "{\n \"projectId\": {{projectId}},\n \"externalId\": \"88774632\",\n \"description\": \"Dummy Description\",\n \"startDate\": \"2020-09-27\",\n \"duration\": 1,\n \"numPositions\": 13,\n \"resourceType\": \"Dummy Resource Type\",\n \"rateType\": \"hourly\",\n \"workload\": \"full-time\",\n \"skills\": [\n \"23e00d92-207a-4b5b-b3c9-4c5662644941\",\n \"7d076384-ccf6-4e43-a45d-1b24b1e624aa\",\n \"cbac57a3-7180-4316-8769-73af64893158\",\n \"a2b4bc11-c641-4a19-9eb7-33980378f82e\"\n ],\n \"title\": \"Dummy title - at most 64 characters\"\n}", "options": { "raw": { "language": "json" @@ -7435,7 +7435,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"projectId\": {{projectId}},\r\n \"userId\": \"a55fe1bc-1754-45fa-9adc-cf3d6d7c377a\",\r\n \"jobId\": \"{{jobId}}\",\r\n \"startDate\": \"2020-09-27T04:17:23.131Z\",\r\n \"endDate\": \"2020-10-27T04:17:23.131Z\",\r\n \"memberRate\": 13.23,\r\n \"customerRate\": 13,\r\n \"rateType\": \"hourly\"\r\n}", + "raw": "{\r\n \"projectId\": {{projectId}},\r\n \"userId\": \"a55fe1bc-1754-45fa-9adc-cf3d6d7c377a\",\r\n \"jobId\": \"{{jobId}}\",\r\n \"startDate\": \"2020-09-27\",\r\n \"endDate\": \"2020-10-27\",\r\n \"memberRate\": 13.23,\r\n \"customerRate\": 13,\r\n \"rateType\": \"hourly\",\r\n \"billingAccountId\": 80000071\r\n}", "options": { "raw": { "language": "json" @@ -7574,7 +7574,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"projectId\": {{projectId}},\r\n \"userId\": \"a55fe1bc-1754-45fa-9adc-cf3d6d7c377a\",\r\n \"jobId\": \"{{jobIdCreatedByM2M}}\",\r\n \"startDate\": \"2020-12-27T04:17:23.131Z\",\r\n \"endDate\": \"2021-01-27T04:17:23.131Z\",\r\n \"memberRate\": 13.23,\r\n \"customerRate\": 13,\r\n \"rateType\": \"hourly\"\r\n}", + "raw": "{\r\n \"projectId\": {{projectId}},\r\n \"userId\": \"a55fe1bc-1754-45fa-9adc-cf3d6d7c377a\",\r\n \"jobId\": \"{{jobIdCreatedByM2M}}\",\r\n \"startDate\": \"2020-12-27\",\r\n \"endDate\": \"2021-01-27\",\r\n \"memberRate\": 13.23,\r\n \"customerRate\": 13,\r\n \"rateType\": \"hourly\",\r\n \"billingAccountId\": 80000071\r\n}", "options": { "raw": { "language": "json" @@ -7711,7 +7711,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"projectId\": {{projectId}},\r\n \"userId\": \"a55fe1bc-1754-45fa-9adc-cf3d6d7c377a\",\r\n \"jobId\": \"{{jobId}}\",\r\n \"startDate\": \"2020-09-27T04:17:23.131Z\",\r\n \"endDate\": \"2020-09-28T04:17:23.131Z\",\r\n \"memberRate\": 13.23,\r\n \"customerRate\": 13,\r\n \"rateType\": \"hourly\"\r\n}", + "raw": "{\r\n \"projectId\": {{projectId}},\r\n \"userId\": \"a55fe1bc-1754-45fa-9adc-cf3d6d7c377a\",\r\n \"jobId\": \"{{jobId}}\",\r\n \"startDate\": \"2020-09-27\",\r\n \"endDate\": \"2020-09-28\",\r\n \"memberRate\": 13.23,\r\n \"customerRate\": 13,\r\n \"rateType\": \"hourly\",\r\n \"billingAccountId\": 80000071\r\n}", "options": { "raw": { "language": "json" @@ -7758,7 +7758,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"projectId\": {{projectId}},\r\n \"userId\": \"a55fe1bc-1754-45fa-9adc-cf3d6d7c377a\",\r\n \"jobId\": \"{{jobId}}\",\r\n \"startDate\": \"2020-09-27T04:17:23.131Z\",\r\n \"endDate\": \"2020-09-28T04:17:23.131Z\",\r\n \"memberRate\": 13.23,\r\n \"customerRate\": 13,\r\n \"rateType\": \"hourly\"\r\n}", + "raw": "{\r\n \"projectId\": {{projectId}},\r\n \"userId\": \"a55fe1bc-1754-45fa-9adc-cf3d6d7c377a\",\r\n \"jobId\": \"{{jobId}}\",\r\n \"startDate\": \"2020-09-27\",\r\n \"endDate\": \"2020-09-28\",\r\n \"memberRate\": 13.23,\r\n \"customerRate\": 13,\r\n \"rateType\": \"hourly\",\r\n \"billingAccountId\": 80000071\r\n}", "options": { "raw": { "language": "json" @@ -7805,7 +7805,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"projectId\": {{projectId}},\r\n \"userId\": \"a55fe1bc-1754-45fa-9adc-cf3d6d7c377a\",\r\n \"jobId\": \"{{jobId}}\",\r\n \"startDate\": \"2020-09-27T04:17:23.131Z\",\r\n \"endDate\": \"2020-09-28T04:17:23.131Z\",\r\n \"memberRate\": 13.23,\r\n \"customerRate\": 13,\r\n \"rateType\": \"hourly\"\r\n}", + "raw": "{\r\n \"projectId\": {{projectId}},\r\n \"userId\": \"a55fe1bc-1754-45fa-9adc-cf3d6d7c377a\",\r\n \"jobId\": \"{{jobId}}\",\r\n \"startDate\": \"2020-09-27\",\r\n \"endDate\": \"2020-09-28\",\r\n \"memberRate\": 13.23,\r\n \"customerRate\": 13,\r\n \"rateType\": \"hourly\",\r\n \"billingAccountId\": 80000071\r\n}", "options": { "raw": { "language": "json" @@ -7852,7 +7852,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"projectId\": {{projectId}},\r\n \"userId\": \"a55fe1bc-1754-45fa-9adc-cf3d6d7c377a\",\r\n \"jobId\": \"{{jobId}}\",\r\n \"startDate\": \"2020-09-27T04:17:23.131Z\",\r\n \"endDate\": \"2020-09-27T04:17:23.131Z\",\r\n \"memberRate\": 13.23,\r\n \"customerRate\": 13,\r\n \"rateType\": \"hourly\"\r\n}", + "raw": "{\r\n \"projectId\": {{projectId}},\r\n \"userId\": \"a55fe1bc-1754-45fa-9adc-cf3d6d7c377a\",\r\n \"jobId\": \"{{jobId}}\",\r\n \"startDate\": \"2020-09-27\",\r\n \"endDate\": \"2020-09-27\",\r\n \"memberRate\": 13.23,\r\n \"customerRate\": 13,\r\n \"rateType\": \"hourly\",\r\n \"billingAccountId\": 80000071\r\n}", "options": { "raw": { "language": "json" @@ -8119,12 +8119,12 @@ }, { "key": "startDate", - "value": "2020-09-27T04:17:23.131Z", + "value": "2020-09-27", "disabled": true }, { "key": "endDate", - "value": "2020-09-27T04:17:23.131Z", + "value": "2020-09-27", "disabled": true }, { @@ -8202,12 +8202,12 @@ }, { "key": "startDate", - "value": "2020-09-27T04:17:23.131Z", + "value": "2020-09-27", "disabled": true }, { "key": "endDate", - "value": "2020-09-27T04:17:23.131Z", + "value": "2020-09-27", "disabled": true }, { @@ -8275,12 +8275,12 @@ }, { "key": "startDate", - "value": "2020-09-27T04:17:23.131Z", + "value": "2020-09-27", "disabled": true }, { "key": "endDate", - "value": "2020-09-27T04:17:23.131Z", + "value": "2020-09-27", "disabled": true }, { @@ -8345,12 +8345,12 @@ }, { "key": "startDate", - "value": "2020-09-27T04:17:23.131Z", + "value": "2020-09-27", "disabled": true }, { "key": "endDate", - "value": "2020-09-27T04:17:23.131Z", + "value": "2020-09-27", "disabled": true }, { @@ -8419,12 +8419,12 @@ }, { "key": "startDate", - "value": "2020-09-27T04:17:23.131Z", + "value": "2020-09-27", "disabled": true }, { "key": "endDate", - "value": "2020-09-27T04:17:23.131Z", + "value": "2020-09-27", "disabled": true }, { @@ -8467,7 +8467,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"projectId\": {{projectId}},\r\n \"userId\": \"a55fe1bc-1754-45fa-9adc-cf3d6d7c377a\",\r\n \"jobId\": \"{{jobId}}\",\r\n \"startDate\": \"2020-09-26T04:17:23.131Z\",\r\n \"endDate\": \"2020-11-29T04:17:23.131Z\",\r\n \"memberRate\": 13.23,\r\n \"customerRate\": 13,\r\n \"rateType\": \"hourly\",\r\n \"status\": \"assigned\"\r\n}", + "raw": "{\r\n \"projectId\": {{projectId}},\r\n \"userId\": \"a55fe1bc-1754-45fa-9adc-cf3d6d7c377a\",\r\n \"jobId\": \"{{jobId}}\",\r\n \"startDate\": \"2020-09-26\",\r\n \"endDate\": \"2020-11-29\",\r\n \"memberRate\": 13.23,\r\n \"customerRate\": 13,\r\n \"rateType\": \"hourly\",\r\n \"status\": \"assigned\",\r\n \"billingAccountId\": 80000071\r\n}", "options": { "raw": { "language": "json" @@ -8603,7 +8603,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"projectId\": {{projectId}},\r\n \"userId\": \"a55fe1bc-1754-45fa-9adc-cf3d6d7c377a\",\r\n \"jobId\": \"{{jobIdCreatedByM2M}}\",\r\n \"startDate\": \"2020-12-27T04:17:23.131Z\",\r\n \"endDate\": \"2021-01-10T04:17:23.131Z\",\r\n \"memberRate\": 13.23,\r\n \"customerRate\": 13,\r\n \"rateType\": \"hourly\",\r\n \"status\": \"assigned\"\r\n}", + "raw": "{\r\n \"projectId\": {{projectId}},\r\n \"userId\": \"a55fe1bc-1754-45fa-9adc-cf3d6d7c377a\",\r\n \"jobId\": \"{{jobIdCreatedByM2M}}\",\r\n \"startDate\": \"2020-12-27\",\r\n \"endDate\": \"2021-01-10\",\r\n \"memberRate\": 13.23,\r\n \"customerRate\": 13,\r\n \"rateType\": \"hourly\",\r\n \"status\": \"assigned\",\r\n \"billingAccountId\": 80000071\r\n}", "options": { "raw": { "language": "json" @@ -8741,7 +8741,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"projectId\": {{projectId}},\r\n \"userId\": \"a55fe1bc-1754-45fa-9adc-cf3d6d7c377a\",\r\n \"jobId\": \"{{jobId}}\",\r\n \"startDate\": \"2020-09-27T04:17:23.131Z\",\r\n \"endDate\": \"2020-09-28T04:17:23.131Z\",\r\n \"memberRate\": 13.23,\r\n \"customerRate\": 13,\r\n \"rateType\": \"hourly\",\r\n \"status\": \"assigned\"\r\n}", + "raw": "{\r\n \"projectId\": {{projectId}},\r\n \"userId\": \"a55fe1bc-1754-45fa-9adc-cf3d6d7c377a\",\r\n \"jobId\": \"{{jobId}}\",\r\n \"startDate\": \"2020-09-27\",\r\n \"endDate\": \"2020-09-28\",\r\n \"memberRate\": 13.23,\r\n \"customerRate\": 13,\r\n \"rateType\": \"hourly\",\r\n \"status\": \"assigned\",\r\n \"billingAccountId\": 80000071\r\n}", "options": { "raw": { "language": "json" @@ -8789,7 +8789,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"projectId\": {{projectId}},\r\n \"userId\": \"a55fe1bc-1754-45fa-9adc-cf3d6d7c377a\",\r\n \"jobId\": \"{{jobId}}\",\r\n \"startDate\": \"2020-09-27T04:17:23.131Z\",\r\n \"endDate\": \"2020-09-28T04:17:23.131Z\",\r\n \"memberRate\": 13.23,\r\n \"customerRate\": 13,\r\n \"rateType\": \"hourly\",\r\n \"status\": \"assigned\"\r\n}", + "raw": "{\r\n \"projectId\": {{projectId}},\r\n \"userId\": \"a55fe1bc-1754-45fa-9adc-cf3d6d7c377a\",\r\n \"jobId\": \"{{jobId}}\",\r\n \"startDate\": \"2020-09-27\",\r\n \"endDate\": \"2020-09-28\",\r\n \"memberRate\": 13.23,\r\n \"customerRate\": 13,\r\n \"rateType\": \"hourly\",\r\n \"status\": \"assigned\",\r\n \"billingAccountId\": 80000071\r\n}", "options": { "raw": { "language": "json" @@ -8837,7 +8837,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"projectId\": {{projectId}},\r\n \"userId\": \"a55fe1bc-1754-45fa-9adc-cf3d6d7c377a\",\r\n \"jobId\": \"{{jobId}}\",\r\n \"startDate\": \"2020-09-27T04:17:23.131Z\",\r\n \"endDate\": \"2020-09-28T04:17:23.131Z\",\r\n \"memberRate\": 13.23,\r\n \"customerRate\": 13,\r\n \"rateType\": \"hourly\",\r\n \"status\": \"assigned\"\r\n}", + "raw": "{\r\n \"projectId\": {{projectId}},\r\n \"userId\": \"a55fe1bc-1754-45fa-9adc-cf3d6d7c377a\",\r\n \"jobId\": \"{{jobId}}\",\r\n \"startDate\": \"2020-09-27\",\r\n \"endDate\": \"2020-09-28\",\r\n \"memberRate\": 13.23,\r\n \"customerRate\": 13,\r\n \"rateType\": \"hourly\",\r\n \"status\": \"assigned\",\r\n \"billingAccountId\": 80000071\r\n}", "options": { "raw": { "language": "json" @@ -8885,7 +8885,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"projectId\": {{projectId}},\r\n \"userId\": \"a55fe1bc-1754-45fa-9adc-cf3d6d7c377a\",\r\n \"jobId\": \"{{jobId}}\",\r\n \"startDate\": \"2020-09-27T04:17:23.131Z\",\r\n \"endDate\": \"2020-09-28T04:17:23.131Z\",\r\n \"memberRate\": 13.23,\r\n \"customerRate\": 13,\r\n \"rateType\": \"hourly\",\r\n \"status\": \"assigned\"\r\n}", + "raw": "{\r\n \"projectId\": {{projectId}},\r\n \"userId\": \"a55fe1bc-1754-45fa-9adc-cf3d6d7c377a\",\r\n \"jobId\": \"{{jobId}}\",\r\n \"startDate\": \"2020-09-27\",\r\n \"endDate\": \"2020-09-28\",\r\n \"memberRate\": 13.23,\r\n \"customerRate\": 13,\r\n \"rateType\": \"hourly\",\r\n \"status\": \"assigned\",\r\n \"billingAccountId\": 80000071\r\n}", "options": { "raw": { "language": "json" @@ -8931,7 +8931,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"status\": \"assigned\",\r\n \"startDate\": \"2020-09-30T04:17:23.131Z\",\r\n \"endDate\": \"2020-11-28T04:17:23.131Z\",\r\n \"memberRate\": 13.23,\r\n \"customerRate\": 13,\r\n \"rateType\": \"hourly\"\r\n}", + "raw": "{\r\n \"status\": \"assigned\",\r\n \"startDate\": \"2020-09-30\",\r\n \"endDate\": \"2020-11-28\",\r\n \"memberRate\": 13.23,\r\n \"customerRate\": 13,\r\n \"rateType\": \"hourly\",\r\n \"billingAccountId\": 80000071\r\n}", "options": { "raw": { "language": "json" @@ -8977,7 +8977,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"status\": \"assigned\",\r\n \"startDate\": \"2020-12-30T04:17:23.131Z\",\r\n \"endDate\": \"2021-02-10T04:17:23.131Z\",\r\n \"memberRate\": 13.23,\r\n \"customerRate\": 13,\r\n \"rateType\": \"hourly\"\r\n}", + "raw": "{\r\n \"status\": \"assigned\",\r\n \"startDate\": \"2020-12-30\",\r\n \"endDate\": \"2021-02-10\",\r\n \"memberRate\": 13.23,\r\n \"customerRate\": 13,\r\n \"rateType\": \"hourly\",\r\n \"billingAccountId\": 80000071\r\n}", "options": { "raw": { "language": "json" @@ -9025,7 +9025,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"status\": \"assigned\",\r\n \"startDate\": \"2020-09-27T04:17:23.131Z\",\r\n \"endDate\": \"2020-09-28T04:17:23.131Z\",\r\n \"memberRate\": 13.23,\r\n \"customerRate\": 13,\r\n \"rateType\": \"hourly\"\r\n}", + "raw": "{\r\n \"status\": \"assigned\",\r\n \"startDate\": \"2020-09-27\",\r\n \"endDate\": \"2020-09-28\",\r\n \"memberRate\": 13.23,\r\n \"customerRate\": 13,\r\n \"rateType\": \"hourly\",\r\n \"billingAccountId\": 80000071\r\n}", "options": { "raw": { "language": "json" @@ -9073,7 +9073,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"status\": \"assigned\",\r\n \"startDate\": \"2020-09-27T04:17:23.131Z\",\r\n \"endDate\": \"2020-09-28T04:17:23.131Z\",\r\n \"memberRate\": 13.23,\r\n \"customerRate\": 13,\r\n \"rateType\": \"hourly\"\r\n}", + "raw": "{\r\n \"status\": \"assigned\",\r\n \"startDate\": \"2020-09-27\",\r\n \"endDate\": \"2020-09-28\",\r\n \"memberRate\": 13.23,\r\n \"customerRate\": 13,\r\n \"rateType\": \"hourly\",\r\n \"billingAccountId\": 80000071\r\n}", "options": { "raw": { "language": "json" @@ -9121,7 +9121,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"status\": \"assigned\",\r\n \"startDate\": \"2020-09-27T04:17:23.131Z\",\r\n \"endDate\": \"2020-09-28T04:17:23.131Z\",\r\n \"memberRate\": 13.23,\r\n \"customerRate\": 13,\r\n \"rateType\": \"hourly\"\r\n}", + "raw": "{\r\n \"status\": \"assigned\",\r\n \"startDate\": \"2020-09-27\",\r\n \"endDate\": \"2020-09-28\",\r\n \"memberRate\": 13.23,\r\n \"customerRate\": 13,\r\n \"rateType\": \"hourly\",\r\n \"billingAccountId\": 80000071\r\n}", "options": { "raw": { "language": "json" @@ -9169,7 +9169,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"status\": \"assigned\",\r\n \"startDate\": \"2020-09-27T04:17:23.131Z\",\r\n \"endDate\": \"2020-09-27T04:17:23.131Z\",\r\n \"memberRate\": 13.23,\r\n \"customerRate\": 13,\r\n \"rateType\": \"hourly\"\r\n}", + "raw": "{\r\n \"status\": \"assigned\",\r\n \"startDate\": \"2020-09-27\",\r\n \"endDate\": \"2020-09-27\",\r\n \"memberRate\": 13.23,\r\n \"customerRate\": 13,\r\n \"rateType\": \"hourly\",\r\n \"billingAccountId\": 80000071\r\n}", "options": { "raw": { "language": "json" @@ -9352,7 +9352,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"status\": \"cancelled\"\r\n}", + "raw": "{\r\n \"status\": \"cancelled\",\r\n \"billingAccountId\": 80000071\r\n}", "options": { "raw": { "language": "json" @@ -9398,7 +9398,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"startDate\": \"2020-10-04T04:17:23.131Z\"\r\n}", + "raw": "{\r\n \"startDate\": \"2020-10-04\",\r\n \"billingAccountId\": 80000071\r\n}", "options": { "raw": { "language": "json" @@ -9741,7 +9741,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"projectId\": {{projectId}},\r\n \"userId\": \"a55fe1bc-1754-45fa-9adc-cf3d6d7c377a\",\r\n \"jobId\": \"{{jobId}}\",\r\n \"startDate\": \"2020-09-27T04:17:23.131Z\",\r\n \"endDate\": \"2020-09-27T04:17:23.131Z\",\r\n \"memberRate\": 13.23,\r\n \"customerRate\": 13,\r\n \"rateType\": \"hourly\"\r\n}", + "raw": "{\r\n \"projectId\": {{projectId}},\r\n \"userId\": \"a55fe1bc-1754-45fa-9adc-cf3d6d7c377a\",\r\n \"jobId\": \"{{jobId}}\",\r\n \"startDate\": \"2020-09-27\",\r\n \"endDate\": \"2020-09-27\",\r\n \"memberRate\": 13.23,\r\n \"customerRate\": 13,\r\n \"rateType\": \"hourly\",\r\n \"billingAccountId\": 80000071\r\n}", "options": { "raw": { "language": "json" @@ -13044,7 +13044,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"projectId\": {{project_id_17234}},\r\n \"userId\": \"a55fe1bc-1754-45fa-9adc-cf3d6d7c377a\",\r\n \"jobId\": \"{{jobId}}\",\r\n \"startDate\": \"2020-09-27T04:17:23.131Z\",\r\n \"endDate\": \"2020-10-27T04:17:23.131Z\",\r\n \"memberRate\": 13.23,\r\n \"customerRate\": 13,\r\n \"rateType\": \"hourly\"\r\n}", + "raw": "{\r\n \"projectId\": {{project_id_17234}},\r\n \"userId\": \"a55fe1bc-1754-45fa-9adc-cf3d6d7c377a\",\r\n \"jobId\": \"{{jobId}}\",\r\n \"startDate\": \"2020-09-27\",\r\n \"endDate\": \"2020-10-27\",\r\n \"memberRate\": 13.23,\r\n \"customerRate\": 13,\r\n \"rateType\": \"hourly\",\r\n \"billingAccountId\": 80000071\r\n}", "options": { "raw": { "language": "json" @@ -13111,6 +13111,55 @@ } }, "response": [] + }, + { + "name": "create work period with m2m", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "pm.test('Status code is 200', function () {\r", + " pm.response.to.have.status(200);\r", + " if(pm.response.status === \"OK\"){\r", + " const response = pm.response.json()\r", + " pm.environment.set(\"workPeriodIdCreatedByM2M\", response.id);\r", + " }\r", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Authorization", + "type": "text", + "value": "Bearer {{token_m2m_create_work_period}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\r\n \"resourceBookingId\": \"{{resourceBookingId}}\",\r\n \"startDate\": \"2021-03-14\",\r\n \"endDate\": \"2021-03-20\",\r\n \"daysWorked\": 3,\r\n \"memberRate\": 13.13,\r\n \"customerRate\": 13.13,\r\n \"paymentStatus\": \"cancelled\"\r\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{URL}}/work-periods", + "host": [ + "{{URL}}" + ], + "path": [ + "work-periods" + ] + } + }, + "response": [] } ] }, @@ -19305,7 +19354,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"projectId\": {{projectId}},\n \"externalId\": \"88774632\",\n \"description\": \"Dummy Description\",\n \"startDate\": \"2020-09-27T04:17:23.131Z\",\n \"duration\": 1,\n \"numPositions\": 13,\n \"resourceType\": \"Dummy Resource Type\",\n \"rateType\": \"hourly\",\n \"workload\": \"full-time\",\n \"skills\": [\n \"23e00d92-207a-4b5b-b3c9-4c5662644941\",\n \"7d076384-ccf6-4e43-a45d-1b24b1e624aa\",\n \"cbac57a3-7180-4316-8769-73af64893158\",\n \"a2b4bc11-c641-4a19-9eb7-33980378f82e\"\n ],\n \"title\": \"Dummy title - at most 64 characters\"\n}", + "raw": "{\n \"projectId\": {{projectId}},\n \"externalId\": \"88774632\",\n \"description\": \"Dummy Description\",\n \"startDate\": \"2020-09-27\",\n \"duration\": 1,\n \"numPositions\": 13,\n \"resourceType\": \"Dummy Resource Type\",\n \"rateType\": \"hourly\",\n \"workload\": \"full-time\",\n \"skills\": [\n \"23e00d92-207a-4b5b-b3c9-4c5662644941\",\n \"7d076384-ccf6-4e43-a45d-1b24b1e624aa\",\n \"cbac57a3-7180-4316-8769-73af64893158\",\n \"a2b4bc11-c641-4a19-9eb7-33980378f82e\"\n ],\n \"title\": \"Dummy title - at most 64 characters\"\n}", "options": { "raw": { "language": "json" @@ -19551,6 +19600,60 @@ { "name": "Resource Bookings", "item": [ + { + "name": "Before Test", + "item": [ + { + "name": "✔ create job with administrator", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "pm.test('Status code is 200', function () {\r", + " pm.response.to.have.status(200);\r", + " if(pm.response.status === \"OK\"){\r", + " const response = pm.response.json()\r", + " pm.environment.set(\"job_id_created_by_administrator\", response.id);\r", + " }\r", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Authorization", + "value": "Bearer {{token_administrator}}", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"projectId\": {{projectId}},\n \"externalId\": \"1212\",\n \"description\": \"Dummy Description\",\n \"startDate\": \"2020-09-27T04:17:23.131Z\",\n \"duration\": 1,\n \"numPositions\": 13,\n \"resourceType\": \"Dummy Resource Type\",\n \"rateType\": \"hourly\",\n \"workload\": \"full-time\",\n \"skills\": [\n \"23e00d92-207a-4b5b-b3c9-4c5662644941\",\n \"7d076384-ccf6-4e43-a45d-1b24b1e624aa\",\n \"cbac57a3-7180-4316-8769-73af64893158\",\n \"a2b4bc11-c641-4a19-9eb7-33980378f82e\"\n ],\n \"title\": \"Dummy title - at most 64 characters\"\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{URL}}/jobs", + "host": [ + "{{URL}}" + ], + "path": [ + "jobs" + ] + } + }, + "response": [] + } + ] + }, { "name": "✔ create resource booking with administrator", "event": [ @@ -19576,7 +19679,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"projectId\": {{projectId}},\r\n \"userId\": \"a55fe1bc-1754-45fa-9adc-cf3d6d7c377a\",\r\n \"jobId\": \"{{job_id_created_by_administrator}}\",\r\n \"startDate\": \"2020-09-27T04:17:23.131Z\",\r\n \"endDate\": \"2020-09-27T04:17:23.131Z\",\r\n \"memberRate\": 13.23,\r\n \"customerRate\": 13,\r\n \"rateType\": \"hourly\"\r\n}", + "raw": "{\r\n \"projectId\": {{projectId}},\r\n \"userId\": \"a55fe1bc-1754-45fa-9adc-cf3d6d7c377a\",\r\n \"jobId\": \"{{job_id_created_by_administrator}}\",\r\n \"startDate\": \"2020-09-27\",\r\n \"endDate\": \"2020-09-27\",\r\n \"memberRate\": 13.23,\r\n \"customerRate\": 13,\r\n \"rateType\": \"hourly\",\r\n \"billingAccountId\": 80000071\r\n}", "options": { "raw": { "language": "json" @@ -19661,12 +19764,12 @@ }, { "key": "startDate", - "value": "2020-09-27T04:17:23.131Z", + "value": "2020-09-27", "disabled": true }, { "key": "endDate", - "value": "2020-09-27T04:17:23.131Z", + "value": "2020-09-27", "disabled": true }, { @@ -19702,7 +19805,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"projectId\": {{projectId}},\r\n \"userId\": \"a55fe1bc-1754-45fa-9adc-cf3d6d7c377a\",\r\n \"jobId\": \"{{job_id_created_by_administrator}}\",\r\n \"startDate\": \"2020-09-27T04:17:23.131Z\",\r\n \"endDate\": \"2020-09-27T04:17:23.131Z\",\r\n \"memberRate\": 13.23,\r\n \"customerRate\": 13,\r\n \"rateType\": \"hourly\",\r\n \"status\": \"assigned\"\r\n}", + "raw": "{\r\n \"projectId\": {{projectId}},\r\n \"userId\": \"a55fe1bc-1754-45fa-9adc-cf3d6d7c377a\",\r\n \"jobId\": \"{{job_id_created_by_administrator}}\",\r\n \"startDate\": \"2020-09-27\",\r\n \"endDate\": \"2020-09-27\",\r\n \"memberRate\": 13.23,\r\n \"customerRate\": 13,\r\n \"rateType\": \"hourly\",\r\n \"status\": \"assigned\",\r\n \"billingAccountId\": 80000071\r\n}", "options": { "raw": { "language": "json" @@ -19735,7 +19838,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"status\": \"assigned\",\r\n \"startDate\": \"2020-09-27T04:17:23.131Z\",\r\n \"endDate\": \"2020-09-27T04:17:23.131Z\",\r\n \"memberRate\": 13.23,\r\n \"customerRate\": 13,\r\n \"rateType\": \"hourly\"\r\n}", + "raw": "{\r\n \"status\": \"assigned\",\r\n \"startDate\": \"2020-09-27\",\r\n \"endDate\": \"2020-09-27\",\r\n \"memberRate\": 13.23,\r\n \"customerRate\": 13,\r\n \"rateType\": \"hourly\",\r\n \"billingAccountId\": 80000071\r\n}", "options": { "raw": { "language": "json" @@ -19875,7 +19978,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"projectId\": {{projectId}},\r\n \"userId\": \"a55fe1bc-1754-45fa-9adc-cf3d6d7c377a\",\r\n \"jobId\": \"{{job_id_created_by_administrator}}\",\r\n \"startDate\": \"2020-09-27T04:17:23.131Z\",\r\n \"endDate\": \"2020-09-27T04:17:23.131Z\",\r\n \"memberRate\": 13.23,\r\n \"customerRate\": 13,\r\n \"rateType\": \"hourly\"\r\n}", + "raw": "{\r\n \"projectId\": {{projectId}},\r\n \"userId\": \"a55fe1bc-1754-45fa-9adc-cf3d6d7c377a\",\r\n \"jobId\": \"{{job_id_created_by_administrator}}\",\r\n \"startDate\": \"2020-09-27\",\r\n \"endDate\": \"2020-09-27\",\r\n \"memberRate\": 13.23,\r\n \"customerRate\": 13,\r\n \"rateType\": \"hourly\",\r\n \"billingAccountId\": 80000071\r\n}", "options": { "raw": { "language": "json" @@ -20274,7 +20377,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"projectId\": {{project_id_17234}},\r\n \"userId\": \"a55fe1bc-1754-45fa-9adc-cf3d6d7c377a\",\r\n \"jobId\": \"{{job_id_created_by_administrator}}\",\r\n \"startDate\": \"2020-09-27T04:17:23.131Z\",\r\n \"endDate\": \"2020-09-27T04:17:23.131Z\",\r\n \"memberRate\": 13.23,\r\n \"customerRate\": 13,\r\n \"rateType\": \"hourly\"\r\n}", + "raw": "{\r\n \"projectId\": {{project_id_17234}},\r\n \"userId\": \"a55fe1bc-1754-45fa-9adc-cf3d6d7c377a\",\r\n \"jobId\": \"{{job_id_created_by_administrator}}\",\r\n \"startDate\": \"2020-09-27\",\r\n \"endDate\": \"2020-09-27\",\r\n \"memberRate\": 13.23,\r\n \"customerRate\": 13,\r\n \"rateType\": \"hourly\",\r\n \"billingAccountId\": 80000071\r\n}", "options": { "raw": { "language": "json" @@ -21195,7 +21298,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"projectId\": {{projectId}},\n \"externalId\": \"88774632\",\n \"description\": \"Dummy Description\",\n \"startDate\": \"2020-09-27T04:17:23.131Z\",\n \"duration\": 1,\n \"numPositions\": 13,\n \"resourceType\": \"Dummy Resource Type\",\n \"rateType\": \"hourly\",\n \"workload\": \"full-time\",\n \"skills\": [\n \"23e00d92-207a-4b5b-b3c9-4c5662644941\",\n \"7d076384-ccf6-4e43-a45d-1b24b1e624aa\",\n \"cbac57a3-7180-4316-8769-73af64893158\",\n \"a2b4bc11-c641-4a19-9eb7-33980378f82e\"\n ],\n \"title\": \"Dummy title - at most 64 characters\"\n}", + "raw": "{\n \"projectId\": {{projectId}},\n \"externalId\": \"88774632\",\n \"description\": \"Dummy Description\",\n \"startDate\": \"2020-09-27\",\n \"duration\": 1,\n \"numPositions\": 13,\n \"resourceType\": \"Dummy Resource Type\",\n \"rateType\": \"hourly\",\n \"workload\": \"full-time\",\n \"skills\": [\n \"23e00d92-207a-4b5b-b3c9-4c5662644941\",\n \"7d076384-ccf6-4e43-a45d-1b24b1e624aa\",\n \"cbac57a3-7180-4316-8769-73af64893158\",\n \"a2b4bc11-c641-4a19-9eb7-33980378f82e\"\n ],\n \"title\": \"Dummy title - at most 64 characters\"\n}", "options": { "raw": { "language": "json" @@ -21497,6 +21600,50 @@ { "name": "Before Test", "item": [ + { + "name": "create job", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "var data = JSON.parse(responseBody);\r", + "postman.setEnvironmentVariable(\"job_id_created_by_member\",data.id);" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Authorization", + "value": "Bearer {{token_member_tester1234}}", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"projectId\": {{project_id_16718}},\n \"externalId\": \"1212\",\n \"description\": \"Dummy Description\",\n \"startDate\": \"2020-09-27T04:17:23.131Z\",\n \"duration\": 1,\n \"numPositions\": 13,\n \"resourceType\": \"Dummy Resource Type\",\n \"rateType\": \"hourly\",\n \"workload\": \"full-time\",\n \"skills\": [\n \"23e00d92-207a-4b5b-b3c9-4c5662644941\",\n \"7d076384-ccf6-4e43-a45d-1b24b1e624aa\",\n \"cbac57a3-7180-4316-8769-73af64893158\",\n \"a2b4bc11-c641-4a19-9eb7-33980378f82e\"\n ],\n \"title\": \"Dummy title - at most 64 characters\"\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{URL}}/jobs", + "host": [ + "{{URL}}" + ], + "path": [ + "jobs" + ] + } + }, + "response": [] + }, { "name": "create resource booking", "event": [ @@ -21522,7 +21669,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"projectId\": {{project_id_16718}},\r\n \"userId\": \"fe38eed1-af73-41fd-85a2-ac4da1ff09a3\",\r\n \"jobId\": \"{{job_id_created_by_member}}\",\r\n \"startDate\": \"2020-09-27T04:17:23.131Z\",\r\n \"endDate\": \"2020-09-27T04:17:23.131Z\",\r\n \"memberRate\": 13.23,\r\n \"customerRate\": 13,\r\n \"rateType\": \"hourly\"\r\n}", + "raw": "{\r\n \"projectId\": {{project_id_16718}},\r\n \"userId\": \"fe38eed1-af73-41fd-85a2-ac4da1ff09a3\",\r\n \"jobId\": \"{{job_id_created_by_member}}\",\r\n \"startDate\": \"2020-09-27\",\r\n \"endDate\": \"2020-09-27\",\r\n \"memberRate\": 13.23,\r\n \"customerRate\": 13,\r\n \"rateType\": \"hourly\",\r\n \"billingAccountId\": 80000071\r\n}", "options": { "raw": { "language": "json" @@ -21568,7 +21715,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"projectId\": {{project_id_16718}},\r\n \"userId\": \"fe38eed1-af73-41fd-85a2-ac4da1ff09a3\",\r\n \"jobId\": \"{{job_id_created_by_member}}\",\r\n \"startDate\": \"2020-09-27T04:17:23.131Z\",\r\n \"endDate\": \"2020-09-27T04:17:23.131Z\",\r\n \"memberRate\": 13.23,\r\n \"customerRate\": 13,\r\n \"rateType\": \"hourly\"\r\n}", + "raw": "{\r\n \"projectId\": {{project_id_16718}},\r\n \"userId\": \"fe38eed1-af73-41fd-85a2-ac4da1ff09a3\",\r\n \"jobId\": \"{{job_id_created_by_member}}\",\r\n \"startDate\": \"2020-09-27\",\r\n \"endDate\": \"2020-09-27\",\r\n \"memberRate\": 13.23,\r\n \"customerRate\": 13,\r\n \"rateType\": \"hourly\",\r\n \"billingAccountId\": 80000071\r\n}", "options": { "raw": { "language": "json" @@ -21653,12 +21800,12 @@ }, { "key": "startDate", - "value": "2020-09-27T04:17:23.131Z", + "value": "2020-09-27", "disabled": true }, { "key": "endDate", - "value": "2020-09-27T04:17:23.131Z", + "value": "2020-09-27", "disabled": true }, { @@ -21698,7 +21845,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"projectId\": {{project_id_16718}},\r\n \"userId\": \"fe38eed1-af73-41fd-85a2-ac4da1ff09a3\",\r\n \"jobId\": \"{{job_id_created_by_member}}\",\r\n \"startDate\": \"2020-09-27T04:17:23.131Z\",\r\n \"endDate\": \"2020-09-27T04:17:23.131Z\",\r\n \"memberRate\": 13.23,\r\n \"customerRate\": 13,\r\n \"rateType\": \"hourly\",\r\n \"status\": \"assigned\"\r\n}", + "raw": "{\r\n \"projectId\": {{project_id_16718}},\r\n \"userId\": \"fe38eed1-af73-41fd-85a2-ac4da1ff09a3\",\r\n \"jobId\": \"{{job_id_created_by_member}}\",\r\n \"startDate\": \"2020-09-27\",\r\n \"endDate\": \"2020-09-27\",\r\n \"memberRate\": 13.23,\r\n \"customerRate\": 13,\r\n \"rateType\": \"hourly\",\r\n \"status\": \"assigned\",\r\n \"billingAccountId\": 80000071\r\n}", "options": { "raw": { "language": "json" @@ -21731,7 +21878,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"status\": \"assigned\",\r\n \"startDate\": \"2020-09-27T04:17:23.131Z\",\r\n \"endDate\": \"2020-09-27T04:17:23.131Z\",\r\n \"memberRate\": 13.23,\r\n \"customerRate\": 13,\r\n \"rateType\": \"hourly\"\r\n}", + "raw": "{\r\n \"status\": \"assigned\",\r\n \"startDate\": \"2020-09-27\",\r\n \"endDate\": \"2020-09-27\",\r\n \"memberRate\": 13.23,\r\n \"customerRate\": 13,\r\n \"rateType\": \"hourly\",\r\n \"billingAccountId\": 80000071\r\n}", "options": { "raw": { "language": "json" @@ -21871,7 +22018,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"projectId\": {{project_id_16718}},\r\n \"userId\": \"fe38eed1-af73-41fd-85a2-ac4da1ff09a3\",\r\n \"jobId\": \"{{job_id_created_by_member}}\",\r\n \"startDate\": \"2020-09-27T04:17:23.131Z\",\r\n \"endDate\": \"2020-09-27T04:17:23.131Z\",\r\n \"memberRate\": 13.23,\r\n \"customerRate\": 13,\r\n \"rateType\": \"hourly\"\r\n}", + "raw": "{\r\n \"projectId\": {{project_id_16718}},\r\n \"userId\": \"fe38eed1-af73-41fd-85a2-ac4da1ff09a3\",\r\n \"jobId\": \"{{job_id_created_by_member}}\",\r\n \"startDate\": \"2020-09-27\",\r\n \"endDate\": \"2020-09-27\",\r\n \"memberRate\": 13.23,\r\n \"customerRate\": 13,\r\n \"rateType\": \"hourly\",\r\n \"billingAccountId\": 80000071\r\n}", "options": { "raw": { "language": "json" @@ -22328,7 +22475,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"projectId\": {{project_id_17234}},\r\n \"userId\": \"a55fe1bc-1754-45fa-9adc-cf3d6d7c377a\",\r\n \"jobId\": \"{{job_id_created_for_member}}\",\r\n \"startDate\": \"2020-09-27T04:17:23.131Z\",\r\n \"endDate\": \"2020-09-27T04:17:23.131Z\",\r\n \"memberRate\": 13.23,\r\n \"customerRate\": 13,\r\n \"rateType\": \"hourly\"\r\n}", + "raw": "{\r\n \"projectId\": {{project_id_17234}},\r\n \"userId\": \"a55fe1bc-1754-45fa-9adc-cf3d6d7c377a\",\r\n \"jobId\": \"{{job_id_created_for_member}}\",\r\n \"startDate\": \"2020-09-27\",\r\n \"endDate\": \"2020-09-27\",\r\n \"memberRate\": 13.23,\r\n \"customerRate\": 13,\r\n \"rateType\": \"hourly\",\r\n \"billingAccountId\": 80000071\r\n}", "options": { "raw": { "language": "json" @@ -23306,7 +23453,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"projectId\": {{projectId}},\n \"externalId\": \"88774632\",\n \"description\": \"Dummy Description\",\n \"startDate\": \"2020-09-27T04:17:23.131Z\",\n \"duration\": 1,\n \"numPositions\": 13,\n \"resourceType\": \"Dummy Resource Type\",\n \"rateType\": \"hourly\",\n \"workload\": \"full-time\",\n \"skills\": [\n \"23e00d92-207a-4b5b-b3c9-4c5662644941\",\n \"7d076384-ccf6-4e43-a45d-1b24b1e624aa\",\n \"cbac57a3-7180-4316-8769-73af64893158\",\n \"a2b4bc11-c641-4a19-9eb7-33980378f82e\"\n ],\n \"title\": \"Dummy title - at most 64 characters\"\n}", + "raw": "{\n \"projectId\": {{projectId}},\n \"externalId\": \"88774632\",\n \"description\": \"Dummy Description\",\n \"startDate\": \"2020-09-27\",\n \"duration\": 1,\n \"numPositions\": 13,\n \"resourceType\": \"Dummy Resource Type\",\n \"rateType\": \"hourly\",\n \"workload\": \"full-time\",\n \"skills\": [\n \"23e00d92-207a-4b5b-b3c9-4c5662644941\",\n \"7d076384-ccf6-4e43-a45d-1b24b1e624aa\",\n \"cbac57a3-7180-4316-8769-73af64893158\",\n \"a2b4bc11-c641-4a19-9eb7-33980378f82e\"\n ],\n \"title\": \"Dummy title - at most 64 characters\"\n}", "options": { "raw": { "language": "json" @@ -23608,6 +23755,50 @@ { "name": "Before Test", "item": [ + { + "name": "create job", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "var data = JSON.parse(responseBody);\r", + "postman.setEnvironmentVariable(\"job_id_created_by_connect_manager\",data.id);" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Authorization", + "value": "Bearer {{token_connect_manager_pshahcopmanag2}}", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"projectId\": {{project_id_16843}},\n \"externalId\": \"1212\",\n \"description\": \"Dummy Description\",\n \"startDate\": \"2020-09-27T04:17:23.131Z\",\n \"duration\": 1,\n \"numPositions\": 13,\n \"resourceType\": \"Dummy Resource Type\",\n \"rateType\": \"hourly\",\n \"workload\": \"full-time\",\n \"skills\": [\n \"23e00d92-207a-4b5b-b3c9-4c5662644941\",\n \"7d076384-ccf6-4e43-a45d-1b24b1e624aa\",\n \"cbac57a3-7180-4316-8769-73af64893158\",\n \"a2b4bc11-c641-4a19-9eb7-33980378f82e\"\n ],\n \"title\": \"Dummy title - at most 64 characters\"\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{URL}}/jobs", + "host": [ + "{{URL}}" + ], + "path": [ + "jobs" + ] + } + }, + "response": [] + }, { "name": "create resource booking", "event": [ @@ -23633,7 +23824,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"projectId\": {{project_id_16843}},\r\n \"userId\": \"fe38eed1-af73-41fd-85a2-ac4da1ff09a3\",\r\n \"jobId\": \"{{job_id_created_by_connect_manager}}\",\r\n \"startDate\": \"2020-09-27T04:17:23.131Z\",\r\n \"endDate\": \"2020-09-27T04:17:23.131Z\",\r\n \"memberRate\": 13.23,\r\n \"customerRate\": 13,\r\n \"rateType\": \"hourly\"\r\n}", + "raw": "{\r\n \"projectId\": {{project_id_16843}},\r\n \"userId\": \"fe38eed1-af73-41fd-85a2-ac4da1ff09a3\",\r\n \"jobId\": \"{{job_id_created_by_connect_manager}}\",\r\n \"startDate\": \"2020-09-27\",\r\n \"endDate\": \"2020-09-27\",\r\n \"memberRate\": 13.23,\r\n \"customerRate\": 13,\r\n \"rateType\": \"hourly\",\r\n \"billingAccountId\": 80000071\r\n}", "options": { "raw": { "language": "json" @@ -23679,7 +23870,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"projectId\": {{project_id_16843}},\r\n \"userId\": \"fe38eed1-af73-41fd-85a2-ac4da1ff09a3\",\r\n \"jobId\": \"{{job_id_created_by_connect_manager}}\",\r\n \"startDate\": \"2020-09-27T04:17:23.131Z\",\r\n \"endDate\": \"2020-09-27T04:17:23.131Z\",\r\n \"memberRate\": 13.23,\r\n \"customerRate\": 13,\r\n \"rateType\": \"hourly\"\r\n}", + "raw": "{\r\n \"projectId\": {{project_id_16843}},\r\n \"userId\": \"fe38eed1-af73-41fd-85a2-ac4da1ff09a3\",\r\n \"jobId\": \"{{job_id_created_by_connect_manager}}\",\r\n \"startDate\": \"2020-09-27\",\r\n \"endDate\": \"2020-09-27\",\r\n \"memberRate\": 13.23,\r\n \"customerRate\": 13,\r\n \"rateType\": \"hourly\",\r\n \"billingAccountId\": 80000071\r\n}", "options": { "raw": { "language": "json" @@ -23764,12 +23955,12 @@ }, { "key": "startDate", - "value": "2020-09-27T04:17:23.131Z", + "value": "2020-09-27", "disabled": true }, { "key": "endDate", - "value": "2020-09-27T04:17:23.131Z", + "value": "2020-09-27", "disabled": true }, { @@ -23805,7 +23996,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"projectId\": {{project_id_16843}},\r\n \"userId\": \"fe38eed1-af73-41fd-85a2-ac4da1ff09a3\",\r\n \"jobId\": \"{{job_id_created_by_connect_manager}}\",\r\n \"startDate\": \"2020-09-27T04:17:23.131Z\",\r\n \"endDate\": \"2020-09-27T04:17:23.131Z\",\r\n \"memberRate\": 13.23,\r\n \"customerRate\": 13,\r\n \"rateType\": \"hourly\",\r\n \"status\": \"assigned\"\r\n}", + "raw": "{\r\n \"projectId\": {{project_id_16843}},\r\n \"userId\": \"fe38eed1-af73-41fd-85a2-ac4da1ff09a3\",\r\n \"jobId\": \"{{job_id_created_by_connect_manager}}\",\r\n \"startDate\": \"2020-09-27\",\r\n \"endDate\": \"2020-09-27\",\r\n \"memberRate\": 13.23,\r\n \"customerRate\": 13,\r\n \"rateType\": \"hourly\",\r\n \"status\": \"assigned\",\r\n \"billingAccountId\": 80000071\r\n}", "options": { "raw": { "language": "json" @@ -23838,7 +24029,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"status\": \"assigned\",\r\n \"startDate\": \"2020-09-27T04:17:23.131Z\",\r\n \"endDate\": \"2020-09-27T04:17:23.131Z\",\r\n \"memberRate\": 13.23,\r\n \"customerRate\": 13,\r\n \"rateType\": \"hourly\"\r\n}", + "raw": "{\r\n \"status\": \"assigned\",\r\n \"startDate\": \"2020-09-27\",\r\n \"endDate\": \"2020-09-27\",\r\n \"memberRate\": 13.23,\r\n \"customerRate\": 13,\r\n \"rateType\": \"hourly\",\r\n \"billingAccountId\": 80000071\r\n}", "options": { "raw": { "language": "json" @@ -23978,7 +24169,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"projectId\": {{project_id_16843}},\r\n \"userId\": \"fe38eed1-af73-41fd-85a2-ac4da1ff09a3\",\r\n \"jobId\": \"{{job_id_created_by_connect_manager}}\",\r\n \"startDate\": \"2020-09-27T04:17:23.131Z\",\r\n \"endDate\": \"2020-09-27T04:17:23.131Z\",\r\n \"memberRate\": 13.23,\r\n \"customerRate\": 13,\r\n \"rateType\": \"hourly\"\r\n}", + "raw": "{\r\n \"projectId\": {{project_id_16843}},\r\n \"userId\": \"fe38eed1-af73-41fd-85a2-ac4da1ff09a3\",\r\n \"jobId\": \"{{job_id_created_by_connect_manager}}\",\r\n \"startDate\": \"2020-09-27\",\r\n \"endDate\": \"2020-09-27\",\r\n \"memberRate\": 13.23,\r\n \"customerRate\": 13,\r\n \"rateType\": \"hourly\",\r\n \"billingAccountId\": 80000071\r\n}", "options": { "raw": { "language": "json" @@ -24429,7 +24620,7 @@ ], "body": { "mode": "raw", - "raw": "{\r\n \"projectId\": {{project_id_17234}},\r\n \"userId\": \"a55fe1bc-1754-45fa-9adc-cf3d6d7c377a\",\r\n \"jobId\": \"{{job_id_created_for_connect_manager}}\",\r\n \"startDate\": \"2020-09-27T04:17:23.131Z\",\r\n \"endDate\": \"2020-09-27T04:17:23.131Z\",\r\n \"memberRate\": 13.23,\r\n \"customerRate\": 13,\r\n \"rateType\": \"hourly\"\r\n}", + "raw": "{\r\n \"projectId\": {{project_id_17234}},\r\n \"userId\": \"a55fe1bc-1754-45fa-9adc-cf3d6d7c377a\",\r\n \"jobId\": \"{{job_id_created_for_connect_manager}}\",\r\n \"startDate\": \"2020-09-27\",\r\n \"endDate\": \"2020-09-27\",\r\n \"memberRate\": 13.23,\r\n \"customerRate\": 13,\r\n \"rateType\": \"hourly\",\r\n \"billingAccountId\": 80000071\r\n}", "options": { "raw": { "language": "json" diff --git a/docs/swagger.yaml b/docs/swagger.yaml index e351866c..d96dd455 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml @@ -590,7 +590,16 @@ paths: required: false schema: type: string - enum: ['open', 'selected', 'shortlist', 'rejected', 'cancelled', 'interview', 'topcoder-rejected'] + enum: + [ + "open", + "selected", + "shortlist", + "rejected", + "cancelled", + "interview", + "topcoder-rejected", + ] description: The job candidate status. - in: query name: externalId @@ -1303,14 +1312,14 @@ paths: required: false schema: type: string - format: date-time + format: date description: The resource booking start date. - in: query name: endDate required: false schema: type: string - format: date-time + format: date description: The resource booking end date. - in: query name: rateType @@ -2170,13 +2179,7 @@ paths: schema: type: string default: createdAt - enum: - [ - "status", - "amount", - "createdAt", - "updatedAt", - ] + enum: ["status", "amount", "createdAt", "updatedAt"] description: The sort by column. - in: query name: sortOrder @@ -3277,7 +3280,16 @@ components: description: "The user id." status: type: string - enum: ['open', 'selected', 'shortlist', 'rejected', 'cancelled', 'interview', 'topcoder-rejected'] + enum: + [ + "open", + "selected", + "shortlist", + "rejected", + "cancelled", + "interview", + "topcoder-rejected", + ] description: "The job candidate status." externalId: type: string @@ -3395,7 +3407,16 @@ components: properties: status: type: string - enum: ['open', 'selected', 'shortlist', 'rejected', 'cancelled', 'interview', 'topcoder-rejected'] + enum: + [ + "open", + "selected", + "shortlist", + "rejected", + "cancelled", + "interview", + "topcoder-rejected", + ] externalId: type: string example: "1212" @@ -3600,13 +3621,13 @@ components: description: "The job status." startDate: type: string - format: date-time - example: "2020-09-27T04:17:23.131Z" + format: date + example: "2020-09-27" description: "The job start date." endDate: type: string - format: date-time - example: "2020-09-28T04:17:23.131Z" + format: date + example: "2020-09-28" description: "The job end date." memberRate: type: integer @@ -3622,6 +3643,10 @@ components: type: string enum: ["hourly", "daily", "weekly", "monthly"] description: "The rate type of the job." + billingAccountId: + type: integer + example: 80000071 + description: 'the billing account id for payments' createdAt: type: string format: date-time @@ -3664,13 +3689,13 @@ components: default: sourcing startDate: type: string - format: date-time - example: "2020-09-27T04:17:23.131Z" + format: date + example: "2020-09-27" description: "The job start date." endDate: type: string - format: date-time - example: "2020-09-28T04:17:23.131Z" + format: date + example: "2020-09-28" description: "The job end date." memberRate: type: number @@ -3686,6 +3711,10 @@ components: type: string enum: ["hourly", "daily", "weekly", "monthly"] description: "The rate type of the job." + billingAccountId: + type: integer + example: 80000071 + description: 'the billing account id for payments' ResourceBookingPatchRequestBody: properties: status: @@ -3693,13 +3722,13 @@ components: enum: ["assigned", "closed", "cancelled"] startDate: type: string - format: date-time - example: "2020-09-27T04:17:23.131Z" + format: date + example: "2020-09-27" description: "The job start date." endDate: type: string - format: date-time - example: "2020-09-28T04:17:23.131Z" + format: date + example: "2020-09-28" description: "The job end date." memberRate: type: number @@ -3715,6 +3744,10 @@ components: type: string enum: ["hourly", "daily", "weekly", "monthly"] description: "The rate type of the job." + billingAccountId: + type: integer + example: 80000071 + description: 'the billing account id for payments' WorkPeriod: required: - id @@ -3895,6 +3928,10 @@ components: type: string enum: ["completed", "cancelled"] description: "The payment status." + billingAccountId: + type: integer + example: 80000071 + description: 'the billing account id for payments' createdAt: type: string format: date-time @@ -4303,7 +4340,16 @@ components: description: "The link for the resume that can be downloaded" status: type: string - enum: ['open', 'selected', 'shortlist', 'rejected', 'cancelled', 'interview', 'topcoder-rejected'] + enum: + [ + "open", + "selected", + "shortlist", + "rejected", + "cancelled", + "interview", + "topcoder-rejected", + ] description: "The job candidate status." skills: type: array diff --git a/migrations/2021-04-22-1-make-resource-booking-dates-store-no-timestamp.js b/migrations/2021-04-22-1-make-resource-booking-dates-store-no-timestamp.js new file mode 100644 index 00000000..52b4fc88 --- /dev/null +++ b/migrations/2021-04-22-1-make-resource-booking-dates-store-no-timestamp.js @@ -0,0 +1,42 @@ +const config = require('config') + +/* + * Make Resource Booking dates store no timestamps + * start_date: 2021-04-21T16:59:18.089Z -> 2021-04-21 + * end_date: 2021-05-21T16:59:18.089Z -> 2021-05-21 + * description: change type to DATE (DATEONLY) from TIMESTAMPTZ (DATE). + * By updating the column type, the existing data will be automatically cast to DATE. + */ + +module.exports = { + up: async (queryInterface, Sequelize) => { + const transaction = await queryInterface.sequelize.transaction() + try { + await queryInterface.changeColumn({ tableName: 'resource_bookings', schema: config.DB_SCHEMA_NAME }, 'start_date', + { type: Sequelize.DATEONLY }, + { transaction }) + await queryInterface.changeColumn({ tableName: 'resource_bookings', schema: config.DB_SCHEMA_NAME }, 'end_date', + { type: Sequelize.DATEONLY }, + { transaction }) + await transaction.commit() + } catch (err) { + await transaction.rollback() + throw err + } + }, + down: async (queryInterface, Sequelize) => { + const transaction = await queryInterface.sequelize.transaction() + try { + await queryInterface.changeColumn({ tableName: 'resource_bookings', schema: config.DB_SCHEMA_NAME }, 'start_date', + { type: Sequelize.DATE }, + { transaction }) + await queryInterface.changeColumn({ tableName: 'resource_bookings', schema: config.DB_SCHEMA_NAME }, 'end_date', + { type: Sequelize.DATE }, + { transaction }) + await transaction.commit() + } catch (err) { + await transaction.rollback() + throw err + } + } +} diff --git a/migrations/2021-04-10-populate-work-periods-for-resource-bookings.js b/migrations/2021-04-22-2-populate-work-periods-for-resource-bookings.js similarity index 100% rename from migrations/2021-04-10-populate-work-periods-for-resource-bookings.js rename to migrations/2021-04-22-2-populate-work-periods-for-resource-bookings.js diff --git a/migrations/2021-04-22-resource-booking-work-peirod-payment-add-billing-account-id-field.js b/migrations/2021-04-22-resource-booking-work-peirod-payment-add-billing-account-id-field.js new file mode 100644 index 00000000..4342ec33 --- /dev/null +++ b/migrations/2021-04-22-resource-booking-work-peirod-payment-add-billing-account-id-field.js @@ -0,0 +1,27 @@ +const config = require('config') + +/* + * Add billingAccountId field to the ResourceBooking and WorkPeriodPayment models. + */ + +module.exports = { + up: async (queryInterface, Sequelize) => { + const transaction = await queryInterface.sequelize.transaction() + try { + for (const tableName of ['resource_bookings', 'work_period_payments']) { + await queryInterface.addColumn({ tableName, schema: config.DB_SCHEMA_NAME }, 'billing_account_id', + { type: Sequelize.BIGINT }, + { transaction }) + } + await transaction.commit() + } catch (err) { + await transaction.rollback() + throw err + } + }, + down: async (queryInterface, Sequelize) => { + for (const tableName of ['resource_bookings', 'work_period_payments']) { + await queryInterface.removeColumn({ tableName, schema: config.DB_SCHEMA_NAME }, 'billing_account_id') + } + } +} diff --git a/package.json b/package.json index d3249fcc..00d15b73 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,6 @@ "joi": "^17.2.1", "lodash": "^4.17.20", "node-schedule": "^2.0.0", - "moment-timezone": "^0.5.33", "pg": "^8.4.0", "pg-hstore": "^2.3.3", "prompt-confirm": "^2.0.4", diff --git a/src/common/errors.js b/src/common/errors.js index 92b4e69b..2e7444d5 100644 --- a/src/common/errors.js +++ b/src/common/errors.js @@ -35,5 +35,6 @@ module.exports = { UnauthorizedError: createError('UnauthorizedError', 401), ForbiddenError: createError('ForbiddenError', 403), NotFoundError: createError('NotFoundError', 404), + ConflictError: createError('ConflictError', 409), InternalServerError: createError('InternalServerError', 500) } diff --git a/src/common/helper.js b/src/common/helper.js index 686d1d82..b65f6ba7 100644 --- a/src/common/helper.js +++ b/src/common/helper.js @@ -18,7 +18,7 @@ const logger = require('./logger') const models = require('../models') const eventDispatcher = require('./eventDispatcher') const busApi = require('@topcoder-platform/topcoder-bus-api-wrapper') -const moment = require('moment-timezone') +const moment = require('moment') const localLogger = { debug: (message) => logger.debug({ component: 'helper', context: message.context, message: message.message }), @@ -112,11 +112,12 @@ esIndexPropertyMapping[config.get('esConfig.ES_INDEX_RESOURCE_BOOKING')] = { userId: { type: 'keyword' }, jobId: { type: 'keyword' }, status: { type: 'keyword' }, - startDate: { type: 'date' }, - endDate: { type: 'date' }, + startDate: { type: 'date', format: 'yyyy-MM-dd' }, + endDate: { type: 'date', format: 'yyyy-MM-dd' }, memberRate: { type: 'float' }, customerRate: { type: 'float' }, rateType: { type: 'keyword' }, + billingAccountId: { type: 'integer' }, createdAt: { type: 'date' }, createdBy: { type: 'keyword' }, updatedAt: { type: 'date' }, @@ -141,6 +142,7 @@ esIndexPropertyMapping[config.get('esConfig.ES_INDEX_WORK_PERIOD')] = { challengeId: { type: 'keyword' }, amount: { type: 'float' }, status: { type: 'keyword' }, + billingAccountId: { type: 'integer' }, createdAt: { type: 'date' }, createdBy: { type: 'keyword' }, updatedAt: { type: 'date' }, @@ -1323,12 +1325,10 @@ function extractWorkPeriods (start, end) { return periods } const startDate = moment(start) - startDate.tz(config.WORK_PERIOD_TIME_ZONE, false) const startDay = startDate.get('day') startDate.set('day', 0).startOf('day') const endDate = moment(end) - endDate.tz(config.WORK_PERIOD_TIME_ZONE, false) const endDay = endDate.get('day') endDate.set('day', 6).endOf('day') diff --git a/src/models/ResourceBooking.js b/src/models/ResourceBooking.js index 3cfe26fb..58dc5454 100644 --- a/src/models/ResourceBooking.js +++ b/src/models/ResourceBooking.js @@ -58,11 +58,11 @@ module.exports = (sequelize) => { }, startDate: { field: 'start_date', - type: Sequelize.DATE + type: Sequelize.DATEONLY }, endDate: { field: 'end_date', - type: Sequelize.DATE + type: Sequelize.DATEONLY }, memberRate: { field: 'member_rate', @@ -77,6 +77,10 @@ module.exports = (sequelize) => { type: Sequelize.STRING(255), allowNull: false }, + billingAccountId: { + field: 'billing_account_id', + type: Sequelize.BIGINT + }, createdBy: { field: 'created_by', type: Sequelize.UUID, diff --git a/src/models/WorkPeriodPayment.js b/src/models/WorkPeriodPayment.js index 6b9e37fa..3683faf0 100644 --- a/src/models/WorkPeriodPayment.js +++ b/src/models/WorkPeriodPayment.js @@ -57,6 +57,10 @@ module.exports = (sequelize) => { ), allowNull: false }, + billingAccountId: { + field: 'billing_account_id', + type: Sequelize.BIGINT + }, createdBy: { field: 'created_by', type: Sequelize.UUID, diff --git a/src/services/PaymentService.js b/src/services/PaymentService.js index e7a7d534..15c6ee7c 100644 --- a/src/services/PaymentService.js +++ b/src/services/PaymentService.js @@ -80,7 +80,13 @@ async function createChallenge (challenge, token) { }, tags: ['Other'], startDate: new Date(), - billing: { billingAccountId: challenge.billingAccountId } + } + + if (challenge.billingAccountId) { + body.billing = { + billingAccountId: challenge.billingAccountId, + markup: 0, // for TaaS payments we always use 0 markup + } } try { const response = await helper.createChallenge(body, token) diff --git a/src/services/ResourceBookingService.js b/src/services/ResourceBookingService.js index 972729f1..4fef4e46 100644 --- a/src/services/ResourceBookingService.js +++ b/src/services/ResourceBookingService.js @@ -3,7 +3,7 @@ */ const _ = require('lodash') -const Joi = require('joi') +const Joi = require('joi').extend(require('@joi/date')) const config = require('config') const HttpStatus = require('http-status-codes') const { Op } = require('sequelize') @@ -12,6 +12,7 @@ const helper = require('../common/helper') const logger = require('../common/logger') const errors = require('../common/errors') const models = require('../models') +const moment = require('moment') const ResourceBooking = models.ResourceBooking const WorkPeriod = models.WorkPeriod @@ -162,18 +163,19 @@ createResourceBooking.schema = Joi.object().keys({ projectId: Joi.number().integer().required(), userId: Joi.string().uuid().required(), jobId: Joi.string().uuid().allow(null), - startDate: Joi.date().allow(null), - endDate: Joi.date().when('startDate', { + startDate: Joi.date().format('YYYY-MM-DD').allow(null), + endDate: Joi.date().format('YYYY-MM-DD').when('startDate', { is: Joi.exist(), - then: Joi.date().allow(null).min(Joi.ref('startDate') + then: Joi.date().format('YYYY-MM-DD').allow(null).min(Joi.ref('startDate') ).messages({ 'date.min': 'endDate cannot be earlier than startDate' }), - otherwise: Joi.date().allow(null) + otherwise: Joi.date().format('YYYY-MM-DD').allow(null) }), memberRate: Joi.number().allow(null), customerRate: Joi.number().allow(null), - rateType: Joi.rateType().required() + rateType: Joi.rateType().required(), + billingAccountId: Joi.number().allow(null) }).required() }).required() @@ -199,8 +201,7 @@ async function updateResourceBooking (currentUser, id, data) { const updated = await resourceBooking.update(data) await helper.postEvent(config.TAAS_RESOURCE_BOOKING_UPDATE_TOPIC, updated.toJSON(), { oldValue: oldValue }) - const result = _.assign(resourceBooking.dataValues, data) - return result + return updated.dataValues } /** @@ -219,18 +220,19 @@ partiallyUpdateResourceBooking.schema = Joi.object().keys({ id: Joi.string().uuid().required(), data: Joi.object().keys({ status: Joi.resourceBookingStatus(), - startDate: Joi.date().allow(null), - endDate: Joi.date().when('startDate', { + startDate: Joi.date().format('YYYY-MM-DD').allow(null), + endDate: Joi.date().format('YYYY-MM-DD').when('startDate', { is: Joi.exist(), - then: Joi.date().allow(null).min(Joi.ref('startDate') + then: Joi.date().format('YYYY-MM-DD').allow(null).min(Joi.ref('startDate') ).messages({ 'date.min': 'endDate cannot be earlier than startDate' }), - otherwise: Joi.date().allow(null) + otherwise: Joi.date().format('YYYY-MM-DD').allow(null) }), memberRate: Joi.number().allow(null), customerRate: Joi.number().allow(null), - rateType: Joi.rateType() + rateType: Joi.rateType(), + billingAccountId: Joi.number().allow(null) }).required() }).required() @@ -256,19 +258,20 @@ fullyUpdateResourceBooking.schema = Joi.object().keys({ projectId: Joi.number().integer().required(), userId: Joi.string().uuid().required(), jobId: Joi.string().uuid().allow(null).default(null), - startDate: Joi.date().allow(null).default(null), - endDate: Joi.date().when('startDate', { + startDate: Joi.date().format('YYYY-MM-DD').allow(null).default(null), + endDate: Joi.date().format('YYYY-MM-DD').when('startDate', { is: Joi.exist(), - then: Joi.date().allow(null).default(null).min(Joi.ref('startDate') + then: Joi.date().format('YYYY-MM-DD').allow(null).default(null).min(Joi.ref('startDate') ).messages({ 'date.min': 'endDate cannot be earlier than startDate' }), - otherwise: Joi.date().allow(null).default(null) + otherwise: Joi.date().format('YYYY-MM-DD').allow(null).default(null) }), memberRate: Joi.number().allow(null).default(null), customerRate: Joi.number().allow(null).default(null), rateType: Joi.rateType().required(), - status: Joi.resourceBookingStatus().required() + status: Joi.resourceBookingStatus().required(), + billingAccountId: Joi.number().allow(null).default(null) }).required() }).required() @@ -357,7 +360,13 @@ async function searchResourceBookings (currentUser, criteria, options = { return sort } } - + // change the date format to match with index schema + if (criteria.startDate) { + criteria.startDate = moment(criteria.startDate).format('YYYY-MM-DD') + } + if (criteria.endDate) { + criteria.endDate = moment(criteria.endDate).format('YYYY-MM-DD') + } _.each(_.pick(criteria, ['status', 'startDate', 'endDate', 'rateType', 'projectId', 'jobId', 'userId']), (value, key) => { esQuery.body.query.bool.must.push({ term: { @@ -423,8 +432,8 @@ searchResourceBookings.schema = Joi.object().keys({ sortBy: Joi.string().valid('id', 'rateType', 'startDate', 'endDate', 'customerRate', 'memberRate', 'status'), sortOrder: Joi.string().valid('desc', 'asc'), status: Joi.resourceBookingStatus(), - startDate: Joi.date(), - endDate: Joi.date(), + startDate: Joi.date().format('YYYY-MM-DD'), + endDate: Joi.date().format('YYYY-MM-DD'), rateType: Joi.rateType(), jobId: Joi.string().uuid(), userId: Joi.string().uuid(), diff --git a/src/services/WorkPeriodPaymentService.js b/src/services/WorkPeriodPaymentService.js index 7ecff048..e8694c76 100644 --- a/src/services/WorkPeriodPaymentService.js +++ b/src/services/WorkPeriodPaymentService.js @@ -97,14 +97,24 @@ async function createWorkPeriodPayment (currentUser, workPeriodPayment, options // check permission await _checkUserPermissionForCRUWorkPeriodPayment(currentUser) - const { projectId, userHandle, endDate } = await helper.ensureWorkPeriodById(workPeriodPayment.workPeriodId) // ensure work period exists + const { projectId, userHandle, endDate, resourceBookingId } = await helper.ensureWorkPeriodById(workPeriodPayment.workPeriodId) // ensure work period exists + + // get billingAccountId from corresponding resource booking + const correspondingResourceBooking = await helper.ensureResourceBookingById(resourceBookingId) + if (!correspondingResourceBooking.billingAccountId) { + throw new errors.ConflictError(`id: ${resourceBookingId} "ResourceBooking" Billing account is not assigned to the resource booking`) + } + workPeriodPayment.billingAccountId = correspondingResourceBooking.billingAccountId + const paymentChallenge = options.paymentProcessingSwitch === constants.PaymentProcessingSwitch.ON ? (await PaymentService.createPayment({ projectId, userHandle, amount: workPeriodPayment.amount, name: `TaaS Payment - ${userHandle} - Week Ending ${moment(endDate).format('D/M/YYYY')}`, - description: `TaaS Payment - ${userHandle} - Week Ending ${moment(endDate).format('D/M/YYYY')}` + description: `TaaS Payment - ${userHandle} - Week Ending ${moment(endDate).format('D/M/YYYY')}`, + billingAccountId: correspondingResourceBooking.billingAccountId })) : ({ id: '00000000-0000-0000-0000-000000000000' }) + workPeriodPayment.id = uuid.v4() workPeriodPayment.challengeId = paymentChallenge.id workPeriodPayment.createdBy = await helper.getUserId(currentUser.userId) diff --git a/test/unit/WorkPeriodPaymentService.test.js b/test/unit/WorkPeriodPaymentService.test.js index 347e8368..6ec6248a 100644 --- a/test/unit/WorkPeriodPaymentService.test.js +++ b/test/unit/WorkPeriodPaymentService.test.js @@ -20,23 +20,61 @@ describe('workPeriod service test', () => { }) describe('create work period test', () => { - describe('when PAYMENT_PROCESSING_SWITCH is ON/OFF', async () => { - let stubCreatePaymentService + let stubGetUserId + let stubEnsureWorkPeriodById + let stubEnsureResourceBookingById + let stubCreateWorkPeriodPayment + let stubCreatePayment + + beforeEach(async () => { + stubGetUserId = sinon.stub(helper, 'getUserId').callsFake(async () => testData.workPeriodPayment01.getUserIdResponse) + stubEnsureWorkPeriodById = sinon.stub(helper, 'ensureWorkPeriodById').callsFake(async () => testData.workPeriodPayment01.ensureWorkPeriodByIdResponse) + stubEnsureResourceBookingById = sinon.stub(helper, 'ensureResourceBookingById').callsFake(async () => testData.workPeriodPayment01.ensureResourceBookingByIdResponse) + stubCreateWorkPeriodPayment = sinon.stub(models.WorkPeriodPayment, 'create').callsFake(() => testData.workPeriodPayment01.response) + stubCreatePayment = sinon.stub(paymentService, 'createPayment').callsFake(async () => testData.workPeriodPayment01.createPaymentResponse) + }) - beforeEach(async () => { - sinon.stub(helper, 'ensureWorkPeriodById').callsFake(async () => testData.workPeriodPayment01.ensureWorkPeriodByIdResponse) - sinon.stub(helper, 'getUserId').callsFake(async () => {}) - sinon.stub(models.WorkPeriodPayment, 'create').callsFake(() => testData.workPeriodPayment01.response) - stubCreatePaymentService = sinon.stub(paymentService, 'createPayment').callsFake(async () => testData.workPeriodPayment01.createPaymentResponse) + it('create work period success', async () => { + const response = await service.createWorkPeriodPayment(testData.currentUser, testData.workPeriodPayment01.request, { paymentProcessingSwitch: 'ON' }) + expect(stubGetUserId.calledOnce).to.be.true + expect(stubEnsureWorkPeriodById.calledOnce).to.be.true + expect(stubEnsureResourceBookingById.calledOnce).to.be.true + expect(stubCreatePayment.calledOnce).to.be.true + expect(stubCreateWorkPeriodPayment.calledOnce).to.be.true + expect(response).to.eql(testData.workPeriodPayment01.response.dataValues) + }) + + it('create work period success - billingAccountId is set', async () => { + await service.createWorkPeriodPayment(testData.currentUser, testData.workPeriodPayment01.request, { paymentProcessingSwitch: 'ON' }) + expect(stubCreatePayment.calledOnce).to.be.true + expect(stubCreatePayment.args[0][0]).to.include({ + billingAccountId: testData.workPeriodPayment01.ensureResourceBookingByIdResponse.billingAccountId + }) + expect(stubCreateWorkPeriodPayment.calledOnce).to.be.true + expect(stubCreateWorkPeriodPayment.args[0][0]).to.include({ + billingAccountId: testData.workPeriodPayment01.ensureResourceBookingByIdResponse.billingAccountId }) + }) + + it('fail to create work period if corresponding resource booking does not have bill account', async () => { + stubEnsureResourceBookingById.restore() + sinon.stub(helper, 'ensureResourceBookingById').callsFake(async () => testData.workPeriodPayment01.ensureResourceBookingByIdResponse02) + try { + await service.createWorkPeriodPayment(testData.currentUser, testData.workPeriodPayment01.request) + } catch (err) { + expect(err.message).to.include('"ResourceBooking" Billing account is not assigned to the resource booking') + } + }) + + describe('when PAYMENT_PROCESSING_SWITCH is ON/OFF', async () => { it('do not create payment if PAYMENT_PROCESSING_SWITCH is OFF', async () => { await service.createWorkPeriodPayment(testData.currentUser, testData.workPeriodPayment01.request, { paymentProcessingSwitch: 'OFF' }) - expect(stubCreatePaymentService.calledOnce).to.be.false + expect(stubCreatePayment.calledOnce).to.be.false }) it('create payment if PAYMENT_PROCESSING_SWITCH is ON', async () => { await service.createWorkPeriodPayment(testData.currentUser, testData.workPeriodPayment01.request, { paymentProcessingSwitch: 'ON' }) - expect(stubCreatePaymentService.calledOnce).to.be.true + expect(stubCreatePayment.calledOnce).to.be.true }) }) }) diff --git a/test/unit/common/testData.js b/test/unit/common/testData.js index 49192716..abf851b5 100644 --- a/test/unit/common/testData.js +++ b/test/unit/common/testData.js @@ -12,8 +12,8 @@ const resourceBooking5Week = { projectId: 21, userId: 'a55fe1bc-1754-45fa-9adc-cf3d6d7c377a', jobId: '36762910-4efa-4db4-9b2a-c9ab54c232ed', - startDate: '2020-09-27T04:17:23.131Z', - endDate: '2020-10-27T04:17:23.131Z', + startDate: '2020-09-27', + endDate: '2020-10-27', memberRate: 13.23, customerRate: 13, rateType: 'hourly' @@ -24,8 +24,8 @@ const resourceBooking5Week = { projectId: 21, userId: 'a55fe1bc-1754-45fa-9adc-cf3d6d7c377a', jobId: '6093e58c-683d-4022-8482-5515e8345016', - startDate: '2020-09-27T04:17:23.131Z', - endDate: '2020-10-27T04:17:23.131Z', + startDate: '2020-09-27', + endDate: '2020-10-27', memberRate: 13.23, customerRate: 13, rateType: 'hourly', @@ -78,8 +78,8 @@ const resourceBooking1Week = { projectId: 21, userId: 'a55fe1bc-1754-45fa-9adc-cf3d6d7c377a', jobId: '36762910-4efa-4db4-9b2a-c9ab54c232ed', - startDate: '2020-11-20T04:17:23.131Z', - endDate: '2020-11-21T04:17:23.131Z', + startDate: '2020-11-20', + endDate: '2020-11-21', memberRate: 13.23, customerRate: 13, rateType: 'hourly' @@ -90,8 +90,8 @@ const resourceBooking1Week = { projectId: 21, userId: 'a55fe1bc-1754-45fa-9adc-cf3d6d7c377a', jobId: '6093e58c-683d-4022-8482-5515e8345016', - startDate: '2020-11-20T04:17:23.131Z', - endDate: '2020-11-21T04:17:23.131Z', + startDate: '2020-11-20', + endDate: '2020-11-21', memberRate: 13.23, customerRate: 13, rateType: 'hourly', @@ -104,7 +104,7 @@ const resourceBooking1Week = { resourceBookingId: '520bb632-a02a-415e-9857-93b2ecbf7d60', startDate: '2020-11-15', endDate: '2020-11-21', - daysWorked: 2, + daysWorked: 1, paymentStatus: 'pending' }], workPeriodResponse: [{ @@ -124,7 +124,7 @@ const resourceBooking1Week = { updatedAt: '2021-04-10T22:25:08.289Z' }], updateRequest: { - startDate: '2020-11-18T04:17:23.131Z' + startDate: '2020-11-18' }, updateResponse: { dataValues: { @@ -132,8 +132,8 @@ const resourceBooking1Week = { projectId: 21, userId: 'a55fe1bc-1754-45fa-9adc-cf3d6d7c377a', jobId: '6093e58c-683d-4022-8482-5515e8345016', - startDate: new Date('2020-11-18T04:17:23.131Z'), - endDate: '2020-11-21T04:17:23.131Z', + startDate: '2020-11-18', + endDate: '2020-11-21', memberRate: 13.23, customerRate: 13, rateType: 'hourly', @@ -144,7 +144,7 @@ const resourceBooking1Week = { } }, workPeriodUpdateRequests: [{ - daysWorked: 4 + daysWorked: 3 }] } resourceBooking1Week.response.toJSON = function () { @@ -163,8 +163,8 @@ const resourceBookingUpdate = { projectId: 21, userId: 'a55fe1bc-1754-45fa-9adc-cf3d6d7c377a', jobId: '6093e58c-683d-4022-8482-5515e8345016', - startDate: '2020-08-20T04:17:23.131Z', - endDate: '2020-09-10T04:17:23.131Z', + startDate: '2020-08-20', + endDate: '2020-09-10', memberRate: 13.23, customerRate: 13, rateType: 'hourly', @@ -235,7 +235,7 @@ const resourceBookingUpdate = { updatedAt: '2021-04-10T22:25:08.289Z' }], updateRequest: { - endDate: '2020-09-12T04:17:23.131Z' + endDate: '2020-09-12' }, updateResponse: { dataValues: { @@ -243,8 +243,8 @@ const resourceBookingUpdate = { projectId: 21, userId: 'a55fe1bc-1754-45fa-9adc-cf3d6d7c377a', jobId: '6093e58c-683d-4022-8482-5515e8345016', - startDate: '2020-08-20T04:17:23.131Z', - endDate: new Date('2020-09-12T04:17:23.131Z'), + startDate: '2020-08-20', + endDate: '2020-09-12', memberRate: 13.23, customerRate: 13, rateType: 'hourly', @@ -263,8 +263,8 @@ const resourceBookingUpdate = { projectId: 21, userId: 'a55fe1bc-1754-45fa-9adc-cf3d6d7c377a', jobId: '6093e58c-683d-4022-8482-5515e8345016', - startDate: '2020-08-20T04:17:23.131Z', - endDate: '2020-09-10T04:17:23.131Z', + startDate: '2020-08-20', + endDate: '2020-09-10', memberRate: 13.23, customerRate: 13, rateType: 'hourly', @@ -274,7 +274,7 @@ const resourceBookingUpdate = { } }, updateRequest2: { - endDate: '2020-09-15T04:17:23.131Z' + endDate: '2020-09-15' }, updateResponse2: { dataValues: { @@ -282,8 +282,8 @@ const resourceBookingUpdate = { projectId: 21, userId: 'a55fe1bc-1754-45fa-9adc-cf3d6d7c377a', jobId: '6093e58c-683d-4022-8482-5515e8345016', - startDate: '2020-08-20T04:17:23.131Z', - endDate: new Date('2020-09-15T04:17:23.131Z'), + startDate: '2020-08-20', + endDate: '2020-09-15', memberRate: 13.23, customerRate: 13, rateType: 'hourly', @@ -308,8 +308,8 @@ const resourceBookingUpdate = { projectId: 21, userId: 'a55fe1bc-1754-45fa-9adc-cf3d6d7c377a', jobId: '6093e58c-683d-4022-8482-5515e8345016', - startDate: '2020-08-20T04:17:23.131Z', - endDate: '2020-09-10T04:17:23.131Z', + startDate: '2020-08-20', + endDate: '2020-09-10', memberRate: 13.23, customerRate: 13, rateType: 'hourly', @@ -319,7 +319,7 @@ const resourceBookingUpdate = { } }, updateRequest3: { - startDate: '2020-08-25T04:17:23.131Z' + startDate: '2020-08-25' }, updateResponse3: { dataValues: { @@ -327,8 +327,8 @@ const resourceBookingUpdate = { projectId: 21, userId: 'a55fe1bc-1754-45fa-9adc-cf3d6d7c377a', jobId: '6093e58c-683d-4022-8482-5515e8345016', - startDate: new Date('2020-08-25T04:17:23.131Z'), - endDate: '2020-09-10T04:17:23.131Z', + startDate: '2020-08-25', + endDate: '2020-09-10', memberRate: 13.23, customerRate: 13, rateType: 'hourly', @@ -354,8 +354,8 @@ const resourceBookingUpdate = { projectId: 21, userId: 'a55fe1bc-1754-45fa-9adc-cf3d6d7c377a', jobId: '6093e58c-683d-4022-8482-5515e8345016', - startDate: '2020-08-20T04:17:23.131Z', - endDate: '2020-09-10T04:17:23.131Z', + startDate: '2020-08-20', + endDate: '2020-09-10', memberRate: 13.23, customerRate: 13, rateType: 'hourly', @@ -426,8 +426,8 @@ const resourceBookingUpdate = { updatedAt: '2021-04-10T22:25:08.289Z' }], updateRequest4: { - startDate: '2020-08-25T04:17:23.131Z', - endDate: '2020-09-05T04:17:23.131Z' + startDate: '2020-08-25', + endDate: '2020-09-05' }, updateResponse4: { dataValues: { @@ -435,8 +435,8 @@ const resourceBookingUpdate = { projectId: 21, userId: 'a55fe1bc-1754-45fa-9adc-cf3d6d7c377a', jobId: '6093e58c-683d-4022-8482-5515e8345016', - startDate: new Date('2020-08-25T04:17:23.131Z'), - endDate: new Date('2020-09-05T04:17:23.131Z'), + startDate: '2020-08-25', + endDate: '2020-09-05', memberRate: 13.23, customerRate: 13, rateType: 'hourly', @@ -450,8 +450,8 @@ const resourceBookingUpdate = { daysWorked: 4 }, '10faf505-d0e3-4d13-a817-7f1319625e91', '3907e916-efdc-49d3-b0ef-970ccf7d78b0'], updateRequest5: { - startDate: '2020-08-24T04:17:23.131Z', - endDate: '2020-08-29T04:17:23.131Z' + startDate: '2020-08-24', + endDate: '2020-08-29' }, updateRequest6: { status: 'cancelled' @@ -504,21 +504,28 @@ const workPeriodPayment01 = { status: 'completed' }, response: { - workPeriodId: '467b4df7-ced4-41b9-9710-b83808cddaf4', - amount: 600, - status: 'completed', - id: '01971e6f-0f09-4a2a-bc2e-2adac0f00622', - challengeId: '00000000-0000-0000-0000-000000000000', - createdBy: '57646ff9-1cd3-4d3c-88ba-eb09a395366c', - updatedAt: '2021-04-21T12:58:07.535Z', - createdAt: '2021-04-21T12:58:07.535Z', - updatedBy: null + dataValues: { + workPeriodId: '467b4df7-ced4-41b9-9710-b83808cddaf4', + amount: 600, + status: 'completed', + id: '01971e6f-0f09-4a2a-bc2e-2adac0f00622', + challengeId: '00000000-0000-0000-0000-000000000000', + createdBy: '57646ff9-1cd3-4d3c-88ba-eb09a395366c', + updatedAt: '2021-04-21T12:58:07.535Z', + createdAt: '2021-04-21T12:58:07.535Z', + updatedBy: null + } }, + getUserIdResponse: '79a39efd-91af-494a-b0f6-62310495effd', ensureWorkPeriodByIdResponse: { projectId: 111, userHandle: 'pshah_manager', endDate: '2021-03-13' }, + ensureResourceBookingByIdResponse: { + billingAccountId: 68800079 + }, + ensureResourceBookingByIdResponse02: {}, createPaymentResponse: { id: 'c65f0cbf-b197-423d-91cc-db6e3bad9075' }