rez_core 5.0.129 → 5.0.131
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/meta/service/entity-list.service.js +2 -3
- package/dist/module/meta/service/entity-list.service.js.map +1 -1
- package/dist/module/meta/service/entity-service-impl.service.js +9 -5
- package/dist/module/meta/service/entity-service-impl.service.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/module/meta/service/entity-list.service.ts +5 -13
- package/src/module/meta/service/entity-service-impl.service.ts +9 -8
package/package.json
CHANGED
|
@@ -189,21 +189,13 @@ export class EntityListService {
|
|
|
189
189
|
parentType: string | null,
|
|
190
190
|
parentId: number | null,
|
|
191
191
|
) {
|
|
192
|
-
|
|
193
192
|
const result = await repo
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
const seqNo = result?.seq_no ?? 0;
|
|
193
|
+
.createQueryBuilder()
|
|
194
|
+
.select('MAX(id)', 'seq_no')
|
|
195
|
+
.getRawOne();
|
|
199
196
|
|
|
200
|
-
const
|
|
201
|
-
// if (parentId) {
|
|
202
|
-
// query += ` AND parent_id = ? AND parent_type = ? `;
|
|
203
|
-
// argsObjectList.push(parentId);
|
|
204
|
-
// argsObjectList.push(parentType);
|
|
205
|
-
// }
|
|
197
|
+
const seqNo = result?.seq_no ?? 0;
|
|
206
198
|
|
|
207
|
-
return
|
|
199
|
+
return seqNo;
|
|
208
200
|
}
|
|
209
201
|
}
|
|
@@ -100,13 +100,14 @@ export class EntityServiceImpl implements EntityService<BaseEntity> {
|
|
|
100
100
|
// loggedInUser?.organization_id || 0,
|
|
101
101
|
// );
|
|
102
102
|
|
|
103
|
-
const
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
103
|
+
const listMasterItemsRepo = this.reflectionHelper.getRepoService('ListMasterItems');
|
|
104
|
+
const statusList = await listMasterItemsRepo.findOne({
|
|
105
|
+
where: {
|
|
106
|
+
code: STATUS_ACTIVE,
|
|
107
|
+
organization_id: loggedInUser?.organization_id || 0
|
|
108
|
+
},
|
|
109
|
+
select: ['id']
|
|
110
|
+
})
|
|
110
111
|
|
|
111
112
|
console.log('Status List:', statusList); // Debug log
|
|
112
113
|
console.log(
|
|
@@ -123,7 +124,7 @@ export class EntityServiceImpl implements EntityService<BaseEntity> {
|
|
|
123
124
|
if (!entityData.level_type)
|
|
124
125
|
entityData.level_type = loggedInUser.level_type;
|
|
125
126
|
if (!entityData.level_id) entityData.level_id = loggedInUser.level_id;
|
|
126
|
-
if (!entityData.status) entityData.status = statusList
|
|
127
|
+
if (!entityData.status) entityData.status = statusList.id;
|
|
127
128
|
}
|
|
128
129
|
|
|
129
130
|
let savedData = repo.save(entityData);
|