Skip to content

Commit

Permalink
flip a condition once submit
Browse files Browse the repository at this point in the history
  • Loading branch information
rezkiy37 committed Feb 9, 2024
1 parent 12a28c1 commit b9ac4a3
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions src/libs/NextStepUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -188,16 +188,20 @@ function buildNextStep(report: Report | EmptyObject, predictedNextStatus: ValueO
case CONST.REPORT.STATUS_NUM.SUBMITTED: {
const verb = isManager ? 'review' : 'approve';

// Self review & another reviewer
// Another owner
optimisticNextStep = {
type,
title: 'Next Steps:',
message: [
{
text: 'Waiting for ',
text: ownerLogin,
type: 'strong',
},
{
text: managerDisplayName,
text: ' is waiting for ',
},
{
text: 'you',
type: 'strong',
},
{
Expand All @@ -208,23 +212,19 @@ function buildNextStep(report: Report | EmptyObject, predictedNextStatus: ValueO
type: 'strong',
},
{
text: ' %expenses.',
text: ' these %expenses.',
},
],
};

// Another owner
if (!isOwner) {
// Self review & another reviewer
if (isOwner) {
optimisticNextStep.message = [
{
text: ownerLogin,
type: 'strong',
},
{
text: ' is waiting for ',
text: 'Waiting for ',
},
{
text: 'you',
text: managerDisplayName,
type: 'strong',
},
{
Expand All @@ -235,7 +235,7 @@ function buildNextStep(report: Report | EmptyObject, predictedNextStatus: ValueO
type: 'strong',
},
{
text: ' these %expenses.',
text: ' %expenses.',
},
];
}
Expand Down

0 comments on commit b9ac4a3

Please sign in to comment.