Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Track Expense flow #37282

Merged
merged 42 commits into from
Mar 20, 2024
Merged
Show file tree
Hide file tree
Changes from 17 commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
9054944
Initial implementation of button
shubham1206agra Feb 27, 2024
c532bab
Fixed svg
shubham1206agra Feb 27, 2024
2feddbf
Trying to start track expense flow
shubham1206agra Feb 27, 2024
f274174
Minor fixes
shubham1206agra Feb 27, 2024
d519b8c
Temporary disable track expense distance
shubham1206agra Feb 28, 2024
2cf09d1
Merge branch 'main' into track-expense
shubham1206agra Mar 4, 2024
d6d6c89
Removed duplicate function
shubham1206agra Mar 4, 2024
7517fbf
fixed bad merge commit
shubham1206agra Mar 4, 2024
6c6690c
fixed bad merge commit
shubham1206agra Mar 4, 2024
5937bf5
Merge branch 'Expensify:main' into track-expense
shubham1206agra Mar 6, 2024
82e1fe5
Completing UI changes in Request for Track Expense
shubham1206agra Mar 7, 2024
15a5e0f
Merge branch 'main' into track-expense
shubham1206agra Mar 7, 2024
c2ef07b
Completed BE endpoint connection
shubham1206agra Mar 7, 2024
2a425ad
Added gpsPoints in endpoint
shubham1206agra Mar 8, 2024
173d44b
merge main
shubham1206agra Mar 8, 2024
c7f6a50
Merge branch 'main' into track-expense
shubham1206agra Mar 8, 2024
92f803a
Fixing on which room we should allow track expense
shubham1206agra Mar 9, 2024
3a6661a
Merge branch 'main' into track-expense
shubham1206agra Mar 11, 2024
42d0ea5
merge main
shubham1206agra Mar 13, 2024
c47d0e0
Fix types
shubham1206agra Mar 13, 2024
88e0bf3
Fixed bunch of bugs
shubham1206agra Mar 14, 2024
cccfbf9
Disabled track expense in policy expense chats
shubham1206agra Mar 14, 2024
2528000
merge main
shubham1206agra Mar 15, 2024
4dca1f1
merge main
shubham1206agra Mar 15, 2024
c1eaa0b
Fixed report header for track expense
shubham1206agra Mar 17, 2024
d63b371
Disabled distance track expense as it is not implemented yet
shubham1206agra Mar 18, 2024
69e621b
Merge branch 'main' into track-expense
shubham1206agra Mar 18, 2024
c41cc0d
Fixing bugs after merge
shubham1206agra Mar 19, 2024
6ab5529
Fixed another bug after merge
shubham1206agra Mar 19, 2024
9d505da
Fixed delete track expense
shubham1206agra Mar 19, 2024
0c748ce
Fixed delete track expense message
shubham1206agra Mar 19, 2024
9edbe16
Fixed translations
shubham1206agra Mar 19, 2024
f393dd2
Apply suggestions from code review
shubham1206agra Mar 19, 2024
13a8c95
Fixed LHN alternative text
shubham1206agra Mar 19, 2024
b9e115d
Merge branch 'Expensify:main' into track-expense
shubham1206agra Mar 20, 2024
6738aed
Fixed bug after merge
shubham1206agra Mar 20, 2024
cc425d7
Fixed svg
shubham1206agra Mar 20, 2024
8a59e75
Fixed lint
shubham1206agra Mar 20, 2024
fb07003
Fixed svg fill
shubham1206agra Mar 20, 2024
edc7d4d
Fixed style on confirm step
shubham1206agra Mar 20, 2024
e0b531f
Implemented edit track expense, but doesn't work due to BE problems
shubham1206agra Mar 20, 2024
c5ac594
Merge branch 'main' into track-expense
shubham1206agra Mar 20, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions assets/images/track-expense.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions src/CONST.ts
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,7 @@ const CONST = {
BETA_COMMENT_LINKING: 'commentLinking',
VIOLATIONS: 'violations',
REPORT_FIELDS: 'reportFields',
TRACK_EXPENSE: 'trackExpense',
P2P_DISTANCE_REQUESTS: 'p2pDistanceRequests',
WORKFLOWS_DELAYED_SUBMISSION: 'workflowsDelayedSubmission',
},
Expand Down Expand Up @@ -1289,6 +1290,7 @@ const CONST = {
SEND: 'send',
SPLIT: 'split',
REQUEST: 'request',
TRACK_EXPENSE: 'track-expense',
thienlnam marked this conversation as resolved.
Show resolved Hide resolved
},
REQUEST_TYPE: {
DISTANCE: 'distance',
Expand Down
2 changes: 2 additions & 0 deletions src/components/Icon/Expensicons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ import Tag from '@assets/images/tag.svg';
import Task from '@assets/images/task.svg';
import ThreeDots from '@assets/images/three-dots.svg';
import ThumbsUp from '@assets/images/thumbs-up.svg';
import TrackExpense from '@assets/images/track-expense.svg';
import Transfer from '@assets/images/transfer.svg';
import Trashcan from '@assets/images/trashcan.svg';
import Unlock from '@assets/images/unlock.svg';
Expand Down Expand Up @@ -310,4 +311,5 @@ export {
ChatBubbleUnread,
ChatBubbleReply,
Lightbulb,
TrackExpense,
};
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,7 @@ function MoneyTemporaryForRefactorRequestConfirmationList({
const isTypeRequest = iouType === CONST.IOU.TYPE.REQUEST;
const isTypeSplit = iouType === CONST.IOU.TYPE.SPLIT;
const isTypeSend = iouType === CONST.IOU.TYPE.SEND;
const isTypeTrackExpense = iouType === CONST.IOU.TYPE.TRACK_EXPENSE;
const canEditDistance = isTypeRequest || (canUseP2PDistanceRequests && isTypeSplit);

const {unit, rate, currency} = mileageRate;
Expand Down Expand Up @@ -381,7 +382,9 @@ function MoneyTemporaryForRefactorRequestConfirmationList({

const splitOrRequestOptions = useMemo(() => {
let text;
if (isTypeSplit && iouAmount === 0) {
if (isTypeTrackExpense) {
text = translate('iou.trackExpense');
} else if (isTypeSplit && iouAmount === 0) {
text = translate('iou.split');
} else if ((receiptPath && isTypeRequest) || isDistanceRequestWithPendingRoute) {
text = translate('iou.request');
Expand All @@ -398,7 +401,7 @@ function MoneyTemporaryForRefactorRequestConfirmationList({
value: iouType,
},
];
}, [isTypeSplit, isTypeRequest, iouType, iouAmount, receiptPath, formattedAmount, isDistanceRequestWithPendingRoute, translate]);
}, [isTypeTrackExpense, isTypeSplit, iouAmount, receiptPath, isTypeRequest, isDistanceRequestWithPendingRoute, iouType, translate, formattedAmount]);

const selectedParticipants = useMemo(() => _.filter(pickedParticipants, (participant) => participant.selected), [pickedParticipants]);
const personalDetailsOfPayee = useMemo(() => payeePersonalDetails || currentUserPersonalDetails, [payeePersonalDetails, currentUserPersonalDetails]);
Expand Down
7 changes: 6 additions & 1 deletion src/components/OptionRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,12 @@ function OptionRow({
numberOfLines={isMultilineSupported ? 2 : 1}
textStyles={displayNameStyle}
shouldUseFullTitle={
!!option.isChatRoom || !!option.isPolicyExpenseChat || !!option.isMoneyRequestReport || !!option.isThread || !!option.isTaskReport
!!option.isChatRoom ||
!!option.isPolicyExpenseChat ||
!!option.isMoneyRequestReport ||
!!option.isThread ||
!!option.isTaskReport ||
!!option.isSelfDM
}
/>
{option.alternateText ? (
Expand Down
10 changes: 6 additions & 4 deletions src/components/ReportWelcomeText.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import {View} from 'react-native';
import type {OnyxEntry} from 'react-native-onyx';
import {withOnyx} from 'react-native-onyx';
import useLocalize from '@hooks/useLocalize';
import usePermissions from '@hooks/usePermissions';
import useThemeStyles from '@hooks/useThemeStyles';
import Navigation from '@libs/Navigation/Navigation';
import * as OptionsListUtils from '@libs/OptionsListUtils';
Expand Down Expand Up @@ -33,6 +34,7 @@ type ReportWelcomeTextProps = ReportWelcomeTextOnyxProps & {
function ReportWelcomeText({report, policy, personalDetails}: ReportWelcomeTextProps) {
const {translate} = useLocalize();
const styles = useThemeStyles();
const {canUseTrackExpense} = usePermissions();
const isPolicyExpenseChat = ReportUtils.isPolicyExpenseChat(report);
const isChatRoom = ReportUtils.isChatRoom(report);
const isSelfDM = ReportUtils.isSelfDM(report);
Expand All @@ -42,7 +44,7 @@ function ReportWelcomeText({report, policy, personalDetails}: ReportWelcomeTextP
const displayNamesWithTooltips = ReportUtils.getDisplayNamesWithTooltips(OptionsListUtils.getPersonalDetailsForAccountIDs(participantAccountIDs, personalDetails), isMultipleParticipant);
const isUserPolicyAdmin = PolicyUtils.isPolicyAdmin(policy);
const roomWelcomeMessage = ReportUtils.getRoomWelcomeMessage(report, isUserPolicyAdmin);
const moneyRequestOptions = ReportUtils.getMoneyRequestOptions(report, policy, participantAccountIDs);
const moneyRequestOptions = ReportUtils.getMoneyRequestOptions(report, policy, participantAccountIDs, canUseTrackExpense);
const additionalText = moneyRequestOptions.map((item) => translate(`reportActionsView.iouTypes.${item}`)).join(', ');
const canEditPolicyDescription = ReportUtils.canEditPolicyDescription(policy);
const reportName = ReportUtils.getReportName(report);
Expand Down Expand Up @@ -158,9 +160,9 @@ function ReportWelcomeText({report, policy, personalDetails}: ReportWelcomeTextP
))}
</Text>
)}
{(moneyRequestOptions.includes(CONST.IOU.TYPE.SEND) || moneyRequestOptions.includes(CONST.IOU.TYPE.REQUEST)) && (
<Text>{translate('reportActionsView.usePlusButton', {additionalText})}</Text>
)}
{(moneyRequestOptions.includes(CONST.IOU.TYPE.SEND) ||
moneyRequestOptions.includes(CONST.IOU.TYPE.REQUEST) ||
moneyRequestOptions.includes(CONST.IOU.TYPE.TRACK_EXPENSE)) && <Text>{translate('reportActionsView.usePlusButton', {additionalText})}</Text>}
</View>
</>
);
Expand Down
3 changes: 3 additions & 0 deletions src/languages/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -503,6 +503,8 @@ export default {
send: 'send money',
split: 'split a bill',
request: 'request money',
// eslint-disable-next-line @typescript-eslint/naming-convention
'track-expense': 'track an expense',
},
},
reportAction: {
Expand Down Expand Up @@ -592,6 +594,7 @@ export default {
participants: 'Participants',
requestMoney: 'Request money',
sendMoney: 'Send money',
trackExpense: 'Track expense',
pay: 'Pay',
cancelPayment: 'Cancel payment',
cancelPaymentConfirmation: 'Are you sure that you want to cancel this payment?',
Expand Down
3 changes: 3 additions & 0 deletions src/languages/es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,8 @@ export default {
send: 'enviar dinero',
split: 'dividir una factura',
request: 'pedir dinero',
// eslint-disable-next-line @typescript-eslint/naming-convention
'track-expense': 'rastrear un gasto',
Comment on lines +507 to +508
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you confirm translations in slack?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not right now

Copy link
Contributor

@ishpaul777 ishpaul777 Mar 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you post a comment slack for confirmation

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ishpaul777 Can you start the slack thread instead?
Meanwhile, I am going to finish writing tests.

},
},
reportAction: {
Expand Down Expand Up @@ -585,6 +587,7 @@ export default {
participants: 'Participantes',
requestMoney: 'Pedir dinero',
sendMoney: 'Enviar dinero',
trackExpense: 'Seguimiento de gastos',
pay: 'Pagar',
cancelPayment: 'Cancelar el pago',
cancelPaymentConfirmation: '¿Estás seguro de que quieres cancelar este pago?',
Expand Down
30 changes: 30 additions & 0 deletions src/libs/API/parameters/TrackExpenseParams.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import type {ValueOf} from 'type-fest';
import type CONST from '@src/CONST';
import type {Receipt} from '@src/types/onyx/Transaction';

type TrackExpenseParams = {
amount: number;
currency: string;
comment: string;
created: string;
merchant: string;
iouReportID?: string;
chatReportID: string;
transactionID: string;
reportActionID: string;
createdChatReportActionID: string;
createdIOUReportActionID?: string;
reportPreviewReportActionID?: string;
receipt: Receipt;
receiptState?: ValueOf<typeof CONST.IOU.RECEIPT_STATE>;
category?: string;
tag?: string;
taxCode: string;
taxAmount: number;
billable?: boolean;
gpsPoints?: string;
transactionThreadReportID: string;
createdReportActionIDForThread: string;
};

export default TrackExpenseParams;
1 change: 1 addition & 0 deletions src/libs/API/parameters/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ export type {default as SetWorkspaceAutoReportingFrequencyParams} from './SetWor
export type {default as SetWorkspaceAutoReportingMonthlyOffsetParams} from './SetWorkspaceAutoReportingMonthlyOffsetParams';
export type {default as SetWorkspaceApprovalModeParams} from './SetWorkspaceApprovalModeParams';
export type {default as SwitchToOldDotParams} from './SwitchToOldDotParams';
export type {default as TrackExpenseParams} from './TrackExpenseParams';
export type {default as AcceptJoinRequestParams} from './AcceptJoinRequest';
export type {default as DeclineJoinRequestParams} from './DeclineJoinRequest';
export type {default as JoinPolicyInviteLinkParams} from './JoinPolicyInviteLink';
2 changes: 2 additions & 0 deletions src/libs/API/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ const WRITE_COMMANDS = {
CANCEL_PAYMENT: 'CancelPayment',
ACCEPT_ACH_CONTRACT_FOR_BANK_ACCOUNT: 'AcceptACHContractForBankAccount',
SWITCH_TO_OLD_DOT: 'SwitchToOldDot',
TRACK_EXPENSE: 'TrackExpense',
JOIN_POLICY_VIA_INVITE_LINK: 'JoinWorkspaceViaInviteLink',
ACCEPT_JOIN_REQUEST: 'AcceptJoinRequest',
DECLINE_JOIN_REQUEST: 'DeclineJoinRequest',
Expand Down Expand Up @@ -315,6 +316,7 @@ type WriteCommandParameters = {
[WRITE_COMMANDS.SET_WORKSPACE_AUTO_REPORTING_MONTHLY_OFFSET]: Parameters.SetWorkspaceAutoReportingMonthlyOffsetParams;
[WRITE_COMMANDS.SET_WORKSPACE_APPROVAL_MODE]: Parameters.SetWorkspaceApprovalModeParams;
[WRITE_COMMANDS.SWITCH_TO_OLD_DOT]: Parameters.SwitchToOldDotParams;
[WRITE_COMMANDS.TRACK_EXPENSE]: Parameters.TrackExpenseParams;
[WRITE_COMMANDS.JOIN_POLICY_VIA_INVITE_LINK]: Parameters.JoinPolicyInviteLinkParams;
[WRITE_COMMANDS.ACCEPT_JOIN_REQUEST]: Parameters.AcceptJoinRequestParams;
[WRITE_COMMANDS.DECLINE_JOIN_REQUEST]: Parameters.DeclineJoinRequestParams;
Expand Down
2 changes: 1 addition & 1 deletion src/libs/IOUUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ function isIOUReportPendingCurrencyConversion(iouReport: Report): boolean {
* Checks if the iou type is one of request, send, or split.
*/
function isValidMoneyRequestType(iouType: string): boolean {
const moneyRequestType: string[] = [CONST.IOU.TYPE.REQUEST, CONST.IOU.TYPE.SPLIT, CONST.IOU.TYPE.SEND];
const moneyRequestType: string[] = [CONST.IOU.TYPE.REQUEST, CONST.IOU.TYPE.SPLIT, CONST.IOU.TYPE.SEND, CONST.IOU.TYPE.TRACK_EXPENSE];
return moneyRequestType.includes(iouType);
}

Expand Down
32 changes: 32 additions & 0 deletions src/libs/OptionsListUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -248,9 +248,11 @@ Onyx.connect({
});

const policyExpenseReports: OnyxCollection<Report> = {};
const allReports: OnyxCollection<Report> = {};
Onyx.connect({
key: ONYXKEYS.COLLECTION.REPORT,
callback: (report, key) => {
allReports[key] = report;
if (!ReportUtils.isPolicyExpenseChat(report)) {
return;
}
Expand Down Expand Up @@ -732,6 +734,35 @@ function createOption(
return result;
}

/**
* Get the option for a given report.
*/
function getReportOption(participant: Participant): ReportUtils.OptionData {
const report = allReports?.[`${ONYXKEYS.COLLECTION.REPORT}${participant.reportID}`];

const option = createOption(
report?.visibleChatMemberAccountIDs ?? [],
allPersonalDetails ?? {},
report ?? null,
{},
{
showChatPreviewLine: false,
forcePolicyNamePreview: false,
},
);

// Update text & alternateText because createOption returns workspace name only if report is owned by the user
if (option.isSelfDM) {
option.alternateText = Localize.translateLocal('reportActionsView.yourSpace');
} else {
option.text = ReportUtils.getPolicyName(report);
option.alternateText = Localize.translateLocal('workspace.common.workspace');
}
option.selected = participant.selected;
option.isSelected = participant.selected;
return option;
}

/**
* Get the option for a policy expense report.
*/
Expand Down Expand Up @@ -2063,6 +2094,7 @@ export {
formatSectionsFromSearchTerm,
transformedTaxRates,
getShareLogOptions,
getReportOption,
};

export type {MemberForList, CategorySection, GetOptions};
5 changes: 5 additions & 0 deletions src/libs/Permissions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ function canUseViolations(betas: OnyxEntry<Beta[]>): boolean {
return !!betas?.includes(CONST.BETAS.VIOLATIONS) || canUseAllBetas(betas);
}

function canUseTrackExpense(betas: OnyxEntry<Beta[]>): boolean {
return !!betas?.includes(CONST.BETAS.TRACK_EXPENSE) || canUseAllBetas(betas);
}

function canUseP2PDistanceRequests(betas: OnyxEntry<Beta[]>): boolean {
return !!betas?.includes(CONST.BETAS.P2P_DISTANCE_REQUESTS) || canUseAllBetas(betas);
}
Expand All @@ -47,6 +51,7 @@ export default {
canUseCommentLinking,
canUseLinkPreviews,
canUseViolations,
canUseTrackExpense,
canUseReportFields,
canUseP2PDistanceRequests,
canUseWorkflowsDelayedSubmission,
Expand Down
27 changes: 24 additions & 3 deletions src/libs/ReportUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -930,6 +930,15 @@ function isConciergeChatReport(report: OnyxEntry<Report>): boolean {
return report?.participantAccountIDs?.length === 1 && Number(report.participantAccountIDs?.[0]) === CONST.ACCOUNT_ID.CONCIERGE && !isChatThread(report);
}

function findSelfDMReportID(): string | undefined {
if (!allReports) {
return;
}

const selfDMReport = Object.values(allReports).find((report) => isSelfDM(report) && !isThread(report));
return selfDMReport?.reportID;
}

/**
* Checks if the supplied report belongs to workspace based on the provided params. If the report's policyID is _FAKE_ or has no value, it means this report is a DM.
* In this case report and workspace members must be compared to determine whether the report belongs to the workspace.
Expand Down Expand Up @@ -4440,7 +4449,7 @@ function canRequestMoney(report: OnyxEntry<Report>, policy: OnyxEntry<Policy>, o

/**
* Helper method to define what money request options we want to show for particular method.
* There are 3 money request options: Request, Split and Send:
* There are 4 money request options: Request, Split, Send and Track expense:
* - Request option should show for:
* - DMs
* - own policy expense chats
Expand All @@ -4452,13 +4461,16 @@ function canRequestMoney(report: OnyxEntry<Report>, policy: OnyxEntry<Policy>, o
* - chat/ policy rooms with more than 1 participants
* - groups chats with 3 and more participants
* - corporate workspace chats
* - Track expense option should show for:
* - Self DMs
* - admin rooms
*
* None of the options should show in chat threads or if there is some special Expensify account
* as a participant of the report.
*/
function getMoneyRequestOptions(report: OnyxEntry<Report>, policy: OnyxEntry<Policy>, reportParticipants: number[]): Array<ValueOf<typeof CONST.IOU.TYPE>> {
function getMoneyRequestOptions(report: OnyxEntry<Report>, policy: OnyxEntry<Policy>, reportParticipants: number[], canUseTrackExpense = true): Array<ValueOf<typeof CONST.IOU.TYPE>> {
// In any thread or task report, we do not allow any new money requests yet
if (isChatThread(report) || isTaskReport(report) || isSelfDM(report)) {
if (isChatThread(report) || isTaskReport(report) || (!canUseTrackExpense && isSelfDM(report))) {
return [];
}

Expand All @@ -4474,6 +4486,10 @@ function getMoneyRequestOptions(report: OnyxEntry<Report>, policy: OnyxEntry<Pol
const hasMultipleOtherParticipants = otherParticipants.length > 1;
let options: Array<ValueOf<typeof CONST.IOU.TYPE>> = [];

if (isSelfDM(report)) {
options = [CONST.IOU.TYPE.TRACK_EXPENSE];
}
shubham1206agra marked this conversation as resolved.
Show resolved Hide resolved

// User created policy rooms and default rooms like #admins or #announce will always have the Split Bill option
// unless there are no other participants at all (e.g. #admins room for a policy with only 1 admin)
// DM chats will have the Split Bill option only when there are at least 2 other people in the chat.
Expand All @@ -4482,6 +4498,10 @@ function getMoneyRequestOptions(report: OnyxEntry<Report>, policy: OnyxEntry<Pol
options = [CONST.IOU.TYPE.SPLIT];
}

if (canUseTrackExpense && isPolicyExpenseChat(report) && report?.isOwnPolicyExpenseChat) {
options = [...options, CONST.IOU.TYPE.TRACK_EXPENSE];
}
Copy link
Contributor Author

@shubham1206agra shubham1206agra Mar 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@thienlnam I am thinking of disabling the track expense in workspace temporarily. Will re-enable it in a follow up PR. This is basically for reason that the logic for deleting the request / updating the amount gets complicated, and this feature details in workspace is not flushed through completely. Since the plan was enable this feature to all users in near future, I think, delivering the workspace track expense incomplete may not have best outcome for users.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure that works, we can create another issue for this to get added into the workspace


if (canRequestMoney(report, policy, otherParticipants)) {
options = [...options, CONST.IOU.TYPE.REQUEST];
}
Expand Down Expand Up @@ -5403,6 +5423,7 @@ export {
canEditRoomVisibility,
canEditPolicyDescription,
getPolicyDescriptionText,
findSelfDMReportID,
isJoinRequestInAdminRoom,
canAddOrDeleteTransactions,
shouldCreateNewMoneyRequestReport,
Expand Down
Loading
Loading