Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import type {ReimbursementAccountNavigatorParamList} from '@libs/Navigation/type
import {goBackFromInvalidPolicy, isPendingDeletePolicy, isPolicyAdmin} from '@libs/PolicyUtils';
import {getRouteForCurrentStep, hasInProgressUSDVBBA, hasInProgressVBBA} from '@libs/ReimbursementAccountUtils';
import shouldReopenOnfido from '@libs/shouldReopenOnfido';
import type {SkeletonSpanReasonAttributes} from '@libs/telemetry/useSkeletonSpan';
import {isFullScreenName} from '@navigation/helpers/isNavigatorName';
import type {WithPolicyOnyxProps} from '@pages/workspace/withPolicy';
import withPolicy from '@pages/workspace/withPolicy';
Expand Down Expand Up @@ -487,7 +488,11 @@ function ReimbursementAccountPage({route, policy, isLoadingPolicy, navigation}:
}

if (isLoadingPolicy) {
return <FullScreenLoadingIndicator />;
const loadingPolicyReasonAttributes: SkeletonSpanReasonAttributes = {
context: 'ReimbursementAccountPage',
isLoadingPolicy,
};
return <FullScreenLoadingIndicator reasonAttributes={loadingPolicyReasonAttributes} />;
}

// Show loading indicator when page is first time being opened and props.reimbursementAccount yet to be loaded from the server
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import useLocalize from '@hooks/useLocalize';
import useOnyx from '@hooks/useOnyx';
import useReimbursementAccountStepFormSubmit from '@hooks/useReimbursementAccountStepFormSubmit';
import type {SubStepProps} from '@hooks/useSubStep/types';
import type {SkeletonSpanReasonAttributes} from '@libs/telemetry/useSkeletonSpan';
import ONYXKEYS from '@src/ONYXKEYS';
import INPUT_IDS from '@src/types/form/ReimbursementAccountForm';
import isLoadingOnyxValue from '@src/types/utils/isLoadingOnyxValue';
Expand Down Expand Up @@ -41,7 +42,11 @@ function AddressBusiness({onNext, onMove, isEditing}: SubStepProps) {
});

if (isLoadingReimbursementAccount) {
return <FullScreenLoadingIndicator />;
const reasonAttributes: SkeletonSpanReasonAttributes = {
context: 'AddressBusiness',
isLoadingReimbursementAccount,
};
return <FullScreenLoadingIndicator reasonAttributes={reasonAttributes} />;
}

return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import useOnyx from '@hooks/useOnyx';
import useReimbursementAccountStepFormSubmit from '@hooks/useReimbursementAccountStepFormSubmit';
import type {SubStepProps} from '@hooks/useSubStep/types';
import useThemeStyles from '@hooks/useThemeStyles';
import type {SkeletonSpanReasonAttributes} from '@libs/telemetry/useSkeletonSpan';
import {getFieldRequiredErrors, isValidDate, isValidPastDate} from '@libs/ValidationUtils';
import ONYXKEYS from '@src/ONYXKEYS';
import INPUT_IDS from '@src/types/form/ReimbursementAccountForm';
Expand Down Expand Up @@ -50,7 +51,11 @@ function IncorporationDateBusiness({onNext, isEditing}: SubStepProps) {
});

if (isLoadingReimbursementAccount) {
return <FullScreenLoadingIndicator />;
const reasonAttributes: SkeletonSpanReasonAttributes = {
context: 'IncorporationDateBusiness',
isLoadingReimbursementAccount,
};
return <FullScreenLoadingIndicator reasonAttributes={reasonAttributes} />;
}

return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import useOnyx from '@hooks/useOnyx';
import useReimbursementAccountStepFormSubmit from '@hooks/useReimbursementAccountStepFormSubmit';
import type {SubStepProps} from '@hooks/useSubStep/types';
import useThemeStyles from '@hooks/useThemeStyles';
import type {SkeletonSpanReasonAttributes} from '@libs/telemetry/useSkeletonSpan';
import {getFieldRequiredErrors} from '@libs/ValidationUtils';
import ONYXKEYS from '@src/ONYXKEYS';
import INPUT_IDS from '@src/types/form/ReimbursementAccountForm';
Expand Down Expand Up @@ -40,7 +41,11 @@ function IncorporationStateBusiness({onNext, isEditing}: SubStepProps) {
});

