rez_core 4.0.27 → 4.0.29
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/dist/module/mapper/controller/field-mapper.controller.js +2 -2
- package/dist/module/mapper/controller/field-mapper.controller.js.map +1 -1
- package/dist/module/mapper/service/field-mapper.service.d.ts +1 -1
- package/dist/module/mapper/service/field-mapper.service.js +4 -2
- package/dist/module/mapper/service/field-mapper.service.js.map +1 -1
- package/dist/module/meta/service/entity-master.service.d.ts +1 -1
- package/dist/module/meta/service/entity-master.service.js +9 -5
- package/dist/module/meta/service/entity-master.service.js.map +1 -1
- package/dist/module/workflow/service/workflow-meta.service.d.ts +3 -1
- package/dist/module/workflow/service/workflow-meta.service.js +7 -5
- package/dist/module/workflow/service/workflow-meta.service.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/module/mapper/controller/field-mapper.controller.ts +9 -2
- package/src/module/mapper/service/field-mapper.service.ts +4 -1
- package/src/module/meta/service/entity-master.service.ts +9 -4
- package/src/module/workflow/service/workflow-meta.service.ts +5 -3
package/package.json
CHANGED
|
@@ -40,6 +40,7 @@ export class FieldMapperController {
|
|
|
40
40
|
entity_id,
|
|
41
41
|
loggedInUser,
|
|
42
42
|
inputJson,
|
|
43
|
+
inputJson['mapped_entities'],
|
|
43
44
|
);
|
|
44
45
|
}
|
|
45
46
|
|
|
@@ -58,8 +59,14 @@ export class FieldMapperController {
|
|
|
58
59
|
}
|
|
59
60
|
|
|
60
61
|
@Get('getFields/:mapperId')
|
|
61
|
-
async getFieldsByMapper(
|
|
62
|
-
|
|
62
|
+
async getFieldsByMapper(
|
|
63
|
+
@Param('mapperId') mapperId: number,
|
|
64
|
+
@Query('mapper_entity_type') mapper_entity_type: string,
|
|
65
|
+
) {
|
|
66
|
+
return this.fieldMapperService.getMapperFields(
|
|
67
|
+
mapperId,
|
|
68
|
+
mapper_entity_type,
|
|
69
|
+
);
|
|
63
70
|
}
|
|
64
71
|
|
|
65
72
|
@Get('getLovs/:mapperFieldId')
|
|
@@ -92,6 +92,7 @@ export class FieldMapperService extends EntityServiceImpl {
|
|
|
92
92
|
parent_id: number,
|
|
93
93
|
userData: UserData,
|
|
94
94
|
inputJson?: Record<string, any>,
|
|
95
|
+
mappedEntities?: Record<string, any>,
|
|
95
96
|
) {
|
|
96
97
|
// Fetch field mappings for this mapper
|
|
97
98
|
const fieldMappers =
|
|
@@ -175,7 +176,9 @@ export class FieldMapperService extends EntityServiceImpl {
|
|
|
175
176
|
inMemory[entityType][filterCode] =
|
|
176
177
|
filterResponse?.data?.entity_list[0];
|
|
177
178
|
} else {
|
|
178
|
-
|
|
179
|
+
let firstId = targetEntityIds[0];
|
|
180
|
+
if (mappedEntities && mappedEntities[entityType])
|
|
181
|
+
firstId = mappedEntities[entityType];
|
|
179
182
|
inMemory[entityType][filterCode] =
|
|
180
183
|
await super.getResolvedEntityData(
|
|
181
184
|
entityType,
|
|
@@ -26,13 +26,18 @@ export class EntityMasterService {
|
|
|
26
26
|
async getEntityData(
|
|
27
27
|
mappedEntityType: string | null,
|
|
28
28
|
loggedInUser,
|
|
29
|
+
mapped_entity_id?: number,
|
|
29
30
|
): Promise<EntityMaster> {
|
|
30
31
|
if (mappedEntityType) {
|
|
32
|
+
let filterCondition = {
|
|
33
|
+
mapped_entity_type: mappedEntityType,
|
|
34
|
+
organization_id: loggedInUser.organization_id,
|
|
35
|
+
};
|
|
36
|
+
if (mapped_entity_id) {
|
|
37
|
+
filterCondition['id'] = mapped_entity_id;
|
|
38
|
+
}
|
|
31
39
|
const entityMaster = await this.entityMasterRepository.findOne({
|
|
32
|
-
where:
|
|
33
|
-
mapped_entity_type: mappedEntityType,
|
|
34
|
-
organization_id: loggedInUser.organization_id,
|
|
35
|
-
},
|
|
40
|
+
where: filterCondition,
|
|
36
41
|
});
|
|
37
42
|
|
|
38
43
|
if (!entityMaster) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BadGatewayException, Inject, Injectable } from '@nestjs/common';
|
|
1
|
+
import { BadGatewayException, Inject, Injectable, Logger } from '@nestjs/common';
|
|
2
2
|
import { ConfigService } from '@nestjs/config';
|
|
3
3
|
import { InjectRepository } from '@nestjs/typeorm';
|
|
4
4
|
import axios from 'axios';
|
|
@@ -30,6 +30,7 @@ export class WorkflowMetaService extends EntityServiceImpl {
|
|
|
30
30
|
@Inject('EntityModificationService')
|
|
31
31
|
private readonly modificationService: EntityModificationService,
|
|
32
32
|
private readonly configService: ConfigService,
|
|
33
|
+
private readonly logger = new Logger(WorkflowMetaService.name)
|
|
33
34
|
) {
|
|
34
35
|
super();
|
|
35
36
|
}
|
|
@@ -553,8 +554,9 @@ export class WorkflowMetaService extends EntityServiceImpl {
|
|
|
553
554
|
console.error('Internal Entity API call failed:', error.message);
|
|
554
555
|
}
|
|
555
556
|
|
|
556
|
-
if (!owners?.length)
|
|
557
|
-
|
|
557
|
+
if (!owners?.length) this.logger.log(
|
|
558
|
+
`No eligible users found for lead assignment`,
|
|
559
|
+
);
|
|
558
560
|
const userIds = owners?.map((o) => Number(o.id)); // normalize to numbers
|
|
559
561
|
|
|
560
562
|
// 2) Find the last assigned *eligible* owner (use IN (...))
|