import { Component, Input, OnInit } from '@angular/core'
-import { NotificationsService } from 'angular2-notifications'
-import { FormReactive, USER_DESCRIPTION, USER_DISPLAY_NAME, UserService } from '../../../shared'
+import { Notifier } from '@app/core'
+import { FormReactive, UserService } from '../../../shared'
import { User } from '@app/shared'
import { I18n } from '@ngx-translate/i18n-polyfill'
import { FormValidatorService } from '@app/shared/forms/form-validators/form-validator.service'
-import { Subject } from 'rxjs/Subject'
+import { Subject } from 'rxjs'
+import { UserValidatorsService } from '@app/shared/forms/form-validators/user-validators.service'
@Component({
selector: 'my-account-profile',
constructor (
protected formValidatorService: FormValidatorService,
- private notificationsService: NotificationsService,
+ private userValidatorsService: UserValidatorsService,
+ private notifier: Notifier,
private userService: UserService,
private i18n: I18n
) {
ngOnInit () {
this.buildForm({
- 'display-name': USER_DISPLAY_NAME,
- description: USER_DESCRIPTION
+ 'display-name': this.userValidatorsService.USER_DISPLAY_NAME,
+ description: this.userValidatorsService.USER_DESCRIPTION
})
this.userInformationLoaded.subscribe(() => {
this.user.account.displayName = displayName
this.user.account.description = description
- this.notificationsService.success(this.i18n('Success'), this.i18n('Profile updated.'))
+ this.notifier.success(this.i18n('Profile updated.'))
},
err => this.error = err.message