if (isLoadingReimbursementAccount) {
return <FullScreenLoadingIndicator />;
const reasonAttributes: SkeletonSpanReasonAttributes = {
context: 'IncorporationStateBusiness',
isLoadingReimbursementAccount,
};
return <FullScreenLoadingIndicator reasonAttributes={reasonAttributes} />;
}

return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import useLocalize from '@hooks/useLocalize';
import useOnyx from '@hooks/useOnyx';
import useReimbursementAccountStepFormSubmit from '@hooks/useReimbursementAccountStepFormSubmit';
import type {SubStepProps} from '@hooks/useSubStep/types';
import type {SkeletonSpanReasonAttributes} from '@libs/telemetry/useSkeletonSpan';
import {getFieldRequiredErrors, isValidUSPhone} from '@libs/ValidationUtils';
import CONST from '@src/CONST';
import ONYXKEYS from '@src/ONYXKEYS';
Expand Down Expand Up @@ -44,7 +45,11 @@ function PhoneNumberBusiness({onNext, onMove, isEditing}: SubStepProps) {
});

if (isLoadingReimbursementAccount) {
return <FullScreenLoadingIndicator />;
const reasonAttributes: SkeletonSpanReasonAttributes = {
context: 'PhoneNumberBusiness',
isLoadingReimbursementAccount,
};
return <FullScreenLoadingIndicator reasonAttributes={reasonAttributes} />;
}

return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import useLocalize from '@hooks/useLocalize';
import useOnyx from '@hooks/useOnyx';
import useReimbursementAccountStepFormSubmit from '@hooks/useReimbursementAccountStepFormSubmit';
import type {SubStepProps} from '@hooks/useSubStep/types';
import type {SkeletonSpanReasonAttributes} from '@libs/telemetry/useSkeletonSpan';
import {getFieldRequiredErrors, isValidTaxID} from '@libs/ValidationUtils';
import CONST from '@src/CONST';
import ONYXKEYS from '@src/ONYXKEYS';
Expand Down Expand Up @@ -52,7 +53,11 @@ function TaxIdBusiness({onNext, onMove, isEditing}: SubStepProps) {
});

if (isLoadingReimbursementAccount) {
return <FullScreenLoadingIndicator />;
const reasonAttributes: SkeletonSpanReasonAttributes = {
context: 'TaxIdBusiness',
isLoadingReimbursementAccount,
};
return <FullScreenLoadingIndicator reasonAttributes={reasonAttributes} />;
}

return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import useOnyx from '@hooks/useOnyx';
import useReimbursementAccountStepFormSubmit from '@hooks/useReimbursementAccountStepFormSubmit';
import type {SubStepProps} from '@hooks/useSubStep/types';
import useThemeStyles from '@hooks/useThemeStyles';
import type {SkeletonSpanReasonAttributes} from '@libs/telemetry/useSkeletonSpan';
import {getFieldRequiredErrors} from '@libs/ValidationUtils';
import ONYXKEYS from '@src/ONYXKEYS';
import INPUT_IDS from '@src/types/form/ReimbursementAccountForm';
Expand Down Expand Up @@ -37,7 +38,11 @@ function TypeBusiness({onNext, isEditing}: SubStepProps) {
});

if (isLoadingReimbursementAccount) {
return <FullScreenLoadingIndicator />;
const reasonAttributes: SkeletonSpanReasonAttributes = {
context: 'TypeBusiness',
isLoadingReimbursementAccount,
};
return <FullScreenLoadingIndicator reasonAttributes={reasonAttributes} />;
}

