rez_core 6.5.67 → 6.5.69
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/.claude/settings.local.json +26 -0
- package/.idea/250218_nodejs_core.iml +9 -0
- package/.idea/codeStyles/Project.xml +59 -0
- package/.idea/codeStyles/codeStyleConfig.xml +5 -0
- package/.idea/copilot.data.migration.agent.xml +6 -0
- package/.idea/copilot.data.migration.ask.xml +6 -0
- package/.idea/copilot.data.migration.ask2agent.xml +6 -0
- package/.idea/copilot.data.migration.edit.xml +6 -0
- package/.idea/inspectionProfiles/Project_Default.xml +6 -0
- package/.idea/misc.xml +6 -0
- package/.idea/modules.xml +8 -0
- package/.idea/prettier.xml +6 -0
- package/.idea/vcs.xml +6 -0
- package/dist/module/dashboard/controller/dashboard.controller.d.ts +5 -6
- package/dist/module/dashboard/entity/dashboard_page_data.entity.d.ts +0 -1
- package/dist/module/dashboard/entity/dashboard_page_data.entity.js +1 -6
- package/dist/module/dashboard/entity/dashboard_page_data.entity.js.map +1 -1
- package/dist/module/dashboard/entity/widget_master.entity.d.ts +0 -1
- package/dist/module/dashboard/entity/widget_master.entity.js +1 -6
- package/dist/module/dashboard/entity/widget_master.entity.js.map +1 -1
- package/dist/module/dashboard/service/dashboard.service.d.ts +5 -6
- package/dist/module/entity_json/service/entity_json.service.js +1 -11
- package/dist/module/entity_json/service/entity_json.service.js.map +1 -1
- package/dist/module/filter/entity/saved-filter-detail.entity.d.ts +0 -1
- package/dist/module/filter/entity/saved-filter-detail.entity.js +1 -7
- package/dist/module/filter/entity/saved-filter-detail.entity.js.map +1 -1
- package/dist/module/filter/entity/saved-filter-master.entity.d.ts +0 -1
- package/dist/module/filter/entity/saved-filter-master.entity.js +1 -7
- package/dist/module/filter/entity/saved-filter-master.entity.js.map +1 -1
- package/dist/module/filter/repository/saved-filter.repository.js +2 -2
- package/dist/module/filter/repository/saved-filter.repository.js.map +1 -1
- package/dist/module/filter/service/saved-filter.service.js +0 -1
- package/dist/module/filter/service/saved-filter.service.js.map +1 -1
- package/dist/module/integration/service/integration.service.js +2 -4
- package/dist/module/integration/service/integration.service.js.map +1 -1
- package/dist/module/listmaster/entity/list-master-items.entity.d.ts +0 -2
- package/dist/module/listmaster/entity/list-master-items.entity.js +2 -12
- package/dist/module/listmaster/entity/list-master-items.entity.js.map +1 -1
- package/dist/module/listmaster/entity/list-master.entity.d.ts +0 -1
- package/dist/module/listmaster/entity/list-master.entity.js +1 -7
- package/dist/module/listmaster/entity/list-master.entity.js.map +1 -1
- package/dist/module/listmaster/service/list-master.service.js.map +1 -1
- package/dist/module/mapper/entity/field-lovs.entity.d.ts +0 -1
- package/dist/module/mapper/entity/field-lovs.entity.js +1 -6
- package/dist/module/mapper/entity/field-lovs.entity.js.map +1 -1
- package/dist/module/mapper/entity/field-mapper.entity.d.ts +0 -1
- package/dist/module/mapper/entity/field-mapper.entity.js +1 -6
- package/dist/module/mapper/entity/field-mapper.entity.js.map +1 -1
- package/dist/module/mapper/entity/mapper.entity.d.ts +0 -1
- package/dist/module/mapper/entity/mapper.entity.js +1 -6
- package/dist/module/mapper/entity/mapper.entity.js.map +1 -1
- package/dist/module/mapper/service/field-mapper.service.js +0 -1
- package/dist/module/mapper/service/field-mapper.service.js.map +1 -1
- package/dist/module/master/controller/master.controller.d.ts +1 -3
- package/dist/module/master/controller/master.controller.js +4 -6
- package/dist/module/master/controller/master.controller.js.map +1 -1
- package/dist/module/master/service/master.service.d.ts +1 -1
- package/dist/module/master/service/master.service.js +25 -44
- package/dist/module/master/service/master.service.js.map +1 -1
- package/dist/module/meta/entity/attribute-master.entity.d.ts +4 -14
- package/dist/module/meta/entity/attribute-master.entity.js +17 -82
- package/dist/module/meta/entity/attribute-master.entity.js.map +1 -1
- package/dist/module/meta/entity/base-entity.entity.d.ts +5 -7
- package/dist/module/meta/entity/base-entity.entity.js +21 -48
- package/dist/module/meta/entity/base-entity.entity.js.map +1 -1
- package/dist/module/meta/entity/entity-master.entity.d.ts +0 -1
- package/dist/module/meta/entity/entity-master.entity.js +1 -7
- package/dist/module/meta/entity/entity-master.entity.js.map +1 -1
- package/dist/module/meta/entity/entity-relation-data.entity.d.ts +0 -1
- package/dist/module/meta/entity/entity-relation-data.entity.js +1 -7
- package/dist/module/meta/entity/entity-relation-data.entity.js.map +1 -1
- package/dist/module/meta/entity/entity-relation.entity.d.ts +0 -1
- package/dist/module/meta/entity/entity-relation.entity.js +1 -7
- package/dist/module/meta/entity/entity-relation.entity.js.map +1 -1
- package/dist/module/meta/entity/entity-table-column.entity.d.ts +0 -1
- package/dist/module/meta/entity/entity-table-column.entity.js +1 -7
- package/dist/module/meta/entity/entity-table-column.entity.js.map +1 -1
- package/dist/module/meta/entity/entity-table.entity.d.ts +0 -1
- package/dist/module/meta/entity/entity-table.entity.js +1 -7
- package/dist/module/meta/entity/entity-table.entity.js.map +1 -1
- package/dist/module/meta/entity/media-data.entity.d.ts +0 -1
- package/dist/module/meta/entity/media-data.entity.js +1 -7
- package/dist/module/meta/entity/media-data.entity.js.map +1 -1
- package/dist/module/meta/entity/preference.entity.d.ts +0 -1
- package/dist/module/meta/entity/preference.entity.js +1 -7
- package/dist/module/meta/entity/preference.entity.js.map +1 -1
- package/dist/module/meta/entity/view-master.entity.d.ts +0 -1
- package/dist/module/meta/entity/view-master.entity.js +1 -7
- package/dist/module/meta/entity/view-master.entity.js.map +1 -1
- package/dist/module/meta/repository/attribute-master.repository.d.ts +1 -1
- package/dist/module/meta/repository/attribute-master.repository.js +3 -4
- package/dist/module/meta/repository/attribute-master.repository.js.map +1 -1
- package/dist/module/meta/service/attribute-master.service.js +2 -2
- package/dist/module/meta/service/attribute-master.service.js.map +1 -1
- package/dist/module/meta/service/entity-dynamic.service.js +1 -12
- package/dist/module/meta/service/entity-dynamic.service.js.map +1 -1
- 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/entity-validation.service.js +0 -30
- package/dist/module/meta/service/entity-validation.service.js.map +1 -1
- package/dist/module/meta/service/resolver.service.js +21 -21
- package/dist/module/meta/service/resolver.service.js.map +1 -1
- package/dist/module/workflow/controller/activity-log.controller.d.ts +4 -6
- package/dist/module/workflow/entity/action-category.entity.d.ts +0 -1
- package/dist/module/workflow/entity/action-category.entity.js +1 -7
- package/dist/module/workflow/entity/action-category.entity.js.map +1 -1
- package/dist/module/workflow/entity/action-data.entity.d.ts +0 -1
- package/dist/module/workflow/entity/action-data.entity.js +1 -6
- package/dist/module/workflow/entity/action-data.entity.js.map +1 -1
- package/dist/module/workflow/entity/action-resources-mapping.entity.d.ts +0 -1
- package/dist/module/workflow/entity/action-resources-mapping.entity.js +1 -7
- package/dist/module/workflow/entity/action-resources-mapping.entity.js.map +1 -1
- package/dist/module/workflow/entity/action-template-mapping.entity.d.ts +0 -1
- package/dist/module/workflow/entity/action-template-mapping.entity.js +1 -7
- package/dist/module/workflow/entity/action-template-mapping.entity.js.map +1 -1
- package/dist/module/workflow/entity/action.entity.d.ts +0 -1
- package/dist/module/workflow/entity/action.entity.js +1 -7
- package/dist/module/workflow/entity/action.entity.js.map +1 -1
- package/dist/module/workflow/entity/activity-log.entity.d.ts +0 -1
- package/dist/module/workflow/entity/activity-log.entity.js +1 -6
- package/dist/module/workflow/entity/activity-log.entity.js.map +1 -1
- package/dist/module/workflow/entity/comm-template.entity.d.ts +0 -1
- package/dist/module/workflow/entity/comm-template.entity.js +1 -7
- package/dist/module/workflow/entity/comm-template.entity.js.map +1 -1
- package/dist/module/workflow/entity/entity-modification.entity.d.ts +0 -1
- package/dist/module/workflow/entity/entity-modification.entity.js +1 -7
- package/dist/module/workflow/entity/entity-modification.entity.js.map +1 -1
- package/dist/module/workflow/entity/form.entity.d.ts +0 -1
- package/dist/module/workflow/entity/form.entity.js +1 -6
- package/dist/module/workflow/entity/form.entity.js.map +1 -1
- package/dist/module/workflow/entity/stage-action-mapping.entity.d.ts +0 -1
- package/dist/module/workflow/entity/stage-action-mapping.entity.js +1 -7
- package/dist/module/workflow/entity/stage-action-mapping.entity.js.map +1 -1
- package/dist/module/workflow/entity/stage-group.entity.d.ts +0 -1
- package/dist/module/workflow/entity/stage-group.entity.js +1 -7
- package/dist/module/workflow/entity/stage-group.entity.js.map +1 -1
- package/dist/module/workflow/entity/stage-movement-data.entity.d.ts +0 -1
- package/dist/module/workflow/entity/stage-movement-data.entity.js +1 -7
- package/dist/module/workflow/entity/stage-movement-data.entity.js.map +1 -1
- package/dist/module/workflow/entity/stage.entity.d.ts +0 -1
- package/dist/module/workflow/entity/stage.entity.js +1 -7
- package/dist/module/workflow/entity/stage.entity.js.map +1 -1
- package/dist/module/workflow/entity/task-data.entity.d.ts +0 -1
- package/dist/module/workflow/entity/task-data.entity.js +1 -6
- package/dist/module/workflow/entity/task-data.entity.js.map +1 -1
- package/dist/module/workflow/entity/workflow-data.entity.d.ts +0 -1
- package/dist/module/workflow/entity/workflow-data.entity.js +1 -10
- package/dist/module/workflow/entity/workflow-data.entity.js.map +1 -1
- package/dist/module/workflow/entity/workflow.entity.d.ts +0 -1
- package/dist/module/workflow/entity/workflow.entity.js +1 -7
- package/dist/module/workflow/entity/workflow.entity.js.map +1 -1
- package/dist/module/workflow/repository/activity-log.repository.d.ts +4 -6
- package/dist/module/workflow/repository/comm-template.repository.js +2 -2
- package/dist/module/workflow/repository/comm-template.repository.js.map +1 -1
- package/dist/module/workflow/repository/stage-group.repository.d.ts +5 -6
- package/dist/module/workflow/repository/stage.repository.d.ts +4 -6
- package/dist/module/workflow/repository/task.repository.js +0 -1
- package/dist/module/workflow/repository/task.repository.js.map +1 -1
- package/dist/module/workflow/repository/workflow.repository.js +1 -1
- package/dist/module/workflow/repository/workflow.repository.js.map +1 -1
- package/dist/module/workflow/service/action.service.js +8 -10
- package/dist/module/workflow/service/action.service.js.map +1 -1
- package/dist/module/workflow/service/activity-log.service.d.ts +4 -6
- package/dist/module/workflow-automation/service/schedule-handler.service.js +2 -3
- package/dist/module/workflow-automation/service/schedule-handler.service.js.map +1 -1
- package/dist/module/workflow-automation/service/workflow-automation.service.d.ts +4 -6
- package/dist/module/workflow-schedule/interfaces/schedule-job-data.interface.d.ts +1 -2
- package/dist/module/workflow-schedule/processors/schedule.processor.js +5 -9
- package/dist/module/workflow-schedule/processors/schedule.processor.js.map +1 -1
- package/dist/module/workflow-schedule/service/workflow-schedule.service.js +4 -11
- package/dist/module/workflow-schedule/service/workflow-schedule.service.js.map +1 -1
- package/dist/table.config.d.ts +1 -8
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/server.log +850 -0
- package/src/module/dashboard/entity/dashboard_page_data.entity.ts +1 -5
- package/src/module/dashboard/entity/widget_master.entity.ts +2 -5
- package/src/module/entity_json/service/entity_json.service.ts +13 -9
- package/src/module/filter/entity/saved-filter-detail.entity.ts +0 -4
- package/src/module/filter/entity/saved-filter-master.entity.ts +0 -5
- package/src/module/filter/repository/saved-filter.repository.ts +2 -2
- package/src/module/filter/service/saved-filter.service.ts +0 -1
- package/src/module/integration/service/integration.service.ts +2 -4
- package/src/module/listmaster/entity/list-master-items.entity.ts +2 -9
- package/src/module/listmaster/entity/list-master.entity.ts +1 -5
- package/src/module/listmaster/service/list-master.service.ts +1 -1
- package/src/module/mapper/entity/field-lovs.entity.ts +0 -4
- package/src/module/mapper/entity/field-mapper.entity.ts +0 -4
- package/src/module/mapper/entity/mapper.entity.ts +0 -4
- package/src/module/mapper/service/field-mapper.service.ts +0 -1
- package/src/module/master/controller/master.controller.ts +4 -7
- package/src/module/master/service/master.service.ts +23 -49
- package/src/module/meta/entity/attribute-master.entity.ts +17 -70
- package/src/module/meta/entity/base-entity.entity.ts +20 -46
- package/src/module/meta/entity/entity-master.entity.ts +1 -6
- package/src/module/meta/entity/entity-relation-data.entity.ts +0 -5
- package/src/module/meta/entity/entity-relation.entity.ts +0 -5
- package/src/module/meta/entity/entity-table-column.entity.ts +0 -5
- package/src/module/meta/entity/entity-table.entity.ts +0 -5
- package/src/module/meta/entity/media-data.entity.ts +0 -5
- package/src/module/meta/entity/preference.entity.ts +0 -5
- package/src/module/meta/entity/view-master.entity.ts +1 -6
- package/src/module/meta/repository/attribute-master.repository.ts +3 -4
- package/src/module/meta/service/attribute-master.service.ts +2 -2
- package/src/module/meta/service/entity-dynamic.service.ts +1 -14
- package/src/module/meta/service/entity-service-impl.service.ts +2 -2
- package/src/module/meta/service/entity-validation.service.ts +41 -41
- package/src/module/meta/service/resolver.service.ts +21 -21
- package/src/module/workflow/entity/action-category.entity.ts +0 -5
- package/src/module/workflow/entity/action-data.entity.ts +1 -5
- package/src/module/workflow/entity/action-resources-mapping.entity.ts +0 -8
- package/src/module/workflow/entity/action-template-mapping.entity.ts +0 -5
- package/src/module/workflow/entity/action.entity.ts +0 -5
- package/src/module/workflow/entity/activity-log.entity.ts +0 -4
- package/src/module/workflow/entity/comm-template.entity.ts +0 -5
- package/src/module/workflow/entity/entity-modification.entity.ts +0 -5
- package/src/module/workflow/entity/form.entity.ts +0 -4
- package/src/module/workflow/entity/stage-action-mapping.entity.ts +0 -5
- package/src/module/workflow/entity/stage-group.entity.ts +0 -5
- package/src/module/workflow/entity/stage-movement-data.entity.ts +0 -5
- package/src/module/workflow/entity/stage.entity.ts +0 -5
- package/src/module/workflow/entity/task-data.entity.ts +0 -4
- package/src/module/workflow/entity/workflow-data.entity.ts +0 -5
- package/src/module/workflow/entity/workflow.entity.ts +0 -5
- package/src/module/workflow/repository/comm-template.repository.ts +2 -2
- package/src/module/workflow/repository/task.repository.ts +0 -1
- package/src/module/workflow/repository/workflow.repository.ts +1 -1
- package/src/module/workflow/service/action.service.ts +8 -10
- package/src/module/workflow-automation/service/schedule-handler.service.ts +2 -3
- package/src/module/workflow-schedule/interfaces/schedule-job-data.interface.ts +1 -2
- package/src/module/workflow-schedule/processors/schedule.processor.ts +5 -9
- package/src/module/workflow-schedule/service/workflow-schedule.service.ts +4 -11
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
import { BaseEntity } from 'src/module/meta/entity/base-entity.entity';
|
|
2
|
-
import { Column, Entity
|
|
2
|
+
import { Column, Entity } from 'typeorm';
|
|
3
3
|
|
|
4
4
|
@Entity({ name: 'frm_dashboard_page_data' })
|
|
5
5
|
export class DashboardPageData extends BaseEntity {
|
|
6
|
-
constructor() {
|
|
7
|
-
super();
|
|
8
|
-
this.entity_type = 'DASH';
|
|
9
|
-
}
|
|
10
6
|
@Column({ type: 'int', nullable: true })
|
|
11
7
|
page_sequence: number;
|
|
12
8
|
|
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
import { BaseEntity } from 'src/module/meta/entity/base-entity.entity';
|
|
2
|
-
import { Column, Entity
|
|
2
|
+
import { Column, Entity } from 'typeorm';
|
|
3
3
|
|
|
4
4
|
@Entity({ name: 'frm_dashboard_widget' })
|
|
5
5
|
export class WidgetMaster extends BaseEntity {
|
|
6
|
-
|
|
7
|
-
super();
|
|
8
|
-
this.entity_type = 'WIDG';
|
|
9
|
-
}
|
|
6
|
+
|
|
10
7
|
@Column({ type: 'varchar', nullable: true })
|
|
11
8
|
api_url: string;
|
|
12
9
|
|
|
@@ -87,12 +87,13 @@ export class EntityJSONService {
|
|
|
87
87
|
|
|
88
88
|
if (flag === 'flat_json' || flag === 'all') {
|
|
89
89
|
const result: Record<string, null> = {};
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
90
|
+
// FIXME:@Bhushan handling for flat json key
|
|
91
|
+
// mainAttributes.forEach(attr => {
|
|
92
|
+
// if (attr.flat_json_key) result[attr.flat_json_key] = null;
|
|
93
|
+
// });
|
|
94
|
+
// relatedAttributes.forEach(attr => {
|
|
95
|
+
// if (attr.flat_json_key) result[attr.flat_json_key] = null;
|
|
96
|
+
// });
|
|
96
97
|
linkedAttributes.forEach(link => {
|
|
97
98
|
if (link.target_attribute_key) result[link.target_attribute_key] = null;
|
|
98
99
|
});
|
|
@@ -105,8 +106,9 @@ export class EntityJSONService {
|
|
|
105
106
|
}
|
|
106
107
|
|
|
107
108
|
const dropdown: any[] = [];
|
|
108
|
-
|
|
109
|
-
dropdown.push(...
|
|
109
|
+
//Fixme: @Bhushan
|
|
110
|
+
// dropdown.push(...mainAttributes.map(a => ({ label: a.name, value: a.flat_json_key })));
|
|
111
|
+
// dropdown.push(...relatedAttributes.map(a => ({ label: a.name, value: a.flat_json_key })));
|
|
110
112
|
if (linkedAttributes.length > 0) {
|
|
111
113
|
dropdown.push(...linkedAttributes.map(a => ({ label: a.name, value: a.attribute_key })));
|
|
112
114
|
}
|
|
@@ -136,7 +138,9 @@ export class EntityJSONService {
|
|
|
136
138
|
const attrMap: Record<string, string> = {};
|
|
137
139
|
const allAttrs = [...safeAttributes.mainAttributes, ...safeAttributes.relatedAttributes];
|
|
138
140
|
allAttrs.forEach(attr => {
|
|
139
|
-
|
|
141
|
+
//FIXME: @Bhushan
|
|
142
|
+
// if (attr.attribute_key) attrMap[attr.attribute_key] = attr.flat_json_key || attr.attribute_key;
|
|
143
|
+
if (attr.attribute_key) attrMap[attr.attribute_key] = attr.attribute_key;
|
|
140
144
|
});
|
|
141
145
|
|
|
142
146
|
const mainData = await this.entityServiceImpl.getResolvedEntityData(entityType, entityId, loggedInUser);
|
|
@@ -4,10 +4,6 @@ import { Column, Entity } from 'typeorm';
|
|
|
4
4
|
|
|
5
5
|
@Entity({ name: 'frm_saved_filter_detail' })
|
|
6
6
|
export class SavedFilterDetail extends BaseEntity {
|
|
7
|
-
constructor() {
|
|
8
|
-
super();
|
|
9
|
-
this.entity_type = ENTITYTYPE_SAVEDFILTERDETAIL;
|
|
10
|
-
}
|
|
11
7
|
|
|
12
8
|
@Column({ nullable: true })
|
|
13
9
|
mapped_filter_code: string; // links to SavedFilterMaster.code (manual, not FK)
|
|
@@ -1,13 +1,8 @@
|
|
|
1
|
-
import { ENTITYTYPE_SAVEDFILTERMASTER } from 'src/constant/global.constant';
|
|
2
1
|
import { BaseEntity } from 'src/module/meta/entity/base-entity.entity';
|
|
3
2
|
import { Column, Entity } from 'typeorm';
|
|
4
3
|
|
|
5
4
|
@Entity({ name: 'frm_saved_filter_master' })
|
|
6
5
|
export class SavedFilterMaster extends BaseEntity {
|
|
7
|
-
constructor() {
|
|
8
|
-
super();
|
|
9
|
-
this.entity_type = ENTITYTYPE_SAVEDFILTERMASTER;
|
|
10
|
-
}
|
|
11
6
|
|
|
12
7
|
@Column({ length: 50, type: 'varchar', nullable: true })
|
|
13
8
|
mapped_entity_type: string;
|
|
@@ -99,7 +99,7 @@ export class SavedFilterRepositoryService {
|
|
|
99
99
|
user_id: loggedInUser.id,
|
|
100
100
|
mapped_entity_type: entityType,
|
|
101
101
|
level_type: loggedInUser.level_type,
|
|
102
|
-
level_id: loggedInUser.level_id,
|
|
102
|
+
level_id: Number(loggedInUser.level_id),
|
|
103
103
|
status: 'ACTIVE',
|
|
104
104
|
is_shared: false,
|
|
105
105
|
},
|
|
@@ -145,7 +145,7 @@ export class SavedFilterRepositoryService {
|
|
|
145
145
|
const filters = await this.savedFilterMasterRepo.find({
|
|
146
146
|
where: {
|
|
147
147
|
level_type: loggedInUser.level_type,
|
|
148
|
-
level_id: loggedInUser.level_id,
|
|
148
|
+
level_id: Number(loggedInUser.level_id),
|
|
149
149
|
mapped_entity_type: entityType,
|
|
150
150
|
is_shared: true,
|
|
151
151
|
status: 'ACTIVE',
|
|
@@ -86,7 +86,6 @@ export class SavedFilterService extends EntityServiceImpl {
|
|
|
86
86
|
|
|
87
87
|
const nameExists = await this.savedFilterRepo.isFilterNameExists({
|
|
88
88
|
name: master.name,
|
|
89
|
-
organization_id: master.organization_id,
|
|
90
89
|
enterprise_id: master.enterprise_id,
|
|
91
90
|
id: master.id, // Include ID to allow same-name check during update
|
|
92
91
|
});
|
|
@@ -827,9 +827,8 @@ export class IntegrationService {
|
|
|
827
827
|
|
|
828
828
|
const entityMapper = this.entityMapperRepository.create({
|
|
829
829
|
integration_config_id: config.id,
|
|
830
|
-
level_id:
|
|
830
|
+
level_id: config.level_id,
|
|
831
831
|
level_type: config.level_type,
|
|
832
|
-
appcode: config.app_code,
|
|
833
832
|
did: did,
|
|
834
833
|
campaign_name: config.config_json.campaignName || null,
|
|
835
834
|
});
|
|
@@ -1885,9 +1884,8 @@ export class IntegrationService {
|
|
|
1885
1884
|
if (did) {
|
|
1886
1885
|
const entityMapper = this.entityMapperRepository.create({
|
|
1887
1886
|
integration_config_id: savedConfig.id,
|
|
1888
|
-
level_id:
|
|
1887
|
+
level_id: levelId,
|
|
1889
1888
|
level_type: levelType,
|
|
1890
|
-
appcode: app_code,
|
|
1891
1889
|
did: did,
|
|
1892
1890
|
campaign_name: config.campaignName || null,
|
|
1893
1891
|
});
|
|
@@ -3,16 +3,9 @@ import { BaseEntity } from '../../meta/entity/base-entity.entity';
|
|
|
3
3
|
import { ENTITYTYPE_LISTMASTERITEMS } from '../../../constant/global.constant';
|
|
4
4
|
|
|
5
5
|
@Entity({ name: 'frm_list_master_items' })
|
|
6
|
-
@Index('idx_list_master_items_listtype_value_org', ['listtype', 'value', '
|
|
7
|
-
@Index('idx_list_master_items_listtype_org', ['listtype', '
|
|
6
|
+
@Index('idx_list_master_items_listtype_value_org', ['listtype', 'value', 'enterprise_id'])
|
|
7
|
+
@Index('idx_list_master_items_listtype_org', ['listtype', 'enterprise_id'])
|
|
8
8
|
export class ListMasterItems extends BaseEntity {
|
|
9
|
-
constructor() {
|
|
10
|
-
super();
|
|
11
|
-
this.entity_type = ENTITYTYPE_LISTMASTERITEMS;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
@PrimaryGeneratedColumn()
|
|
15
|
-
id: number;
|
|
16
9
|
|
|
17
10
|
@Column({ nullable: true })
|
|
18
11
|
listtype: string;
|
|
@@ -3,12 +3,8 @@ import { BaseEntity } from '../../meta/entity/base-entity.entity';
|
|
|
3
3
|
import { ENTITYTYPE_LISTMASTER } from '../../../constant/global.constant';
|
|
4
4
|
|
|
5
5
|
@Entity({ name: 'frm_list_master' })
|
|
6
|
-
@Index('idx_list_master_type_org', ['type', '
|
|
6
|
+
@Index('idx_list_master_type_org', ['type', 'enterprise_id'])
|
|
7
7
|
export class ListMasterData extends BaseEntity {
|
|
8
|
-
constructor() {
|
|
9
|
-
super();
|
|
10
|
-
this.entity_type = ENTITYTYPE_LISTMASTER;
|
|
11
|
-
}
|
|
12
8
|
|
|
13
9
|
@Column({nullable: true})
|
|
14
10
|
type: string;
|
|
@@ -3,10 +3,6 @@ import { BaseEntity } from '../../meta/entity/base-entity.entity';
|
|
|
3
3
|
|
|
4
4
|
@Entity({ name: 'frm_mapper_field_lov' })
|
|
5
5
|
export class FieldLovMapper extends BaseEntity {
|
|
6
|
-
constructor() {
|
|
7
|
-
super();
|
|
8
|
-
this.entity_type = 'FLOV';
|
|
9
|
-
}
|
|
10
6
|
|
|
11
7
|
@Column({ name: 'mapper_field_id' })
|
|
12
8
|
mapper_field_id: number; //1
|
|
@@ -3,10 +3,6 @@ import { BaseEntity } from '../../meta/entity/base-entity.entity';
|
|
|
3
3
|
|
|
4
4
|
@Entity({ name: 'frm_mapper_field' })
|
|
5
5
|
export class FieldMapper extends BaseEntity {
|
|
6
|
-
constructor() {
|
|
7
|
-
super();
|
|
8
|
-
this.entity_type = 'FMAP';
|
|
9
|
-
}
|
|
10
6
|
|
|
11
7
|
@Column({ name: 'mapper_id', type: 'bigint', nullable: true })
|
|
12
8
|
mapper_id: number;
|
|
@@ -3,10 +3,6 @@ import { BaseEntity } from '../../meta/entity/base-entity.entity';
|
|
|
3
3
|
|
|
4
4
|
@Entity({ name: 'frm_mapper_master' })
|
|
5
5
|
export class Mapper extends BaseEntity {
|
|
6
|
-
constructor() {
|
|
7
|
-
super();
|
|
8
|
-
this.entity_type = 'MAP';
|
|
9
|
-
}
|
|
10
6
|
|
|
11
7
|
@Column({ nullable: true, type: 'varchar', length: 100 })
|
|
12
8
|
description: string;
|
|
@@ -25,7 +25,6 @@ export class FieldMapperService extends EntityServiceImpl {
|
|
|
25
25
|
if (dto.field_lovs) {
|
|
26
26
|
for (const lov of dto.field_lovs) {
|
|
27
27
|
lov.mapper_field_id = savedEntity.id;
|
|
28
|
-
lov.entity_type = 'FLOV';
|
|
29
28
|
}
|
|
30
29
|
await this.fieldLovsRepository.saveBulk(dto.field_lovs);
|
|
31
30
|
}
|
|
@@ -2,7 +2,6 @@ import {
|
|
|
2
2
|
BadRequestException,
|
|
3
3
|
Body,
|
|
4
4
|
Controller,
|
|
5
|
-
Inject,
|
|
6
5
|
Param,
|
|
7
6
|
Post,
|
|
8
7
|
Req,
|
|
@@ -13,18 +12,14 @@ import {
|
|
|
13
12
|
import { FileInterceptor } from '@nestjs/platform-express';
|
|
14
13
|
import { MasterService } from '../service/master.service';
|
|
15
14
|
import { Express } from 'express';
|
|
16
|
-
import { UserService } from 'src/module/user/service/user.service';
|
|
17
|
-
import { ENTITYTYPE_USER } from 'src/constant/global.constant';
|
|
18
|
-
import { EntityServiceImpl } from 'src/module/meta/service/entity-service-impl.service';
|
|
19
15
|
import { JwtAuthGuard } from 'src/module/auth/guards/jwt.guard';
|
|
20
16
|
|
|
21
17
|
@Controller('master')
|
|
22
|
-
@UseGuards(JwtAuthGuard)
|
|
23
18
|
export class MasterController {
|
|
24
19
|
constructor(
|
|
25
20
|
private readonly masterService: MasterService,
|
|
26
|
-
|
|
27
|
-
|
|
21
|
+
) {
|
|
22
|
+
}
|
|
28
23
|
|
|
29
24
|
@Post('uploadMeta')
|
|
30
25
|
@UseInterceptors(FileInterceptor('file'))
|
|
@@ -36,6 +31,7 @@ export class MasterController {
|
|
|
36
31
|
}
|
|
37
32
|
|
|
38
33
|
@Post('uploadData')
|
|
34
|
+
@UseGuards(JwtAuthGuard)
|
|
39
35
|
@UseInterceptors(FileInterceptor('file'))
|
|
40
36
|
async uploadMasterDataXls(
|
|
41
37
|
@UploadedFile() file: Express.Multer.File,
|
|
@@ -50,6 +46,7 @@ export class MasterController {
|
|
|
50
46
|
|
|
51
47
|
@Post('uploadEntity/:entityType')
|
|
52
48
|
@UseInterceptors(FileInterceptor('file'))
|
|
49
|
+
@UseGuards(JwtAuthGuard)
|
|
53
50
|
async uploadEntityDataXls(
|
|
54
51
|
@Param('entityType') entityType: string,
|
|
55
52
|
@UploadedFile() file: Express.Multer.File,
|
|
@@ -33,23 +33,23 @@ export class MasterService {
|
|
|
33
33
|
private readonly sequence = [
|
|
34
34
|
{
|
|
35
35
|
table: 'frm_entity_master',
|
|
36
|
-
unique_fields: ['id', '
|
|
36
|
+
unique_fields: ['id', 'enterprise_id'],
|
|
37
37
|
},
|
|
38
38
|
{
|
|
39
39
|
table: 'frm_entity_attribute',
|
|
40
|
-
unique_fields: ['mapped_entity_type', 'attribute_key', '
|
|
40
|
+
unique_fields: ['mapped_entity_type', 'attribute_key', 'enterprise_id'],
|
|
41
41
|
},
|
|
42
42
|
{
|
|
43
43
|
table: 'frm_list_master',
|
|
44
|
-
unique_fields: ['type', '
|
|
44
|
+
unique_fields: ['type', 'enterprise_id'],
|
|
45
45
|
},
|
|
46
46
|
{
|
|
47
47
|
table: 'frm_list_master_items',
|
|
48
|
-
unique_fields: ['listtype', 'code', '
|
|
48
|
+
unique_fields: ['listtype', 'code', 'enterprise_id'],
|
|
49
49
|
},
|
|
50
50
|
{
|
|
51
51
|
table: 'frm_entity_table',
|
|
52
|
-
unique_fields: ['list_type', 'mapped_entity_type', '
|
|
52
|
+
unique_fields: ['list_type', 'mapped_entity_type', 'enterprise_id'],
|
|
53
53
|
},
|
|
54
54
|
{
|
|
55
55
|
table: 'frm_entity_table_column',
|
|
@@ -57,20 +57,20 @@ export class MasterService {
|
|
|
57
57
|
'parent_id',
|
|
58
58
|
'parent_type',
|
|
59
59
|
'attribute_key',
|
|
60
|
-
'
|
|
60
|
+
'enterprise_id',
|
|
61
61
|
],
|
|
62
62
|
},
|
|
63
63
|
{
|
|
64
64
|
table: 'frm_entity_view',
|
|
65
|
-
unique_fields: ['mapped_entity_type', '
|
|
65
|
+
unique_fields: ['mapped_entity_type', 'enterprise_id'],
|
|
66
66
|
},
|
|
67
67
|
{
|
|
68
68
|
table: 'sso_user',
|
|
69
|
-
unique_fields: ['
|
|
69
|
+
unique_fields: ['enterprise_id'],
|
|
70
70
|
},
|
|
71
71
|
{
|
|
72
72
|
table: 'sso_header_items',
|
|
73
|
-
unique_fields: ['code', 'section_id', '
|
|
73
|
+
unique_fields: ['code', 'section_id', 'enterprise_id'],
|
|
74
74
|
},
|
|
75
75
|
{
|
|
76
76
|
table: 'sso_module_access',
|
|
@@ -78,27 +78,27 @@ export class MasterService {
|
|
|
78
78
|
},
|
|
79
79
|
{
|
|
80
80
|
table: 'sso_module_action',
|
|
81
|
-
unique_fields: ['module_code', 'action_type', '
|
|
81
|
+
unique_fields: ['module_code', 'action_type', 'enterprise_id'],
|
|
82
82
|
},
|
|
83
83
|
{
|
|
84
84
|
table: 'sso_menu',
|
|
85
|
-
unique_fields: ['module_code', '
|
|
85
|
+
unique_fields: ['module_code', 'enterprise_id'],
|
|
86
86
|
},
|
|
87
87
|
{
|
|
88
88
|
table: 'sso_module',
|
|
89
|
-
unique_fields: ['module_code', '
|
|
89
|
+
unique_fields: ['module_code', 'enterprise_id'],
|
|
90
90
|
},
|
|
91
91
|
{
|
|
92
92
|
table: 'sso_role',
|
|
93
|
-
unique_fields: ['code', '
|
|
93
|
+
unique_fields: ['code', 'enterprise_id'],
|
|
94
94
|
},
|
|
95
95
|
{
|
|
96
96
|
table: 'sso_header_sections',
|
|
97
|
-
unique_fields: ['section_name', '
|
|
97
|
+
unique_fields: ['section_name', 'enterprise_id'],
|
|
98
98
|
},
|
|
99
99
|
{
|
|
100
100
|
table: 'sso_user_role_mapping',
|
|
101
|
-
unique_fields: ['user_id', 'role_id', '
|
|
101
|
+
unique_fields: ['user_id', 'role_id', 'enterprise_id'],
|
|
102
102
|
},
|
|
103
103
|
{
|
|
104
104
|
table: 'sso_organization',
|
|
@@ -182,9 +182,9 @@ export class MasterService {
|
|
|
182
182
|
}
|
|
183
183
|
|
|
184
184
|
for (const attribute of attributes) {
|
|
185
|
-
if (attribute.
|
|
185
|
+
if (attribute.ds_category === 'ENTITY') {
|
|
186
186
|
const entityMaster = await this.entityMasterService.getEntityData(
|
|
187
|
-
attribute.
|
|
187
|
+
attribute.ds_category,
|
|
188
188
|
loggedInUser,
|
|
189
189
|
);
|
|
190
190
|
const entityData = await this.entityManager.query(
|
|
@@ -229,14 +229,6 @@ export class MasterService {
|
|
|
229
229
|
loggedInUser,
|
|
230
230
|
);
|
|
231
231
|
|
|
232
|
-
const uniqueFields = attributes
|
|
233
|
-
.filter((attr) => attr.is_unique)
|
|
234
|
-
.map((attr) => attr.attribute_key);
|
|
235
|
-
|
|
236
|
-
if (uniqueFields.length === 0) {
|
|
237
|
-
throw new Error(`No unique fields found for entityType: ${entityType}`);
|
|
238
|
-
}
|
|
239
|
-
|
|
240
232
|
const errors: any[] = [];
|
|
241
233
|
|
|
242
234
|
// ✅ Iterate row by row
|
|
@@ -249,13 +241,13 @@ export class MasterService {
|
|
|
249
241
|
|
|
250
242
|
// handle reference entity replacement
|
|
251
243
|
for (const attr of attributes) {
|
|
252
|
-
if (attr.
|
|
244
|
+
if (attr.ds_category === 'ENTITY' && row[attr.attribute_key]) {
|
|
253
245
|
const refEntity = await this.entityMasterService.getEntityData(
|
|
254
|
-
attr.
|
|
246
|
+
attr.ds_category,
|
|
255
247
|
loggedInUser,
|
|
256
248
|
);
|
|
257
249
|
const refData = await this.entityManager.query(
|
|
258
|
-
`SELECT * FROM ${refEntity.db_table_name} WHERE code = ? LIMIT 1`,
|
|
250
|
+
`SELECT * FROM ${this.schema}.${refEntity.db_table_name} WHERE code = ? LIMIT 1`,
|
|
259
251
|
[row[attr.attribute_key]],
|
|
260
252
|
);
|
|
261
253
|
|
|
@@ -275,9 +267,9 @@ export class MasterService {
|
|
|
275
267
|
}
|
|
276
268
|
|
|
277
269
|
for (const attr of attributes) {
|
|
278
|
-
if (attr.
|
|
270
|
+
if (attr.ds_category === 'LIST_MASTER' && row[attr.attribute_key]) {
|
|
279
271
|
const refData = await this.entityManager.query(
|
|
280
|
-
`SELECT * FROM frm_list_master_items WHERE name =
|
|
272
|
+
`SELECT * FROM ${this.schema}.frm_list_master_items WHERE name = $1 and enterprise_id = $2 LIMIT 1`,
|
|
281
273
|
[row[attr.attribute_key], loggedInUser.enterprise_id],
|
|
282
274
|
);
|
|
283
275
|
|
|
@@ -320,8 +312,6 @@ export class MasterService {
|
|
|
320
312
|
await this.upsertViaService(
|
|
321
313
|
entityType,
|
|
322
314
|
sheetData,
|
|
323
|
-
attributes,
|
|
324
|
-
uniqueFields,
|
|
325
315
|
loggedInUser,
|
|
326
316
|
duplicateHandling,
|
|
327
317
|
);
|
|
@@ -411,8 +401,6 @@ export class MasterService {
|
|
|
411
401
|
async upsertViaService(
|
|
412
402
|
entityType: string,
|
|
413
403
|
data: any[],
|
|
414
|
-
attributes: any[],
|
|
415
|
-
uniqueFields: string[],
|
|
416
404
|
loggedInUser: any,
|
|
417
405
|
duplicateHandling: 'skip_duplicates' | 'overwrite_items',
|
|
418
406
|
): Promise<void> {
|
|
@@ -431,7 +419,6 @@ export class MasterService {
|
|
|
431
419
|
|
|
432
420
|
for (const [i, row] of data.entries()) {
|
|
433
421
|
row.entity_type = entityType;
|
|
434
|
-
row.organization_id = loggedInUser.organization_id;
|
|
435
422
|
row.enterprise_id = loggedInUser.enterprise_id;
|
|
436
423
|
|
|
437
424
|
// 🧠 Check if this already exists
|
|
@@ -439,20 +426,7 @@ export class MasterService {
|
|
|
439
426
|
.createQueryBuilder()
|
|
440
427
|
.select('*')
|
|
441
428
|
.from(`${this.schema}.${entityMaster.db_table_name}`, 't')
|
|
442
|
-
.where(
|
|
443
|
-
new Brackets((qbOr) => {
|
|
444
|
-
uniqueFields.forEach((field, index) => {
|
|
445
|
-
const condition = `t.${field} = :val${index}`;
|
|
446
|
-
const param = { [`val${index}`]: row[field] };
|
|
447
|
-
if (index === 0) {
|
|
448
|
-
qbOr.where(condition, param);
|
|
449
|
-
} else {
|
|
450
|
-
qbOr.orWhere(condition, param);
|
|
451
|
-
}
|
|
452
|
-
});
|
|
453
|
-
}),
|
|
454
|
-
)
|
|
455
|
-
.andWhere(`t.enterprise_id = :entId`, {
|
|
429
|
+
.where(`t.enterprise_id = :entId`, {
|
|
456
430
|
entId: loggedInUser.enterprise_id,
|
|
457
431
|
})
|
|
458
432
|
.andWhere(`t.level_type = :levelType`, {
|
|
@@ -2,95 +2,42 @@ import { BaseEntity } from './base-entity.entity';
|
|
|
2
2
|
import { Column, Entity, Index } from 'typeorm';
|
|
3
3
|
|
|
4
4
|
@Entity({ name: 'frm_entity_attribute' })
|
|
5
|
-
@Index('idx_attribute_master_key_org_entity', ['attribute_key', '
|
|
6
|
-
@Index('idx_attribute_master_org_entity', ['
|
|
5
|
+
@Index('idx_attribute_master_key_org_entity', ['attribute_key', 'enterprise_id', 'mapped_entity_type'])
|
|
6
|
+
@Index('idx_attribute_master_org_entity', ['enterprise_id', 'mapped_entity_type'])
|
|
7
7
|
export class AttributeMaster extends BaseEntity {
|
|
8
8
|
@Column({ name: 'mapped_entity_type', type: 'varchar', nullable: true })
|
|
9
9
|
mapped_entity_type: string;
|
|
10
10
|
|
|
11
|
-
@Column({ name: '
|
|
12
|
-
|
|
11
|
+
@Column({ name: 'attribute_key', type: 'varchar', nullable: true, length: 50 })
|
|
12
|
+
attribute_key: string;
|
|
13
13
|
|
|
14
|
+
// TODO: element type enum
|
|
14
15
|
@Column({ name: 'element_type', type: 'varchar', nullable: true, length: 50 })
|
|
15
16
|
element_type: string;
|
|
16
17
|
|
|
17
|
-
|
|
18
|
-
name: 'data_source_type',
|
|
19
|
-
type: 'varchar',
|
|
20
|
-
nullable: true,
|
|
21
|
-
length: 50,
|
|
22
|
-
})
|
|
23
|
-
data_source_type: string;
|
|
24
|
-
|
|
25
|
-
@Column({
|
|
26
|
-
name: 'data_type',
|
|
27
|
-
type: 'varchar',
|
|
28
|
-
nullable: true,
|
|
29
|
-
length: 50,
|
|
30
|
-
})
|
|
31
|
-
data_type: string;
|
|
32
|
-
|
|
33
|
-
@Column({ name: 'datasource_list', type: 'varchar', nullable: true })
|
|
34
|
-
datasource_list: string;
|
|
35
|
-
|
|
36
|
-
@Column({
|
|
37
|
-
name: 'custom_values',
|
|
38
|
-
type: 'varchar',
|
|
39
|
-
length: 2000,
|
|
40
|
-
nullable: true,
|
|
41
|
-
})
|
|
42
|
-
custom_values: string;
|
|
43
|
-
|
|
44
|
-
@Column({ name: 'max_length', nullable: true })
|
|
45
|
-
max_length: number;
|
|
46
|
-
|
|
47
|
-
@Column({ name: 'required', nullable: true })
|
|
48
|
-
required: boolean;
|
|
49
|
-
|
|
50
|
-
@Column({
|
|
51
|
-
name: 'description',
|
|
52
|
-
type: 'varchar',
|
|
53
|
-
length: 2000,
|
|
54
|
-
nullable: true,
|
|
55
|
-
})
|
|
56
|
-
description: string;
|
|
57
|
-
|
|
58
|
-
@Column({
|
|
59
|
-
name: 'attribute_key',
|
|
60
|
-
type: 'varchar',
|
|
61
|
-
nullable: true,
|
|
62
|
-
length: 50,
|
|
63
|
-
})
|
|
64
|
-
attribute_key: string;
|
|
65
|
-
|
|
18
|
+
// varchar, bigint, int, boolean, timestamp, decimal, json, text, time, date
|
|
66
19
|
@Column({ name: 'db_datatype', type: 'varchar', nullable: true, length: 50 })
|
|
67
20
|
db_datatype: string;
|
|
68
21
|
|
|
69
|
-
@Column({ name: '
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
@Column({ name: 'is_unique', nullable: true })
|
|
73
|
-
is_unique: boolean;
|
|
22
|
+
@Column({ name: 'db_length', type: 'int', nullable: true })
|
|
23
|
+
db_length: number;
|
|
74
24
|
|
|
75
|
-
|
|
76
|
-
|
|
25
|
+
// DB_COL, EVA
|
|
26
|
+
@Column({ name: 'storage_type', type: 'varchar', nullable: true, length: 50 })
|
|
27
|
+
storage_type: string;
|
|
77
28
|
|
|
78
|
-
@Column({ name: 'regex', nullable: true })
|
|
29
|
+
@Column({ name: 'regex', type: 'varchar', nullable: true, length: 255 })
|
|
79
30
|
regex: string;
|
|
80
31
|
|
|
81
|
-
@Column({ name: '
|
|
82
|
-
|
|
32
|
+
@Column({ name: 'required', type: 'boolean', nullable: true })
|
|
33
|
+
required: boolean;
|
|
83
34
|
|
|
84
|
-
@Column({ name: '
|
|
85
|
-
|
|
35
|
+
@Column({ name: 'can_export', type: 'boolean', nullable: true })
|
|
36
|
+
can_export: boolean;
|
|
86
37
|
|
|
87
|
-
@Column({ name: 'is_hidden', nullable: true })
|
|
38
|
+
@Column({ name: 'is_hidden', type: 'boolean', nullable: true })
|
|
88
39
|
is_hidden: boolean;
|
|
89
40
|
|
|
90
|
-
@Column({ name: 'flat_json_key', nullable: true })
|
|
91
|
-
flat_json_key: string;
|
|
92
|
-
|
|
93
|
-
// Dropdown data source fields
|
|
94
41
|
@Column({ name: 'ds_category', type: 'varchar', nullable: true, length: 50 })
|
|
95
42
|
ds_category: string;
|
|
96
43
|
|