rez_core 2.1.49 → 2.1.50
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/dist/module/filter/service/saved-filter.service.js +11 -4
- package/dist/module/filter/service/saved-filter.service.js.map +1 -1
- package/dist/module/user/entity/user.entity.d.ts +1 -0
- package/dist/module/user/entity/user.entity.js +4 -0
- package/dist/module/user/entity/user.entity.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/module/filter/service/saved-filter.service.ts +13 -5
- package/src/module/user/entity/user.entity.ts +3 -0
package/package.json
CHANGED
|
@@ -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
|
|
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
|
-
|
|
105
|
-
|
|
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
|
}
|