Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
58451eb
Add beta
ChavdaSachin Feb 27, 2026
bc70131
replace amount pushROw with inline input
ChavdaSachin Feb 27, 2026
88fa1f4
IOU confirmation - amount - replace push row with inline input
ChavdaSachin Mar 9, 2026
f0320cd
merge main
ChavdaSachin Mar 9, 2026
b0982e0
Add support for other expense types
ChavdaSachin Mar 11, 2026
844e2a2
Pass default values to avoid form errors
ChavdaSachin Mar 13, 2026
dfdc376
Fix padding
ChavdaSachin Mar 13, 2026
77eb253
Avoid losing focus input focus when flip button is clicked.
ChavdaSachin Mar 13, 2026
c3f9c11
Pass default values to avoid form errors
ChavdaSachin Mar 13, 2026
08f20bf
FIx scroll behavior on input focus for mobile-safari
ChavdaSachin Mar 13, 2026
1b5dedf
Lint, prettier, type
ChavdaSachin Mar 13, 2026
1000dd8
Merge remote-tracking branch 'upstream/main' into ManualExpense-flow-…
ChavdaSachin Mar 13, 2026
778cf84
lint
ChavdaSachin Mar 13, 2026
2207ae1
Type
ChavdaSachin Mar 13, 2026
3b983c1
Do not render the amount for new flow
ChavdaSachin Mar 13, 2026
fe5d695
undo unwanted changes
ChavdaSachin Mar 13, 2026
3bd7593
add condition
ChavdaSachin Mar 13, 2026
15d19e7
prettier
ChavdaSachin Mar 13, 2026
88d28ca
update the test for new flow
ChavdaSachin Mar 13, 2026
ce4c5e9
DIsable inline amount input for timeRequests
ChavdaSachin Mar 13, 2026
1957076
Merge main
ChavdaSachin Mar 16, 2026
9018845
Refine currency preservation logic
ChavdaSachin Mar 17, 2026
2d2cecf
Merge main
ChavdaSachin Mar 17, 2026
0b93ee8
FIx TS
ChavdaSachin Mar 17, 2026
3539ec7
DIsable amount field for time requests and distance requests.
ChavdaSachin Mar 18, 2026
12cf938
UI refinement: Use pushRow instead of inline input when field is disa…
ChavdaSachin Mar 18, 2026
72bb871
prettier
ChavdaSachin Mar 18, 2026
975a041
Pass correct currency code for each calculation.
ChavdaSachin Mar 18, 2026
8a6603a
Refactor manual expense flow: remove beta overrides and streamline am…
ChavdaSachin Mar 23, 2026
37e956f
cleanup
ChavdaSachin Mar 23, 2026
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
1 change: 1 addition & 0 deletions src/CONST/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -781,6 +781,7 @@ const CONST = {
PERSONAL_CARD_IMPORT: 'personalCardImport',
SUGGESTED_FOLLOWUPS: 'suggestedFollowups',
FREEZE_CARD: 'freezeCard',
NEW_MANUAL_EXPENSE_FLOW: 'newManualExpenseFlow',
},
BUTTON_STATES: {
DEFAULT: 'default',
Expand Down
5 changes: 5 additions & 0 deletions src/components/AmountTextInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ type AmountTextInputProps = {

/** Determines which keyboard to open */
keyboardType?: KeyboardTypeOptions;

/** Component to render on the right hand side of the input - only shown if clear button is not rendered */
rightHandSideComponent?: React.ReactNode;
} & Pick<BaseTextInputProps, 'autoFocus' | 'autoGrowExtraSpace' | 'submitBehavior' | 'ref' | 'onFocus' | 'onBlur' | 'disabled' | 'accessibilityLabel'>;

function AmountTextInput({
Expand All @@ -67,6 +70,7 @@ function AmountTextInput({
ref,
disabled,
accessibilityLabel,
rightHandSideComponent,
...rest
}: AmountTextInputProps) {
const navigation = useNavigation();
Expand Down Expand Up @@ -102,6 +106,7 @@ function AmountTextInput({
disableKeyboardShortcuts
shouldUseFullInputHeight
shouldApplyPaddingToContainer={shouldApplyPaddingToContainer}
rightHandSideComponent={rightHandSideComponent}
navigation={navigation}
// eslint-disable-next-line react/jsx-props-no-spreading
{...rest}
Expand Down
25 changes: 19 additions & 6 deletions src/components/MoneyRequestConfirmationList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,7 @@
const [lastSelectedDistanceRates] = useOnyx(ONYXKEYS.NVP_LAST_SELECTED_DISTANCE_RATES);
const {getCurrencySymbol, getCurrencyDecimals} = useCurrencyListActions();
const {isBetaEnabled} = usePermissions();
const isNewManualExpenseFlowEnabled = isBetaEnabled(CONST.BETAS.NEW_MANUAL_EXPENSE_FLOW);
const {isDelegateAccessRestricted} = useDelegateNoAccessState();
const {showDelegateNoAccessModal} = useDelegateNoAccessActions();

Expand Down Expand Up @@ -385,7 +386,6 @@

const distance = getDistanceInMeters(transaction, unit);
const prevDistance = usePrevious(distance);

const shouldCalculateDistanceAmount = isDistanceRequest && (iouAmount === 0 || prevRate !== rate || prevDistance !== distance || prevCurrency !== currency || prevUnit !== unit);

const shouldCalculatePerDiemAmount = isPerDiemRequest && (iouAmount === 0 || JSON.stringify(prevSubRates) !== JSON.stringify(subRates) || prevCurrency !== currency);
Expand Down Expand Up @@ -598,20 +598,22 @@
}
} else if (isTypeTrackExpense) {
text = translate('iou.createExpense');
if (iouAmount !== 0) {
if (iouAmount !== 0 && !isNewManualExpenseFlowEnabled) {
text = translate('iou.createExpenseWithAmount', {amount: formattedAmount});
}
} else if (isTypeSplit && iouAmount === 0) {
text = translate('iou.splitExpense');
} else if ((receiptPath && isTypeRequest) || isDistanceRequestWithPendingRoute || isPerDiemRequest) {
text = translate('iou.createExpense');
if (iouAmount !== 0) {
if (iouAmount !== 0 && !isNewManualExpenseFlowEnabled) {
text = translate('iou.createExpenseWithAmount', {amount: formattedAmount});
}
} else if (isTypeSplit) {
text = translate('iou.splitAmount', formattedAmount);
} else if (iouAmount === 0) {
text = translate('iou.createExpense');
} else if (isNewManualExpenseFlowEnabled) {
text = translate('iou.createExpense');
} else {
text = translate('iou.createExpenseWithAmount', {amount: formattedAmount});
}
Expand All @@ -635,6 +637,7 @@
policy,
translate,
formattedAmount,
isNewManualExpenseFlowEnabled,
]);

const onSplitShareChange = useCallback(
Expand Down Expand Up @@ -994,6 +997,15 @@
setFormError('iou.error.noParticipantSelected');
return;
}

const amountForValidation = iouAmount;
const isAmountMissingForManualFlow = amountForValidation === null || amountForValidation === undefined;

if (iouType !== CONST.IOU.TYPE.PAY && isNewManualExpenseFlowEnabled && isAmountMissingForManualFlow) {
setFormError('common.error.invalidAmount');
return;
}

if (!isEditingSplitBill && isMerchantRequired && (isMerchantEmpty || (shouldDisplayFieldError && isMerchantMissing(transaction)))) {
setFormError('iou.error.invalidMerchant');
return;
Expand Down Expand Up @@ -1112,7 +1124,7 @@
isMerchantRequired,
isMerchantEmpty,
shouldDisplayFieldError,
shouldShowTax,

Check warning on line 1127 in src/components/MoneyRequestConfirmationList.tsx

View workflow job for this annotation

GitHub Actions / ESLint check

React Hook useCallback has a missing dependency: 'isNewManualExpenseFlowEnabled'. Either include it or remove the dependency array

Check warning on line 1127 in src/components/MoneyRequestConfirmationList.tsx

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

React Hook useCallback has a missing dependency: 'isNewManualExpenseFlowEnabled'. Either include it or remove the dependency array
transaction,
policyTags,
isPerDiemRequest,
Expand Down Expand Up @@ -1252,7 +1264,9 @@
confirm,
iouCurrencyCode,
policyID,
reportID,
isConfirmed,
isConfirming,
splitOrRequestOptions,
errorMessage,
expensesNumber,
Expand All @@ -1264,8 +1278,6 @@
styles.productTrainingTooltipWrapper,
shouldShowProductTrainingTooltip,
renderProductTrainingTooltip,
isConfirming,
reportID,
]);

const isCompactMode = useMemo(() => !showMoreFields && isScanRequest, [isScanRequest, showMoreFields]);
Expand All @@ -1282,9 +1294,10 @@
<View style={isCompactMode ? styles.flex1 : undefined}>
<MoneyRequestConfirmationListFooter
action={action}
currency={currency}
distanceRateCurrency={currency}
didConfirm={!!didConfirm}
distance={distance}
amount={amountToBeUsed}
formattedAmount={formattedAmount}
formattedAmountPerAttendee={formattedAmountPerAttendee}
formError={formError}
Expand Down
Loading
Loading