-
Notifications
You must be signed in to change notification settings - Fork 51
[PROD RELEASE] - AI Review/Updates & Fixes #1752
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
758e5c3
4dfa263
8c4214a
4419e7b
ff154a2
126a57a
da740a9
4fa4d79
1b601cf
5a32ff8
3f71798
7e375bc
2cb88bd
ca0fcc0
5cee3cb
a4998fc
d68e75b
87bea15
f9c8be2
819d894
69c9636
a9c64a3
71dfee2
54ade78
2fb7a4c
d4c4f25
6e4fe99
e102a09
a94041a
2eac344
928f7da
75b447d
2220084
251f32b
3ea0d0b
0b47944
912cbc6
aeaedd0
805d7ee
dab30b5
985b313
66c3571
fd20bf8
077ba98
ee522ee
3c4ef0c
6936cdd
fdcc4f0
faf1577
74ac44f
1546cf8
0df49af
86fa6ce
a5a1ef9
1a98258
db9c6c1
fd50d60
d335e87
322c44a
330376b
52ff694
66aa88c
f8ed7fa
468c44c
6e2014f
bb3d775
c32e587
bc81268
ccb0c9c
25a5d2a
b979c86
e1e0f92
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,7 +4,6 @@ import { | |
| fetchEngagement, | ||
| createEngagement as createEngagementAPI, | ||
| updateEngagement as updateEngagementAPI, | ||
| patchEngagement, | ||
| deleteEngagement as deleteEngagementAPI | ||
| } from '../services/engagements' | ||
| import { fetchSkillsByIds } from '../services/skills' | ||
|
|
@@ -345,7 +344,10 @@ export function updateEngagementDetails (engagementId, engagementDetails, projec | |
| } | ||
|
|
||
| /** | ||
| * Partially updates engagement details | ||
| * Partially updates engagement details. | ||
| * | ||
| * The engagements API currently accepts partial engagement payloads through the | ||
| * `PUT :id` update route rather than a dedicated `PATCH :id` handler. | ||
| * @param {String|Number} engagementId | ||
| * @param {Object} partialDetails | ||
| * @param {String|Number} projectId | ||
|
|
@@ -358,7 +360,7 @@ export function partiallyUpdateEngagementDetails (engagementId, partialDetails, | |
| }) | ||
|
|
||
| try { | ||
| const response = await patchEngagement(engagementId, partialDetails) | ||
| const response = await updateEngagementAPI(engagementId, partialDetails) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [❗❗ |
||
| const [hydratedEngagement] = await hydrateEngagementSkills([_.get(response, 'data', {})]) | ||
| const updatedDetails = normalizeEngagement(hydratedEngagement || {}) | ||
| return dispatch({ | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -19,6 +19,7 @@ const ENGAGEMENT_PAYMENT_STATUS = 'ON_HOLD_ADMIN' | |
| * @param {String} remarks | ||
| * @param {String|Number} agreementRate | ||
| * @param {String|Number} amount | ||
| * @param {String|Number} hoursWorked | ||
| * @param {String|Number} billingAccountId | ||
| * @param {String} paymentStatus | ||
| */ | ||
|
|
@@ -30,6 +31,7 @@ export function createMemberPayment ( | |
| remarks, | ||
| agreementRate, | ||
| amount, | ||
| hoursWorked, | ||
| billingAccountId, | ||
| paymentStatus = ENGAGEMENT_PAYMENT_STATUS | ||
| ) { | ||
|
|
@@ -39,6 +41,7 @@ export function createMemberPayment ( | |
| }) | ||
|
|
||
| const parsedAmount = Number(amount) | ||
| const parsedHoursWorked = Number(hoursWorked) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [ |
||
| const trimmedTitle = typeof paymentTitle === 'string' | ||
| ? paymentTitle.trim() | ||
| : (paymentTitle != null ? String(paymentTitle) : '') | ||
|
|
@@ -60,6 +63,9 @@ export function createMemberPayment ( | |
| description: trimmedTitle, | ||
| externalId: String(assignmentId), | ||
| attributes, | ||
| ...(Number.isFinite(parsedHoursWorked) && parsedHoursWorked > 0 | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [ |
||
| ? { hoursWorked: parsedHoursWorked } | ||
| : {}), | ||
| ...(paymentStatus ? { status: paymentStatus } : {}), | ||
| details: [ | ||
| { | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.