-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix colon added to completed reopened task messages when copy pasting
- Loading branch information
1 parent
1810c8e
commit 02f6e74
Showing
5 changed files
with
36 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import CONST from '../CONST'; | ||
import * as ReportUtils from './ReportUtils'; | ||
/** | ||
* @param {Object} reportAction | ||
* @param {Function} translate | ||
* @returns {string} | ||
*/ | ||
function getTaskReportActionMessage(reportAction, translate) { | ||
const taskReport = ReportUtils.getReport(reportAction.originalMessage.taskReportID.toString()); | ||
const taskReportName = taskReport.reportName || ''; | ||
|
||
let taskStatusText = ''; | ||
switch (reportAction.actionName) { | ||
case CONST.REPORT.ACTIONS.TYPE.TASKCOMPLETED: | ||
taskStatusText = translate('task.messages.completed'); | ||
break; | ||
case CONST.REPORT.ACTIONS.TYPE.TASKCANCELLED: | ||
taskStatusText = translate('task.messages.canceled'); | ||
break; | ||
case CONST.REPORT.ACTIONS.TYPE.TASKREOPENED: | ||
taskStatusText = translate('task.messages.reopened'); | ||
break; | ||
default: | ||
taskStatusText = translate('task.task'); | ||
} | ||
return `${taskStatusText} ${taskReportName}`; | ||
} | ||
|
||
export default getTaskReportActionMessage; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters