diff --git a/src/languages/de.ts b/src/languages/de.ts index 344ef368b9284..7d1b5b408d564 100644 --- a/src/languages/de.ts +++ b/src/languages/de.ts @@ -7343,8 +7343,6 @@ Fordere Spesendetails wie Belege und Beschreibungen an, lege Limits und Standard }, distance: { addStop: 'Stopp hinzufügen', - deleteWaypoint: 'Wegpunkt löschen', - deleteWaypointConfirmation: 'Möchten Sie diesen Wegpunkt wirklich löschen?', address: 'Adresse', waypointDescription: { start: 'Starten', diff --git a/src/languages/en.ts b/src/languages/en.ts index 2a124f3ab950c..ccc07eedd1fd6 100644 --- a/src/languages/en.ts +++ b/src/languages/en.ts @@ -7236,8 +7236,6 @@ const translations = { }, distance: { addStop: 'Add stop', - deleteWaypoint: 'Delete waypoint', - deleteWaypointConfirmation: 'Are you sure you want to delete this waypoint?', address: 'Address', waypointDescription: { start: 'Start', diff --git a/src/languages/es.ts b/src/languages/es.ts index e9b4c09bf9c35..a7bf9d944fb62 100644 --- a/src/languages/es.ts +++ b/src/languages/es.ts @@ -7454,8 +7454,6 @@ ${amount} para ${merchant} - ${date}`, }, distance: { addStop: 'Añadir parada', - deleteWaypoint: 'Eliminar punto de ruta', - deleteWaypointConfirmation: '¿Estás seguro de que quieres eliminar este punto de ruta?', address: 'Dirección', waypointDescription: { start: 'Comienzo', diff --git a/src/languages/fr.ts b/src/languages/fr.ts index b3c0dd9a9a7cc..03f83743b37a8 100644 --- a/src/languages/fr.ts +++ b/src/languages/fr.ts @@ -7355,8 +7355,6 @@ Exigez des informations de dépense comme les reçus et les descriptions, défin }, distance: { addStop: 'Ajouter un arrêt', - deleteWaypoint: 'Supprimer le point de passage', - deleteWaypointConfirmation: 'Êtes-vous sûr de vouloir supprimer ce point de passage ?', address: 'Adresse', waypointDescription: { start: 'Commencer', diff --git a/src/languages/it.ts b/src/languages/it.ts index e7f7b22e32126..741c36a78e39c 100644 --- a/src/languages/it.ts +++ b/src/languages/it.ts @@ -7332,8 +7332,6 @@ Richiedi dettagli di spesa come ricevute e descrizioni, imposta limiti e valori }, distance: { addStop: 'Aggiungi fermata', - deleteWaypoint: 'Elimina punto intermedio', - deleteWaypointConfirmation: 'Sei sicuro di voler eliminare questo waypoint?', address: 'Indirizzo', waypointDescription: { start: 'Inizia', diff --git a/src/languages/ja.ts b/src/languages/ja.ts index f2a7a43a178d2..6d8e5456f5643 100644 --- a/src/languages/ja.ts +++ b/src/languages/ja.ts @@ -7270,8 +7270,6 @@ ${reportName} }, distance: { addStop: '経由地を追加', - deleteWaypoint: 'ウェイポイントを削除', - deleteWaypointConfirmation: 'このウェイポイントを削除してもよろしいですか?', address: '住所', waypointDescription: { start: '開始', diff --git a/src/languages/nl.ts b/src/languages/nl.ts index e8e128683f655..fb0f887f8d07c 100644 --- a/src/languages/nl.ts +++ b/src/languages/nl.ts @@ -7315,8 +7315,6 @@ Vraag verplichte uitgavedetails zoals bonnetjes en beschrijvingen, stel limieten }, distance: { addStop: 'Stop toevoegen', - deleteWaypoint: 'Waypoint verwijderen', - deleteWaypointConfirmation: 'Weet je zeker dat je dit waypoint wilt verwijderen?', address: 'Adres', waypointDescription: { start: 'Start', diff --git a/src/languages/pl.ts b/src/languages/pl.ts index 7205a50e84dc1..a2938c78f3df1 100644 --- a/src/languages/pl.ts +++ b/src/languages/pl.ts @@ -7303,8 +7303,6 @@ Wymagaj szczegółów wydatków, takich jak paragony i opisy, ustawiaj limity i }, distance: { addStop: 'Dodaj przystanek', - deleteWaypoint: 'Usuń punkt trasy', - deleteWaypointConfirmation: 'Czy na pewno chcesz usunąć ten punkt trasy?', address: 'Adres', waypointDescription: { start: 'Start', diff --git a/src/languages/pt-BR.ts b/src/languages/pt-BR.ts index d2c8d0c6a3bbd..9e815360af948 100644 --- a/src/languages/pt-BR.ts +++ b/src/languages/pt-BR.ts @@ -7304,8 +7304,6 @@ Exija detalhes de despesas como recibos e descrições, defina limites e padrõe }, distance: { addStop: 'Adicionar parada', - deleteWaypoint: 'Excluir ponto de passagem', - deleteWaypointConfirmation: 'Tem certeza de que deseja excluir este ponto de passagem?', address: 'Endereço', waypointDescription: { start: 'Iniciar', diff --git a/src/languages/zh-hans.ts b/src/languages/zh-hans.ts index f525cb5d5b333..b5e09378a3fca 100644 --- a/src/languages/zh-hans.ts +++ b/src/languages/zh-hans.ts @@ -7143,8 +7143,6 @@ ${reportName} }, distance: { addStop: '添加站点', - deleteWaypoint: '删除航路点', - deleteWaypointConfirmation: '您确定要删除此途经点吗?', address: '地址', waypointDescription: { start: '开始', diff --git a/src/pages/iou/request/step/IOURequestStepWaypoint.tsx b/src/pages/iou/request/step/IOURequestStepWaypoint.tsx index 755ab23b2a7c6..4df66f4a40740 100644 --- a/src/pages/iou/request/step/IOURequestStepWaypoint.tsx +++ b/src/pages/iou/request/step/IOURequestStepWaypoint.tsx @@ -5,14 +5,12 @@ import {View} from 'react-native'; import type {OnyxEntry} from 'react-native-onyx'; import AddressSearch from '@components/AddressSearch'; import FullPageNotFoundView from '@components/BlockingViews/FullPageNotFoundView'; +import Button from '@components/Button'; import FormProvider from '@components/Form/FormProvider'; import InputWrapperWithRef from '@components/Form/InputWrapper'; import type {FormOnyxValues} from '@components/Form/types'; import HeaderWithBackButton from '@components/HeaderWithBackButton'; -import {ModalActions} from '@components/Modal/Global/ModalContext'; import ScreenWrapper from '@components/ScreenWrapper'; -import useConfirmModal from '@hooks/useConfirmModal'; -import {useMemoizedLazyExpensifyIcons} from '@hooks/useLazyAsset'; import useLocalize from '@hooks/useLocalize'; import useLocationBias from '@hooks/useLocationBias'; import useNetwork from '@hooks/useNetwork'; @@ -77,8 +75,6 @@ function IOURequestStepWaypoint({ const waypointCount = Object.keys(allWaypoints).length; const filledWaypointCount = Object.values(allWaypoints).filter((waypoint) => !isEmptyObject(waypoint)).length; const [caretHidden, setCaretHidden] = useState(false); - const {showConfirmModal} = useConfirmModal(); - const expensifyIcons = useMemoizedLazyExpensifyIcons(['Trashcan'] as const); const [userLocation] = useOnyx(ONYXKEYS.USER_LOCATION, {canBeMissing: true}); const [recentWaypoints] = useOnyx(ONYXKEYS.NVP_RECENT_WAYPOINTS, {selector: recentWaypointsSelector, canBeMissing: true}); @@ -95,8 +91,6 @@ function IOURequestStepWaypoint({ const locationBias = useLocationBias(allWaypoints, userLocation); const waypointAddress = currentWaypoint.address ?? ''; - // Hide the menu when there is only start and finish waypoint - const shouldShowThreeDotsButton = waypointCount > 2 && !!waypointAddress; const shouldDisableEditor = isFocused && (Number.isNaN(parsedWaypointIndex) || parsedWaypointIndex < 0 || parsedWaypointIndex > waypointCount || (filledWaypointCount < 2 && parsedWaypointIndex >= waypointCount)); @@ -153,26 +147,6 @@ function IOURequestStepWaypoint({ goBack(); }; - const deleteStopAndHideModal = () => { - removeWaypoint(transaction, pageIndex, shouldUseTransactionDraft(action)); - goBack(); - }; - - const handleDeleteWaypoint = async () => { - const result = await showConfirmModal({ - title: translate('distance.deleteWaypoint'), - prompt: translate('distance.deleteWaypointConfirmation'), - confirmText: translate('common.delete'), - cancelText: translate('common.cancel'), - shouldEnableNewFocusManagement: true, - danger: true, - }); - if (result.action !== ModalActions.CONFIRM) { - return; - } - deleteStopAndHideModal(); - }; - const selectWaypoint = (values: Waypoint) => { const waypoint = { lat: values.lat, @@ -215,18 +189,7 @@ function IOURequestStepWaypoint({ title={translate(waypointDescriptionKey)} shouldShowBackButton onBackButtonPress={goBack} - shouldShowThreeDotsButton={shouldShowThreeDotsButton} shouldSetModalVisibility={false} - threeDotsMenuItems={[ - { - icon: expensifyIcons.Trashcan, - text: translate('distance.deleteWaypoint'), - onSelected: () => { - handleDeleteWaypoint(); - }, - shouldCallAfterModalHide: true, - }, - ]} /> { + removeWaypoint(transaction, pageIndex, shouldUseTransactionDraft(action)); + goBack(); + }} + large + /> + ) + } >