rez_core 3.1.146 → 3.1.148
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/module/dashboard/entity/widget_master.entity.js +1 -1
- package/dist/module/dashboard/entity/widget_master.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/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 +20 -4
- 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/mapper.service.js +1 -1
- package/dist/module/master/service/master.service.js +2 -2
- 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/view-master.entity.js +1 -1
- package/dist/module/meta/repository/entity-master.repository.js +1 -1
- package/dist/module/meta/repository/entity-master.repository.js.map +1 -1
- package/dist/module/meta/service/entity-dynamic.service.js +1 -1
- package/dist/module/meta/service/entity-master.service.js +1 -1
- package/dist/module/meta/service/populate-meta.service.js +3 -3
- package/dist/module/meta/service/populate-meta.service.js.map +1 -1
- package/dist/module/meta/service/resolver.service.js +3 -3
- package/dist/module/workflow/controller/form-master.controller.d.ts +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.d.ts +1 -3
- package/dist/module/workflow/repository/action-data.repository.js +2 -6
- package/dist/module/workflow/repository/action-data.repository.js.map +1 -1
- package/dist/module/workflow/repository/form-master.repository.d.ts +3 -7
- package/dist/module/workflow/repository/form-master.repository.js +5 -26
- package/dist/module/workflow/repository/form-master.repository.js.map +1 -1
- package/dist/module/workflow/service/form-master.service.d.ts +1 -1
- package/dist/module/workflow/service/populate-workflow.service.js +3 -3
- package/dist/module/workflow/service/populate-workflow.service.js.map +1 -1
- package/dist/module/workflow/service/workflow.service.js +2 -2
- package/dist/module/workflow/service/workflow.service.js.map +1 -1
- package/dist/module/workflow/workflow.module.js +0 -4
- package/dist/module/workflow/workflow.module.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/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/module/dashboard/entity/widget_master.entity.ts +1 -1
- package/src/module/integration/entity/user-integration.entity.ts +2 -2
- package/src/module/mapper/entity/field-lovs.entity.ts +3 -5
- package/src/module/mapper/entity/field-mapper.entity.ts +22 -7
- package/src/module/mapper/entity/mapper.entity.ts +2 -4
- package/src/module/mapper/service/mapper.service.ts +1 -1
- package/src/module/master/service/master.service.ts +4 -7
- package/src/module/meta/entity/attribute-master.entity.ts +1 -1
- package/src/module/meta/entity/view-master.entity.ts +1 -1
- package/src/module/meta/repository/entity-master.repository.ts +7 -4
- package/src/module/meta/service/entity-dynamic.service.ts +1 -1
- package/src/module/meta/service/entity-master.service.ts +1 -1
- package/src/module/meta/service/populate-meta.service.ts +4 -5
- package/src/module/meta/service/resolver.service.ts +3 -3
- 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 +2 -2
- package/src/module/workflow/repository/form-master.repository.ts +14 -16
- package/src/module/workflow/service/populate-workflow.service.ts +4 -4
- package/src/module/workflow/service/workflow.service.ts +3 -3
- package/src/module/workflow/workflow.module.ts +0 -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/dist/module/workflow/entity/form-master.entity.d.ts +0 -10
- package/dist/module/workflow/entity/form-master.entity.js +0 -50
- package/dist/module/workflow/entity/form-master.entity.js.map +0 -1
- package/src/module/workflow/entity/form-master.entity.ts +0 -27
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BaseEntity } from 'src/module/meta/entity/base-entity.entity';
|
|
2
2
|
import { Column, Entity, PrimaryGeneratedColumn } from 'typeorm';
|
|
3
3
|
|
|
4
|
-
@Entity({ name: '
|
|
4
|
+
@Entity({ name: 'cr_dashboard_widget' })
|
|
5
5
|
export class WidgetMaster extends BaseEntity {
|
|
6
6
|
constructor() {
|
|
7
7
|
super();
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
Index,
|
|
8
8
|
} from 'typeorm';
|
|
9
9
|
|
|
10
|
-
@Entity({ name: '
|
|
10
|
+
@Entity({ name: 'cr_integration_user_mapping' })
|
|
11
11
|
@Index(['user_id', 'integration_config_id'], { unique: true })
|
|
12
12
|
@Index(['integration_config_id'])
|
|
13
13
|
@Index(['user_id'])
|
|
@@ -68,4 +68,4 @@ export class UserIntegration {
|
|
|
68
68
|
type: 'datetime',
|
|
69
69
|
})
|
|
70
70
|
updated_at: Date;
|
|
71
|
-
}
|
|
71
|
+
}
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import { Column, Entity } from 'typeorm';
|
|
2
2
|
import { BaseEntity } from '../../meta/entity/base-entity.entity';
|
|
3
3
|
|
|
4
|
-
@Entity({ name: '
|
|
4
|
+
@Entity({ name: 'cr_mapper_field_lov' })
|
|
5
5
|
export class FieldLovMapper extends BaseEntity {
|
|
6
|
-
|
|
7
6
|
constructor() {
|
|
8
7
|
super();
|
|
9
8
|
this.entity_type = 'FLOV';
|
|
10
9
|
}
|
|
11
10
|
|
|
12
|
-
@Column({ name: 'mapper_field_id'})
|
|
11
|
+
@Column({ name: 'mapper_field_id' })
|
|
13
12
|
mapper_field_id: number; //1
|
|
14
13
|
|
|
15
14
|
@Column({ name: 'destination_attribute_value', type: 'varchar', length: 30 })
|
|
@@ -17,5 +16,4 @@ export class FieldLovMapper extends BaseEntity {
|
|
|
17
16
|
|
|
18
17
|
@Column({ name: 'source_attribute_value', type: 'varchar', length: 30 })
|
|
19
18
|
source_attribute_value: string; //IND
|
|
20
|
-
|
|
21
|
-
}
|
|
19
|
+
}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { Column, Entity } from 'typeorm';
|
|
2
2
|
import { BaseEntity } from '../../meta/entity/base-entity.entity';
|
|
3
3
|
|
|
4
|
-
@Entity({ name: '
|
|
4
|
+
@Entity({ name: 'cr_mapper_field' })
|
|
5
5
|
export class FieldMapper extends BaseEntity {
|
|
6
|
-
|
|
7
6
|
constructor() {
|
|
8
7
|
super();
|
|
9
8
|
this.entity_type = 'FMAP';
|
|
@@ -24,15 +23,31 @@ export class FieldMapper extends BaseEntity {
|
|
|
24
23
|
@Column({ name: 'mapper_entity_type', type: 'varchar', length: 30 })
|
|
25
24
|
mapper_entity_type: string;
|
|
26
25
|
|
|
27
|
-
@Column({
|
|
26
|
+
@Column({
|
|
27
|
+
name: 'mapped_entity_type',
|
|
28
|
+
type: 'varchar',
|
|
29
|
+
length: 30,
|
|
30
|
+
nullable: true,
|
|
31
|
+
})
|
|
28
32
|
mapped_entity_type: string;
|
|
29
33
|
|
|
30
|
-
@Column({
|
|
34
|
+
@Column({
|
|
35
|
+
name: 'filter_code',
|
|
36
|
+
type: 'varchar',
|
|
37
|
+
length: 30,
|
|
38
|
+
default: 'default',
|
|
39
|
+
nullable: true,
|
|
40
|
+
})
|
|
31
41
|
filter_code: string;
|
|
32
42
|
|
|
33
|
-
@Column({
|
|
43
|
+
@Column({
|
|
44
|
+
name: 'is_lov_present',
|
|
45
|
+
type: 'tinyint',
|
|
46
|
+
nullable: true,
|
|
47
|
+
default: 0,
|
|
48
|
+
})
|
|
34
49
|
is_lov_present: number;
|
|
35
50
|
|
|
36
|
-
@Column({name: 'seq', type: 'int', nullable: true})
|
|
51
|
+
@Column({ name: 'seq', type: 'int', nullable: true })
|
|
37
52
|
seq: number;
|
|
38
|
-
}
|
|
53
|
+
}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { Column, Entity } from 'typeorm';
|
|
2
2
|
import { BaseEntity } from '../../meta/entity/base-entity.entity';
|
|
3
3
|
|
|
4
|
-
@Entity({ name: '
|
|
4
|
+
@Entity({ name: 'cr_mapper_master' })
|
|
5
5
|
export class Mapper extends BaseEntity {
|
|
6
|
-
|
|
7
6
|
constructor() {
|
|
8
7
|
super();
|
|
9
8
|
this.entity_type = 'MAP';
|
|
@@ -14,5 +13,4 @@ export class Mapper extends BaseEntity {
|
|
|
14
13
|
|
|
15
14
|
@Column({ nullable: true, type: 'varchar', length: 100 })
|
|
16
15
|
mapped_entity_type: string;
|
|
17
|
-
|
|
18
|
-
}
|
|
16
|
+
}
|
|
@@ -21,7 +21,7 @@ export class MapperService extends EntityServiceImpl {
|
|
|
21
21
|
|
|
22
22
|
const mappers = await this.dataSource.query(
|
|
23
23
|
`SELECT id, name, code, status
|
|
24
|
-
FROM
|
|
24
|
+
FROM cr_mapper_master
|
|
25
25
|
WHERE mapped_entity_type = ? AND (-1 = ? OR name LIKE ? OR code LIKE ?)`,
|
|
26
26
|
[mappedEntityType, filter || -1, `%${filter}%`, `%${filter}%`],
|
|
27
27
|
);
|
|
@@ -23,12 +23,12 @@ export class MasterService {
|
|
|
23
23
|
|
|
24
24
|
// private readonly metaSheets = [
|
|
25
25
|
// 'cr_entity_master',
|
|
26
|
-
// '
|
|
26
|
+
// 'cr_entity_attribute',
|
|
27
27
|
// 'cr_list_master',
|
|
28
28
|
// 'cr_list_master_items',
|
|
29
29
|
// 'cr_entity_table',
|
|
30
30
|
// 'cr_entity_table_column',
|
|
31
|
-
// '
|
|
31
|
+
// 'cr_entity_view',
|
|
32
32
|
// ];
|
|
33
33
|
private readonly sequence = [
|
|
34
34
|
{
|
|
@@ -36,7 +36,7 @@ export class MasterService {
|
|
|
36
36
|
unique_fields: ['id', 'organization_id'],
|
|
37
37
|
},
|
|
38
38
|
{
|
|
39
|
-
table: '
|
|
39
|
+
table: 'cr_entity_attribute',
|
|
40
40
|
unique_fields: ['mapped_entity_type', 'attribute_key', 'organization_id'],
|
|
41
41
|
},
|
|
42
42
|
{
|
|
@@ -61,7 +61,7 @@ export class MasterService {
|
|
|
61
61
|
],
|
|
62
62
|
},
|
|
63
63
|
{
|
|
64
|
-
table: '
|
|
64
|
+
table: 'cr_entity_view',
|
|
65
65
|
unique_fields: ['mapped_entity_type', 'organization_id'],
|
|
66
66
|
},
|
|
67
67
|
{
|
|
@@ -233,12 +233,10 @@ export class MasterService {
|
|
|
233
233
|
.filter((attr) => attr.is_unique)
|
|
234
234
|
.map((attr) => attr.attribute_key);
|
|
235
235
|
|
|
236
|
-
|
|
237
236
|
if (uniqueFields.length === 0) {
|
|
238
237
|
throw new Error(`No unique fields found for entityType: ${entityType}`);
|
|
239
238
|
}
|
|
240
239
|
|
|
241
|
-
|
|
242
240
|
const errors: any[] = [];
|
|
243
241
|
|
|
244
242
|
// ✅ Iterate row by row
|
|
@@ -276,7 +274,6 @@ export class MasterService {
|
|
|
276
274
|
}
|
|
277
275
|
}
|
|
278
276
|
|
|
279
|
-
|
|
280
277
|
for (const attr of attributes) {
|
|
281
278
|
if (attr.data_source_type === 'master' && row[attr.attribute_key]) {
|
|
282
279
|
const refData = await this.entityManager.query(
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BaseEntity } from './base-entity.entity';
|
|
2
2
|
import { Column, Entity } from 'typeorm';
|
|
3
3
|
|
|
4
|
-
@Entity({ name: '
|
|
4
|
+
@Entity({ name: 'cr_entity_attribute' })
|
|
5
5
|
export class AttributeMaster extends BaseEntity {
|
|
6
6
|
@Column({ name: 'mapped_entity_type', type: 'varchar', nullable: true })
|
|
7
7
|
mapped_entity_type: string;
|
|
@@ -2,7 +2,7 @@ import { BaseEntity } from './base-entity.entity';
|
|
|
2
2
|
import { Column, Entity } from 'typeorm';
|
|
3
3
|
import { ENTITYTYPE_VIEWMASTER } from '../../../constant/global.constant';
|
|
4
4
|
|
|
5
|
-
@Entity({ name: '
|
|
5
|
+
@Entity({ name: 'cr_entity_view' })
|
|
6
6
|
export class ViewMaster extends BaseEntity {
|
|
7
7
|
constructor() {
|
|
8
8
|
super();
|
|
@@ -16,9 +16,12 @@ export class EntityMasterRepository {
|
|
|
16
16
|
|
|
17
17
|
async getEntityById(id: number): Promise<EntityMaster | null> {
|
|
18
18
|
let data = await this.entityMasterRepository.findOne({ where: { id } });
|
|
19
|
-
if(data){
|
|
20
|
-
let listMasterData = await this.entityMasterRepository.query(
|
|
21
|
-
|
|
19
|
+
if (data) {
|
|
20
|
+
let listMasterData = await this.entityMasterRepository.query(
|
|
21
|
+
`SELECT * FROM cr_list_master_items where id = ?`,
|
|
22
|
+
[data?.status],
|
|
23
|
+
);
|
|
24
|
+
data.status = listMasterData?.[0].name;
|
|
22
25
|
}
|
|
23
26
|
return data;
|
|
24
27
|
}
|
|
@@ -52,7 +55,7 @@ export class EntityMasterRepository {
|
|
|
52
55
|
const organization_id = loggedInUser.organization_id;
|
|
53
56
|
|
|
54
57
|
const attributes = await this.dataSource.query(
|
|
55
|
-
`SELECT * FROM
|
|
58
|
+
`SELECT * FROM cr_entity_attribute WHERE mapped_entity_type = ? AND data_type = 'DATE' AND organization_id = ?`,
|
|
56
59
|
[entity_type, organization_id],
|
|
57
60
|
);
|
|
58
61
|
|
|
@@ -626,7 +626,7 @@ export class EntityDynamicService {
|
|
|
626
626
|
MAX(db_datatype) AS db_datatype,
|
|
627
627
|
MAX(element_type) AS element_type,
|
|
628
628
|
MAX(is_hidden) AS is_hidden
|
|
629
|
-
FROM
|
|
629
|
+
FROM cr_entity_attribute
|
|
630
630
|
WHERE mapped_entity_type = ? AND organization_id = ?
|
|
631
631
|
and (is_hidden IS NULL OR is_hidden = 0) -- Exclude hidden attributes
|
|
632
632
|
GROUP BY attribute_key`,
|
|
@@ -85,7 +85,7 @@ export class EntityMasterService {
|
|
|
85
85
|
// Step 2: Get attribute_master (instead of entity_table_column)
|
|
86
86
|
const attributes = await this.dataSource.query(
|
|
87
87
|
`SELECT *
|
|
88
|
-
FROM
|
|
88
|
+
FROM cr_entity_attribute
|
|
89
89
|
WHERE mapped_entity_type = ?
|
|
90
90
|
AND organization_id = ? `,
|
|
91
91
|
[entityMasterData.mapped_entity_type, loggedInUser.organization_id],
|
|
@@ -13,7 +13,7 @@ export class PopulateMetaService {
|
|
|
13
13
|
// // Define metadata tables
|
|
14
14
|
// const metadataTables = [
|
|
15
15
|
// 'cr_entity_master',
|
|
16
|
-
// '
|
|
16
|
+
// 'cr_entity_attribute',
|
|
17
17
|
// 'cr_entity_table',
|
|
18
18
|
// ];
|
|
19
19
|
|
|
@@ -54,8 +54,8 @@ export class PopulateMetaService {
|
|
|
54
54
|
async populateMetaData(organization_id: number) {
|
|
55
55
|
const metadataTables = [
|
|
56
56
|
'cr_entity_master',
|
|
57
|
-
'
|
|
58
|
-
'
|
|
57
|
+
'cr_entity_attribute',
|
|
58
|
+
'cr_entity_view',
|
|
59
59
|
'cr_entity_relation',
|
|
60
60
|
];
|
|
61
61
|
const entityTypeToNewIdMap = new Map<string, number>();
|
|
@@ -86,8 +86,7 @@ export class PopulateMetaService {
|
|
|
86
86
|
status: status,
|
|
87
87
|
}),
|
|
88
88
|
);
|
|
89
|
-
}
|
|
90
|
-
else if (table === 'cr_attribute_master') {
|
|
89
|
+
} else if (table === 'cr_entity_attribute') {
|
|
91
90
|
transformedData = factoryData.map(
|
|
92
91
|
({ id, created_date, modified_date, ...rest }) => ({
|
|
93
92
|
...rest,
|
|
@@ -13,7 +13,7 @@ export class ResolverService {
|
|
|
13
13
|
entityType: string,
|
|
14
14
|
): Promise<any> {
|
|
15
15
|
const attributeItems = await this.dataSource.query(
|
|
16
|
-
`SELECT * FROM
|
|
16
|
+
`SELECT * FROM cr_entity_attribute WHERE mapped_entity_type = ? AND organization_id = ?`,
|
|
17
17
|
[entityType, loggedInUser.organization_id],
|
|
18
18
|
);
|
|
19
19
|
|
|
@@ -133,7 +133,7 @@ export class ResolverService {
|
|
|
133
133
|
|
|
134
134
|
// fetch attribute meta only for the given attributeKey
|
|
135
135
|
const [attr] = await this.dataSource.query(
|
|
136
|
-
`SELECT * FROM
|
|
136
|
+
`SELECT * FROM cr_entity_attribute WHERE mapped_entity_type = ? AND organization_id = ? AND attribute_key = ?`,
|
|
137
137
|
[entityType, loggedInUser.organization_id, attrKey],
|
|
138
138
|
);
|
|
139
139
|
|
|
@@ -223,7 +223,7 @@ export class ResolverService {
|
|
|
223
223
|
|
|
224
224
|
// fetch attribute meta
|
|
225
225
|
const [attr] = await this.dataSource.query(
|
|
226
|
-
`SELECT * FROM
|
|
226
|
+
`SELECT * FROM cr_entity_attribute
|
|
227
227
|
WHERE mapped_entity_type = ? AND organization_id = ? AND attribute_key = ?`,
|
|
228
228
|
[entityType, loggedInUser.organization_id, attrKey],
|
|
229
229
|
);
|
|
@@ -2,7 +2,7 @@ import { WORKFLOW_DATA } from 'src/constant/global.constant';
|
|
|
2
2
|
import { BaseEntity } from 'src/module/meta/entity/base-entity.entity';
|
|
3
3
|
import { Entity } from 'typeorm';
|
|
4
4
|
|
|
5
|
-
@Entity({ name: '
|
|
5
|
+
@Entity({ name: 'cr_wf_master_data' })
|
|
6
6
|
export class WorkFlowData extends BaseEntity {
|
|
7
7
|
constructor() {
|
|
8
8
|
super();
|
|
@@ -2,7 +2,7 @@ import { WORKFLOW } 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: 'cr_wf_master' })
|
|
6
6
|
export class Workflow extends BaseEntity {
|
|
7
7
|
constructor() {
|
|
8
8
|
super();
|
|
@@ -14,8 +14,8 @@ export class ActionDataRepository extends EntityServiceImpl {
|
|
|
14
14
|
@InjectRepository(ActionDataEntity)
|
|
15
15
|
private readonly actionDataRepo: Repository<ActionDataEntity>,
|
|
16
16
|
private readonly dataSource: DataSource,
|
|
17
|
-
@InjectRepository(FormDataEntity)
|
|
18
|
-
private readonly formRepo: Repository<FormDataEntity>,
|
|
17
|
+
// @InjectRepository(FormDataEntity)
|
|
18
|
+
// private readonly formRepo: Repository<FormDataEntity>,
|
|
19
19
|
@InjectRepository(TaskDataEntity)
|
|
20
20
|
private readonly TaskRepository: Repository<TaskDataEntity>,
|
|
21
21
|
) {
|
|
@@ -6,24 +6,21 @@ import {
|
|
|
6
6
|
} from '@nestjs/common';
|
|
7
7
|
import { InjectRepository } from '@nestjs/typeorm';
|
|
8
8
|
import { DataSource, Repository } from 'typeorm';
|
|
9
|
-
import { FormMasterDataEntity } from '../entity/form-master.entity';
|
|
10
9
|
import { FormDataEntity } from '../entity/form.entity';
|
|
11
10
|
import { UserData } from 'src/module/user/entity/user.entity';
|
|
12
11
|
|
|
13
12
|
@Injectable()
|
|
14
13
|
export class FormMasterRepository {
|
|
15
14
|
constructor(
|
|
16
|
-
@InjectRepository(FormMasterDataEntity)
|
|
17
|
-
private readonly formMasterEntity: Repository<FormMasterDataEntity>,
|
|
18
15
|
private readonly dataSource: DataSource,
|
|
19
|
-
@InjectRepository(FormDataEntity)
|
|
20
|
-
private readonly formRepo: Repository<FormDataEntity>,
|
|
16
|
+
// @InjectRepository(FormDataEntity)
|
|
17
|
+
// private readonly formRepo: Repository<FormDataEntity>,
|
|
21
18
|
) {}
|
|
22
19
|
|
|
23
20
|
async getForms(organization_id: number, source_entity_type: string) {
|
|
24
21
|
const forms = await this.dataSource.query(
|
|
25
22
|
`SELECT fm.id as fm_id, fm.name as fm_form_name
|
|
26
|
-
FROM
|
|
23
|
+
FROM cr_entity_view fm
|
|
27
24
|
WHERE fm.organization_id = ? AND fm.mapped_entity_type = ?`,
|
|
28
25
|
[organization_id, source_entity_type],
|
|
29
26
|
);
|
|
@@ -44,18 +41,19 @@ export class FormMasterRepository {
|
|
|
44
41
|
// accepted
|
|
45
42
|
|
|
46
43
|
async submitForm(redirect_data: any, loggedInUser: UserData) {
|
|
47
|
-
const currentForm = await this.formMasterEntity.findOneBy({
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
});
|
|
44
|
+
// const currentForm = await this.formMasterEntity.findOneBy({
|
|
45
|
+
// mapped_entity_id: redirect_data.entity_id,
|
|
46
|
+
// mapped_entity_type: redirect_data.entity_type,
|
|
47
|
+
// view_id: redirect_data.view_id,
|
|
48
|
+
// });
|
|
52
49
|
|
|
53
|
-
if (!currentForm) {
|
|
54
|
-
|
|
55
|
-
}
|
|
50
|
+
// if (!currentForm) {
|
|
51
|
+
// throw new NotFoundException('Form not found');
|
|
52
|
+
// }
|
|
56
53
|
|
|
57
|
-
currentForm.status = 'submitted';
|
|
54
|
+
// currentForm.status = 'submitted';
|
|
58
55
|
|
|
59
|
-
return this.formMasterEntity.update(currentForm.id, currentForm);
|
|
56
|
+
// return this.formMasterEntity.update(currentForm.id, currentForm);
|
|
57
|
+
return 'cr_form_master is removed package. So, this function is deactivated.';
|
|
60
58
|
}
|
|
61
59
|
}
|
|
@@ -29,7 +29,7 @@ export class PopulateWorkflowService extends EntityServiceImpl {
|
|
|
29
29
|
// async populateWorkflowData(organization_id: number, loggedInUser: UserData) {
|
|
30
30
|
// // Define workflow tables
|
|
31
31
|
// const workflowTables = [
|
|
32
|
-
// { table: '
|
|
32
|
+
// { table: 'cr_wf_master', entityType: 'WRFW', service: 'workflowService' },
|
|
33
33
|
// {
|
|
34
34
|
// table: 'cr_wf_stage_group',
|
|
35
35
|
// entityType: 'WFSG',
|
|
@@ -120,7 +120,7 @@ export class PopulateWorkflowService extends EntityServiceImpl {
|
|
|
120
120
|
}
|
|
121
121
|
|
|
122
122
|
const workflowTables = [
|
|
123
|
-
{ table: '
|
|
123
|
+
{ table: 'cr_wf_master', entityType: 'WRFW', service: 'workflowService' },
|
|
124
124
|
{
|
|
125
125
|
table: 'cr_wf_stage_group',
|
|
126
126
|
entityType: 'WFSG',
|
|
@@ -157,7 +157,7 @@ export class PopulateWorkflowService extends EntityServiceImpl {
|
|
|
157
157
|
|
|
158
158
|
// adding new entry for workflow level mapping
|
|
159
159
|
await this.dataSource.query(
|
|
160
|
-
`INSERT INTO
|
|
160
|
+
`INSERT INTO cr_wf_master_level_mapping (workflow_id, mapped_level_id, mapped_level_type) VALUES (?, ?, ?)`,
|
|
161
161
|
[newWf.id, organization_id, 'ORG'],
|
|
162
162
|
);
|
|
163
163
|
|
|
@@ -273,7 +273,7 @@ export class PopulateWorkflowService extends EntityServiceImpl {
|
|
|
273
273
|
|
|
274
274
|
//get view master form
|
|
275
275
|
const formViewMaster = await this.dataSource.query(
|
|
276
|
-
`SELECT id FROM
|
|
276
|
+
`SELECT id FROM cr_entity_view WHERE code = "LEAD_FORM" and organization_id = ?`,
|
|
277
277
|
[organization_id],
|
|
278
278
|
);
|
|
279
279
|
|
|
@@ -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 cr_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 cr_wf_master_level_mapping to point to the new workflow
|
|
109
109
|
await this.dataSource.query(
|
|
110
|
-
`UPDATE
|
|
110
|
+
`UPDATE cr_wf_master_level_mapping
|
|
111
111
|
SET workflow_id = ?
|
|
112
112
|
WHERE mapped_level_id = ? AND mapped_level_type = ?`,
|
|
113
113
|
[workflowId, level_id, level_type],
|
|
@@ -49,7 +49,6 @@ import { TaskRepository } from './repository/task.repository';
|
|
|
49
49
|
import { ActionRepository } from './repository/action.repository';
|
|
50
50
|
import { ActionDataRepository } from './repository/action-data.repository';
|
|
51
51
|
import { ActionDataService } from './service/action-data.service';
|
|
52
|
-
import { FormMasterDataEntity } from './entity/form-master.entity';
|
|
53
52
|
import { FormMasterController } from './controller/form-master.controller';
|
|
54
53
|
import { FormMasterService } from './service/form-master.service';
|
|
55
54
|
import { FormMasterRepository } from './repository/form-master.repository';
|
|
@@ -57,7 +56,6 @@ import { ActionResourcesMapping } from './entity/action-resources-mapping.entity
|
|
|
57
56
|
import { ActionResourcesMappingService } from './service/action-resources-mapping.service';
|
|
58
57
|
import { ActionResourcesMappingController } from './controller/action-resource-mapping.controller';
|
|
59
58
|
import { ActionCategoryRepository } from './repository/action-category.repository';
|
|
60
|
-
import { FormDataEntity } from './entity/form.entity';
|
|
61
59
|
import { ActivityLog } from './entity/activity-log.entity';
|
|
62
60
|
import { ActivityLogService } from './service/activity-log.service';
|
|
63
61
|
import { ActivityLogRepository } from './repository/activity-log.repository';
|
|
@@ -81,8 +79,6 @@ import { NotificationModule } from '../notification/notification.module';
|
|
|
81
79
|
WorkflowLevelMappingEntity,
|
|
82
80
|
TaskDataEntity,
|
|
83
81
|
ActionDataEntity,
|
|
84
|
-
FormMasterDataEntity,
|
|
85
|
-
FormDataEntity,
|
|
86
82
|
ActionResourcesMapping,
|
|
87
83
|
ActivityLog,
|
|
88
84
|
]),
|
|
@@ -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: 'cr_wf_master_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: 'cr_wf_master_automation' })
|
|
6
6
|
export class WorkflowAutomation extends BaseEntity {
|
|
7
7
|
constructor() {
|
|
8
8
|
super();
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { BaseEntity } from 'src/module/meta/entity/base-entity.entity';
|
|
2
|
-
export declare class FormMasterDataEntity extends BaseEntity {
|
|
3
|
-
constructor();
|
|
4
|
-
mapped_entity_id: number;
|
|
5
|
-
mapped_entity_type: string;
|
|
6
|
-
source_entity_type: string;
|
|
7
|
-
view_id: number;
|
|
8
|
-
form_name: string;
|
|
9
|
-
form_url: string;
|
|
10
|
-
}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.FormMasterDataEntity = void 0;
|
|
13
|
-
const base_entity_entity_1 = require("../../meta/entity/base-entity.entity");
|
|
14
|
-
const typeorm_1 = require("typeorm");
|
|
15
|
-
let FormMasterDataEntity = class FormMasterDataEntity extends base_entity_entity_1.BaseEntity {
|
|
16
|
-
constructor() {
|
|
17
|
-
super();
|
|
18
|
-
this.entity_type = 'FORM';
|
|
19
|
-
}
|
|
20
|
-
};
|
|
21
|
-
exports.FormMasterDataEntity = FormMasterDataEntity;
|
|
22
|
-
__decorate([
|
|
23
|
-
(0, typeorm_1.Column)({ nullable: true }),
|
|
24
|
-
__metadata("design:type", Number)
|
|
25
|
-
], FormMasterDataEntity.prototype, "mapped_entity_id", void 0);
|
|
26
|
-
__decorate([
|
|
27
|
-
(0, typeorm_1.Column)({ nullable: true }),
|
|
28
|
-
__metadata("design:type", String)
|
|
29
|
-
], FormMasterDataEntity.prototype, "mapped_entity_type", void 0);
|
|
30
|
-
__decorate([
|
|
31
|
-
(0, typeorm_1.Column)({ nullable: true }),
|
|
32
|
-
__metadata("design:type", String)
|
|
33
|
-
], FormMasterDataEntity.prototype, "source_entity_type", void 0);
|
|
34
|
-
__decorate([
|
|
35
|
-
(0, typeorm_1.Column)({ nullable: true }),
|
|
36
|
-
__metadata("design:type", Number)
|
|
37
|
-
], FormMasterDataEntity.prototype, "view_id", void 0);
|
|
38
|
-
__decorate([
|
|
39
|
-
(0, typeorm_1.Column)({ nullable: true }),
|
|
40
|
-
__metadata("design:type", String)
|
|
41
|
-
], FormMasterDataEntity.prototype, "form_name", void 0);
|
|
42
|
-
__decorate([
|
|
43
|
-
(0, typeorm_1.Column)({ type: 'varchar', nullable: true }),
|
|
44
|
-
__metadata("design:type", String)
|
|
45
|
-
], FormMasterDataEntity.prototype, "form_url", void 0);
|
|
46
|
-
exports.FormMasterDataEntity = FormMasterDataEntity = __decorate([
|
|
47
|
-
(0, typeorm_1.Entity)({ name: 'cr_form_master' }),
|
|
48
|
-
__metadata("design:paramtypes", [])
|
|
49
|
-
], FormMasterDataEntity);
|
|
50
|
-
//# sourceMappingURL=form-master.entity.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"form-master.entity.js","sourceRoot":"","sources":["../../../../src/module/workflow/entity/form-master.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6EAAuE;AACvE,qCAAyC;AAGlC,IAAM,oBAAoB,GAA1B,MAAM,oBAAqB,SAAQ,+BAAU;IAClD;QACE,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,WAAW,GAAG,MAAM,CAAC;IAC5B,CAAC;CAkBF,CAAA;AAtBY,oDAAoB;AAM/B;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;8DACF;AAGzB;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;gEACA;AAG3B;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;gEACA;AAG3B;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;qDACX;AAGhB;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;uDACT;AAGlB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;sDAC3B;+BArBN,oBAAoB;IADhC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,gBAAgB,EAAE,CAAC;;GACtB,oBAAoB,CAsBhC"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { BaseEntity } from 'src/module/meta/entity/base-entity.entity';
|
|
2
|
-
import { Column, Entity } from 'typeorm';
|
|
3
|
-
|
|
4
|
-
@Entity({ name: 'cr_form_master' })
|
|
5
|
-
export class FormMasterDataEntity extends BaseEntity {
|
|
6
|
-
constructor() {
|
|
7
|
-
super();
|
|
8
|
-
this.entity_type = 'FORM';
|
|
9
|
-
}
|
|
10
|
-
@Column({ nullable: true })
|
|
11
|
-
mapped_entity_id: number;
|
|
12
|
-
|
|
13
|
-
@Column({ nullable: true })
|
|
14
|
-
mapped_entity_type: string;
|
|
15
|
-
|
|
16
|
-
@Column({ nullable: true })
|
|
17
|
-
source_entity_type: string;
|
|
18
|
-
|
|
19
|
-
@Column({ nullable: true })
|
|
20
|
-
view_id: number;
|
|
21
|
-
|
|
22
|
-
@Column({ nullable: true })
|
|
23
|
-
form_name: string;
|
|
24
|
-
|
|
25
|
-
@Column({ type: 'varchar', nullable: true })
|
|
26
|
-
form_url: string;
|
|
27
|
-
}
|