rez_core 4.0.95 → 4.0.97
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/.idea/250218_nodejs_core.iml +12 -0
- package/.idea/codeStyles/Project.xml +59 -0
- package/.idea/codeStyles/codeStyleConfig.xml +5 -0
- package/.idea/inspectionProfiles/Project_Default.xml +6 -0
- package/.idea/modules.xml +8 -0
- package/.idea/prettier.xml +6 -0
- package/.idea/vcs.xml +6 -0
- package/dist/module/layout_preference/controller/layout_preference.controller.d.ts +3 -0
- package/dist/module/layout_preference/controller/layout_preference.controller.js +16 -0
- package/dist/module/layout_preference/controller/layout_preference.controller.js.map +1 -1
- package/dist/module/layout_preference/layout_preference.module.js +5 -1
- package/dist/module/layout_preference/layout_preference.module.js.map +1 -1
- package/dist/module/layout_preference/repository/layout_preference.repository.d.ts +7 -1
- package/dist/module/layout_preference/repository/layout_preference.repository.js +28 -2
- package/dist/module/layout_preference/repository/layout_preference.repository.js.map +1 -1
- package/dist/module/layout_preference/service/layout_preference.service.d.ts +1 -0
- package/dist/module/layout_preference/service/layout_preference.service.js +3 -0
- package/dist/module/layout_preference/service/layout_preference.service.js.map +1 -1
- package/dist/module/workflow/workflow.module.js +2 -0
- package/dist/module/workflow/workflow.module.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/module/layout_preference/controller/layout_preference.controller.ts +27 -1
- package/src/module/layout_preference/layout_preference.module.ts +5 -1
- package/src/module/layout_preference/repository/layout_preference.repository.ts +35 -0
- package/src/module/layout_preference/service/layout_preference.service.ts +12 -0
- package/src/module/workflow/workflow.module.ts +2 -0
package/package.json
CHANGED
|
@@ -1,4 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
Body,
|
|
3
|
+
Controller,
|
|
4
|
+
Get,
|
|
5
|
+
Inject,
|
|
6
|
+
Post,
|
|
7
|
+
Query,
|
|
8
|
+
Req,
|
|
9
|
+
UseGuards,
|
|
10
|
+
} from '@nestjs/common';
|
|
2
11
|
import { LayoutPreferenceService } from '../service/layout_preference.service';
|
|
3
12
|
import { JwtAuthGuard } from 'src/module/auth/guards/jwt.guard';
|
|
4
13
|
|
|
@@ -44,4 +53,21 @@ export class LayoutPreferenceController {
|
|
|
44
53
|
loggedInUser,
|
|
45
54
|
);
|
|
46
55
|
}
|
|
56
|
+
|
|
57
|
+
@Post('attributes')
|
|
58
|
+
@UseGuards(JwtAuthGuard)
|
|
59
|
+
async getEntityLayoutAttributes(
|
|
60
|
+
@Req() req: Request & { user: any },
|
|
61
|
+
@Query() queryParams,
|
|
62
|
+
@Body() body: any,
|
|
63
|
+
) {
|
|
64
|
+
const loggedInUser = req.user.userData;
|
|
65
|
+
const query_payload = { ...queryParams };
|
|
66
|
+
const { entity_type } = body;
|
|
67
|
+
return this.layoutPreferenceService.getEntityLayoutAttributes(
|
|
68
|
+
entity_type,
|
|
69
|
+
query_payload,
|
|
70
|
+
loggedInUser,
|
|
71
|
+
);
|
|
72
|
+
}
|
|
47
73
|
}
|
|
@@ -5,9 +5,13 @@ import { EntityModule } from '../meta/entity.module';
|
|
|
5
5
|
import { TypeOrmModule } from '@nestjs/typeorm';
|
|
6
6
|
import { LayoutPreference } from './entity/layout_preference.entity';
|
|
7
7
|
import { LayoutPreferenceRepository } from './repository/layout_preference.repository';
|
|
8
|
+
import { AttributeMaster } from '../meta/entity/attribute-master.entity';
|
|
8
9
|
|
|
9
10
|
@Module({
|
|
10
|
-
imports: [
|
|
11
|
+
imports: [
|
|
12
|
+
EntityModule,
|
|
13
|
+
TypeOrmModule.forFeature([LayoutPreference, AttributeMaster]),
|
|
14
|
+
],
|
|
11
15
|
controllers: [LayoutPreferenceController],
|
|
12
16
|
providers: [
|
|
13
17
|
{ provide: 'LayoutPreferenceService', useClass: LayoutPreferenceService },
|
|
@@ -2,12 +2,15 @@ import { Injectable } from '@nestjs/common';
|
|
|
2
2
|
import { InjectRepository } from '@nestjs/typeorm';
|
|
3
3
|
import { Repository } from 'typeorm';
|
|
4
4
|
import { LayoutPreference } from '../entity/layout_preference.entity';
|
|
5
|
+
import { AttributeMaster } from 'src/module/meta/entity/attribute-master.entity';
|
|
5
6
|
|
|
6
7
|
@Injectable()
|
|
7
8
|
export class LayoutPreferenceRepository {
|
|
8
9
|
constructor(
|
|
9
10
|
@InjectRepository(LayoutPreference)
|
|
10
11
|
private readonly layoutPreferenceRepo: Repository<LayoutPreference>,
|
|
12
|
+
@InjectRepository(AttributeMaster)
|
|
13
|
+
private readonly attributeMasterRepository: Repository<AttributeMaster>,
|
|
11
14
|
) {}
|
|
12
15
|
|
|
13
16
|
async findByEntityUserId(
|
|
@@ -27,4 +30,36 @@ export class LayoutPreferenceRepository {
|
|
|
27
30
|
},
|
|
28
31
|
});
|
|
29
32
|
}
|
|
33
|
+
|
|
34
|
+
async getEntityLayoutAttributes(
|
|
35
|
+
entity_type: string,
|
|
36
|
+
query_payload: any,
|
|
37
|
+
loggedInUser: any,
|
|
38
|
+
) {
|
|
39
|
+
let queryCondition = {
|
|
40
|
+
mapped_entity_type: entity_type,
|
|
41
|
+
organization_id: loggedInUser.organization_id,
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
if (query_payload) {
|
|
45
|
+
queryCondition = {
|
|
46
|
+
...query_payload,
|
|
47
|
+
...queryCondition,
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
const entityAttributes = await this.attributeMasterRepository.find({
|
|
52
|
+
where: {
|
|
53
|
+
...queryCondition,
|
|
54
|
+
},
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
// Transform response
|
|
58
|
+
const formattedAttributes = entityAttributes.map((attr) => ({
|
|
59
|
+
label: attr.name,
|
|
60
|
+
value: attr.attribute_key,
|
|
61
|
+
}));
|
|
62
|
+
|
|
63
|
+
return formattedAttributes;
|
|
64
|
+
}
|
|
30
65
|
}
|
|
@@ -169,4 +169,16 @@ export class LayoutPreferenceService extends EntityServiceImpl {
|
|
|
169
169
|
return [];
|
|
170
170
|
}
|
|
171
171
|
}
|
|
172
|
+
|
|
173
|
+
async getEntityLayoutAttributes(
|
|
174
|
+
entity_type: string,
|
|
175
|
+
query_payload: any,
|
|
176
|
+
loggedInUser: UserData,
|
|
177
|
+
): Promise<any> {
|
|
178
|
+
return this.layoutPreferenceRepository.getEntityLayoutAttributes(
|
|
179
|
+
entity_type,
|
|
180
|
+
query_payload,
|
|
181
|
+
loggedInUser,
|
|
182
|
+
);
|
|
183
|
+
}
|
|
172
184
|
}
|
|
@@ -62,6 +62,7 @@ import { ActivityLogRepository } from './repository/activity-log.repository';
|
|
|
62
62
|
import { ActivityLogController } from './controller/activity-log.controller';
|
|
63
63
|
import { NotificationModule } from '../notification/notification.module';
|
|
64
64
|
import { MapperModule } from '../mapper/mapper.module';
|
|
65
|
+
import { WorkflowAutomationModule } from '../workflow-automation/workflow-automation.module';
|
|
65
66
|
|
|
66
67
|
@Module({
|
|
67
68
|
imports: [
|
|
@@ -87,6 +88,7 @@ import { MapperModule } from '../mapper/mapper.module';
|
|
|
87
88
|
ListMasterModule,
|
|
88
89
|
NotificationModule,
|
|
89
90
|
MapperModule,
|
|
91
|
+
WorkflowAutomationModule,
|
|
90
92
|
],
|
|
91
93
|
providers: [
|
|
92
94
|
{ provide: 'ActionCategoryService', useClass: ActionCategoryService },
|