Browse Source
Merge pull request #14828 from abpframework/issue/14803-rel-6
Remove isSameDataFunction
pull/14857/head
Mahmut Gundogdu
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
1 additions and
14 deletions
-
npm/ng-packs/packages/account/src/lib/components/personal-settings/personal-settings.component.ts
|
|
|
@ -36,7 +36,6 @@ export class PersonalSettingsComponent |
|
|
|
form: UntypedFormGroup; |
|
|
|
|
|
|
|
inProgress: boolean; |
|
|
|
private profile: ProfileDto; |
|
|
|
|
|
|
|
constructor( |
|
|
|
private fb: UntypedFormBuilder, |
|
|
|
@ -79,24 +78,12 @@ export class PersonalSettingsComponent |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
isDataSame(oldValue, newValue) { |
|
|
|
return Object.entries(oldValue).some(([key, value]) => { |
|
|
|
if (key in newValue) { |
|
|
|
return value !== newValue[key]; |
|
|
|
} |
|
|
|
return false; |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
logoutConfirmation = () => { |
|
|
|
this.authService.logout().subscribe(); |
|
|
|
}; |
|
|
|
|
|
|
|
private isLogoutConfirmMessageActive() { |
|
|
|
if (!this.isPersonalSettingsChangedConfirmationActive) { |
|
|
|
return false; |
|
|
|
} |
|
|
|
return this.isDataSame(this.profile, this.form.value); |
|
|
|
return this.isPersonalSettingsChangedConfirmationActive; |
|
|
|
} |
|
|
|
|
|
|
|
private showLogoutConfirmMessage() { |
|
|
|
|