rez_core 5.0.96 → 5.0.98
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/filter/service/filter.service.js +2 -2
- package/dist/module/filter/service/filter.service.js.map +1 -1
- package/dist/module/workflow/repository/action-data.repository.js +1 -1
- package/dist/module/workflow/repository/action-data.repository.js.map +1 -1
- package/dist/module/workflow/repository/stage-movement.repository.js +3 -1
- package/dist/module/workflow/repository/stage-movement.repository.js.map +1 -1
- package/dist/module/workflow/service/action-template-mapping.service.js +12 -8
- package/dist/module/workflow/service/action-template-mapping.service.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/module/filter/service/filter.service.ts +5 -2
- package/src/module/workflow/repository/action-data.repository.ts +10 -8
- package/src/module/workflow/repository/stage-movement.repository.ts +8 -2
- package/src/module/workflow/service/action-template-mapping.service.ts +17 -8
package/package.json
CHANGED
|
@@ -982,9 +982,12 @@ export class FilterService {
|
|
|
982
982
|
|
|
983
983
|
const dayBefore = (() => {
|
|
984
984
|
const d = new Date();
|
|
985
|
-
d.setDate(d.getDate() - numVal);
|
|
986
|
-
|
|
985
|
+
d.setDate(d.getDate() - (numVal));
|
|
986
|
+
|
|
987
|
+
// Format as YYYY-MM-DD in IST
|
|
988
|
+
return d.toLocaleDateString('en-CA', { timeZone: 'Asia/Kolkata' });
|
|
987
989
|
})();
|
|
990
|
+
|
|
988
991
|
|
|
989
992
|
return {
|
|
990
993
|
query: `${dateColumn} <= :${key}`,
|
|
@@ -8,9 +8,7 @@ import { EntityServiceImpl } from 'src/module/meta/service/entity-service-impl.s
|
|
|
8
8
|
import { FORM_STATUS_TO_BE_SENT } from 'src/constant/global.constant';
|
|
9
9
|
import { ConfigService } from '@nestjs/config';
|
|
10
10
|
import axios from 'axios';
|
|
11
|
-
import {
|
|
12
|
-
WorkflowAutomationEngineService,
|
|
13
|
-
} from 'src/module/workflow-automation/service/workflow-automation-engine.service';
|
|
11
|
+
import { WorkflowAutomationEngineService } from 'src/module/workflow-automation/service/workflow-automation-engine.service';
|
|
14
12
|
|
|
15
13
|
@Injectable()
|
|
16
14
|
export class ActionDataRepository extends EntityServiceImpl {
|
|
@@ -38,7 +36,8 @@ export class ActionDataRepository extends EntityServiceImpl {
|
|
|
38
36
|
|
|
39
37
|
if (action.length > 0) {
|
|
40
38
|
for (const act of action) {
|
|
41
|
-
const listMasterItemsRepo =
|
|
39
|
+
const listMasterItemsRepo =
|
|
40
|
+
this.reflectionHelper.getRepoService('ListMasterItems');
|
|
42
41
|
const is_mandatory = await listMasterItemsRepo.findOne({
|
|
43
42
|
where: {
|
|
44
43
|
id: act.action_requirement,
|
|
@@ -103,7 +102,8 @@ export class ActionDataRepository extends EntityServiceImpl {
|
|
|
103
102
|
);
|
|
104
103
|
// THEN INSERT SDFM IN RELATION TASK TABLE
|
|
105
104
|
|
|
106
|
-
const entityRelationRepo =
|
|
105
|
+
const entityRelationRepo =
|
|
106
|
+
this.reflectionHelper.getRepoService('EntityRelation');
|
|
107
107
|
let relationData = await entityRelationRepo.findOne({
|
|
108
108
|
where: {
|
|
109
109
|
source_entity_type: createdEntity.mapped_entity_type,
|
|
@@ -112,7 +112,8 @@ export class ActionDataRepository extends EntityServiceImpl {
|
|
|
112
112
|
});
|
|
113
113
|
|
|
114
114
|
if (relationData) {
|
|
115
|
-
const entityRelationDataRepo =
|
|
115
|
+
const entityRelationDataRepo =
|
|
116
|
+
this.reflectionHelper.getRepoService('EntityRelationData');
|
|
116
117
|
|
|
117
118
|
await entityRelationDataRepo.save({
|
|
118
119
|
organization_id: loggedInUser.organization_id,
|
|
@@ -261,7 +262,8 @@ export class ActionDataRepository extends EntityServiceImpl {
|
|
|
261
262
|
task.is_done = false;
|
|
262
263
|
|
|
263
264
|
// Reset status (optional: set to something like 'pending' if needed)
|
|
264
|
-
const listMasterItemRepo =
|
|
265
|
+
const listMasterItemRepo =
|
|
266
|
+
this.reflectionHelper.getRepoService('ListMasterItems');
|
|
265
267
|
const listMasterItem = await listMasterItemRepo.findOne({
|
|
266
268
|
where: {
|
|
267
269
|
code: 'in_progress',
|
|
@@ -313,7 +315,7 @@ export class ActionDataRepository extends EntityServiceImpl {
|
|
|
313
315
|
console.error('Internal Entity API call failed:', error.message);
|
|
314
316
|
}
|
|
315
317
|
|
|
316
|
-
const org_slug = organizationData
|
|
318
|
+
const org_slug = organizationData?.slug;
|
|
317
319
|
|
|
318
320
|
// fetch required var from config or env
|
|
319
321
|
const profile = this.configService.get('PROFILE');
|
|
@@ -189,7 +189,7 @@ export class StageMovementRepository {
|
|
|
189
189
|
const actionRepo = this.reflectionHelper.getRepoService('ActionEntity');
|
|
190
190
|
const result = await actionRepo
|
|
191
191
|
.createQueryBuilder('a')
|
|
192
|
-
.
|
|
192
|
+
.innerJoin(
|
|
193
193
|
'frm_wf_stage_action_mapping',
|
|
194
194
|
'm',
|
|
195
195
|
'a.id = m.action_id::bigint',
|
|
@@ -199,12 +199,18 @@ export class StageMovementRepository {
|
|
|
199
199
|
'ac',
|
|
200
200
|
'a.action_category::bigint = ac.id',
|
|
201
201
|
)
|
|
202
|
+
.leftJoin(
|
|
203
|
+
'frm_wf_action_resources_mapping',
|
|
204
|
+
'arm',
|
|
205
|
+
'm.id = arm.stg_act_mapping_id::bigint',
|
|
206
|
+
)
|
|
202
207
|
.where('m.stage_id::bigint = :stageId', { stageId: Number(stageId) })
|
|
203
208
|
.select([
|
|
204
|
-
'a.*',
|
|
209
|
+
'a.*',
|
|
205
210
|
'm.id AS mapping_id',
|
|
206
211
|
'm.stage_id AS stage_id',
|
|
207
212
|
'ac.code AS action_category_code',
|
|
213
|
+
'arm.form_id AS form_id',
|
|
208
214
|
])
|
|
209
215
|
.orderBy('a.sequence', 'ASC')
|
|
210
216
|
.getRawMany();
|
|
@@ -116,16 +116,25 @@ export class ActionTemplateMappingService extends EntityServiceImpl {
|
|
|
116
116
|
'ct.name AS label',
|
|
117
117
|
'ct.id AS id',
|
|
118
118
|
])
|
|
119
|
+
.innerJoin(
|
|
120
|
+
'frm_list_master_items',
|
|
121
|
+
'fmi',
|
|
122
|
+
`fmi.id = ct.status::bigint
|
|
123
|
+
AND fmi.code = 'STATUS_ACTIVE'
|
|
124
|
+
AND fmi.organization_id::text = :orgId`,
|
|
125
|
+
{ orgId: String(loggedInUser.organization_id) }
|
|
126
|
+
)
|
|
119
127
|
.where('ct.code IN (:...codes)', { codes: templateCodes })
|
|
120
128
|
.andWhere('ct.mode::text = :mode', { mode: String(mode) })
|
|
121
|
-
.andWhere('ct.organization_id = :orgId', {
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
.andWhere(
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
+
.andWhere('ct.organization_id::text = :orgId', {
|
|
130
|
+
orgId: String(loggedInUser.organization_id),
|
|
131
|
+
})
|
|
132
|
+
.andWhere('ct.level_type = :levelType', {
|
|
133
|
+
levelType: loggedInUser.level_type,
|
|
134
|
+
})
|
|
135
|
+
.andWhere('ct.level_id::text = :levelId', {
|
|
136
|
+
levelId: String(loggedInUser.level_id),
|
|
137
|
+
})
|
|
129
138
|
.getRawMany();
|
|
130
139
|
}
|
|
131
140
|
}
|