Skip to content

Commit

Permalink
fix report item
Browse files Browse the repository at this point in the history
Signed-off-by: Stepan Kiryakov <[email protected]>
  • Loading branch information
Stepan-Kirjakov committed May 2, 2023
1 parent e14f686 commit e0f87e4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion policy-service/src/policy-engine/blocks/report-block.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export class ReportBlock {
* @param documents
* @param map
*/
async itemUserMap(documents: any[], map) {
async itemUserMap(documents: any[], map: any) {
if (!documents) {
return;
}
Expand Down
7 changes: 4 additions & 3 deletions policy-service/src/policy-engine/blocks/report-item-block.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export class ReportItemBlock {
const multiple = ref.options.multiple;
const dynamicFilters = ref.options.dynamicFilters;

const filtersToVc:any = {};
const filtersToVc: any = {};
if (ref.options.filters) {
for (const filter of ref.options.filters) {
let expr: any;
Expand Down Expand Up @@ -118,11 +118,12 @@ export class ReportItemBlock {
visible,
iconType,
multiple,
dynamicFilters
dynamicFilters,
document: multiple ? [] : null
}
resultFields.push(item);

const vcDocuments: any = multiple
const vcDocuments: any[] = multiple
? await ref.databaseServer.getVcDocuments(filtersToVc)
: [await ref.databaseServer.getVcDocument(filtersToVc)];
const notFoundDocuments = vcDocuments.filter((vc) => vc).length < 1;
Expand Down

0 comments on commit e0f87e4

Please sign in to comment.