rez_core 3.1.67 → 3.1.68

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": "3.1.67",
3
+ "version": "3.1.68",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "private": false,
@@ -29,4 +29,8 @@ export class FieldLovsRepository {
29
29
  where: { mapper_field_id },
30
30
  })
31
31
  }
32
+
33
+ async deleteByMapperFieldId(mapper_field_id: number) {
34
+ return await this.fieldLovMapperRepository.delete({ mapper_field_id });
35
+ }
32
36
  }
@@ -27,4 +27,8 @@ export class FieldMapperRepository {
27
27
  },
28
28
  );
29
29
  }
30
+
31
+ async deleteByMapperId(mapper_id: number) {
32
+ return await this.fieldMapperRepository.delete({ mapper_id });
33
+ }
30
34
  }
@@ -37,6 +37,16 @@ export class FieldMapperService extends EntityServiceImpl {
37
37
  }
38
38
 
39
39
  async createFieldMappers(dtos: FieldMapperDto[], loggedInUser: UserData) {
40
+ let mapperId = dtos[0].mapper_id;
41
+
42
+ let existingMappers = await this.fieldMapperRepository.findByMapperId(mapperId);
43
+
44
+ for (const mapper of existingMappers) {
45
+ await this.fieldLovsRepository.deleteByMapperFieldId(mapper.id);
46
+ }
47
+
48
+ await this.fieldMapperRepository.deleteByMapperId(mapperId);
49
+
40
50
  let result: BaseEntity[] = [];
41
51
  for (const dto of dtos) {
42
52
  const fieldMapper = await this.createEntity(dto, loggedInUser);
@@ -91,7 +91,6 @@ export class WorkflowAutomationService extends EntityServiceImpl {
91
91
  filter_scope: 'RULE',
92
92
  organization_id: loggedInUser.organization_id,
93
93
  enterprise_id: loggedInUser.enterprise_id,
94
- applicable_entity_type: workflow.applicable_entity_type,
95
94
  };
96
95
 
97
96
  if (workflow.condition_filter_code) {
@@ -130,7 +129,6 @@ export class WorkflowAutomationService extends EntityServiceImpl {
130
129
  if (event.triggerType === 'on_schedule') {
131
130
  // just store JSON directly into schedule column
132
131
  workflow.schedule = event?.scheduleJson ?? null;
133
- workflow.applicable_entity_type= workflow.applicable_entity_type,
134
132
  this.logger.log(
135
133
  `Stored schedule JSON for workflow ${workflow.id}: ${JSON.stringify(
136
134
  workflow.schedule,
@@ -305,7 +303,7 @@ export class WorkflowAutomationService extends EntityServiceImpl {
305
303
  if (workflowAutomation.trigger_type === 'on_schedule') {
306
304
  event = {
307
305
  triggerType: workflowAutomation.trigger_type,
308
- scheduleJson: workflowAutomation.schedule, // direct from DB
306
+ scheduleJson: workflowAutomation.schedule,
309
307
  };
310
308
  }
311
309
 
@@ -1,5 +0,0 @@
1
- {
2
- "recommendations": [
3
- "dbaeumer.vscode-eslint"
4
- ]
5
- }