Skip to content

Commit

Permalink
Merge pull request #3067 from moodpulse/fix_eds
Browse files Browse the repository at this point in the history
Fix вывода данных о сертификатах
  • Loading branch information
urchinpro authored Sep 11, 2023
2 parents bfc4919 + 88a2f90 commit 5776257
Showing 1 changed file with 1 addition and 18 deletions.
19 changes: 1 addition & 18 deletions l2-frontend/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -368,24 +368,7 @@ export const convertSubjectNameToTitle = (object: any, subjectName: string | nul
console.log(obj);
// eslint-disable-next-line no-console
console.log(subjectName);

if (!obj.SNILS && obj['СНИЛС']) {
obj.SNILS = obj['СНИЛС'];
}

let result = `НЕТ СНИЛС ${name}`;
if (obj.CN) {
if (obj.T && obj.SN && obj.G) {
let CN = obj.CN.replace('"""', '""');

if (CN.length > 1 && CN[0] === '"' && CN[CN.length - 1] === '"') {
CN = CN.slice(1, -1);
}
CN = CN.replace('""', '"');
result = `${!obj.SNILS ? 'НЕТ СНИЛС ' : ''}${obj.SN} ${obj.G}${obj.SNILS ? `, ${obj.SNILS}` : ''}${obj.T}${CN}`;
}
}
return result;
return [obj.SN, obj.G, obj.SNILS, obj.T].filter(Boolean).join(' ');
};

export const validateEmail = (email: string) => Boolean(
Expand Down

0 comments on commit 5776257

Please sign in to comment.