@zeniai/client-epic-state 4.13.35 → 4.13.37

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.d.ts CHANGED
@@ -641,7 +641,7 @@ import { CompanyHealthMetric, VerticalProductServices, CompanyRunway } from './e
641
641
  export { CompanyHealthMetric, CompanyRunway, updateCompaniesHealth, updateCompanyHealth, VerticalProductServices, };
642
642
  export { clearCompanyHealthMetricView, fetchCompanyHealthMetricView, initializeCompanyHealthMetricViewLocalData, removeSelectedCompanyId, saveCompanyHealthMetricById, updateCompanyHealthMetricLocalStore, updateCompanyHealthMetricViewErrorStatus, updateCompanyHealthMetricViewSuccessStatus, updateCompanyHealthViewUIState, };
643
643
  import { ChargeCardViewSortKey, ChargeCardListUIState, toChargeCardSortKeyType } from './view/spendManagement/chargeCards/chargeCardList/chargeCardList';
644
- import { ChargeCardListSelectorView, ChargeCardWithUser, ChargeCardWithUserAndShippingAddress, getChargeCardListView, getMyChargeCardListWithShippingAddress, getCreditAccount, anyCardOnHold, ChargeCardListWithShippingAddressSelectorView } from './view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector';
644
+ import { ChargeCardListSelectorView, ChargeCardWithUser, ChargeCardWithUserAndShippingAddress, getChargeCardListView, getMyPendingActivationChargeCardListView, getMyChargeCardListWithShippingAddress, getCreditAccount, anyCardOnHold, ChargeCardListWithShippingAddressSelectorView, MyPendingActivationChargeCardListSelectorView } from './view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector';
645
645
  import { IssueChargeCardLocalData, IssueChargeCardState, PhysicalCardData, VirtualCardData, ActiveChargeCardCount } from './view/spendManagement/chargeCards/issueChargeCard/issueChargeCardState';
646
646
  import { fetchChargeCardConfig } from './view/spendManagement/chargeCards/chargeCardConfig/chargeCardConfigReducer';
647
647
  import { IssueChargeCardSelectorView, getIssueChargeCardView } from './view/spendManagement/chargeCards/issueChargeCard/issueChargeCardSelector';
@@ -664,7 +664,7 @@ import { CardUserOnboardingLocalData } from './view/spendManagement/chargeCards/
664
664
  import { initializeCardUserOnboardingLocalData, updateCardUserOnboardingLocalData, saveCardOnboardingUserDetails, startCardUserOnboardingActivationWait, completeCardUserOnboardingActivationWait, setFirstViewAfterActivation, setFirstViewCompleteAfterActivation, setCurrentDisplayedCardId } from './view/spendManagement/chargeCards/cardUserOnboarding/cardUserOnboardingReducer';
665
665
  import { getCardUserOnboardingView, CardUserOnboardingView } from './view/spendManagement/chargeCards/cardUserOnboarding/cardUserOnboardingSelector';
666
666
  import { issueChargeCards, resetIssueChargeCardForm, updateChargeCardsLocalStore, updateCustomAddressId, fetchIssueCardPage } from './view/spendManagement/chargeCards/issueChargeCard/issueChargeCardReducer';
667
- export { CardStatusCodeType, updateChargeCardTransactionAttachments, TransactionReceiptsPayload, ProductServices, ProductServiceKey, isCompanyRunwayInfinite, getCompanyHealthMetricView, hasCompanyHealthMetricFormFieldChanged, companyHealthMetricDropDownOptions, CompanyHealthMetricViewSelector, CompanyHealthMetricDropDownOption, CompanyDetailWithHealthMetric, ChargeCardBusinessVerificationDetails, getChargeCardBusinessVerificationDetails, fetchChargeCardList, fetchChargeCardListPage, fetchChargeCardConfig, fetchCreditAccount, getChargeCardListView, getMyChargeCardListWithShippingAddress, getCreditAccount, ChargeCardStatementsSelectorView, fetchChargeCardDetailPage, getChargeCardDetailView, ChargeCardTransactionAttachmentView, getChargeCardTransactionAttachmentView, ChargeCardCVVActivateSelectorView, getChargeCardCVVActivateView, fetchChargeCardTransactionList, fetchCashbackDetail, ChargeCard, ChargeCardWithUser, ChargeCardWithUserAndShippingAddress, ChargeCardViewSortKey, toChargeCardSortKeyType, CashbackPeriod, CashbackDetailUIState, CashbackViewSortKey, getCashbackDetail, CashbackDetailSelectorView, toCreditLimitFrequencyCodeType, ChargeCardListSelectorView, ChargeCardListWithShippingAddressSelectorView, ChargeCardDetailSelectorView, IssueChargeCardSelectorView, ActiveChargeCardCount, IssueChargeCardState, getIssueChargeCardView, ChargeCardConfigState, ChargeCardListUIState, ChargeCardTransaction, ChargeCardTransactionStatusCode, ChargeCardTransactionTypeCode, ChargeCardTransactionStatus, ChargeCardDetailUiState, ChargeCardTransactionSortKey, getChargeCardSetupViewDetails, ChargeCardSetupView, fetchChargeCardStatementList, ChargeCardStatement, getChargeCardStatements, fetchChargeCardSetupView, acceptChargeCardTerms, IssueChargeCardLocalData, PhysicalCardData, VirtualCardData, CreditLimitFrequencyCodeType, CardAddressType, toCardAddressType, ShippingAddressType, toShippingAddressType, CardActivationEventCodeType, CreditLimitFrequency, CardCodeType, toCardType, issueChargeCards, fetchIssueCardPage, updateCustomAddressId, updateChargeCardsLocalStore, resetIssueChargeCardForm, updateChargeCardListSearchText, updateChargeCardListUIState, updateCashbackDetailUIState, updateChargeCardDetail, updatePhysicalChargeCardAttempt, CardUserOnboardingLocalData, getCardUserOnboardingView, initializeCardUserOnboardingLocalData, updateCardUserOnboardingLocalData, CardUserOnboardingView, saveCardOnboardingUserDetails, updateChargeCardTransactionUploadReceiptsFetchStatus, updateChargeCardTransactionReceiptsShowTickFetchStatus, updateChargeCardTransactionIsViewReceiptClicked, fetchChargeCardTransactionAttachments, completeCVVActivationWait, startCVVActivationWait, resendCardInvite, revokeCardInvite, startCardUserOnboardingActivationWait, completeCardUserOnboardingActivationWait, setFirstViewAfterActivation, setFirstViewCompleteAfterActivation, setCurrentDisplayedCardId, anyCardOnHold, };
667
+ export { CardStatusCodeType, updateChargeCardTransactionAttachments, TransactionReceiptsPayload, ProductServices, ProductServiceKey, isCompanyRunwayInfinite, getCompanyHealthMetricView, hasCompanyHealthMetricFormFieldChanged, companyHealthMetricDropDownOptions, CompanyHealthMetricViewSelector, CompanyHealthMetricDropDownOption, CompanyDetailWithHealthMetric, ChargeCardBusinessVerificationDetails, getChargeCardBusinessVerificationDetails, fetchChargeCardList, fetchChargeCardListPage, fetchChargeCardConfig, fetchCreditAccount, getChargeCardListView, getMyPendingActivationChargeCardListView, getMyChargeCardListWithShippingAddress, getCreditAccount, ChargeCardStatementsSelectorView, fetchChargeCardDetailPage, getChargeCardDetailView, ChargeCardTransactionAttachmentView, getChargeCardTransactionAttachmentView, ChargeCardCVVActivateSelectorView, getChargeCardCVVActivateView, fetchChargeCardTransactionList, fetchCashbackDetail, ChargeCard, ChargeCardWithUser, ChargeCardWithUserAndShippingAddress, ChargeCardViewSortKey, toChargeCardSortKeyType, CashbackPeriod, CashbackDetailUIState, CashbackViewSortKey, getCashbackDetail, CashbackDetailSelectorView, toCreditLimitFrequencyCodeType, ChargeCardListSelectorView, ChargeCardListWithShippingAddressSelectorView, MyPendingActivationChargeCardListSelectorView, ChargeCardDetailSelectorView, IssueChargeCardSelectorView, ActiveChargeCardCount, IssueChargeCardState, getIssueChargeCardView, ChargeCardConfigState, ChargeCardListUIState, ChargeCardTransaction, ChargeCardTransactionStatusCode, ChargeCardTransactionTypeCode, ChargeCardTransactionStatus, ChargeCardDetailUiState, ChargeCardTransactionSortKey, getChargeCardSetupViewDetails, ChargeCardSetupView, fetchChargeCardStatementList, ChargeCardStatement, getChargeCardStatements, fetchChargeCardSetupView, acceptChargeCardTerms, IssueChargeCardLocalData, PhysicalCardData, VirtualCardData, CreditLimitFrequencyCodeType, CardAddressType, toCardAddressType, ShippingAddressType, toShippingAddressType, CardActivationEventCodeType, CreditLimitFrequency, CardCodeType, toCardType, issueChargeCards, fetchIssueCardPage, updateCustomAddressId, updateChargeCardsLocalStore, resetIssueChargeCardForm, updateChargeCardListSearchText, updateChargeCardListUIState, updateCashbackDetailUIState, updateChargeCardDetail, updatePhysicalChargeCardAttempt, CardUserOnboardingLocalData, getCardUserOnboardingView, initializeCardUserOnboardingLocalData, updateCardUserOnboardingLocalData, CardUserOnboardingView, saveCardOnboardingUserDetails, updateChargeCardTransactionUploadReceiptsFetchStatus, updateChargeCardTransactionReceiptsShowTickFetchStatus, updateChargeCardTransactionIsViewReceiptClicked, fetchChargeCardTransactionAttachments, completeCVVActivationWait, startCVVActivationWait, resendCardInvite, revokeCardInvite, startCardUserOnboardingActivationWait, completeCardUserOnboardingActivationWait, setFirstViewAfterActivation, setFirstViewCompleteAfterActivation, setCurrentDisplayedCardId, anyCardOnHold, };
668
668
  import { AgingBalance, AgingPeriod } from './commonStateTypes/agingBalance/agingBalance';
