Skip to content

Commit

Permalink
fix titles for the tabs at IOU start page
Browse files Browse the repository at this point in the history
  • Loading branch information
pasyukevich committed Oct 4, 2024
1 parent eaae14b commit f7ed357
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion src/languages/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -685,7 +685,6 @@ const translations = {
submit: 'submit an expense',
track: 'track an expense',
invoice: 'invoice an expense',
create: 'create an expense',
},
},
adminOnlyCanPost: 'Only admins can send messages in this room.',
Expand Down
6 changes: 3 additions & 3 deletions src/pages/iou/request/IOURequestStartPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,19 +45,19 @@ function IOURequestStartPage({
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
const [transaction] = useOnyx(`${ONYXKEYS.COLLECTION.TRANSACTION_DRAFT}${route?.params.transactionID || -1}`);
const [allPolicies] = useOnyx(ONYXKEYS.COLLECTION.POLICY);
const {canUseP2PDistanceRequests, canUseCombinedTrackSubmit} = usePermissions(iouType);

const tabTitles = {
[CONST.IOU.TYPE.REQUEST]: translate('iou.submitExpense'),
[CONST.IOU.TYPE.SUBMIT]: translate('iou.submitExpense'),
[CONST.IOU.TYPE.SUBMIT]: canUseCombinedTrackSubmit ? translate('iou.createExpense') : translate('iou.submitExpense'),
[CONST.IOU.TYPE.SEND]: translate('iou.paySomeone', {name: ReportUtils.getPayeeName(report)}),
[CONST.IOU.TYPE.PAY]: translate('iou.paySomeone', {name: ReportUtils.getPayeeName(report)}),
[CONST.IOU.TYPE.SPLIT]: translate('iou.splitExpense'),
[CONST.IOU.TYPE.TRACK]: translate('iou.trackExpense'),
[CONST.IOU.TYPE.TRACK]: canUseCombinedTrackSubmit ? translate('iou.createExpense') : translate('iou.trackExpense'),
[CONST.IOU.TYPE.INVOICE]: translate('workspace.invoices.sendInvoice'),
[CONST.IOU.TYPE.CREATE]: translate('iou.createExpense'),
};
const transactionRequestType = useRef(TransactionUtils.getRequestType(transaction));
const {canUseP2PDistanceRequests, canUseCombinedTrackSubmit} = usePermissions(iouType);
const isFromGlobalCreate = isEmptyObject(report?.reportID);

// Clear out the temporary expense if the reportID in the URL has changed from the transaction's reportID
Expand Down

0 comments on commit f7ed357

Please sign in to comment.