rez_core 5.0.54 → 5.0.56
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/resolver.service.js +47 -17
- package/dist/module/meta/service/resolver.service.js.map +1 -1
- package/dist/module/workflow/repository/action-category.repository.js +5 -5
- package/dist/module/workflow/repository/action-category.repository.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/module/meta/service/resolver.service.ts +49 -23
- package/src/module/workflow/repository/action-category.repository.ts +5 -5
- package/src/resources/dev.properties.yaml +1 -1
- package/.idea/prettier.xml +0 -6
package/package.json
CHANGED
|
@@ -18,7 +18,8 @@ export class ResolverService {
|
|
|
18
18
|
private readonly moduleRef: ModuleRef,
|
|
19
19
|
private readonly attributeMasterRepo: AttributeMasterRepository,
|
|
20
20
|
private readonly reflectionHelper: ReflectionHelper,
|
|
21
|
-
) {
|
|
21
|
+
) {
|
|
22
|
+
}
|
|
22
23
|
|
|
23
24
|
private async getMediaDataService() {
|
|
24
25
|
if (!this.mediaDataService) {
|
|
@@ -139,7 +140,11 @@ export class ResolverService {
|
|
|
139
140
|
|
|
140
141
|
// fetch attribute meta only for the given attributeKey
|
|
141
142
|
const [attr] = await this.dataSource.query(
|
|
142
|
-
`SELECT *
|
|
143
|
+
`SELECT *
|
|
144
|
+
FROM frm_entity_attribute
|
|
145
|
+
WHERE mapped_entity_type = $1
|
|
146
|
+
AND organization_id = $2
|
|
147
|
+
AND attribute_key = $3`,
|
|
143
148
|
[entityType, loggedInUser.organization_id, attrKey],
|
|
144
149
|
);
|
|
145
150
|
|
|
@@ -148,7 +153,10 @@ export class ResolverService {
|
|
|
148
153
|
// -------- ENTITY data_source_type --------
|
|
149
154
|
if (attr.data_source_type === 'entity') {
|
|
150
155
|
const [entityDef] = await this.dataSource.query(
|
|
151
|
-
`SELECT *
|
|
156
|
+
`SELECT *
|
|
157
|
+
FROM frm_entity_master
|
|
158
|
+
WHERE mapped_entity_type = $1
|
|
159
|
+
AND organization_id = $2`,
|
|
152
160
|
[attr.datasource_list, loggedInUser.organization_id],
|
|
153
161
|
);
|
|
154
162
|
|
|
@@ -161,8 +169,13 @@ export class ResolverService {
|
|
|
161
169
|
for (const code of rawValue) {
|
|
162
170
|
const query =
|
|
163
171
|
tableName === 'sso_organization'
|
|
164
|
-
? `SELECT *
|
|
165
|
-
|
|
172
|
+
? `SELECT *
|
|
173
|
+
FROM ${tableName}
|
|
174
|
+
WHERE code = $1`
|
|
175
|
+
: `SELECT *
|
|
176
|
+
FROM ${tableName}
|
|
177
|
+
WHERE id = $1
|
|
178
|
+
AND organization_id = $2`;
|
|
166
179
|
|
|
167
180
|
const params =
|
|
168
181
|
tableName === 'sso_organization'
|
|
@@ -176,8 +189,13 @@ export class ResolverService {
|
|
|
176
189
|
} else {
|
|
177
190
|
const query =
|
|
178
191
|
tableName === 'sso_organization'
|
|
179
|
-
? `SELECT *
|
|
180
|
-
|
|
192
|
+
? `SELECT *
|
|
193
|
+
FROM ${tableName}
|
|
194
|
+
WHERE id = $1`
|
|
195
|
+
: `SELECT *
|
|
196
|
+
FROM ${tableName}
|
|
197
|
+
WHERE id = $1
|
|
198
|
+
AND organization_id = $2`;
|
|
181
199
|
|
|
182
200
|
const params =
|
|
183
201
|
tableName === 'sso_organization'
|
|
@@ -197,7 +215,7 @@ export class ResolverService {
|
|
|
197
215
|
const repo =
|
|
198
216
|
await this.reflectionHelper.getRepoService('ListMasterItems');
|
|
199
217
|
|
|
200
|
-
let item =
|
|
218
|
+
let item = repo.findOne({
|
|
201
219
|
where: {
|
|
202
220
|
id: code,
|
|
203
221
|
organization_id: loggedInUser.organization_id,
|
|
@@ -207,16 +225,11 @@ export class ResolverService {
|
|
|
207
225
|
}
|
|
208
226
|
return resolvedValues;
|
|
209
227
|
} else {
|
|
210
|
-
// const [item] = await this.dataSource.query(
|
|
211
|
-
// `SELECT * FROM frm_list_master_items WHERE id = $1 AND organization_id = $2`,
|
|
212
|
-
// [rawValue, loggedInUser.organization_id],
|
|
213
|
-
// );
|
|
214
|
-
|
|
215
228
|
const repo =
|
|
216
229
|
await this.reflectionHelper.getRepoService('ListMasterItems');
|
|
217
|
-
let item =
|
|
230
|
+
let item = repo.findOne({
|
|
218
231
|
where: {
|
|
219
|
-
id: rawValue,
|
|
232
|
+
id: Number(rawValue),
|
|
220
233
|
organization_id: loggedInUser.organization_id,
|
|
221
234
|
},
|
|
222
235
|
});
|
|
@@ -243,8 +256,11 @@ export class ResolverService {
|
|
|
243
256
|
|
|
244
257
|
// fetch attribute meta
|
|
245
258
|
const [attr] = await this.dataSource.query(
|
|
246
|
-
`SELECT *
|
|
247
|
-
|
|
259
|
+
`SELECT *
|
|
260
|
+
FROM frm_entity_attribute
|
|
261
|
+
WHERE mapped_entity_type = $1
|
|
262
|
+
AND organization_id = $2
|
|
263
|
+
AND attribute_key = $3`,
|
|
248
264
|
[entityType, loggedInUser.organization_id, attrKey],
|
|
249
265
|
);
|
|
250
266
|
|
|
@@ -253,8 +269,10 @@ export class ResolverService {
|
|
|
253
269
|
// -------- ENTITY data_source_type --------
|
|
254
270
|
if (attr.data_source_type === 'entity') {
|
|
255
271
|
const [entityDef] = await this.dataSource.query(
|
|
256
|
-
`SELECT *
|
|
257
|
-
|
|
272
|
+
`SELECT *
|
|
273
|
+
FROM frm_entity_master
|
|
274
|
+
WHERE mapped_entity_type = $1
|
|
275
|
+
AND organization_id = $2`,
|
|
258
276
|
[attr.datasource_list, loggedInUser.organization_id],
|
|
259
277
|
);
|
|
260
278
|
|
|
@@ -264,8 +282,13 @@ export class ResolverService {
|
|
|
264
282
|
|
|
265
283
|
const query =
|
|
266
284
|
tableName === 'sso_organization'
|
|
267
|
-
? `SELECT id
|
|
268
|
-
|
|
285
|
+
? `SELECT id
|
|
286
|
+
FROM ${tableName}
|
|
287
|
+
WHERE ${attr.data_source_attribute} = $1`
|
|
288
|
+
: `SELECT id
|
|
289
|
+
FROM ${tableName}
|
|
290
|
+
WHERE ${attr.data_source_attribute} = $1
|
|
291
|
+
AND organization_id = $2`;
|
|
269
292
|
|
|
270
293
|
const params =
|
|
271
294
|
tableName === 'sso_organization'
|
|
@@ -279,8 +302,11 @@ export class ResolverService {
|
|
|
279
302
|
// -------- MASTER data_source_type --------
|
|
280
303
|
else if (attr.data_source_type === 'master') {
|
|
281
304
|
const [item] = await this.dataSource.query(
|
|
282
|
-
`SELECT id
|
|
283
|
-
|
|
305
|
+
`SELECT id
|
|
306
|
+
FROM frm_list_master_items
|
|
307
|
+
WHERE ${attr.data_source_attribute} = $1
|
|
308
|
+
AND organization_id = $2
|
|
309
|
+
AND listtype = $3`,
|
|
284
310
|
[displayValue, loggedInUser.organization_id, attr.datasource_list],
|
|
285
311
|
);
|
|
286
312
|
return item?.id ?? displayValue;
|
|
@@ -57,15 +57,15 @@ export class ActionCategoryRepository {
|
|
|
57
57
|
async actionscategoryinfo(entity_type: string) {
|
|
58
58
|
const result = await this.actionCategoryRepository
|
|
59
59
|
.createQueryBuilder('ac')
|
|
60
|
-
.select(
|
|
60
|
+
.select('ac.*')
|
|
61
61
|
.where('ac.mapped_entity_type = :entityType', { entityType: entity_type })
|
|
62
62
|
.getRawMany();
|
|
63
63
|
|
|
64
64
|
const mapped = result.map((row) => ({
|
|
65
|
-
label: row.
|
|
66
|
-
logo: row.
|
|
67
|
-
|
|
68
|
-
value: String(row.
|
|
65
|
+
label: row.name,
|
|
66
|
+
logo: row.logo,
|
|
67
|
+
modalname: row.modalname,
|
|
68
|
+
value: String(row.id),
|
|
69
69
|
}));
|
|
70
70
|
|
|
71
71
|
return mapped.reduce(
|
|
@@ -5,7 +5,7 @@ DB_PORT: '5432'
|
|
|
5
5
|
DB_USER: 'root'
|
|
6
6
|
DB_PASS: 'Rezolut123'
|
|
7
7
|
DB_NAME: 'universal'
|
|
8
|
-
DB_SCHEMA: '
|
|
8
|
+
DB_SCHEMA: 'preprod_ether_crm'
|
|
9
9
|
MASTER_KEY: '0QZ2eRJv5oVILYnyBlC+FbSGVQiWKReh'
|
|
10
10
|
MASTER_IV: 'heuUQf5uPVtkotrFAOKUVw=='
|
|
11
11
|
SECRET_KEY: '1hard_to_guess_secret7890a'
|