669
669
  import { fetchApAging, updateApAgingUIState } from './view/apAgingView/apAgingReport/apAgingReducer';
670
670
  import { ApAgingReport, getApAgingReport, AgingBalancesByVendor } from './view/apAgingView/apAgingReport/apAgingSelector';
package/lib/index.js CHANGED
@@ -46,13 +46,13 @@ exports.initializeRemiToLocalStore = exports.fetchRemiAndInitializeLocalStore =
46
46
  exports.sendOnboardingCustomerViewInvite = exports.resetNewOnboardedCustomerId = exports.updateOnboardingCustomerDataInLocalStore = exports.saveOnboardingCustomerDataInLocalStore = exports.saveOnboardingCustomerNotes = exports.saveOnboardingCustomerViewUpdates = exports.updateStatusAfterOnboardingCompleted = exports.updateCustomerCreationStatus = exports.updateOnboardingCustomerListUIState = exports.saveOnboardingCustomerViewUpdateData = exports.clearOnboardingCustomerViewUpdateData = exports.initializeOnboardingCustomerViewUpdateData = exports.getOnboardingEmailGroup = exports.getNewOnboardingCustomerView = exports.getOnboardingCockpitView = exports.toProductTypeStrict = exports.toProductType = exports.saveOnboardingCustomerCompletedStatus = exports.fetchOnboardingCompletedCompanies = exports.fetchCompanyOnboardingView = exports.PAYMENT_BUSINESS_DAYS = exports.holidaysFormatted = exports.isHoliday = exports.getYearsList = exports.filterDays = exports.isHolidayToday = exports.getPreviousNthWorkingDay = exports.getNextNthWorkingDay = exports.toFileTypeStrict = exports.ALL_FILE_TYPES = exports.isAllFetchCompleted = exports.isAnyFetchInProgress = exports.reduceAnyCompletedFetchState = exports.reduceAllFetchState = exports.reduceAnyFetchState = exports.reduceFetchState = exports.clearAddRemiAutoFields = exports.updateHomeCurrencyConversion = exports.clearTentativeMerchantName = exports.updateTentativeMerchantNames = exports.updateUploadFetchState = exports.updateAddRemiAutoFields = exports.clearEditRemiViewDetail = exports.parseReceiptsToRemi = exports.saveRemiSuccessOrFailure = exports.saveRemiDetail = exports.removeFileFromRemiUpdatesInLocalStore = exports.discardRemiUpdatesInLocalStore = exports.fetchCurrencyConversionValue = exports.saveRemiUpdatesToLocalStore = void 0;
47
47
  exports.updateTransferMoneyLocalData = exports.fetchZeniAccountsConfig = exports.fetchDepositAccount = exports.getDepositAccountDetailForPDF = exports.getAllDepostAccounts = exports.getDepositAccountDetail = exports.unlinkPaymentAccount = exports.fetchPaymentAccountList = exports.createCheckingAccount = exports.updateZeniAccountListTab = exports.fetchZeniAccountList = exports.getZeniAccountList = exports.getZeniAccountsConfigDetail = exports.fetchOwnerList = exports.fetchRecommendationByEntityName = exports.fetchRecommendationByEntityId = exports.fetchEntityRecommendationsByTransactionId = exports.fetchVendorsFiling1099Download = exports.getVendorFiling1099List = exports.toVendorReportIDType = exports.isVendorsTabVisible = exports.isColumnYTDSpend = exports.updateYTDSelectionUIState = exports.updatePageToken = exports.updateSortUiState = exports.getVendorList = exports.LOCAL_CURRENCY_INTERNATIONAL_METHOD_SUBTEXT = exports.SWIFT_OUR_INTERNATIONAL_METHOD_SUBTEXT = exports.NEW_INTERNATIONAL_METHOD_SUBTEXT = exports.BILL_NEW_PAYMENT_METHODS = exports.getInternationalSubConfigCodeKey = exports.shouldEnableCalendarPickerForLastReportSent = exports.canSendMonthEndEmailReport = exports.getBulkOperationSuffix = exports.getRemiListUniqueType = exports.getBillListUniqueType = exports.isBulkProcessing = exports.isVerifiedStatusCode = exports.getActualPaymentDate = exports.showReimbursementPromoPage = exports.showBillPayPromoPage = exports.getSelectedCompanyOfficer = exports.getSpendManagementEffectiveListPeriod = exports.getSnackbar = exports.closeSnackbar = exports.openSnackbar = exports.getChangedLineItemCountFromLocalData = exports.getTransactionListUIStateByCategoryType = exports.getTransactionsListByCategoryType = exports.retryBankAccountConnectionForOnboarding = void 0;
