rez_core 5.0.47 → 5.0.49
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-dynamic.service.js +1 -1
- package/dist/module/meta/service/entity-dynamic.service.js.map +1 -1
- package/dist/module/meta/service/resolver.service.d.ts +3 -1
- package/dist/module/meta/service/resolver.service.js +19 -4
- package/dist/module/meta/service/resolver.service.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/module/meta/service/entity-dynamic.service.ts +1 -1
- package/src/module/meta/service/resolver.service.ts +30 -10
- package/.idea/250218_nodejs_core.iml +0 -12
- package/.idea/codeStyles/Project.xml +0 -59
- package/.idea/codeStyles/codeStyleConfig.xml +0 -5
- package/.idea/inspectionProfiles/Project_Default.xml +0 -6
- package/.idea/modules.xml +0 -8
- package/.idea/prettier.xml +0 -6
- package/.idea/vcs.xml +0 -6
package/package.json
CHANGED
|
@@ -5,6 +5,7 @@ import * as moment from 'moment';
|
|
|
5
5
|
import { ListMasterService } from 'src/module/listmaster/service/list-master.service';
|
|
6
6
|
import { ModuleRef } from '@nestjs/core';
|
|
7
7
|
import { AttributeMasterRepository } from '../repository/attribute-master.repository';
|
|
8
|
+
import { ReflectionHelper } from 'src/utils/service/reflection-helper.service';
|
|
8
9
|
|
|
9
10
|
@Injectable()
|
|
10
11
|
export class ResolverService {
|
|
@@ -15,7 +16,8 @@ export class ResolverService {
|
|
|
15
16
|
@Inject('ListMasterService')
|
|
16
17
|
private readonly listMasterService: ListMasterService,
|
|
17
18
|
private readonly moduleRef: ModuleRef,
|
|
18
|
-
private readonly attributeMasterRepo: AttributeMasterRepository
|
|
19
|
+
private readonly attributeMasterRepo: AttributeMasterRepository,
|
|
20
|
+
private readonly reflectionHelper: ReflectionHelper,
|
|
19
21
|
) {}
|
|
20
22
|
|
|
21
23
|
private async getMediaDataService() {
|
|
@@ -33,7 +35,11 @@ export class ResolverService {
|
|
|
33
35
|
entityData: any,
|
|
34
36
|
entityType: string,
|
|
35
37
|
): Promise<any> {
|
|
36
|
-
const attributeItems =
|
|
38
|
+
const attributeItems =
|
|
39
|
+
await this.attributeMasterRepo.findAttributesByMappedEntityType(
|
|
40
|
+
entityType,
|
|
41
|
+
loggedInUser.organization_id,
|
|
42
|
+
);
|
|
37
43
|
|
|
38
44
|
const resolvedEntityData = { ...entityData };
|
|
39
45
|
|
|
@@ -188,18 +194,32 @@ export class ResolverService {
|
|
|
188
194
|
if (Array.isArray(rawValue)) {
|
|
189
195
|
const resolvedValues: string[] = [];
|
|
190
196
|
for (const code of rawValue) {
|
|
191
|
-
const
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
197
|
+
const repo =
|
|
198
|
+
await this.reflectionHelper.getRepoService('ListMasterItems');
|
|
199
|
+
|
|
200
|
+
let item = await repo.findOne({
|
|
201
|
+
where: {
|
|
202
|
+
id: code,
|
|
203
|
+
organization_id: loggedInUser.organization_id,
|
|
204
|
+
},
|
|
205
|
+
});
|
|
195
206
|
resolvedValues.push(item?.[attr.data_source_attribute] ?? code);
|
|
196
207
|
}
|
|
197
208
|
return resolvedValues;
|
|
198
209
|
} else {
|
|
199
|
-
const [item] = await this.dataSource.query(
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
);
|
|
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
|
+
const repo =
|
|
216
|
+
await this.reflectionHelper.getRepoService('ListMasterItems');
|
|
217
|
+
let item = await repo.findOne({
|
|
218
|
+
where: {
|
|
219
|
+
id: rawValue,
|
|
220
|
+
organization_id: loggedInUser.organization_id,
|
|
221
|
+
},
|
|
222
|
+
});
|
|
203
223
|
return item?.[attr.data_source_attribute] ?? rawValue;
|
|
204
224
|
}
|
|
205
225
|
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<module type="WEB_MODULE" version="4">
|
|
3
|
-
<component name="NewModuleRootManager">
|
|
4
|
-
<content url="file://$MODULE_DIR$">
|
|
5
|
-
<excludeFolder url="file://$MODULE_DIR$/.tmp" />
|
|
6
|
-
<excludeFolder url="file://$MODULE_DIR$/temp" />
|
|
7
|
-
<excludeFolder url="file://$MODULE_DIR$/tmp" />
|
|
8
|
-
</content>
|
|
9
|
-
<orderEntry type="inheritedJdk" />
|
|
10
|
-
<orderEntry type="sourceFolder" forTests="false" />
|
|
11
|
-
</component>
|
|
12
|
-
</module>
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
<component name="ProjectCodeStyleConfiguration">
|
|
2
|
-
<code_scheme name="Project" version="173">
|
|
3
|
-
<HTMLCodeStyleSettings>
|
|
4
|
-
<option name="HTML_SPACE_INSIDE_EMPTY_TAG" value="true" />
|
|
5
|
-
</HTMLCodeStyleSettings>
|
|
6
|
-
<JSCodeStyleSettings version="0">
|
|
7
|
-
<option name="FORCE_SEMICOLON_STYLE" value="true" />
|
|
8
|
-
<option name="SPACE_BEFORE_FUNCTION_LEFT_PARENTH" value="false" />
|
|
9
|
-
<option name="USE_DOUBLE_QUOTES" value="false" />
|
|
10
|
-
<option name="FORCE_QUOTE_STYlE" value="true" />
|
|
11
|
-
<option name="ENFORCE_TRAILING_COMMA" value="WhenMultiline" />
|
|
12
|
-
<option name="SPACES_WITHIN_OBJECT_LITERAL_BRACES" value="true" />
|
|
13
|
-
<option name="SPACES_WITHIN_IMPORTS" value="true" />
|
|
14
|
-
</JSCodeStyleSettings>
|
|
15
|
-
<TypeScriptCodeStyleSettings version="0">
|
|
16
|
-
<option name="FORCE_SEMICOLON_STYLE" value="true" />
|
|
17
|
-
<option name="SPACE_BEFORE_FUNCTION_LEFT_PARENTH" value="false" />
|
|
18
|
-
<option name="USE_DOUBLE_QUOTES" value="false" />
|
|
19
|
-
<option name="FORCE_QUOTE_STYlE" value="true" />
|
|
20
|
-
<option name="ENFORCE_TRAILING_COMMA" value="WhenMultiline" />
|
|
21
|
-
<option name="SPACES_WITHIN_OBJECT_LITERAL_BRACES" value="true" />
|
|
22
|
-
<option name="SPACES_WITHIN_IMPORTS" value="true" />
|
|
23
|
-
</TypeScriptCodeStyleSettings>
|
|
24
|
-
<VueCodeStyleSettings>
|
|
25
|
-
<option name="INTERPOLATION_NEW_LINE_AFTER_START_DELIMITER" value="false" />
|
|
26
|
-
<option name="INTERPOLATION_NEW_LINE_BEFORE_END_DELIMITER" value="false" />
|
|
27
|
-
</VueCodeStyleSettings>
|
|
28
|
-
<codeStyleSettings language="HTML">
|
|
29
|
-
<option name="SOFT_MARGINS" value="80" />
|
|
30
|
-
<indentOptions>
|
|
31
|
-
<option name="INDENT_SIZE" value="2" />
|
|
32
|
-
<option name="CONTINUATION_INDENT_SIZE" value="2" />
|
|
33
|
-
<option name="TAB_SIZE" value="2" />
|
|
34
|
-
</indentOptions>
|
|
35
|
-
</codeStyleSettings>
|
|
36
|
-
<codeStyleSettings language="JavaScript">
|
|
37
|
-
<option name="SOFT_MARGINS" value="80" />
|
|
38
|
-
<indentOptions>
|
|
39
|
-
<option name="INDENT_SIZE" value="2" />
|
|
40
|
-
<option name="CONTINUATION_INDENT_SIZE" value="2" />
|
|
41
|
-
<option name="TAB_SIZE" value="2" />
|
|
42
|
-
</indentOptions>
|
|
43
|
-
</codeStyleSettings>
|
|
44
|
-
<codeStyleSettings language="TypeScript">
|
|
45
|
-
<option name="SOFT_MARGINS" value="80" />
|
|
46
|
-
<indentOptions>
|
|
47
|
-
<option name="INDENT_SIZE" value="2" />
|
|
48
|
-
<option name="CONTINUATION_INDENT_SIZE" value="2" />
|
|
49
|
-
<option name="TAB_SIZE" value="2" />
|
|
50
|
-
</indentOptions>
|
|
51
|
-
</codeStyleSettings>
|
|
52
|
-
<codeStyleSettings language="Vue">
|
|
53
|
-
<option name="SOFT_MARGINS" value="80" />
|
|
54
|
-
<indentOptions>
|
|
55
|
-
<option name="CONTINUATION_INDENT_SIZE" value="2" />
|
|
56
|
-
</indentOptions>
|
|
57
|
-
</codeStyleSettings>
|
|
58
|
-
</code_scheme>
|
|
59
|
-
</component>
|
package/.idea/modules.xml
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<project version="4">
|
|
3
|
-
<component name="ProjectModuleManager">
|
|
4
|
-
<modules>
|
|
5
|
-
<module fileurl="file://$PROJECT_DIR$/.idea/250218_nodejs_core.iml" filepath="$PROJECT_DIR$/.idea/250218_nodejs_core.iml" />
|
|
6
|
-
</modules>
|
|
7
|
-
</component>
|
|
8
|
-
</project>
|
package/.idea/prettier.xml
DELETED