rez_core 2.2.127 → 2.2.128
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/.vscode/extensions.json +5 -0
- package/dist/config/database.config.js +1 -1
- package/dist/config/database.config.js.map +1 -1
- package/dist/module/meta/controller/entity-dynamic.controller.d.ts +3 -0
- package/dist/module/meta/controller/entity-dynamic.controller.js +12 -0
- package/dist/module/meta/controller/entity-dynamic.controller.js.map +1 -1
- package/dist/module/meta/service/entity-dynamic.service.d.ts +1 -0
- package/dist/module/meta/service/entity-dynamic.service.js +11 -0
- package/dist/module/meta/service/entity-dynamic.service.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/config/database.config.ts +1 -1
- package/src/module/meta/controller/entity-dynamic.controller.ts +12 -0
- package/src/module/meta/service/entity-dynamic.service.ts +20 -0
package/package.json
CHANGED
|
@@ -15,7 +15,7 @@ export class MySqlConfiguration implements TypeOrmOptionsFactory {
|
|
|
15
15
|
password: this.configService.get('DB_PASS') || 'Rezolut@123',
|
|
16
16
|
database: this.configService.get('DB_NAME') || 'core',
|
|
17
17
|
entities: [__dirname + '/../module/**/*.entity.{ts,js}'],
|
|
18
|
-
synchronize:
|
|
18
|
+
synchronize: false,
|
|
19
19
|
autoLoadEntities: true,
|
|
20
20
|
poolSize: 5,
|
|
21
21
|
};
|
|
@@ -96,4 +96,16 @@ export class EntityDynamicController {
|
|
|
96
96
|
|
|
97
97
|
return entity;
|
|
98
98
|
}
|
|
99
|
+
|
|
100
|
+
@Get('getDropdownList')
|
|
101
|
+
async getAttributesDropdownList(
|
|
102
|
+
@Req() req: Request & { user: any },
|
|
103
|
+
@Query('appcode') appcode?: string,
|
|
104
|
+
) {
|
|
105
|
+
let loggedInUser = req.user.userData;
|
|
106
|
+
return await this.entityDynamicService.getEntitiesDropdownList(
|
|
107
|
+
loggedInUser,
|
|
108
|
+
appcode,
|
|
109
|
+
);
|
|
110
|
+
}
|
|
99
111
|
}
|
|
@@ -575,4 +575,24 @@ export class EntityDynamicService {
|
|
|
575
575
|
const result = await this.dataSource.query(deleteQuery, [id]);
|
|
576
576
|
return result;
|
|
577
577
|
}
|
|
578
|
+
|
|
579
|
+
// -----------------------------
|
|
580
|
+
|
|
581
|
+
async getEntitiesDropdownList(
|
|
582
|
+
loggedInUser: any,
|
|
583
|
+
appcode?: string,
|
|
584
|
+
): Promise<any> {
|
|
585
|
+
const organizationId = loggedInUser.organization_id;
|
|
586
|
+
|
|
587
|
+
let query = `SELECT name as label,mapped_entity_type as value FROM cr_entity_master WHERE organization_id = ?`;
|
|
588
|
+
let params = [organizationId];
|
|
589
|
+
|
|
590
|
+
if (appcode) {
|
|
591
|
+
query += ` AND appcode = ?`;
|
|
592
|
+
params.push(appcode);
|
|
593
|
+
}
|
|
594
|
+
|
|
595
|
+
const dropdown = await this.dataSource.query(query, params);
|
|
596
|
+
return dropdown;
|
|
597
|
+
}
|
|
578
598
|
}
|