48
48
  exports.saveAccountMappingLocalData = exports.saveAccountMapping = exports.getOnboardingCustomerView = exports.clearOnboardingCustomerViewDataInLocalStore = exports.clearOnboardingCustomerView = exports.saveOnboardingCustomerViewDataInLocalStore = exports.saveOnboardingCompnayOfficerPhoneInLocalStore = exports.updateOnboardingCustomerViewUIState = exports.updateCurrentStep = exports.updateOnboardingCustomerViewLocalStoreData = exports.updateOnboardingCustomerView = exports.updateOnboardingPaymentAccountStatus = exports.updateOnboardingPaymentAccountLoginStatus = exports.updateOnboardingCustomerViewCompleteStatus = exports.updateOnboardingCustomerViewAccountDetails = exports.establishOnboardingPlaidConnection = exports.getOnboardingPlaidLinkToken = exports.fetchOnboardingCustomerSetupView = exports.fetchOnboardingCustomerView = exports.isZeniClearingAccount = exports.ZENI_CLEARING_ACCOUNT = exports.isZeniClearingAccountReport = exports.getCompanyConfig = exports.fetchCompanyConfig = exports.clearTransactionVendorSaveStatus = exports.resetTransactionVendorLocalData = exports.updateTransactionVendorLocalData = exports.saveTransactionVendorSuccessOrFailure = exports.saveTransactionVendor = exports.getTransactionVendorView = exports.getZeniAccStatements = exports.fetchZeniAccStatementPage = exports.getDepositAccountTransactionList = exports.fetchDepositAccountTransactionList = exports.fetchDepositAccountHistoryFailure = exports.fetchDepositAccountHistorySuccess = exports.updateDepositAccount = exports.getCheckDepositDetail = exports.clearCheckDeposit = exports.updateCheckDepositLocalData = exports.depositCheck = exports.ZENI_ACCOUNTS_TAB = exports.fetchDepositAccountDetail = exports.fetchReviewTransferDetail = exports.clearReviewTransferDetail = exports.clearTransferDetail = exports.getTransferDetail = exports.transferMoney = exports.updateDepositToLocalData = exports.updateTransferToLocalData = void 0;
