Skip to content
Open
Show file tree
Hide file tree
Changes from 5 commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
27a4684
multiple-inline-fields
DylanDylann Nov 5, 2026
327634b
Added currency picker modal and integrated currency handling in the …
DylanDylann Nov 5, 2026
7c387b5
remove beta flag
DylanDylann Nov 5, 2026
de9bd92
Remove billable and reimbursable fields and screens from the search e…
DylanDylann Nov 5, 2026
4e678b4
Add shouldDeferEmptySelectionError prop to AttendeePickerModal for de…
DylanDylann Nov 5, 2026
351ff59
Restore decimal validation comment and clean up code
DylanDylann Nov 5, 2026
5e3ef23
Enhance bulk edit functionality by updating negative amount validatio…
DylanDylann Nov 6, 2026
f4a55cb
Add reimbursable and billable toggle options in SearchEditMultiplePage
DylanDylann Nov 6, 2026
af066b8
Merge branch 'main' into dylann/101571-edit-multiple-inline-fields
DylanDylann Nov 10, 2026
1fba080
Add SearchEditMultipleAttendeePills component and integrate into Sear…
DylanDylann Nov 10, 2026
045bfa9
Add SearchEditMultipleBooleanDropdown component and integrate into Se…
DylanDylann Nov 11, 2026
9f2b105
Merge branch 'main' into dylann/101571-edit-multiple-inline-fields
DylanDylann Nov 11, 2026
66faea9
Update SearchEditMultiplePage to use lockedAmountTitle for amount dis…
DylanDylann Nov 11, 2026
475420a
Enhance AmountActionButtons with borderless style option and update S…
DylanDylann Nov 11, 2026
4cf5697
Merge branch 'main' into dylann/101571-edit-multiple-inline-fields
DylanDylann Nov 12, 2026
3221903
Update SearchEditMultipleBooleanDropdown to remove "Don't change" opt…
DylanDylann Nov 13, 2026
6eb7284
Merge branch 'main' into dylann/101571-edit-multiple-inline-fields
DylanDylann Nov 13, 2026
a8c8386
Refactor SearchEditMultiplePage tests to use mockShouldOpenInDropdown…
DylanDylann Nov 13, 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
9 changes: 9 additions & 0 deletions src/CONST/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10802,6 +10802,15 @@ const CONST = {
ATTENDEE_PICKER_MODAL: {
BACK_BUTTON: 'AttendeePickerModal-BackButton',
},
SEARCH_EDIT_MULTIPLE: {
AMOUNT_FIELD: 'SearchEditMultiple-AmountField',
MERCHANT_FIELD: 'SearchEditMultiple-MerchantField',
DATE_FIELD: 'SearchEditMultiple-DateField',
CATEGORY_FIELD: 'SearchEditMultiple-CategoryField',
TAG_FIELD: 'SearchEditMultiple-TagField',
TAX_RATE_FIELD: 'SearchEditMultiple-TaxRateField',
ATTENDEES_FIELD: 'SearchEditMultiple-AttendeesField',
},
CALENDAR_PICKER: {
YEAR_PICKER: 'CalendarPicker-YearPicker',
MONTH_PICKER: 'CalendarPicker-MonthPicker',
Expand Down
9 changes: 0 additions & 9 deletions src/ONYXKEYS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1428,12 +1428,6 @@ const ONYXKEYS = {
WORKSPACE_PER_DIEM_FORM_DRAFT: 'workspacePerDiemFormDraft',
ENABLE_GLOBAL_REIMBURSEMENTS: 'enableGlobalReimbursementsForm',
ENABLE_GLOBAL_REIMBURSEMENTS_DRAFT: 'enableGlobalReimbursementsFormDraft',
SEARCH_EDIT_MULTIPLE_DESCRIPTION_FORM: 'searchEditMultipleDescriptionForm',
SEARCH_EDIT_MULTIPLE_DESCRIPTION_FORM_DRAFT: 'searchEditMultipleDescriptionFormDraft',
SEARCH_EDIT_MULTIPLE_MERCHANT_FORM: 'searchEditMultipleMerchantForm',
SEARCH_EDIT_MULTIPLE_MERCHANT_FORM_DRAFT: 'searchEditMultipleMerchantFormDraft',
SEARCH_EDIT_MULTIPLE_DATE_FORM: 'searchEditMultipleDateForm',
SEARCH_EDIT_MULTIPLE_DATE_FORM_DRAFT: 'searchEditMultipleDateFormDraft',
CREATE_DOMAIN_FORM: 'createDomainForm',
CREATE_DOMAIN_FORM_DRAFT: 'createDomainFormDraft',
SPLIT_EXPENSE_EDIT_DATES: 'splitExpenseEditDates',
Expand Down Expand Up @@ -1621,9 +1615,6 @@ type OnyxFormValuesMapping = {
[ONYXKEYS.FORMS.WISE_BUSINESS_ONBOARDING_FORM]: FormTypes.WiseBusinessOnboardingForm;
[ONYXKEYS.FORMS.WORKSPACE_PER_DIEM_FORM]: FormTypes.WorkspacePerDiemForm;
[ONYXKEYS.FORMS.ENABLE_GLOBAL_REIMBURSEMENTS]: FormTypes.EnableGlobalReimbursementsForm;
[ONYXKEYS.FORMS.SEARCH_EDIT_MULTIPLE_DESCRIPTION_FORM]: FormTypes.SearchEditMultipleDescriptionForm;
[ONYXKEYS.FORMS.SEARCH_EDIT_MULTIPLE_MERCHANT_FORM]: FormTypes.SearchEditMultipleMerchantForm;
[ONYXKEYS.FORMS.SEARCH_EDIT_MULTIPLE_DATE_FORM]: FormTypes.SearchEditMultipleDateForm;
[ONYXKEYS.FORMS.CREATE_DOMAIN_FORM]: FormTypes.CreateDomainForm;
[ONYXKEYS.FORMS.SPLIT_EXPENSE_EDIT_DATES]: FormTypes.SplitExpenseEditDateForm;
[ONYXKEYS.FORMS.EXPENSE_RULE_FORM]: FormTypes.ExpenseRuleForm;
Expand Down
6 changes: 0 additions & 6 deletions src/ROUTES.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2440,17 +2440,11 @@ const ROUTES = {
},
SEARCH_REJECT_REASON_RHP: 'search/reject',
SEARCH_EDIT_MULTIPLE_TRANSACTIONS_RHP: 'search/edit-multiple-transactions',
SEARCH_EDIT_MULTIPLE_AMOUNT_RHP: 'search/edit-multiple/amount',
SEARCH_EDIT_MULTIPLE_DESCRIPTION_RHP: 'search/edit-multiple/description',
SEARCH_EDIT_MULTIPLE_MERCHANT_RHP: 'search/edit-multiple/merchant',
SEARCH_EDIT_MULTIPLE_DATE_RHP: 'search/edit-multiple/date',
SEARCH_EDIT_MULTIPLE_CATEGORY_RHP: 'search/edit-multiple/category',
SEARCH_EDIT_MULTIPLE_TAG_RHP: {
route: 'search/edit-multiple/tag/:tagListIndex',
getRoute: (tagListIndex = 0) => `search/edit-multiple/tag/${tagListIndex}` as const,
},
SEARCH_EDIT_MULTIPLE_BILLABLE_RHP: 'search/edit-multiple/billable',
SEARCH_EDIT_MULTIPLE_REIMBURSABLE_RHP: 'search/edit-multiple/reimbursable',
SEARCH_EDIT_MULTIPLE_ATTENDEES_RHP: 'search/edit-multiple/attendees',
SEARCH_EDIT_MULTIPLE_TAX_RHP: 'search/edit-multiple/tax',
MOVE_TRANSACTIONS_SEARCH_RHP: {
Expand Down
6 changes: 0 additions & 6 deletions src/SCREENS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,8 @@ const SCREENS = {
TRANSACTION_HOLD_REASON_SEARCH: 'Search_Transaction_Hold_Reason_Search',
SEARCH_REJECT_REASON_RHP: 'Search_Reject_Reason_RHP',
EDIT_MULTIPLE_TRANSACTIONS_RHP: 'Search_Edit_Multiple_Transactions_RHP',
EDIT_MULTIPLE_AMOUNT_RHP: 'Search_Edit_Multiple_Amount_RHP',
EDIT_MULTIPLE_DESCRIPTION_RHP: 'Search_Edit_Multiple_Description_RHP',
EDIT_MULTIPLE_MERCHANT_RHP: 'Search_Edit_Multiple_Merchant_RHP',
EDIT_MULTIPLE_DATE_RHP: 'Search_Edit_Multiple_Date_RHP',
EDIT_MULTIPLE_CATEGORY_RHP: 'Search_Edit_Multiple_Category_RHP',
EDIT_MULTIPLE_TAG_RHP: 'Search_Edit_Multiple_Tag_RHP',
EDIT_MULTIPLE_BILLABLE_RHP: 'Search_Edit_Multiple_Billable_RHP',
EDIT_MULTIPLE_REIMBURSABLE_RHP: 'Search_Edit_Multiple_Reimbursable_RHP',
EDIT_MULTIPLE_ATTENDEES_RHP: 'Search_Edit_Multiple_Attendees_RHP',
EDIT_MULTIPLE_TAX_RHP: 'Search_Edit_Multiple_Tax_RHP',
TRANSACTIONS_CHANGE_REPORT_SEARCH_RHP: 'Search_Transactions_Change_Report_Search',
Expand Down
6 changes: 5 additions & 1 deletion src/components/AttendeePicker/AttendeePickerModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ type AttendeePickerModalProps = {

/** Type of the expense, which the list's empty state is worded for */
iouType: IOUType;

/** Whether the empty-selection error waits for an apply attempt instead of showing as soon as the list opens */
shouldDeferEmptySelectionError?: boolean;
} & Omit<AnchoredSelectionListPopoverProps, 'optionCount' | 'isSearchable' | 'title' | 'backButtonSentryLabel' | 'headerActions' | 'children'>;

/**
Expand All @@ -42,7 +45,7 @@ type AttendeePickerModalProps = {
* container open, so the user can keep picking. The selection is applied with the Apply button at the bottom, as on
* the full page, where the button reads Save.
*/
function AttendeePickerModal({attendees, onAttendeesChanged, onApply, iouType, ...popoverProps}: AttendeePickerModalProps) {
function AttendeePickerModal({attendees, onAttendeesChanged, onApply, iouType, shouldDeferEmptySelectionError = false, ...popoverProps}: AttendeePickerModalProps) {
const {translate} = useLocalize();

return (
Expand All @@ -64,6 +67,7 @@ function AttendeePickerModal({attendees, onAttendeesChanged, onApply, iouType, .
searchInputLabel={translate('selectionList.searchForSomeone')}
confirmButtonText={translate('common.apply')}
confirmButtonSize={CONST.BUTTON_SIZE.MEDIUM}
shouldDeferEmptySelectionError={shouldDeferEmptySelectionError}
/>
</ScreenWrapperStatusContext.Provider>
</AnchoredSelectionListPopover>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import {
import {convertToBackendAmount, convertToFrontendAmountAsString, getLocalizedCurrencySymbol} from '@libs/CurrencyUtils';
import {canUseTouchScreen} from '@libs/DeviceCapabilities';
import {calculateAmount, isMovingTransactionFromTrackExpense, isP2PRecipient, isParticipantP2P} from '@libs/IOUUtils';
import {isConfirmationAmountMissing} from '@libs/MoneyRequestUtils';
import {getBackendAmountFromInput, isConfirmationAmountMissing} from '@libs/MoneyRequestUtils';
import Navigation from '@libs/Navigation/Navigation';
import {shouldEnableNegative} from '@libs/ReportUtils';
import {calculateTaxAmount, getTaxCode, getTaxValue, hasAnyManuallyEnteredScanField} from '@libs/TransactionUtils';
Expand Down Expand Up @@ -177,23 +177,6 @@ function AmountField({
setIsCurrencyPickerVisible(false);
};

const getBackendAmountFromInput = (value: string) => {
const isNegative = value.startsWith('-');
const cleanAmount = value.replace('-', '');

if (!cleanAmount || cleanAmount.trim() === '') {
return null;
}

const numericAmount = Number.parseFloat(cleanAmount);
if (Number.isNaN(numericAmount)) {
return null;
}

const absoluteBackendAmount = convertToBackendAmount(numericAmount);
return isNegative ? -absoluteBackendAmount : absoluteBackendAmount;
};

/**
* When the bill total or currency changes:
* - Editing an existing split bill: recompute shares on the split draft (`SPLIT_TRANSACTION_DRAFT`).
Expand Down
8 changes: 6 additions & 2 deletions src/components/TaxPicker/TaxPickerModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,16 @@ type TaxPickerModalProps = {

/** Called when the user confirms a tax rate. `shouldClearTax` asks to clear the tax instead, for a rate the workspace no longer has */
onSelected?: (tax: TaxRatesOption, shouldClearTax?: boolean) => void;

/** Whether tapping the rate already picked hands it to `onSelected` again, for a caller that clears it that way, rather than only closing the list */
allowDeselect?: boolean;
} & Omit<AnchoredSelectionListPopoverProps, 'optionCount' | 'isSearchable' | 'title' | 'backButtonSentryLabel' | 'headerActions' | 'children'>;

/**
* The tax rate list in a container anchored to a row: a pop-over on a wide layout, a bottom sheet on a narrow one.
* Picking a rate hands it to `onSelected` and closes the container, as the category and tag lists do.
*/
function TaxPickerModal({policyID, transactionID, selectedTaxRate, action, iouType, onSelected, onClose, ...popoverProps}: TaxPickerModalProps) {
function TaxPickerModal({policyID, transactionID, selectedTaxRate, action, iouType, onSelected, allowDeselect = false, onClose, ...popoverProps}: TaxPickerModalProps) {
const {translate} = useLocalize();

const [taxRatesSummary] = useOnyx(`${ONYXKEYS.COLLECTION.POLICY}${policyID}`, {selector: taxRatesSummarySelector});
Expand Down Expand Up @@ -73,8 +76,9 @@ function TaxPickerModal({policyID, transactionID, selectedTaxRate, action, iouTy
action={action}
iouType={iouType}
onSubmit={handleTaxRateSelected}
// Tapping the rate the expense already has leaves it alone, as the full-page selector does, and only closes the list.
// Unless the caller asks otherwise, tapping the rate the expense already has leaves it alone, as the full-page selector does, and only closes the list.
onDismiss={onClose}
allowDeselect={allowDeselect}
shouldAutoFocusSearchInput
/>
</AnchoredSelectionListPopover>
Expand Down
18 changes: 18 additions & 0 deletions src/libs/MoneyRequestUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,23 @@ function addLeadingZero(amount: string, shouldAllowNegative = false): string {
/**
* Check if amount is a decimal up to 3 digits
*/
/** The backend amount for what was typed in an inline amount field, or null when the field is empty or holds only a sign. */
Comment thread
DylanDylann marked this conversation as resolved.
Resolved
function getBackendAmountFromInput(value: string): number | null {
const isNegative = value.startsWith('-');
const cleanAmount = value.replace('-', '').trim();
if (!cleanAmount) {
return null;
}

const numericAmount = Number.parseFloat(cleanAmount);
if (Number.isNaN(numericAmount)) {
return null;
}

const absoluteBackendAmount = convertToBackendAmount(numericAmount);
return isNegative ? -absoluteBackendAmount : absoluteBackendAmount;
}

function validateAmount(amount: string, decimals: number, amountMaxLength: number = CONST.IOU.AMOUNT_MAX_LENGTH, shouldAllowNegative = false): boolean {
const regexString =
decimals === 0
Expand Down Expand Up @@ -290,6 +307,7 @@ function isConfirmationDateMissing(
}

export {
getBackendAmountFromInput,
addLeadingZero,
isConfirmationAmountMissing,
isConfirmationDateMissing,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1482,14 +1482,8 @@ const SearchReportActionsModalStackNavigator = createModalStackNavigator<SearchR
[SCREENS.SEARCH.CHANGE_APPROVER.ADD_APPROVER]: () => require<ReactComponentModule>('../../../../pages/Search/SearchAddApproverPage').default,
[SCREENS.SEARCH.CHANGE_APPROVER.REASSIGN_APPROVER]: () => require<ReactComponentModule>('../../../../pages/Search/SearchReassignApproverPage').default,
[SCREENS.SEARCH.EDIT_MULTIPLE_TRANSACTIONS_RHP]: () => require<ReactComponentModule>('../../../../pages/Search/SearchEditMultiple/SearchEditMultiplePage').default,
[SCREENS.SEARCH.EDIT_MULTIPLE_AMOUNT_RHP]: () => require<ReactComponentModule>('../../../../pages/Search/SearchEditMultiple/SearchEditMultipleAmountPage').default,
[SCREENS.SEARCH.EDIT_MULTIPLE_DESCRIPTION_RHP]: () => require<ReactComponentModule>('../../../../pages/Search/SearchEditMultiple/SearchEditMultipleDescriptionPage').default,
[SCREENS.SEARCH.EDIT_MULTIPLE_MERCHANT_RHP]: () => require<ReactComponentModule>('../../../../pages/Search/SearchEditMultiple/SearchEditMultipleMerchantPage').default,
[SCREENS.SEARCH.EDIT_MULTIPLE_DATE_RHP]: () => require<ReactComponentModule>('../../../../pages/Search/SearchEditMultiple/SearchEditMultipleDatePage').default,
[SCREENS.SEARCH.EDIT_MULTIPLE_CATEGORY_RHP]: () => require<ReactComponentModule>('../../../../pages/Search/SearchEditMultiple/SearchEditMultipleCategoryPage').default,
[SCREENS.SEARCH.EDIT_MULTIPLE_TAG_RHP]: () => require<ReactComponentModule>('../../../../pages/Search/SearchEditMultiple/SearchEditMultipleTagPage').default,
[SCREENS.SEARCH.EDIT_MULTIPLE_BILLABLE_RHP]: () => require<ReactComponentModule>('../../../../pages/Search/SearchEditMultiple/SearchEditMultipleBooleanPage').default,
[SCREENS.SEARCH.EDIT_MULTIPLE_REIMBURSABLE_RHP]: () => require<ReactComponentModule>('../../../../pages/Search/SearchEditMultiple/SearchEditMultipleBooleanPage').default,
[SCREENS.SEARCH.EDIT_MULTIPLE_TAX_RHP]: () => require<ReactComponentModule>('../../../../pages/Search/SearchEditMultiple/SearchEditMultipleTaxPage').default,
[SCREENS.SEARCH.EDIT_MULTIPLE_ATTENDEES_RHP]: () => require<ReactComponentModule>('../../../../pages/Search/SearchEditMultiple/SearchEditMultipleAttendeesPage').default,
});
Expand Down
6 changes: 0 additions & 6 deletions src/libs/Navigation/linkingConfig/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2128,14 +2128,8 @@ const config: LinkingOptions<RootNavigatorParamList>['config'] = {
},
[SCREENS.SEARCH.SEARCH_REJECT_REASON_RHP]: ROUTES.SEARCH_REJECT_REASON_RHP,
[SCREENS.SEARCH.EDIT_MULTIPLE_TRANSACTIONS_RHP]: ROUTES.SEARCH_EDIT_MULTIPLE_TRANSACTIONS_RHP,
[SCREENS.SEARCH.EDIT_MULTIPLE_AMOUNT_RHP]: ROUTES.SEARCH_EDIT_MULTIPLE_AMOUNT_RHP,
[SCREENS.SEARCH.EDIT_MULTIPLE_DESCRIPTION_RHP]: ROUTES.SEARCH_EDIT_MULTIPLE_DESCRIPTION_RHP,
[SCREENS.SEARCH.EDIT_MULTIPLE_MERCHANT_RHP]: ROUTES.SEARCH_EDIT_MULTIPLE_MERCHANT_RHP,
[SCREENS.SEARCH.EDIT_MULTIPLE_DATE_RHP]: ROUTES.SEARCH_EDIT_MULTIPLE_DATE_RHP,
[SCREENS.SEARCH.EDIT_MULTIPLE_CATEGORY_RHP]: ROUTES.SEARCH_EDIT_MULTIPLE_CATEGORY_RHP,
[SCREENS.SEARCH.EDIT_MULTIPLE_TAG_RHP]: ROUTES.SEARCH_EDIT_MULTIPLE_TAG_RHP.route,
[SCREENS.SEARCH.EDIT_MULTIPLE_BILLABLE_RHP]: ROUTES.SEARCH_EDIT_MULTIPLE_BILLABLE_RHP,
[SCREENS.SEARCH.EDIT_MULTIPLE_REIMBURSABLE_RHP]: ROUTES.SEARCH_EDIT_MULTIPLE_REIMBURSABLE_RHP,
[SCREENS.SEARCH.EDIT_MULTIPLE_ATTENDEES_RHP]: ROUTES.SEARCH_EDIT_MULTIPLE_ATTENDEES_RHP,
[SCREENS.SEARCH.EDIT_MULTIPLE_TAX_RHP]: ROUTES.SEARCH_EDIT_MULTIPLE_TAX_RHP,
[SCREENS.SEARCH.TRANSACTIONS_CHANGE_REPORT_SEARCH_RHP]: {
Expand Down
Loading
Loading