bug fixed

This commit is contained in:
병준 박 2019-11-29 15:09:47 +09:00
parent e651e6f7b5
commit 2d99b7c4c8
3 changed files with 44 additions and 6 deletions

View File

@ -16,7 +16,8 @@ import {
DialogService,
ConfirmDialogComponent,
ConfirmDialogData,
ConfirmDialogResult
ConfirmDialogResult,
SnackBarService
} from '@ucap-webmessenger/ui';
import {
@ -362,6 +363,40 @@ export class Effects {
)
);
userPasswordSetSuccess$ = createEffect(
() => {
return this.actions$.pipe(
ofType(userPasswordSetSuccess),
tap(action => {
this.snackBarService.open(`비밀번호 변경이 완료 되었습니다`, '', {
duration: 3000,
verticalPosition: 'bottom'
});
})
);
},
{ dispatch: false }
);
userPasswordSetFailure$ = createEffect(
() => {
return this.actions$.pipe(
ofType(userPasswordSetFailure),
tap(action => {
this.snackBarService.open(
`비밀번호 변경 중에 문제가 발생하였습니다.`,
'',
{
duration: 3000,
verticalPosition: 'bottom'
}
);
})
);
},
{ dispatch: false }
);
constructor(
private actions$: Actions,
private ngZone: NgZone,
@ -374,6 +409,7 @@ export class Effects {
private authenticationProtocolService: AuthenticationProtocolService,
private serviceProtocolService: ServiceProtocolService,
private dialogService: DialogService,
private snackBarService: SnackBarService,
@Inject(UCAP_NATIVE_SERVICE) private nativeService: NativeService,
private logger: NGXLogger
) {}

View File

@ -147,8 +147,10 @@ export class ChangePasswordComponent implements OnInit {
onClickChangePassword() {
this.changePassword.emit({
currentLoginPw: this.currentLoginPwFormControl.value,
newLoginPw: this.newLoginPwFormControl.value
currentLoginPw: PasswordUtil.encrypt(
this.currentLoginPwFormControl.value
),
newLoginPw: PasswordUtil.encrypt(this.newLoginPwFormControl.value)
});
}
}

View File

@ -1,12 +1,12 @@
import { TestBed } from '@angular/core/testing';
import { BottomSheetService } from './bottom-sheet.service';
import { SnackBarService } from './snack-bar.service';
describe('ui::BottomSheetService', () => {
describe('ui::SnackBarService', () => {
beforeEach(() => TestBed.configureTestingModule({}));
it('should be created', () => {
const service: BottomSheetService = TestBed.get(BottomSheetService);
const service: SnackBarService = TestBed.get(SnackBarService);
expect(service).toBeTruthy();
});
});