@zeniai/client-epic-state 4.8.35 → 4.8.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/commonStateTypes/viewAndReport/viewAndReport.d.ts +1 -1
- package/lib/commonStateTypes/viewAndReport/viewAndReport.js +1 -0
- package/lib/entity/account/accountState.d.ts +1 -1
- package/lib/entity/accountGroup/accountGroupState.d.ts +1 -1
- package/lib/entity/class/classReducer.d.ts +4 -4
- package/lib/entity/class/classState.d.ts +1 -1
- package/lib/entity/forecast/forecastState.d.ts +1 -1
- package/lib/entity/globalMerchant/globalMerchantPayload.d.ts +2 -0
- package/lib/entity/globalMerchant/globalMerchantPayload.js +2 -0
- package/lib/entity/globalMerchant/globalMerchantState.d.ts +2 -0
- package/lib/entity/sectionAccountsView/sectionAccountsView.d.ts +1 -1
- package/lib/entity/sectionClassesViewV2/sectionClassesView.d.ts +1 -1
- package/lib/entity/sectionClassesViewV2/sectionClassesViewReducer.d.ts +2 -2
- package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
- package/lib/entity/snackbar/snackbarTypes.js +1 -0
- package/lib/entity/tenant/clearAllEpic.d.ts +2 -1
- package/lib/entity/tenant/clearAllEpic.js +2 -0
- package/lib/epic.d.ts +3 -1
- package/lib/epic.js +3 -1
- package/lib/index.d.ts +6 -2
- package/lib/index.js +7 -2
- package/lib/reducer.d.ts +3 -0
- package/lib/reducer.js +3 -0
- package/lib/view/billPayCard/billPayCardSelector.d.ts +1 -1
- package/lib/view/cardBalance/cardBalanceSelector.d.ts +1 -1
- package/lib/view/cashBalance/cashBalanceSelector.d.ts +1 -1
- package/lib/view/cashInCashOut/cashInCashOutSelector.d.ts +1 -1
- package/lib/view/cashPosition/cashPositionSelector.d.ts +1 -1
- package/lib/view/dashboard/dashboardEpic.d.ts +2 -1
- package/lib/view/dashboard/dashboardEpic.js +10 -0
- package/lib/view/dashboard/dashboardReducer.d.ts +2 -2
- package/lib/view/dashboard/dashboardSelector.d.ts +2 -0
- package/lib/view/dashboard/dashboardSelector.js +7 -2
- package/lib/view/financeStatement/financeStatementReducer.d.ts +1 -1
- package/lib/view/globalMerchantView/globalMerchantViewReducer.d.ts +2 -2
- package/lib/view/people/changeZeniPersonRolesEpic.d.ts +1 -1
- package/lib/view/people/deletePersonEpic.d.ts +1 -1
- package/lib/view/people/invitePeopleEpic.d.ts +1 -1
- package/lib/view/people/inviteZeniPeopleEpic.d.ts +1 -1
- package/lib/view/people/resendInviteEpic.d.ts +1 -1
- package/lib/view/reimbursementCard/reimbursementCardSelector.d.ts +1 -1
- package/lib/view/scheduleView/scheduleDetailView/epics/initializeScheduleDetailLocalDataEpic.js +4 -2
- package/lib/view/scheduleView/scheduleListView/scheduleListSelector.js +1 -2
- package/lib/view/spendManagement/helpers.js +46 -6
- package/lib/view/spendManagement/spendManagementFilterHelpers.js +4 -3
- package/lib/view/spendManagement/zeniAccounts/transferDetail/transferDetailReducer.js +10 -0
- package/lib/view/taskManager/taskListView/taskListReducer.js +8 -1
- package/lib/view/tasksCard/tasksCardSelector.d.ts +1 -1
- package/lib/view/topEx/topExSelector.d.ts +1 -1
- package/lib/view/transactionList/transactionListReducer.js +4 -8
- package/lib/view/vendorReviewView/common/state/commonTypes.d.ts +2 -2
- package/lib/view/vendorReviewView/common/state/commonTypes.js +1 -0
- package/lib/view/vendorReviewView/vendorGlobalReviewView/epics/rejectVendorGlobalReviewEpic.d.ts +7 -0
- package/lib/view/vendorReviewView/vendorGlobalReviewView/epics/rejectVendorGlobalReviewEpic.js +92 -0
- package/lib/view/vendorReviewView/vendorGlobalReviewView/vendorGlobalReviewViewPayload.d.ts +9 -0
- package/lib/view/vendorReviewView/vendorGlobalReviewView/vendorGlobalReviewViewReducer.d.ts +6 -1
- package/lib/view/vendorReviewView/vendorGlobalReviewView/vendorGlobalReviewViewReducer.js +37 -2
- package/lib/view/vendorReviewView/vendorGlobalReviewView/vendorGlobalReviewViewSelector.d.ts +1 -0
- package/lib/view/vendorReviewView/vendorGlobalReviewView/vendorGlobalReviewViewSelector.js +2 -1
- package/lib/view/vendorReviewView/vendorGlobalReviewView/vendorGlobalReviewViewState.d.ts +1 -0
- package/lib/view/zeniAccountsPromoCard/zeniAccountsPromoCardEpic.d.ts +13 -0
- package/lib/view/zeniAccountsPromoCard/zeniAccountsPromoCardEpic.js +20 -0
- package/lib/view/zeniAccountsPromoCard/zeniAccountsPromoCardPayload.d.ts +10 -0
- package/lib/view/zeniAccountsPromoCard/zeniAccountsPromoCardPayload.js +2 -0
- package/lib/view/zeniAccountsPromoCard/zeniAccountsPromoCardReducer.d.ts +7 -0
- package/lib/view/zeniAccountsPromoCard/zeniAccountsPromoCardReducer.js +56 -0
- package/lib/view/zeniAccountsPromoCard/zeniAccountsPromoCardSelector.d.ts +14 -0
- package/lib/view/zeniAccountsPromoCard/zeniAccountsPromoCardSelector.js +18 -0
- package/lib/view/zeniAccountsPromoCard/zeniAccountsPromoCardState.d.ts +9 -0
- package/lib/view/zeniAccountsPromoCard/zeniAccountsPromoCardState.js +2 -0
- package/package.json +1 -1
|
@@ -16,7 +16,7 @@ export declare const fetchFinanceStatement: import("@reduxjs/toolkit").ActionCre
|
|
|
16
16
|
thisPeriod: TimeframeTick;
|
|
17
17
|
coaBalances: COABalance[];
|
|
18
18
|
maxNumOfPeriodsToHighlight: number;
|
|
19
|
-
}, string>, updateCOABalancesRange: import("@reduxjs/toolkit").ActionCreatorWithPayload<COABalancesRange, string>, updateSelectedReportId: import("@reduxjs/toolkit").ActionCreatorWithPayload<"cash_balance" | "card_balance" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "charge_cards" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses", string>, updateFinanceStatementAdditionalBalancesSelection: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
19
|
+
}, string>, updateCOABalancesRange: import("@reduxjs/toolkit").ActionCreatorWithPayload<COABalancesRange, string>, updateSelectedReportId: import("@reduxjs/toolkit").ActionCreatorWithPayload<"cash_balance" | "card_balance" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "charge_cards" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses", string>, updateFinanceStatementAdditionalBalancesSelection: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
20
20
|
firstMonthOfFY: Month;
|
|
21
21
|
isCompareModeOn: boolean;
|
|
22
22
|
additionalBalances: COABalanceType[];
|
|
@@ -4,9 +4,9 @@ import { ID } from '../../commonStateTypes/common';
|
|
|
4
4
|
import { ZeniAPIStatus } from '../../responsePayload';
|
|
5
5
|
import { VendorReviewViewAllRecommendationsPayload } from '../vendorReviewView/common/payload/commonTypes';
|
|
6
6
|
export declare const initialState: GlobalMerchantViewState;
|
|
7
|
-
export declare const createGlobalMerchant: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[merchantId?: string | undefined, context?: "cash_balance" | "card_balance" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "charge_cards" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | undefined], {
|
|
7
|
+
export declare const createGlobalMerchant: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[merchantId?: string | undefined, context?: "cash_balance" | "card_balance" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "charge_cards" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | undefined], {
|
|
8
8
|
merchantId: string | undefined;
|
|
9
|
-
context: "cash_balance" | "card_balance" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "charge_cards" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | undefined;
|
|
9
|
+
context: "cash_balance" | "card_balance" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "charge_cards" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | undefined;
|
|
10
10
|
}, string, never, never>, createGlobalMerchantSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
11
11
|
merchantId: ID;
|
|
12
12
|
}, string>, createGlobalMerchantFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
@@ -26,7 +26,7 @@ export declare const changeZeniPersonRolesEpic: (actions$: ActionsObservable<Act
|
|
|
26
26
|
type: string;
|
|
27
27
|
} | {
|
|
28
28
|
payload: {
|
|
29
|
-
messageSection: "common" | "transactionDetails_updatingPastTransactions" | "transactionDetails_transactionUpdated" | "cockpit_monthEndEmailSent" | "cockpit_monthEndEmailSave" | "people_invite_people" | "people_invite_multiple_people" | "people_delete_person" | "people_update_person" | "reimbursement_updated" | "reimbursement_deleted" | "reimbursement_cancelled_deleted" | "reimbursement_cancelled" | "reimbursement_approved" | "reimbursement_rejected" | "reimbursement_sent_for_approval" | "account_added" | "business_verification_save" | "business_verification_submit" | "business_verification_from_bills_submit" | "plaid_connection" | "unlink_deposit_account" | "reimbursement_setup" | "reimbursement_approval_create" | "reimbursement_duplicate_approval_create" | "reimbursement_approval_update" | "reimbursement_duplicate_approval_update" | "reimbursement_approval_delete" | "reimbursement_create_mileage" | "reimbursement_update_mileage" | "reimbursement_accept_term" | "reimbursement_accept_employee_term" | "bill_pay_setup" | "zeni_accounts_setup" | "bill_pay_approval_create" | "bill_pay_duplicate_approval_create" | "bill_pay_approval_update" | "bill_pay_duplicate_approval_update" | "bill_pay_approval_delete" | "bill_pay_updated" | "bill_pay_deleted" | "bill_pay_cancelled_deleted" | "bill_pay_cancelled" | "bill_pay_approved" | "real_time_approver_added" | "bill_pay_rejected" | "bill_pay_sent_for_approval" | "bill_pay_accept_term" | "zeni_account_accept_term" | "update_vendor" | "delete_bank_account" | "create_bank_account" | "create_bank_account_ach" | "create_bank_account_wire" | "create_bank_account_international" | "transfer_money" | "update_zeni_account_nickname" | "create_checking_account" | "deposit_check" | "create_vendor" | "onboarding_customer_view" | "onboarding_customer_view_complete" | "onboarding_customer_identity_verification_save" | "onboarding_customer_identity_verification_submit" | "onboarding_customer_business_verification_save" | "onboarding_customer_business_verification_submit" | "retry_bank_account_connection" | "dashboard_invite_sent" | "onboarding_info_saved" | "approve_original_merchant" | "approve_global_merchant" | "create_global_merchant" | "fetch_global_merchant_no_recommendation" | "save_vendor_renamed" | "save_vendor_sent_for_review" | "charge_card_setup" | "charge_card_accept_term" | "create_schedule" | "save_schedule" | "save_task_detail" | "delete_task" | "archive_task" | "update_charge_card";
|
|
29
|
+
messageSection: "common" | "transactionDetails_updatingPastTransactions" | "transactionDetails_transactionUpdated" | "cockpit_monthEndEmailSent" | "cockpit_monthEndEmailSave" | "people_invite_people" | "people_invite_multiple_people" | "people_delete_person" | "people_update_person" | "reimbursement_updated" | "reimbursement_deleted" | "reimbursement_cancelled_deleted" | "reimbursement_cancelled" | "reimbursement_approved" | "reimbursement_rejected" | "reimbursement_sent_for_approval" | "account_added" | "business_verification_save" | "business_verification_submit" | "business_verification_from_bills_submit" | "plaid_connection" | "unlink_deposit_account" | "reimbursement_setup" | "reimbursement_approval_create" | "reimbursement_duplicate_approval_create" | "reimbursement_approval_update" | "reimbursement_duplicate_approval_update" | "reimbursement_approval_delete" | "reimbursement_create_mileage" | "reimbursement_update_mileage" | "reimbursement_accept_term" | "reimbursement_accept_employee_term" | "bill_pay_setup" | "zeni_accounts_setup" | "bill_pay_approval_create" | "bill_pay_duplicate_approval_create" | "bill_pay_approval_update" | "bill_pay_duplicate_approval_update" | "bill_pay_approval_delete" | "bill_pay_updated" | "bill_pay_deleted" | "bill_pay_cancelled_deleted" | "bill_pay_cancelled" | "bill_pay_approved" | "real_time_approver_added" | "bill_pay_rejected" | "bill_pay_sent_for_approval" | "bill_pay_accept_term" | "zeni_account_accept_term" | "update_vendor" | "delete_bank_account" | "create_bank_account" | "create_bank_account_ach" | "create_bank_account_wire" | "create_bank_account_international" | "transfer_money" | "update_zeni_account_nickname" | "create_checking_account" | "deposit_check" | "create_vendor" | "onboarding_customer_view" | "onboarding_customer_view_complete" | "onboarding_customer_identity_verification_save" | "onboarding_customer_identity_verification_submit" | "onboarding_customer_business_verification_save" | "onboarding_customer_business_verification_submit" | "retry_bank_account_connection" | "dashboard_invite_sent" | "onboarding_info_saved" | "approve_original_merchant" | "approve_global_merchant" | "reject_global_merchant" | "create_global_merchant" | "fetch_global_merchant_no_recommendation" | "save_vendor_renamed" | "save_vendor_sent_for_review" | "charge_card_setup" | "charge_card_accept_term" | "create_schedule" | "save_schedule" | "save_task_detail" | "delete_task" | "archive_task" | "update_charge_card";
|
|
30
30
|
messageText: "failed" | "success";
|
|
31
31
|
type: import("../..").SnackbarMessageType;
|
|
32
32
|
showStatusIcon?: boolean | undefined;
|
|
@@ -18,7 +18,7 @@ export declare const deletePersonEpic: (actions$: ActionsObservable<ActionType>,
|
|
|
18
18
|
type: string;
|
|
19
19
|
} | {
|
|
20
20
|
payload: {
|
|
21
|
-
messageSection: "common" | "transactionDetails_updatingPastTransactions" | "transactionDetails_transactionUpdated" | "cockpit_monthEndEmailSent" | "cockpit_monthEndEmailSave" | "people_invite_people" | "people_invite_multiple_people" | "people_delete_person" | "people_update_person" | "reimbursement_updated" | "reimbursement_deleted" | "reimbursement_cancelled_deleted" | "reimbursement_cancelled" | "reimbursement_approved" | "reimbursement_rejected" | "reimbursement_sent_for_approval" | "account_added" | "business_verification_save" | "business_verification_submit" | "business_verification_from_bills_submit" | "plaid_connection" | "unlink_deposit_account" | "reimbursement_setup" | "reimbursement_approval_create" | "reimbursement_duplicate_approval_create" | "reimbursement_approval_update" | "reimbursement_duplicate_approval_update" | "reimbursement_approval_delete" | "reimbursement_create_mileage" | "reimbursement_update_mileage" | "reimbursement_accept_term" | "reimbursement_accept_employee_term" | "bill_pay_setup" | "zeni_accounts_setup" | "bill_pay_approval_create" | "bill_pay_duplicate_approval_create" | "bill_pay_approval_update" | "bill_pay_duplicate_approval_update" | "bill_pay_approval_delete" | "bill_pay_updated" | "bill_pay_deleted" | "bill_pay_cancelled_deleted" | "bill_pay_cancelled" | "bill_pay_approved" | "real_time_approver_added" | "bill_pay_rejected" | "bill_pay_sent_for_approval" | "bill_pay_accept_term" | "zeni_account_accept_term" | "update_vendor" | "delete_bank_account" | "create_bank_account" | "create_bank_account_ach" | "create_bank_account_wire" | "create_bank_account_international" | "transfer_money" | "update_zeni_account_nickname" | "create_checking_account" | "deposit_check" | "create_vendor" | "onboarding_customer_view" | "onboarding_customer_view_complete" | "onboarding_customer_identity_verification_save" | "onboarding_customer_identity_verification_submit" | "onboarding_customer_business_verification_save" | "onboarding_customer_business_verification_submit" | "retry_bank_account_connection" | "dashboard_invite_sent" | "onboarding_info_saved" | "approve_original_merchant" | "approve_global_merchant" | "create_global_merchant" | "fetch_global_merchant_no_recommendation" | "save_vendor_renamed" | "save_vendor_sent_for_review" | "charge_card_setup" | "charge_card_accept_term" | "create_schedule" | "save_schedule" | "save_task_detail" | "delete_task" | "archive_task" | "update_charge_card";
|
|
21
|
+
messageSection: "common" | "transactionDetails_updatingPastTransactions" | "transactionDetails_transactionUpdated" | "cockpit_monthEndEmailSent" | "cockpit_monthEndEmailSave" | "people_invite_people" | "people_invite_multiple_people" | "people_delete_person" | "people_update_person" | "reimbursement_updated" | "reimbursement_deleted" | "reimbursement_cancelled_deleted" | "reimbursement_cancelled" | "reimbursement_approved" | "reimbursement_rejected" | "reimbursement_sent_for_approval" | "account_added" | "business_verification_save" | "business_verification_submit" | "business_verification_from_bills_submit" | "plaid_connection" | "unlink_deposit_account" | "reimbursement_setup" | "reimbursement_approval_create" | "reimbursement_duplicate_approval_create" | "reimbursement_approval_update" | "reimbursement_duplicate_approval_update" | "reimbursement_approval_delete" | "reimbursement_create_mileage" | "reimbursement_update_mileage" | "reimbursement_accept_term" | "reimbursement_accept_employee_term" | "bill_pay_setup" | "zeni_accounts_setup" | "bill_pay_approval_create" | "bill_pay_duplicate_approval_create" | "bill_pay_approval_update" | "bill_pay_duplicate_approval_update" | "bill_pay_approval_delete" | "bill_pay_updated" | "bill_pay_deleted" | "bill_pay_cancelled_deleted" | "bill_pay_cancelled" | "bill_pay_approved" | "real_time_approver_added" | "bill_pay_rejected" | "bill_pay_sent_for_approval" | "bill_pay_accept_term" | "zeni_account_accept_term" | "update_vendor" | "delete_bank_account" | "create_bank_account" | "create_bank_account_ach" | "create_bank_account_wire" | "create_bank_account_international" | "transfer_money" | "update_zeni_account_nickname" | "create_checking_account" | "deposit_check" | "create_vendor" | "onboarding_customer_view" | "onboarding_customer_view_complete" | "onboarding_customer_identity_verification_save" | "onboarding_customer_identity_verification_submit" | "onboarding_customer_business_verification_save" | "onboarding_customer_business_verification_submit" | "retry_bank_account_connection" | "dashboard_invite_sent" | "onboarding_info_saved" | "approve_original_merchant" | "approve_global_merchant" | "reject_global_merchant" | "create_global_merchant" | "fetch_global_merchant_no_recommendation" | "save_vendor_renamed" | "save_vendor_sent_for_review" | "charge_card_setup" | "charge_card_accept_term" | "create_schedule" | "save_schedule" | "save_task_detail" | "delete_task" | "archive_task" | "update_charge_card";
|
|
22
22
|
messageText: "failed" | "success";
|
|
23
23
|
type: import("../..").SnackbarMessageType;
|
|
24
24
|
showStatusIcon?: boolean | undefined;
|
|
@@ -35,7 +35,7 @@ export declare const invitePeopleEpic: (actions$: ActionsObservable<ActionType>,
|
|
|
35
35
|
type: string;
|
|
36
36
|
} | {
|
|
37
37
|
payload: {
|
|
38
|
-
messageSection: "common" | "transactionDetails_updatingPastTransactions" | "transactionDetails_transactionUpdated" | "cockpit_monthEndEmailSent" | "cockpit_monthEndEmailSave" | "people_invite_people" | "people_invite_multiple_people" | "people_delete_person" | "people_update_person" | "reimbursement_updated" | "reimbursement_deleted" | "reimbursement_cancelled_deleted" | "reimbursement_cancelled" | "reimbursement_approved" | "reimbursement_rejected" | "reimbursement_sent_for_approval" | "account_added" | "business_verification_save" | "business_verification_submit" | "business_verification_from_bills_submit" | "plaid_connection" | "unlink_deposit_account" | "reimbursement_setup" | "reimbursement_approval_create" | "reimbursement_duplicate_approval_create" | "reimbursement_approval_update" | "reimbursement_duplicate_approval_update" | "reimbursement_approval_delete" | "reimbursement_create_mileage" | "reimbursement_update_mileage" | "reimbursement_accept_term" | "reimbursement_accept_employee_term" | "bill_pay_setup" | "zeni_accounts_setup" | "bill_pay_approval_create" | "bill_pay_duplicate_approval_create" | "bill_pay_approval_update" | "bill_pay_duplicate_approval_update" | "bill_pay_approval_delete" | "bill_pay_updated" | "bill_pay_deleted" | "bill_pay_cancelled_deleted" | "bill_pay_cancelled" | "bill_pay_approved" | "real_time_approver_added" | "bill_pay_rejected" | "bill_pay_sent_for_approval" | "bill_pay_accept_term" | "zeni_account_accept_term" | "update_vendor" | "delete_bank_account" | "create_bank_account" | "create_bank_account_ach" | "create_bank_account_wire" | "create_bank_account_international" | "transfer_money" | "update_zeni_account_nickname" | "create_checking_account" | "deposit_check" | "create_vendor" | "onboarding_customer_view" | "onboarding_customer_view_complete" | "onboarding_customer_identity_verification_save" | "onboarding_customer_identity_verification_submit" | "onboarding_customer_business_verification_save" | "onboarding_customer_business_verification_submit" | "retry_bank_account_connection" | "dashboard_invite_sent" | "onboarding_info_saved" | "approve_original_merchant" | "approve_global_merchant" | "create_global_merchant" | "fetch_global_merchant_no_recommendation" | "save_vendor_renamed" | "save_vendor_sent_for_review" | "charge_card_setup" | "charge_card_accept_term" | "create_schedule" | "save_schedule" | "save_task_detail" | "delete_task" | "archive_task" | "update_charge_card";
|
|
38
|
+
messageSection: "common" | "transactionDetails_updatingPastTransactions" | "transactionDetails_transactionUpdated" | "cockpit_monthEndEmailSent" | "cockpit_monthEndEmailSave" | "people_invite_people" | "people_invite_multiple_people" | "people_delete_person" | "people_update_person" | "reimbursement_updated" | "reimbursement_deleted" | "reimbursement_cancelled_deleted" | "reimbursement_cancelled" | "reimbursement_approved" | "reimbursement_rejected" | "reimbursement_sent_for_approval" | "account_added" | "business_verification_save" | "business_verification_submit" | "business_verification_from_bills_submit" | "plaid_connection" | "unlink_deposit_account" | "reimbursement_setup" | "reimbursement_approval_create" | "reimbursement_duplicate_approval_create" | "reimbursement_approval_update" | "reimbursement_duplicate_approval_update" | "reimbursement_approval_delete" | "reimbursement_create_mileage" | "reimbursement_update_mileage" | "reimbursement_accept_term" | "reimbursement_accept_employee_term" | "bill_pay_setup" | "zeni_accounts_setup" | "bill_pay_approval_create" | "bill_pay_duplicate_approval_create" | "bill_pay_approval_update" | "bill_pay_duplicate_approval_update" | "bill_pay_approval_delete" | "bill_pay_updated" | "bill_pay_deleted" | "bill_pay_cancelled_deleted" | "bill_pay_cancelled" | "bill_pay_approved" | "real_time_approver_added" | "bill_pay_rejected" | "bill_pay_sent_for_approval" | "bill_pay_accept_term" | "zeni_account_accept_term" | "update_vendor" | "delete_bank_account" | "create_bank_account" | "create_bank_account_ach" | "create_bank_account_wire" | "create_bank_account_international" | "transfer_money" | "update_zeni_account_nickname" | "create_checking_account" | "deposit_check" | "create_vendor" | "onboarding_customer_view" | "onboarding_customer_view_complete" | "onboarding_customer_identity_verification_save" | "onboarding_customer_identity_verification_submit" | "onboarding_customer_business_verification_save" | "onboarding_customer_business_verification_submit" | "retry_bank_account_connection" | "dashboard_invite_sent" | "onboarding_info_saved" | "approve_original_merchant" | "approve_global_merchant" | "reject_global_merchant" | "create_global_merchant" | "fetch_global_merchant_no_recommendation" | "save_vendor_renamed" | "save_vendor_sent_for_review" | "charge_card_setup" | "charge_card_accept_term" | "create_schedule" | "save_schedule" | "save_task_detail" | "delete_task" | "archive_task" | "update_charge_card";
|
|
39
39
|
messageText: "failed" | "success";
|
|
40
40
|
type: import("../..").SnackbarMessageType;
|
|
41
41
|
showStatusIcon?: boolean | undefined;
|
|
@@ -32,7 +32,7 @@ export declare const inviteZeniPeopleEpic: (actions$: ActionsObservable<ActionTy
|
|
|
32
32
|
type: string;
|
|
33
33
|
} | {
|
|
34
34
|
payload: {
|
|
35
|
-
messageSection: "common" | "transactionDetails_updatingPastTransactions" | "transactionDetails_transactionUpdated" | "cockpit_monthEndEmailSent" | "cockpit_monthEndEmailSave" | "people_invite_people" | "people_invite_multiple_people" | "people_delete_person" | "people_update_person" | "reimbursement_updated" | "reimbursement_deleted" | "reimbursement_cancelled_deleted" | "reimbursement_cancelled" | "reimbursement_approved" | "reimbursement_rejected" | "reimbursement_sent_for_approval" | "account_added" | "business_verification_save" | "business_verification_submit" | "business_verification_from_bills_submit" | "plaid_connection" | "unlink_deposit_account" | "reimbursement_setup" | "reimbursement_approval_create" | "reimbursement_duplicate_approval_create" | "reimbursement_approval_update" | "reimbursement_duplicate_approval_update" | "reimbursement_approval_delete" | "reimbursement_create_mileage" | "reimbursement_update_mileage" | "reimbursement_accept_term" | "reimbursement_accept_employee_term" | "bill_pay_setup" | "zeni_accounts_setup" | "bill_pay_approval_create" | "bill_pay_duplicate_approval_create" | "bill_pay_approval_update" | "bill_pay_duplicate_approval_update" | "bill_pay_approval_delete" | "bill_pay_updated" | "bill_pay_deleted" | "bill_pay_cancelled_deleted" | "bill_pay_cancelled" | "bill_pay_approved" | "real_time_approver_added" | "bill_pay_rejected" | "bill_pay_sent_for_approval" | "bill_pay_accept_term" | "zeni_account_accept_term" | "update_vendor" | "delete_bank_account" | "create_bank_account" | "create_bank_account_ach" | "create_bank_account_wire" | "create_bank_account_international" | "transfer_money" | "update_zeni_account_nickname" | "create_checking_account" | "deposit_check" | "create_vendor" | "onboarding_customer_view" | "onboarding_customer_view_complete" | "onboarding_customer_identity_verification_save" | "onboarding_customer_identity_verification_submit" | "onboarding_customer_business_verification_save" | "onboarding_customer_business_verification_submit" | "retry_bank_account_connection" | "dashboard_invite_sent" | "onboarding_info_saved" | "approve_original_merchant" | "approve_global_merchant" | "create_global_merchant" | "fetch_global_merchant_no_recommendation" | "save_vendor_renamed" | "save_vendor_sent_for_review" | "charge_card_setup" | "charge_card_accept_term" | "create_schedule" | "save_schedule" | "save_task_detail" | "delete_task" | "archive_task" | "update_charge_card";
|
|
35
|
+
messageSection: "common" | "transactionDetails_updatingPastTransactions" | "transactionDetails_transactionUpdated" | "cockpit_monthEndEmailSent" | "cockpit_monthEndEmailSave" | "people_invite_people" | "people_invite_multiple_people" | "people_delete_person" | "people_update_person" | "reimbursement_updated" | "reimbursement_deleted" | "reimbursement_cancelled_deleted" | "reimbursement_cancelled" | "reimbursement_approved" | "reimbursement_rejected" | "reimbursement_sent_for_approval" | "account_added" | "business_verification_save" | "business_verification_submit" | "business_verification_from_bills_submit" | "plaid_connection" | "unlink_deposit_account" | "reimbursement_setup" | "reimbursement_approval_create" | "reimbursement_duplicate_approval_create" | "reimbursement_approval_update" | "reimbursement_duplicate_approval_update" | "reimbursement_approval_delete" | "reimbursement_create_mileage" | "reimbursement_update_mileage" | "reimbursement_accept_term" | "reimbursement_accept_employee_term" | "bill_pay_setup" | "zeni_accounts_setup" | "bill_pay_approval_create" | "bill_pay_duplicate_approval_create" | "bill_pay_approval_update" | "bill_pay_duplicate_approval_update" | "bill_pay_approval_delete" | "bill_pay_updated" | "bill_pay_deleted" | "bill_pay_cancelled_deleted" | "bill_pay_cancelled" | "bill_pay_approved" | "real_time_approver_added" | "bill_pay_rejected" | "bill_pay_sent_for_approval" | "bill_pay_accept_term" | "zeni_account_accept_term" | "update_vendor" | "delete_bank_account" | "create_bank_account" | "create_bank_account_ach" | "create_bank_account_wire" | "create_bank_account_international" | "transfer_money" | "update_zeni_account_nickname" | "create_checking_account" | "deposit_check" | "create_vendor" | "onboarding_customer_view" | "onboarding_customer_view_complete" | "onboarding_customer_identity_verification_save" | "onboarding_customer_identity_verification_submit" | "onboarding_customer_business_verification_save" | "onboarding_customer_business_verification_submit" | "retry_bank_account_connection" | "dashboard_invite_sent" | "onboarding_info_saved" | "approve_original_merchant" | "approve_global_merchant" | "reject_global_merchant" | "create_global_merchant" | "fetch_global_merchant_no_recommendation" | "save_vendor_renamed" | "save_vendor_sent_for_review" | "charge_card_setup" | "charge_card_accept_term" | "create_schedule" | "save_schedule" | "save_task_detail" | "delete_task" | "archive_task" | "update_charge_card";
|
|
36
36
|
messageText: "failed" | "success";
|
|
37
37
|
type: import("../..").SnackbarMessageType;
|
|
38
38
|
showStatusIcon?: boolean | undefined;
|
|
@@ -13,7 +13,7 @@ export declare const resendInviteEpic: (actions$: ActionsObservable<ActionType>,
|
|
|
13
13
|
type: string;
|
|
14
14
|
} | {
|
|
15
15
|
payload: {
|
|
16
|
-
messageSection: "common" | "transactionDetails_updatingPastTransactions" | "transactionDetails_transactionUpdated" | "cockpit_monthEndEmailSent" | "cockpit_monthEndEmailSave" | "people_invite_people" | "people_invite_multiple_people" | "people_delete_person" | "people_update_person" | "reimbursement_updated" | "reimbursement_deleted" | "reimbursement_cancelled_deleted" | "reimbursement_cancelled" | "reimbursement_approved" | "reimbursement_rejected" | "reimbursement_sent_for_approval" | "account_added" | "business_verification_save" | "business_verification_submit" | "business_verification_from_bills_submit" | "plaid_connection" | "unlink_deposit_account" | "reimbursement_setup" | "reimbursement_approval_create" | "reimbursement_duplicate_approval_create" | "reimbursement_approval_update" | "reimbursement_duplicate_approval_update" | "reimbursement_approval_delete" | "reimbursement_create_mileage" | "reimbursement_update_mileage" | "reimbursement_accept_term" | "reimbursement_accept_employee_term" | "bill_pay_setup" | "zeni_accounts_setup" | "bill_pay_approval_create" | "bill_pay_duplicate_approval_create" | "bill_pay_approval_update" | "bill_pay_duplicate_approval_update" | "bill_pay_approval_delete" | "bill_pay_updated" | "bill_pay_deleted" | "bill_pay_cancelled_deleted" | "bill_pay_cancelled" | "bill_pay_approved" | "real_time_approver_added" | "bill_pay_rejected" | "bill_pay_sent_for_approval" | "bill_pay_accept_term" | "zeni_account_accept_term" | "update_vendor" | "delete_bank_account" | "create_bank_account" | "create_bank_account_ach" | "create_bank_account_wire" | "create_bank_account_international" | "transfer_money" | "update_zeni_account_nickname" | "create_checking_account" | "deposit_check" | "create_vendor" | "onboarding_customer_view" | "onboarding_customer_view_complete" | "onboarding_customer_identity_verification_save" | "onboarding_customer_identity_verification_submit" | "onboarding_customer_business_verification_save" | "onboarding_customer_business_verification_submit" | "retry_bank_account_connection" | "dashboard_invite_sent" | "onboarding_info_saved" | "approve_original_merchant" | "approve_global_merchant" | "create_global_merchant" | "fetch_global_merchant_no_recommendation" | "save_vendor_renamed" | "save_vendor_sent_for_review" | "charge_card_setup" | "charge_card_accept_term" | "create_schedule" | "save_schedule" | "save_task_detail" | "delete_task" | "archive_task" | "update_charge_card";
|
|
16
|
+
messageSection: "common" | "transactionDetails_updatingPastTransactions" | "transactionDetails_transactionUpdated" | "cockpit_monthEndEmailSent" | "cockpit_monthEndEmailSave" | "people_invite_people" | "people_invite_multiple_people" | "people_delete_person" | "people_update_person" | "reimbursement_updated" | "reimbursement_deleted" | "reimbursement_cancelled_deleted" | "reimbursement_cancelled" | "reimbursement_approved" | "reimbursement_rejected" | "reimbursement_sent_for_approval" | "account_added" | "business_verification_save" | "business_verification_submit" | "business_verification_from_bills_submit" | "plaid_connection" | "unlink_deposit_account" | "reimbursement_setup" | "reimbursement_approval_create" | "reimbursement_duplicate_approval_create" | "reimbursement_approval_update" | "reimbursement_duplicate_approval_update" | "reimbursement_approval_delete" | "reimbursement_create_mileage" | "reimbursement_update_mileage" | "reimbursement_accept_term" | "reimbursement_accept_employee_term" | "bill_pay_setup" | "zeni_accounts_setup" | "bill_pay_approval_create" | "bill_pay_duplicate_approval_create" | "bill_pay_approval_update" | "bill_pay_duplicate_approval_update" | "bill_pay_approval_delete" | "bill_pay_updated" | "bill_pay_deleted" | "bill_pay_cancelled_deleted" | "bill_pay_cancelled" | "bill_pay_approved" | "real_time_approver_added" | "bill_pay_rejected" | "bill_pay_sent_for_approval" | "bill_pay_accept_term" | "zeni_account_accept_term" | "update_vendor" | "delete_bank_account" | "create_bank_account" | "create_bank_account_ach" | "create_bank_account_wire" | "create_bank_account_international" | "transfer_money" | "update_zeni_account_nickname" | "create_checking_account" | "deposit_check" | "create_vendor" | "onboarding_customer_view" | "onboarding_customer_view_complete" | "onboarding_customer_identity_verification_save" | "onboarding_customer_identity_verification_submit" | "onboarding_customer_business_verification_save" | "onboarding_customer_business_verification_submit" | "retry_bank_account_connection" | "dashboard_invite_sent" | "onboarding_info_saved" | "approve_original_merchant" | "approve_global_merchant" | "reject_global_merchant" | "create_global_merchant" | "fetch_global_merchant_no_recommendation" | "save_vendor_renamed" | "save_vendor_sent_for_review" | "charge_card_setup" | "charge_card_accept_term" | "create_schedule" | "save_schedule" | "save_task_detail" | "delete_task" | "archive_task" | "update_charge_card";
|
|
17
17
|
messageText: "failed" | "success";
|
|
18
18
|
type: import("../..").SnackbarMessageType;
|
|
19
19
|
showStatusIcon?: boolean | undefined;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { RootState } from '../../reducer';
|
|
2
2
|
export declare const getReimbursementCardReport: (state: RootState) => {
|
|
3
|
-
reportId: "cash_balance" | "card_balance" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "charge_cards" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses";
|
|
3
|
+
reportId: "cash_balance" | "card_balance" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "charge_cards" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses";
|
|
4
4
|
reportTitle: string;
|
|
5
5
|
version: string | number | undefined;
|
|
6
6
|
fetchState: import("../..").FetchState;
|
package/lib/view/scheduleView/scheduleDetailView/epics/initializeScheduleDetailLocalDataEpic.js
CHANGED
|
@@ -11,8 +11,8 @@ const initializeScheduleDetailLocalDataEpic = (actions$, state$) => actions$.pip
|
|
|
11
11
|
const { scheduleDetailState } = state;
|
|
12
12
|
const actions = [];
|
|
13
13
|
const { selectedJeScheduleDetailId, selectedJEScheduleKey } = action.payload;
|
|
14
|
+
const jeScheduleTransactionState = (0, jeSchedulesSelector_1.getJEScheduledTransactionByJEScheduleKey)(selectedJEScheduleKey, state);
|
|
14
15
|
if (selectedJeScheduleDetailId != null) {
|
|
15
|
-
const jeScheduleTransactionState = (0, jeSchedulesSelector_1.getJEScheduledTransactionByJEScheduleKey)(selectedJEScheduleKey, state);
|
|
16
16
|
const scheduledJournalEntry = jeScheduleTransactionState.scheduledJournalEntry;
|
|
17
17
|
if (selectedJEScheduleKey != null) {
|
|
18
18
|
actions.push((0, scheduleDetailReducer_1.updateScheduleDetailsLocalData)({
|
|
@@ -22,8 +22,10 @@ const initializeScheduleDetailLocalDataEpic = (actions$, state$) => actions$.pip
|
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
else {
|
|
25
|
+
// Initialize the start posting date with the start month of transaction
|
|
26
|
+
const transactionStartMonth = jeScheduleTransactionState.baseTransaction.date.endOf('month');
|
|
25
27
|
actions.push((0, scheduleDetailReducer_1.updateScheduleDetailsLocalData)({
|
|
26
|
-
localData: scheduleDetailState.newScheduleState,
|
|
28
|
+
localData: Object.assign(Object.assign({}, scheduleDetailState.newScheduleState), { selectedDate: transactionStartMonth }),
|
|
27
29
|
selectedJeScheduleDetailId: undefined,
|
|
28
30
|
}));
|
|
29
31
|
}
|
|
@@ -12,7 +12,6 @@ const scheduleListReducer_1 = require("./scheduleListReducer");
|
|
|
12
12
|
const scheduleListTypes_1 = require("./scheduleListTypes");
|
|
13
13
|
const amount_1 = require("../../../commonStateTypes/amount");
|
|
14
14
|
const scheduleListHelper_1 = require("./scheduleListHelper");
|
|
15
|
-
const scheduleListHelper_2 = require("./scheduleListHelper");
|
|
16
15
|
const accountSelector_1 = require("../../../entity/account/accountSelector");
|
|
17
16
|
const sortedJETransactionsView = (jeTransactions, sortKey, sortOrder) => {
|
|
18
17
|
return (0, orderBy_1.default)(jeTransactions, (jeTransaction) => {
|
|
@@ -71,7 +70,7 @@ const getScheduleListReport = (state) => {
|
|
|
71
70
|
const allScheduleAccounts = (0, accountListSelector_1.getAccountList)(accountState, accountListState, (0, scheduleListHelper_1.getAccountListKeyForSchedulesTab)(scheduleListState.currentTab));
|
|
72
71
|
let allNestedAccounts = (0, accountListSelector_1.getNestedAccountListHeirarchy)(accountListState, (0, scheduleListHelper_1.getAccountListKeyForSchedulesTab)(scheduleListState.currentTab));
|
|
73
72
|
let allAccounts = allScheduleAccounts.accounts;
|
|
74
|
-
const scheduleListCurrentTabAccountTypes = (0,
|
|
73
|
+
const scheduleListCurrentTabAccountTypes = (0, scheduleListHelper_1.getAccountsTypesForScheduleList)(scheduleListState.currentTab).allowedAccountList;
|
|
75
74
|
const scheduleListCurrentTabAccountIds = (0, accountSelector_1.getAccountIdsForTypes)(accountState, scheduleListCurrentTabAccountTypes);
|
|
76
75
|
if (scheduleListState.currentTab === 'prepaid_expenses') {
|
|
77
76
|
const filteredList = (0, accountListSelector_1.getFilteredNestedAndAccountListsForLabel)(accountState, accountListState, (0, scheduleListHelper_1.getAccountListKeyForSchedulesTab)(scheduleListState.currentTab), 'prepaid_expenses');
|
|
@@ -125,8 +125,20 @@ const getTotalPayments = (startDate, endDate, frequency, currentInstance) => {
|
|
|
125
125
|
pastPayments = currentInstance.instance - 1;
|
|
126
126
|
}
|
|
127
127
|
let totalPayments = 0;
|
|
128
|
-
|
|
129
|
-
|
|
128
|
+
switch (frequency) {
|
|
129
|
+
case 'weekly':
|
|
130
|
+
case 'biweekly':
|
|
131
|
+
totalPayments =
|
|
132
|
+
endDate.diff(currentStartDate, 'day') /
|
|
133
|
+
getRecurringFrequencyInDays(frequency);
|
|
134
|
+
break;
|
|
135
|
+
case 'monthly':
|
|
136
|
+
totalPayments = endDate.diff(currentStartDate, 'month');
|
|
137
|
+
break;
|
|
138
|
+
case 'quarterly':
|
|
139
|
+
totalPayments = endDate.diff(currentStartDate, 'quarter');
|
|
140
|
+
break;
|
|
141
|
+
}
|
|
130
142
|
return Math.floor(totalPayments + pastPayments) + 1; //+1 to include startDate
|
|
131
143
|
};
|
|
132
144
|
exports.getTotalPayments = getTotalPayments;
|
|
@@ -138,16 +150,44 @@ const getEndDate = (startDate, frequency, totalPayments, currentInstance) => {
|
|
|
138
150
|
currentStartDate = currentInstance.vendorReceiveDate;
|
|
139
151
|
currentTotalPayments = totalPayments - currentInstance.instance + 1;
|
|
140
152
|
}
|
|
141
|
-
|
|
142
|
-
|
|
153
|
+
switch (frequency) {
|
|
154
|
+
case 'weekly':
|
|
155
|
+
case 'biweekly':
|
|
156
|
+
endDate = currentStartDate.add(getRecurringFrequencyInDays(frequency) * (currentTotalPayments - 1), 'day');
|
|
157
|
+
break;
|
|
158
|
+
case 'monthly':
|
|
159
|
+
endDate = currentStartDate.add(currentTotalPayments - 1, 'month');
|
|
160
|
+
break;
|
|
161
|
+
case 'quarterly':
|
|
162
|
+
endDate = currentStartDate.add(currentTotalPayments - 1, 'quarter');
|
|
163
|
+
break;
|
|
164
|
+
}
|
|
143
165
|
return endDate;
|
|
144
166
|
};
|
|
145
167
|
exports.getEndDate = getEndDate;
|
|
146
168
|
function getRecurringBillInstances(startDate, frequency, totalPayments, currentInstance, billAmount) {
|
|
147
169
|
const updatedInstances = [];
|
|
148
|
-
const
|
|
170
|
+
const getRecurringFrequencyWithOffset = (frequency) => {
|
|
171
|
+
switch (frequency) {
|
|
172
|
+
case 'weekly':
|
|
173
|
+
return {
|
|
174
|
+
offSetValue: getRecurringFrequencyInDays(frequency),
|
|
175
|
+
offSetUnit: 'day',
|
|
176
|
+
};
|
|
177
|
+
case 'biweekly':
|
|
178
|
+
return {
|
|
179
|
+
offSetValue: getRecurringFrequencyInDays(frequency),
|
|
180
|
+
offSetUnit: 'day',
|
|
181
|
+
};
|
|
182
|
+
case 'monthly':
|
|
183
|
+
return { offSetValue: 1, offSetUnit: 'month' };
|
|
184
|
+
case 'quarterly':
|
|
185
|
+
return { offSetValue: 1, offSetUnit: 'quarter' };
|
|
186
|
+
}
|
|
187
|
+
};
|
|
188
|
+
const { offSetValue, offSetUnit } = getRecurringFrequencyWithOffset(frequency);
|
|
149
189
|
for (let i = 0; i < totalPayments; i++) {
|
|
150
|
-
updatedInstances.push(Object.assign({ instance: currentInstance + i, isDeleted: false, amount: billAmount }, checkIfHolidayAndGetNextDate(startDate.add(i * offSetValue,
|
|
190
|
+
updatedInstances.push(Object.assign({ instance: currentInstance + i, isDeleted: false, amount: billAmount }, checkIfHolidayAndGetNextDate(startDate.add(i * offSetValue, offSetUnit))));
|
|
151
191
|
}
|
|
152
192
|
return updatedInstances;
|
|
153
193
|
}
|
|
@@ -31,8 +31,8 @@ const filterItemOnRangeCategoryType = (valueForItem, currentFilter) => {
|
|
|
31
31
|
const currentValue = valueForItem;
|
|
32
32
|
const lowerValue = currentFilter.values[0];
|
|
33
33
|
const higherValue = currentFilter.values[1];
|
|
34
|
-
if (currentValue.
|
|
35
|
-
currentValue.
|
|
34
|
+
if (currentValue.isSameOrAfter(lowerValue) &&
|
|
35
|
+
currentValue.isSameOrBefore(higherValue)) {
|
|
36
36
|
doesItemFallInValueRange = true;
|
|
37
37
|
}
|
|
38
38
|
}
|
|
@@ -120,7 +120,8 @@ const applyAdvancedFiltersOnList = (entity, allItems, filters, filteredItems = [
|
|
|
120
120
|
}
|
|
121
121
|
return false;
|
|
122
122
|
}
|
|
123
|
-
else if (currentFilter.field === 'status'
|
|
123
|
+
else if ((currentFilter.field === 'status' ||
|
|
124
|
+
currentFilter.field === 'assignee') &&
|
|
124
125
|
Array.isArray(categoryValue)) {
|
|
125
126
|
return (0, exports.filterItemOnCategoriesWithMultipleValues)(categoryValue, currentFilter);
|
|
126
127
|
}
|
|
@@ -46,6 +46,16 @@ const transferDetail = (0, toolkit_1.createSlice)({
|
|
|
46
46
|
};
|
|
47
47
|
draft.localData = Object.assign(Object.assign({}, draft.localData), { transferTo: transferMoneyParty });
|
|
48
48
|
},
|
|
49
|
+
updateTransferFromLocalData(draft, action) {
|
|
50
|
+
const transferMoneyParty = {
|
|
51
|
+
id: action.payload.paymentAccountId,
|
|
52
|
+
accType: 'paymentAccount',
|
|
53
|
+
label: action.payload.accountName,
|
|
54
|
+
maskedAccountNumber: action.payload.maskedAccountNumber,
|
|
55
|
+
logo: undefined,
|
|
56
|
+
};
|
|
57
|
+
draft.localData = Object.assign(Object.assign({}, draft.localData), { transferTo: transferMoneyParty });
|
|
58
|
+
},
|
|
49
59
|
transferMoneySuccessOrFailure(draft, action) {
|
|
50
60
|
draft.fetchState = action.payload.fetchState;
|
|
51
61
|
draft.error = action.payload.error;
|
|
@@ -14,7 +14,14 @@ exports.initialState = {
|
|
|
14
14
|
},
|
|
15
15
|
filters: {
|
|
16
16
|
categoryCombinationOperator: 'AND',
|
|
17
|
-
categories: [
|
|
17
|
+
categories: [
|
|
18
|
+
{
|
|
19
|
+
field: 'status',
|
|
20
|
+
matchingOperator: 'not-equal',
|
|
21
|
+
values: ['resolved'],
|
|
22
|
+
valuesCombinationOperator: 'ANY',
|
|
23
|
+
},
|
|
24
|
+
],
|
|
18
25
|
},
|
|
19
26
|
hasValidState() {
|
|
20
27
|
return this.fetchState == 'Completed';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { RootState } from '../../reducer';
|
|
2
2
|
export declare const getTasksCardReport: (state: RootState) => {
|
|
3
|
-
reportId: "cash_balance" | "card_balance" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "charge_cards" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses";
|
|
3
|
+
reportId: "cash_balance" | "card_balance" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "charge_cards" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses";
|
|
4
4
|
reportTitle: string;
|
|
5
5
|
version: string | number | undefined;
|
|
6
6
|
status: import("../..").Status | undefined;
|
|
@@ -5,7 +5,7 @@ import { AccountState } from '../../entity/account/accountState';
|
|
|
5
5
|
import { EntityOrder } from '../../commonStateTypes/selectorTypes/selectorTypes';
|
|
6
6
|
import { TopExReport, TopExTimePeriodWithMetaData } from './topExSelectorTypes';
|
|
7
7
|
export declare const getTopExpenses: (accountState: AccountState, topExState: TopExState, numberOfExpenses?: number | undefined) => {
|
|
8
|
-
reportId: "cash_balance" | "card_balance" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "charge_cards" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses";
|
|
8
|
+
reportId: "cash_balance" | "card_balance" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "charge_cards" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses";
|
|
9
9
|
reportTitle: string;
|
|
10
10
|
version: string | number | undefined;
|
|
11
11
|
status: import("../..").Status | undefined;
|
|
@@ -144,7 +144,9 @@ const transactionList = (0, toolkit_1.createSlice)({
|
|
|
144
144
|
}
|
|
145
145
|
},
|
|
146
146
|
prepare(entity, period, cacheOverride = false) {
|
|
147
|
-
return {
|
|
147
|
+
return {
|
|
148
|
+
payload: { entity, period, cacheOverride },
|
|
149
|
+
};
|
|
148
150
|
},
|
|
149
151
|
},
|
|
150
152
|
updateTransactionListByEntity(draft, action) {
|
|
@@ -293,13 +295,7 @@ const transactionList = (0, toolkit_1.createSlice)({
|
|
|
293
295
|
},
|
|
294
296
|
},
|
|
295
297
|
});
|
|
296
|
-
_a = transactionList.actions, exports.parallelFetchAccountTransactionList = _a.parallelFetchAccountTransactionList, exports.fetchAccountTransactionList = _a.fetchAccountTransactionList, exports.updateTransactionListByAccount = _a.updateTransactionListByAccount, exports.updateTransactionListByAccountFailure = _a.updateTransactionListByAccountFailure, exports.parallelFetchEntityTransactionList = _a.parallelFetchEntityTransactionList, exports.fetchEntityTransactionList = _a.fetchEntityTransactionList, exports.updateTransactionListByEntity = _a.updateTransactionListByEntity, exports.updateTransactionListByEntityFailure = _a.updateTransactionListByEntityFailure, exports.updateTransactionListByAccountUIState = _a.updateTransactionListByAccountUIState,
|
|
297
|
-
// parallelFetchMissingReceiptTransactionList,
|
|
298
|
-
// fetchMissingReceiptTransactionList,
|
|
299
|
-
// updateMissingReceiptTransactionList,
|
|
300
|
-
// updateMissingReceiptTransactionListUIState,
|
|
301
|
-
// updateMissingReceiptTransactionListFailure,
|
|
302
|
-
exports.parallelFetchClassTransactionList = _a.parallelFetchClassTransactionList, exports.fetchClassTransactionList = _a.fetchClassTransactionList, exports.updateTransactionListByClass = _a.updateTransactionListByClass, exports.updateTransactionListByClassUIState = _a.updateTransactionListByClassUIState, exports.updateTransactionListByClassFailure = _a.updateTransactionListByClassFailure, exports.parallelFetchTransactionListByCategoryType = _a.parallelFetchTransactionListByCategoryType, exports.fetchTransactionsListByCategoryType = _a.fetchTransactionsListByCategoryType, exports.updateTransactionListByCategoryType = _a.updateTransactionListByCategoryType, exports.updateTransactionsListByCategoryTypeFailure = _a.updateTransactionsListByCategoryTypeFailure, exports.updateTransactionListUIStateByCategoryType = _a.updateTransactionListUIStateByCategoryType, exports.clearTransactionList = _a.clearTransactionList, exports.updateLatestTransactionId = _a.updateLatestTransactionId;
|
|
298
|
+
_a = transactionList.actions, exports.parallelFetchAccountTransactionList = _a.parallelFetchAccountTransactionList, exports.fetchAccountTransactionList = _a.fetchAccountTransactionList, exports.updateTransactionListByAccount = _a.updateTransactionListByAccount, exports.updateTransactionListByAccountFailure = _a.updateTransactionListByAccountFailure, exports.parallelFetchEntityTransactionList = _a.parallelFetchEntityTransactionList, exports.fetchEntityTransactionList = _a.fetchEntityTransactionList, exports.updateTransactionListByEntity = _a.updateTransactionListByEntity, exports.updateTransactionListByEntityFailure = _a.updateTransactionListByEntityFailure, exports.updateTransactionListByAccountUIState = _a.updateTransactionListByAccountUIState, exports.parallelFetchClassTransactionList = _a.parallelFetchClassTransactionList, exports.fetchClassTransactionList = _a.fetchClassTransactionList, exports.updateTransactionListByClass = _a.updateTransactionListByClass, exports.updateTransactionListByClassUIState = _a.updateTransactionListByClassUIState, exports.updateTransactionListByClassFailure = _a.updateTransactionListByClassFailure, exports.parallelFetchTransactionListByCategoryType = _a.parallelFetchTransactionListByCategoryType, exports.fetchTransactionsListByCategoryType = _a.fetchTransactionsListByCategoryType, exports.updateTransactionListByCategoryType = _a.updateTransactionListByCategoryType, exports.updateTransactionsListByCategoryTypeFailure = _a.updateTransactionsListByCategoryTypeFailure, exports.updateTransactionListUIStateByCategoryType = _a.updateTransactionListUIStateByCategoryType, exports.clearTransactionList = _a.clearTransactionList, exports.updateLatestTransactionId = _a.updateLatestTransactionId;
|
|
303
299
|
exports.default = transactionList.reducer;
|
|
304
300
|
/**
|
|
305
301
|
* Helper functions
|
|
@@ -2,8 +2,8 @@ import { GlobalMerchantBase } from '../../../../entity/globalMerchant/globalMerc
|
|
|
2
2
|
import { RecommendedNonExistingGlobalMerchantBasePayload, VendorReviewViewAllRecommendationsPayload, VendorReviewViewNonExistingRecommendationsPayload, VendorReviewViewRecommendationsPayload } from '../payload/commonTypes';
|
|
3
3
|
import { ID } from '../../../../commonStateTypes/common';
|
|
4
4
|
import { RecommendedNonExistingGlobalMerchant } from '../../vendorFirstReviewView/vendorFirstReviewViewState';
|
|
5
|
-
export declare const VENDOR_FIRST_REVIEW_VIEW_STATUSES: readonly ["pending", "under_review", "merge_in_qbo", "reviewed"];
|
|
6
|
-
export declare const toVendorFirstReviewViewStatusesTypeStrict: (v: string) => "pending" | "under_review" | "merge_in_qbo" | "reviewed" | undefined;
|
|
5
|
+
export declare const VENDOR_FIRST_REVIEW_VIEW_STATUSES: readonly ["pending", "under_review", "merge_in_qbo", "reviewed", "review_rejected"];
|
|
6
|
+
export declare const toVendorFirstReviewViewStatusesTypeStrict: (v: string) => "pending" | "under_review" | "merge_in_qbo" | "reviewed" | "review_rejected" | undefined;
|
|
7
7
|
export declare type VendorFirstReviewViewStatusesKey = ReturnType<typeof toVendorFirstReviewViewStatusesTypeStrict>;
|
|
8
8
|
export declare type ReviewStatus = {
|
|
9
9
|
code: VendorFirstReviewViewStatusesKey;
|
|
@@ -11,6 +11,7 @@ exports.VENDOR_FIRST_REVIEW_VIEW_STATUSES = [
|
|
|
11
11
|
'under_review',
|
|
12
12
|
'merge_in_qbo',
|
|
13
13
|
'reviewed',
|
|
14
|
+
'review_rejected',
|
|
14
15
|
];
|
|
15
16
|
const toVendorFirstReviewViewStatusesTypeStrict = (v) => (0, stringToUnion_1.stringToUnionStrict)(v, exports.VENDOR_FIRST_REVIEW_VIEW_STATUSES);
|
|
16
17
|
exports.toVendorFirstReviewViewStatusesTypeStrict = toVendorFirstReviewViewStatusesTypeStrict;
|
package/lib/view/vendorReviewView/vendorGlobalReviewView/epics/rejectVendorGlobalReviewEpic.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
|
+
import { ZeniAPI } from '../../../../zeniAPI';
|
|
3
|
+
import { RootState } from '../../../../reducer';
|
|
4
|
+
import { rejectVendorGlobalReview, rejectVendorGlobalReviewFailure, rejectVendorGlobalReviewSuccess } from '../vendorGlobalReviewViewReducer';
|
|
5
|
+
import { openSnackbar } from '../../../../entity/snackbar/snackbarReducer';
|
|
6
|
+
export declare type ActionType = ReturnType<typeof rejectVendorGlobalReview> | ReturnType<typeof rejectVendorGlobalReviewSuccess> | ReturnType<typeof rejectVendorGlobalReviewFailure> | ReturnType<typeof openSnackbar>;
|
|
7
|
+
export declare const rejectVendorGlobalReviewEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => import("rxjs").Observable<never[] | ActionType>;
|
package/lib/view/vendorReviewView/vendorGlobalReviewView/epics/rejectVendorGlobalReviewEpic.js
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.rejectVendorGlobalReviewEpic = void 0;
|
|
4
|
+
const rxjs_1 = require("rxjs");
|
|
5
|
+
const operators_1 = require("rxjs/operators");
|
|
6
|
+
const responsePayload_1 = require("../../../../responsePayload");
|
|
7
|
+
const vendorGlobalReviewViewReducer_1 = require("../vendorGlobalReviewViewReducer");
|
|
8
|
+
const snackbarReducer_1 = require("../../../../entity/snackbar/snackbarReducer");
|
|
9
|
+
const globalMerchantSelector_1 = require("../../../../entity/globalMerchant/globalMerchantSelector");
|
|
10
|
+
const globalMerchantState_1 = require("../../../../entity/globalMerchant/globalMerchantState");
|
|
11
|
+
const commonTypes_1 = require("../../common/payload/commonTypes");
|
|
12
|
+
const rejectVendorGlobalReviewEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(vendorGlobalReviewViewReducer_1.rejectVendorGlobalReview.match), (0, operators_1.mergeMap)((action) => {
|
|
13
|
+
const { merchantId } = action.payload;
|
|
14
|
+
const { globalMerchantState, vendorGlobalReviewViewState } = state$.value;
|
|
15
|
+
const { vendorGlobalByMerchantId } = vendorGlobalReviewViewState;
|
|
16
|
+
const merchantData = vendorGlobalByMerchantId[merchantId].vendorGlobalReviewViewLocalData;
|
|
17
|
+
const tenantMerchant = (0, globalMerchantSelector_1.getTenantMerchantByMerchantKey)(globalMerchantState, (0, globalMerchantState_1.getTenantMerchantKey)(merchantData.tenantId, merchantId));
|
|
18
|
+
if (merchantData != null && tenantMerchant != null) {
|
|
19
|
+
const recommendations = Array({
|
|
20
|
+
globalMerchants: (0, globalMerchantSelector_1.getGlobalMerchantsByMerchantIds)(globalMerchantState, merchantData.recommendationIds),
|
|
21
|
+
});
|
|
22
|
+
const nonExistingRecommendations = Array({
|
|
23
|
+
globalMerchants: merchantData.recommendedNonExistingGlobalMerchants,
|
|
24
|
+
});
|
|
25
|
+
const allRecommendations = (0, commonTypes_1.toVendorReviewViewRecommendationPayload)(recommendations, nonExistingRecommendations);
|
|
26
|
+
const payload = Object.assign({}, toRejectVendorGlobalReviewQueryPayload(tenantMerchant, allRecommendations));
|
|
27
|
+
return zeniAPI
|
|
28
|
+
.putAndGetJSON(`${zeniAPI.apiEndPoints.tenantMicroServiceBaseUrl}/1.0/reviews/global-merchant-list/${merchantId}`, payload)
|
|
29
|
+
.pipe((0, operators_1.mergeMap)((response) => {
|
|
30
|
+
if ((0, responsePayload_1.isSuccessStatus)(response)) {
|
|
31
|
+
const variables = [
|
|
32
|
+
{
|
|
33
|
+
variableName: '_merchant_name_',
|
|
34
|
+
variableValue: tenantMerchant.tenantMerchantName,
|
|
35
|
+
},
|
|
36
|
+
];
|
|
37
|
+
const actions = [
|
|
38
|
+
(0, vendorGlobalReviewViewReducer_1.rejectVendorGlobalReviewSuccess)(merchantId),
|
|
39
|
+
(0, snackbarReducer_1.openSnackbar)({
|
|
40
|
+
messageSection: 'reject_global_merchant',
|
|
41
|
+
messageText: 'success',
|
|
42
|
+
type: 'success',
|
|
43
|
+
variables,
|
|
44
|
+
}),
|
|
45
|
+
];
|
|
46
|
+
return (0, rxjs_1.from)(actions);
|
|
47
|
+
}
|
|
48
|
+
else {
|
|
49
|
+
if (response.status.code === 409) {
|
|
50
|
+
return (0, rxjs_1.of)((0, vendorGlobalReviewViewReducer_1.rejectVendorGlobalReviewFailure)({
|
|
51
|
+
merchantId,
|
|
52
|
+
status: response.status,
|
|
53
|
+
}));
|
|
54
|
+
}
|
|
55
|
+
return (0, rxjs_1.of)((0, vendorGlobalReviewViewReducer_1.rejectVendorGlobalReviewFailure)({
|
|
56
|
+
merchantId,
|
|
57
|
+
status: response.status,
|
|
58
|
+
}), (0, snackbarReducer_1.openSnackbar)({
|
|
59
|
+
messageSection: 'reject_global_merchant',
|
|
60
|
+
messageText: 'failed',
|
|
61
|
+
type: 'error',
|
|
62
|
+
variables: [
|
|
63
|
+
{
|
|
64
|
+
variableName: '_api-error_',
|
|
65
|
+
variableValue: response.status.message,
|
|
66
|
+
},
|
|
67
|
+
],
|
|
68
|
+
}));
|
|
69
|
+
}
|
|
70
|
+
}), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, vendorGlobalReviewViewReducer_1.rejectVendorGlobalReviewFailure)({
|
|
71
|
+
merchantId,
|
|
72
|
+
status: (0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', 'Reject Vendor Global Review REST API call errored out' +
|
|
73
|
+
JSON.stringify(error)),
|
|
74
|
+
}))));
|
|
75
|
+
}
|
|
76
|
+
return (0, rxjs_1.of)([]);
|
|
77
|
+
}));
|
|
78
|
+
exports.rejectVendorGlobalReviewEpic = rejectVendorGlobalReviewEpic;
|
|
79
|
+
/**
|
|
80
|
+
* Helper
|
|
81
|
+
*/
|
|
82
|
+
const toRejectVendorGlobalReviewQueryPayload = (tenantMerchant, allRecommendations) => {
|
|
83
|
+
const payload = {
|
|
84
|
+
tenant_name: tenantMerchant.tenantName,
|
|
85
|
+
merchant_type: 'vendor',
|
|
86
|
+
tenant_id: tenantMerchant.tenantId,
|
|
87
|
+
review_status: 'review_rejected',
|
|
88
|
+
recommendations: allRecommendations,
|
|
89
|
+
merchant_name: tenantMerchant.tenantMerchantName,
|
|
90
|
+
};
|
|
91
|
+
return payload;
|
|
92
|
+
};
|
|
@@ -37,7 +37,16 @@ export interface ApproveVendorGlobalReviewQueryPayload {
|
|
|
37
37
|
merchant_name: string;
|
|
38
38
|
recommendations: VendorReviewViewAllRecommendationsPayload;
|
|
39
39
|
}
|
|
40
|
+
export interface RejectVendorGlobalReviewQueryPayload {
|
|
41
|
+
merchant_type: string;
|
|
42
|
+
tenant_id: string;
|
|
43
|
+
tenant_name: string;
|
|
44
|
+
review_status: string;
|
|
45
|
+
merchant_name: string;
|
|
46
|
+
recommendations: VendorReviewViewAllRecommendationsPayload;
|
|
47
|
+
}
|
|
40
48
|
export declare type ApproveVendorGlobalReviewResponse = ZeniAPIResponse;
|
|
49
|
+
export declare type RejectVendorGlobalReviewResponse = ZeniAPIResponse;
|
|
41
50
|
export interface CreateAndApproveGlobalMerchantPayload {
|
|
42
51
|
global_merchants: GlobalMerchantBasePayload[];
|
|
43
52
|
}
|
|
@@ -21,9 +21,14 @@ export declare const fetchVendorGlobalReviewView: import("@reduxjs/toolkit").Act
|
|
|
21
21
|
selectedMerchantId: string;
|
|
22
22
|
}, string, never, never>, approveVendorGlobalReview: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[merchantId: string], {
|
|
23
23
|
merchantId: string;
|
|
24
|
+
}, string, never, never>, rejectVendorGlobalReview: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[merchantId: string], {
|
|
25
|
+
merchantId: string;
|
|
24
26
|
}, string, never, never>, approveVendorGlobalReviewSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, string>, approveVendorGlobalReviewFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
25
27
|
merchantId: ID;
|
|
26
28
|
status: ZeniAPIStatus;
|
|
27
|
-
}, string>,
|
|
29
|
+
}, string>, rejectVendorGlobalReviewFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
30
|
+
merchantId: ID;
|
|
31
|
+
status: ZeniAPIStatus;
|
|
32
|
+
}, string>, rejectVendorGlobalReviewSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, string>, clearVendorGlobalReviewView: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>;
|
|
28
33
|
declare const _default: import("@reduxjs/toolkit").Reducer<VendorGlobalReviewViewState, import("@reduxjs/toolkit").AnyAction>;
|
|
29
34
|
export default _default;
|