rez_core 2.1.49 → 2.1.51

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": "2.1.49",
3
+ "version": "2.1.51",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "private": false,
@@ -79,6 +79,7 @@ export class SavedFilterService extends EntityServiceImpl {
79
79
  ENTITYTYPE_SAVEDFILTERMASTER,
80
80
  master.id,
81
81
  );
82
+
82
83
  if (!existing) {
83
84
  throw new BadRequestException('Saved filter not found.');
84
85
  }
@@ -87,7 +88,7 @@ export class SavedFilterService extends EntityServiceImpl {
87
88
  name: master.name,
88
89
  organization_id: master.organization_id,
89
90
  enterprise_id: master.enterprise_id,
90
- id: master.id, // Include ID to check for updates
91
+ id: master.id, // Include ID to allow same-name check during update
91
92
  });
92
93
 
93
94
  if (nameExists) {
@@ -100,10 +101,17 @@ export class SavedFilterService extends EntityServiceImpl {
100
101
  if (filterDetails?.length) {
101
102
  await this.savedFilterRepo.deleteDetailsByCode(updated.code);
102
103
 
103
- const prepared = filterDetails.map((detail: any) => ({
104
- ...detail,
105
- mapped_filter_code: updated.code,
106
- }));
104
+ const prepared = filterDetails.map((detail: any) => {
105
+ const isMultiSelect = Array.isArray(detail.filter_value);
106
+ return {
107
+ ...detail,
108
+ mapped_filter_code: updated.code,
109
+ filter_value: isMultiSelect
110
+ ? detail.filter_value.join(',')
111
+ : detail.filter_value,
112
+ data_type: isMultiSelect ? 'multiselect' : detail.data_type,
113
+ };
114
+ });
107
115
 
108
116
  await this.savedFilterRepo.saveDetails(prepared);
109
117
  }
@@ -133,6 +141,11 @@ export class SavedFilterService extends EntityServiceImpl {
133
141
  await this.savedFilterRepo.deleteDetailsByCode(entityData.code);
134
142
 
135
143
  await repoService.delete(entityId);
144
+
145
+ return {
146
+ success: true,
147
+ message: `Entity with id ${entityId} deleted successfully.`,
148
+ };
136
149
  }
137
150
 
138
151
  async getDetailsByCode(code: string): Promise<SavedFilterDetail[]> {
@@ -178,11 +178,7 @@ export class EntityController {
178
178
  throw new NotFoundException(`No entity found for id "${id}"`);
179
179
  }
180
180
 
181
- await entityService.deleteEntity(entityType, id);
182
-
183
- return {
184
- success: true,
185
- };
181
+ return await entityService.deleteEntity(entityType, id);
186
182
  }
187
183
 
188
184
  @Post('getFilteredDataWithTabs/:entity_type')
@@ -114,6 +114,11 @@ export class EntityServiceImpl implements EntityService<BaseEntity> {
114
114
  }
115
115
 
116
116
  await repoService.delete(entityId);
117
+
118
+ return {
119
+ success: true,
120
+ message: `Entity with id ${entityId} deleted successfully.`,
121
+ };
117
122
  }
118
123
 
119
124
  async findByCode(entityType: string, code: string): Promise<BaseEntity> {
@@ -50,4 +50,7 @@ export class UserData extends BaseEntity {
50
50
 
51
51
  @Column({ type: 'varchar', nullable: true })
52
52
  last_level_id: string;
53
+
54
+ @Column({ nullable: true })
55
+ date: Date;
53
56
  }