diff --git a/assets/images/product-illustrations/modal-hold-or-reject.svg b/assets/images/product-illustrations/modal-hold-or-reject.svg deleted file mode 100644 index b83dee8a6ad2d..0000000000000 --- a/assets/images/product-illustrations/modal-hold-or-reject.svg +++ /dev/null @@ -1,351 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/assets/images/simple-illustrations/simple-illustration__thumbsdown.svg b/assets/images/simple-illustrations/simple-illustration__thumbsdown.svg deleted file mode 100644 index 42087f64ef037..0000000000000 --- a/assets/images/simple-illustrations/simple-illustration__thumbsdown.svg +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/assets/images/thumbs-down.svg b/assets/images/thumbs-down.svg deleted file mode 100644 index a03b824aa9f21..0000000000000 --- a/assets/images/thumbs-down.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/cspell.json b/cspell.json index 9760b5aa56443..32846960fbe89 100644 --- a/cspell.json +++ b/cspell.json @@ -140,7 +140,6 @@ "debitamount", "deburr", "deburred", - "REJECTEDTRANSACTION", "Deel", "deeplink", "deeplinked", @@ -357,7 +356,6 @@ "marcaaron", "Marcin", "margelo", - "MARKASRESOLVED", "Marqeta", "mateusz", "McAfee", @@ -544,7 +542,6 @@ "Reimbursments", "remotedesktop", "remotesync", - "REPORTPREVIEW", "requestee", "Resawing", "resizeable", diff --git a/src/CONST/index.ts b/src/CONST/index.ts index 301b0403f5244..9434dc2494739 100755 --- a/src/CONST/index.ts +++ b/src/CONST/index.ts @@ -1116,7 +1116,6 @@ const CONST = { DELETE: 'delete', RETRACT: 'retract', ADD_EXPENSE: 'addExpense', - REJECT: 'reject', SPLIT: 'split', REOPEN: 'reopen', EXPORT: 'export', @@ -1131,14 +1130,12 @@ const CONST = { REMOVE_HOLD: 'removeHold', REVIEW_DUPLICATES: 'reviewDuplicates', MARK_AS_CASH: 'markAsCash', - MARK_AS_RESOLVED: 'markAsResolved', ADD_EXPENSE: 'addExpense', }, TRANSACTION_PRIMARY_ACTIONS: { REMOVE_HOLD: 'removeHold', REVIEW_DUPLICATES: 'reviewDuplicates', MARK_AS_CASH: 'markAsCash', - MARK_AS_RESOLVED: 'markAsResolved', }, REPORT_PREVIEW_ACTIONS: { VIEW: 'view', @@ -1155,7 +1152,6 @@ const CONST = { SPLIT: 'split', VIEW_DETAILS: 'viewDetails', DELETE: 'delete', - REJECT: 'reject', MERGE: 'merge', }, ADD_EXPENSE_OPTIONS: { @@ -1327,8 +1323,6 @@ const CONST = { LEAVE_ROOM: 'LEAVEROOM', UPDATE_ROOM_DESCRIPTION: 'UPDATEROOMDESCRIPTION', }, - REJECTEDTRANSACTION_THREAD: 'REJECTEDTRANSACTION_THREAD', - REJECTED_TRANSACTION_MARKASRESOLVED: 'REJECTEDTRANSACTIONMARKASRESOLVED', }, THREAD_DISABLED: ['CREATED'], LATEST_MESSAGES_PILL_SCROLL_OFFSET_THRESHOLD: 2000, @@ -2787,7 +2781,7 @@ const CONST = { PAY: 'pay', CREATE: 'create', SPLIT: 'split', - REJECT: 'reject', + DECLINE: 'decline', CANCEL: 'cancel', DELETE: 'delete', APPROVE: 'approve', diff --git a/src/ONYXKEYS.ts b/src/ONYXKEYS.ts index 91ee1be3ad304..95b83bc5a5e60 100755 --- a/src/ONYXKEYS.ts +++ b/src/ONYXKEYS.ts @@ -255,9 +255,6 @@ const ONYXKEYS = { /** If the user should see the team 2025 subscription pricing */ NVP_PRIVATE_MANUAL_TEAM_2025_PRICING: 'nvp_private_manualTeam2025Pricing', - /** If the user dismissed the reject explanation */ - NVP_DISMISSED_REJECT_USE_EXPLANATION: 'nvp_dismissedRejectUseExplanation', - /** Details on whether an account is locked or not */ NVP_PRIVATE_LOCK_ACCOUNT_DETAILS: 'nvp_private_lockAccountDetails', @@ -778,8 +775,6 @@ const ONYXKEYS = { MONEY_REQUEST_DATE_FORM_DRAFT: 'moneyRequestCreatedFormDraft', MONEY_REQUEST_HOLD_FORM: 'moneyHoldReasonForm', MONEY_REQUEST_HOLD_FORM_DRAFT: 'moneyHoldReasonFormDraft', - MONEY_REQUEST_REJECT_FORM: 'moneyRejectReasonForm', - MONEY_REQUEST_REJECT_FORM_DRAFT: 'moneyRejectReasonFormDraft', MONEY_REQUEST_COMPANY_INFO_FORM: 'moneyRequestCompanyInfoForm', MONEY_REQUEST_COMPANY_INFO_FORM_DRAFT: 'moneyRequestCompanyInfoFormDraft', MONEY_REQUEST_TIME_FORM: 'moneyRequestTimeForm', @@ -953,7 +948,6 @@ type OnyxFormValuesMapping = { [ONYXKEYS.FORMS.MONEY_REQUEST_TIME_FORM]: FormTypes.MoneyRequestTimeForm; [ONYXKEYS.FORMS.MONEY_REQUEST_SUBRATE_FORM]: FormTypes.MoneyRequestSubrateForm; [ONYXKEYS.FORMS.MONEY_REQUEST_HOLD_FORM]: FormTypes.MoneyRequestHoldReasonForm; - [ONYXKEYS.FORMS.MONEY_REQUEST_REJECT_FORM]: FormTypes.MoneyRequestRejectReasonForm; [ONYXKEYS.FORMS.MONEY_REQUEST_COMPANY_INFO_FORM]: FormTypes.MoneyRequestCompanyInfoForm; [ONYXKEYS.FORMS.NEW_CONTACT_METHOD_FORM]: FormTypes.NewContactMethodForm; [ONYXKEYS.FORMS.WAYPOINT_FORM]: FormTypes.WaypointForm; @@ -1261,7 +1255,6 @@ type OnyxValuesMapping = { [ONYXKEYS.SHOULD_BILL_WHEN_DOWNGRADING]: boolean | undefined; [ONYXKEYS.BILLING_RECEIPT_DETAILS]: OnyxTypes.BillingReceiptDetails; [ONYXKEYS.NVP_SIDE_PANEL]: OnyxTypes.SidePanel; - [ONYXKEYS.NVP_DISMISSED_REJECT_USE_EXPLANATION]: boolean; [ONYXKEYS.NVP_PRIVATE_VACATION_DELEGATE]: OnyxTypes.VacationDelegate; [ONYXKEYS.SCHEDULE_CALL_DRAFT]: OnyxTypes.ScheduleCallDraft; [ONYXKEYS.IS_FORCED_TO_CHANGE_CURRENCY]: boolean | undefined; diff --git a/src/ROUTES.ts b/src/ROUTES.ts index 46b60effdd9c5..94608c6bdbaad 100644 --- a/src/ROUTES.ts +++ b/src/ROUTES.ts @@ -3183,10 +3183,6 @@ const ROUTES = { route: 'debug/transaction/:transactionID/violations/:index/json', getRoute: (transactionID: string, index: string) => `debug/transaction/${transactionID}/violations/${index}/json` as const, }, - REJECT_MONEY_REQUEST_REASON: { - route: 'reject/reason/:transactionID', - getRoute: (transactionID: string, reportID: string, backTo?: string) => `reject/reason/${transactionID}?reportID=${reportID}&backTo=${backTo}` as const, - }, SCHEDULE_CALL_BOOK: { route: 'r/:reportID/schedule-call/book', getRoute: (reportID: string) => `r/${reportID}/schedule-call/book` as const, diff --git a/src/SCREENS.ts b/src/SCREENS.ts index 60c331502b725..d971643b5dae9 100644 --- a/src/SCREENS.ts +++ b/src/SCREENS.ts @@ -252,7 +252,6 @@ const SCREENS = { MONEY_REQUEST: { CREATE: 'Money_Request_Create', HOLD: 'Money_Request_Hold_Reason', - REJECT: 'Money_Request_Reject_Reason', STEP_CONFIRMATION: 'Money_Request_Step_Confirmation', START: 'Money_Request_Start', STEP_UPGRADE: 'Money_Request_Step_Upgrade', diff --git a/src/components/HoldOrRejectEducationalModal.tsx b/src/components/HoldOrRejectEducationalModal.tsx deleted file mode 100644 index 1a2866ac50104..0000000000000 --- a/src/components/HoldOrRejectEducationalModal.tsx +++ /dev/null @@ -1,90 +0,0 @@ -import React from 'react'; -import {View} from 'react-native'; -import useBeforeRemove from '@hooks/useBeforeRemove'; -import useLocalize from '@hooks/useLocalize'; -import useThemeStyles from '@hooks/useThemeStyles'; -import variables from '@styles/variables'; -import CONST from '@src/CONST'; -import type {TranslationPaths} from '@src/languages/types'; -import type IconAsset from '@src/types/utils/IconAsset'; -import FeatureTrainingModal from './FeatureTrainingModal'; -import Icon from './Icon'; -import * as Illustrations from './Icon/Illustrations'; -import Text from './Text'; - -type SectionMenuItem = { - /** The icon supplied with the section */ - icon: IconAsset; - - /** Translation key for the title */ - titleTranslationKey: TranslationPaths; -}; - -type HoldOrRejectEducationalModalProps = { - /** Method to trigger when pressing outside of the popover menu to close it */ - onClose: () => void; - - /** Method to trigger when pressing confirm button */ - onConfirm: () => void; -}; - -const menuSections: SectionMenuItem[] = [ - { - icon: Illustrations.Stopwatch, - titleTranslationKey: 'iou.reject.holdExpenseTitle', - }, - { - icon: Illustrations.RealtimeReport, - titleTranslationKey: 'iou.reject.heldExpenseLeftBehindTitle', - }, - { - icon: Illustrations.ThumbsDown, - titleTranslationKey: 'iou.reject.rejectExpenseTitle', - }, -]; - -function HoldOrRejectEducationalModal({onClose, onConfirm}: HoldOrRejectEducationalModalProps) { - const {translate} = useLocalize(); - const styles = useThemeStyles(); - - useBeforeRemove(onClose); - - return ( - - <> - {menuSections.map((section) => ( - - - {translate(section.titleTranslationKey)} - - ))} - - - ); -} - -HoldOrRejectEducationalModal.displayName = 'HoldOrRejectEducationalModal'; - -export default HoldOrRejectEducationalModal; diff --git a/src/components/Icon/Expensicons.ts b/src/components/Icon/Expensicons.ts index f39b33a3dd768..7ed79bfe5e59a 100644 --- a/src/components/Icon/Expensicons.ts +++ b/src/components/Icon/Expensicons.ts @@ -222,7 +222,6 @@ import Tag from '@assets/images/tag.svg'; import Task from '@assets/images/task.svg'; import Thread from '@assets/images/thread.svg'; import ThreeDots from '@assets/images/three-dots.svg'; -import ThumbsDown from '@assets/images/thumbs-down.svg'; import ThumbsUp from '@assets/images/thumbs-up.svg'; import Train from '@assets/images/train.svg'; import Transfer from '@assets/images/transfer.svg'; @@ -484,7 +483,6 @@ export { EmptySquare, CheckSquare, Minus, - ThumbsDown, UserLock, EmptyStateSpyPigeon, MicrosoftDynamicsExport, diff --git a/src/components/Icon/Illustrations.ts b/src/components/Icon/Illustrations.ts index ccdaf13299d38..ac02d41fecde5 100644 --- a/src/components/Icon/Illustrations.ts +++ b/src/components/Icon/Illustrations.ts @@ -51,7 +51,6 @@ import JewelBoxGreen from '@assets/images/product-illustrations/jewel-box--green import JewelBoxPink from '@assets/images/product-illustrations/jewel-box--pink.svg'; import JewelBoxYellow from '@assets/images/product-illustrations/jewel-box--yellow.svg'; import MagicCode from '@assets/images/product-illustrations/magic-code.svg'; -import ModalHoldOrReject from '@assets/images/product-illustrations/modal-hold-or-reject.svg'; import MoneyEnvelopeBlue from '@assets/images/product-illustrations/money-envelope--blue.svg'; import MoneyMousePink from '@assets/images/product-illustrations/money-mouse--pink.svg'; import MushroomTopHat from '@assets/images/product-illustrations/mushroom-top-hat.svg'; @@ -153,7 +152,6 @@ import SubscriptionAnnual from '@assets/images/simple-illustrations/simple-illus import SubscriptionPPU from '@assets/images/simple-illustrations/simple-illustration__subscription-ppu.svg'; import Tag from '@assets/images/simple-illustrations/simple-illustration__tag.svg'; import TeachersUnite from '@assets/images/simple-illustrations/simple-illustration__teachers-unite.svg'; -import ThumbsDown from '@assets/images/simple-illustrations/simple-illustration__thumbsdown.svg'; import ThumbsUpStars from '@assets/images/simple-illustrations/simple-illustration__thumbsupstars.svg'; import Tire from '@assets/images/simple-illustrations/simple-illustration__tire.svg'; import TrackShoe from '@assets/images/simple-illustrations/simple-illustration__track-shoe.svg'; @@ -328,8 +326,6 @@ export { Flash, ExpensifyMobileApp, ReportReceipt, - ModalHoldOrReject, - ThumbsDown, PlaidCompanyCardDetailLarge, PlaidCompanyCardDetail, ReceiptsStackedOnPin, diff --git a/src/components/MoneyReportHeader.tsx b/src/components/MoneyReportHeader.tsx index 8a87641d45dc0..385354b1c9c53 100644 --- a/src/components/MoneyReportHeader.tsx +++ b/src/components/MoneyReportHeader.tsx @@ -18,7 +18,6 @@ import useSelectedTransactionsActions from '@hooks/useSelectedTransactionsAction import useTheme from '@hooks/useTheme'; import useThemeStyles from '@hooks/useThemeStyles'; import useTransactionsAndViolationsForReport from '@hooks/useTransactionsAndViolationsForReport'; -import useTransactionViolations from '@hooks/useTransactionViolations'; import {setupMergeTransactionData} from '@libs/actions/MergeTransaction'; import {turnOffMobileSelectionMode} from '@libs/actions/MobileSelectionMode'; import { @@ -44,7 +43,7 @@ import {isSecondaryActionAPaymentOption, selectPaymentType} from '@libs/PaymentU import type {KYCFlowEvent, TriggerKYCFlow} from '@libs/PaymentUtils'; import {getConnectedIntegration, getValidConnectedIntegration} from '@libs/PolicyUtils'; import {getIOUActionForReportID, getOriginalMessage, getReportAction, isMoneyRequestAction} from '@libs/ReportActionsUtils'; -import {getAllExpensesToHoldIfApplicable, getReportPrimaryAction, isMarkAsResolvedAction} from '@libs/ReportPrimaryActionUtils'; +import {getAllExpensesToHoldIfApplicable, getReportPrimaryAction} from '@libs/ReportPrimaryActionUtils'; import {getSecondaryExportReportActions, getSecondaryReportActions} from '@libs/ReportSecondaryActionUtils'; import { changeMoneyRequestHoldStatus, @@ -64,7 +63,6 @@ import { isReportOwner, navigateOnDeleteExpense, navigateToDetailsPage, - rejectMoneyRequestReason, } from '@libs/ReportUtils'; import {shouldRestrictUserBillableActions} from '@libs/SubscriptionUtils'; import { @@ -86,10 +84,8 @@ import { cancelPayment, canIOUBePaid as canIOUBePaidAction, deleteMoneyRequest, - dismissRejectUseExplanation, getNavigationUrlOnMoneyRequestDelete, initSplitExpense, - markRejectViolationAsResolved, payInvoice, payMoneyRequest, reopenReport, @@ -118,7 +114,6 @@ import DecisionModal from './DecisionModal'; import {DelegateNoAccessContext} from './DelegateNoAccessModalProvider'; import Header from './Header'; import HeaderWithBackButton from './HeaderWithBackButton'; -import HoldOrRejectEducationalModal from './HoldOrRejectEducationalModal'; import Icon from './Icon'; import * as Expensicons from './Icon/Expensicons'; import KYCWall from './KYCWall'; @@ -231,10 +226,7 @@ function MoneyReportHeader({ const [transaction] = useOnyx(`${ONYXKEYS.COLLECTION.TRANSACTION}${getNonEmptyStringOnyxID(iouTransactionID)}`, { canBeMissing: true, }); - - const [dismissedRejectUseExplanation] = useOnyx(ONYXKEYS.NVP_DISMISSED_REJECT_USE_EXPLANATION, {canBeMissing: true}); const [dismissedHoldUseExplanation, dismissedHoldUseExplanationResult] = useOnyx(ONYXKEYS.NVP_DISMISSED_HOLD_USE_EXPLANATION, {canBeMissing: true}); - const isLoadingHoldUseExplained = isLoadingOnyxValue(dismissedHoldUseExplanationResult); const [invoiceReceiverPolicy] = useOnyx( `${ONYXKEYS.COLLECTION.POLICY}${chatReport?.invoiceReceiver && 'policyID' in chatReport.invoiceReceiver ? chatReport.invoiceReceiver.policyID : undefined}`, @@ -251,7 +243,6 @@ function MoneyReportHeader({ return getIntegrationNameFromExportMessageUtils(reportActions); }, [isExported, reportActions]); - const transactionViolations = useTransactionViolations(transaction?.transactionID); const [downloadErrorModalVisible, setDownloadErrorModalVisible] = useState(false); const [isCancelPaymentModalVisible, setIsCancelPaymentModalVisible] = useState(false); const [isDeleteExpenseModalVisible, setIsDeleteExpenseModalVisible] = useState(false); @@ -317,7 +308,6 @@ function MoneyReportHeader({ const isInvoiceReport = isInvoiceReportUtil(moneyRequestReport); const [isDownloadErrorModalVisible, setIsDownloadErrorModalVisible] = useState(false); - const [isRejectEducationalModalVisible, setIsRejectEducationalModalVisible] = useState(false); const {selectedTransactionIDs, removeTransaction, clearSelectedTransactions, currentSearchQueryJSON, currentSearchKey} = useSearchContext(); @@ -372,16 +362,8 @@ function MoneyReportHeader({ const isFromPaidPolicy = policyType === CONST.POLICY.TYPE.TEAM || policyType === CONST.POLICY.TYPE.CORPORATE; const hasDuplicates = hasDuplicateTransactions(moneyRequestReport?.reportID); - const shouldShowMarkAsResolved = isMarkAsResolvedAction(moneyRequestReport, transactionViolations); const shouldShowStatusBar = - hasAllPendingRTERViolations || - shouldShowBrokenConnectionViolation || - hasOnlyHeldExpenses || - hasScanningReceipt || - isPayAtEndExpense || - hasOnlyPendingTransactions || - hasDuplicates || - shouldShowMarkAsResolved; + hasAllPendingRTERViolations || shouldShowBrokenConnectionViolation || hasOnlyHeldExpenses || hasScanningReceipt || isPayAtEndExpense || hasOnlyPendingTransactions || hasDuplicates; // When prevent self-approval is enabled & the current user is submitter AND they're submitting to themselves, we need to show the optimistic next step // We should always show this optimistic message for policies with preventSelfApproval @@ -486,10 +468,6 @@ function MoneyReportHeader({ ); const getStatusBarProps: () => MoneyRequestHeaderStatusBarProps | undefined = () => { - if (shouldShowMarkAsResolved) { - return {icon: getStatusIcon(Expensicons.Hourglass), description: translate('iou.reject.rejectedStatus')}; - } - if (isPayAtEndExpense) { if (!isArchivedReport) { return {icon: getStatusIcon(Expensicons.Hourglass), description: translate('iou.bookingPendingDescription')}; @@ -498,7 +476,6 @@ function MoneyReportHeader({ return {icon: getStatusIcon(Expensicons.Box), description: translate('iou.bookingArchivedDescription')}; } } - if (hasOnlyHeldExpenses) { return {icon: getStatusIcon(Expensicons.Stopwatch), description: translate(transactions.length > 1 ? 'iou.expensesOnHold' : 'iou.expenseOnHold')}; } @@ -540,13 +517,6 @@ function MoneyReportHeader({ }; const statusBarProps = getStatusBarProps(); - const dismissModalAndUpdateUseReject = () => { - setIsRejectEducationalModalVisible(false); - dismissRejectUseExplanation(); - if (requestParentReportAction) { - rejectMoneyRequestReason(requestParentReportAction); - } - }; useEffect(() => { // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing @@ -853,18 +823,6 @@ function MoneyReportHeader({ onPress={markAsCash} /> ), - [CONST.REPORT.TRANSACTION_PRIMARY_ACTIONS.MARK_AS_RESOLVED]: ( -