Skip to content

Commit

Permalink
Update utils.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
Wellheor1 committed Sep 11, 2023
1 parent bfc4919 commit 4fa8220
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['СНИЛС']} ${obj.T}`;
};

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

0 comments on commit 4fa8220

Please sign in to comment.