49
- exports.getMyChargeCardListWithShippingAddress = exports.getChargeCardListView = exports.fetchCreditAccount = exports.fetchChargeCardConfig = exports.fetchChargeCardListPage = exports.fetchChargeCardList = exports.getChargeCardBusinessVerificationDetails = exports.companyHealthMetricDropDownOptions = exports.hasCompanyHealthMetricFormFieldChanged = exports.getCompanyHealthMetricView = exports.isCompanyRunwayInfinite = exports.updateChargeCardTransactionAttachments = exports.updateCompanyHealthViewUIState = exports.updateCompanyHealthMetricViewSuccessStatus = exports.updateCompanyHealthMetricViewErrorStatus = exports.updateCompanyHealthMetricLocalStore = exports.saveCompanyHealthMetricById = exports.removeSelectedCompanyId = exports.initializeCompanyHealthMetricViewLocalData = exports.fetchCompanyHealthMetricView = exports.clearCompanyHealthMetricView = exports.updateCompanyHealth = exports.updateCompaniesHealth = exports.getUserRoleConfig = exports.fetchUserRoleConfig = exports.clearInternationalWire = exports.deletePaymentInstrument = exports.createPaymentInstrumentUpdateStatus = exports.createPaymentInstrument = exports.fetchInternationalWireDynamicForm = exports.initializeDynamicForm = exports.updateInternationalWireLocalStoreData = exports.initializeInternationalWireLocalData = exports.getInternationalWireView = exports.fetchWiseRedirectStatus = exports.getWiseRedirect = exports.saveMagicLinkAddressInLocalStore = exports.fetchMagicLinkBankNameBySwift = exports.fetchMagicLinkBankNameByRouting = exports.updateMagicLinkInternationalBankAccountLocalStoreData = exports.updateMagicLinkBankAccountLocalStoreData = exports.saveBankAccount = exports.fetchBillAttachment = exports.fetchMagicLinkTenant = exports.getMagicLinkCurrentAddressState = exports.getMagicLinkBankAccountView = exports.getMagicLinkView = exports.initializeAccountMappingView = exports.getAccountMappingView = exports.clearAccountMappingLocalData = void 0;
50
- exports.updateApAgingUIState = exports.getApAgingReport = exports.fetchApAging = exports.anyCardOnHold = exports.setCurrentDisplayedCardId = exports.setFirstViewCompleteAfterActivation = exports.setFirstViewAfterActivation = exports.completeCardUserOnboardingActivationWait = exports.startCardUserOnboardingActivationWait = exports.revokeCardInvite = exports.resendCardInvite = exports.startCVVActivationWait = exports.completeCVVActivationWait = exports.fetchChargeCardTransactionAttachments = exports.updateChargeCardTransactionIsViewReceiptClicked = exports.updateChargeCardTransactionReceiptsShowTickFetchStatus = exports.updateChargeCardTransactionUploadReceiptsFetchStatus = exports.saveCardOnboardingUserDetails = exports.updateCardUserOnboardingLocalData = exports.initializeCardUserOnboardingLocalData = exports.getCardUserOnboardingView = exports.updatePhysicalChargeCardAttempt = exports.updateChargeCardDetail = exports.updateCashbackDetailUIState = exports.updateChargeCardListUIState = exports.updateChargeCardListSearchText = exports.resetIssueChargeCardForm = exports.updateChargeCardsLocalStore = exports.updateCustomAddressId = exports.fetchIssueCardPage = exports.issueChargeCards = exports.toCardType = exports.toShippingAddressType = exports.toCardAddressType = exports.acceptChargeCardTerms = exports.fetchChargeCardSetupView = exports.getChargeCardStatements = exports.fetchChargeCardStatementList = exports.getChargeCardSetupViewDetails = exports.getIssueChargeCardView = exports.toCreditLimitFrequencyCodeType = exports.getCashbackDetail = exports.toChargeCardSortKeyType = exports.fetchCashbackDetail = exports.fetchChargeCardTransactionList = exports.getChargeCardCVVActivateView = exports.getChargeCardTransactionAttachmentView = exports.getChargeCardDetailView = exports.fetchChargeCardDetailPage = exports.getCreditAccount = void 0;
51
- exports.saveScheduleDetails = exports.fetchScheduleDetailsPage = exports.getAccruedScheduleDetailsView = exports.getScheduleDetailsView = exports.fetchScheduleDetails = exports.updateSelectedJEScheduleKey = exports.updateScheduleListSortState = exports.updateScheduleListScrollState = exports.updateScheduleListSearchText = exports.updateScheduleListSubTab = exports.toScheduleSubTabType = exports.toScheduleListTabsFileTypeStrict = exports.toScheduleTypesTypeStrict = exports.toScheduleTypesType = exports.getFetchStateForScheduleAccountList = exports.updateScheduleListLocalData = exports.fetchSchedulesAccount = exports.fetchDownloadSchedules = exports.fetchAccruedScheduleList = exports.fetchScheduleList = exports.getAccruedScheduleListReport = exports.getScheduleListReport = exports.ALL_SCHEDULES_TYPES = exports.resetAccruedDetailNewScheduleState = exports.resetSelectedJEAccruedScheduleKey = exports.updateSelectedJEAccruedScheduleKey = exports.updateScheduleAccruedDetailsLocalData = exports.updateLinkBillExpenseLocalData = exports.fetchRecommendedTransactionRowIndex = exports.updatedJELinkInLocalDataAccruedExpenses = exports.updatedJEAccruedLinkWithRecommendedLocalData = exports.updateAmountsInScheduleAccruedDetail = exports.saveScheduleAccruedDetails = exports.resetJEAccruedLinkInLocalData = exports.fetchScheduleAccruedDetailsPage = exports.fetchScheduleAccruedDetails = exports.cancelScheduleAccruedJournalEntry = exports.deleteScheduleAccruedDetail = exports.createNewSchedulesAccrued = exports.updateJeScheduleTransactionKeys = exports.updateJeScheduleLocalDataById = exports.retryExpenseAutomationJESchedule = exports.removeJeScheduleTransactionKey = exports.initializeJeScheduleLocalData = exports.ignoreExpenseAutomationJESchedule = exports.fetchExpenseAutomationJESchedulesPage = exports.clearExpenseAutomationJESchedulesView = exports.updateApAgingDetailUIState = exports.getApAgingDetailForVendor = exports.fetchApAgingDetail = void 0;
52
- exports.fetchArAging = exports.updateVendorGlobalReviewViewLocalData = exports.toVendorGlobalReviewColumnSortKeyType = exports.getTenantMerchantByMerchantId = exports.getVendorGlobalReviewView = exports.updateVendorGlobalReviewViewUIState = exports.updateSelectedGlobalMerchant = exports.fetchVendorGlobalReviewView = exports.rejectVendorGlobalReview = exports.approveVendorGlobalReview = exports.getGlobalMerchantView = exports.clearGlobalMerchantView = exports.updateCreateGlobalMerchantLocalData = exports.createGlobalMerchant = exports.fetchGlobalMerchantRecommendation = exports.getVendorDetailSelectorView = exports.saveVendorDetailsView = exports.updateReviewVendorDetailLocalData = exports.clearGlobalMerchantAutoCompleteResults = exports.fetchGlobalMerchantAutoCompleteView = exports.updateVendorFirstReviewSortUiState = exports.updateVendorFirstReviewViewLocalData = exports.saveVendorFirstReviewView = exports.clearRecentlySavedErroredVendorData = exports.updateVendorFirstReviewViewPageToken = exports.resetVendorFirstReviewLocalData = exports.updateVendorFirstReviewViewScrollYOffset = exports.fetchVendorFirstReviewAttachments = exports.fetchVendorFirstReviewView = exports.getVendorFirstReviewAttachmentView = exports.getVendorFirstReviewView = exports.getGlobalMerchantAutoCompleteResults = exports.toVendorFirstReviewViewColumnKeyType = exports.fetchVendorTabView = exports.resetMarkAsCompleteStatus = exports.markAsCompleteScheduleDetail = exports.getDefaultSelectedTimeframeForScheduleType = exports.getFetchStateForScheduleListByType = exports.updatedJELinkWithRecommendedLocalData = exports.resetJELinkInLocalData = exports.updateAmountsInScheduleDetail = exports.updatedJELinkInLocalData = exports.getThirdPartyIDFromQBOURL = exports.getQBOUrlForLink = exports.updatedSelectedJELinkRowIndex = exports.updateAccruedJEScheduleAccruedByListKey = exports.updateScheduleListDownloadState = exports.updateScheduleDetailsLocalData = exports.createNewSchedules = exports.deleteScheduleDetail = void 0;
53
- exports.addCardPaymentSource = exports.confirmCardSetupIntent = exports.createCardSetupIntent = exports.getAllCardsAndBankPaymentMethods = exports.deleteTag = exports.createTag = exports.fetchTagList = exports.getAllTags = exports.convertHHMMStrToMinutes = exports.updateTaskFromListView = exports.toDueDateGroupKeyType = exports.toTaskStatusCodeType = exports.toPriorityCodeType = exports.getDueDateValueFromDueDateGroupId = exports.initialTaskDetail = exports.fetchAllTaskGroups = exports.getTaskUpdates = exports.toTaskListGroupByKeyTypeStrict = exports.toTaskListGroupByKeyType = exports.updateTaskGroupName = exports.dragNDropTasks = exports.updateTaskListLocalData = exports.deleteTaskGroup = exports.initiateTaskListLocalData = exports.createNewTaskGroup = exports.bulkUpdateTaskList = exports.discardTaskUpdatesInLocalStore = exports.deleteTask = exports.TASK_LIST_GROUP_BY_CATEGORIES = exports.TASK_LIST_FILTER_CATEGORIES = exports.updateTaskFilters = exports.allTaskPriority = exports.allTaskStatus = exports.updateTaskListUIState = exports.updateTaskListSearchText = exports.archiveTask = exports.saveTaskDetail = exports.saveTaskUpdatesToLocalStore = exports.fetchTaskDetailPage = exports.getTaskDetail = exports.fetchTaskListPage = exports.getAllTasks = exports.toRecurringBillFrequencyStrict = exports.toRecurringBillFrequency = exports.updateArAgingNodeCollapseState = exports.getArAgingDetailForCustomer = exports.getArAgingReport = exports.updateArAgingDetailUIState = exports.fetchArAgingDetail = exports.updateArAgingUIState = void 0;
54
- exports.toRecurringFrequency = exports.getRecurringEndDateFromCount = exports.updateReferViewed = exports.getRewardsPlanCard = exports.fetchRewardsPlan = exports.resendReferralInvite = exports.updateReferralListSortUiState = exports.saveReferralFormDataInLocalStore = exports.clearReferrals = exports.sendReferralInvite = exports.fetchReferrals = exports.AmountStatusTypes = exports.StatusTypes = exports.toReferralListViewSortKeyType = exports.getInviteFormView = exports.getReferralListView = exports.getNotifications = exports.getLastNotificationTime = exports.pushToastNotification = exports.getNotificationsForSelectedSubTab = exports.getExternalNotificationsForSelectedSubTab = exports.getNotificationView = exports.updateNotificationViewUIState = exports.updateNotificationViewSubTab = exports.updateNotificationViewCurrentTabAndSubTab = exports.updateNotificationViewTabState = exports.updateNotificationViewNotificationStatus = exports.updateNotificationViewAllNotificationsStatus = exports.fetchNotificationUnreadCountSuccess = exports.fetchNotificationUnreadCount = exports.fetchNotificationView = exports.toNotificationTabTypeStrict = exports.toNotificationSubTabTypeStrict = exports.updateCommentsNotificationsStatuses = exports.updateCommentsNotifications = exports.toNotificationModeStrict = exports.fetchZeniAccountsPromoCard = exports.getZeniAccountsPromoCard = exports.getAuthenticationView = exports.fetchCollaborationAuthToken = exports.clearAuditReportGroupViewByCompanyId = exports.saveReasonForAuditRule = exports.fetchAuditReportGroupView = exports.fetchAuditRuleGroupView = exports.getUserFromAllUsers = exports.getAuditRuleGroupViewSelectorView = exports.getAuditReportGroupViewSelectorView = exports.clearCardPaymentView = exports.resetCardPaymentErrorStatuses = exports.fetchPaymentSources = void 0;
55
- exports.getIntlWireVerificationView = exports.updateVerificationFormLocalData = exports.submitInternationalVerificationForm = exports.fetchInternationalVerificationForm = exports.getCompanyTaskManagerView = exports.fetchCompanyTaskManagerView = exports.getMinAllowedEndDate = void 0;
49
+ exports.getMyPendingActivationChargeCardListView = exports.getChargeCardListView = exports.fetchCreditAccount = exports.fetchChargeCardConfig = exports.fetchChargeCardListPage = exports.fetchChargeCardList = exports.getChargeCardBusinessVerificationDetails = exports.companyHealthMetricDropDownOptions = exports.hasCompanyHealthMetricFormFieldChanged = exports.getCompanyHealthMetricView = exports.isCompanyRunwayInfinite = exports.updateChargeCardTransactionAttachments = exports.updateCompanyHealthViewUIState = exports.updateCompanyHealthMetricViewSuccessStatus = exports.updateCompanyHealthMetricViewErrorStatus = exports.updateCompanyHealthMetricLocalStore = exports.saveCompanyHealthMetricById = exports.removeSelectedCompanyId = exports.initializeCompanyHealthMetricViewLocalData = exports.fetchCompanyHealthMetricView = exports.clearCompanyHealthMetricView = exports.updateCompanyHealth = exports.updateCompaniesHealth = exports.getUserRoleConfig = exports.fetchUserRoleConfig = exports.clearInternationalWire = exports.deletePaymentInstrument = exports.createPaymentInstrumentUpdateStatus = exports.createPaymentInstrument = exports.fetchInternationalWireDynamicForm = exports.initializeDynamicForm = exports.updateInternationalWireLocalStoreData = exports.initializeInternationalWireLocalData = exports.getInternationalWireView = exports.fetchWiseRedirectStatus = exports.getWiseRedirect = exports.saveMagicLinkAddressInLocalStore = exports.fetchMagicLinkBankNameBySwift = exports.fetchMagicLinkBankNameByRouting = exports.updateMagicLinkInternationalBankAccountLocalStoreData = exports.updateMagicLinkBankAccountLocalStoreData = exports.saveBankAccount = exports.fetchBillAttachment = exports.fetchMagicLinkTenant = exports.getMagicLinkCurrentAddressState = exports.getMagicLinkBankAccountView = exports.getMagicLinkView = exports.initializeAccountMappingView = exports.getAccountMappingView = exports.clearAccountMappingLocalData = void 0;
50
+ exports.getApAgingReport = exports.fetchApAging = exports.anyCardOnHold = exports.setCurrentDisplayedCardId = exports.setFirstViewCompleteAfterActivation = exports.setFirstViewAfterActivation = exports.completeCardUserOnboardingActivationWait = exports.startCardUserOnboardingActivationWait = exports.revokeCardInvite = exports.resendCardInvite = exports.startCVVActivationWait = exports.completeCVVActivationWait = exports.fetchChargeCardTransactionAttachments = exports.updateChargeCardTransactionIsViewReceiptClicked = exports.updateChargeCardTransactionReceiptsShowTickFetchStatus = exports.updateChargeCardTransactionUploadReceiptsFetchStatus = exports.saveCardOnboardingUserDetails = exports.updateCardUserOnboardingLocalData = exports.initializeCardUserOnboardingLocalData = exports.getCardUserOnboardingView = exports.updatePhysicalChargeCardAttempt = exports.updateChargeCardDetail = exports.updateCashbackDetailUIState = exports.updateChargeCardListUIState = exports.updateChargeCardListSearchText = exports.resetIssueChargeCardForm = exports.updateChargeCardsLocalStore = exports.updateCustomAddressId = exports.fetchIssueCardPage = exports.issueChargeCards = exports.toCardType = exports.toShippingAddressType = exports.toCardAddressType = exports.acceptChargeCardTerms = exports.fetchChargeCardSetupView = exports.getChargeCardStatements = exports.fetchChargeCardStatementList = exports.getChargeCardSetupViewDetails = exports.getIssueChargeCardView = exports.toCreditLimitFrequencyCodeType = exports.getCashbackDetail = exports.toChargeCardSortKeyType = exports.fetchCashbackDetail = exports.fetchChargeCardTransactionList = exports.getChargeCardCVVActivateView = exports.getChargeCardTransactionAttachmentView = exports.getChargeCardDetailView = exports.fetchChargeCardDetailPage = exports.getCreditAccount = exports.getMyChargeCardListWithShippingAddress = void 0;
51
+ exports.fetchScheduleDetailsPage = exports.getAccruedScheduleDetailsView = exports.getScheduleDetailsView = exports.fetchScheduleDetails = exports.updateSelectedJEScheduleKey = exports.updateScheduleListSortState = exports.updateScheduleListScrollState = exports.updateScheduleListSearchText = exports.updateScheduleListSubTab = exports.toScheduleSubTabType = exports.toScheduleListTabsFileTypeStrict = exports.toScheduleTypesTypeStrict = exports.toScheduleTypesType = exports.getFetchStateForScheduleAccountList = exports.updateScheduleListLocalData = exports.fetchSchedulesAccount = exports.fetchDownloadSchedules = exports.fetchAccruedScheduleList = exports.fetchScheduleList = exports.getAccruedScheduleListReport = exports.getScheduleListReport = exports.ALL_SCHEDULES_TYPES = exports.resetAccruedDetailNewScheduleState = exports.resetSelectedJEAccruedScheduleKey = exports.updateSelectedJEAccruedScheduleKey = exports.updateScheduleAccruedDetailsLocalData = exports.updateLinkBillExpenseLocalData = exports.fetchRecommendedTransactionRowIndex = exports.updatedJELinkInLocalDataAccruedExpenses = exports.updatedJEAccruedLinkWithRecommendedLocalData = exports.updateAmountsInScheduleAccruedDetail = exports.saveScheduleAccruedDetails = exports.resetJEAccruedLinkInLocalData = exports.fetchScheduleAccruedDetailsPage = exports.fetchScheduleAccruedDetails = exports.cancelScheduleAccruedJournalEntry = exports.deleteScheduleAccruedDetail = exports.createNewSchedulesAccrued = exports.updateJeScheduleTransactionKeys = exports.updateJeScheduleLocalDataById = exports.retryExpenseAutomationJESchedule = exports.removeJeScheduleTransactionKey = exports.initializeJeScheduleLocalData = exports.ignoreExpenseAutomationJESchedule = exports.fetchExpenseAutomationJESchedulesPage = exports.clearExpenseAutomationJESchedulesView = exports.updateApAgingDetailUIState = exports.getApAgingDetailForVendor = exports.fetchApAgingDetail = exports.updateApAgingUIState = void 0;
52
+ exports.updateVendorGlobalReviewViewLocalData = exports.toVendorGlobalReviewColumnSortKeyType = exports.getTenantMerchantByMerchantId = exports.getVendorGlobalReviewView = exports.updateVendorGlobalReviewViewUIState = exports.updateSelectedGlobalMerchant = exports.fetchVendorGlobalReviewView = exports.rejectVendorGlobalReview = exports.approveVendorGlobalReview = exports.getGlobalMerchantView = exports.clearGlobalMerchantView = exports.updateCreateGlobalMerchantLocalData = exports.createGlobalMerchant = exports.fetchGlobalMerchantRecommendation = exports.getVendorDetailSelectorView = exports.saveVendorDetailsView = exports.updateReviewVendorDetailLocalData = exports.clearGlobalMerchantAutoCompleteResults = exports.fetchGlobalMerchantAutoCompleteView = exports.updateVendorFirstReviewSortUiState = exports.updateVendorFirstReviewViewLocalData = exports.saveVendorFirstReviewView = exports.clearRecentlySavedErroredVendorData = exports.updateVendorFirstReviewViewPageToken = exports.resetVendorFirstReviewLocalData = exports.updateVendorFirstReviewViewScrollYOffset = exports.fetchVendorFirstReviewAttachments = exports.fetchVendorFirstReviewView = exports.getVendorFirstReviewAttachmentView = exports.getVendorFirstReviewView = exports.getGlobalMerchantAutoCompleteResults = exports.toVendorFirstReviewViewColumnKeyType = exports.fetchVendorTabView = exports.resetMarkAsCompleteStatus = exports.markAsCompleteScheduleDetail = exports.getDefaultSelectedTimeframeForScheduleType = exports.getFetchStateForScheduleListByType = exports.updatedJELinkWithRecommendedLocalData = exports.resetJELinkInLocalData = exports.updateAmountsInScheduleDetail = exports.updatedJELinkInLocalData = exports.getThirdPartyIDFromQBOURL = exports.getQBOUrlForLink = exports.updatedSelectedJELinkRowIndex = exports.updateAccruedJEScheduleAccruedByListKey = exports.updateScheduleListDownloadState = exports.updateScheduleDetailsLocalData = exports.createNewSchedules = exports.deleteScheduleDetail = exports.saveScheduleDetails = void 0;
53
+ exports.confirmCardSetupIntent = exports.createCardSetupIntent = exports.getAllCardsAndBankPaymentMethods = exports.deleteTag = exports.createTag = exports.fetchTagList = exports.getAllTags = exports.convertHHMMStrToMinutes = exports.updateTaskFromListView = exports.toDueDateGroupKeyType = exports.toTaskStatusCodeType = exports.toPriorityCodeType = exports.getDueDateValueFromDueDateGroupId = exports.initialTaskDetail = exports.fetchAllTaskGroups = exports.getTaskUpdates = exports.toTaskListGroupByKeyTypeStrict = exports.toTaskListGroupByKeyType = exports.updateTaskGroupName = exports.dragNDropTasks = exports.updateTaskListLocalData = exports.deleteTaskGroup = exports.initiateTaskListLocalData = exports.createNewTaskGroup = exports.bulkUpdateTaskList = exports.discardTaskUpdatesInLocalStore = exports.deleteTask = exports.TASK_LIST_GROUP_BY_CATEGORIES = exports.TASK_LIST_FILTER_CATEGORIES = exports.updateTaskFilters = exports.allTaskPriority = exports.allTaskStatus = exports.updateTaskListUIState = exports.updateTaskListSearchText = exports.archiveTask = exports.saveTaskDetail = exports.saveTaskUpdatesToLocalStore = exports.fetchTaskDetailPage = exports.getTaskDetail = exports.fetchTaskListPage = exports.getAllTasks = exports.toRecurringBillFrequencyStrict = exports.toRecurringBillFrequency = exports.updateArAgingNodeCollapseState = exports.getArAgingDetailForCustomer = exports.getArAgingReport = exports.updateArAgingDetailUIState = exports.fetchArAgingDetail = exports.updateArAgingUIState = exports.fetchArAging = void 0;
54
+ exports.getRecurringEndDateFromCount = exports.updateReferViewed = exports.getRewardsPlanCard = exports.fetchRewardsPlan = exports.resendReferralInvite = exports.updateReferralListSortUiState = exports.saveReferralFormDataInLocalStore = exports.clearReferrals = exports.sendReferralInvite = exports.fetchReferrals = exports.AmountStatusTypes = exports.StatusTypes = exports.toReferralListViewSortKeyType = exports.getInviteFormView = exports.getReferralListView = exports.getNotifications = exports.getLastNotificationTime = exports.pushToastNotification = exports.getNotificationsForSelectedSubTab = exports.getExternalNotificationsForSelectedSubTab = exports.getNotificationView = exports.updateNotificationViewUIState = exports.updateNotificationViewSubTab = exports.updateNotificationViewCurrentTabAndSubTab = exports.updateNotificationViewTabState = exports.updateNotificationViewNotificationStatus = exports.updateNotificationViewAllNotificationsStatus = exports.fetchNotificationUnreadCountSuccess = exports.fetchNotificationUnreadCount = exports.fetchNotificationView = exports.toNotificationTabTypeStrict = exports.toNotificationSubTabTypeStrict = exports.updateCommentsNotificationsStatuses = exports.updateCommentsNotifications = exports.toNotificationModeStrict = exports.fetchZeniAccountsPromoCard = exports.getZeniAccountsPromoCard = exports.getAuthenticationView = exports.fetchCollaborationAuthToken = exports.clearAuditReportGroupViewByCompanyId = exports.saveReasonForAuditRule = exports.fetchAuditReportGroupView = exports.fetchAuditRuleGroupView = exports.getUserFromAllUsers = exports.getAuditRuleGroupViewSelectorView = exports.getAuditReportGroupViewSelectorView = exports.clearCardPaymentView = exports.resetCardPaymentErrorStatuses = exports.fetchPaymentSources = exports.addCardPaymentSource = void 0;
55
+ exports.getIntlWireVerificationView = exports.updateVerificationFormLocalData = exports.submitInternationalVerificationForm = exports.fetchInternationalVerificationForm = exports.getCompanyTaskManagerView = exports.fetchCompanyTaskManagerView = exports.getMinAllowedEndDate = exports.toRecurringFrequency = void 0;
56
56
  const zeniDayJS_1 = require("./zeniDayJS");
