Skip to content

Commit da3f027

Browse files
authored
Merge pull request #2151 from tekdi/release-1.12.0
Release 1.12.0
2 parents d5735d6 + 29f6dd4 commit da3f027

File tree

3 files changed

+27
-26
lines changed

3 files changed

+27
-26
lines changed

apps/learner-web-app/src/app/sso/page.tsx

Lines changed: 25 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -200,30 +200,32 @@ const SSOContent = () => {
200200
if (res?.result?.userData?.customFields) {
201201
res.result.userData.customFields.forEach((field: any) => {
202202
const { label, selectedValues } = field;
203-
localStorage.setItem(
204-
FilterKey[label as keyof typeof FilterKey],
205-
JSON.stringify(selectedValues)
206-
);
207-
if(label === 'EMP_GROUP') {
208-
localStorage.setItem(FilterKey.GROUP_MEMBERSHIP, JSON.stringify(selectedValues));
209-
}
210-
211-
// Map the label to the corresponding FilterKey and store in localStorage
212-
// switch (label) {
213-
// case 'GROUP_MEMBERSHIP':
214-
// localStorage.setItem(FilterKey.GROUP_MEMBERSHIP, selectedValues);
215-
// break;
216-
// case 'JOB_FAMILY':
217-
// localStorage.setItem(FilterKey.JOB_FAMILY, selectedValues);
218-
// break;
219-
// case 'PSU':
220-
// localStorage.setItem(FilterKey.PSU, selectedValues);
221-
// break;
222-
// default:
223-
// // For any other custom fields, store them as is
224-
// localStorage.setItem(label, selectedValues);
225-
// break;
203+
// localStorage.setItem(
204+
// FilterKey[label as keyof typeof FilterKey],
205+
// JSON.stringify(selectedValues)
206+
// );
207+
// if(label === 'EMP_GROUP') {
208+
// localStorage.setItem(FilterKey.GROUP_MEMBERSHIP, JSON.stringify(selectedValues));
226209
// }
210+
211+
// Map the label to the corresponding FilterKey and store in localStorage
212+
switch (label) {
213+
case 'GROUP_MEMBERSHIP':
214+
localStorage.setItem(FilterKey.GROUP_MEMBERSHIP, JSON.stringify(selectedValues));
215+
break;
216+
case 'JOB_FAMILY':
217+
localStorage.setItem(FilterKey.JOB_FAMILY, JSON.stringify(selectedValues));
218+
break;
219+
case 'PSU':
220+
localStorage.setItem(FilterKey.PSU, JSON.stringify(selectedValues));
221+
break;
222+
default:
223+
// For any other custom fields, store them as is
224+
localStorage.setItem(FilterKey.GROUP_MEMBERSHIP, JSON.stringify(["NA"]));
225+
localStorage.setItem(FilterKey.JOB_FAMILY, JSON.stringify(["NA"]));
226+
localStorage.setItem(FilterKey.PSU, JSON.stringify(["NA"]));
227+
break;
228+
}
227229
});
228230
}
229231
const uiConfig = userResponse?.tenantData[0]?.params?.uiConfig;

mfes/youthNet/src/pages/employee-details/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ const EmployeeDetailsPage = () => {
232232
let userMandatoryCertificateStatus = { data: [] };
233233
let userOptionalCertificateStatus = { data: [] };
234234

235-
if (tenantId && mandatoryIds.length > 0 && optionalIds.length > 0) {
235+
if (tenantId &&( mandatoryIds.length > 0 || optionalIds.length > 0)) {
236236
[userMandatoryCertificateStatus, userOptionalCertificateStatus] = await Promise.all([
237237
fetchUserCertificateStatus([userId], mandatoryIds),
238238
fetchUserCertificateStatus([userId], optionalIds)

mfes/youthNet/src/pages/manager-dashboard/index.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ const [employeeDataResponse, setEmployeeDataResponse] = useState<any[]>([]);
316316
console.log('activeOptionalIds', activeOptionalIds);
317317
console.log('currentEmployeeIds', currentEmployeeIds);
318318

319-
if (activeMandatoryIds.length > 0 && activeOptionalIds.length > 0 && currentEmployeeIds.length > 0) {
319+
if ((activeMandatoryIds.length > 0 || activeOptionalIds.length > 0 )&& currentEmployeeIds.length > 0) {
320320
try {
321321
[userMandatoryCertificateStatus, userOptionalCertificateStatus] = await Promise.all([
322322
fetchUserCertificateStatus(currentEmployeeIds, activeMandatoryIds),
@@ -332,7 +332,6 @@ const [employeeDataResponse, setEmployeeDataResponse] = useState<any[]>([]);
332332
// Process certificate status data for easier lookup
333333
const mandatoryStatusMap = new Map();
334334
const optionalStatusMap = new Map();
335-
336335
// Process mandatory certificate status
337336
userMandatoryCertificateStatus.data?.forEach((item: any) => {
338337
if (!mandatoryStatusMap.has(item.userId)) {

0 commit comments

Comments
 (0)