From e8d8216673f4712935c67d9e966c6381b681e42a Mon Sep 17 00:00:00 2001 From: Eduard Tihomirov Date: Thu, 23 Jan 2025 11:40:12 +0300 Subject: [PATCH 01/20] SUPPORT-8783: Add landing --- .../template/app/component/app_header.html | 13 ++- .../template/app/component/home_landing.html | 82 +++++++++++++++++++ .../src/resources/template/webbpm/webbpm.html | 13 ++- .../src/ts/modules/app/app-routing.module.ts | 6 ++ frontend/src/ts/modules/app/app.module.ts | 4 +- .../app/component/app-header.component.ts | 12 ++- .../app/component/home-landing.component.ts | 49 +++++++++++ .../webbpm/component/webbpm.component.ts | 9 +- 8 files changed, 178 insertions(+), 10 deletions(-) create mode 100644 frontend/src/resources/template/app/component/home_landing.html create mode 100644 frontend/src/ts/modules/app/component/home-landing.component.ts diff --git a/frontend/src/resources/template/app/component/app_header.html b/frontend/src/resources/template/app/component/app_header.html index e5cd4d7..31d4458 100644 --- a/frontend/src/resources/template/app/component/app_header.html +++ b/frontend/src/resources/template/app/component/app_header.html @@ -1,9 +1,14 @@ diff --git a/frontend/src/resources/template/app/component/home_landing.html b/frontend/src/resources/template/app/component/home_landing.html new file mode 100644 index 0000000..4f02f27 --- /dev/null +++ b/frontend/src/resources/template/app/component/home_landing.html @@ -0,0 +1,82 @@ +
+
+
Личный кабинет для ведения воинского учета в организациях
+
+
+
Кому доступен личный кабинет?
+
Организациям, за ĸоторыми заĸреплена обязанность по осуществлению воинсĸого учета в соответствии с ФЗ от 28.03.1998 No 53-ФЗ
+
+
+
Для чего нужен личный кабинет?
+
Для своевременной и оперативной передачи сведений в военĸоматы в элеĸтронном виде
+
+
+
+
+
+
+
+
Как получить доступ к Личному кабинету?
+
+
+
+
Необходимо авторизоваться
+
Потребуется подтвержденная учетная запись организации
+
Доступ предоставляется тольĸо сотрудниĸу, наделенному соответствующими полномочиями (ролью) на ведения воинсĸого учета внутри организации
+
+ +
+
+
+
+
Какие виды сведений доступны для отправки?
+
+
+
+
+ Сведения о приеме на работу (увольнении), зачислении в образовательную организацию (отчислении) +
Срок передачи сведений: до 5 дней
+
+
+ Изменения сведений сотрудников, необходимых для ведения воинского учета +
Срок передачи сведений: до 5 дней
+
+
+ Сообщение о гражданах, не состоящих, но обязанных состоять на воинском учете +
Срок передачи сведений: до 3 дней
+
+
+
+
+
+
+ Ежегодное предоставление списка граждан мужского пола, подлежащих первоначальной постановке на воинский учет в год достижения ими возраста 17 лет +
Срок передачи сведений: ежегодно, в срок до 1 ноября
+
+
+ Ежегодное предоставление списка сотрудников/обучающихся в организации, подлежащих воинскому учету +
Срок передачи сведений: ежегодно, по согласованию с военкоматом
+
+
+
+
+
+
+
Как передавать сведения?
+
+
Войдите в личный ĸабинет организации через Госуслуги
+
Подготовьте файл-csv с данными в соответствии с форматом в личном кабинете организации
+
Убедитесь, что все данные в файле введены ĸорреĸтно
+
Выберите необходимый вид сведений и загрузите файл
+
Следите за статусом приема
+
+
+
+
+ Если в файле будут ошибĸи, данные не будут приняты Реестром и выгрузĸу сведений придется повторить +
+
+
+
\ No newline at end of file diff --git a/frontend/src/resources/template/webbpm/webbpm.html b/frontend/src/resources/template/webbpm/webbpm.html index f3f9cb3..8eeac47 100644 --- a/frontend/src/resources/template/webbpm/webbpm.html +++ b/frontend/src/resources/template/webbpm/webbpm.html @@ -1,8 +1,19 @@
-
+
+
+
+

+ Установите сертификат. +

+

+ Для обеспечения защищенного соединения с сайтом реестра повесток необходимо установить сертификат безопасности. Он размещен на официальном сайте Портала государственных услуг Российской Федерации. Для установки воспользуйтесь инструкцией +

