From 7f5b74d34c8257a6e7b49c7964e4410bb5db2149 Mon Sep 17 00:00:00 2001 From: Vladyslav_Prykhodko Date: Fri, 25 Aug 2023 15:43:58 +0300 Subject: [PATCH 1/2] UI: Fixed show exit dialog twice --- .../components/dashboard-page/dashboard-page.component.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ui-ngx/src/app/modules/home/components/dashboard-page/dashboard-page.component.ts b/ui-ngx/src/app/modules/home/components/dashboard-page/dashboard-page.component.ts index 868b1544c3..f3e57a9dcb 100644 --- a/ui-ngx/src/app/modules/home/components/dashboard-page/dashboard-page.component.ts +++ b/ui-ngx/src/app/modules/home/components/dashboard-page/dashboard-page.component.ts @@ -161,12 +161,14 @@ import { HasDirtyFlag } from '@core/guards/confirm-on-exit.guard'; }) export class DashboardPageComponent extends PageComponent implements IDashboardController, HasDirtyFlag, OnInit, AfterViewInit, OnDestroy { + private forcePristine = true; + get isDirty(): boolean { - return this.isEdit; + return this.isEdit && this.forcePristine; } set isDirty(value: boolean) { - + this.forcePristine = value; } authState: AuthState = getCurrentAuthState(this.store); From 00f21ea9a063608f8a0a5f33110f7351e94879d8 Mon Sep 17 00:00:00 2001 From: Igor Kulikov Date: Fri, 25 Aug 2023 18:33:45 +0300 Subject: [PATCH 2/2] Update dashboard-page.component.ts --- .../components/dashboard-page/dashboard-page.component.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ui-ngx/src/app/modules/home/components/dashboard-page/dashboard-page.component.ts b/ui-ngx/src/app/modules/home/components/dashboard-page/dashboard-page.component.ts index f3e57a9dcb..e24f1cad07 100644 --- a/ui-ngx/src/app/modules/home/components/dashboard-page/dashboard-page.component.ts +++ b/ui-ngx/src/app/modules/home/components/dashboard-page/dashboard-page.component.ts @@ -161,14 +161,14 @@ import { HasDirtyFlag } from '@core/guards/confirm-on-exit.guard'; }) export class DashboardPageComponent extends PageComponent implements IDashboardController, HasDirtyFlag, OnInit, AfterViewInit, OnDestroy { - private forcePristine = true; + private forcePristine = false; get isDirty(): boolean { - return this.isEdit && this.forcePristine; + return this.isEdit && !this.forcePristine; } set isDirty(value: boolean) { - this.forcePristine = value; + this.forcePristine = !value; } authState: AuthState = getCurrentAuthState(this.store);