Skip to content

Commit f6ede33

Browse files
committed
Fix prettier
1 parent 70c921a commit f6ede33

2 files changed

Lines changed: 33 additions & 9 deletions

File tree

src/libs/NextStepUtils.ts

Lines changed: 29 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,19 @@ function buildNextStepMessage(nextStep: ReportNextStep, translate: LocaleContext
6666
}
6767

6868
function buildOptimisticNextStep(params: BuildNextStepNewParams): ReportNextStep | null {
69-
const {report, policy, currentUserAccountIDParam, currentUserEmailParam, hasViolations, isASAPSubmitBetaEnabled, predictedNextStatus, shouldFixViolations, isUnapprove, isReopen, bypassNextApproverID} =
70-
params;
69+
const {
70+
report,
71+
policy,
72+
currentUserAccountIDParam,
73+
currentUserEmailParam,
74+
hasViolations,
75+
isASAPSubmitBetaEnabled,
76+
predictedNextStatus,
77+
shouldFixViolations,
78+
isUnapprove,
79+
isReopen,
80+
bypassNextApproverID,
81+
} = params;
7182

7283
if (!isExpenseReport(report)) {
7384
return null;
@@ -336,8 +347,19 @@ function buildOptimisticNextStepForStrictPolicyRuleViolations() {
336347
* @deprecated This function will be removed soon. You should still use it though but also use buildOptimisticNextStep in parallel.
337348
*/
338349
function buildNextStepNew(params: BuildNextStepNewParams): ReportNextStepDeprecated | null {
339-
const {report, policy, currentUserAccountIDParam, currentUserEmailParam, hasViolations, isASAPSubmitBetaEnabled, predictedNextStatus, shouldFixViolations, isUnapprove, isReopen, bypassNextApproverID} =
340-
params;
350+
const {
351+
report,
352+
policy,
353+
currentUserAccountIDParam,
354+
currentUserEmailParam,
355+
hasViolations,
356+
isASAPSubmitBetaEnabled,
357+
predictedNextStatus,
358+
shouldFixViolations,
359+
isUnapprove,
360+
isReopen,
361+
bypassNextApproverID,
362+
} = params;
341363

342364
if (!isExpenseReport(report)) {
343365
return null;
@@ -365,7 +387,9 @@ function buildNextStepNew(params: BuildNextStepNewParams): ReportNextStepDepreca
365387
policyOwnerPersonalDetails?.displayName ??
366388
policyOwnerPersonalDetails?.login ??
367389
getDisplayNameForParticipant({accountID: policy?.ownerAccountID, formatPhoneNumber: formatPhoneNumberPhoneUtils});
368-
const nextApproverDisplayName = bypassNextApproverID ? getDisplayNameForParticipant({accountID: bypassNextApproverID, formatPhoneNumber: formatPhoneNumberPhoneUtils}) ?? getPersonalDetailsForAccountID(bypassNextApproverID).login : getNextApproverDisplayName(report, isUnapprove);
390+
const nextApproverDisplayName = bypassNextApproverID
391+
? (getDisplayNameForParticipant({accountID: bypassNextApproverID, formatPhoneNumber: formatPhoneNumberPhoneUtils}) ?? getPersonalDetailsForAccountID(bypassNextApproverID).login)
392+
: getNextApproverDisplayName(report, isUnapprove);
369393
const approverAccountID = bypassNextApproverID ?? getNextApproverAccountID(report, isUnapprove);
370394
const approvers = getLoginsByAccountIDs([approverAccountID ?? CONST.DEFAULT_NUMBER_ID]);
371395

src/libs/actions/IOU.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14832,7 +14832,7 @@ function assignReportToMe(report: OnyxTypes.Report, accountID: number, email: st
1483214832
currentUserEmailParam: email,
1483314833
hasViolations,
1483414834
isASAPSubmitBetaEnabled,
14835-
bypassNextApproverID: accountID
14835+
bypassNextApproverID: accountID,
1483614836
});
1483714837
const optimisticNextStep = buildOptimisticNextStep({
1483814838
report: {...report, managerID: accountID},
@@ -14844,7 +14844,7 @@ function assignReportToMe(report: OnyxTypes.Report, accountID: number, email: st
1484414844
currentUserEmailParam: email,
1484514845
hasViolations,
1484614846
isASAPSubmitBetaEnabled,
14847-
bypassNextApproverID: accountID
14847+
bypassNextApproverID: accountID,
1484814848
});
1484914849

1485014850
const onyxData: OnyxData = {
@@ -14948,7 +14948,7 @@ function addReportApprover(
1494814948
currentUserEmailParam: email,
1494914949
hasViolations,
1495014950
isASAPSubmitBetaEnabled,
14951-
bypassNextApproverID: newApproverAccountID
14951+
bypassNextApproverID: newApproverAccountID,
1495214952
});
1495314953
const optimisticNextStep = buildOptimisticNextStep({
1495414954
report: {...report, managerID: newApproverAccountID},
@@ -14960,7 +14960,7 @@ function addReportApprover(
1496014960
currentUserEmailParam: email,
1496114961
hasViolations,
1496214962
isASAPSubmitBetaEnabled,
14963-
bypassNextApproverID: newApproverAccountID
14963+
bypassNextApproverID: newApproverAccountID,
1496414964
});
1496514965
const onyxData: OnyxData = {
1496614966
optimisticData: [

0 commit comments

Comments
 (0)