From 4fa8220534acc03ced466dfe737655cee385971a Mon Sep 17 00:00:00 2001 From: Well Date: Mon, 11 Sep 2023 11:48:06 +0800 Subject: [PATCH 1/4] Update utils.ts --- l2-frontend/src/utils.ts | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/l2-frontend/src/utils.ts b/l2-frontend/src/utils.ts index 1ab04e6884..1bf980b298 100644 --- a/l2-frontend/src/utils.ts +++ b/l2-frontend/src/utils.ts @@ -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( From 30fc26b37425a843e22a4e4cff59d1460c41688e Mon Sep 17 00:00:00 2001 From: Sergei Kasianenko Date: Mon, 11 Sep 2023 20:34:42 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=D0=BE=D1=82=D0=BE=D0=B1=D1=80=D0=B0=D0=B6?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D0=B5=20=D1=81=D0=B5=D1=80=D1=82=D0=B8=D1=84?= =?UTF-8?q?=D0=B8=D0=BA=D0=B0=D1=82=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- l2-frontend/src/utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/l2-frontend/src/utils.ts b/l2-frontend/src/utils.ts index 1bf980b298..2f7a4409fa 100644 --- a/l2-frontend/src/utils.ts +++ b/l2-frontend/src/utils.ts @@ -368,7 +368,7 @@ export const convertSubjectNameToTitle = (object: any, subjectName: string | nul console.log(obj); // eslint-disable-next-line no-console console.log(subjectName); - return `${obj.SN} - ${obj.G}-${obj['СНИЛС']} ${obj.T}`; + return `${obj.SN} ${obj.G} ${obj.SNILS} ${obj.T ? obj.T : ''}`; }; export const validateEmail = (email: string) => Boolean( From c343af050e98b2bcac0edbdfdcd443733315cfb5 Mon Sep 17 00:00:00 2001 From: Sergei Kasianenko Date: Mon, 11 Sep 2023 20:42:50 +0800 Subject: [PATCH 3/4] fix --- l2-frontend/src/utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/l2-frontend/src/utils.ts b/l2-frontend/src/utils.ts index 2f7a4409fa..4f38abcb99 100644 --- a/l2-frontend/src/utils.ts +++ b/l2-frontend/src/utils.ts @@ -368,7 +368,7 @@ export const convertSubjectNameToTitle = (object: any, subjectName: string | nul console.log(obj); // eslint-disable-next-line no-console console.log(subjectName); - return `${obj.SN} ${obj.G} ${obj.SNILS} ${obj.T ? obj.T : ''}`; + return [obj.SN, obj.G, obj.SNILS, `${obj.T ? obj.T : ''}`].filter(Boolean).join(' '); }; export const validateEmail = (email: string) => Boolean( From 88a2f903d28d9addd8e6c8cfddfb8b3ee404226d Mon Sep 17 00:00:00 2001 From: Sergei Kasianenko Date: Mon, 11 Sep 2023 20:44:39 +0800 Subject: [PATCH 4/4] fix --- l2-frontend/src/utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/l2-frontend/src/utils.ts b/l2-frontend/src/utils.ts index 4f38abcb99..3c2ba8fa7f 100644 --- a/l2-frontend/src/utils.ts +++ b/l2-frontend/src/utils.ts @@ -368,7 +368,7 @@ export const convertSubjectNameToTitle = (object: any, subjectName: string | nul console.log(obj); // eslint-disable-next-line no-console console.log(subjectName); - return [obj.SN, obj.G, obj.SNILS, `${obj.T ? obj.T : ''}`].filter(Boolean).join(' '); + return [obj.SN, obj.G, obj.SNILS, obj.T].filter(Boolean).join(' '); }; export const validateEmail = (email: string) => Boolean(