rez_core 3.1.210 → 4.0.1
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/dashboard/entity/dashboard_page_data.entity.js +1 -1
- package/dist/module/dashboard/entity/dashboard_page_data.entity.js.map +1 -1
- package/dist/module/dashboard/entity/widget_master.entity.js +1 -1
- package/dist/module/dashboard/entity/widget_master.entity.js.map +1 -1
- package/dist/module/dashboard/repository/dashboard.repository.js +1 -1
- package/dist/module/dashboard/repository/dashboard.repository.js.map +1 -1
- package/dist/module/enterprise/repository/school.repository.js +5 -5
- package/dist/module/enterprise/repository/school.repository.js.map +1 -1
- package/dist/module/filter/entity/saved-filter-detail.entity.js +1 -1
- package/dist/module/filter/entity/saved-filter-detail.entity.js.map +1 -1
- package/dist/module/filter/entity/saved-filter-master.entity.js +1 -1
- package/dist/module/filter/entity/saved-filter-master.entity.js.map +1 -1
- package/dist/module/filter/repository/saved-filter.repository.js +1 -1
- package/dist/module/filter/service/filter-evaluator.service.js +1 -1
- package/dist/module/filter/service/filter.service.js +7 -1
- package/dist/module/filter/service/filter.service.js.map +1 -1
- package/dist/module/integration/entity/integration-config.entity.js +1 -1
- package/dist/module/integration/entity/integration-config.entity.js.map +1 -1
- package/dist/module/integration/entity/integration-entity-mapper.entity.js +1 -1
- package/dist/module/integration/entity/integration-entity-mapper.entity.js.map +1 -1
- package/dist/module/integration/entity/integration-source.entity.js +1 -1
- package/dist/module/integration/entity/integration-source.entity.js.map +1 -1
- package/dist/module/integration/entity/user-integration.entity.js +1 -1
- package/dist/module/integration/entity/user-integration.entity.js.map +1 -1
- package/dist/module/integration/service/integration.service.js +1 -1
- package/dist/module/integration/service/integration.service.js.map +1 -1
- package/dist/module/integration/service/wrapper.service.js +8 -8
- package/dist/module/integration/service/wrapper.service.js.map +1 -1
- package/dist/module/layout_preference/entity/layout_preference.entity.js +1 -1
- package/dist/module/layout_preference/entity/layout_preference.entity.js.map +1 -1
- package/dist/module/listmaster/entity/list-master-items.entity.js +1 -1
- package/dist/module/listmaster/entity/list-master-items.entity.js.map +1 -1
- package/dist/module/listmaster/entity/list-master.entity.js +1 -1
- package/dist/module/listmaster/entity/list-master.entity.js.map +1 -1
- package/dist/module/listmaster/service/list-master-item.service.js +1 -1
- package/dist/module/listmaster/service/list-master.service.js +4 -5
- package/dist/module/listmaster/service/list-master.service.js.map +1 -1
- package/dist/module/mapper/entity/field-lovs.entity.js +1 -1
- package/dist/module/mapper/entity/field-lovs.entity.js.map +1 -1
- package/dist/module/mapper/entity/field-mapper.entity.js +1 -1
- package/dist/module/mapper/entity/field-mapper.entity.js.map +1 -1
- package/dist/module/mapper/entity/mapper.entity.js +1 -1
- package/dist/module/mapper/entity/mapper.entity.js.map +1 -1
- package/dist/module/mapper/service/field-mapper.service.js +1 -1
- package/dist/module/mapper/service/mapper.service.js +2 -2
- package/dist/module/mapper/service/mapper.service.js.map +1 -1
- package/dist/module/master/service/master.service.js +8 -8
- package/dist/module/master/service/master.service.js.map +1 -1
- package/dist/module/meta/entity/attribute-master.entity.js +1 -1
- package/dist/module/meta/entity/attribute-master.entity.js.map +1 -1
- package/dist/module/meta/entity/entity-master.entity.js +1 -1
- package/dist/module/meta/entity/entity-master.entity.js.map +1 -1
- package/dist/module/meta/entity/entity-relation-data.entity.js +1 -1
- package/dist/module/meta/entity/entity-relation-data.entity.js.map +1 -1
- package/dist/module/meta/entity/entity-relation.entity.js +1 -1
- package/dist/module/meta/entity/entity-relation.entity.js.map +1 -1
- package/dist/module/meta/entity/entity-table-column.entity.js +1 -1
- package/dist/module/meta/entity/entity-table-column.entity.js.map +1 -1
- package/dist/module/meta/entity/entity-table.entity.js +1 -1
- package/dist/module/meta/entity/entity-table.entity.js.map +1 -1
- package/dist/module/meta/entity/media-data.entity.js +1 -1
- package/dist/module/meta/entity/media-data.entity.js.map +1 -1
- package/dist/module/meta/entity/preference.entity.js +1 -1
- package/dist/module/meta/entity/preference.entity.js.map +1 -1
- package/dist/module/meta/entity/view-master.entity.js +1 -1
- package/dist/module/meta/entity/view-master.entity.js.map +1 -1
- package/dist/module/meta/repository/attribute-master.repository.js +1 -1
- package/dist/module/meta/repository/attribute-master.repository.js.map +1 -1
- package/dist/module/meta/repository/entity-master.repository.js +2 -2
- package/dist/module/meta/repository/entity-master.repository.js.map +1 -1
- package/dist/module/meta/service/entity-dynamic.service.js +15 -15
- package/dist/module/meta/service/entity-dynamic.service.js.map +1 -1
- package/dist/module/meta/service/entity-master.service.js +1 -1
- package/dist/module/meta/service/entity-relation.service.js +3 -3
- package/dist/module/meta/service/entity-service-impl.service.js +2 -2
- package/dist/module/meta/service/entity-service-impl.service.js.map +1 -1
- package/dist/module/meta/service/populate-meta.service.js +11 -11
- package/dist/module/meta/service/populate-meta.service.js.map +1 -1
- package/dist/module/meta/service/resolver.service.js +8 -8
- package/dist/module/meta/service/resolver.service.js.map +1 -1
- package/dist/module/notification/entity/notification.entity.js +1 -1
- package/dist/module/notification/entity/notification.entity.js.map +1 -1
- package/dist/module/notification/service/email.service.js +2 -2
- package/dist/module/notification/service/email.service.js.map +1 -1
- package/dist/module/notification/service/notification.service.js +2 -2
- package/dist/module/third-party-module/entity/third-party-api-registry.entity.js +1 -1
- package/dist/module/third-party-module/entity/third-party-api-registry.entity.js.map +1 -1
- package/dist/module/workflow/entity/action-category.entity.js +1 -1
- package/dist/module/workflow/entity/action-category.entity.js.map +1 -1
- package/dist/module/workflow/entity/action-data.entity.js +1 -1
- package/dist/module/workflow/entity/action-data.entity.js.map +1 -1
- package/dist/module/workflow/entity/action-resources-mapping.entity.js +1 -1
- package/dist/module/workflow/entity/action-resources-mapping.entity.js.map +1 -1
- package/dist/module/workflow/entity/action-template-mapping.entity.js +1 -1
- package/dist/module/workflow/entity/action-template-mapping.entity.js.map +1 -1
- package/dist/module/workflow/entity/action.entity.js +1 -1
- package/dist/module/workflow/entity/action.entity.js.map +1 -1
- package/dist/module/workflow/entity/activity-log.entity.js +1 -1
- package/dist/module/workflow/entity/activity-log.entity.js.map +1 -1
- package/dist/module/workflow/entity/comm-template.entity.js +1 -1
- package/dist/module/workflow/entity/comm-template.entity.js.map +1 -1
- package/dist/module/workflow/entity/entity-modification.entity.js +1 -1
- package/dist/module/workflow/entity/entity-modification.entity.js.map +1 -1
- package/dist/module/workflow/entity/form.entity.js +1 -1
- package/dist/module/workflow/entity/form.entity.js.map +1 -1
- package/dist/module/workflow/entity/stage-action-mapping.entity.js +1 -1
- package/dist/module/workflow/entity/stage-action-mapping.entity.js.map +1 -1
- package/dist/module/workflow/entity/stage-group.entity.js +1 -1
- package/dist/module/workflow/entity/stage-group.entity.js.map +1 -1
- package/dist/module/workflow/entity/stage-movement-data.entity.js +1 -1
- package/dist/module/workflow/entity/stage-movement-data.entity.js.map +1 -1
- package/dist/module/workflow/entity/stage.entity.js +1 -1
- package/dist/module/workflow/entity/stage.entity.js.map +1 -1
- package/dist/module/workflow/entity/task-data.entity.js +1 -1
- package/dist/module/workflow/entity/task-data.entity.js.map +1 -1
- package/dist/module/workflow/entity/template-attach-mapper.entity.js +1 -1
- package/dist/module/workflow/entity/template-attach-mapper.entity.js.map +1 -1
- package/dist/module/workflow/entity/workflow-data.entity.js +1 -1
- package/dist/module/workflow/entity/workflow-data.entity.js.map +1 -1
- package/dist/module/workflow/entity/workflow-level-mapping.entity.js +1 -1
- package/dist/module/workflow/entity/workflow-level-mapping.entity.js.map +1 -1
- package/dist/module/workflow/entity/workflow.entity.js +1 -1
- package/dist/module/workflow/entity/workflow.entity.js.map +1 -1
- package/dist/module/workflow/repository/action-data.repository.js +4 -4
- package/dist/module/workflow/repository/action-data.repository.js.map +1 -1
- package/dist/module/workflow/repository/action.repository.js +14 -14
- package/dist/module/workflow/repository/action.repository.js.map +1 -1
- package/dist/module/workflow/repository/comm-template.repository.js +2 -2
- package/dist/module/workflow/repository/form-master.repository.js +2 -2
- package/dist/module/workflow/repository/form-master.repository.js.map +1 -1
- package/dist/module/workflow/repository/stage-group.repository.js +6 -6
- package/dist/module/workflow/repository/stage-group.repository.js.map +1 -1
- package/dist/module/workflow/repository/stage-movement.repository.js +6 -6
- package/dist/module/workflow/repository/stage-movement.repository.js.map +1 -1
- package/dist/module/workflow/repository/stage.repository.js +6 -6
- package/dist/module/workflow/repository/stage.repository.js.map +1 -1
- package/dist/module/workflow/repository/task.repository.js +3 -3
- package/dist/module/workflow/repository/task.repository.js.map +1 -1
- package/dist/module/workflow/service/action-template-mapping.service.js +4 -4
- package/dist/module/workflow/service/action-template-mapping.service.js.map +1 -1
- package/dist/module/workflow/service/action.service.js +9 -9
- package/dist/module/workflow/service/action.service.js.map +1 -1
- package/dist/module/workflow/service/entity-modification.service.js +2 -2
- package/dist/module/workflow/service/entity-modification.service.js.map +1 -1
- package/dist/module/workflow/service/populate-workflow.service.js +14 -14
- package/dist/module/workflow/service/populate-workflow.service.js.map +1 -1
- package/dist/module/workflow/service/stage-group.service.js +3 -3
- package/dist/module/workflow/service/stage-group.service.js.map +1 -1
- package/dist/module/workflow/service/stage.service.js +3 -3
- package/dist/module/workflow/service/stage.service.js.map +1 -1
- package/dist/module/workflow/service/task.service.js +11 -11
- package/dist/module/workflow/service/task.service.js.map +1 -1
- package/dist/module/workflow/service/workflow-list-master.service.js +5 -5
- package/dist/module/workflow/service/workflow-list-master.service.js.map +1 -1
- package/dist/module/workflow/service/workflow-meta.service.js +10 -10
- package/dist/module/workflow/service/workflow-meta.service.js.map +1 -1
- package/dist/module/workflow/service/workflow.service.js +3 -3
- package/dist/module/workflow/service/workflow.service.js.map +1 -1
- package/dist/module/workflow-automation/entity/workflow-automation-action.entity.js +1 -1
- package/dist/module/workflow-automation/entity/workflow-automation-action.entity.js.map +1 -1
- package/dist/module/workflow-automation/entity/workflow-automation.entity.js +1 -1
- package/dist/module/workflow-automation/entity/workflow-automation.entity.js.map +1 -1
- package/dist/module/workflow-automation/service/workflow-automation-engine.service.js +1 -1
- package/dist/module/workflow-automation/service/workflow-automation-engine.service.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/docs/modules/event-driven-integration-design.md +1 -1
- package/docs/modules/integration.md +4 -4
- package/package.json +1 -1
- package/src/module/dashboard/entity/dashboard_page_data.entity.ts +1 -1
- package/src/module/dashboard/entity/widget_master.entity.ts +1 -1
- package/src/module/dashboard/repository/dashboard.repository.ts +1 -1
- package/src/module/enterprise/repository/school.repository.ts +5 -5
- package/src/module/filter/entity/saved-filter-detail.entity.ts +1 -1
- package/src/module/filter/entity/saved-filter-master.entity.ts +1 -1
- package/src/module/filter/repository/saved-filter.repository.ts +1 -1
- package/src/module/filter/service/filter-evaluator.service.ts +1 -1
- package/src/module/filter/service/filter.service.ts +9 -1
- package/src/module/integration/entity/integration-config.entity.ts +1 -1
- package/src/module/integration/entity/integration-entity-mapper.entity.ts +1 -1
- package/src/module/integration/entity/integration-source.entity.ts +1 -1
- package/src/module/integration/entity/user-integration.entity.ts +1 -1
- package/src/module/integration/service/integration.service.ts +1 -1
- package/src/module/integration/service/wrapper.service.ts +8 -8
- package/src/module/layout_preference/entity/layout_preference.entity.ts +1 -1
- package/src/module/listmaster/entity/list-master-items.entity.ts +1 -1
- package/src/module/listmaster/entity/list-master.entity.ts +1 -1
- package/src/module/listmaster/service/list-master-item.service.ts +1 -1
- package/src/module/listmaster/service/list-master.service.ts +26 -24
- package/src/module/mapper/entity/field-lovs.entity.ts +1 -1
- package/src/module/mapper/entity/field-mapper.entity.ts +1 -1
- package/src/module/mapper/entity/mapper.entity.ts +1 -1
- package/src/module/mapper/service/field-mapper.service.ts +1 -1
- package/src/module/mapper/service/mapper.service.ts +2 -2
- package/src/module/master/service/master.service.ts +15 -15
- package/src/module/meta/entity/attribute-master.entity.ts +1 -1
- package/src/module/meta/entity/entity-master.entity.ts +1 -1
- package/src/module/meta/entity/entity-relation-data.entity.ts +1 -1
- package/src/module/meta/entity/entity-relation.entity.ts +1 -1
- package/src/module/meta/entity/entity-table-column.entity.ts +1 -1
- package/src/module/meta/entity/entity-table.entity.ts +1 -1
- package/src/module/meta/entity/media-data.entity.ts +1 -1
- package/src/module/meta/entity/preference.entity.ts +1 -1
- package/src/module/meta/entity/view-master.entity.ts +1 -1
- package/src/module/meta/repository/attribute-master.repository.ts +1 -1
- package/src/module/meta/repository/entity-master.repository.ts +2 -2
- package/src/module/meta/service/entity-dynamic.service.ts +15 -15
- package/src/module/meta/service/entity-master.service.ts +1 -1
- package/src/module/meta/service/entity-relation.service.ts +3 -3
- package/src/module/meta/service/entity-service-impl.service.ts +2 -2
- package/src/module/meta/service/populate-meta.service.ts +14 -14
- package/src/module/meta/service/resolver.service.ts +8 -8
- package/src/module/notification/entity/notification.entity.ts +1 -1
- package/src/module/notification/service/email.service.ts +3 -3
- package/src/module/notification/service/notification.service.ts +2 -2
- package/src/module/third-party-module/entity/third-party-api-registry.entity.ts +1 -1
- package/src/module/workflow/entity/action-category.entity.ts +1 -1
- package/src/module/workflow/entity/action-data.entity.ts +1 -1
- package/src/module/workflow/entity/action-resources-mapping.entity.ts +1 -1
- package/src/module/workflow/entity/action-template-mapping.entity.ts +1 -1
- package/src/module/workflow/entity/action.entity.ts +1 -1
- package/src/module/workflow/entity/activity-log.entity.ts +1 -1
- package/src/module/workflow/entity/comm-template.entity.ts +1 -1
- package/src/module/workflow/entity/entity-modification.entity.ts +1 -1
- package/src/module/workflow/entity/form.entity.ts +1 -1
- package/src/module/workflow/entity/stage-action-mapping.entity.ts +1 -1
- package/src/module/workflow/entity/stage-group.entity.ts +1 -1
- package/src/module/workflow/entity/stage-movement-data.entity.ts +1 -1
- package/src/module/workflow/entity/stage.entity.ts +1 -1
- package/src/module/workflow/entity/task-data.entity.ts +1 -1
- package/src/module/workflow/entity/template-attach-mapper.entity.ts +1 -1
- package/src/module/workflow/entity/workflow-data.entity.ts +1 -1
- package/src/module/workflow/entity/workflow-level-mapping.entity.ts +1 -1
- package/src/module/workflow/entity/workflow.entity.ts +1 -1
- package/src/module/workflow/repository/action-data.repository.ts +4 -4
- package/src/module/workflow/repository/action.repository.ts +15 -15
- package/src/module/workflow/repository/comm-template.repository.ts +2 -2
- package/src/module/workflow/repository/form-master.repository.ts +2 -2
- package/src/module/workflow/repository/stage-group.repository.ts +6 -6
- package/src/module/workflow/repository/stage-movement.repository.ts +6 -6
- package/src/module/workflow/repository/stage.repository.ts +8 -8
- package/src/module/workflow/repository/task.repository.ts +3 -3
- package/src/module/workflow/service/action-template-mapping.service.ts +4 -4
- package/src/module/workflow/service/action.service.ts +9 -9
- package/src/module/workflow/service/entity-modification.service.ts +3 -3
- package/src/module/workflow/service/populate-workflow.service.ts +20 -20
- package/src/module/workflow/service/stage-group.service.ts +3 -3
- package/src/module/workflow/service/stage.service.ts +3 -3
- package/src/module/workflow/service/task.service.ts +12 -12
- package/src/module/workflow/service/workflow-list-master.service.ts +5 -5
- package/src/module/workflow/service/workflow-meta.service.ts +10 -10
- package/src/module/workflow/service/workflow.service.ts +4 -4
- package/src/module/workflow-automation/entity/workflow-automation-action.entity.ts +1 -1
- package/src/module/workflow-automation/entity/workflow-automation.entity.ts +1 -1
- package/src/module/workflow-automation/service/workflow-automation-engine.service.ts +2 -2
|
@@ -33,10 +33,10 @@ export class TaskService extends EntityServiceImpl {
|
|
|
33
33
|
|
|
34
34
|
let toValue: string | null = null;
|
|
35
35
|
|
|
36
|
-
// 2. Get current stage_id from
|
|
36
|
+
// 2. Get current stage_id from frm_wf_stage_movement_data
|
|
37
37
|
const stageRow = await this.dataSource.query(
|
|
38
38
|
`SELECT stage_id
|
|
39
|
-
FROM
|
|
39
|
+
FROM frm_wf_stage_movement_data
|
|
40
40
|
WHERE mapped_entity_id = ?
|
|
41
41
|
AND is_current = 'Y'
|
|
42
42
|
LIMIT 1`,
|
|
@@ -47,7 +47,7 @@ export class TaskService extends EntityServiceImpl {
|
|
|
47
47
|
|
|
48
48
|
if (!stageId) {
|
|
49
49
|
throw new Error(
|
|
50
|
-
`No current stage found in
|
|
50
|
+
`No current stage found in frm_wf_stage_movement_data for entity_id=${entity.id}`,
|
|
51
51
|
);
|
|
52
52
|
}
|
|
53
53
|
|
|
@@ -121,13 +121,13 @@ export class TaskService extends EntityServiceImpl {
|
|
|
121
121
|
}
|
|
122
122
|
|
|
123
123
|
let relationData = await this.dataSource.query(
|
|
124
|
-
`SELECT * FROM
|
|
124
|
+
`SELECT * FROM frm_entity_relation WHERE source_entity_type = ? AND target_entity_type = ?`,
|
|
125
125
|
[createdEntity.mapped_entity_type, createdEntity.entity_type],
|
|
126
126
|
);
|
|
127
127
|
|
|
128
128
|
if (relationData) {
|
|
129
129
|
await this.dataSource.query(
|
|
130
|
-
`INSERT INTO
|
|
130
|
+
`INSERT INTO frm_entity_relation_data (organization_id, source_entity_id, source_entity_type, target_entity_id, target_entity_type, relation_type) VALUES (?, ?, ?, ?, ? , ?)`,
|
|
131
131
|
[
|
|
132
132
|
loggedInUser.organization_id,
|
|
133
133
|
createdEntity.mapped_entity_id,
|
|
@@ -149,7 +149,7 @@ export class TaskService extends EntityServiceImpl {
|
|
|
149
149
|
): Promise<any> {
|
|
150
150
|
const taskStatusQuery = `
|
|
151
151
|
SELECT name
|
|
152
|
-
FROM
|
|
152
|
+
FROM frm_list_master_items
|
|
153
153
|
WHERE id = ?
|
|
154
154
|
AND organization_id = ?
|
|
155
155
|
AND listtype = 'TKST'
|
|
@@ -297,10 +297,10 @@ export class TaskService extends EntityServiceImpl {
|
|
|
297
297
|
sg.name AS stage_group_name,
|
|
298
298
|
s.name AS stage_name,
|
|
299
299
|
a.name AS action_name
|
|
300
|
-
FROM
|
|
301
|
-
LEFT JOIN
|
|
302
|
-
LEFT JOIN
|
|
303
|
-
LEFT JOIN
|
|
300
|
+
FROM frm_wf_task_data t
|
|
301
|
+
LEFT JOIN frm_wf_stage s ON t.stage_id = s.id
|
|
302
|
+
LEFT JOIN frm_wf_stage_group sg ON s.stage_group_id = sg.id
|
|
303
|
+
LEFT JOIN frm_wf_action a ON t.action_id = a.id
|
|
304
304
|
WHERE ${whereClauses.join(' AND ')}
|
|
305
305
|
ORDER BY t.created_date DESC
|
|
306
306
|
`;
|
|
@@ -346,7 +346,7 @@ export class TaskService extends EntityServiceImpl {
|
|
|
346
346
|
// Fetch all TKST statuses in a single query
|
|
347
347
|
const taskStatusQuery = `
|
|
348
348
|
SELECT id, name
|
|
349
|
-
FROM
|
|
349
|
+
FROM frm_list_master_items
|
|
350
350
|
WHERE organization_id = ?
|
|
351
351
|
AND listtype = 'TKST'
|
|
352
352
|
`;
|
|
@@ -540,7 +540,7 @@ export class TaskService extends EntityServiceImpl {
|
|
|
540
540
|
if (!entity || !entity.mapped_entity_id || !entity.reason_code) return null;
|
|
541
541
|
|
|
542
542
|
const [reason] = await this.dataSource.query(
|
|
543
|
-
`SELECT name FROM
|
|
543
|
+
`SELECT name FROM frm_list_master_items WHERE id = ? AND organization_id = ?`,
|
|
544
544
|
[entity.reason_code, loggedInUser.organization_id],
|
|
545
545
|
);
|
|
546
546
|
|
|
@@ -16,9 +16,9 @@ export class WorkflowListMasterService extends EntityServiceImpl {
|
|
|
16
16
|
ac.logo AS logo,
|
|
17
17
|
ac.modalName AS modalName,
|
|
18
18
|
a.action_requirement AS actionRequirement
|
|
19
|
-
FROM
|
|
20
|
-
JOIN
|
|
21
|
-
JOIN
|
|
19
|
+
FROM frm_wf_stage_action_mapping sam
|
|
20
|
+
JOIN frm_wf_action a ON sam.action_id = a.id
|
|
21
|
+
JOIN frm_wf_action_category ac ON a.action_category = ac.id
|
|
22
22
|
WHERE sam.stage_id = ?
|
|
23
23
|
`,
|
|
24
24
|
[stageId],
|
|
@@ -36,7 +36,7 @@ export class WorkflowListMasterService extends EntityServiceImpl {
|
|
|
36
36
|
|
|
37
37
|
async getStagesByGroup(stageGroupId: number): Promise<any[]> {
|
|
38
38
|
const results = await this.dataSource.query(
|
|
39
|
-
`SELECT id, full_name FROM
|
|
39
|
+
`SELECT id, full_name FROM frm_wf_stage WHERE stage_group_id = ?`,
|
|
40
40
|
[stageGroupId],
|
|
41
41
|
);
|
|
42
42
|
return results;
|
|
@@ -48,7 +48,7 @@ export class WorkflowListMasterService extends EntityServiceImpl {
|
|
|
48
48
|
const modes = await this.dataSource.query(
|
|
49
49
|
`
|
|
50
50
|
SELECT id, name
|
|
51
|
-
FROM
|
|
51
|
+
FROM frm_list_master_items
|
|
52
52
|
WHERE listtype = 'MOD'
|
|
53
53
|
AND organization_id = ?
|
|
54
54
|
`,
|
|
@@ -76,7 +76,7 @@ export class WorkflowMetaService extends EntityServiceImpl {
|
|
|
76
76
|
if (!latestMovement) return null;
|
|
77
77
|
|
|
78
78
|
const getGroupName = await this.dataSource.query(
|
|
79
|
-
`SELECT name FROM
|
|
79
|
+
`SELECT name FROM frm_wf_stage_group WHERE id = ${latestMovement?.stage_group_id}`,
|
|
80
80
|
);
|
|
81
81
|
|
|
82
82
|
return {
|
|
@@ -87,7 +87,7 @@ export class WorkflowMetaService extends EntityServiceImpl {
|
|
|
87
87
|
|
|
88
88
|
// get group name for the current stage
|
|
89
89
|
const getGroupName = await this.dataSource.query(
|
|
90
|
-
`SELECT name FROM
|
|
90
|
+
`SELECT name FROM frm_wf_stage_group WHERE id = ${currentStage?.stage_group_id}`,
|
|
91
91
|
);
|
|
92
92
|
|
|
93
93
|
// Return the found or newly created current stage movement
|
|
@@ -114,7 +114,7 @@ export class WorkflowMetaService extends EntityServiceImpl {
|
|
|
114
114
|
}
|
|
115
115
|
|
|
116
116
|
const groupName = await this.dataSource.query(
|
|
117
|
-
`SELECT name FROM
|
|
117
|
+
`SELECT name FROM frm_wf_stage_group WHERE id = ${nextStage?.stage_group_id}`,
|
|
118
118
|
);
|
|
119
119
|
|
|
120
120
|
return {
|
|
@@ -293,11 +293,11 @@ export class WorkflowMetaService extends EntityServiceImpl {
|
|
|
293
293
|
// check whether first action's action_category is owner_assignment and assignment_type is AUTO_ASSIGN
|
|
294
294
|
const firstAction = actions[0];
|
|
295
295
|
const actionCategory = await this.dataSource.query(
|
|
296
|
-
`SELECT code FROM
|
|
296
|
+
`SELECT code FROM frm_wf_action_category WHERE id = ${Number(firstAction.action_category)}`,
|
|
297
297
|
);
|
|
298
298
|
|
|
299
299
|
const assignmentType = await this.dataSource.query(
|
|
300
|
-
`SELECT value FROM
|
|
300
|
+
`SELECT value FROM frm_list_master_items WHERE id = ${Number(firstAction.assignment_type)}`,
|
|
301
301
|
);
|
|
302
302
|
|
|
303
303
|
// save in action data
|
|
@@ -364,7 +364,7 @@ export class WorkflowMetaService extends EntityServiceImpl {
|
|
|
364
364
|
|
|
365
365
|
const unassignedListMasterItemData = await this.dataSource.query(
|
|
366
366
|
`SELECT name, id
|
|
367
|
-
FROM
|
|
367
|
+
FROM frm_list_master_items
|
|
368
368
|
WHERE listtype = "LEST" AND organization_id = ?
|
|
369
369
|
AND value IN (?, ?)`,
|
|
370
370
|
[loggedInUser.organization_id, 'unassigned', 'active'],
|
|
@@ -394,7 +394,7 @@ export class WorkflowMetaService extends EntityServiceImpl {
|
|
|
394
394
|
);
|
|
395
395
|
|
|
396
396
|
await this.dataSource.query(
|
|
397
|
-
`UPDATE
|
|
397
|
+
`UPDATE frm_wf_action_data SET user_id =?
|
|
398
398
|
WHERE mapped_entity_id=?
|
|
399
399
|
AND mapped_entity_type = ?
|
|
400
400
|
AND stage_id = ?
|
|
@@ -414,7 +414,7 @@ export class WorkflowMetaService extends EntityServiceImpl {
|
|
|
414
414
|
);
|
|
415
415
|
|
|
416
416
|
const taskRows = await this.dataSource.query(
|
|
417
|
-
`SELECT id,status FROM
|
|
417
|
+
`SELECT id,status FROM frm_wf_task_data
|
|
418
418
|
WHERE mapped_entity_id = ?
|
|
419
419
|
AND mapped_entity_type = ?
|
|
420
420
|
AND stage_id = ?`,
|
|
@@ -423,7 +423,7 @@ export class WorkflowMetaService extends EntityServiceImpl {
|
|
|
423
423
|
|
|
424
424
|
for (const task of taskRows) {
|
|
425
425
|
const statusRows = await this.dataSource.query(
|
|
426
|
-
`SELECT value FROM
|
|
426
|
+
`SELECT value FROM frm_list_master_items
|
|
427
427
|
WHERE id = ? AND organization_id = ?`,
|
|
428
428
|
[task.status, loggedInUser.organization_id],
|
|
429
429
|
);
|
|
@@ -434,7 +434,7 @@ export class WorkflowMetaService extends EntityServiceImpl {
|
|
|
434
434
|
statusName === 'todo'
|
|
435
435
|
) {
|
|
436
436
|
await this.dataSource.query(
|
|
437
|
-
`UPDATE
|
|
437
|
+
`UPDATE frm_wf_task_data SET user_id = ?, task_owner = ? WHERE id = ?`,
|
|
438
438
|
[lead_owner, lead_owner, task.id],
|
|
439
439
|
);
|
|
440
440
|
}
|
|
@@ -40,7 +40,7 @@ export class WorkflowService extends EntityServiceImpl {
|
|
|
40
40
|
|
|
41
41
|
async getWorkflowById(id: number) {
|
|
42
42
|
const result = await this.dataSource.query(
|
|
43
|
-
`SELECT * FROM
|
|
43
|
+
`SELECT * FROM frm_wf_master WHERE id = ?`,
|
|
44
44
|
[id],
|
|
45
45
|
);
|
|
46
46
|
return result[0] || null;
|
|
@@ -105,9 +105,9 @@ export class WorkflowService extends EntityServiceImpl {
|
|
|
105
105
|
)
|
|
106
106
|
.execute();
|
|
107
107
|
|
|
108
|
-
// Update
|
|
108
|
+
// Update frm_wf_level_mapping to point to the new workflow
|
|
109
109
|
await this.dataSource.query(
|
|
110
|
-
`UPDATE
|
|
110
|
+
`UPDATE frm_wf_level_mapping
|
|
111
111
|
SET workflow_id = ?
|
|
112
112
|
WHERE mapped_level_id = ? AND mapped_level_type = ?`,
|
|
113
113
|
[workflowId, level_id, level_type],
|
|
@@ -146,7 +146,7 @@ export class WorkflowService extends EntityServiceImpl {
|
|
|
146
146
|
}
|
|
147
147
|
|
|
148
148
|
const getAllStageGroup = await this.dataSource.query(
|
|
149
|
-
`SELECT id FROM
|
|
149
|
+
`SELECT id FROM frm_wf_stage_group WHERE workflow_id = ? AND level_id = ? AND level_type = ?`,
|
|
150
150
|
[id, loggedInUser.level_id, loggedInUser.level_type],
|
|
151
151
|
);
|
|
152
152
|
|
|
@@ -2,7 +2,7 @@ import { WORKFLOW_AUTOMATION_ACTION } from 'src/constant/global.constant';
|
|
|
2
2
|
import { BaseEntity } from 'src/module/meta/entity/base-entity.entity';
|
|
3
3
|
import { Column, Entity } from 'typeorm';
|
|
4
4
|
|
|
5
|
-
@Entity({ name: '
|
|
5
|
+
@Entity({ name: 'frm_wf_automation_action' })
|
|
6
6
|
export class WorkflowAutomationActionEntity extends BaseEntity {
|
|
7
7
|
constructor() {
|
|
8
8
|
super();
|
|
@@ -2,7 +2,7 @@ import { WORKFLOW_AUTOMATION } from 'src/constant/global.constant';
|
|
|
2
2
|
import { BaseEntity } from 'src/module/meta/entity/base-entity.entity';
|
|
3
3
|
import { Column, Entity } from 'typeorm';
|
|
4
4
|
|
|
5
|
-
@Entity({ name: '
|
|
5
|
+
@Entity({ name: 'frm_wf_automation' })
|
|
6
6
|
export class WorkflowAutomation extends BaseEntity {
|
|
7
7
|
constructor() {
|
|
8
8
|
super();
|
|
@@ -166,7 +166,7 @@ export class WorkflowAutomationEngineService {
|
|
|
166
166
|
try {
|
|
167
167
|
// 2 Resolve action_decorator using action_category_id
|
|
168
168
|
const [category] = await this.dataSource.query(
|
|
169
|
-
`SELECT action_decorator FROM
|
|
169
|
+
`SELECT action_decorator FROM frm_wf_action_category WHERE id = ?`,
|
|
170
170
|
[action.action_category_id],
|
|
171
171
|
);
|
|
172
172
|
|
|
@@ -197,7 +197,7 @@ export class WorkflowAutomationEngineService {
|
|
|
197
197
|
await impl.execute({
|
|
198
198
|
entity,
|
|
199
199
|
user,
|
|
200
|
-
config: action.payload, // from
|
|
200
|
+
config: action.payload, // from frm_wf_action table
|
|
201
201
|
});
|
|
202
202
|
|
|
203
203
|
console.log(
|