@zeniai/client-epic-state 5.2.27-betaRD0 → 5.2.28
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/entity/jeSchedules/jeSchedulesState.d.ts +0 -7
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/oneTimeAccrualActionsEpic.js +0 -22
- package/lib/esm/view/invoicing/couponView/couponViewState.js +4 -4
- package/lib/esm/view/invoicing/invoicingCatalogListView/invoicingCatalogListViewSelector.js +1 -0
- package/lib/esm/view/invoicing/invoicingCustomerListView/invoicingCustomerListViewState.js +3 -3
- package/lib/esm/view/invoicing/invoicingDunningCaseListView/invoicingDunningCaseListViewState.js +4 -4
- package/lib/view/expenseAutomationView/epics/jeSchedule/oneTimeAccrualActionsEpic.js +0 -22
- package/lib/view/expenseAutomationView/payload/jeSchedulesPayload.d.ts +0 -2
- package/lib/view/invoicing/couponView/couponViewState.d.ts +2 -2
- package/lib/view/invoicing/couponView/couponViewState.js +4 -4
- package/lib/view/invoicing/invoicingCatalogListView/invoicingCatalogListViewSelector.d.ts +1 -0
- package/lib/view/invoicing/invoicingCatalogListView/invoicingCatalogListViewSelector.js +1 -0
- package/lib/view/invoicing/invoicingCustomerListView/invoicingCustomerListViewState.d.ts +2 -2
- package/lib/view/invoicing/invoicingCustomerListView/invoicingCustomerListViewState.js +3 -3
- package/lib/view/invoicing/invoicingDunningCaseListView/invoicingDunningCaseListViewState.d.ts +2 -2
- package/lib/view/invoicing/invoicingDunningCaseListView/invoicingDunningCaseListViewState.js +4 -4
- package/package.json +1 -1
|
@@ -145,16 +145,9 @@ export interface JEAccruedScheduledTransactionState extends Omit<JEScheduledTran
|
|
|
145
145
|
export interface OneTimeAccrualEdits {
|
|
146
146
|
expectedReversalDate?: ZeniDate;
|
|
147
147
|
jeCreditAccountId?: ID;
|
|
148
|
-
/**
|
|
149
|
-
* Carried beside the id, not derived from it later: the accrual document stores the name too, so
|
|
150
|
-
* an id sent without its name leaves the row displaying the account the user just moved away
|
|
151
|
-
* from.
|
|
152
|
-
*/
|
|
153
|
-
jeCreditAccountName?: string;
|
|
154
148
|
jeDebitAccountId?: ID;
|
|
155
149
|
jeDebitAccountingClassId?: ID;
|
|
156
150
|
jeDebitAccountingClassName?: string;
|
|
157
|
-
jeDebitAccountName?: string;
|
|
158
151
|
memo?: string;
|
|
159
152
|
/**
|
|
160
153
|
* The Auto Reversal toggle, modelled as the same boolean the New form and the create payload use
|
|
@@ -73,39 +73,17 @@ export const promoteOneTimeAccrualEpic = (actions$, state$, zeniAPI) => actions$
|
|
|
73
73
|
const debitClassId = edits?.jeDebitAccountingClassId ?? accrual?.jeDebitAccountingClassId;
|
|
74
74
|
const debitClassName = edits?.jeDebitAccountingClassName ??
|
|
75
75
|
accrual?.jeDebitAccountingClassName;
|
|
76
|
-
// The accrual document stores names alongside ids, so every id below travels with its name.
|
|
77
|
-
// Sending an id on its own leaves the stored row -- and the JE posted from it -- naming the
|
|
78
|
-
// account the user just moved away from. Create has always sent the full set; promote did
|
|
79
|
-
// not, which is the difference the two paths were showing.
|
|
80
|
-
const debitAccountName = edits?.jeDebitAccountName ?? accrual?.jeDebitAccountName;
|
|
81
|
-
const creditAccountName = edits?.jeCreditAccountName ?? accrual?.jeCreditAccountName;
|
|
82
|
-
// Credit-side class is never edited on this form -- the liability side is the Balance Sheet
|
|
83
|
-
// class the draft was born with -- so it is echoed straight back from the draft.
|
|
84
|
-
const creditClassId = accrual?.jeCreditAccountingClassId;
|
|
85
|
-
const creditClassName = accrual?.jeCreditAccountingClassName;
|
|
86
76
|
const payload = {
|
|
87
77
|
amount,
|
|
88
78
|
memo: edits?.memo ?? accrual?.memo ?? '',
|
|
89
79
|
je_debit_account_id: debitAccountId,
|
|
90
80
|
je_credit_account_id: creditAccountId,
|
|
91
|
-
...(debitAccountName != null
|
|
92
|
-
? { je_debit_account_name: debitAccountName }
|
|
93
|
-
: {}),
|
|
94
|
-
...(creditAccountName != null
|
|
95
|
-
? { je_credit_account_name: creditAccountName }
|
|
96
|
-
: {}),
|
|
97
81
|
...(debitClassId != null
|
|
98
82
|
? { je_debit_accounting_class_id: debitClassId }
|
|
99
83
|
: {}),
|
|
100
84
|
...(debitClassName != null
|
|
101
85
|
? { je_debit_accounting_class_name: debitClassName }
|
|
102
86
|
: {}),
|
|
103
|
-
...(creditClassId != null
|
|
104
|
-
? { je_credit_accounting_class_id: creditClassId }
|
|
105
|
-
: {}),
|
|
106
|
-
...(creditClassName != null
|
|
107
|
-
? { je_credit_accounting_class_name: creditClassName }
|
|
108
|
-
: {}),
|
|
109
87
|
// Mirrors the create payload: reverse_next_month alone decides the policy, and the date is
|
|
110
88
|
// only meaningful when it is true -- agent-je derives the reversal from the bill otherwise.
|
|
111
89
|
reverse_next_month: reverseNextMonth,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { stringToUnion } from '../../../commonStateTypes/stringToUnion';
|
|
2
2
|
export const ALL_INVOICING_COUPON_SORT_KEYS = [
|
|
3
|
-
'
|
|
4
|
-
'
|
|
3
|
+
'code',
|
|
4
|
+
'coupon',
|
|
5
5
|
'discount',
|
|
6
6
|
'duration',
|
|
7
7
|
'created',
|
|
@@ -12,8 +12,8 @@ export const ALL_INVOICING_COUPON_SORT_KEYS = [
|
|
|
12
12
|
];
|
|
13
13
|
export const toInvoicingCouponSortKey = (v) => stringToUnion(v, ALL_INVOICING_COUPON_SORT_KEYS);
|
|
14
14
|
export const INVOICING_COUPON_COLUMNS = [
|
|
15
|
-
{ key: '
|
|
16
|
-
{ key: '
|
|
15
|
+
{ key: 'code', sortable: true },
|
|
16
|
+
{ key: 'coupon', sortable: true },
|
|
17
17
|
{ key: 'discount', sortable: false },
|
|
18
18
|
{ key: 'duration', sortable: true },
|
|
19
19
|
{ key: 'created', sortable: true },
|
|
@@ -18,6 +18,7 @@ export const getInvoicingCatalogPrices = (items) => items.flatMap((item) => (ite
|
|
|
18
18
|
export const getInvoicingCatalogListView = createSelector((state) => state.invoicingPlanState, (state) => state.invoicingCatalogListViewState, (state) => state.invoicingConfigViewState.catalogItemLifecycleActionOptions, (planState, listViewState, catalogItemLifecycleActionOptions) => ({
|
|
19
19
|
catalogItemLifecycleActionOptions,
|
|
20
20
|
plans: getInvoicingPlansByIds(planState, listViewState.planIds),
|
|
21
|
+
planSort: listViewState.planSort,
|
|
21
22
|
productColumns: INVOICING_PRODUCT_COLUMNS,
|
|
22
23
|
products: getInvoicingPlansByIds(planState, listViewState.productIds),
|
|
23
24
|
productSort: listViewState.productSort,
|
|
@@ -3,16 +3,16 @@ export const ALL_INVOICING_CUSTOMER_SORT_KEYS = [
|
|
|
3
3
|
'name',
|
|
4
4
|
'email',
|
|
5
5
|
'billingAddress',
|
|
6
|
-
'
|
|
6
|
+
'card',
|
|
7
7
|
'autoCollect',
|
|
8
8
|
'status',
|
|
9
9
|
];
|
|
10
10
|
export const toInvoicingCustomerSortKey = (v) => stringToUnion(v, ALL_INVOICING_CUSTOMER_SORT_KEYS);
|
|
11
11
|
export const INVOICING_CUSTOMER_COLUMNS = [
|
|
12
|
-
{ key: 'name', sortable:
|
|
12
|
+
{ key: 'name', sortable: false },
|
|
13
13
|
{ key: 'email', sortable: true },
|
|
14
14
|
{ key: 'billingAddress', sortable: false },
|
|
15
|
-
{ key: '
|
|
15
|
+
{ key: 'card', sortable: true },
|
|
16
16
|
{ key: 'autoCollect', sortable: true },
|
|
17
17
|
{ key: 'status', sortable: true },
|
|
18
18
|
];
|
package/lib/esm/view/invoicing/invoicingDunningCaseListView/invoicingDunningCaseListViewState.js
CHANGED
|
@@ -3,8 +3,8 @@ export const ALL_INVOICING_DUNNING_CASE_SORT_KEYS = [
|
|
|
3
3
|
'customer',
|
|
4
4
|
'invoice',
|
|
5
5
|
'attempts',
|
|
6
|
-
'
|
|
7
|
-
'
|
|
6
|
+
'next_retry',
|
|
7
|
+
'days_past_due',
|
|
8
8
|
'failureReason',
|
|
9
9
|
'status',
|
|
10
10
|
'amount',
|
|
@@ -14,8 +14,8 @@ export const INVOICING_DUNNING_CASE_COLUMNS = [
|
|
|
14
14
|
{ key: 'customer', sortable: true },
|
|
15
15
|
{ key: 'invoice', sortable: true },
|
|
16
16
|
{ key: 'attempts', sortable: true },
|
|
17
|
-
{ key: '
|
|
18
|
-
{ key: '
|
|
17
|
+
{ key: 'next_retry', sortable: true },
|
|
18
|
+
{ key: 'days_past_due', sortable: true },
|
|
19
19
|
{ key: 'failureReason', sortable: false },
|
|
20
20
|
{ key: 'status', sortable: true },
|
|
21
21
|
{ key: 'amount', sortable: true },
|
|
@@ -76,39 +76,17 @@ const promoteOneTimeAccrualEpic = (actions$, state$, zeniAPI) => actions$.pipe((
|
|
|
76
76
|
const debitClassId = edits?.jeDebitAccountingClassId ?? accrual?.jeDebitAccountingClassId;
|
|
77
77
|
const debitClassName = edits?.jeDebitAccountingClassName ??
|
|
78
78
|
accrual?.jeDebitAccountingClassName;
|
|
79
|
-
// The accrual document stores names alongside ids, so every id below travels with its name.
|
|
80
|
-
// Sending an id on its own leaves the stored row -- and the JE posted from it -- naming the
|
|
81
|
-
// account the user just moved away from. Create has always sent the full set; promote did
|
|
82
|
-
// not, which is the difference the two paths were showing.
|
|
83
|
-
const debitAccountName = edits?.jeDebitAccountName ?? accrual?.jeDebitAccountName;
|
|
84
|
-
const creditAccountName = edits?.jeCreditAccountName ?? accrual?.jeCreditAccountName;
|
|
85
|
-
// Credit-side class is never edited on this form -- the liability side is the Balance Sheet
|
|
86
|
-
// class the draft was born with -- so it is echoed straight back from the draft.
|
|
87
|
-
const creditClassId = accrual?.jeCreditAccountingClassId;
|
|
88
|
-
const creditClassName = accrual?.jeCreditAccountingClassName;
|
|
89
79
|
const payload = {
|
|
90
80
|
amount,
|
|
91
81
|
memo: edits?.memo ?? accrual?.memo ?? '',
|
|
92
82
|
je_debit_account_id: debitAccountId,
|
|
93
83
|
je_credit_account_id: creditAccountId,
|
|
94
|
-
...(debitAccountName != null
|
|
95
|
-
? { je_debit_account_name: debitAccountName }
|
|
96
|
-
: {}),
|
|
97
|
-
...(creditAccountName != null
|
|
98
|
-
? { je_credit_account_name: creditAccountName }
|
|
99
|
-
: {}),
|
|
100
84
|
...(debitClassId != null
|
|
101
85
|
? { je_debit_accounting_class_id: debitClassId }
|
|
102
86
|
: {}),
|
|
103
87
|
...(debitClassName != null
|
|
104
88
|
? { je_debit_accounting_class_name: debitClassName }
|
|
105
89
|
: {}),
|
|
106
|
-
...(creditClassId != null
|
|
107
|
-
? { je_credit_accounting_class_id: creditClassId }
|
|
108
|
-
: {}),
|
|
109
|
-
...(creditClassName != null
|
|
110
|
-
? { je_credit_accounting_class_name: creditClassName }
|
|
111
|
-
: {}),
|
|
112
90
|
// Mirrors the create payload: reverse_next_month alone decides the policy, and the date is
|
|
113
91
|
// only meaningful when it is true -- agent-je derives the reversal from the bill otherwise.
|
|
114
92
|
reverse_next_month: reverseNextMonth,
|
|
@@ -119,10 +119,8 @@ export interface PromoteOneTimeAccrualPayload {
|
|
|
119
119
|
je_debit_account_id: ID;
|
|
120
120
|
memo: string;
|
|
121
121
|
expected_reversal_date?: string;
|
|
122
|
-
je_credit_account_name?: string;
|
|
123
122
|
je_credit_accounting_class_id?: ID;
|
|
124
123
|
je_credit_accounting_class_name?: string;
|
|
125
|
-
je_debit_account_name?: string;
|
|
126
124
|
je_debit_accounting_class_id?: ID;
|
|
127
125
|
je_debit_accounting_class_name?: string;
|
|
128
126
|
reverse_next_month?: boolean;
|
|
@@ -4,8 +4,8 @@ import { InvoicingListSort } from '../invoicingApiHelper';
|
|
|
4
4
|
export interface InvoicingCouponFilters {
|
|
5
5
|
search?: string;
|
|
6
6
|
}
|
|
7
|
-
export declare const ALL_INVOICING_COUPON_SORT_KEYS: readonly ["
|
|
8
|
-
export declare const toInvoicingCouponSortKey: (v: string) => "
|
|
7
|
+
export declare const ALL_INVOICING_COUPON_SORT_KEYS: readonly ["code", "coupon", "discount", "duration", "created", "valid_till", "apply_on", "status", "redemptions"];
|
|
8
|
+
export declare const toInvoicingCouponSortKey: (v: string) => "code" | "status" | "discount" | "coupon" | "duration" | "created" | "valid_till" | "apply_on" | "redemptions";
|
|
9
9
|
export type InvoicingCouponSortKey = ReturnType<typeof toInvoicingCouponSortKey>;
|
|
10
10
|
/**
|
|
11
11
|
* Structural column descriptor owned by CES so the discounts-list column set,
|
|
@@ -3,8 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.toInvoicingCouponTabId = exports.ALL_INVOICING_COUPON_TAB_IDS = exports.INVOICING_COUPON_COLUMNS = exports.toInvoicingCouponSortKey = exports.ALL_INVOICING_COUPON_SORT_KEYS = void 0;
|
|
4
4
|
const stringToUnion_1 = require("../../../commonStateTypes/stringToUnion");
|
|
5
5
|
exports.ALL_INVOICING_COUPON_SORT_KEYS = [
|
|
6
|
-
'
|
|
7
|
-
'
|
|
6
|
+
'code',
|
|
7
|
+
'coupon',
|
|
8
8
|
'discount',
|
|
9
9
|
'duration',
|
|
10
10
|
'created',
|
|
@@ -16,8 +16,8 @@ exports.ALL_INVOICING_COUPON_SORT_KEYS = [
|
|
|
16
16
|
const toInvoicingCouponSortKey = (v) => (0, stringToUnion_1.stringToUnion)(v, exports.ALL_INVOICING_COUPON_SORT_KEYS);
|
|
17
17
|
exports.toInvoicingCouponSortKey = toInvoicingCouponSortKey;
|
|
18
18
|
exports.INVOICING_COUPON_COLUMNS = [
|
|
19
|
-
{ key: '
|
|
20
|
-
{ key: '
|
|
19
|
+
{ key: 'code', sortable: true },
|
|
20
|
+
{ key: 'coupon', sortable: true },
|
|
21
21
|
{ key: 'discount', sortable: false },
|
|
22
22
|
{ key: 'duration', sortable: true },
|
|
23
23
|
{ key: 'created', sortable: true },
|
|
@@ -19,6 +19,7 @@ export interface InvoicingCatalogListView extends SelectorView {
|
|
|
19
19
|
productFilters: InvoicingCatalogProductFilters;
|
|
20
20
|
productNextCursor: string | null;
|
|
21
21
|
products: InvoicingPlan[];
|
|
22
|
+
planSort?: InvoicingListSort;
|
|
22
23
|
productSort?: InvoicingListSort;
|
|
23
24
|
}
|
|
24
25
|
export declare const getInvoicingCatalogPrices: (items: InvoicingPlan[]) => InvoicingProduct[];
|
|
@@ -22,6 +22,7 @@ exports.getInvoicingCatalogPrices = getInvoicingCatalogPrices;
|
|
|
22
22
|
exports.getInvoicingCatalogListView = (0, toolkit_1.createSelector)((state) => state.invoicingPlanState, (state) => state.invoicingCatalogListViewState, (state) => state.invoicingConfigViewState.catalogItemLifecycleActionOptions, (planState, listViewState, catalogItemLifecycleActionOptions) => ({
|
|
23
23
|
catalogItemLifecycleActionOptions,
|
|
24
24
|
plans: (0, planSelector_1.getInvoicingPlansByIds)(planState, listViewState.planIds),
|
|
25
|
+
planSort: listViewState.planSort,
|
|
25
26
|
productColumns: invoicingCatalogListViewState_1.INVOICING_PRODUCT_COLUMNS,
|
|
26
27
|
products: (0, planSelector_1.getInvoicingPlansByIds)(planState, listViewState.productIds),
|
|
27
28
|
productSort: listViewState.productSort,
|
|
@@ -4,8 +4,8 @@ import { InvoicingListSort } from '../invoicingApiHelper';
|
|
|
4
4
|
export interface InvoicingCustomerFilters {
|
|
5
5
|
search?: string;
|
|
6
6
|
}
|
|
7
|
-
export declare const ALL_INVOICING_CUSTOMER_SORT_KEYS: readonly ["name", "email", "billingAddress", "
|
|
8
|
-
export declare const toInvoicingCustomerSortKey: (v: string) => "status" | "name" | "
|
|
7
|
+
export declare const ALL_INVOICING_CUSTOMER_SORT_KEYS: readonly ["name", "email", "billingAddress", "card", "autoCollect", "status"];
|
|
8
|
+
export declare const toInvoicingCustomerSortKey: (v: string) => "status" | "name" | "card" | "email" | "billingAddress" | "autoCollect";
|
|
9
9
|
export type InvoicingCustomerSortKey = ReturnType<typeof toInvoicingCustomerSortKey>;
|
|
10
10
|
/**
|
|
11
11
|
* Structural column descriptor owned by CES so the customer-list column set,
|
|
@@ -6,17 +6,17 @@ exports.ALL_INVOICING_CUSTOMER_SORT_KEYS = [
|
|
|
6
6
|
'name',
|
|
7
7
|
'email',
|
|
8
8
|
'billingAddress',
|
|
9
|
-
'
|
|
9
|
+
'card',
|
|
10
10
|
'autoCollect',
|
|
11
11
|
'status',
|
|
12
12
|
];
|
|
13
13
|
const toInvoicingCustomerSortKey = (v) => (0, stringToUnion_1.stringToUnion)(v, exports.ALL_INVOICING_CUSTOMER_SORT_KEYS);
|
|
14
14
|
exports.toInvoicingCustomerSortKey = toInvoicingCustomerSortKey;
|
|
15
15
|
exports.INVOICING_CUSTOMER_COLUMNS = [
|
|
16
|
-
{ key: 'name', sortable:
|
|
16
|
+
{ key: 'name', sortable: false },
|
|
17
17
|
{ key: 'email', sortable: true },
|
|
18
18
|
{ key: 'billingAddress', sortable: false },
|
|
19
|
-
{ key: '
|
|
19
|
+
{ key: 'card', sortable: true },
|
|
20
20
|
{ key: 'autoCollect', sortable: true },
|
|
21
21
|
{ key: 'status', sortable: true },
|
|
22
22
|
];
|
package/lib/view/invoicing/invoicingDunningCaseListView/invoicingDunningCaseListViewState.d.ts
CHANGED
|
@@ -4,8 +4,8 @@ import { InvoicingListSort } from '../invoicingApiHelper';
|
|
|
4
4
|
export interface InvoicingDunningCaseFilters {
|
|
5
5
|
search?: string;
|
|
6
6
|
}
|
|
7
|
-
export declare const ALL_INVOICING_DUNNING_CASE_SORT_KEYS: readonly ["customer", "invoice", "attempts", "
|
|
8
|
-
export declare const toInvoicingDunningCaseSortKey: (v: string) => "status" | "invoice" | "amount" | "customer" | "
|
|
7
|
+
export declare const ALL_INVOICING_DUNNING_CASE_SORT_KEYS: readonly ["customer", "invoice", "attempts", "next_retry", "days_past_due", "failureReason", "status", "amount"];
|
|
8
|
+
export declare const toInvoicingDunningCaseSortKey: (v: string) => "status" | "invoice" | "amount" | "customer" | "attempts" | "next_retry" | "days_past_due" | "failureReason";
|
|
9
9
|
export type InvoicingDunningCaseSortKey = ReturnType<typeof toInvoicingDunningCaseSortKey>;
|
|
10
10
|
/**
|
|
11
11
|
* Structural column descriptor owned by CES so the dunning-list column set,
|
package/lib/view/invoicing/invoicingDunningCaseListView/invoicingDunningCaseListViewState.js
CHANGED
|
@@ -6,8 +6,8 @@ exports.ALL_INVOICING_DUNNING_CASE_SORT_KEYS = [
|
|
|
6
6
|
'customer',
|
|
7
7
|
'invoice',
|
|
8
8
|
'attempts',
|
|
9
|
-
'
|
|
10
|
-
'
|
|
9
|
+
'next_retry',
|
|
10
|
+
'days_past_due',
|
|
11
11
|
'failureReason',
|
|
12
12
|
'status',
|
|
13
13
|
'amount',
|
|
@@ -18,8 +18,8 @@ exports.INVOICING_DUNNING_CASE_COLUMNS = [
|
|
|
18
18
|
{ key: 'customer', sortable: true },
|
|
19
19
|
{ key: 'invoice', sortable: true },
|
|
20
20
|
{ key: 'attempts', sortable: true },
|
|
21
|
-
{ key: '
|
|
22
|
-
{ key: '
|
|
21
|
+
{ key: 'next_retry', sortable: true },
|
|
22
|
+
{ key: 'days_past_due', sortable: true },
|
|
23
23
|
{ key: 'failureReason', sortable: false },
|
|
24
24
|
{ key: 'status', sortable: true },
|
|
25
25
|
{ key: 'amount', sortable: true },
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/client-epic-state",
|
|
3
|
-
"version": "5.2.
|
|
3
|
+
"version": "5.2.28",
|
|
4
4
|
"description": "Shared module between Web & Mobile containing required abstractions for state management, async network communication. ",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "lib/esm/index.js",
|