rez_core 5.0.286 → 5.0.287
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/view-master.service.d.ts +1 -1
- package/dist/module/meta/service/view-master.service.js +15 -12
- package/dist/module/meta/service/view-master.service.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/module/meta/service/view-master.service.ts +23 -32
package/package.json
CHANGED
|
@@ -85,48 +85,39 @@ export class ViewMasterService extends EntityServiceImpl {
|
|
|
85
85
|
async getEntityData(
|
|
86
86
|
entityType: string,
|
|
87
87
|
id: number,
|
|
88
|
-
|
|
88
|
+
loggedInUserData?: UserData | null,
|
|
89
89
|
) {
|
|
90
90
|
let getTheme = null as any;
|
|
91
91
|
|
|
92
|
-
|
|
92
|
+
try {
|
|
93
|
+
const baseUrl = this.configService.get<string>('REDIRECT_BE_URL');
|
|
93
94
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
getTheme = await firstValueFrom(
|
|
99
|
-
client.send('FRM.entity.getById', {
|
|
100
|
-
entityType: 'SCH',
|
|
101
|
-
id: loggedInUser?.level_id,
|
|
102
|
-
loggedInUser,
|
|
103
|
-
}),
|
|
104
|
-
);
|
|
105
|
-
|
|
106
|
-
// try {
|
|
107
|
-
// const baseUrl = this.configService.get<string>('REDIRECT_BE_URL');
|
|
95
|
+
// Make the GET request with query parameters
|
|
96
|
+
const response = await axios.get<any>(
|
|
97
|
+
`${baseUrl}/school/public/theme_json/${loggedInUserData?.level_id}`,
|
|
108
98
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
99
|
+
{
|
|
100
|
+
headers: {
|
|
101
|
+
'Content-Type': 'application/json',
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
);
|
|
112
105
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
// },
|
|
118
|
-
// );
|
|
119
|
-
|
|
120
|
-
// getTheme = response.data;
|
|
121
|
-
// } catch (error) {
|
|
122
|
-
// console.error('Internal Entity API call failed:', error.message);
|
|
123
|
-
// }
|
|
106
|
+
getTheme = response.data;
|
|
107
|
+
} catch (error) {
|
|
108
|
+
console.error('Internal Entity API call failed:', error.message);
|
|
109
|
+
}
|
|
124
110
|
|
|
125
|
-
const viewMaster = await super.getEntityData(
|
|
111
|
+
const viewMaster = await super.getEntityData(
|
|
112
|
+
entityType,
|
|
113
|
+
id,
|
|
114
|
+
loggedInUserData,
|
|
115
|
+
);
|
|
126
116
|
|
|
127
117
|
return {
|
|
128
118
|
...viewMaster,
|
|
129
|
-
theme_json:
|
|
119
|
+
theme_json:
|
|
120
|
+
getTheme && getTheme[0]?.theme_json ? getTheme[0].theme_json : null,
|
|
130
121
|
};
|
|
131
122
|
}
|
|
132
123
|
|