Skip to content

Commit

Permalink
display the correct titleMessage
Browse files Browse the repository at this point in the history
  • Loading branch information
hakifran authored and tdethier committed Jan 7, 2025
1 parent a8835ca commit 6286b33
Showing 1 changed file with 5 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,13 +107,6 @@ const PushGpsDialogComponent: FunctionComponent<Props> = ({
[approveOrgUnitHasGps, approveSubmissionNoHasGps],
);

let title = MESSAGES.export;
if (selection) {
title = {
...MESSAGES.pushGpsToOrgUnits,
};
}

const hasTaskPermission = userHasPermission(
Permission.DATA_TASKS,
currentUser,
Expand Down Expand Up @@ -163,7 +156,7 @@ const PushGpsDialogComponent: FunctionComponent<Props> = ({
return (
<ConfirmCancelModal
allowConfirm={noLoadingAndNoError && approved}
titleMessage={noLoadingAndNoError ? title : ''}
titleMessage={noLoadingAndNoError ? MESSAGES.pushGpsToOrgUnits : ''}
onConfirm={onConfirm}
onCancel={() => {
closeDialog();
Expand Down Expand Up @@ -201,7 +194,10 @@ const PushGpsDialogComponent: FunctionComponent<Props> = ({
) : (
formatMessage(MESSAGES.pushGpsWarningMessage, {
submissionCount: selection.selectCount,
orgUnitCount: selection.selectCount,
orgUnitCount:
selection.selectCount -
(checkBulkGpsPush?.warning_no_location
?.length ?? 0),
})
)}
</Typography>
Expand Down

0 comments on commit 6286b33

Please sign in to comment.