return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import useOnyx from '@hooks/useOnyx';
import useReimbursementAccountStepFormSubmit from '@hooks/useReimbursementAccountStepFormSubmit';
import type {SubStepProps} from '@hooks/useSubStep/types';
import {getDefaultCompanyWebsite} from '@libs/BankAccountUtils';
import type {SkeletonSpanReasonAttributes} from '@libs/telemetry/useSkeletonSpan';
import {getFieldRequiredErrors, isValidWebsite} from '@libs/ValidationUtils';
import {addBusinessWebsiteForDraft} from '@userActions/BankAccounts';
import CONST from '@src/CONST';
Expand Down Expand Up @@ -51,7 +52,11 @@ function WebsiteBusiness({onNext, onMove, isEditing}: SubStepProps) {
});

if (isLoadingReimbursementAccount) {
return <FullScreenLoadingIndicator />;
const reasonAttributes: SkeletonSpanReasonAttributes = {
context: 'WebsiteBusiness',
isLoadingReimbursementAccount,
};
return <FullScreenLoadingIndicator reasonAttributes={reasonAttributes} />;
}

return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import useLocalize from '@hooks/useLocalize';
import useOnyx from '@hooks/useOnyx';
import useReimbursementAccountStepFormSubmit from '@hooks/useReimbursementAccountStepFormSubmit';
import type {SubStepProps} from '@hooks/useSubStep/types';
import type {SkeletonSpanReasonAttributes} from '@libs/telemetry/useSkeletonSpan';
import CONST from '@src/CONST';
import ONYXKEYS from '@src/ONYXKEYS';
import INPUT_IDS from '@src/types/form/ReimbursementAccountForm';
Expand Down Expand Up @@ -42,7 +43,11 @@ function Address({onNext, onMove, isEditing}: SubStepProps) {
});

if (isLoadingReimbursementAccount) {
return <FullScreenLoadingIndicator />;
const reasonAttributes: SkeletonSpanReasonAttributes = {
context: 'Address',
isLoadingReimbursementAccount,
};
return <FullScreenLoadingIndicator reasonAttributes={reasonAttributes} />;
}

return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import useOnyx from '@hooks/useOnyx';
import useReimbursementAccountStepFormSubmit from '@hooks/useReimbursementAccountStepFormSubmit';
import type {SubStepProps} from '@hooks/useSubStep/types';
import useThemeStyles from '@hooks/useThemeStyles';
import type {SkeletonSpanReasonAttributes} from '@libs/telemetry/useSkeletonSpan';
import HelpLinks from '@pages/ReimbursementAccount/USD/Requestor/PersonalInfo/HelpLinks';
import CONST from '@src/CONST';
import ONYXKEYS from '@src/ONYXKEYS';
Expand All @@ -32,7 +33,11 @@ function DateOfBirth({onNext, onMove, isEditing}: SubStepProps) {
});

if (isLoadingReimbursementAccount) {
return <FullScreenLoadingIndicator />;
const reasonAttributes: SkeletonSpanReasonAttributes = {
context: 'DateOfBirth',
isLoadingReimbursementAccount,
};
return <FullScreenLoadingIndicator reasonAttributes={reasonAttributes} />;
}

return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import useLocalize from '@hooks/useLocalize';
import useOnyx from '@hooks/useOnyx';
import useReimbursementAccountStepFormSubmit from '@hooks/useReimbursementAccountStepFormSubmit';
import type {SubStepProps} from '@hooks/useSubStep/types';
import type {SkeletonSpanReasonAttributes} from '@libs/telemetry/useSkeletonSpan';
import {getFieldRequiredErrors, isValidSSNLastFour} from '@libs/ValidationUtils';
import CONST from '@src/CONST';
import ONYXKEYS from '@src/ONYXKEYS';
Expand Down Expand Up @@ -43,7 +44,11 @@ function SocialSecurityNumber({onNext, onMove, isEditing}: SubStepProps) {
});

if (isLoadingReimbursementAccount) {
return <FullScreenLoadingIndicator />;
const reasonAttributes: SkeletonSpanReasonAttributes = {
context: 'SocialSecurityNumber',
isLoadingReimbursementAccount,
};
return <FullScreenLoadingIndicator reasonAttributes={reasonAttributes} />;
}

return (
Expand Down
Loading