gemcap-be-common 1.5.156 → 1.5.158
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/package.json
CHANGED
|
@@ -58,7 +58,7 @@ export declare class ComplianceBorrowersService {
|
|
|
58
58
|
isComplianceBorrowerAllowed(userAccess: IUserAccess, requestedBorrowerId: string): boolean;
|
|
59
59
|
calculateInstanceStatuses(instance: IBorrowerItemInstance, item: IBorrowerItemLean): IInstanceStatus;
|
|
60
60
|
getFullComplianceBorrowerById(complianceBorrowerId: string): Promise<IComplianceBorrowerDocumentFullWithStatuses>;
|
|
61
|
-
getAllBorrowersShortened(userAccess: IUserAccess): Promise<Pick<IComplianceBorrowerWithBorrower, "
|
|
61
|
+
getAllBorrowersShortened(userAccess: IUserAccess): Promise<Pick<IComplianceBorrowerWithBorrower, "borrower" | "items" | "fundingStatus">[]>;
|
|
62
62
|
generateInstances(complianceBorrowerId: any): Promise<IComplianceBorrowerDocumentFullWithStatuses>;
|
|
63
63
|
calculateAndUpdateFundingStatus(complianceBorrowerId: string): Promise<void>;
|
|
64
64
|
calculateFundingStatus(complianceBorrower: IComplianceBorrowerDocumentFull): string;
|
|
@@ -121,7 +121,7 @@ class UserLogsService {
|
|
|
121
121
|
$and: [
|
|
122
122
|
{ 'timestamp': { $gte: filter.periodStart } },
|
|
123
123
|
{ 'timestamp': { $lte: filter.periodEnd } },
|
|
124
|
-
filter.userId ? { 'userId':
|
|
124
|
+
filter.userId ? { 'userId': filter.userId } : {},
|
|
125
125
|
],
|
|
126
126
|
},
|
|
127
127
|
},
|
|
@@ -132,9 +132,9 @@ class UserLogsService {
|
|
|
132
132
|
},
|
|
133
133
|
]);
|
|
134
134
|
const logsWithRecord = await Promise.all(logs.map(async (log) => await this.performDynamicLookup(log)));
|
|
135
|
-
const filteredByBorrowers =
|
|
136
|
-
? logsWithRecord.
|
|
137
|
-
:
|
|
135
|
+
const filteredByBorrowers = filter.borrowerId
|
|
136
|
+
? await this.filterByBorrower(logsWithRecord, filter.borrowerId)
|
|
137
|
+
: logsWithRecord.slice();
|
|
138
138
|
await this.replaceBorrowers(filteredByBorrowers);
|
|
139
139
|
return filteredByBorrowers;
|
|
140
140
|
}
|
|
@@ -10,7 +10,7 @@ import { LoanChargesService } from './loan-charges.service';
|
|
|
10
10
|
|
|
11
11
|
export interface IUserLogFilter {
|
|
12
12
|
userId: string;
|
|
13
|
-
borrowerId
|
|
13
|
+
borrowerId?: string;
|
|
14
14
|
periodStart: Date;
|
|
15
15
|
periodEnd: Date;
|
|
16
16
|
}
|
|
@@ -138,7 +138,7 @@ export class UserLogsService {
|
|
|
138
138
|
$and: [
|
|
139
139
|
{ 'timestamp': { $gte: filter.periodStart } },
|
|
140
140
|
{ 'timestamp': { $lte: filter.periodEnd } },
|
|
141
|
-
filter.userId ? { 'userId':
|
|
141
|
+
filter.userId ? { 'userId': filter.userId } : {},
|
|
142
142
|
],
|
|
143
143
|
},
|
|
144
144
|
},
|
|
@@ -149,9 +149,9 @@ export class UserLogsService {
|
|
|
149
149
|
},
|
|
150
150
|
]);
|
|
151
151
|
const logsWithRecord = await Promise.all(logs.map(async (log) => await this.performDynamicLookup(log)));
|
|
152
|
-
const filteredByBorrowers =
|
|
153
|
-
? logsWithRecord.
|
|
154
|
-
:
|
|
152
|
+
const filteredByBorrowers = filter.borrowerId
|
|
153
|
+
? await this.filterByBorrower(logsWithRecord, filter.borrowerId)
|
|
154
|
+
: logsWithRecord.slice();
|
|
155
155
|
await this.replaceBorrowers(filteredByBorrowers);
|
|
156
156
|
return filteredByBorrowers;
|
|
157
157
|
}
|