@zeniai/client-epic-state 4.11.11 → 4.11.13
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/vendor/vendorPayload.d.ts +2 -0
- package/lib/entity/vendor/vendorPayload.js +5 -1
- package/lib/entity/vendor/vendorState.d.ts +2 -0
- package/lib/view/vendorReviewView/vendorFirstReviewView/epics/fetchVendorFirstReviewViewEpic.js +1 -0
- package/lib/view/vendorReviewView/vendorFirstReviewView/vendorFirstReviewViewPayload.d.ts +3 -0
- package/lib/view/vendorReviewView/vendorFirstReviewView/vendorFirstReviewViewReducer.js +3 -0
- package/lib/view/vendorReviewView/vendorFirstReviewView/vendorFirstReviewViewSelector.d.ts +1 -0
- package/lib/view/vendorReviewView/vendorFirstReviewView/vendorFirstReviewViewSelector.js +2 -0
- package/lib/view/vendorReviewView/vendorFirstReviewView/vendorFirstReviewViewState.d.ts +3 -2
- package/lib/view/vendorReviewView/vendorFirstReviewView/vendorFirstReviewViewState.js +2 -1
- package/package.json +1 -1
|
@@ -10,6 +10,7 @@ import { UserPayload } from '../user/userPayload';
|
|
|
10
10
|
import { FilePayload } from '../file/filePayload';
|
|
11
11
|
import { RecommendationPayload } from '../../commonPayloadTypes/recommendationPayload';
|
|
12
12
|
import { PaymentInstrumentPayload } from '../paymentInstrument/paymentInstrumentPayload';
|
|
13
|
+
import { AttachmentPayload } from '../transaction/payloadTypes/attachmentPayload';
|
|
13
14
|
export interface VendorBasePayload {
|
|
14
15
|
vendor_id: string;
|
|
15
16
|
vendor_name: string;
|
|
@@ -34,6 +35,7 @@ export interface VendorPayload extends VendorBasePayload, SpendPayload {
|
|
|
34
35
|
qbo_id: string;
|
|
35
36
|
currency_code: string;
|
|
36
37
|
currency_symbol: string;
|
|
38
|
+
transaction_attachments?: AttachmentPayload[] | null;
|
|
37
39
|
title?: string;
|
|
38
40
|
suffix?: string;
|
|
39
41
|
first_name?: string;
|
|
@@ -5,6 +5,7 @@ const urlPayload_1 = require("../../commonPayloadTypes/urlPayload");
|
|
|
5
5
|
const zeniDayJS_1 = require("../../zeniDayJS");
|
|
6
6
|
const transactionPayload_1 = require("../transaction/payloadTypes/transactionPayload");
|
|
7
7
|
const billTransactionState_1 = require("../billPay/billTransaction/billTransactionState");
|
|
8
|
+
const attachmentPayload_1 = require("../transaction/payloadTypes/attachmentPayload");
|
|
8
9
|
const mapVendorBasePayloadToVendorBase = (payload) => ({
|
|
9
10
|
id: payload.vendor_id,
|
|
10
11
|
name: payload.vendor_name,
|
|
@@ -36,6 +37,9 @@ const mapVendorPayloadToVendor = (payload) => {
|
|
|
36
37
|
? (0, transactionPayload_1.transformRecommendation)(payload.recommendation[0]) // In this case, there will be only one recommendation item since this is entity recommendation payload.
|
|
37
38
|
: [], preferredInternationalTransferFeeBearerPaymentMethod: payload.preferred_international_transfer_fee_bearer_payment_method != null
|
|
38
39
|
? (0, billTransactionState_1.toInternationalTransferFeeBearerPaymentMethod)(payload.preferred_international_transfer_fee_bearer_payment_method)
|
|
39
|
-
: undefined
|
|
40
|
+
: undefined, transactionAttachments: payload.transaction_attachments != null &&
|
|
41
|
+
payload.transaction_attachments.length > 0
|
|
42
|
+
? payload.transaction_attachments.map((attachmentPayload) => (0, attachmentPayload_1.toAttachment)(attachmentPayload))
|
|
43
|
+
: [] });
|
|
40
44
|
};
|
|
41
45
|
exports.mapVendorPayloadToVendor = mapVendorPayloadToVendor;
|
|
@@ -4,6 +4,7 @@ import { Recommendation } from '../../commonStateTypes/recommendationBase';
|
|
|
4
4
|
import { ZeniDate } from '../../zeniDayJS';
|
|
5
5
|
import { ZeniUrl as Url } from '../../zeniUrl';
|
|
6
6
|
import { InternationalTransferFeeBearerPaymentMethod } from '../billPay/billTransaction/billTransactionState';
|
|
7
|
+
import { Attachment } from '../transaction/stateTypes/attachment';
|
|
7
8
|
export interface VendorBase {
|
|
8
9
|
id: ID;
|
|
9
10
|
name: string;
|
|
@@ -57,6 +58,7 @@ export interface Vendor extends VendorBase {
|
|
|
57
58
|
last6MonthsSpend?: number;
|
|
58
59
|
last12MonthsSpend?: number;
|
|
59
60
|
previousYearSpend?: number;
|
|
61
|
+
transactionAttachments: Attachment[];
|
|
60
62
|
}
|
|
61
63
|
export interface VendorState {
|
|
62
64
|
vendorByID: Record<ID, Vendor>;
|
package/lib/view/vendorReviewView/vendorFirstReviewView/epics/fetchVendorFirstReviewViewEpic.js
CHANGED
|
@@ -67,6 +67,7 @@ const mapVendorPayloadFromVendorFirstReviewViewResponse = (vendor) => {
|
|
|
67
67
|
qbo_id: vendor.qbo_id,
|
|
68
68
|
currency_code: vendor.currency_code,
|
|
69
69
|
currency_symbol: vendor.currency_symbol,
|
|
70
|
+
transaction_attachments: vendor.transaction_attachments,
|
|
70
71
|
};
|
|
71
72
|
};
|
|
72
73
|
const mapUsersPayloadFromVendorFirstReviewViewResponse = (vendorsResponse) => {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { AttachmentPayload } from '../../../entity/transaction/payloadTypes/attachmentPayload';
|
|
1
2
|
import { ID } from '../../../commonStateTypes/common';
|
|
2
3
|
import { UserBasePayload } from '../../../entity/user/userPayload';
|
|
3
4
|
import { VendorPayload } from '../../../entity/vendor/vendorPayload';
|
|
@@ -18,6 +19,7 @@ export interface VendorFirstReviewViewPayload extends VendorPayload {
|
|
|
18
19
|
status: ReviewStatusPayload;
|
|
19
20
|
last_updated_vendor_name_by_user: UserBasePayload | null;
|
|
20
21
|
merge_vendor_name: string | null;
|
|
22
|
+
transaction_attachments?: AttachmentPayload[] | null;
|
|
21
23
|
}
|
|
22
24
|
export interface FetchVendorFirstReviewViewQuery {
|
|
23
25
|
search_text: string;
|
|
@@ -49,6 +51,7 @@ export interface SaveVendorFirstReviewViewPayload extends VendorPayload {
|
|
|
49
51
|
last_updated_vendor_name_by_user: UserBasePayload | null;
|
|
50
52
|
status: ReviewStatusPayload;
|
|
51
53
|
merge_vendor_name: string | null;
|
|
54
|
+
transaction_attachments: AttachmentPayload[];
|
|
52
55
|
}
|
|
53
56
|
export interface SaveVendorFirstReviewView {
|
|
54
57
|
vendors?: SaveVendorFirstReviewViewPayload[];
|
|
@@ -293,6 +293,9 @@ const mapPayloadToVendorFirstReviewView = (payload) => {
|
|
|
293
293
|
mergeVendorName: payload.merge_vendor_name != null && payload.merge_vendor_name.length > 0
|
|
294
294
|
? payload.merge_vendor_name
|
|
295
295
|
: undefined,
|
|
296
|
+
transactionAttachments: payload.transaction_attachments != null
|
|
297
|
+
? payload.transaction_attachments.map((attachmentPayload) => (0, attachmentPayload_1.toAttachment)(attachmentPayload))
|
|
298
|
+
: [],
|
|
296
299
|
/* merge_vendor_name can be an empty string from platform in cases other than `merge_in_qbo` status.
|
|
297
300
|
So, to avoid further string length checks, making this undefined.*/
|
|
298
301
|
};
|
|
@@ -31,6 +31,7 @@ export interface VendorFirstReviewSelectorView {
|
|
|
31
31
|
attachmentFetchStatus: FetchStateAndError;
|
|
32
32
|
recommendations: RecommendedNonExistingGlobalMerchant[];
|
|
33
33
|
currentSelection: VendorReviewRowCurrentSelection;
|
|
34
|
+
transactionAttachments: Attachment[];
|
|
34
35
|
}
|
|
35
36
|
export interface RecentlySavedErroredVendorView {
|
|
36
37
|
vendorId: ID;
|
|
@@ -23,6 +23,7 @@ const getVendorFirstReviewView = (state) => {
|
|
|
23
23
|
...recommendations,
|
|
24
24
|
...vendorLocalData.recommendedNonExistingGlobalMerchants,
|
|
25
25
|
];
|
|
26
|
+
const transactionAttachments = vendorLocalData.transactionAttachments;
|
|
26
27
|
let selectedVendor;
|
|
27
28
|
const vendor = (0, vendorSelector_1.getVendorByVendorId)(vendorState, vendorLocalData.selectedVendorId);
|
|
28
29
|
if (vendor != null) {
|
|
@@ -62,6 +63,7 @@ const getVendorFirstReviewView = (state) => {
|
|
|
62
63
|
recommendations,
|
|
63
64
|
currentSelection: vendorLocalData.currentSelection,
|
|
64
65
|
mergeVendorName: vendorLocalData.mergeVendorName,
|
|
66
|
+
transactionAttachments,
|
|
65
67
|
};
|
|
66
68
|
});
|
|
67
69
|
let recentlyUpdatedErroredVendorData = undefined;
|
|
@@ -4,12 +4,12 @@ import { PageToken } from '../../../commonStateTypes/viewAndReport/viewAndReport
|
|
|
4
4
|
import { GlobalMerchant } from '../../../entity/globalMerchant/globalMerchantState';
|
|
5
5
|
import { Attachment } from '../../../entity/transaction/stateTypes/attachment';
|
|
6
6
|
import { VendorReviewRowCurrentSelection, ReviewStatus } from '../common/state/commonTypes';
|
|
7
|
-
export declare const VENDOR_FIRST_REVIEW_VIEW_COLUMN_KEYS: readonly ["vendor", "updateTo", "retain", "status", "action", "ytd"];
|
|
7
|
+
export declare const VENDOR_FIRST_REVIEW_VIEW_COLUMN_KEYS: readonly ["vendor", "updateTo", "retain", "status", "action", "ytd", "viewTenantInvoice"];
|
|
8
8
|
export interface CurrentSelectionByColumn {
|
|
9
9
|
retain: boolean;
|
|
10
10
|
update: boolean;
|
|
11
11
|
}
|
|
12
|
-
export declare const toVendorFirstReviewViewColumnKeyType: (v: string) => "action" | "status" | "vendor" | "retain" | "updateTo" | "ytd";
|
|
12
|
+
export declare const toVendorFirstReviewViewColumnKeyType: (v: string) => "action" | "status" | "vendor" | "retain" | "updateTo" | "ytd" | "viewTenantInvoice";
|
|
13
13
|
export declare type VendorFirstReviewViewColumnKey = ReturnType<typeof toVendorFirstReviewViewColumnKeyType>;
|
|
14
14
|
export interface RecommendedNonExistingGlobalMerchant extends Omit<GlobalMerchant, 'globalMerchantId'> {
|
|
15
15
|
globalMerchantId?: ID;
|
|
@@ -32,6 +32,7 @@ export interface VendorFirstReviewViewLocalData {
|
|
|
32
32
|
vendorRenamedText?: string;
|
|
33
33
|
lastUpdatedVendorNameByUserId?: ID;
|
|
34
34
|
mergeVendorName: string | undefined;
|
|
35
|
+
transactionAttachments: Attachment[];
|
|
35
36
|
}
|
|
36
37
|
export interface RecentlySavedErroredVendorData {
|
|
37
38
|
vendorId: ID;
|
|
@@ -8,7 +8,8 @@ exports.VENDOR_FIRST_REVIEW_VIEW_COLUMN_KEYS = [
|
|
|
8
8
|
'retain',
|
|
9
9
|
'status',
|
|
10
10
|
'action',
|
|
11
|
-
'ytd',
|
|
11
|
+
'ytd',
|
|
12
|
+
'viewTenantInvoice',
|
|
12
13
|
];
|
|
13
14
|
const toVendorFirstReviewViewColumnKeyType = (v) => (0, stringToUnion_1.stringToUnion)(v, exports.VENDOR_FIRST_REVIEW_VIEW_COLUMN_KEYS);
|
|
14
15
|
exports.toVendorFirstReviewViewColumnKeyType = toVendorFirstReviewViewColumnKeyType;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/client-epic-state",
|
|
3
|
-
"version": "4.11.
|
|
3
|
+
"version": "4.11.13",
|
|
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",
|