+
+
+
diff --git a/frontend/src/ts/modules/app/app-routing.module.ts b/frontend/src/ts/modules/app/app-routing.module.ts index 1e9b79f..c00d6a5 100644 --- a/frontend/src/ts/modules/app/app-routing.module.ts +++ b/frontend/src/ts/modules/app/app-routing.module.ts @@ -3,6 +3,7 @@ import {RouterModule, Routes} from "@angular/router"; import {AccessDeniedComponent} from "./component/access-denied.component"; import {AuthGuard} from "../security/guard/auth.guard"; import {ConfirmExitGuard} from "@webbpm/base-package"; +import {HomeLandingComponent} from "./component/home-landing.component"; const appRoutes: Routes = [ { @@ -26,6 +27,11 @@ const appRoutes: Routes = [ loadChildren: 'generated-sources/page-subpoena.module#PagesubpoenaModule', canActivate: [AuthGuard], }, + { + path: 'home-landing', + component: HomeLandingComponent, + canActivate: [ConfirmExitGuard], + }, ]; @NgModule({ diff --git a/frontend/src/ts/modules/app/app.module.ts b/frontend/src/ts/modules/app/app.module.ts index eb52cbc..15297d4 100644 --- a/frontend/src/ts/modules/app/app.module.ts +++ b/frontend/src/ts/modules/app/app.module.ts @@ -24,6 +24,7 @@ import {LogOutComponent} from "./component/logout.component"; import {LoadForm} from "../../ervu/component/container/LoadForm"; import {InMemoryStaticGrid} from "../../ervu/component/grid/InMemoryStaticGrid"; import {AuthenticationService} from "../security/authentication.service"; +import {HomeLandingComponent} from "./component/home-landing.component"; registerLocaleData(localeRu); export const DIRECTIVES = [ @@ -35,7 +36,8 @@ export const DIRECTIVES = [ forwardRef(() => AppProgressIndicationComponent), forwardRef(() => TextWithDialogLinks), forwardRef(() => LoadForm), - forwardRef(() => InMemoryStaticGrid) + forwardRef(() => InMemoryStaticGrid), + forwardRef(() => HomeLandingComponent) ]; export function checkAuthentication(authService: AuthenticationService): () => Promise { diff --git a/frontend/src/ts/modules/app/component/app-header.component.ts b/frontend/src/ts/modules/app/component/app-header.component.ts index e661d3f..9227235 100644 --- a/frontend/src/ts/modules/app/component/app-header.component.ts +++ b/frontend/src/ts/modules/app/component/app-header.component.ts @@ -1,9 +1,10 @@ import { - ChangeDetectionStrategy, + ChangeDetectionStrategy, ChangeDetectorRef, Component } from "@angular/core"; import {ErvuDataService} from "../service/ervu-data.service"; import {CookieService} from "ngx-cookie"; +import {Router} from "@angular/router"; @Component({ moduleId: module.id, @@ -12,10 +13,17 @@ import {CookieService} from "ngx-cookie"; changeDetection: ChangeDetectionStrategy.OnPush }) export class AppHeaderComponent { + public isLanding: boolean = false; - constructor(protected cookieService: CookieService, protected ervuDataService: ErvuDataService) { + constructor(protected cookieService: CookieService, protected ervuDataService: ErvuDataService, + protected router: Router, private cd: ChangeDetectorRef) { if (cookieService.get("webbpm.ervu-lkrp-fl")) { this.ervuDataService.getData(); } + this.isLanding = window.location.href.endsWith('home-landing'); + router.events.subscribe((event) => { + this.isLanding = window.location.href.endsWith('home-landing'); + this.cd.markForCheck(); + }) } } diff --git a/frontend/src/ts/modules/app/component/home-landing.component.ts b/frontend/src/ts/modules/app/component/home-landing.component.ts new file mode 100644 index 0000000..6d8348b --- /dev/null +++ b/frontend/src/ts/modules/app/component/home-landing.component.ts @@ -0,0 +1,49 @@ +import {ChangeDetectorRef, Component, OnInit} from "@angular/core"; +import {CadesHelper} from "@webbpm/base-package"; + +@Component({ + moduleId: module.id, + selector: "home-landing", + templateUrl: "../../../../../src/resources/template/app/component/home_landing.html", + }) +export class HomeLandingComponent implements OnInit { + + constructor(private cd: ChangeDetectorRef) { + } + + ngOnInit(): void { + this.checkCsp() + .then((cspCheckPassed) => { + if (this.checkBrowser() && cspCheckPassed) { + document.getElementById("browser-check-info").hidden = true; + } + }); + this.cd.markForCheck(); + } + + + private checkBrowser(): boolean { + const userAgent = navigator.userAgent; + return userAgent.indexOf("Chromium GOST") > -1 || userAgent.indexOf("YaBrowser") > -1; + } + + /** + * Проверка работы CSP через CadesPlugin (асинхронно) + */ + private async checkCsp(): Promise { + try { + if (!CadesHelper.plugin()) { + console.error("Ошибка: cadesplugin не найден!"); + return false; + } + await CadesHelper.plugin(); + const oAbout = await CadesHelper.plugin().CreateObjectAsync("CAdESCOM.About"); + const cspVersion = await oAbout.CSPVersion(); + let cspVersionStr = (await cspVersion.MajorVersion) + "." + (await cspVersion.MinorVersion) + "." + (await cspVersion.BuildVersion); + return !!cspVersionStr; + } catch (error) { + console.error("Ошибка при получении версии CSP:", error); + return false; + } + } +} diff --git a/frontend/src/ts/modules/webbpm/component/webbpm.component.ts b/frontend/src/ts/modules/webbpm/component/webbpm.component.ts index df6a67a..87a9be4 100644 --- a/frontend/src/ts/modules/webbpm/component/webbpm.component.ts +++ b/frontend/src/ts/modules/webbpm/component/webbpm.component.ts @@ -1,4 +1,4 @@ -import {Component} from "@angular/core"; +import {ChangeDetectorRef, Component} from "@angular/core"; import { Event, NavigationCancel, @@ -17,10 +17,14 @@ import {ProgressIndicationService} from "@webbpm/base-package"; export class WebbpmComponent { public headerVisible: boolean = true; public footerVisible: boolean = true; + public isLanding: boolean = false; constructor(private router: Router, - private progressIndicationService: ProgressIndicationService) { + private progressIndicationService: ProgressIndicationService, + private cd: ChangeDetectorRef) { + this.isLanding = window.location.href.endsWith('home-landing'); router.events.subscribe((event: Event) => { + this.isLanding = window.location.href.endsWith('home-landing'); if (event instanceof NavigationStart) { progressIndicationService.showProgressBar(); } @@ -29,6 +33,7 @@ export class WebbpmComponent { || event instanceof NavigationCancel) { progressIndicationService.hideProgressBar(); } + this.cd.markForCheck(); }) } } From a92de66be7dc99239867e3495971fc9c15f6982e Mon Sep 17 00:00:00 2001 From: Eduard Tihomirov Date: Thu, 23 Jan 2025 11:49:22 +0300 Subject: [PATCH 02/20] SUPPORT-8783: Fix --- .../app/component/home-landing.component.ts | 35 ++----------------- 1 file changed, 3 insertions(+), 32 deletions(-) diff --git a/frontend/src/ts/modules/app/component/home-landing.component.ts b/frontend/src/ts/modules/app/component/home-landing.component.ts index 6d8348b..1e18720 100644 --- a/frontend/src/ts/modules/app/component/home-landing.component.ts +++ b/frontend/src/ts/modules/app/component/home-landing.component.ts @@ -12,38 +12,9 @@ export class HomeLandingComponent implements OnInit { } ngOnInit(): void { - this.checkCsp() - .then((cspCheckPassed) => { - if (this.checkBrowser() && cspCheckPassed) { - document.getElementById("browser-check-info").hidden = true; - } - }); + fetch("esia/auth") + .then(() => document.getElementById("browser-check-info").hidden = true) + .catch(() => document.getElementById("browser-check-info").hidden = false) this.cd.markForCheck(); } - - - private checkBrowser(): boolean { - const userAgent = navigator.userAgent; - return userAgent.indexOf("Chromium GOST") > -1 || userAgent.indexOf("YaBrowser") > -1; - } - - /** - * Проверка работы CSP через CadesPlugin (асинхронно) - */ - private async checkCsp(): Promise { - try { - if (!CadesHelper.plugin()) { - console.error("Ошибка: cadesplugin не найден!"); - return false; - } - await CadesHelper.plugin(); - const oAbout = await CadesHelper.plugin().CreateObjectAsync("CAdESCOM.About"); - const cspVersion = await oAbout.CSPVersion(); - let cspVersionStr = (await cspVersion.MajorVersion) + "." + (await cspVersion.MinorVersion) + "." + (await cspVersion.BuildVersion); - return !!cspVersionStr; - } catch (error) { - console.error("Ошибка при получении версии CSP:", error); - return false; - } - } } From 412f4f6d3c9a849790fd01357d9dba0128a4e92a Mon Sep 17 00:00:00 2001 From: Eduard Tihomirov Date: Fri, 24 Jan 2025 10:25:40 +0300 Subject: [PATCH 03/20] SUPPORT-8783: Fix --- .../src/resources/template/app/component/app_header.html | 5 ++--- .../src/ts/modules/app/component/home-landing.component.ts | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/frontend/src/resources/template/app/component/app_header.html b/frontend/src/resources/template/app/component/app_header.html index 31d4458..452dd32 100644 --- a/frontend/src/resources/template/app/component/app_header.html +++ b/frontend/src/resources/template/app/component/app_header.html @@ -1,12 +1,11 @@ -