@zeniai/client-epic-state 4.16.49 → 4.16.51
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.
|
@@ -22,4 +22,4 @@ export interface TransactionVendorSelectorView extends SelectorView {
|
|
|
22
22
|
editVendorState?: TransactionVendorDetails;
|
|
23
23
|
newVendorState?: TransactionVendorDetails;
|
|
24
24
|
}
|
|
25
|
-
export declare const getTransactionVendorView: (state: RootState, vendorId?: ID) => TransactionVendorSelectorView;
|
|
25
|
+
export declare const getTransactionVendorView: (state: RootState, vendorId?: ID, initialVendorCategoryId?: ID, initialVendorClassId?: ID) => TransactionVendorSelectorView;
|
|
@@ -6,8 +6,8 @@ const userSelector_1 = require("../../../entity/user/userSelector");
|
|
|
6
6
|
const accountListSelector_1 = require("../../accountList/accountListSelector");
|
|
7
7
|
const classListSelector_1 = require("../../classList/classListSelector");
|
|
8
8
|
const transactionVendorViewReducer_1 = require("./transactionVendorViewReducer");
|
|
9
|
-
const getTransactionVendorView = (state, vendorId) => {
|
|
10
|
-
var _a, _b, _c, _d;
|
|
9
|
+
const getTransactionVendorView = (state, vendorId, initialVendorCategoryId, initialVendorClassId) => {
|
|
10
|
+
var _a, _b, _c, _d, _e;
|
|
11
11
|
const { accountListState, accountState, classListState, classState, transactionVendorViewState, } = state;
|
|
12
12
|
const accountList = (0, accountListSelector_1.getAccountList)(accountState, accountListState, 'accountList');
|
|
13
13
|
const classList = (0, classListSelector_1.getClassList)(classState, classListState);
|
|
@@ -26,9 +26,13 @@ const getTransactionVendorView = (state, vendorId) => {
|
|
|
26
26
|
fetchState = (0, reduceFetchState_1.reduceFetchState)([accountList, classList]);
|
|
27
27
|
}
|
|
28
28
|
else {
|
|
29
|
+
const vendorDetailLocalData = ((_d = transactionVendorViewState.newVendorState) === null || _d === void 0 ? void 0 : _d.vendorDetailLocalData) || {};
|
|
29
30
|
newVendorState = {
|
|
30
|
-
saveStatus: transactionVendorViewState.newVendorState.saveStatus
|
|
31
|
-
|
|
31
|
+
saveStatus: (_e = transactionVendorViewState.newVendorState.saveStatus) !== null && _e !== void 0 ? _e : {
|
|
32
|
+
fetchState: 'Not-Started',
|
|
33
|
+
error: undefined,
|
|
34
|
+
},
|
|
35
|
+
vendorDetailLocalData: Object.assign(Object.assign({}, vendorDetailLocalData), { vendorCategory: initialVendorCategoryId, vendorClass: initialVendorClassId }),
|
|
32
36
|
};
|
|
33
37
|
fetchState = (0, reduceFetchState_1.reduceFetchState)([
|
|
34
38
|
{ fetchState: accountList.fetchState, error: accountList.error },
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/client-epic-state",
|
|
3
|
-
"version": "4.16.
|
|
3
|
+
"version": "4.16.51",
|
|
4
4
|
"description": "Shared module between Web & Mobile containing required abstractions for state management, async network communication. ",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|