@zeniai/client-epic-state 4.11.97 → 4.11.99
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/commonPayloadTypes/balanceChangePayload.d.ts +3 -3
- package/lib/commonPayloadTypes/balanceChangePayload.js +2 -3
- package/lib/commonPayloadTypes/classesView/reportByClassPayloadV2.d.ts +2 -3
- package/lib/commonPayloadTypes/classesView/reportByClassPayloadV2.js +1 -1
- package/lib/commonPayloadTypes/coaBalancePayload.d.ts +3 -9
- package/lib/commonPayloadTypes/coaBalancePayload.js +1 -29
- package/lib/commonPayloadTypes/subAccountView/reportBySubAccountPayload.d.ts +3 -2
- package/lib/commonPayloadTypes/v2/coaBalancePayload.d.ts +2 -1
- package/lib/commonPayloadTypes/v2/getSumOfBalancesGroupedByPeriod.d.ts +0 -8
- package/lib/commonPayloadTypes/v2/getSumOfBalancesGroupedByPeriod.js +0 -83
- package/lib/commonStateTypes/accountView/nestedAccountID.d.ts +9 -8
- package/lib/commonStateTypes/accountView/nestedAccountID.js +4 -10
- package/lib/commonStateTypes/classesView/nestedClassID.d.ts +6 -8
- package/lib/commonStateTypes/classesView/nestedClassID.js +1 -10
- package/lib/commonStateTypes/coaBalance/additionalBalances/getSamePeriodLastYearBalance.d.ts +0 -1
- package/lib/commonStateTypes/coaBalance/additionalBalances/getSamePeriodLastYearBalance.js +1 -27
- package/lib/commonStateTypes/coaBalance/pickAndMergeForecast.d.ts +0 -2
- package/lib/commonStateTypes/coaBalance/pickAndMergeForecast.js +1 -2
- package/lib/commonStateTypes/customerView/nestedCustomerID.d.ts +6 -8
- package/lib/commonStateTypes/customerView/nestedCustomerID.js +0 -7
- package/lib/commonStateTypes/fiscalYearHelpers/formatZeniDateFY.d.ts +0 -3
- package/lib/commonStateTypes/fiscalYearHelpers/formatZeniDateFY.js +2 -5
- package/lib/commonStateTypes/reduceFetchState.d.ts +0 -18
- package/lib/commonStateTypes/reduceFetchState.js +7 -10
- package/lib/commonStateTypes/selectorTypes/pickAndMergeForecastSection.d.ts +0 -2
- package/lib/commonStateTypes/selectorTypes/pickAndMergeForecastSection.js +0 -12
- package/lib/commonStateTypes/selectorTypes/pickAndMergeForecastSectionWithAcOnly.d.ts +0 -2
- package/lib/commonStateTypes/selectorTypes/pickAndMergeForecastSectionWithAcOnly.js +0 -10
- package/lib/commonStateTypes/selectorTypes/sortOrderTypes.d.ts +2 -2
- package/lib/commonStateTypes/selectorTypes/sortOrderTypes.js +2 -4
- package/lib/commonStateTypes/timePeriod.d.ts +2 -3
- package/lib/commonStateTypes/timePeriod.js +1 -6
- package/lib/commonStateTypes/v2/viewAndReport.d.ts +0 -5
- package/lib/commonStateTypes/v2/viewAndReport.js +3 -0
- package/lib/commonStateTypes/viewAndReport/agingReportStateTypes.d.ts +2 -2
- package/lib/commonStateTypes/viewAndReport/agingReportStateTypes.js +3 -4
- package/lib/commonStateTypes/viewAndReport/viewAndReport.d.ts +0 -1
- package/lib/commonStateTypes/viewAndReport/viewAndReport.js +3 -3
- package/lib/commonStateTypes/workingDayHelper.d.ts +0 -1
- package/lib/commonStateTypes/workingDayHelper.js +6 -6
- package/lib/entity/account/accountPayload.d.ts +1 -6
- package/lib/entity/account/accountPayload.js +3 -19
- package/lib/entity/account/accountReducer.d.ts +1 -3
- package/lib/entity/account/accountReducer.js +2 -3
- package/lib/entity/account/accountState.d.ts +2 -1
- package/lib/entity/account/accountState.js +1 -2
- package/lib/entity/account/pickAndMergeForecastAccountReport.d.ts +0 -6
- package/lib/entity/account/pickAndMergeForecastAccountReport.js +1 -2
- package/lib/entity/accountGroup/accountGroupSelector.d.ts +2 -1
- package/lib/entity/accountGroup/accountGroupSelector.js +2 -3
- package/lib/entity/address/addressReducer.d.ts +1 -2
- package/lib/entity/address/addressReducer.js +1 -2
- package/lib/entity/approvalRule/approvalRulePayload.d.ts +1 -3
- package/lib/entity/approvalRule/approvalRulePayload.js +3 -5
- package/lib/entity/approvalRule/approvalRuleState.d.ts +3 -7
- package/lib/entity/approvalRule/approvalRuleState.js +1 -13
- package/lib/entity/billPay/billTransaction/billTransactionPayload.d.ts +3 -5
- package/lib/entity/billPay/billTransaction/billTransactionPayload.js +4 -7
- package/lib/entity/billPay/billTransaction/billTransactionState.d.ts +9 -8
- package/lib/entity/billPay/billTransaction/billTransactionState.js +1 -7
- package/lib/entity/billPay/recurringBills/recurringBillsPayload.d.ts +2 -4
- package/lib/entity/billPay/recurringBills/recurringBillsPayload.js +3 -5
- package/lib/entity/chargeCard/chargeCard.d.ts +6 -7
- package/lib/entity/chargeCard/chargeCard.js +2 -7
- package/lib/entity/chargeCardTransaction/chargeCardTransaction.d.ts +3 -3
- package/lib/entity/chargeCardTransaction/chargeCardTransaction.js +1 -3
- package/lib/entity/chargeCardTransaction/chargeCardTransactionPayload.d.ts +2 -1
- package/lib/entity/chargeCardTransaction/chargeCardTransactionSelector.d.ts +0 -1
- package/lib/entity/chargeCardTransaction/chargeCardTransactionSelector.js +1 -2
- package/lib/entity/class/classPayload.d.ts +0 -4
- package/lib/entity/class/classPayload.js +1 -16
- package/lib/entity/class/classSelectorV2.d.ts +1 -8
- package/lib/entity/class/classSelectorV2.js +1 -2
- package/lib/entity/company/companyHelper.d.ts +0 -2
- package/lib/entity/company/companyHelper.js +2 -7
- package/lib/entity/company/companyPayload.d.ts +17 -24
- package/lib/entity/company/companyPayload.js +9 -17
- package/lib/entity/company/companyStateTypes.d.ts +6 -7
- package/lib/entity/company/companyStateTypes.js +3 -6
- package/lib/entity/companyHealthMetric/companyHealthMetricPayload.d.ts +5 -6
- package/lib/entity/companyHealthMetric/companyHealthMetricPayload.js +3 -5
- package/lib/entity/currency/currencySelector.d.ts +0 -3
- package/lib/entity/currency/currencySelector.js +1 -3
- package/lib/entity/customer/customerSelector.d.ts +2 -3
- package/lib/entity/customer/customerSelector.js +1 -8
- package/lib/entity/customerSatisfaction/customerSatisfactionReducerHelpers.d.ts +2 -4
- package/lib/entity/customerSatisfaction/customerSatisfactionReducerHelpers.js +3 -5
- package/lib/entity/customerSatisfaction/customerSatisfactionState.d.ts +1 -1
- package/lib/entity/customerSatisfaction/customerSatisfactionState.js +1 -2
- package/lib/entity/depositAccount/depositAccount.d.ts +3 -4
- package/lib/entity/depositAccount/depositAccount.js +1 -5
- package/lib/entity/depositAccountTransaction/depositAccountTransaction.d.ts +2 -2
- package/lib/entity/depositAccountTransaction/depositAccountTransaction.js +3 -3
- package/lib/entity/depositAccountTransaction/depositAccountTransactionPayload.d.ts +2 -1
- package/lib/entity/depositAccountTransaction/depositAccountTransactionSelector.d.ts +0 -1
- package/lib/entity/depositAccountTransaction/depositAccountTransactionSelector.js +1 -2
- package/lib/entity/entityApprovalStatus/entityApprovalStatusPayload.d.ts +2 -6
- package/lib/entity/entityApprovalStatus/entityApprovalStatusPayload.js +3 -5
- package/lib/entity/entityApprovalStatus/entityApprovalStatusState.d.ts +3 -4
- package/lib/entity/entityApprovalStatus/entityApprovalStatusState.js +1 -6
- package/lib/entity/file/filePayload.d.ts +2 -1
- package/lib/entity/file/fileState.d.ts +7 -21
- package/lib/entity/file/fileState.js +15 -34
- package/lib/entity/genericEntity/entity.d.ts +2 -1
- package/lib/entity/globalMerchant/globalMerchantPayload.d.ts +1 -4
- package/lib/entity/globalMerchant/globalMerchantPayload.js +2 -32
- package/lib/entity/globalMerchant/globalMerchantState.d.ts +2 -1
- package/lib/entity/insights/insightReducer.d.ts +1 -2
- package/lib/entity/insights/insightReducer.js +2 -3
- package/lib/entity/insights/insightState.d.ts +2 -1
- package/lib/entity/insights/insightState.js +0 -2
- package/lib/entity/jeSchedules/jeSchedulesPayload.d.ts +1 -2
- package/lib/entity/jeSchedules/jeSchedulesPayload.js +1 -2
- package/lib/entity/notification/types/notificationSelectorTypes.d.ts +2 -1
- package/lib/entity/notification/types/notificationTypes.d.ts +2 -11
- package/lib/entity/notification/types/notificationTypes.js +15 -24
- package/lib/entity/paymentAccount/paymentAccountPayload.d.ts +3 -3
- package/lib/entity/paymentAccount/paymentAccountPayload.js +2 -3
- package/lib/entity/portfolio/accountingSummary/accountingSummaryPayload.d.ts +3 -2
- package/lib/entity/reimbursement/reimbursementPayload.d.ts +9 -22
- package/lib/entity/reimbursement/reimbursementPayload.js +16 -32
- package/lib/entity/reimbursement/reimbursementState.d.ts +2 -1
- package/lib/entity/subscription/subscriptionAddOn/subscriptionAddOnSelector.d.ts +0 -1
- package/lib/entity/subscription/subscriptionAddOn/subscriptionAddOnSelector.js +1 -2
- package/lib/entity/subscription/subscriptionCoupon/subscriptionCouponSelector.d.ts +0 -1
- package/lib/entity/subscription/subscriptionCoupon/subscriptionCouponSelector.js +1 -2
- package/lib/entity/subscription/subscriptionPlan/subscriptionPlanReducer.d.ts +1 -5
- package/lib/entity/subscription/subscriptionPlan/subscriptionPlanReducer.js +1 -2
- package/lib/entity/subscription/subscriptionSummary/subscriptionSummarySelector.d.ts +0 -1
- package/lib/entity/subscription/subscriptionSummary/subscriptionSummarySelector.js +1 -2
- package/lib/entity/task/taskState.d.ts +2 -5
- package/lib/entity/task/taskState.js +3 -10
- package/lib/entity/tenant/tenantSelector.d.ts +2 -2
- package/lib/entity/tenant/tenantSelector.js +1 -2
- package/lib/entity/toastNotification/toastNotificationState.d.ts +3 -6
- package/lib/entity/toastNotification/toastNotificationState.js +3 -3
- package/lib/entity/transaction/payloadTypes/transactionLinePayload.d.ts +11 -21
- package/lib/entity/transaction/payloadTypes/transactionLinePayload.js +10 -17
- package/lib/entity/transaction/stateTypes/attachment.d.ts +2 -1
- package/lib/entity/transaction/stateTypes/paymentType.d.ts +2 -1
- package/lib/entity/transaction/stateTypes/paymentType.js +1 -2
- package/lib/entity/transaction/stateTypes/transactionType.d.ts +6 -10
- package/lib/entity/transaction/stateTypes/transactionType.js +1 -14
- package/lib/entity/user/userReducer.d.ts +1 -3
- package/lib/entity/user/userReducer.js +2 -3
- package/lib/entity/user/userState.d.ts +2 -1
- package/lib/entity/userRole/userRoleState.d.ts +2 -2
- package/lib/entity/userRole/userRoleState.js +2 -4
- package/lib/entity/userRole/userRoleType.d.ts +0 -6
- package/lib/entity/userRole/userRoleType.js +9 -27
- package/lib/entity/vendor/vendorPayload.d.ts +2 -1
- package/lib/entity/vendorExpense/vendorExpenseReducer.d.ts +1 -2
- package/lib/entity/vendorExpense/vendorExpenseReducer.js +7 -7
- package/lib/entity/vendorExpense/vendorExpenseSelector.d.ts +2 -1
- package/lib/entity/vendorExpense/vendorExpenseSelector.js +1 -2
- package/lib/entity/vendorExpense/vendorExpenseTrend.d.ts +2 -1
- package/lib/index.d.ts +56 -56
- package/lib/index.js +9 -9
- package/lib/responsePayload.d.ts +2 -1
- package/lib/view/accountList/accountListPayload.d.ts +2 -1
- package/lib/view/accountMappingView/accountMappingPayload.d.ts +0 -3
- package/lib/view/accountMappingView/accountTypeRecommendation/accountTypeRecommendationPayload.d.ts +8 -7
- package/lib/view/addressView/addressViewPayload.d.ts +2 -1
- package/lib/view/apAgingView/apAgingDetail/apAgingDetailState.d.ts +2 -1
- package/lib/view/arAgingView/arAgingDetail/arAgingDetailState.d.ts +2 -1
- package/lib/view/arAgingView/arAgingReport/arAgingPayload.d.ts +1 -1
- package/lib/view/auditReportView/auditReportViewPayload.d.ts +2 -1
- package/lib/view/auditReportView/auditReportViewState.d.ts +3 -5
- package/lib/view/auditReportView/auditReportViewState.js +5 -6
- package/lib/view/autoComplete/entityAutoCompleteReducer.d.ts +1 -1
- package/lib/view/balanceSheet/balanceSheetPayload.d.ts +14 -17
- package/lib/view/balanceSheet/balanceSheetPayload.js +1 -13
- package/lib/view/balanceSheet/balanceSheetSelectorTypes.d.ts +19 -25
- package/lib/view/balanceSheet/balanceSheetSelectorTypes.js +27 -36
- package/lib/view/bankAccountView/bankAccountViewPayload.d.ts +5 -4
- package/lib/view/billPayCard/billPayCardPayload.d.ts +3 -3
- package/lib/view/billPayCard/billPayCardState.d.ts +3 -2
- package/lib/view/billPayCard/billPayCardState.js +0 -2
- package/lib/view/cardPayment/cardPaymentViewPayload.d.ts +3 -3
- package/lib/view/cardPayment/cardPaymentViewTypes.d.ts +2 -3
- package/lib/view/cardPayment/cardPaymentViewTypes.js +4 -6
- package/lib/view/cashFlow/cashFlowPayload.d.ts +7 -8
- package/lib/view/cashFlow/cashFlowPayload.js +5 -8
- package/lib/view/cashFlow/cashFlowSelectorTypes.d.ts +17 -23
- package/lib/view/cashFlow/cashFlowSelectorTypes.js +21 -28
- package/lib/view/cashInCashOut/cashInCashOutSelectorTypes.d.ts +3 -4
- package/lib/view/cashInCashOut/cashInCashOutSelectorTypes.js +3 -12
- package/lib/view/classList/classListPayload.d.ts +2 -1
- package/lib/view/common/recurringViewHelper.d.ts +2 -2
- package/lib/view/common/recurringViewHelper.js +1 -4
- package/lib/view/commonVendorView/transactionVendorView/transactionVendorViewPayload.d.ts +2 -1
- package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewSelector.d.ts +0 -1
- package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewSelector.js +1 -3
- package/lib/view/companyConfigView/companyConfigPayload.d.ts +2 -1
- package/lib/view/companyHealthMetricView/companyHealthMetricViewPayload.d.ts +2 -1
- package/lib/view/companyHealthMetricView/companyHealthMetricViewSelector.d.ts +6 -11
- package/lib/view/companyHealthMetricView/companyHealthMetricViewSelector.js +8 -13
- package/lib/view/companyMonthEndReportView/companyMonthEndReportViewPayload.d.ts +3 -2
- package/lib/view/companyMonthEndReportView/companyMonthEndReportViewSelector.d.ts +0 -4
- package/lib/view/companyMonthEndReportView/companyMonthEndReportViewSelector.js +2 -3
- package/lib/view/companyMonthEndReportView/companyMonthEndReportViewState.d.ts +2 -2
- package/lib/view/companyView/companyViewPayload.d.ts +10 -9
- package/lib/view/companyView/helpers/cockpitHelpers.d.ts +0 -1
- package/lib/view/companyView/helpers/cockpitHelpers.js +3 -3
- package/lib/view/companyView/selector/companyManagementViewSelector.d.ts +0 -2
- package/lib/view/companyView/selector/companyManagementViewSelector.js +4 -5
- package/lib/view/companyView/types/cockpitTypes.d.ts +0 -7
- package/lib/view/companyView/types/cockpitTypes.js +11 -19
- package/lib/view/companyView/types/companyMetaDataViewState.d.ts +2 -1
- package/lib/view/companyView/types/companyPassportViewPayload.d.ts +6 -5
- package/lib/view/fileView/fileViewPayload.d.ts +2 -1
- package/lib/view/fileView/fileViewState.d.ts +2 -1
- package/lib/view/forecastList/forecastListPayload.d.ts +2 -1
- package/lib/view/globalMerchantView/epics/createGlobalMerchantEpic.d.ts +0 -7
- package/lib/view/globalMerchantView/epics/createGlobalMerchantEpic.js +2 -3
- package/lib/view/globalMerchantView/globalMerchantAutoCompleteView/globalMerchantAutoCompleteViewReducer.d.ts +1 -1
- package/lib/view/globalMerchantView/globalMerchantAutoCompleteView/globalMerchantAutoCompleteViewState.d.ts +0 -1
- package/lib/view/globalMerchantView/globalMerchantAutoCompleteView/globalMerchantAutoCompleteViewState.js +1 -3
- package/lib/view/globalMerchantView/globalMerchantViewPayload.d.ts +1 -1
- package/lib/view/netBurnOrIncome/netBurnOrIncomeSelector.d.ts +0 -1
- package/lib/view/netBurnOrIncome/netBurnOrIncomeSelector.js +1 -2
- package/lib/view/netBurnOrIncome/netBurnOrIncomeSelectorTypes.d.ts +4 -6
- package/lib/view/netBurnOrIncome/netBurnOrIncomeSelectorTypes.js +1 -3
- package/lib/view/netBurnOrIncomeClassesView/netBurnOrIncomeClassesViewSelectorTypes.d.ts +3 -3
- package/lib/view/netBurnOrIncomeClassesView/netBurnOrIncomeClassesViewSelectorTypes.js +4 -6
- package/lib/view/netBurnOrIncomeStoryCard/netBurnOrIncomeStoryCardPayload.d.ts +9 -11
- package/lib/view/netBurnOrIncomeStoryCard/netBurnOrIncomeStoryCardPayload.js +3 -4
- package/lib/view/netBurnOrIncomeStoryCard/netBurnOrIncomeStoryCardSelectorTypes.d.ts +0 -1
- package/lib/view/netBurnOrIncomeStoryCard/netBurnOrIncomeStoryCardSelectorTypes.js +1 -3
- package/lib/view/netBurnOrIncomeStoryCard/netBurnOrIncomeStoryCardState.d.ts +0 -2
- package/lib/view/netBurnOrIncomeStoryCard/netBurnOrIncomeStoryCardState.js +1 -5
- package/lib/view/notificationView/notificationViewPayload.d.ts +3 -17
- package/lib/view/notificationView/notificationViewState.d.ts +3 -4
- package/lib/view/notificationView/notificationViewState.js +7 -9
- package/lib/view/onboardingView/cockpitView/onboardingCockpitViewPayload.d.ts +1 -15
- package/lib/view/onboardingView/cockpitView/onboardingCockpitViewState.d.ts +2 -1
- package/lib/view/onboardingView/cockpitView/types/onboardingCockpitViewTypes.d.ts +2 -4
- package/lib/view/onboardingView/cockpitView/types/onboardingCockpitViewTypes.js +6 -9
- package/lib/view/onboardingView/customerView/epic/customerDetails/updateOnboardingCustomerViewEpic.d.ts +0 -6
- package/lib/view/onboardingView/customerView/epic/customerDetails/updateOnboardingCustomerViewEpic.js +2 -3
- package/lib/view/onboardingView/customerView/epic/customerDetails/updateOnboardingCustomerViewLocalStoreDataEpic.d.ts +0 -8
- package/lib/view/onboardingView/customerView/epic/customerDetails/updateOnboardingCustomerViewLocalStoreDataEpic.js +1 -2
- package/lib/view/onboardingView/customerView/onboardingCustomerViewPayload.d.ts +3 -2
- package/lib/view/onboardingView/customerView/onboardingCustomerViewSelector.d.ts +0 -6
- package/lib/view/onboardingView/customerView/onboardingCustomerViewSelector.js +1 -4
- package/lib/view/onboardingView/customerView/onboardingCustomerViewState.d.ts +1 -2
- package/lib/view/onboardingView/customerView/onboardingCustomerViewState.js +5 -7
- package/lib/view/opEx/opExSelector.d.ts +0 -13
- package/lib/view/opEx/opExSelector.js +3 -4
- package/lib/view/opExByVendor/opExByVendorPayload.d.ts +4 -3
- package/lib/view/opExByVendor/opExByVendorState.d.ts +0 -1
- package/lib/view/opExByVendor/opExByVendorState.js +3 -3
- package/lib/view/opExClassesView/opExClassesViewSelectorTypes.d.ts +3 -3
- package/lib/view/opExClassesView/opExClassesViewSelectorTypes.js +4 -6
- package/lib/view/people/peopleTypes.d.ts +2 -2
- package/lib/view/people/peopleTypes.js +2 -4
- package/lib/view/profitAndLoss/profitAndLossSelector.d.ts +1 -1
- package/lib/view/profitAndLoss/profitAndLossSelector.js +2 -6
- package/lib/view/profitAndLossClassesView/profitAndLossClassesViewSelectorTypes.d.ts +3 -2
- package/lib/view/profitAndLossClassesView/profitAndLossClassesViewSelectorTypes.js +1 -3
- package/lib/view/recommendation/recommendationPayload.d.ts +3 -2
- package/lib/view/referralView/referralPayload.d.ts +4 -3
- package/lib/view/referralView/referralState.d.ts +3 -4
- package/lib/view/referralView/referralState.js +5 -10
- package/lib/view/reimbursementCard/reimbursementCardPayload.d.ts +4 -4
- package/lib/view/reimbursementCard/reimbursementCardState.d.ts +3 -2
- package/lib/view/reimbursementCard/reimbursementCardState.js +0 -2
- package/lib/view/revenue/revenueSelector.d.ts +0 -15
- package/lib/view/revenue/revenueSelector.js +1 -2
- package/lib/view/revenue/revenueSelectorTypes.d.ts +4 -6
- package/lib/view/revenue/revenueSelectorTypes.js +1 -3
- package/lib/view/revenueClassesView/revenueClassesViewSelectorTypes.d.ts +3 -3
- package/lib/view/revenueClassesView/revenueClassesViewSelectorTypes.js +4 -6
- package/lib/view/reviewCompanyView/reviewCompanyPayload.d.ts +2 -1
- package/lib/view/reviewCompanyView/reviewCompanyViewState.d.ts +0 -1
- package/lib/view/reviewCompanyView/reviewCompanyViewState.js +3 -3
- package/lib/view/scheduleView/scheduleDetailView/scheduleDetailLocalDataHelper.d.ts +0 -1
- package/lib/view/scheduleView/scheduleDetailView/scheduleDetailLocalDataHelper.js +3 -3
- package/lib/view/scheduleView/scheduleDetailView/scheduleDetailPayload.d.ts +7 -14
- package/lib/view/scheduleView/scheduleDetailView/scheduleDetailPayload.js +8 -13
- package/lib/view/scheduleView/scheduleDetailView/scheduleDetailTypes.d.ts +2 -2
- package/lib/view/scheduleView/scheduleDetailView/scheduleDetailTypes.js +2 -4
- package/lib/view/scheduleView/scheduleListView/scheduleListHelper.d.ts +2 -28
- package/lib/view/scheduleView/scheduleListView/scheduleListHelper.js +4 -24
- package/lib/view/scheduleView/scheduleListView/scheduleListPayload.d.ts +2 -1
- package/lib/view/scheduleView/scheduleListView/scheduleListTypes.d.ts +2 -4
- package/lib/view/scheduleView/scheduleListView/scheduleListTypes.js +7 -8
- package/lib/view/settingsView/epic/fetchMyProfileEpic.d.ts +0 -6
- package/lib/view/settingsView/epic/fetchMyProfileEpic.js +1 -3
- package/lib/view/settingsView/settingsViewPayload.d.ts +3 -2
- package/lib/view/spendManagement/billPay/billDetailView/billDetailViewPayload.d.ts +2 -1
- package/lib/view/spendManagement/billPay/billList/billListSelector.d.ts +3 -4
- package/lib/view/spendManagement/billPay/billList/billListSelector.js +3 -5
- package/lib/view/spendManagement/billPay/billList/billListState.d.ts +4 -4
- package/lib/view/spendManagement/billPay/billList/billListState.js +3 -6
- package/lib/view/spendManagement/billPay/billPayConfig/billPayConfigPayload.d.ts +15 -35
- package/lib/view/spendManagement/billPay/billPayConfig/billPayConfigPayload.js +7 -13
- package/lib/view/spendManagement/billPay/billPayConfig/billPayConfigSelector.d.ts +2 -1
- package/lib/view/spendManagement/billPay/billPayConfig/billPayConfigState.d.ts +10 -15
- package/lib/view/spendManagement/billPay/billPayConfig/billPayConfigState.js +15 -21
- package/lib/view/spendManagement/billPay/billPayReview/billPayReviewPayload.d.ts +3 -2
- package/lib/view/spendManagement/billPay/billPaySetupApproverView/billPaySetupApproverViewPayload.d.ts +2 -1
- package/lib/view/spendManagement/billPay/billPaySetupApproverView/types/commonPayload.d.ts +2 -2
- package/lib/view/spendManagement/billPay/billPaySetupView/billPaySetupViewPayload.d.ts +3 -4
- package/lib/view/spendManagement/billPay/billPaySetupView/types/billPayTerms.d.ts +2 -1
- package/lib/view/spendManagement/billPay/billsBulkActionView/billsBulkActionViewPayload.d.ts +4 -3
- package/lib/view/spendManagement/billPay/billsBulkActionView/billsBulkActionViewSelector.d.ts +2 -1
- package/lib/view/spendManagement/billPay/billsBulkActionView/billsBulkActionViewState.d.ts +0 -2
- package/lib/view/spendManagement/billPay/billsBulkActionView/billsBulkActionViewState.js +5 -5
- package/lib/view/spendManagement/billPay/editBillView/editBillViewPayload.d.ts +3 -30
- package/lib/view/spendManagement/billPay/editBillView/editBillViewPayload.js +1 -25
- package/lib/view/spendManagement/billPay/editBillView/editBillViewSelector.d.ts +0 -2
- package/lib/view/spendManagement/billPay/editBillView/editBillViewSelector.js +2 -4
- package/lib/view/spendManagement/billPay/editBillView/editBillViewState.d.ts +2 -2
- package/lib/view/spendManagement/billPay/editBillView/editBillViewState.js +3 -4
- package/lib/view/spendManagement/billPay/editBillView/epics/saveBillDetailEpic.d.ts +0 -8
- package/lib/view/spendManagement/billPay/editBillView/epics/saveBillDetailEpic.js +3 -4
- package/lib/view/spendManagement/billPay/internationalWire/internationalWire.d.ts +2 -1
- package/lib/view/spendManagement/billPay/internationalWire/internationalWirePayload.d.ts +5 -10
- package/lib/view/spendManagement/billPay/internationalWire/internationalWirePayload.js +3 -5
- package/lib/view/spendManagement/billPay/magicLinkView/magicLinkViewPayload.d.ts +7 -6
- package/lib/view/spendManagement/billPay/previousBills/previousBillsState.d.ts +2 -1
- package/lib/view/spendManagement/chargeCards/cashbackDetail/cashbackDetailPayload.d.ts +2 -1
- package/lib/view/spendManagement/chargeCards/cashbackDetail/cashbackDetailReducer.d.ts +0 -11
- package/lib/view/spendManagement/chargeCards/cashbackDetail/cashbackDetailReducer.js +3 -5
- package/lib/view/spendManagement/chargeCards/chargeCardConfig/chargeCardConfigPayload.d.ts +3 -2
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetail.d.ts +3 -2
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetailPayload.d.ts +3 -2
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardList.d.ts +0 -2
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardList.js +5 -5
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListPayload.d.ts +2 -1
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListReducer.d.ts +1 -2
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListReducer.js +2 -3
- package/lib/view/spendManagement/chargeCards/chargeCardSetUp/chargeCardSetUpViewPayload.d.ts +2 -2
- package/lib/view/spendManagement/chargeCards/chargeCardSetUp/chargeCardSetUpViewState.d.ts +0 -2
- package/lib/view/spendManagement/chargeCards/chargeCardSetUp/types/chargeCardTerms.d.ts +2 -1
- package/lib/view/spendManagement/commonHistoryView/commonHistory.d.ts +4 -3
- package/lib/view/spendManagement/commonHistoryView/commonHistoryPayload.d.ts +5 -5
- package/lib/view/spendManagement/commonHistoryView/commonHistoryPayload.js +2 -3
- package/lib/view/spendManagement/commonSetup/epic/setup/updateBusinessVerificationDetailsEpic.d.ts +1 -5
- package/lib/view/spendManagement/commonSetup/epic/setup/updateBusinessVerificationDetailsEpic.js +1 -13
- package/lib/view/spendManagement/commonSetup/setupViewSelector.d.ts +2 -5
- package/lib/view/spendManagement/commonSetup/setupViewSelector.js +1 -2
- package/lib/view/spendManagement/commonSetup/setupViewState.d.ts +2 -3
- package/lib/view/spendManagement/commonSetup/setupViewState.js +2 -6
- package/lib/view/spendManagement/helpers.d.ts +1 -3
- package/lib/view/spendManagement/helpers.js +3 -5
- package/lib/view/spendManagement/merchantList/merchantListPayload.d.ts +2 -1
- package/lib/view/spendManagement/plaidAccount/types/plaidConnection.d.ts +2 -1
- package/lib/view/spendManagement/realTimeApprovalView/realTimeApprovalPayload.d.ts +2 -1
- package/lib/view/spendManagement/realTimeApprovalView/realTimeApprovalState.d.ts +3 -2
- package/lib/view/spendManagement/reimbursement/editRemiView/editRemiViewPayload.d.ts +2 -2
- package/lib/view/spendManagement/reimbursement/editRemiView/editRemiViewSelector.d.ts +2 -3
- package/lib/view/spendManagement/reimbursement/editRemiView/editRemiViewSelector.js +1 -22
- package/lib/view/spendManagement/reimbursement/editRemiView/editRemiViewState.d.ts +2 -1
- package/lib/view/spendManagement/reimbursement/editRemiView/epics/fetchRemiAndInitializeLocalStoreEpic.d.ts +0 -6
- package/lib/view/spendManagement/reimbursement/editRemiView/epics/fetchRemiAndInitializeLocalStoreEpic.js +2 -12
- package/lib/view/spendManagement/reimbursement/reimbursementConfig/reimbursementConfigPayload.d.ts +2 -1
- package/lib/view/spendManagement/reimbursement/reimbursementConfig/reimbursementConfigSelector.d.ts +0 -1
- package/lib/view/spendManagement/reimbursement/reimbursementConfig/reimbursementConfigSelector.js +1 -8
- package/lib/view/spendManagement/reimbursement/reimbursementConfig/reimbursementConfigState.d.ts +2 -1
- package/lib/view/spendManagement/reimbursement/reimbursementConfig/reimbursementConfigState.js +1 -2
- package/lib/view/spendManagement/reimbursement/remiDetailView/remiDetailViewPayload.d.ts +4 -3
- package/lib/view/spendManagement/reimbursement/remiListView/remiListState.d.ts +2 -2
- package/lib/view/spendManagement/reimbursement/remiListView/remiListState.js +3 -4
- package/lib/view/spendManagement/reimbursement/remiSetupApproverView/remiSetupApproverViewPayload.d.ts +2 -1
- package/lib/view/spendManagement/reimbursement/remiSetupView/epic/remiSetup/updateRemiSetupViewLocalStoreDataEpic.d.ts +0 -8
- package/lib/view/spendManagement/reimbursement/remiSetupView/epic/remiSetup/updateRemiSetupViewLocalStoreDataEpic.js +1 -2
- package/lib/view/spendManagement/reimbursement/remiSetupView/remiSetupViewPayload.d.ts +3 -2
- package/lib/view/spendManagement/reimbursement/remiSetupView/remiSetupViewState.d.ts +1 -2
- package/lib/view/spendManagement/reimbursement/remiSetupView/remiSetupViewState.js +1 -3
- package/lib/view/spendManagement/reimbursement/remiSetupView/types/remiTerms.d.ts +3 -2
- package/lib/view/spendManagement/spendManagementFilterHelpers.d.ts +3 -7
- package/lib/view/spendManagement/spendManagementFilterHelpers.js +4 -7
- package/lib/view/spendManagement/zeniAccounts/depositAccountDetail/depositAccountDetailPayload.d.ts +3 -2
- package/lib/view/spendManagement/zeniAccounts/depositAccountTransactionList/depositAccountTransactionListPayload.d.ts +3 -2
- package/lib/view/spendManagement/zeniAccounts/depositAccountTransactionList/depositAccountTransactionListState.d.ts +2 -1
- package/lib/view/spendManagement/zeniAccounts/transferDetail/transferDetailPayload.d.ts +3 -2
- package/lib/view/spendManagement/zeniAccounts/transferDetail/transferDetailState.d.ts +2 -1
- package/lib/view/spendManagement/zeniAccounts/zeniAccountList/zeniAccountListState.d.ts +2 -1
- package/lib/view/spendManagement/zeniAccounts/zeniAccountList/zeniAccountListState.js +1 -2
- package/lib/view/spendManagement/zeniAccounts/zeniAccountSetUp/types/zeniAccountTerms.d.ts +2 -1
- package/lib/view/spendManagement/zeniAccounts/zeniAccountSetUp/zeniAccountSetupViewPayload.d.ts +2 -2
- package/lib/view/spendManagement/zeniAccounts/zeniAccountsConfig/zeniAccountsConfigPayload.d.ts +4 -4
- package/lib/view/spendManagement/zeniAccounts/zeniAccountsConfig/zeniAccountsConfigPayload.js +2 -3
- package/lib/view/spendManagement/zeniAccounts/zeniAccountsConfig/zeniAccountsConfigState.d.ts +2 -1
- package/lib/view/subscriptionView/subscriptionEstmiatePayload.d.ts +1 -1
- package/lib/view/subscriptionView/subscriptionViewPayload.d.ts +9 -8
- package/lib/view/subscriptionView/subscriptionViewState.d.ts +3 -2
- package/lib/view/subscriptionView/types/subscriptionEstmiate.d.ts +4 -3
- package/lib/view/subscriptionView/types/subscriptionTypes.d.ts +2 -2
- package/lib/view/subscriptionView/types/subscriptionTypes.js +3 -4
- package/lib/view/tagView/tagViewPayload.d.ts +2 -2
- package/lib/view/taskManager/taskDetailView/epics/archiveTaskEpic.d.ts +0 -7
- package/lib/view/taskManager/taskGroupView/taskGroupViewPayload.d.ts +2 -1
- package/lib/view/taskManager/taskListView/taskList.d.ts +2 -7
- package/lib/view/taskManager/taskListView/taskList.js +3 -4
- package/lib/view/taskManager/taskListView/taskListPayload.d.ts +2 -1
- package/lib/view/transactionDetail/transactionDetailPayload.d.ts +1 -1
- package/lib/view/transactionList/parallelFetchEntityTransactionListEpic.d.ts +0 -8
- package/lib/view/transactionList/parallelFetchEntityTransactionListEpic.js +1 -2
- package/lib/view/transactionList/transactionListByEntitySelector.d.ts +0 -2
- package/lib/view/transactionList/transactionListByEntitySelector.js +1 -2
- package/lib/view/transactionList/transactionListPayload.d.ts +5 -4
- package/lib/view/transactionList/transactionListState.d.ts +5 -4
- package/lib/view/trend/trendPayload.d.ts +4 -3
- package/lib/view/trendWithTransactions/trendWithTransactionsState.d.ts +2 -1
- package/lib/view/twoFactorAuthentication/twoFactorAuthenticationPayload.d.ts +3 -2
- package/lib/view/userFinancialAccount/fetchUserFinancialAccountEpic.d.ts +0 -2
- package/lib/view/userFinancialAccount/fetchUserFinancialAccountEpic.js +2 -3
- package/lib/view/userFinancialAccount/userFinancialAccountSelector.d.ts +0 -1
- package/lib/view/userFinancialAccount/userFinancialAccountSelector.js +2 -3
- package/lib/view/userListView/userListViewPayload.d.ts +2 -1
- package/lib/view/userRoleConfigView/userRoleConfigPayload.d.ts +2 -1
- package/lib/view/vendorList/vendorListPayload.d.ts +2 -5
- package/lib/view/vendorList/vendorListSelector.d.ts +0 -1
- package/lib/view/vendorList/vendorListSelector.js +1 -3
- package/lib/view/vendorReviewView/common/state/commonTypes.d.ts +3 -5
- package/lib/view/vendorReviewView/common/state/commonTypes.js +4 -26
- package/lib/view/vendorReviewView/vendorFirstReviewView/epics/fetchVendorFirstReviewAttachmentsEpic.d.ts +0 -3
- package/lib/view/vendorReviewView/vendorFirstReviewView/vendorFirstReviewViewPayload.d.ts +3 -3
- package/lib/view/vendorReviewView/vendorFirstReviewView/vendorFirstReviewViewSelector.d.ts +2 -1
- package/lib/view/vendorReviewView/vendorFirstReviewView/vendorFirstReviewViewState.d.ts +2 -2
- package/lib/view/vendorReviewView/vendorFirstReviewView/vendorFirstReviewViewState.js +3 -3
- package/lib/view/vendorReviewView/vendorGlobalReviewView/vendorGlobalReviewViewPayload.d.ts +2 -3
- package/lib/view/vendorReviewView/vendorGlobalReviewView/vendorGlobalReviewViewPayload.js +3 -5
- package/lib/view/vendorReviewView/vendorGlobalReviewView/vendorGlobalReviewViewState.d.ts +0 -2
- package/lib/view/vendorReviewView/vendorGlobalReviewView/vendorGlobalReviewViewState.js +3 -5
- package/lib/view/vendorTypeList/vendorTypeListPayload.d.ts +2 -1
- package/lib/view/vendorTypeList/vendorTypeSelector.d.ts +0 -12
- package/lib/view/vendorTypeList/vendorTypeSelector.js +0 -11
- package/lib/view/zeniAccStatementList/zeniAccStatementListPayload.d.ts +2 -1
- package/package.json +5 -3
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.reduceAnyCompletedFetchState = exports.reduceAllFetchState = exports.reduceAnyFetchState = exports.
|
|
3
|
+
exports.reduceAnyCompletedFetchState = exports.reduceAllFetchState = exports.reduceAnyFetchState = exports.isAnyFetchCompleted = exports.isAnyFetchInProgress = exports.reduceFetchState = exports.isAllFetchCompleted = void 0;
|
|
4
4
|
/**
|
|
5
5
|
* Reduces list of fetch state to boolean
|
|
6
6
|
* @param fetchStateList list of fetch states
|
|
@@ -9,7 +9,6 @@ exports.reduceAnyCompletedFetchState = exports.reduceAllFetchState = exports.red
|
|
|
9
9
|
const isAllFetchInProgress = (fetchStateList) => fetchStateList.reduce((prevValue, currentValue) => {
|
|
10
10
|
return prevValue === true && currentValue.fetchState === 'In-Progress';
|
|
11
11
|
}, true);
|
|
12
|
-
exports.isAllFetchInProgress = isAllFetchInProgress;
|
|
13
12
|
/**
|
|
14
13
|
* Reduces list of fetch state to boolean
|
|
15
14
|
* @param fetchStateList list of fetch states
|
|
@@ -27,7 +26,6 @@ exports.isAllFetchCompleted = isAllFetchCompleted;
|
|
|
27
26
|
const isAnyFetchErroredOut = (fetchStateList) => fetchStateList.reduce((prevValue, currentValue) => {
|
|
28
27
|
return prevValue === true || currentValue.fetchState === 'Error';
|
|
29
28
|
}, false);
|
|
30
|
-
exports.isAnyFetchErroredOut = isAnyFetchErroredOut;
|
|
31
29
|
const reduceError = (fetchStateList) => fetchStateList.reduce((prevValue, currentValue) => {
|
|
32
30
|
return prevValue !== null && prevValue !== void 0 ? prevValue : currentValue.error;
|
|
33
31
|
}, undefined);
|
|
@@ -37,9 +35,9 @@ const reduceError = (fetchStateList) => fetchStateList.reduce((prevValue, curren
|
|
|
37
35
|
* @return single fetchStateWithError
|
|
38
36
|
*/
|
|
39
37
|
function reduceFetchState(fetchStateList) {
|
|
40
|
-
const isAllInProgress =
|
|
38
|
+
const isAllInProgress = isAllFetchInProgress(fetchStateList);
|
|
41
39
|
const isAllCompleted = (0, exports.isAllFetchCompleted)(fetchStateList);
|
|
42
|
-
const isAnyError =
|
|
40
|
+
const isAnyError = isAnyFetchErroredOut(fetchStateList);
|
|
43
41
|
const error = reduceError(fetchStateList);
|
|
44
42
|
let fetchState = 'Not-Started';
|
|
45
43
|
if (isAllInProgress) {
|
|
@@ -83,7 +81,6 @@ exports.isAnyFetchCompleted = isAnyFetchCompleted;
|
|
|
83
81
|
const isAllFetchErroredOut = (fetchStateList) => fetchStateList.reduce((prevValue, currentValue) => {
|
|
84
82
|
return prevValue === true && currentValue.fetchState === 'Error';
|
|
85
83
|
}, true);
|
|
86
|
-
exports.isAllFetchErroredOut = isAllFetchErroredOut;
|
|
87
84
|
/**
|
|
88
85
|
* Reduces list of fetch state to single fetchState
|
|
89
86
|
* @param fetchStateList list of fetch states
|
|
@@ -92,7 +89,7 @@ exports.isAllFetchErroredOut = isAllFetchErroredOut;
|
|
|
92
89
|
// TODO - Better name for other variants
|
|
93
90
|
const reduceAnyFetchState = (fetchStateList) => {
|
|
94
91
|
let fetchState = 'Not-Started';
|
|
95
|
-
if (
|
|
92
|
+
if (isAnyFetchErroredOut(fetchStateList)) {
|
|
96
93
|
fetchState = 'Error';
|
|
97
94
|
}
|
|
98
95
|
else if ((0, exports.isAllFetchCompleted)(fetchStateList)) {
|
|
@@ -127,7 +124,7 @@ const reduceAllFetchState = (fetchStateList) => {
|
|
|
127
124
|
else if ((0, exports.isAllFetchCompleted)(fetchStateList)) {
|
|
128
125
|
fetchState = 'Completed';
|
|
129
126
|
}
|
|
130
|
-
else if (
|
|
127
|
+
else if (isAllFetchErroredOut(fetchStateList)) {
|
|
131
128
|
fetchState = 'Error';
|
|
132
129
|
}
|
|
133
130
|
return {
|
|
@@ -150,14 +147,14 @@ const reduceAnyCompletedFetchState = (fetchStateList) => {
|
|
|
150
147
|
error,
|
|
151
148
|
};
|
|
152
149
|
}
|
|
153
|
-
if (
|
|
150
|
+
if (isAllFetchInProgress(fetchStateList)) {
|
|
154
151
|
fetchState = 'In-Progress';
|
|
155
152
|
}
|
|
156
153
|
else if ((0, exports.isAnyFetchCompleted)(fetchStateList)) {
|
|
157
154
|
// This scenario is useful where we have two independnet apis and want to rely/react as soon as one api returns valid response
|
|
158
155
|
fetchState = 'Completed';
|
|
159
156
|
}
|
|
160
|
-
else if (
|
|
157
|
+
else if (isAnyFetchErroredOut(fetchStateList)) {
|
|
161
158
|
// So we are not bothered much about `error` scenario before any completed state
|
|
162
159
|
fetchState = 'Error';
|
|
163
160
|
}
|
|
@@ -1,13 +1 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.pickAndMergeForecastSection = void 0;
|
|
4
|
-
const pickAndMergeForecastAccountReport_1 = require("../../entity/account/pickAndMergeForecastAccountReport");
|
|
5
|
-
const pickAndMergeForecastAcGroupReport_1 = require("../../entity/accountGroup/pickAndMergeForecastAcGroupReport");
|
|
6
|
-
const pickAndMergeForecast_1 = require("../coaBalance/pickAndMergeForecast");
|
|
7
|
-
function pickAndMergeForecastSection(sectionA, sectionF) {
|
|
8
|
-
const resultSection = Object.assign({}, sectionA, (0, pickAndMergeForecast_1.pickAndMergeForecast)(sectionA, sectionF));
|
|
9
|
-
resultSection.accountsOrdered = (0, pickAndMergeForecastAccountReport_1.pickAndMergeForecastAccounts)(sectionA.accountsOrdered, sectionF.accountsOrdered);
|
|
10
|
-
resultSection.accountGroupsOrdered = (0, pickAndMergeForecastAcGroupReport_1.pickAndMergeForecastAccountGroups)(sectionA.accountGroupsOrdered, sectionF.accountGroupsOrdered);
|
|
11
|
-
return resultSection;
|
|
12
|
-
}
|
|
13
|
-
exports.pickAndMergeForecastSection = pickAndMergeForecastSection;
|
|
@@ -1,11 +1 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.pickAndMergeForecastSectionWithAcOnly = void 0;
|
|
4
|
-
const pickAndMergeForecast_1 = require("../coaBalance/pickAndMergeForecast");
|
|
5
|
-
const pickAndMergeForecastAccountReport_1 = require("../../entity/account/pickAndMergeForecastAccountReport");
|
|
6
|
-
function pickAndMergeForecastSectionWithAcOnly(sectionA, sectionF) {
|
|
7
|
-
const resultSection = Object.assign({}, sectionA, (0, pickAndMergeForecast_1.pickAndMergeForecast)(sectionA, sectionF));
|
|
8
|
-
resultSection.accountsOrdered = (0, pickAndMergeForecastAccountReport_1.pickAndMergeForecastAccounts)(sectionA.accountsOrdered, sectionF.accountsOrdered);
|
|
9
|
-
return resultSection;
|
|
10
|
-
}
|
|
11
|
-
exports.pickAndMergeForecastSectionWithAcOnly = pickAndMergeForecastSectionWithAcOnly;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const toSortOrderType: (v: string) => "ascending" | "descending";
|
|
1
|
+
declare const toSortOrderType: (v: string) => "ascending" | "descending";
|
|
3
2
|
export declare type SortOrder = ReturnType<typeof toSortOrderType>;
|
|
3
|
+
export {};
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.toSortOrderType = exports.SORT_ORDERS = void 0;
|
|
4
3
|
const stringToUnion_1 = require("../stringToUnion");
|
|
5
|
-
|
|
6
|
-
const toSortOrderType = (v) => (0, stringToUnion_1.stringToUnion)(v,
|
|
7
|
-
exports.toSortOrderType = toSortOrderType;
|
|
4
|
+
const SORT_ORDERS = ['ascending', 'descending'];
|
|
5
|
+
const toSortOrderType = (v) => (0, stringToUnion_1.stringToUnion)(v, SORT_ORDERS);
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
export declare const SCHEDULE_DAYS_OF_MONTH: readonly [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28];
|
|
2
2
|
export declare const toScheduleDaysOfMonth: (n: number) => 2 | 1 | 22 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 23 | 24 | 25 | 26 | 27 | 28;
|
|
3
|
-
export declare const toScheduleDaysOfMonthStrict: (n: number) => 2 | 1 | 22 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 23 | 24 | 25 | 26 | 27 | 28;
|
|
4
3
|
export declare type ScheduleDaysOfMonth = ReturnType<typeof toScheduleDaysOfMonth>;
|
|
5
4
|
export declare const MIN_SCHEDULE_DAY_OF_MONTH = 1;
|
|
6
5
|
export declare const MAX_SCHEDULE_DAY_OF_MONTH = 28;
|
|
7
6
|
export declare const LAST_SCHEDULE_DAY_OF_MONTH = 31;
|
|
8
|
-
|
|
9
|
-
export declare const toDayStrict: (n: number) => 2 | 1 | 22 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 23 | 24 | 25 | 26 | 27 | 28 | 31 | 29 | 30;
|
|
7
|
+
declare const toDay: (n: number) => 2 | 1 | 22 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 23 | 24 | 25 | 26 | 27 | 28 | 31 | 29 | 30;
|
|
10
8
|
export declare type Day = ReturnType<typeof toDay>;
|
|
11
9
|
export declare const toMonth: (n: number) => 2 | 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
|
|
12
10
|
export declare const toMonthStrict: (n: number) => 2 | 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | undefined;
|
|
@@ -33,3 +31,4 @@ export interface TimePeriod {
|
|
|
33
31
|
start: AbsoluteDay;
|
|
34
32
|
end: AbsoluteDay;
|
|
35
33
|
}
|
|
34
|
+
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.toString = exports.toAbsoluteDay = exports.toQuarterStrict = exports.toQuarter = exports.getMonthFromMonthName = exports.toMonthStrict = exports.toMonth = exports.
|
|
3
|
+
exports.toString = exports.toAbsoluteDay = exports.toQuarterStrict = exports.toQuarter = exports.getMonthFromMonthName = exports.toMonthStrict = exports.toMonth = exports.LAST_SCHEDULE_DAY_OF_MONTH = exports.MAX_SCHEDULE_DAY_OF_MONTH = exports.MIN_SCHEDULE_DAY_OF_MONTH = exports.toScheduleDaysOfMonth = exports.SCHEDULE_DAYS_OF_MONTH = void 0;
|
|
4
4
|
const zeniDayJS_1 = require("../zeniDayJS");
|
|
5
5
|
const numberToUnion_1 = require("./numberToUnion");
|
|
6
6
|
exports.SCHEDULE_DAYS_OF_MONTH = [
|
|
@@ -9,8 +9,6 @@ exports.SCHEDULE_DAYS_OF_MONTH = [
|
|
|
9
9
|
];
|
|
10
10
|
const toScheduleDaysOfMonth = (n) => (0, numberToUnion_1.numberToUnion)(n, exports.SCHEDULE_DAYS_OF_MONTH);
|
|
11
11
|
exports.toScheduleDaysOfMonth = toScheduleDaysOfMonth;
|
|
12
|
-
const toScheduleDaysOfMonthStrict = (n) => (0, numberToUnion_1.numberToUnion)(n, exports.SCHEDULE_DAYS_OF_MONTH);
|
|
13
|
-
exports.toScheduleDaysOfMonthStrict = toScheduleDaysOfMonthStrict;
|
|
14
12
|
exports.MIN_SCHEDULE_DAY_OF_MONTH = 1;
|
|
15
13
|
exports.MAX_SCHEDULE_DAY_OF_MONTH = 28;
|
|
16
14
|
exports.LAST_SCHEDULE_DAY_OF_MONTH = 31;
|
|
@@ -19,9 +17,6 @@ const allDays = [
|
|
|
19
17
|
23, 24, 25, 26, 27, 28, 29, 30, 31,
|
|
20
18
|
];
|
|
21
19
|
const toDay = (n) => (0, numberToUnion_1.numberToUnion)(n, allDays);
|
|
22
|
-
exports.toDay = toDay;
|
|
23
|
-
const toDayStrict = (n) => (0, numberToUnion_1.numberToUnion)(n, allDays);
|
|
24
|
-
exports.toDayStrict = toDayStrict;
|
|
25
20
|
const allMonths = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12];
|
|
26
21
|
const toMonth = (n) => (0, numberToUnion_1.numberToUnion)(n, allMonths);
|
|
27
22
|
exports.toMonth = toMonth;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Month } from '../timePeriod';
|
|
2
2
|
import { ZeniDate } from '../../zeniDayJS';
|
|
3
3
|
import { ReportID, View } from '../viewAndReport/viewAndReport';
|
|
4
|
-
import { FetchStateAndError } from '../common';
|
|
5
4
|
import { DataAvailable } from '../dataAvailable';
|
|
6
5
|
import { Currency } from '../amount';
|
|
7
6
|
/** Any report state should extend this interface*/
|
|
@@ -16,7 +15,3 @@ export interface ReportV2 extends View {
|
|
|
16
15
|
/**
|
|
17
16
|
* Any report going out from Selector should conform to this interface.
|
|
18
17
|
*/
|
|
19
|
-
export interface SelectorReportV2 extends ReportV2, FetchStateAndError {
|
|
20
|
-
availableNumberOfPeriods?: number;
|
|
21
|
-
[key: string]: unknown;
|
|
22
|
-
}
|
|
@@ -8,8 +8,7 @@ import { SortOrder } from '../selectorTypes/sortOrderTypes';
|
|
|
8
8
|
import { ReportID } from './viewAndReport';
|
|
9
9
|
export declare type AgingDateSelectionType = 'last_month' | 'last_quarter' | 'custom_date';
|
|
10
10
|
export declare type AgingReportId = Extract<ReportID, 'accounts_payable_aging' | 'accounts_receivable_aging'>;
|
|
11
|
-
|
|
12
|
-
export declare const toAgingReportSortKey: (v: string) => "total" | "vendor" | "customer" | "current_due" | "due_1-30_days" | "due_31-60_days" | "due_61-90_days" | "due_over_90_days";
|
|
11
|
+
declare const toAgingReportSortKey: (v: string) => "total" | "vendor" | "customer" | "current_due" | "due_1-30_days" | "due_31-60_days" | "due_61-90_days" | "due_over_90_days";
|
|
13
12
|
export declare type AgingReportSortKey = ReturnType<typeof toAgingReportSortKey>;
|
|
14
13
|
export interface AgingReportInvoice {
|
|
15
14
|
date: ZeniDate;
|
|
@@ -40,3 +39,4 @@ export declare type AgingDetailReportKey = ReturnType<typeof getAgingDetailRepor
|
|
|
40
39
|
export interface AgingDetailReportInvoice extends AgingReportInvoice {
|
|
41
40
|
entity: Customer | Vendor;
|
|
42
41
|
}
|
|
42
|
+
export {};
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getAgingDetailReportEntityKey =
|
|
3
|
+
exports.getAgingDetailReportEntityKey = void 0;
|
|
4
4
|
const agingBalance_1 = require("../agingBalance/agingBalance");
|
|
5
5
|
const stringToUnion_1 = require("../stringToUnion");
|
|
6
|
-
|
|
6
|
+
const AGING_REPORT_SORT_KEYS = [
|
|
7
7
|
...agingBalance_1.AGING_PERIODS,
|
|
8
8
|
'vendor',
|
|
9
9
|
'total',
|
|
10
10
|
'customer',
|
|
11
11
|
];
|
|
12
|
-
const toAgingReportSortKey = (v) => (0, stringToUnion_1.stringToUnion)(v,
|
|
13
|
-
exports.toAgingReportSortKey = toAgingReportSortKey;
|
|
12
|
+
const toAgingReportSortKey = (v) => (0, stringToUnion_1.stringToUnion)(v, AGING_REPORT_SORT_KEYS);
|
|
14
13
|
const getAgingDetailReportEntityKey = (entityId, reportDate) => `${entityId}_${reportDate.format('YYYY-MM-DD')}`;
|
|
15
14
|
exports.getAgingDetailReportEntityKey = getAgingDetailReportEntityKey;
|
|
@@ -33,6 +33,5 @@ export interface SelectorReport extends Report, FetchStateAndError {
|
|
|
33
33
|
[key: string]: unknown;
|
|
34
34
|
}
|
|
35
35
|
export declare type PageToken = string | null;
|
|
36
|
-
export declare const ALL_REPORT_FORMAT: readonly ["summary", "detailed", "more_detailed"];
|
|
37
36
|
export declare const toReportFormatStrict: (v?: string | undefined) => "summary" | "detailed" | "more_detailed" | undefined;
|
|
38
37
|
export declare type ReportFormat = NonNullable<ReturnType<typeof toReportFormatStrict>>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.toReportFormatStrict = exports.
|
|
3
|
+
exports.toReportFormatStrict = exports.toReportID = exports.ALL_REPORT_IDS = void 0;
|
|
4
4
|
const stringToUnion_1 = require("../stringToUnion");
|
|
5
5
|
exports.ALL_REPORT_IDS = [
|
|
6
6
|
'cash_balance',
|
|
@@ -56,10 +56,10 @@ exports.ALL_REPORT_IDS = [
|
|
|
56
56
|
];
|
|
57
57
|
const toReportID = (v) => (0, stringToUnion_1.stringToUnion)(v, exports.ALL_REPORT_IDS);
|
|
58
58
|
exports.toReportID = toReportID;
|
|
59
|
-
|
|
59
|
+
const ALL_REPORT_FORMAT = [
|
|
60
60
|
'summary',
|
|
61
61
|
'detailed',
|
|
62
62
|
'more_detailed',
|
|
63
63
|
];
|
|
64
|
-
const toReportFormatStrict = (v) => { var _a; return (0, stringToUnion_1.stringToUnionStrict)((_a = v === null || v === void 0 ? void 0 : v.toLocaleLowerCase()) !== null && _a !== void 0 ? _a : '',
|
|
64
|
+
const toReportFormatStrict = (v) => { var _a; return (0, stringToUnion_1.stringToUnionStrict)((_a = v === null || v === void 0 ? void 0 : v.toLocaleLowerCase()) !== null && _a !== void 0 ? _a : '', ALL_REPORT_FORMAT); };
|
|
65
65
|
exports.toReportFormatStrict = toReportFormatStrict;
|
|
@@ -3,7 +3,6 @@ export declare const standardFormat = "MM/DD/YYYY";
|
|
|
3
3
|
export declare const startDate = "2000-01-01";
|
|
4
4
|
export declare const endDate = "2070-12-31";
|
|
5
5
|
export declare const PAYMENT_BUSINESS_DAYS = 4;
|
|
6
|
-
export declare const holidays: Date[];
|
|
7
6
|
export declare const holidaysFormatted: string[];
|
|
8
7
|
export declare const getNextNthWorkingDay: (date: Date, filterDaysIndex: number[], numberOfWorkingDays: number) => Date;
|
|
9
8
|
export declare const getPreviousNthWorkingDay: (date: Date, filterDaysIndex: number[], numberOfWorkingDays: number) => Date;
|
|
@@ -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.isHoliday = exports.getYearsList = exports.filterDays = exports.isHolidayToday = exports.getPreviousNthWorkingDay = exports.getNextNthWorkingDay = exports.holidaysFormatted = exports.
|
|
6
|
+
exports.isHoliday = exports.getYearsList = exports.filterDays = exports.isHolidayToday = exports.getPreviousNthWorkingDay = exports.getNextNthWorkingDay = exports.holidaysFormatted = exports.PAYMENT_BUSINESS_DAYS = exports.endDate = exports.startDate = exports.standardFormat = void 0;
|
|
7
7
|
const date_holidays_1 = __importDefault(require("date-holidays"));
|
|
8
8
|
const zeniDayJS_1 = require("../zeniDayJS");
|
|
9
9
|
exports.standardFormat = 'MM/DD/YYYY';
|
|
@@ -11,14 +11,14 @@ exports.startDate = '2000-01-01';
|
|
|
11
11
|
exports.endDate = '2070-12-31';
|
|
12
12
|
exports.PAYMENT_BUSINESS_DAYS = 4;
|
|
13
13
|
const dateHolidays = new date_holidays_1.default('US');
|
|
14
|
-
|
|
14
|
+
const holidays = dateHolidays
|
|
15
15
|
.getHolidays(new Date().getFullYear())
|
|
16
16
|
.filter((holiday) => holiday.type === 'public' || holiday.type === 'bank')
|
|
17
17
|
.map((holiday) => (0, zeniDayJS_1.date)(holiday.date).toDate()); // https://www.linkedin.com/pulse/fix-invalid-date-safari-ie-hatem-ahmad/
|
|
18
|
-
exports.holidaysFormatted =
|
|
18
|
+
exports.holidaysFormatted = holidays.map((holiday) => (0, zeniDayJS_1.date)(holiday.toDateString()).format(exports.standardFormat));
|
|
19
19
|
const getNextNthWorkingDay = (date, filterDaysIndex, numberOfWorkingDays) => {
|
|
20
20
|
const currentDate = new Date(date.toDateString());
|
|
21
|
-
const holidaysFormatted =
|
|
21
|
+
const holidaysFormatted = holidays.map((holiday) => (0, zeniDayJS_1.date)(holiday.toDateString()).format(exports.standardFormat));
|
|
22
22
|
Array(numberOfWorkingDays)
|
|
23
23
|
.fill(0)
|
|
24
24
|
.forEach(() => {
|
|
@@ -33,7 +33,7 @@ const getNextNthWorkingDay = (date, filterDaysIndex, numberOfWorkingDays) => {
|
|
|
33
33
|
exports.getNextNthWorkingDay = getNextNthWorkingDay;
|
|
34
34
|
const getPreviousNthWorkingDay = (date, filterDaysIndex, numberOfWorkingDays) => {
|
|
35
35
|
const currentDate = new Date(date.toDateString());
|
|
36
|
-
const holidaysFormatted =
|
|
36
|
+
const holidaysFormatted = holidays.map((holiday) => (0, zeniDayJS_1.date)(holiday.toDateString()).format(exports.standardFormat));
|
|
37
37
|
Array(numberOfWorkingDays)
|
|
38
38
|
.fill(0)
|
|
39
39
|
.forEach(() => {
|
|
@@ -51,7 +51,7 @@ const getPreviousNthWorkingDay = (date, filterDaysIndex, numberOfWorkingDays) =>
|
|
|
51
51
|
};
|
|
52
52
|
exports.getPreviousNthWorkingDay = getPreviousNthWorkingDay;
|
|
53
53
|
const isHolidayToday = (filterDaysIndex) => {
|
|
54
|
-
const holidaysFormatted =
|
|
54
|
+
const holidaysFormatted = holidays.map((holiday) => (0, zeniDayJS_1.date)(holiday.toDateString()).format(exports.standardFormat));
|
|
55
55
|
const currentDate = new Date();
|
|
56
56
|
return (filterDaysIndex.includes(currentDate.getDay()) ||
|
|
57
57
|
holidaysFormatted.indexOf((0, zeniDayJS_1.date)(currentDate.toDateString()).format(exports.standardFormat)) != -1);
|
|
@@ -2,7 +2,7 @@ import { BalancePayload } from '../../commonPayloadTypes/balanceChangePayload';
|
|
|
2
2
|
import { URLPayload } from '../../commonPayloadTypes/urlPayload';
|
|
3
3
|
import { StatusPayload } from '../../commonPayloadTypes/statusPayload';
|
|
4
4
|
import { COABalanceGroupedPayload } from '../../commonPayloadTypes/coaBalancePayload';
|
|
5
|
-
import { AccountBase,
|
|
5
|
+
import { AccountBase, AccountMetadata, RecommendedAccountBase, StatementCloseDay } from './accountState';
|
|
6
6
|
import { RecommendationBasePayload } from '../../commonPayloadTypes/recommendationPayload';
|
|
7
7
|
export interface AccountBasePayload {
|
|
8
8
|
account_id: string;
|
|
@@ -46,9 +46,4 @@ export interface AccountMetadataPayload extends AccountBasePayload {
|
|
|
46
46
|
}
|
|
47
47
|
export declare const toAccountPayload: (acc?: AccountBase | undefined) => AccountBasePayload;
|
|
48
48
|
export declare const toRecommendedAccountBasePayload: (acc: RecommendedAccountBase) => RecommendedAccountBasePayload;
|
|
49
|
-
export declare const toRecommendedAccountBasePayloadForAmountRange: (acc: RecommendedAccountBase | undefined, amountRange: {
|
|
50
|
-
min: number;
|
|
51
|
-
max?: number;
|
|
52
|
-
}) => RecommendedAccountBasePayload;
|
|
53
|
-
export declare const toAccountLabelArray: (labels: string[]) => AccountLabel[];
|
|
54
49
|
export declare const mapAccountMetadataPayloadToAccountMetadata: (payload: AccountMetadataPayload) => AccountMetadata;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.mapAccountMetadataPayloadToAccountMetadata = exports.
|
|
3
|
+
exports.mapAccountMetadataPayloadToAccountMetadata = exports.toRecommendedAccountBasePayload = exports.toAccountPayload = exports.mapStatementCloseDayPayloadToStatementCloseDay = exports.mapRecommendedAccountBasePayloadToRecommendedAccountBase = exports.mapAccountBasePayloadToAccountBase = void 0;
|
|
4
4
|
const urlPayload_1 = require("../../commonPayloadTypes/urlPayload");
|
|
5
5
|
const accountState_1 = require("./accountState");
|
|
6
6
|
const recommendationPayload_1 = require("../../commonPayloadTypes/recommendationPayload");
|
|
@@ -16,14 +16,14 @@ const mapAccountBasePayloadToAccountBase = (payload) => {
|
|
|
16
16
|
logo: payload.logo == null ? undefined : (0, urlPayload_1.toURL)(payload.logo),
|
|
17
17
|
qboId: (_e = payload.qbo_id) !== null && _e !== void 0 ? _e : undefined,
|
|
18
18
|
coaId: (_f = payload.coa_id) !== null && _f !== void 0 ? _f : undefined,
|
|
19
|
-
labels:
|
|
19
|
+
labels: toAccountLabelArray((_g = payload.labels) !== null && _g !== void 0 ? _g : []),
|
|
20
20
|
});
|
|
21
21
|
};
|
|
22
22
|
exports.mapAccountBasePayloadToAccountBase = mapAccountBasePayloadToAccountBase;
|
|
23
23
|
const mapRecommendedAccountBasePayloadToRecommendedAccountBase = (payload) => {
|
|
24
24
|
var _a, _b, _c, _d, _e, _f;
|
|
25
25
|
return payload.account_id != null && payload.qbo_id != null
|
|
26
|
-
? Object.assign({ accountId: (_a = payload.account_id) !== null && _a !== void 0 ? _a : payload.account_name, accountName: payload.account_name, accountType: (0, accountState_1.toAccountTypeStrict)(payload.account_type), accountSubType: (_b = payload.account_sub_type) !== null && _b !== void 0 ? _b : undefined, accountDescription: (_c = payload.account_description) !== null && _c !== void 0 ? _c : '', last4Digits: (_d = payload.last_4_digits) !== null && _d !== void 0 ? _d : undefined, logo: payload.logo == null ? undefined : (0, urlPayload_1.toURL)(payload.logo), qboId: (_e = payload.qbo_id) !== null && _e !== void 0 ? _e : undefined, coaId: (_f = payload.coa_id) !== null && _f !== void 0 ? _f : '', labels:
|
|
26
|
+
? Object.assign({ accountId: (_a = payload.account_id) !== null && _a !== void 0 ? _a : payload.account_name, accountName: payload.account_name, accountType: (0, accountState_1.toAccountTypeStrict)(payload.account_type), accountSubType: (_b = payload.account_sub_type) !== null && _b !== void 0 ? _b : undefined, accountDescription: (_c = payload.account_description) !== null && _c !== void 0 ? _c : '', last4Digits: (_d = payload.last_4_digits) !== null && _d !== void 0 ? _d : undefined, logo: payload.logo == null ? undefined : (0, urlPayload_1.toURL)(payload.logo), qboId: (_e = payload.qbo_id) !== null && _e !== void 0 ? _e : undefined, coaId: (_f = payload.coa_id) !== null && _f !== void 0 ? _f : '', labels: toAccountLabelArray(payload.labels) }, (0, recommendationPayload_1.toRecommendationBase)(payload)) : undefined;
|
|
27
27
|
};
|
|
28
28
|
exports.mapRecommendedAccountBasePayloadToRecommendedAccountBase = mapRecommendedAccountBasePayloadToRecommendedAccountBase;
|
|
29
29
|
const mapStatementCloseDayPayloadToStatementCloseDay = (payload) => {
|
|
@@ -45,21 +45,6 @@ const toRecommendedAccountBasePayload = (acc) => {
|
|
|
45
45
|
return Object.assign({ qbo_id: (_a = acc.qboId) !== null && _a !== void 0 ? _a : '', coa_id: (_b = acc.coaId) !== null && _b !== void 0 ? _b : '', account_id: (_c = acc.accountId) !== null && _c !== void 0 ? _c : '', account_name: (_d = acc.accountName) !== null && _d !== void 0 ? _d : '', labels: acc.labels }, (0, recommendationPayload_1.toRecommendationBasePayload)(acc));
|
|
46
46
|
};
|
|
47
47
|
exports.toRecommendedAccountBasePayload = toRecommendedAccountBasePayload;
|
|
48
|
-
const toRecommendedAccountBasePayloadForAmountRange = (acc, amountRange) => {
|
|
49
|
-
var _a, _b, _c, _d, _e, _f;
|
|
50
|
-
// min and max to be always sent even if account is undefined
|
|
51
|
-
return {
|
|
52
|
-
qbo_id: (_a = acc === null || acc === void 0 ? void 0 : acc.qboId) !== null && _a !== void 0 ? _a : '',
|
|
53
|
-
coa_id: (_b = acc === null || acc === void 0 ? void 0 : acc.coaId) !== null && _b !== void 0 ? _b : '',
|
|
54
|
-
account_id: (_c = acc === null || acc === void 0 ? void 0 : acc.accountId) !== null && _c !== void 0 ? _c : '',
|
|
55
|
-
account_name: (_d = acc === null || acc === void 0 ? void 0 : acc.accountName) !== null && _d !== void 0 ? _d : '',
|
|
56
|
-
labels: (_e = acc === null || acc === void 0 ? void 0 : acc.labels) !== null && _e !== void 0 ? _e : [],
|
|
57
|
-
min: amountRange.min,
|
|
58
|
-
max: amountRange.max,
|
|
59
|
-
type: (_f = acc === null || acc === void 0 ? void 0 : acc.type) !== null && _f !== void 0 ? _f : '',
|
|
60
|
-
};
|
|
61
|
-
};
|
|
62
|
-
exports.toRecommendedAccountBasePayloadForAmountRange = toRecommendedAccountBasePayloadForAmountRange;
|
|
63
48
|
const toAccountLabelArray = (labels) => {
|
|
64
49
|
const acLabels = [
|
|
65
50
|
...labels
|
|
@@ -68,7 +53,6 @@ const toAccountLabelArray = (labels) => {
|
|
|
68
53
|
];
|
|
69
54
|
return acLabels;
|
|
70
55
|
};
|
|
71
|
-
exports.toAccountLabelArray = toAccountLabelArray;
|
|
72
56
|
const mapAccountMetadataPayloadToAccountMetadata = (payload) => {
|
|
73
57
|
var _a, _b;
|
|
74
58
|
return (Object.assign(Object.assign({}, (0, exports.mapAccountBasePayloadToAccountBase)(payload)), { isSubAccount: (_a = payload.is_sub_account) !== null && _a !== void 0 ? _a : false, parentAccountId: (_b = payload.parent_account_id) !== null && _b !== void 0 ? _b : undefined }));
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { UpdateType, ID } from '../../commonStateTypes/common';
|
|
2
|
-
import { AccountState,
|
|
2
|
+
import { AccountState, StatementCloseDay, AccountBase } from './accountState';
|
|
3
3
|
import { AccountPayload } from './accountPayload';
|
|
4
4
|
import { ReportIDPlusForecastID } from '../../commonStateTypes/viewAndReport/viewAndReport';
|
|
5
5
|
import { ClassesViewParentID } from '../../commonStateTypes/classesView/nestedClassID';
|
|
6
6
|
import { AccountMetadataWithBalancesPayload } from '../../commonPayloadTypes/subAccountView/reportBySubAccountPayload';
|
|
7
|
-
import { AccountsViewParentID } from '../../commonStateTypes/accountView/nestedAccountID';
|
|
8
7
|
import { CurrencyPayload } from '../../commonPayloadTypes/v2/viewAndReportPayloadv2';
|
|
9
8
|
export declare const initialState: AccountState;
|
|
10
9
|
export declare const updateAccounts: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[payload: AccountPayload[], reportId: ReportIDPlusForecastID, classesViewParentId?: ClassesViewParentID | undefined, updateType?: UpdateType | undefined], AccountPayload[], string, never, {
|
|
@@ -24,5 +23,4 @@ export declare const updateAccounts: import("@reduxjs/toolkit").ActionCreatorWit
|
|
|
24
23
|
}, string>, clearAllAccounts: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>;
|
|
25
24
|
declare const _default: import("@reduxjs/toolkit").Reducer<AccountState, import("@reduxjs/toolkit").AnyAction>;
|
|
26
25
|
export default _default;
|
|
27
|
-
export declare const mapAccountPayloadToAccount: (payload: AccountPayload, reportId: ReportIDPlusForecastID, classesViewParentId: ClassesViewParentID | undefined, accountsViewParentId: AccountsViewParentID | undefined) => Account;
|
|
28
26
|
export declare const emptyAccount: AccountBase;
|
|
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
var _a;
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.emptyAccount = exports.
|
|
7
|
+
exports.emptyAccount = exports.clearAllAccounts = exports.updateAccountStatementCloseDay = exports.updateMultipleSubAccountsWithBalances = exports.updateAccounts = exports.initialState = void 0;
|
|
8
8
|
const toolkit_1 = require("@reduxjs/toolkit");
|
|
9
9
|
const assignWith_1 = __importDefault(require("lodash/assignWith"));
|
|
10
10
|
const accountState_1 = require("./accountState");
|
|
@@ -69,7 +69,7 @@ exports.default = account.reducer;
|
|
|
69
69
|
*/
|
|
70
70
|
function doUpdateAccounts(draft, payload, reportId, classesViewParentId, updateType) {
|
|
71
71
|
payload.forEach((accountPayload) => {
|
|
72
|
-
const latestAccount =
|
|
72
|
+
const latestAccount = mapAccountPayloadToAccount(accountPayload, reportId, classesViewParentId, undefined);
|
|
73
73
|
if (latestAccount.key in draft && updateType === 'merge') {
|
|
74
74
|
(0, assignWith_1.default)(draft[latestAccount.key], latestAccount, (objValue, srcValue) => (srcValue == null ? objValue : srcValue) // IMPORTANT: replace the value only when source has valid value. Otherwise keep the existing value!
|
|
75
75
|
);
|
|
@@ -138,7 +138,6 @@ const mapAccountPayloadToAccount = (payload, reportId, classesViewParentId, acco
|
|
|
138
138
|
: (0, coaBalancePayload_1.mapCOABalanceGroupedPayloadToCOABalanceGrouped)(payload.financing_activities), statementCloseDay: payload.statement_close_day == null
|
|
139
139
|
? undefined
|
|
140
140
|
: (0, accountPayload_1.mapStatementCloseDayPayloadToStatementCloseDay)(payload.statement_close_day), qboId: payload.qbo_id == null ? undefined : payload.qbo_id, coaId: payload.coa_id == null ? undefined : payload.coa_id }));
|
|
141
|
-
exports.mapAccountPayloadToAccount = mapAccountPayloadToAccount;
|
|
142
141
|
exports.emptyAccount = {
|
|
143
142
|
labels: [],
|
|
144
143
|
accountId: '',
|
|
@@ -10,7 +10,7 @@ import { AccountsViewParentID } from '../../commonStateTypes/accountView/nestedA
|
|
|
10
10
|
export declare const toAccountType: (v: string) => "cash_position" | "fixed_assets" | "bank" | "credit_card" | "expenses" | "cogs" | "income" | "cash_in" | "cash_out" | "other_income" | "other_expense" | "accounts_receivable" | "other_current_assets" | "other_assets" | "accounts_payable" | "other_current_liabilities" | "long_term_liabilities" | "equity" | "current_liabilities" | "current_assets";
|
|
11
11
|
export declare type AccountType = ReturnType<typeof toAccountType>;
|
|
12
12
|
export declare const toAccountTypeStrict: (v: string | null | undefined) => AccountType | undefined;
|
|
13
|
-
|
|
13
|
+
declare const toAccountLabel: (v: string) => "prepaid_expenses" | "fixed_assets" | "uncategorized_income" | "uncategorized_expense" | "bank_charges_and_fees" | "travel_transportation" | "accrued_expenses";
|
|
14
14
|
export declare type AccountLabel = ReturnType<typeof toAccountLabel>;
|
|
15
15
|
export declare const toAccountLabelStrict: (v: string | null | undefined) => AccountLabel | undefined;
|
|
16
16
|
export declare function getAccountKey(reportIdUniqueKey: ReportIDPlusForecastID, accountId: ID, classesViewParentId?: ClassesViewParentID, accountsViewParentId?: AccountsViewParentID): `${string}-cash_balance` | `${string}-card_balance` | `${string}-operating_expenses` | `${string}-operating_expenses_by_classes` | `${string}-revenue` | `${string}-revenue_by_classes` | `${string}-net_burn_or_income` | `${string}-net_burn_or_income_story_card` | `${string}-net_burn_or_income_by_classes` | `${string}-cash_position` | `${string}-top_expenses` | `${string}-profit_and_loss` | `${string}-profit_and_loss_by_classes` | `${string}-balance_sheet` | `${string}-cash_flow` | `${string}-dashboard` | `${string}-finance_statement` | `${string}-transaction_list_of_account` | `${string}-transaction_list_missing_receipt` | `${string}-transaction_list_of_account_by_class` | `${string}-transaction_detail` | `${string}-cash_in_cash_out` | `${string}-insights_dashboard` | `${string}-company_details` | `${string}-class_list` | `${string}-account_list` | `${string}-account_list_by_type` | `${string}-vendor` | `${string}-task_card` | `${string}-bill_pay` | `${string}-reimbursement` | `${string}-bill_pay_card` | `${string}-reimbursement_card` | `${string}-bill_pay_promo_card` | `${string}-zeni_accounts` | `${string}-zeni_accounts_promo_card` | `${string}-charge_cards` | `${string}-reimbursement_promo_card` | `${string}-onboarding` | `${string}-operating_expenses_by_vendor` | `${string}-operating_expenses_by_vendor_summary` | `${string}-vendors_tab` | `${string}-accounts_payable_aging` | `${string}-accounts_receivable_aging` | `${string}-vendor_global_review` | `${string}-prepaid_expenses` | `${string}-fixed_assets` | `${string}-notification` | `${string}-rewards_card` | `${string}-billing` | `${string}-cash_balance+${string}` | `${string}-card_balance+${string}` | `${string}-operating_expenses+${string}` | `${string}-operating_expenses_by_classes+${string}` | `${string}-revenue+${string}` | `${string}-revenue_by_classes+${string}` | `${string}-net_burn_or_income+${string}` | `${string}-net_burn_or_income_story_card+${string}` | `${string}-net_burn_or_income_by_classes+${string}` | `${string}-cash_position+${string}` | `${string}-top_expenses+${string}` | `${string}-profit_and_loss+${string}` | `${string}-profit_and_loss_by_classes+${string}` | `${string}-balance_sheet+${string}` | `${string}-cash_flow+${string}` | `${string}-dashboard+${string}` | `${string}-finance_statement+${string}` | `${string}-transaction_list_of_account+${string}` | `${string}-transaction_list_missing_receipt+${string}` | `${string}-transaction_list_of_account_by_class+${string}` | `${string}-transaction_detail+${string}` | `${string}-cash_in_cash_out+${string}` | `${string}-insights_dashboard+${string}` | `${string}-company_details+${string}` | `${string}-class_list+${string}` | `${string}-account_list+${string}` | `${string}-account_list_by_type+${string}` | `${string}-vendor+${string}` | `${string}-task_card+${string}` | `${string}-bill_pay+${string}` | `${string}-reimbursement+${string}` | `${string}-bill_pay_card+${string}` | `${string}-reimbursement_card+${string}` | `${string}-bill_pay_promo_card+${string}` | `${string}-zeni_accounts+${string}` | `${string}-zeni_accounts_promo_card+${string}` | `${string}-charge_cards+${string}` | `${string}-reimbursement_promo_card+${string}` | `${string}-onboarding+${string}` | `${string}-operating_expenses_by_vendor+${string}` | `${string}-operating_expenses_by_vendor_summary+${string}` | `${string}-vendors_tab+${string}` | `${string}-accounts_payable_aging+${string}` | `${string}-accounts_receivable_aging+${string}` | `${string}-vendor_global_review+${string}` | `${string}-prepaid_expenses+${string}` | `${string}-fixed_assets+${string}` | `${string}-notification+${string}` | `${string}-rewards_card+${string}` | `${string}-billing+${string}`;
|
|
@@ -60,3 +60,4 @@ export interface AccountMetadata extends AccountBase {
|
|
|
60
60
|
isSubAccount: boolean;
|
|
61
61
|
parentAccountId: ID | undefined;
|
|
62
62
|
}
|
|
63
|
+
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getAccountKey = exports.toAccountLabelStrict = exports.
|
|
3
|
+
exports.getAccountKey = exports.toAccountLabelStrict = exports.toAccountTypeStrict = exports.toAccountType = void 0;
|
|
4
4
|
const stringToUnion_1 = require("../../commonStateTypes/stringToUnion");
|
|
5
5
|
const nestedClassID_1 = require("../../commonStateTypes/classesView/nestedClassID");
|
|
6
6
|
const nestedAccountID_1 = require("../../commonStateTypes/accountView/nestedAccountID");
|
|
@@ -40,7 +40,6 @@ const ALL_ACCOUNT_LABELS = [
|
|
|
40
40
|
'accrued_expenses',
|
|
41
41
|
];
|
|
42
42
|
const toAccountLabel = (v) => (0, stringToUnion_1.stringToUnion)(v, ALL_ACCOUNT_LABELS);
|
|
43
|
-
exports.toAccountLabel = toAccountLabel;
|
|
44
43
|
const toAccountLabelStrict = (v) => (0, stringToUnion_1.stringToUnionStrict)(v !== null && v !== void 0 ? v : '', ALL_ACCOUNT_LABELS);
|
|
45
44
|
exports.toAccountLabelStrict = toAccountLabelStrict;
|
|
46
45
|
function getAccountKey(reportIdUniqueKey, accountId, classesViewParentId, accountsViewParentId) {
|
|
@@ -5,12 +5,6 @@ export declare function pickAndMergeForecastAccountReport(reportA: AccountReport
|
|
|
5
5
|
export declare function pickAndMergeForecastAccounts(accountsA: AccountReport[], accountsF: AccountReport[]): AccountReport[];
|
|
6
6
|
export declare function pickAndMergeForecastNestedAccounts(nestedAccountsA: NestedAccountReport[], nestedAccountsF: NestedAccountReport[]): NestedAccountReport[];
|
|
7
7
|
export declare function cloneAndResetNestedAccount(accountReport: NestedAccountReport): NestedAccountReport;
|
|
8
|
-
/**
|
|
9
|
-
* Clones the given account, and sets all balances to Zero in the cloned account
|
|
10
|
-
* @param account
|
|
11
|
-
* @returns cloned account with zero balances
|
|
12
|
-
*/
|
|
13
|
-
export declare function cloneAccountWithZeroBalance(account: AccountReport): AccountReport;
|
|
14
8
|
export declare const cloneAccountsWithZeroBalance: (accounts: AccountReport[]) => {
|
|
15
9
|
filter: import("../..").COABalancesFilter;
|
|
16
10
|
balancesInTimeframe: import("../..").COABalancesSlice;
|
|
@@ -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.cloneAccountsWithZeroBalance = exports.
|
|
6
|
+
exports.cloneAccountsWithZeroBalance = exports.cloneAndResetNestedAccount = exports.pickAndMergeForecastNestedAccounts = exports.pickAndMergeForecastAccounts = exports.pickAndMergeForecastAccountReport = void 0;
|
|
7
7
|
const differenceBy_1 = __importDefault(require("lodash/differenceBy"));
|
|
8
8
|
const pickAndMergeForecast_1 = require("../../commonStateTypes/coaBalance/pickAndMergeForecast");
|
|
9
9
|
const nestedAccountID_1 = require("../../commonStateTypes/accountView/nestedAccountID");
|
|
@@ -98,6 +98,5 @@ function cloneAccountWithZeroBalance(account) {
|
|
|
98
98
|
clonedAccount.financingActivitiesInTimeframe = (0, pickAndMergeForecast_1.cloneAndResetBalanceSlice)(clonedAccount.financingActivitiesInTimeframe);
|
|
99
99
|
return clonedAccount;
|
|
100
100
|
}
|
|
101
|
-
exports.cloneAccountWithZeroBalance = cloneAccountWithZeroBalance;
|
|
102
101
|
const cloneAccountsWithZeroBalance = (accounts) => accounts.map((account) => cloneAccountWithZeroBalance(account));
|
|
103
102
|
exports.cloneAccountsWithZeroBalance = cloneAccountsWithZeroBalance;
|
|
@@ -5,7 +5,7 @@ import { AccountGroupState, AccountGroupType } from './accountGroupState';
|
|
|
5
5
|
import { AccountState } from '../account/accountState';
|
|
6
6
|
import { ReportIDPlusForecastID } from '../../commonStateTypes/viewAndReport/viewAndReport';
|
|
7
7
|
import { COABalancesFilter } from '../../commonStateTypes/coaBalance/coaBalancesFilter';
|
|
8
|
-
|
|
8
|
+
declare const getAccountGroup: (accountGroupState: AccountGroupState, accountState: AccountState, accountGroupId: ID, accountGroupType: AccountGroupType, reportId: ReportIDPlusForecastID, accountsOrder: EntityOrder | undefined, filter: COABalancesFilter) => {
|
|
9
9
|
filter: COABalancesFilter;
|
|
10
10
|
accountGroupId: string;
|
|
11
11
|
accountGroupName: string;
|
|
@@ -768,3 +768,4 @@ export declare const getAccountGroupsOrdered: (filter: COABalancesFilter, accoun
|
|
|
768
768
|
labels: ("prepaid_expenses" | "fixed_assets" | "uncategorized_income" | "uncategorized_expense" | "bank_charges_and_fees" | "travel_transportation" | "accrued_expenses")[];
|
|
769
769
|
}[];
|
|
770
770
|
}[];
|
|
771
|
+
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getAccountGroupsOrdered =
|
|
3
|
+
exports.getAccountGroupsOrdered = void 0;
|
|
4
4
|
const coaBalance_1 = require("../../commonStateTypes/coaBalance/coaBalance");
|
|
5
5
|
const accountGroupState_1 = require("./accountGroupState");
|
|
6
6
|
const accountSelector_1 = require("../account/accountSelector");
|
|
@@ -124,10 +124,9 @@ const getAccountGroup = (accountGroupState, accountState, accountGroupId, accoun
|
|
|
124
124
|
accountsWithFinancingActivitiesOrdered: accountsWithFinancingActivities,
|
|
125
125
|
};
|
|
126
126
|
};
|
|
127
|
-
exports.getAccountGroup = getAccountGroup;
|
|
128
127
|
const getAccountGroupsOrdered = (filter, accountState, accountGroupState, accountGroupIDs, accountGroupType, reportId, orderBy, order = 'last_balance_descending') => {
|
|
129
128
|
return accountGroupIDs
|
|
130
|
-
.map((acGroupId) =>
|
|
129
|
+
.map((acGroupId) => getAccountGroup(accountGroupState, accountState, acGroupId, accountGroupType, reportId, 'last_balance_descending', // Note: Account order is always `descending_balances` inside Account Group Always!!
|
|
131
130
|
filter))
|
|
132
131
|
.sort((a, b) => {
|
|
133
132
|
switch (orderBy) {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { AddressPayload } from './addressPayload';
|
|
2
|
-
import {
|
|
2
|
+
import { AddressState } from './addressState';
|
|
3
3
|
export declare const initialState: AddressState;
|
|
4
4
|
export declare const updateAddress: import("@reduxjs/toolkit").ActionCreatorWithPayload<AddressPayload, string>, updateAddresses: import("@reduxjs/toolkit").ActionCreatorWithPayload<AddressPayload[], string>, removeAddress: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, string>, clearAllAddresses: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>;
|
|
5
5
|
declare const _default: import("@reduxjs/toolkit").Reducer<AddressState, import("@reduxjs/toolkit").AnyAction>;
|
|
6
6
|
export default _default;
|
|
7
|
-
export declare function mapAddressPayloadToAddress(payload: AddressPayload): Address;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var _a;
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.
|
|
4
|
+
exports.clearAllAddresses = exports.removeAddress = exports.updateAddresses = exports.updateAddress = exports.initialState = void 0;
|
|
5
5
|
const toolkit_1 = require("@reduxjs/toolkit");
|
|
6
6
|
const zeniDayJS_1 = require("../../zeniDayJS");
|
|
7
7
|
exports.initialState = {
|
|
@@ -58,4 +58,3 @@ function mapAddressPayloadToAddress(payload) {
|
|
|
58
58
|
createTime: (0, zeniDayJS_1.date)(payload.create_time),
|
|
59
59
|
};
|
|
60
60
|
}
|
|
61
|
-
exports.mapAddressPayloadToAddress = mapAddressPayloadToAddress;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ApprovalRule
|
|
1
|
+
import { ApprovalRule } from './approvalRuleState';
|
|
2
2
|
export interface CriteriaPayload {
|
|
3
3
|
type: string;
|
|
4
4
|
min: number;
|
|
@@ -36,5 +36,3 @@ export interface ApprovalRulePayload {
|
|
|
36
36
|
* Helpers
|
|
37
37
|
*/
|
|
38
38
|
export declare const toApprovalRule: (payload: ApprovalRulePayload) => ApprovalRule;
|
|
39
|
-
export declare const toApprovalCriteria: (payload: CriteriaPayload[]) => Criteria[];
|
|
40
|
-
export declare const toApprovalSteps: (payload: StepPayload[]) => Step[];
|