Open shawnborton opened 2 days ago
@shawnborton the AutoAssignerTriage
label has been deprecated. Please use Bug
for issue triage. See https://stackoverflowteams.com/c/expensify/questions/14418 for more details.
Triggered auto assignment to @JmillsExpensify (Bug
), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.
cc @anmurali
Add Track expense follow up questions as rows in details view of a Tracked expense
Feature request, we need to update ReportDetailsPage
to show the options in the mock for track expesnes
In ReportDetailsPage
, we need to push new item to items
which is derived from ReportDetailsPageMenuItem
if isTrackExpenseReport
is true, we already have the languages copies in actionableMentionTrackExpense
here for both english and spanish, so we need to only add options and update the icons and define actions:
if (isTrackExpenseReport) {
items.push({
key: CONST.REPORT_DETAILS_MENU_ITEM.SETTINGS,
translationKey: 'actionableMentionTrackExpense.submit',
icon: Expensicons.Send,
isAnonymousAction: false,
shouldShowRightIcon: true,
action: () => {
ReportUtils.createDraftTransactionAndNavigateToParticipantSelector(transactionID ?? '0', reportID, CONST.IOU.ACTION.SUBMIT, action.reportActionID);
},
});
items.push({
key: CONST.REPORT_DETAILS_MENU_ITEM.SETTINGS,
translationKey: 'actionableMentionTrackExpense.categorize',
icon: Expensicons.Folder,
isAnonymousAction: false,
shouldShowRightIcon: true,
action: () => {
ReportUtils.createDraftTransactionAndNavigateToParticipantSelector(transactionID ?? '0', reportID, CONST.IOU.ACTION.CATEGORIZE, action.reportActionID);
},
});
items.push({
key: CONST.REPORT_DETAILS_MENU_ITEM.SETTINGS,
translationKey: 'actionableMentionTrackExpense.share',
icon: Expensicons.UserPlus,
isAnonymousAction: false,
shouldShowRightIcon: true,
action: () => {
ReportUtils.createDraftTransactionAndNavigateToParticipantSelector(transactionID ?? '0', reportID, CONST.IOU.ACTION.SHARE, action.reportActionID);
},
});
}
Note that we should also update the backTo
routes on the next pages as now we will fallback to the reportdetailspage instead of main chat, that can be done during PR phase
Add Track expense follow up questions as rows in details view of a Tracked expense
New feature
Add below keys in REPORT_DETAILS_MENU_ITEM
REPORT_DETAILS_MENU_ITEM: {
....
SUBMIT_TO_SOMEONE: 'submitToSomeone',
CATEGORIZE_IT: 'categorizeIt',
SHARE_WITH_ACCOUNTANT: 'shareWithAccountant',
NOTHING_FOR_NOW: 'nothingForNow',
}
Add bellow code here
if( isTrackExpenseReport && parentReport && parentReportAction ){
const transactionID = getTransactionID(report.reportID);
items.push(
{
key: CONST.REPORT_DETAILS_MENU_ITEM.SUBMIT_TO_SOMEONE,
translationKey: 'actionableMentionTrackExpense.submit',
icon: Expensicons.Bug,
action: () => ReportUtils.createDraftTransactionAndNavigateToParticipantSelector(transactionID ?? '0', parentReport.reportID, CONST.IOU.ACTION.SUBMIT, parentReportAction.reportActionID),
isAnonymousAction: false,
},
{
key: CONST.REPORT_DETAILS_MENU_ITEM.CATEGORIZE_IT,
translationKey: 'actionableMentionTrackExpense.categorize',
icon: Expensicons.Bug,
action: () => ReportUtils.createDraftTransactionAndNavigateToParticipantSelector(transactionID ?? '0', parentReport.reportID, CONST.IOU.ACTION.CATEGORIZE, parentReportAction.reportActionID),
isAnonymousAction: false,
},
{
key: CONST.REPORT_DETAILS_MENU_ITEM.SHARE_WITH_ACCOUNTANT,
translationKey: 'actionableMentionTrackExpense.share',
icon: Expensicons.Bug,
action: () => ReportUtils.createDraftTransactionAndNavigateToParticipantSelector(transactionID ?? '0', parentReport.reportID, CONST.IOU.ACTION.SHARE, parentReportAction.reportActionID),
isAnonymousAction: false,
},
{
key: CONST.REPORT_DETAILS_MENU_ITEM.NOTHING_FOR_NOW,
translationKey: 'actionableMentionTrackExpense.nothing',
icon: Expensicons.Bug,
action: () => Report.dismissTrackExpenseActionableWhisper(parentReport.reportID, parentReportAction),
isAnonymousAction: false,
},
);
}
We also need to use corresponding icons instead "Expensicons.Bug" in above code
New feature
isTrackExpenseReport && ReportActionsUtils.isActionableTrackExpense(actionableWhisperReportAction)
ReportActionsUtils.getTrackExpenseActionableWhisper
to get the whisperAction of the track expenseparentReport?.reportID
or we can use the ReportUtils.getOriginalReportID
function and pass the parentReportAction as reportAction valueHere's the code:
const iouTransactionID = ReportActionsUtils.isMoneyRequestAction(requestParentReportAction)
? ReportActionsUtils.getOriginalMessage(requestParentReportAction)?.IOUTransactionID ?? ''
: '';
const whisperAction = ReportActionsUtils.getTrackExpenseActionableWhisper(iouTransactionID, moneyRequestReport?.reportID ?? '0');
const actionableWhisperReportActionID = whisperAction?.reportActionID ?? '0';
const actionableWhisperReportAction = ReportActionsUtils.getReportAction(moneyRequestReport?.reportID ?? '', actionableWhisperReportActionID);
if (isTrackExpenseReport && ReportActionsUtils.isActionableTrackExpense(actionableWhisperReportAction)) {
const actionReportID = ReportUtils.getOriginalReportID(report.reportID, parentReportAction) ?? '0';
items.push({
key: CONST.REPORT_DETAILS_MENU_ITEM.SETTINGS,
translationKey: 'actionableMentionTrackExpense.submit',
icon: Expensicons.Send,
isAnonymousAction: false,
shouldShowRightIcon: true,
action: () => {
ReportUtils.createDraftTransactionAndNavigateToParticipantSelector(iouTransactionID, actionReportID, CONST.IOU.ACTION.SUBMIT, actionableWhisperReportActionID);
},
});
items.push({
key: CONST.REPORT_DETAILS_MENU_ITEM.SETTINGS,
translationKey: 'actionableMentionTrackExpense.categorize',
icon: Expensicons.Folder,
isAnonymousAction: false,
shouldShowRightIcon: true,
action: () => {
ReportUtils.createDraftTransactionAndNavigateToParticipantSelector(iouTransactionID, actionReportID, CONST.IOU.ACTION.CATEGORIZE, actionableWhisperReportActionID);
},
});
items.push({
key: CONST.REPORT_DETAILS_MENU_ITEM.SETTINGS,
translationKey: 'actionableMentionTrackExpense.share',
icon: Expensicons.UserPlus,
isAnonymousAction: false,
shouldShowRightIcon: true,
action: () => {
ReportUtils.createDraftTransactionAndNavigateToParticipantSelector(iouTransactionID, actionReportID, CONST.IOU.ACTION.SHARE, actionableWhisperReportActionID);
},
});
}
https://github.com/user-attachments/assets/a204a45f-1358-4f99-b2ca-6f59618d5bb9
Job added to Upwork: https://www.upwork.com/jobs/~021849411242829996514
Triggered auto assignment to Contributor-plus team member for initial proposal review - @aimane-chnaif (External
)
@aimane-chnaif I would like to point out that I proposed the first solution here, other contributors elaborated in detail based on my proposal , but the basic idea of other proposals is the same as my proposal🙏
@aimane-chnaif I would like to point out that I proposed the first solution here, other contributors elaborated in detail based on my proposal , but the basic idea of other proposals is the same as my proposal🙏
@twilight2294 I disagree with you, it's not quite right, you just made a "quick proposal" without all the necessary changes to be first, but we spent a little more time to provide detailed proposal with all necessary changes
Problem: When a user Tracks an expense in NewDot, they are presented with four options at the end of the flow: send to someone, share with an accountant, categorize it, or do nothing for now. If a user decides to do nothing for now, they will never be able to send or share the expense in NewDot in the future if they change their mind because those options only appeared as a whisper message and will never reappear:
The only way they can do this is to switch back to Classic or to delete the expense and start over. This is bad because our core business strategy relies on users being able to easily send expenses to anyone to increase the viral nature of the product.
Solution: Add the track expense options into the details view of a tracked expense. We currently use the details view of an expense to surface other actions like Delete or Download, so this is a natural place to include the other missing track options. This will then allow users to go back to their tracked expenses and easily send them or share them when they wish.
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @aimane-chnaif