From b9ac4a3438739ff0f29853f5e31ade1c8ddbfb02 Mon Sep 17 00:00:00 2001 From: Mykhailo Kravchenko Date: Fri, 9 Feb 2024 13:58:47 +0100 Subject: [PATCH] flip a condition once submit --- src/libs/NextStepUtils.ts | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/libs/NextStepUtils.ts b/src/libs/NextStepUtils.ts index d75095315bd5..3b42382b10f9 100644 --- a/src/libs/NextStepUtils.ts +++ b/src/libs/NextStepUtils.ts @@ -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', }, { @@ -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', }, { @@ -235,7 +235,7 @@ function buildNextStep(report: Report | EmptyObject, predictedNextStatus: ValueO type: 'strong', }, { - text: ' these %expenses.', + text: ' %expenses.', }, ]; }