Skip to content

Commit

Permalink
fix: minor maning improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
koko57 committed Feb 25, 2025
1 parent 37877ee commit 58ad96f
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions src/libs/CardUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -522,13 +522,13 @@ function hasCardListObject(workspaceAccountID: number, feedName: CompanyCardFeed
}

/**
* Check if the Expensify Card is fully setup and a new card can be issued
* Check if the Expensify Card is fully set up and a new card can be issued
*
* @param policy the policy object
* @param cardSettings the card settings object
* @returns boolean
*/
function isExpensifyCardFullySetup(policy?: OnyxEntry<Policy>, cardSettings?: OnyxEntry<ExpensifyCardSettings>): boolean {
function isExpensifyCardFullySetUp(policy?: OnyxEntry<Policy>, cardSettings?: OnyxEntry<ExpensifyCardSettings>): boolean {
return !!(policy?.areExpensifyCardsEnabled && cardSettings?.paymentBankAccountID);
}

Expand Down Expand Up @@ -571,5 +571,5 @@ export {
flatAllCardsList,
checkIfFeedConnectionIsBroken,
hasCardListObject,
isExpensifyCardFullySetup,
isExpensifyCardFullySetUp,
};
4 changes: 2 additions & 2 deletions src/pages/workspace/accounting/PolicyAccountingPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import {getRouteParamForConnection} from '@libs/AccountingUtils';
import {isAuthenticationError, isConnectionInProgress, isConnectionUnverified, removePolicyConnection, syncConnection} from '@libs/actions/connections';
import {getAssignedSupportData} from '@libs/actions/Policy/Policy';
import {getConciergeReportID} from '@libs/actions/Report';
import {isExpensifyCardFullySetup} from '@libs/CardUtils';
import {isExpensifyCardFullySetUp} from '@libs/CardUtils';
import {
areSettingsInErrorFields,
findCurrentXeroOrganization,
Expand Down Expand Up @@ -119,7 +119,7 @@ function PolicyAccountingPage({policy}: PolicyAccountingPageProps) {
const currentXeroOrganization = findCurrentXeroOrganization(tenants, policy?.connections?.xero?.config?.tenantID);
const shouldShowSynchronizationError = !!synchronizationError;
const shouldShowReinstallConnectorMenuItem = shouldShowSynchronizationError && connectedIntegration === CONST.POLICY.CONNECTIONS.NAME.QBD;
const shouldShowCardReconciliationOption = isExpensifyCardFullySetup(policy, cardSettings);
const shouldShowCardReconciliationOption = isExpensifyCardFullySetUp(policy, cardSettings);

const overflowMenu: ThreeDotsMenuProps['menuItems'] = useMemo(
() => [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import TextLink from '@components/TextLink';
import useLocalize from '@hooks/useLocalize';
import useThemeStyles from '@hooks/useThemeStyles';
import * as AccountingUtils from '@libs/AccountingUtils';
import {isExpensifyCardFullySetup} from '@libs/CardUtils';
import {isExpensifyCardFullySetUp} from '@libs/CardUtils';
import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types';
import Navigation from '@navigation/Navigation';
import type {SettingsNavigatorParamList} from '@navigation/types';
Expand Down Expand Up @@ -44,7 +44,7 @@ function CardReconciliationPage({policy, route}: CardReconciliationPageProps) {
const {connection} = route.params;
const connectionName = AccountingUtils.getConnectionNameFromRouteParam(connection) as ConnectionName;
const autoSync = !!policy?.connections?.[connectionName]?.config?.autoSync?.enabled;
const shouldShow = isExpensifyCardFullySetup(policy, cardSettings);
const shouldShow = isExpensifyCardFullySetUp(policy, cardSettings);

const toggleContinuousReconciliation = (value: boolean) => {
Card.toggleContinuousReconciliation(workspaceAccountID, value, connectionName, currentConnectionName);
Expand Down
4 changes: 2 additions & 2 deletions src/pages/workspace/members/WorkspaceMemberNewCardPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import {
hasCardListObject,
hasOnlyOneCardToAssign,
isCustomFeed,
isExpensifyCardFullySetup,
isExpensifyCardFullySetUp,
isSelectedFeedExpired,
} from '@libs/CardUtils';
import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types';
Expand Down Expand Up @@ -66,7 +66,7 @@ function WorkspaceMemberNewCardPage({route, personalDetails}: WorkspaceMemberNew
const [list] = useOnyx(`${ONYXKEYS.COLLECTION.WORKSPACE_CARDS_LIST}${workspaceAccountID}_${selectedFeed}`);
const filteredCardList = getFilteredCardList(list, cardFeeds?.settings?.oAuthAccountDetails?.[selectedFeed as CompanyCardFeed]);

const shouldShowExpensifyCard = isExpensifyCardFullySetup(policy, cardSettings);
const shouldShowExpensifyCard = isExpensifyCardFullySetUp(policy, cardSettings);

const handleSubmit = () => {
if (!selectedFeed) {
Expand Down

0 comments on commit 58ad96f

Please sign in to comment.