Skip to content

Commit

Permalink
Merge pull request #48936 from allgandalf/QuickFix
Browse files Browse the repository at this point in the history
[fix]: Allow 0 as input and show 2 decimal card limit in members detail page
  • Loading branch information
mountiny authored Sep 10, 2024
2 parents 7ef8148 + 9181300 commit 92171d8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ function WorkspaceEditCardLimitPage({route}: WorkspaceEditCardLimitPageProps) {
const errors = ValidationUtils.getFieldRequiredErrors(values, [INPUT_IDS.LIMIT]);

// We only want integers to be sent as the limit
if (!Number(values.limit) || !Number.isInteger(Number(values.limit))) {
if (!Number.isInteger(Number(values.limit))) {
errors.limit = translate('iou.error.invalidAmount');
}

Expand Down
2 changes: 1 addition & 1 deletion src/pages/workspace/members/WorkspaceMemberDetailsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ function WorkspaceMemberDetailsPage({personalDetails, policy, route}: WorkspaceM
{memberCards.map((card) => (
<MenuItem
title={card.nameValuePairs?.cardTitle}
badgeText={CurrencyUtils.convertAmountToDisplayString(card.nameValuePairs?.unapprovedExpenseLimit)}
badgeText={CurrencyUtils.convertToDisplayString(card.nameValuePairs?.unapprovedExpenseLimit)}
icon={ExpensifyCardImage}
displayInDefaultIconColor
iconStyles={styles.cardIcon}
Expand Down

0 comments on commit 92171d8

Please sign in to comment.