rez_core 5.0.89 → 5.0.90
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/meta/service/entity-relation.service.d.ts +1 -3
- package/dist/module/meta/service/entity-relation.service.js +22 -31
- package/dist/module/meta/service/entity-relation.service.js.map +1 -1
- package/dist/module/module/service/module-access.service.d.ts +3 -1
- package/dist/module/module/service/module-access.service.js +11 -4
- package/dist/module/module/service/module-access.service.js.map +1 -1
- package/dist/module/notification/controller/notification.controller.d.ts +1 -1
- package/dist/module/notification/service/notification.service.d.ts +6 -4
- package/dist/module/notification/service/notification.service.js +22 -20
- package/dist/module/notification/service/notification.service.js.map +1 -1
- package/dist/module/workflow/controller/action.controller.d.ts +5 -2
- package/dist/module/workflow/controller/form-master.controller.d.ts +4 -1
- package/dist/module/workflow/repository/action-data.repository.d.ts +2 -3
- package/dist/module/workflow/repository/action-data.repository.js +29 -18
- package/dist/module/workflow/repository/action-data.repository.js.map +1 -1
- package/dist/module/workflow/repository/action.repository.d.ts +6 -7
- package/dist/module/workflow/repository/action.repository.js +53 -61
- package/dist/module/workflow/repository/action.repository.js.map +1 -1
- package/dist/module/workflow/repository/comm-template.repository.d.ts +2 -3
- package/dist/module/workflow/repository/comm-template.repository.js +15 -9
- package/dist/module/workflow/repository/comm-template.repository.js.map +1 -1
- package/dist/module/workflow/repository/form-master.repository.d.ts +7 -4
- package/dist/module/workflow/repository/form-master.repository.js +14 -11
- package/dist/module/workflow/repository/form-master.repository.js.map +1 -1
- package/dist/module/workflow/repository/stage-group.repository.d.ts +4 -5
- package/dist/module/workflow/repository/stage-group.repository.js +34 -35
- package/dist/module/workflow/repository/stage-group.repository.js.map +1 -1
- package/dist/module/workflow/repository/stage-movement.repository.d.ts +6 -3
- package/dist/module/workflow/repository/stage-movement.repository.js +30 -17
- package/dist/module/workflow/repository/stage-movement.repository.js.map +1 -1
- package/dist/module/workflow/service/action.service.d.ts +13 -5
- package/dist/module/workflow/service/action.service.js +71 -20
- package/dist/module/workflow/service/action.service.js.map +1 -1
- package/dist/module/workflow/service/entity-modification.service.d.ts +3 -3
- package/dist/module/workflow/service/entity-modification.service.js +4 -4
- package/dist/module/workflow/service/entity-modification.service.js.map +1 -1
- package/dist/module/workflow/service/form-master.service.d.ts +4 -1
- package/dist/module/workflow/service/stage-group.service.d.ts +2 -7
- package/dist/module/workflow/service/stage-group.service.js +19 -17
- package/dist/module/workflow/service/stage-group.service.js.map +1 -1
- package/dist/module/workflow/service/stage.service.d.ts +2 -3
- package/dist/module/workflow/service/stage.service.js +24 -11
- package/dist/module/workflow/service/stage.service.js.map +1 -1
- package/dist/module/workflow/service/task.service.d.ts +2 -5
- package/dist/module/workflow/service/task.service.js +44 -45
- package/dist/module/workflow/service/task.service.js.map +1 -1
- package/dist/module/workflow/service/workflow-list-master.service.d.ts +1 -3
- package/dist/module/workflow/service/workflow-list-master.service.js +38 -26
- package/dist/module/workflow/service/workflow-list-master.service.js.map +1 -1
- package/dist/module/workflow/service/workflow-meta.service.d.ts +6 -3
- package/dist/module/workflow/service/workflow-meta.service.js +78 -50
- package/dist/module/workflow/service/workflow-meta.service.js.map +1 -1
- package/dist/module/workflow/service/workflow.service.d.ts +1 -3
- package/dist/module/workflow/service/workflow.service.js +10 -6
- package/dist/module/workflow/service/workflow.service.js.map +1 -1
- package/dist/module/workflow-schedule/processors/schedule.processor.d.ts +4 -2
- package/dist/module/workflow-schedule/processors/schedule.processor.js +51 -38
- package/dist/module/workflow-schedule/processors/schedule.processor.js.map +1 -1
- package/dist/module/workflow-schedule/service/workflow-schedule.service.d.ts +2 -3
- package/dist/module/workflow-schedule/service/workflow-schedule.service.js +15 -14
- package/dist/module/workflow-schedule/service/workflow-schedule.service.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/module/meta/service/entity-relation.service.ts +23 -41
- package/src/module/module/service/module-access.service.ts +8 -4
- package/src/module/notification/service/notification.service.ts +24 -20
- package/src/module/workflow/repository/action-data.repository.ts +33 -28
- package/src/module/workflow/repository/action.repository.ts +74 -77
- package/src/module/workflow/repository/comm-template.repository.ts +19 -13
- package/src/module/workflow/repository/form-master.repository.ts +15 -24
- package/src/module/workflow/repository/stage-group.repository.ts +41 -52
- package/src/module/workflow/repository/stage-movement.repository.ts +35 -32
- package/src/module/workflow/service/action.service.ts +70 -43
- package/src/module/workflow/service/entity-modification.service.ts +3 -3
- package/src/module/workflow/service/stage-group.service.ts +21 -19
- package/src/module/workflow/service/stage.service.ts +36 -28
- package/src/module/workflow/service/task.service.ts +53 -56
- package/src/module/workflow/service/workflow-list-master.service.ts +42 -34
- package/src/module/workflow/service/workflow-meta.service.ts +81 -77
- package/src/module/workflow/service/workflow.service.ts +9 -5
- package/src/module/workflow-schedule/processors/schedule.processor.ts +133 -97
- package/src/module/workflow-schedule/service/workflow-schedule.service.ts +24 -26
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { EntityServiceImpl } from './entity-service-impl.service';
|
|
2
|
-
import { DataSource } from 'typeorm';
|
|
3
2
|
import { EntityMasterRepository } from '../repository/entity-master.repository';
|
|
4
3
|
export declare class EntityRelationService extends EntityServiceImpl {
|
|
5
|
-
private readonly dataSource;
|
|
6
4
|
private entityMasterRepo;
|
|
7
|
-
constructor(
|
|
5
|
+
constructor(entityMasterRepo: EntityMasterRepository);
|
|
8
6
|
getEntityRelations(entityType: string, loggedInUser: any, includeSelf?: boolean): Promise<any>;
|
|
9
7
|
getRelatedEntityIds(sourceEntity: string, targetEntity: string, targetIds: number[], orgId: number): Promise<number[]>;
|
|
10
8
|
}
|
|
@@ -12,18 +12,24 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.EntityRelationService = void 0;
|
|
13
13
|
const common_1 = require("@nestjs/common");
|
|
14
14
|
const entity_service_impl_service_1 = require("./entity-service-impl.service");
|
|
15
|
-
const typeorm_1 = require("typeorm");
|
|
16
15
|
const entity_master_repository_1 = require("../repository/entity-master.repository");
|
|
17
16
|
let EntityRelationService = class EntityRelationService extends entity_service_impl_service_1.EntityServiceImpl {
|
|
18
|
-
constructor(
|
|
17
|
+
constructor(entityMasterRepo) {
|
|
19
18
|
super();
|
|
20
|
-
this.dataSource = dataSource;
|
|
21
19
|
this.entityMasterRepo = entityMasterRepo;
|
|
22
20
|
}
|
|
23
21
|
async getEntityRelations(entityType, loggedInUser, includeSelf = false) {
|
|
24
|
-
const
|
|
25
|
-
|
|
26
|
-
|
|
22
|
+
const entityRelationRepo = this.reflectionHelper.getRepoService('EntityRelation');
|
|
23
|
+
const relations = await entityRelationRepo
|
|
24
|
+
.createQueryBuilder("er")
|
|
25
|
+
.select([
|
|
26
|
+
"er.name AS label",
|
|
27
|
+
"er.target_entity_type AS value",
|
|
28
|
+
"er.id AS id",
|
|
29
|
+
])
|
|
30
|
+
.where("er.source_entity_type = :entityType", { entityType })
|
|
31
|
+
.andWhere("er.organization_id = :orgId", { orgId: loggedInUser.organization_id })
|
|
32
|
+
.getRawMany();
|
|
27
33
|
if (includeSelf) {
|
|
28
34
|
const entity = await this.entityMasterRepo.getEntityByMappedEntityType(entityType, loggedInUser.organization_id);
|
|
29
35
|
if (entity) {
|
|
@@ -39,36 +45,21 @@ let EntityRelationService = class EntityRelationService extends entity_service_i
|
|
|
39
45
|
async getRelatedEntityIds(sourceEntity, targetEntity, targetIds, orgId) {
|
|
40
46
|
if (!targetIds.length)
|
|
41
47
|
return [];
|
|
42
|
-
|
|
43
|
-
const
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
.
|
|
50
|
-
|
|
51
|
-
return `$${paramIndex++}`;
|
|
52
|
-
})
|
|
53
|
-
.join(", ");
|
|
54
|
-
params.push(Number(orgId));
|
|
55
|
-
const orgPlaceholder = `$${paramIndex}`;
|
|
56
|
-
const sql = `
|
|
57
|
-
SELECT DISTINCT source_entity_id
|
|
58
|
-
FROM frm_entity_relation_data
|
|
59
|
-
WHERE source_entity_type = ${sourceEntityParam}
|
|
60
|
-
AND target_entity_type = ${targetEntityParam}
|
|
61
|
-
AND target_entity_id IN (${idPlaceholders})
|
|
62
|
-
AND organization_id = ${orgPlaceholder}
|
|
63
|
-
`;
|
|
64
|
-
const rows = await this.dataSource.query(sql, params);
|
|
48
|
+
const entityRelationRepo = this.reflectionHelper.getRepoService('EntityRelation');
|
|
49
|
+
const rows = await entityRelationRepo
|
|
50
|
+
.createQueryBuilder("erd")
|
|
51
|
+
.select("DISTINCT erd.source_entity_id", "source_entity_id")
|
|
52
|
+
.where("erd.source_entity_type = :sourceEntity", { sourceEntity })
|
|
53
|
+
.andWhere("erd.target_entity_type = :targetEntity", { targetEntity })
|
|
54
|
+
.andWhere("erd.target_entity_id IN (:...targetIds)", { targetIds })
|
|
55
|
+
.andWhere("erd.organization_id = :orgId", { orgId })
|
|
56
|
+
.getRawMany();
|
|
65
57
|
return rows.map((r) => Number(r.source_entity_id));
|
|
66
58
|
}
|
|
67
59
|
};
|
|
68
60
|
exports.EntityRelationService = EntityRelationService;
|
|
69
61
|
exports.EntityRelationService = EntityRelationService = __decorate([
|
|
70
62
|
(0, common_1.Injectable)(),
|
|
71
|
-
__metadata("design:paramtypes", [
|
|
72
|
-
entity_master_repository_1.EntityMasterRepository])
|
|
63
|
+
__metadata("design:paramtypes", [entity_master_repository_1.EntityMasterRepository])
|
|
73
64
|
], EntityRelationService);
|
|
74
65
|
//# sourceMappingURL=entity-relation.service.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entity-relation.service.js","sourceRoot":"","sources":["../../../../src/module/meta/service/entity-relation.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,+EAAkE;
|
|
1
|
+
{"version":3,"file":"entity-relation.service.js","sourceRoot":"","sources":["../../../../src/module/meta/service/entity-relation.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,+EAAkE;AAEl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AM,IAAI,GAAG,MAAM,kBAAkB;aAClC,kBAAkB,CAAC,KAAK,CAAC;aACzB,MAAM,CAAC,+BAA+B,EAAE,kBAAkB,CAAC;aAC3D,KAAK,CAAC,wCAAwC,EAAE,EAAE,YAAY,EAAE,CAAC;aACjE,QAAQ,CAAC,wCAAwC,EAAE,EAAE,YAAY,EAAE,CAAC;aACpE,QAAQ,CAAC,yCAAyC,EAAE,EAAE,SAAS,EAAE,CAAC;aAClE,QAAQ,CAAC,8BAA8B,EAAE,EAAE,KAAK,EAAE,CAAC;aACnD,UAAU,EAAE,CAAC;QAEhB,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC;IACrD,CAAC;CAIF,CAAA;AA9DY,sDAAqB;gCAArB,qBAAqB;IADjC,IAAA,mBAAU,GAAE;qCAE2B,iDAAsB;GADjD,qBAAqB,CA8DjC"}
|
|
@@ -3,12 +3,14 @@ import { DataSource } from 'typeorm';
|
|
|
3
3
|
import { UserData } from 'src/module/user/entity/user.entity';
|
|
4
4
|
import { MenuRepository } from '../repository/menu.repository';
|
|
5
5
|
import { ListMasterService } from 'src/module/listmaster/service/list-master.service';
|
|
6
|
+
import { ReflectionHelper } from '../../../utils/service/reflection-helper.service';
|
|
6
7
|
export declare class ModuleAccessService {
|
|
7
8
|
private readonly moduleAccessRepository;
|
|
8
9
|
private readonly menuRepository;
|
|
9
10
|
private readonly dataSource;
|
|
10
11
|
private readonly listMasterService;
|
|
11
|
-
|
|
12
|
+
private readonly reflectionHelper;
|
|
13
|
+
constructor(moduleAccessRepository: ModuleAccessRepository, menuRepository: MenuRepository, dataSource: DataSource, listMasterService: ListMasterService, reflectionHelper: ReflectionHelper);
|
|
12
14
|
getModules({ appcode, loggedInUser }: {
|
|
13
15
|
appcode: string;
|
|
14
16
|
loggedInUser: UserData;
|
|
@@ -19,12 +19,14 @@ const global_constant_1 = require("../../../constant/global.constant");
|
|
|
19
19
|
const typeorm_1 = require("typeorm");
|
|
20
20
|
const menu_repository_1 = require("../repository/menu.repository");
|
|
21
21
|
const list_master_service_1 = require("../../listmaster/service/list-master.service");
|
|
22
|
+
const reflection_helper_service_1 = require("../../../utils/service/reflection-helper.service");
|
|
22
23
|
let ModuleAccessService = class ModuleAccessService {
|
|
23
|
-
constructor(moduleAccessRepository, menuRepository, dataSource, listMasterService) {
|
|
24
|
+
constructor(moduleAccessRepository, menuRepository, dataSource, listMasterService, reflectionHelper) {
|
|
24
25
|
this.moduleAccessRepository = moduleAccessRepository;
|
|
25
26
|
this.menuRepository = menuRepository;
|
|
26
27
|
this.dataSource = dataSource;
|
|
27
28
|
this.listMasterService = listMasterService;
|
|
29
|
+
this.reflectionHelper = reflectionHelper;
|
|
28
30
|
}
|
|
29
31
|
async getModules({ appcode, loggedInUser }) {
|
|
30
32
|
return this.moduleAccessRepository.getModules({
|
|
@@ -91,8 +93,12 @@ let ModuleAccessService = class ModuleAccessService {
|
|
|
91
93
|
const roleIds = roleCodes.map(Number);
|
|
92
94
|
const allPermissions = await this.moduleAccessRepository.getModuleAccessByRoles(roleIds, appcode);
|
|
93
95
|
if (level_type === 'SCH') {
|
|
94
|
-
const
|
|
95
|
-
const school =
|
|
96
|
+
const schoolRepo = this.reflectionHelper.getRepoService('SSOSchool');
|
|
97
|
+
const school = await schoolRepo.findOne({
|
|
98
|
+
where: {
|
|
99
|
+
id: level_id
|
|
100
|
+
}
|
|
101
|
+
});
|
|
96
102
|
const resolveStatus = await this.listMasterService.getResolvedListCode(global_constant_1.STATUS_INACTIVE, organization_id || 0);
|
|
97
103
|
if (!school || school.status === resolveStatus.id) {
|
|
98
104
|
return allPermissions.filter((perm) => perm.action === 'VIEW');
|
|
@@ -108,6 +114,7 @@ exports.ModuleAccessService = ModuleAccessService = __decorate([
|
|
|
108
114
|
__metadata("design:paramtypes", [module_access_repository_1.ModuleAccessRepository,
|
|
109
115
|
menu_repository_1.MenuRepository,
|
|
110
116
|
typeorm_1.DataSource,
|
|
111
|
-
list_master_service_1.ListMasterService
|
|
117
|
+
list_master_service_1.ListMasterService,
|
|
118
|
+
reflection_helper_service_1.ReflectionHelper])
|
|
112
119
|
], ModuleAccessService);
|
|
113
120
|
//# sourceMappingURL=module-access.service.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module-access.service.js","sourceRoot":"","sources":["../../../../src/module/module/service/module-access.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAyE;AACzE,qFAAgF;AAGhF,uEAG2C;AAE3C,qCAAoD;AAEpD,mEAA+D;AAC/D,sFAAsF;
|
|
1
|
+
{"version":3,"file":"module-access.service.js","sourceRoot":"","sources":["../../../../src/module/module/service/module-access.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAyE;AACzE,qFAAgF;AAGhF,uEAG2C;AAE3C,qCAAoD;AAEpD,mEAA+D;AAC/D,sFAAsF;AACtF,gGAAoF;AAG7E,IAAM,mBAAmB,GAAzB,MAAM,mBAAmB;IAC9B,YACmB,sBAA8C,EAC9C,cAA8B,EAC9B,UAAsB,EAEtB,iBAAoC,EACpC,gBAAkC;QALlC,2BAAsB,GAAtB,sBAAsB,CAAwB;QAC9C,mBAAc,GAAd,cAAc,CAAgB;QAC9B,eAAU,GAAV,UAAU,CAAY;QAEtB,sBAAiB,GAAjB,iBAAiB,CAAmB;QACpC,qBAAgB,GAAhB,gBAAgB,CAAkB;IAClD,CAAC;IAEJ,KAAK,CAAC,UAAU,CAAC,EAAE,OAAO,EAAC,YAAY,EAA8C;QACnF,OAAO,IAAI,CAAC,sBAAsB,CAAC,UAAU,CAAC;YAC5C,OAAO,EAAC,YAAY;SACrB,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,QAAQ,CAAC,EACb,OAAO,EACP,UAAU,EACV,QAAQ,EACR,eAAe,EACf,OAAO,GAOR;QACC,MAAM,KAAK,GAAG,IAAI,CAAC,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C,sBAAsB,CACtD,OAAO,EACP,OAAO,CACR,CAAC;QAGJ,IAAI,UAAU,KAAK,KAAK,EAAE,CAAC;YACzB,MAAM,UAAU,GAAI,IAAI,CAAC,gBAAgB,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC;YAEtE,MAAM,MAAM,GAAG,MAAM,UAAU,CAAC,OAAO,CAAC;gBACtC,KAAK,EAAE;oBACL,EAAE,EAAE,QAAQ;iBACb;aACF,CAAC,CAAC;YAEH,MAAM,aAAa,GAAG,MAAM,IAAI,CAAC,iBAAiB,CAAC,mBAAmB,CACpE,iCAAe,EACf,eAAe,IAAI,CAAC,CACrB,CAAC;YAEF,IAAI,CAAC,MAAM,IAAI,MAAM,CAAC,MAAM,KAAK,aAAa,CAAC,EAAE,EAAE,CAAC;gBAElD,OAAO,cAAc,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,KAAK,MAAM,CAAC,CAAC;YACjE,CAAC;QACH,CAAC;QAGD,OAAO,cAAc,CAAC;IACxB,CAAC;CACF,CAAA;AAtLY,kDAAmB;8BAAnB,mBAAmB;IAD/B,IAAA,mBAAU,GAAE;IAMR,WAAA,IAAA,eAAM,EAAC,mBAAmB,CAAC,CAAA;qCAHa,iDAAsB;QAC9B,gCAAc;QAClB,oBAAU;QAEH,uCAAiB;QAClB,4CAAgB;GAP1C,mBAAmB,CAsL/B"}
|
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { EntityManager } from 'typeorm';
|
|
2
2
|
import { MediaDataService } from 'src/module/meta/service/media-data.service';
|
|
3
3
|
import * as admin from 'firebase-admin';
|
|
4
4
|
import { ConfigService } from '@nestjs/config';
|
|
5
|
+
import { ReflectionHelper } from 'src/utils/service/reflection-helper.service';
|
|
5
6
|
export declare class NotificationsService {
|
|
6
|
-
private readonly
|
|
7
|
+
private readonly entityManager;
|
|
7
8
|
private readonly mediaDataService;
|
|
8
9
|
private readonly configService;
|
|
10
|
+
private readonly reflectionHelper;
|
|
9
11
|
private readonly firebaseAdmin;
|
|
10
|
-
constructor(
|
|
12
|
+
constructor(entityManager: EntityManager, mediaDataService: MediaDataService, configService: ConfigService, reflectionHelper: ReflectionHelper, firebaseAdmin: typeof admin);
|
|
11
13
|
private tokens;
|
|
12
14
|
saveToken(userId: string | undefined, token: string): Promise<{
|
|
13
15
|
success: boolean;
|
|
@@ -22,6 +24,6 @@ export declare class NotificationsService {
|
|
|
22
24
|
}): Promise<any>;
|
|
23
25
|
markAllAsRead(loggedInUser: any): Promise<{
|
|
24
26
|
success: boolean;
|
|
25
|
-
affectedRows:
|
|
27
|
+
affectedRows: number;
|
|
26
28
|
}>;
|
|
27
29
|
}
|
|
@@ -18,11 +18,13 @@ const typeorm_1 = require("typeorm");
|
|
|
18
18
|
const media_data_service_1 = require("../../meta/service/media-data.service");
|
|
19
19
|
const axios_1 = require("axios");
|
|
20
20
|
const config_1 = require("@nestjs/config");
|
|
21
|
+
const reflection_helper_service_1 = require("../../../utils/service/reflection-helper.service");
|
|
21
22
|
let NotificationsService = class NotificationsService {
|
|
22
|
-
constructor(
|
|
23
|
-
this.
|
|
23
|
+
constructor(entityManager, mediaDataService, configService, reflectionHelper, firebaseAdmin) {
|
|
24
|
+
this.entityManager = entityManager;
|
|
24
25
|
this.mediaDataService = mediaDataService;
|
|
25
26
|
this.configService = configService;
|
|
27
|
+
this.reflectionHelper = reflectionHelper;
|
|
26
28
|
this.firebaseAdmin = firebaseAdmin;
|
|
27
29
|
this.tokens = new Map();
|
|
28
30
|
}
|
|
@@ -74,11 +76,7 @@ let NotificationsService = class NotificationsService {
|
|
|
74
76
|
AND n.level_id = $${paramIndex + 1}
|
|
75
77
|
AND n.level_type = $${paramIndex + 2}
|
|
76
78
|
`;
|
|
77
|
-
const params = [
|
|
78
|
-
String(id),
|
|
79
|
-
String(level_id),
|
|
80
|
-
String(level_type),
|
|
81
|
-
];
|
|
79
|
+
const params = [String(id), String(level_id), String(level_type)];
|
|
82
80
|
paramIndex += 3;
|
|
83
81
|
if (isReadFilter !== undefined) {
|
|
84
82
|
sql += ` AND n.is_read = $${paramIndex}`;
|
|
@@ -86,10 +84,11 @@ let NotificationsService = class NotificationsService {
|
|
|
86
84
|
paramIndex++;
|
|
87
85
|
}
|
|
88
86
|
sql += ` ORDER BY n.created_date DESC`;
|
|
89
|
-
const notifications = await this.
|
|
87
|
+
const notifications = await this.entityManager.query(sql, params);
|
|
90
88
|
const mediaCache = new Map();
|
|
91
89
|
for (const notification of notifications) {
|
|
92
|
-
notification.is_read =
|
|
90
|
+
notification.is_read =
|
|
91
|
+
notification.is_read === 1 || notification.is_read === '1';
|
|
93
92
|
try {
|
|
94
93
|
const baseUrl = this.configService.get('REDIRECT_BE_URL');
|
|
95
94
|
const queryParams = new URLSearchParams({
|
|
@@ -107,22 +106,25 @@ let NotificationsService = class NotificationsService {
|
|
|
107
106
|
}
|
|
108
107
|
async markAllAsRead(loggedInUser) {
|
|
109
108
|
const { id, level_id, level_type } = loggedInUser;
|
|
110
|
-
const
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
109
|
+
const notificationRepo = this.reflectionHelper.getRepoService('NotificationData');
|
|
110
|
+
const result = await notificationRepo.update({
|
|
111
|
+
user_id: id,
|
|
112
|
+
level_id: level_id,
|
|
113
|
+
level_type: level_type,
|
|
114
|
+
is_read: 0,
|
|
115
|
+
}, {
|
|
116
|
+
is_read: 1,
|
|
117
|
+
});
|
|
118
|
+
return { success: true, affectedRows: result.affected || 0 };
|
|
118
119
|
}
|
|
119
120
|
};
|
|
120
121
|
exports.NotificationsService = NotificationsService;
|
|
121
122
|
exports.NotificationsService = NotificationsService = __decorate([
|
|
122
123
|
(0, common_1.Injectable)(),
|
|
123
|
-
__param(
|
|
124
|
-
__metadata("design:paramtypes", [typeorm_1.
|
|
124
|
+
__param(4, (0, common_1.Inject)('FIREBASE_ADMIN')),
|
|
125
|
+
__metadata("design:paramtypes", [typeorm_1.EntityManager,
|
|
125
126
|
media_data_service_1.MediaDataService,
|
|
126
|
-
config_1.ConfigService,
|
|
127
|
+
config_1.ConfigService,
|
|
128
|
+
reflection_helper_service_1.ReflectionHelper, Object])
|
|
127
129
|
], NotificationsService);
|
|
128
130
|
//# sourceMappingURL=notification.service.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notification.service.js","sourceRoot":"","sources":["../../../../src/module/notification/service/notification.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAoD;AACpD,
|
|
1
|
+
{"version":3,"file":"notification.service.js","sourceRoot":"","sources":["../../../../src/module/notification/service/notification.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAoD;AACpD,qCAAoD;AACpD,8EAA8E;AAE9E,iCAA0B;AAC1B,2CAA+C;AAC/C,gGAA+E;AAGxE,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;IAC/B,YACmB,aAA4B,EAC5B,gBAAkC,EAClC,aAA4B,EAC5B,gBAAkC,EACzB,aAA4C;QAJrD,kBAAa,GAAb,aAAa,CAAe;QAC5B,qBAAgB,GAAhB,gBAAgB,CAAkB;QAClC,kBAAa,GAAb,aAAa,CAAe;QAC5B,qBAAgB,GAAhB,gBAAgB,CAAkB;QACR,kBAAa,GAAb,aAAa,CAAc;QAGhE,WAAM,GAAwB,IAAI,GAAG,EAAE,CAAC;IAF7C,CAAC;IAIJ,KAAK,CAAC,SAAS,CAAC,MAA0B,EAAE,KAAa;QACvD,IAAI,MAAM,EAAE,CAAC;YACX,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;QACjC,CAAC;QACD,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;IAClC,CAAC;IAED,KAAK,CAAC,YAAY,CAChB,KAAa,EACb,KAAa,EACb,IAAY,EACZ,IAA0B;QAG1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,IAAI,CAAC,EAAE,CAAC;IAC/D,CAAC;CACF,CAAA;AA1JY,oDAAoB;+BAApB,oBAAoB;IADhC,IAAA,mBAAU,GAAE;IAOR,WAAA,IAAA,eAAM,EAAC,gBAAgB,CAAC,CAAA;qCAJO,uBAAa;QACV,qCAAgB;QACnB,sBAAa;QACV,4CAAgB;GAL1C,oBAAoB,CA0JhC"}
|
|
@@ -11,7 +11,10 @@ export declare class ActionController {
|
|
|
11
11
|
user: any;
|
|
12
12
|
}, body: {
|
|
13
13
|
list_type: string;
|
|
14
|
-
}): Promise<
|
|
14
|
+
}): Promise<{
|
|
15
|
+
label: any;
|
|
16
|
+
value: any;
|
|
17
|
+
}[]>;
|
|
15
18
|
getActions(req: Request & {
|
|
16
19
|
user: any;
|
|
17
20
|
}, stage_id: number): Promise<any[]>;
|
|
@@ -33,7 +36,7 @@ export declare class ActionController {
|
|
|
33
36
|
name: any;
|
|
34
37
|
reason_code: any;
|
|
35
38
|
default_reason_code: any;
|
|
36
|
-
is_default:
|
|
39
|
+
is_default: any;
|
|
37
40
|
is_current: any;
|
|
38
41
|
is_done: any;
|
|
39
42
|
is_mandatory: any;
|
|
@@ -4,7 +4,10 @@ export declare class FormMasterController {
|
|
|
4
4
|
constructor(formMasterService: FormMasterService);
|
|
5
5
|
getForms(req: Request & {
|
|
6
6
|
user: any;
|
|
7
|
-
}, source_entity_type: string): Promise<
|
|
7
|
+
}, source_entity_type: string): Promise<{
|
|
8
|
+
label: any;
|
|
9
|
+
value: any;
|
|
10
|
+
}[]>;
|
|
8
11
|
submitForm(req: Request & {
|
|
9
12
|
user: any;
|
|
10
13
|
}, body: any): Promise<string>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ActionDataEntity } from '../entity/action-data.entity';
|
|
2
|
-
import {
|
|
2
|
+
import { Repository } from 'typeorm';
|
|
3
3
|
import { UserData } from 'src/module/user/entity/user.entity';
|
|
4
4
|
import { TaskDataEntity } from '../entity/task-data.entity';
|
|
5
5
|
import { EntityServiceImpl } from 'src/module/meta/service/entity-service-impl.service';
|
|
@@ -7,11 +7,10 @@ import { ConfigService } from '@nestjs/config';
|
|
|
7
7
|
import { WorkflowAutomationEngineService } from 'src/module/workflow-automation/service/workflow-automation-engine.service';
|
|
8
8
|
export declare class ActionDataRepository extends EntityServiceImpl {
|
|
9
9
|
private readonly actionDataRepo;
|
|
10
|
-
private readonly dataSource;
|
|
11
10
|
private readonly TaskRepository;
|
|
12
11
|
private readonly configService;
|
|
13
12
|
private readonly workflowAutomationEngineService;
|
|
14
|
-
constructor(actionDataRepo: Repository<ActionDataEntity>,
|
|
13
|
+
constructor(actionDataRepo: Repository<ActionDataEntity>, TaskRepository: Repository<TaskDataEntity>, configService: ConfigService, workflowAutomationEngineService: WorkflowAutomationEngineService);
|
|
15
14
|
saveActionData(action: any, loggedInUser: UserData, mapped_entity_id: any, mapped_entity_type: any): Promise<any>;
|
|
16
15
|
updateActionStatus(loggedInUser: UserData, mapped_entity_type: string, mapped_entity_id: number, stage_id: number, action_id: number): Promise<any>;
|
|
17
16
|
resubmitAction(organization_id: number, mapped_entity_type: string, mapped_entity_id: number, stage_id: number, action_id: number): Promise<{
|
|
@@ -24,10 +24,9 @@ const config_1 = require("@nestjs/config");
|
|
|
24
24
|
const axios_1 = require("axios");
|
|
25
25
|
const workflow_automation_engine_service_1 = require("../../workflow-automation/service/workflow-automation-engine.service");
|
|
26
26
|
let ActionDataRepository = class ActionDataRepository extends entity_service_impl_service_1.EntityServiceImpl {
|
|
27
|
-
constructor(actionDataRepo,
|
|
27
|
+
constructor(actionDataRepo, TaskRepository, configService, workflowAutomationEngineService) {
|
|
28
28
|
super();
|
|
29
29
|
this.actionDataRepo = actionDataRepo;
|
|
30
|
-
this.dataSource = dataSource;
|
|
31
30
|
this.TaskRepository = TaskRepository;
|
|
32
31
|
this.configService = configService;
|
|
33
32
|
this.workflowAutomationEngineService = workflowAutomationEngineService;
|
|
@@ -38,7 +37,13 @@ let ActionDataRepository = class ActionDataRepository extends entity_service_imp
|
|
|
38
37
|
const minSequence = Math.min(...action.map((a) => a.sequence));
|
|
39
38
|
if (action.length > 0) {
|
|
40
39
|
for (const act of action) {
|
|
41
|
-
const
|
|
40
|
+
const listMasterItemsRepo = this.reflectionHelper.getRepoService('ListMasterItems');
|
|
41
|
+
const is_mandatory = await listMasterItemsRepo.findOne({
|
|
42
|
+
where: {
|
|
43
|
+
id: act.action_requirement,
|
|
44
|
+
organization_id: loggedInUser.organization_id,
|
|
45
|
+
},
|
|
46
|
+
});
|
|
42
47
|
const isFirst = act.sequence == minSequence;
|
|
43
48
|
const actionData = this.actionDataRepo.create({
|
|
44
49
|
stage_id: act.stage_id,
|
|
@@ -51,7 +56,7 @@ let ActionDataRepository = class ActionDataRepository extends entity_service_imp
|
|
|
51
56
|
mapped_entity_type,
|
|
52
57
|
is_current: isFirst ? 'Y' : null,
|
|
53
58
|
start_time: isFirst ? new Date() : null,
|
|
54
|
-
is_mandatory: is_mandatory
|
|
59
|
+
is_mandatory: is_mandatory?.code === 'mandatory' ? true : false,
|
|
55
60
|
category: act?.action_category_code,
|
|
56
61
|
});
|
|
57
62
|
await this.actionDataRepo.save(actionData);
|
|
@@ -72,19 +77,26 @@ let ActionDataRepository = class ActionDataRepository extends entity_service_imp
|
|
|
72
77
|
status: global_constant_1.FORM_STATUS_TO_BE_SENT,
|
|
73
78
|
action_id: act.id,
|
|
74
79
|
created_date: istDate,
|
|
75
|
-
pdf_template: act.pdf_template
|
|
80
|
+
pdf_template: act.pdf_template,
|
|
76
81
|
};
|
|
77
82
|
const createdEntity = await super.createEntity(data, loggedInUser);
|
|
78
|
-
|
|
83
|
+
const entityRelationRepo = this.reflectionHelper.getRepoService('EntityRelation');
|
|
84
|
+
let relationData = await entityRelationRepo.findOne({
|
|
85
|
+
where: {
|
|
86
|
+
source_entity_type: createdEntity.mapped_entity_type,
|
|
87
|
+
target_entity_type: createdEntity.entity_type,
|
|
88
|
+
},
|
|
89
|
+
});
|
|
79
90
|
if (relationData) {
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
createdEntity.
|
|
84
|
-
createdEntity.
|
|
85
|
-
createdEntity.
|
|
86
|
-
|
|
87
|
-
|
|
91
|
+
const entityRelationDataRepo = this.reflectionHelper.getRepoService('EntityRelationData');
|
|
92
|
+
await entityRelationDataRepo.save({
|
|
93
|
+
organization_id: loggedInUser.organization_id,
|
|
94
|
+
source_entity_id: createdEntity.mapped_entity_id,
|
|
95
|
+
source_entity_type: createdEntity.mapped_entity_type,
|
|
96
|
+
target_entity_id: createdEntity.id,
|
|
97
|
+
target_entity_type: createdEntity.entity_type,
|
|
98
|
+
relation_type: relationData?.relation_type,
|
|
99
|
+
});
|
|
88
100
|
}
|
|
89
101
|
await this.workflowAutomationEngineService.handleEntityEvent(createdEntity.entity_type, 'CREATE', createdEntity, loggedInUser, null);
|
|
90
102
|
}
|
|
@@ -179,8 +191,8 @@ let ActionDataRepository = class ActionDataRepository extends entity_service_imp
|
|
|
179
191
|
where: {
|
|
180
192
|
code: 'in_progress',
|
|
181
193
|
organization_id: organization_id,
|
|
182
|
-
listtype: 'TKST'
|
|
183
|
-
}
|
|
194
|
+
listtype: 'TKST',
|
|
195
|
+
},
|
|
184
196
|
});
|
|
185
197
|
task.status = listMasterItem.id ?? task.status;
|
|
186
198
|
await this.TaskRepository.update(task.id, task);
|
|
@@ -232,9 +244,8 @@ exports.ActionDataRepository = ActionDataRepository;
|
|
|
232
244
|
exports.ActionDataRepository = ActionDataRepository = __decorate([
|
|
233
245
|
(0, common_1.Injectable)(),
|
|
234
246
|
__param(0, (0, typeorm_1.InjectRepository)(action_data_entity_1.ActionDataEntity)),
|
|
235
|
-
__param(
|
|
247
|
+
__param(1, (0, typeorm_1.InjectRepository)(task_data_entity_1.TaskDataEntity)),
|
|
236
248
|
__metadata("design:paramtypes", [typeorm_2.Repository,
|
|
237
|
-
typeorm_2.DataSource,
|
|
238
249
|
typeorm_2.Repository,
|
|
239
250
|
config_1.ConfigService,
|
|
240
251
|
workflow_automation_engine_service_1.WorkflowAutomationEngineService])
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"action-data.repository.js","sourceRoot":"","sources":["../../../../src/module/workflow/repository/action-data.repository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAiE;AACjE,6CAAmD;AACnD,qEAAgE;AAChE,
|
|
1
|
+
{"version":3,"file":"action-data.repository.js","sourceRoot":"","sources":["../../../../src/module/workflow/repository/action-data.repository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAiE;AACjE,6CAAmD;AACnD,qEAAgE;AAChE,qCAA+C;AAE/C,iEAA4D;AAC5D,gGAAwF;AACxF,uEAAsE;AACtE,2CAA+C;AAC/C,iCAA0B;AAC1B,6HAEmF;AAG5E,IAAM,oBAAoB,GAA1B,MAAM,oBAAqB,SAAQ,+CAAiB;IACzD,YAEmB,cAA4C,EAE5C,cAA0C,EAC1C,aAA4B,EAC5B,+BAAgE;QAEjF,KAAK,EAAE,CAAC;QANS,mBAAc,GAAd,cAAc,CAA8B;QAE5C,mBAAc,GAAd,cAAc,CAA4B;QAC1C,kBAAa,GAAb,aAAa,CAAe;QAC5B,oCAA+B,GAA/B,+BAA+B,CAAiC;IAGnF,CAAC;IAED,KAAK,CAAC,cAAc,CAClB,MAAW,EACX,YAAsB,EACtB,gBAAgB,EAChB,kBAAkB;QAElB,IAAI,CAAC,MAAM,EAAE,MAAM;YAAE,OAAO;QAG5B,MAAM,WAAW,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC;QAE/D,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACtB,KAAK,MAAM,GAAG,IAAI,MAAM,EAAE,CAAC;gBACzB,MAAM,mBAAmB,GAAG,IAAI,CAAC,gBAAgB,CAAC,c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ository } from 'typeorm';
|
|
2
|
-
import { ActionEntity } from '../entity/action.entity';
|
|
3
1
|
import { UserData } from 'src/module/user/entity/user.entity';
|
|
4
2
|
import { ReflectionHelper } from '../../../utils/service/reflection-helper.service';
|
|
5
3
|
export declare class ActionRepository {
|
|
6
|
-
private readonly actionRepository;
|
|
7
|
-
private readonly dataSource;
|
|
8
4
|
private readonly reflectionHelper;
|
|
9
|
-
constructor(
|
|
5
|
+
constructor(reflectionHelper: ReflectionHelper);
|
|
10
6
|
getReasonCode(loggedInUser: UserData): Promise<any>;
|
|
11
|
-
defaultReasonCode(list_type: string, loggedInUser: UserData): Promise<
|
|
7
|
+
defaultReasonCode(list_type: string, loggedInUser: UserData): Promise<{
|
|
8
|
+
label: any;
|
|
9
|
+
value: any;
|
|
10
|
+
}[]>;
|
|
12
11
|
getActions(loggedInUser: UserData, stage_id: number): Promise<any[]>;
|
|
13
12
|
getDependentActions(loggedInUser: UserData, stage_id: number, action_id?: number): Promise<any>;
|
|
14
13
|
getAction(organization_id: number, stage_id: number, mapped_entity_id: number, mapped_entity_type: string): Promise<{
|
|
@@ -21,7 +20,7 @@ export declare class ActionRepository {
|
|
|
21
20
|
name: any;
|
|
22
21
|
reason_code: any;
|
|
23
22
|
default_reason_code: any;
|
|
24
|
-
is_default:
|
|
23
|
+
is_default: any;
|
|
25
24
|
is_current: any;
|
|
26
25
|
is_done: any;
|
|
27
26
|
is_mandatory: any;
|