rez_core 6.5.69 → 6.5.70

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rez_core",
3
- "version": "6.5.69",
3
+ "version": "6.5.70",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "private": false,
@@ -11,13 +11,14 @@ export class MetaController {
11
11
  @Post('populate')
12
12
  @HttpCode(HttpStatus.OK)
13
13
  async populateMetaData(
14
+ @Query('enterprise_id') enterpriseId: number,
14
15
  @Query('organization_id') organizationId: number,
15
16
  @Res() response: Response,
16
17
  @Req() req: Request & { user: any },
17
18
  ) {
18
19
  const loggedInUser = req.user.userData;
19
20
  const result =
20
- await this.populateMetaService.populateMetaData(organizationId);
21
+ await this.populateMetaService.populateMetaData(enterpriseId, organizationId);
21
22
  return response.status(HttpStatus.OK).json(result);
22
23
  }
23
24
  }
@@ -8,7 +8,7 @@ export class PopulateMetaService {
8
8
  ) {
9
9
  }
10
10
 
11
- async populateMetaData(organization_id: number) {
11
+ async populateMetaData(enterprise_id: number, organization_id: number) {
12
12
  const metadataTables = [
13
13
  'frm_entity_master',
14
14
  'frm_entity_attribute',
@@ -37,7 +37,7 @@ export class PopulateMetaService {
37
37
  if (!listMasterItemsRepo) return;
38
38
 
39
39
  const getStatus = (await listMasterItemsRepo.find({
40
- where: { organization_id: organization_id, code: 'STATUS_ACTIVE' },
40
+ where: { enterprise_id: enterprise_id, code: 'STATUS_ACTIVE' },
41
41
  })) as any[];
42
42
 
43
43
  let status: any;
@@ -49,11 +49,11 @@ export class PopulateMetaService {
49
49
  }
50
50
 
51
51
  let oneToManyId = await listMasterItemsRepo?.find({
52
- where: { value: 'ONE_TO_MANY', organization_id: organization_id },
52
+ where: { value: 'ONE_TO_MANY', enterprise_id: enterprise_id },
53
53
  });
54
54
 
55
55
  let oneToOneId = await listMasterItemsRepo?.find({
56
- where: { value: 'ONE_TO_ONE', organization_id: organization_id },
56
+ where: { value: 'ONE_TO_ONE', enterprise_id: enterprise_id },
57
57
  });
58
58
 
59
59
  // Step 1: Insert basic metadata tables
@@ -76,7 +76,7 @@ export class PopulateMetaService {
76
76
  transformedData = factoryData.map(
77
77
  ({ id, created_date, modified_date, ...rest }) => ({
78
78
  ...rest,
79
- organization_id,
79
+ enterprise_id,
80
80
  level_type: 'ORG',
81
81
  level_id: organization_id,
82
82
  is_workflow: rest.is_workflow == 1 ? true : false,
@@ -87,7 +87,7 @@ export class PopulateMetaService {
87
87
  transformRepo = attributeMasterRepo;
88
88
  const factoryData = await transformRepo?.find({
89
89
  where: {
90
- organization_id: -1,
90
+ enterprise_id: -1,
91
91
  level_type: 'ORG',
92
92
  level_id: -1,
93
93
  },
@@ -96,7 +96,6 @@ export class PopulateMetaService {
96
96
  transformedData = factoryData.map(
97
97
  ({ id, created_date, modified_date, ...rest }) => ({
98
98
  ...rest,
99
- organization_id,
100
99
  level_type: 'ORG',
101
100
  level_id: organization_id,
102
101
  // is_unique: rest.is_unique == 1 ? true : false,
@@ -118,7 +117,6 @@ export class PopulateMetaService {
118
117
  transformedData = factoryData.map(
119
118
  ({ id, created_date, modified_date, ...rest }) => ({
120
119
  ...rest,
121
- organization_id,
122
120
  level_type: 'ORG',
123
121
  level_id: organization_id,
124
122
  status: status,
@@ -171,7 +169,6 @@ export class PopulateMetaService {
171
169
  const { id, mapped_entity_type, display_type, ...rest } = entityTable;
172
170
  entityTable = {
173
171
  ...rest,
174
- organization_id,
175
172
  mapped_entity_type: mapped_entity_type,
176
173
  level_type: 'ORG',
177
174
  level_id: organization_id,
@@ -198,7 +195,6 @@ export class PopulateMetaService {
198
195
  const { id, created_date, modified_date, ...columnRest } = column;
199
196
  const newColumn = {
200
197
  ...columnRest,
201
- organization_id,
202
198
  parent_id: newId,
203
199
  level_type: 'ORG',
204
200
  level_id: organization_id,