57
57
  Object.defineProperty(exports, "Dayjs", { enumerable: true, get: function () { return zeniDayJS_1.Dayjs; } });
58
58
  Object.defineProperty(exports, "updateZeniDateLocaleID", { enumerable: true, get: function () { return zeniDayJS_1.updateZeniDateLocaleID; } });
@@ -1391,6 +1391,7 @@ const chargeCardList_1 = require("./view/spendManagement/chargeCards/chargeCardL
1391
1391
  Object.defineProperty(exports, "toChargeCardSortKeyType", { enumerable: true, get: function () { return chargeCardList_1.toChargeCardSortKeyType; } });
1392
1392
  const chargeCardListSelector_1 = require("./view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector");
1393
1393
  Object.defineProperty(exports, "getChargeCardListView", { enumerable: true, get: function () { return chargeCardListSelector_1.getChargeCardListView; } });
1394
+ Object.defineProperty(exports, "getMyPendingActivationChargeCardListView", { enumerable: true, get: function () { return chargeCardListSelector_1.getMyPendingActivationChargeCardListView; } });
1394
1395
  Object.defineProperty(exports, "getMyChargeCardListWithShippingAddress", { enumerable: true, get: function () { return chargeCardListSelector_1.getMyChargeCardListWithShippingAddress; } });
1395
1396
  Object.defineProperty(exports, "getCreditAccount", { enumerable: true, get: function () { return chargeCardListSelector_1.getCreditAccount; } });
1396
1397
  Object.defineProperty(exports, "anyCardOnHold", { enumerable: true, get: function () { return chargeCardListSelector_1.anyCardOnHold; } });
@@ -35,10 +35,18 @@ export interface ChargeCardListSelectorView extends SelectorView {
35
35
  revokeCardInvite: ResendRevokeCardInvite;
36
36
  unAssignedCredits?: Amount;
37
37
  }
38
+ export interface MyPendingActivationChargeCardListSelectorView extends SelectorView {
39
+ cards: ChargeCardWithUser[];
40
+ uiState: ChargeCardListUIState;
41
+ }
38
42
  export interface ChargeCardListWithShippingAddressSelectorView extends SelectorView {
39
43
  cards: ChargeCardWithUserAndShippingAddress[];
40
44
  }
41
45
  export declare const getChargeCardListView: (state: RootState, includeCreditAccountAndCashbackInfo: boolean) => ChargeCardListSelectorView;
46
+ export declare const getMyPendingActivationChargeCardListView: (state: RootState) => MyPendingActivationChargeCardListSelectorView;
42
47
  export declare const getMyChargeCardListWithShippingAddress: (state: RootState) => ChargeCardListWithShippingAddressSelectorView;
48
+ /**
49
+ * helpers
50
+ */
43
51
  export declare const anyCardOnHold: (cards: ChargeCardWithUser[]) => boolean;
44
52
  export declare const getCreditAccount: (state: RootState) => CreditAccount;
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.getCreditAccount = exports.anyCardOnHold = exports.getMyChargeCardListWithShippingAddress = exports.getChargeCardListView = void 0;
6
+ exports.getCreditAccount = exports.anyCardOnHold = exports.getMyChargeCardListWithShippingAddress = exports.getMyPendingActivationChargeCardListView = exports.getChargeCardListView = void 0;
7
7
  const orderBy_1 = __importDefault(require("lodash/orderBy"));
8
8
  const reduceFetchState_1 = require("../../../../commonStateTypes/reduceFetchState");
9
9
  const sortOrderPayload_1 = require("../../../../commonPayloadTypes/sortOrderPayload");
@@ -14,37 +14,10 @@ const userSelector_1 = require("../../../../entity/user/userSelector");
14
14
  const userRoleSelector_1 = require("../../../../entity/userRole/userRoleSelector");
15
15
  const userListViewSelector_1 = require("../../../userListView/userListViewSelector");
16
16
  const getChargeCardListView = (state, includeCreditAccountAndCashbackInfo) => {
17
- const { addressState, chargeCardListState, chargeCardState, classState, userState, userRoleState, chargeCardConfigState, classListState, cashbackDetailState, userListViewState, } = state;
17
+ const { chargeCardListState, chargeCardState, classState, userState, userRoleState, chargeCardConfigState, classListState, cashbackDetailState, userListViewState, } = state;
18
18
  const searchText = chargeCardListState.searchText.toLowerCase();
19
19
  const cards = (0, chargeCardSelector_1.getChargeCardsByIds)(chargeCardState, chargeCardListState.cardIds);
20
- const chargeCardsWithUser = [];
21
- cards.forEach((chargeCard) => {
22
- const cardHolderUser = (0, userSelector_1.getUserByUserId)(userState, chargeCard.cardHolderUserId);
23
- const cardCreatedByUser = (0, userSelector_1.getUserByUserId)(userState, chargeCard.cardCreaterUserId);
24
- const cardHolderUserRole = (0, userRoleSelector_1.getUserRoleByUserId)(userRoleState, chargeCard.cardHolderUserId);
25
- const department = cardHolderUserRole != null
26
- ? (0, classSelector_1.getClassById)(classState, {
27
- classId: cardHolderUserRole.accountingClassIDs[0],
28
- reportId: 'class_list',
29
- })
30
- : undefined;
31
- const mailingAddress = chargeCard.mailingAddressId != null
32
- ? (0, addressSelector_1.getAddressByAddressId)(addressState, chargeCard.mailingAddressId)
33
- : undefined;
34
- const billingAddress = (0, addressSelector_1.getAddressByAddressId)(addressState, chargeCard.billingAddressId);
35
- if (cardCreatedByUser == null ||
36
- cardHolderUser == null ||
37
- cardHolderUserRole == null ||
38
- billingAddress == null) {
39
- console.error(`Cannot find details for card ${chargeCard.cardName} id ${chargeCard.id} - Created by ${cardCreatedByUser === null || cardCreatedByUser === void 0 ? void 0 : cardCreatedByUser.firstName}, for ${cardHolderUser === null || cardHolderUser === void 0 ? void 0 : cardHolderUser.firstName} with role ${cardHolderUserRole} and billing address in ${billingAddress === null || billingAddress === void 0 ? void 0 : billingAddress.country}.`);
40
- }
41
- else {
42
- chargeCardsWithUser.push(Object.assign(Object.assign({}, chargeCard), { cardHolderUser,
43
- cardCreatedByUser, cardHolderRoles: cardHolderUserRole, billingAddress,
44
- department,
45
- mailingAddress }));
46
- }
47
- });
20
+ const chargeCardsWithUser = getChargeCardsWithUser(cards, state);
48
21
  const chargeCardsWithUserFiltered = chargeCardsWithUser.filter((cardWithUser) => {
49
22
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
50
23
  const loweredSearchText = searchText.toLowerCase();
@@ -61,33 +34,6 @@ const getChargeCardListView = (state, includeCreditAccountAndCashbackInfo) => {
61
34
  });
62
35
  const sortKey = chargeCardListState.uiState.sortKey;
63
36
  const sortOrder = (0, sortOrderPayload_1.getSortOrder)(chargeCardListState.uiState.sortOrder);
64
- const getCardsBySortKey = (card, sortKey) => {
65
- var _a, _b, _c, _d;
66
- switch (sortKey) {
67
- case 'owner': {
68
- const firstName = (_a = card.cardHolderUser) === null || _a === void 0 ? void 0 : _a.firstName.toLowerCase();
69
- const lastName = (_b = card.cardHolderUser) === null || _b === void 0 ? void 0 : _b.lastName.toLowerCase();
70
- if (Boolean(firstName) && Boolean(lastName)) {
71
- return `${firstName} ${lastName}`;
72
- }
73
- else if (Boolean(firstName) || Boolean(lastName)) {
74
- return firstName !== null && firstName !== void 0 ? firstName : lastName;
75
- }
76
- return '';
77
- }
78
- case 'cardName':
79
- return card.cardName.toLowerCase();
80
- case 'department':
81
- return (_d = (_c = card.department) === null || _c === void 0 ? void 0 : _c.className.toLowerCase()) !== null && _d !== void 0 ? _d : '';
82
- case 'status':
83
- return card.status.code;
84
- case 'utilisation':
85
- return card.limit.amount - card.available.amount;
86
- case 'limit':
87
- default:
88
- return card.limit.amount;
89
- }
90
- };
91
37
  const cardsInOrder = (0, orderBy_1.default)(chargeCardsWithUserFiltered, (person) => getCardsBySortKey(person, sortKey), sortOrder);
92
38
  const userListSelectorView = (0, userListViewSelector_1.getUserList)(userState, userRoleState, userListViewState, 'cardHolderCandidate');
93
39
  const userList = userListSelectorView.users;
@@ -128,15 +74,67 @@ const getChargeCardListView = (state, includeCreditAccountAndCashbackInfo) => {
128
74
  };
129
75
  };
130
76
  exports.getChargeCardListView = getChargeCardListView;
77
+ const getMyPendingActivationChargeCardListView = (state) => {
78
+ var _a;
79
+ const { tenantState, chargeCardListState, chargeCardState } = state;
80
+ const cards = (0, chargeCardSelector_1.getChargeCardsByIds)(chargeCardState, chargeCardListState.cardIds);
81
+ const myUserId = (_a = tenantState.loggedInUser) === null || _a === void 0 ? void 0 : _a.userId;
82
+ const myPendingActivationChargeCardWithUser = getChargeCardsWithUser(cards, state).filter((chargeCard) => chargeCard.cardHolderUserId === myUserId &&
83
+ chargeCard.type.code === 'business_physical_credit_card' &&
84
+ chargeCard.status.code === 'inactive');
85
+ const sortKey = chargeCardListState.uiState.sortKey;
86
+ const sortOrder = (0, sortOrderPayload_1.getSortOrder)(chargeCardListState.uiState.sortOrder);
87
+ const cardsInOrder = (0, orderBy_1.default)(myPendingActivationChargeCardWithUser, (person) => getCardsBySortKey(person, sortKey), sortOrder);
88
+ return {
89
+ fetchState: chargeCardListState.fetchState,
90
+ error: chargeCardListState.error,
91
+ cards: cardsInOrder,
92
+ uiState: chargeCardListState.uiState,
93
+ version: '1.0',
94
+ };
95
+ };
96
+ exports.getMyPendingActivationChargeCardListView = getMyPendingActivationChargeCardListView;
131
97
  const getMyChargeCardListWithShippingAddress = (state) => {
132
98
  var _a, _b;
133
- const { tenantState, addressState, chargeCardListState, chargeCardState, classState, userState, userRoleState, chargeCardConfigState, } = state;
99
+ const { tenantState, addressState, chargeCardListState, chargeCardState, chargeCardConfigState, } = state;
134
100
  const userId = (_b = (_a = tenantState.loggedInUser) === null || _a === void 0 ? void 0 : _a.userId) !== null && _b !== void 0 ? _b : '';
135
101
  const cards = (0, chargeCardSelector_1.getChargeCardsByIds)(chargeCardState, chargeCardListState.cardIds);
136
- const chargeCardsWithUserAndShippingAddress = [];
137
- cards
138
- .filter((chargeCard) => chargeCard.cardHolderUserId === userId)
139
- .forEach((chargeCard) => {
102
+ const myChargeCardsWithUser = getChargeCardsWithUser(cards, state).filter((chargeCard) => chargeCard.cardHolderUserId === userId);
103
+ const myChargeCardsWithUserAndShippingAddress = myChargeCardsWithUser.map((card) => {
104
+ const shippingAddress = card.shippingAddressId != null
105
+ ? (0, addressSelector_1.getAddressByAddressId)(addressState, card.shippingAddressId)
106
+ : undefined;
107
+ return Object.assign(Object.assign({}, card), { shippingAddress });
108
+ });
109
+ const fetchState = (0, reduceFetchState_1.reduceFetchState)([
110
+ chargeCardListState,
111
+ chargeCardConfigState,
112
+ ]).fetchState;
113
+ return {
114
+ fetchState,
115
+ error: chargeCardListState.error,
116
+ cards: myChargeCardsWithUserAndShippingAddress,
117
+ version: '1.0',
118
+ };
119
+ };
120
+ exports.getMyChargeCardListWithShippingAddress = getMyChargeCardListWithShippingAddress;
121
+ /**
122
+ * helpers
123
+ */
124
+ const anyCardOnHold = (cards) => {
125
+ return cards.reduce((prevValue, currentValue) => {
126
+ return (prevValue === true && currentValue.status.code === 'request_on_hold');
127
+ }, true);
128
+ };
129
+ exports.anyCardOnHold = anyCardOnHold;
130
+ const getCreditAccount = (state) => {
131
+ const { chargeCardListState } = state;
132
+ return chargeCardListState.creditAccount;
133
+ };
134
+ exports.getCreditAccount = getCreditAccount;
135
+ const getChargeCardsWithUser = (cards, { userState, userRoleState, classState, addressState }) => {
136
+ const chargeCardsWithUser = [];
137
+ cards.forEach((chargeCard) => {
140
138
  const cardHolderUser = (0, userSelector_1.getUserByUserId)(userState, chargeCard.cardHolderUserId);
141
139
  const cardCreatedByUser = (0, userSelector_1.getUserByUserId)(userState, chargeCard.cardCreaterUserId);
142
140
  const cardHolderUserRole = (0, userRoleSelector_1.getUserRoleByUserId)(userRoleState, chargeCard.cardHolderUserId);
@@ -150,9 +148,6 @@ const getMyChargeCardListWithShippingAddress = (state) => {
150
148
  ? (0, addressSelector_1.getAddressByAddressId)(addressState, chargeCard.mailingAddressId)
151
149
  : undefined;
152
150
  const billingAddress = (0, addressSelector_1.getAddressByAddressId)(addressState, chargeCard.billingAddressId);
153
- const shippingAddress = chargeCard.shippingAddressId != null
154
- ? (0, addressSelector_1.getAddressByAddressId)(addressState, chargeCard.shippingAddressId)
155
- : undefined;
156
151
  if (cardCreatedByUser == null ||
157
152
  cardHolderUser == null ||
158
153
  cardHolderUserRole == null ||
@@ -160,33 +155,38 @@ const getMyChargeCardListWithShippingAddress = (state) => {
160
155
  console.error(`Cannot find details for card ${chargeCard.cardName} id ${chargeCard.id} - Created by ${cardCreatedByUser === null || cardCreatedByUser === void 0 ? void 0 : cardCreatedByUser.firstName}, for ${cardHolderUser === null || cardHolderUser === void 0 ? void 0 : cardHolderUser.firstName} with role ${cardHolderUserRole} and billing address in ${billingAddress === null || billingAddress === void 0 ? void 0 : billingAddress.country}.`);
161
156
  }
162
157
  else {
163
- chargeCardsWithUserAndShippingAddress.push(Object.assign(Object.assign({}, chargeCard), { cardHolderUser,
158
+ chargeCardsWithUser.push(Object.assign(Object.assign({}, chargeCard), { cardHolderUser,
164
159
  cardCreatedByUser, cardHolderRoles: cardHolderUserRole, billingAddress,
165
160
  department,
166
- mailingAddress,
167
- shippingAddress }));
161
+ mailingAddress }));
168
162
  }
169
163
  });
170
- const fetchState = (0, reduceFetchState_1.reduceFetchState)([
171
- chargeCardListState,
172
- chargeCardConfigState,
173
- ]).fetchState;
174
- return {
175
- fetchState,
176
- error: chargeCardListState.error,
177
- cards: chargeCardsWithUserAndShippingAddress,
178
- version: '1.0',
179
- };
164
+ return chargeCardsWithUser;
180
165
  };
181
- exports.getMyChargeCardListWithShippingAddress = getMyChargeCardListWithShippingAddress;
182
- const anyCardOnHold = (cards) => {
183
- return cards.reduce((prevValue, currentValue) => {
184
- return (prevValue === true && currentValue.status.code === 'request_on_hold');
185
- }, true);
186
- };
187
- exports.anyCardOnHold = anyCardOnHold;
188
- const getCreditAccount = (state) => {
189
- const { chargeCardListState } = state;
190
- return chargeCardListState.creditAccount;
166
+ const getCardsBySortKey = (card, sortKey) => {
167
+ var _a, _b, _c, _d;
168
+ switch (sortKey) {
169
+ case 'owner': {
170
+ const firstName = (_a = card.cardHolderUser) === null || _a === void 0 ? void 0 : _a.firstName.toLowerCase();
171
+ const lastName = (_b = card.cardHolderUser) === null || _b === void 0 ? void 0 : _b.lastName.toLowerCase();
172
+ if (Boolean(firstName) && Boolean(lastName)) {
173
+ return `${firstName} ${lastName}`;
174
+ }
175
+ else if (Boolean(firstName) || Boolean(lastName)) {
176
+ return firstName !== null && firstName !== void 0 ? firstName : lastName;
177
+ }
178
+ return '';
179
+ }
180
+ case 'cardName':
181
+ return card.cardName.toLowerCase();
182
+ case 'department':
183
+ return (_d = (_c = card.department) === null || _c === void 0 ? void 0 : _c.className.toLowerCase()) !== null && _d !== void 0 ? _d : '';
184
+ case 'status':
185
+ return card.status.code;
186
+ case 'utilisation':
187
+ return card.limit.amount - card.available.amount;
188
+ case 'limit':
189
+ default:
190
+ return card.limit.amount;
191
+ }
191
192
  };
192
- exports.getCreditAccount = getCreditAccount;
@@ -2,7 +2,7 @@ import { GlobalMerchantBase } from '../../../../entity/globalMerchant/globalMerc
2
2
  import { ID } from '../../../../commonStateTypes/common';
3
3
  import { RecommendedNonExistingGlobalMerchant } from '../../vendorFirstReviewView/vendorFirstReviewViewState';
4
4
  import { RecommendedNonExistingGlobalMerchantBasePayload, VendorReviewViewAllRecommendationsPayload } from '../payload/commonTypes';
5
- export declare const toVendorFirstReviewViewStatusesTypeStrict: (v: string) => "pending" | "reviewed" | "under_review" | "merge_in_qbo" | "review_rejected" | undefined;
5
+ export declare const toVendorFirstReviewViewStatusesTypeStrict: (v: string) => "pending" | "reviewed" | "under_review" | "merge_in_qbo" | "merge_in_netsuite" | "review_rejected" | undefined;
6
6
  declare type VendorFirstReviewViewStatusesKey = ReturnType<typeof toVendorFirstReviewViewStatusesTypeStrict>;
7
7
  export declare type ReviewStatus = {
8
8
  code: VendorFirstReviewViewStatusesKey;
@@ -11,6 +11,7 @@ const VENDOR_FIRST_REVIEW_VIEW_STATUSES = [
11
11
  'pending',
12
12
  'under_review',
13
13
  'merge_in_qbo',
14
+ 'merge_in_netsuite',
14
15
  'reviewed',
15
16
  'review_rejected',
16
17
  ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zeniai/client-epic-state",
3
- "version": "4.13.35",
3
+ "version": "4.13.37",
4
4
  "description": "Shared module between Web & Mobile containing required abstractions for state management, async network communication. ",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",