ing
This commit is contained in:
parent
4ff5eead18
commit
e46aa26170
|
@ -1,10 +1,10 @@
|
|||
import {Component, EventEmitter, Input, OnInit, Output} from '@angular/core';
|
||||
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
|
||||
import { Store, select } from '@ngrx/store';
|
||||
import { Observable, of } from 'rxjs';
|
||||
import { catchError, exhaustMap, map, tap } from 'rxjs/operators';
|
||||
import {FormBuilder} from '@angular/forms';
|
||||
import {EmailAuthService} from '../service/email-auth.service';
|
||||
import {EmailAuth} from '@overflow/commons-typescript/model/email/EmailAuth';
|
||||
import { FormBuilder } from '@angular/forms';
|
||||
import { EmailAuthService } from '../service/email-auth.service';
|
||||
import { EmailAuth } from '@overflow/commons-typescript/model/email/EmailAuth';
|
||||
|
||||
@Component({
|
||||
selector: 'of-member-confirm-reset-password',
|
||||
|
@ -33,14 +33,14 @@ export class MemberConfirmResetPasswordComponent implements OnInit {
|
|||
map((emailAuth: EmailAuth) => {
|
||||
this.emailAuth$ = of(emailAuth);
|
||||
}),
|
||||
catchError( err => {
|
||||
catchError(err => {
|
||||
this.error$ = of(err);
|
||||
return of();
|
||||
}),
|
||||
tap(() => {
|
||||
this.pending$ = of(false);
|
||||
}),
|
||||
).take(1).subscribe();
|
||||
).take(1).subscribe();
|
||||
}
|
||||
|
||||
onModifyPassword() {
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
import {Component, EventEmitter, Input, OnInit, Output} from '@angular/core';
|
||||
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
|
||||
import { Store, select } from '@ngrx/store';
|
||||
import { Observable, of } from 'rxjs';
|
||||
import { catchError, exhaustMap, map, tap } from 'rxjs/operators';
|
||||
import {FormBuilder} from '@angular/forms';
|
||||
import {EmailAuthService} from '../service/email-auth.service';
|
||||
import {EmailAuth} from '@overflow/commons-typescript/model/email/EmailAuth';
|
||||
import { FormBuilder } from '@angular/forms';
|
||||
import { EmailAuthService } from '../service/email-auth.service';
|
||||
import { EmailAuth } from '@overflow/commons-typescript/model/email/EmailAuth';
|
||||
|
||||
@Component({
|
||||
selector: 'of-member-confirm-signup',
|
||||
|
@ -32,14 +32,14 @@ export class MemberConfirmSignupComponent implements OnInit {
|
|||
map((emailAuth: EmailAuth) => {
|
||||
this.emailAuth$ = of(emailAuth);
|
||||
}),
|
||||
catchError( err => {
|
||||
catchError(err => {
|
||||
this.error$ = of(err);
|
||||
return of();
|
||||
}),
|
||||
tap(() => {
|
||||
this.pending$ = of(false);
|
||||
}),
|
||||
).take(1).subscribe();
|
||||
).take(1).subscribe();
|
||||
}
|
||||
|
||||
onSignin() {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { Component, OnInit, Output, EventEmitter, Input } from '@angular/core';
|
||||
import {FormGroup, FormBuilder, Validators, FormControl, ValidationErrors, AbstractControl} from '@angular/forms';
|
||||
import { FormGroup, FormBuilder, Validators, FormControl, ValidationErrors, AbstractControl } from '@angular/forms';
|
||||
import { Member } from '@overflow/commons-typescript/model/member';
|
||||
import { Store, select } from '@ngrx/store';
|
||||
import { Observable, of } from 'rxjs';
|
||||
|
@ -52,7 +52,7 @@ export class MemberModifyPasswordComponent implements OnInit {
|
|||
'',
|
||||
[
|
||||
Validators.compose([
|
||||
Validators.required, this.pwMatchValidator
|
||||
Validators.required, this.pwMatchValidator
|
||||
])
|
||||
]
|
||||
]
|
||||
|
@ -84,14 +84,14 @@ export class MemberModifyPasswordComponent implements OnInit {
|
|||
map((rmember: Member) => {
|
||||
this.member$ = of(rmember);
|
||||
}),
|
||||
catchError( err => {
|
||||
catchError(err => {
|
||||
this.error$ = of(err);
|
||||
return of();
|
||||
}),
|
||||
tap(() => {
|
||||
this.pending$ = of(false);
|
||||
}),
|
||||
).take(1).subscribe();
|
||||
).take(1).subscribe();
|
||||
}
|
||||
|
||||
onSignin() {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import {Component, OnInit, OnDestroy, EventEmitter, Input, Output} from '@angular/core';
|
||||
import { Component, OnInit, OnDestroy, EventEmitter, Input, Output } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'of-member-policy',
|
||||
|
@ -6,7 +6,7 @@ import {Component, OnInit, OnDestroy, EventEmitter, Input, Output} from '@angula
|
|||
})
|
||||
export class MemberPolicyComponent implements OnInit, OnDestroy {
|
||||
|
||||
@Input() policyDisplay;
|
||||
@Input() policyDisplay;
|
||||
@Output() close = new EventEmitter();
|
||||
|
||||
constructor(
|
||||
|
|
|
@ -29,10 +29,10 @@ export class MemberProfileComponent implements OnInit, OnDestroy {
|
|||
initForm() {
|
||||
this.form = this.formBuilder.group({
|
||||
'email': ['',
|
||||
[
|
||||
Validators.required,
|
||||
Validators.email
|
||||
]],
|
||||
[
|
||||
Validators.required,
|
||||
Validators.email
|
||||
]],
|
||||
'name': ['', []],
|
||||
'companyName': ['', []],
|
||||
'phone': ['', []],
|
||||
|
|
|
@ -14,8 +14,8 @@ import { Store, select } from '@ngrx/store';
|
|||
import { Observable, of } from 'rxjs';
|
||||
import { catchError, exhaustMap, map, tap } from 'rxjs/operators';
|
||||
|
||||
import {Member} from '@overflow/commons-typescript/model/member';
|
||||
import {MemberService} from '../service/member.service';
|
||||
import { Member } from '@overflow/commons-typescript/model/member';
|
||||
import { MemberService } from '../service/member.service';
|
||||
|
||||
@Component({
|
||||
selector: 'of-member-reset-password',
|
||||
|
@ -64,14 +64,14 @@ export class MemberResetPasswordComponent implements OnInit {
|
|||
map((rmember: Member) => {
|
||||
this.member$ = of(rmember);
|
||||
}),
|
||||
catchError( err => {
|
||||
catchError(err => {
|
||||
this.error$ = of(err);
|
||||
return of();
|
||||
}),
|
||||
tap(() => {
|
||||
this.pending$ = of(false);
|
||||
}),
|
||||
).take(1).subscribe();
|
||||
).take(1).subscribe();
|
||||
}
|
||||
|
||||
onSignin() {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { Component, OnInit, Output, EventEmitter, Input } from '@angular/core';
|
||||
import {FormGroup, FormBuilder, Validators, AbstractControl} from '@angular/forms';
|
||||
import { FormGroup, FormBuilder, Validators, AbstractControl } from '@angular/forms';
|
||||
import { Member } from '@overflow/commons-typescript/model/member';
|
||||
|
||||
@Component({
|
||||
|
@ -12,7 +12,7 @@ export class MemberSigninComponent implements OnInit {
|
|||
|
||||
@Output() resetPassword = new EventEmitter();
|
||||
@Output() signup = new EventEmitter();
|
||||
@Output() signin = new EventEmitter<{email: string, password: string}>();
|
||||
@Output() signin = new EventEmitter<{ email: string, password: string }>();
|
||||
|
||||
errorMessage: string | null;
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ import { Member } from '@overflow/commons-typescript/model/member';
|
|||
import { Store, select } from '@ngrx/store';
|
||||
import { Observable, of } from 'rxjs';
|
||||
import { catchError, exhaustMap, map, tap } from 'rxjs/operators';
|
||||
import {MemberService} from '../service/member.service';
|
||||
import { MemberService } from '../service/member.service';
|
||||
|
||||
@Component({
|
||||
selector: 'of-member-signup',
|
||||
|
@ -72,8 +72,8 @@ export class MemberSignupComponent implements OnInit, OnDestroy {
|
|||
'!@#$Qwer1234',
|
||||
[
|
||||
Validators.compose([
|
||||
Validators.required, this.pwMatchValidator
|
||||
])
|
||||
Validators.required, this.pwMatchValidator
|
||||
])
|
||||
]
|
||||
],
|
||||
'name': [
|
||||
|
@ -95,10 +95,10 @@ export class MemberSignupComponent implements OnInit, OnDestroy {
|
|||
]
|
||||
],
|
||||
'selectPolicy': [
|
||||
false, [ Validators.requiredTrue ],
|
||||
false, [Validators.requiredTrue],
|
||||
],
|
||||
'captcha': [
|
||||
false, [ Validators.requiredTrue ],
|
||||
false, [Validators.requiredTrue],
|
||||
]
|
||||
});
|
||||
this.email = this.signupForm.controls['email'];
|
||||
|
@ -139,14 +139,14 @@ export class MemberSignupComponent implements OnInit, OnDestroy {
|
|||
map((rmember: Member) => {
|
||||
this.member$ = of(rmember);
|
||||
}),
|
||||
catchError( err => {
|
||||
catchError(err => {
|
||||
this.error$ = of(err);
|
||||
return of();
|
||||
}),
|
||||
tap(() => {
|
||||
this.pending$ = of(false);
|
||||
}),
|
||||
).take(1).subscribe();
|
||||
).take(1).subscribe();
|
||||
}
|
||||
|
||||
termsDisplayOpen() {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import {Component, OnInit, OnDestroy, Input, EventEmitter, Output} from '@angular/core';
|
||||
import { Component, OnInit, OnDestroy, Input, EventEmitter, Output } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'of-member-terms',
|
||||
|
@ -6,7 +6,7 @@ import {Component, OnInit, OnDestroy, Input, EventEmitter, Output} from '@angula
|
|||
})
|
||||
export class MemberTermsComponent implements OnInit, OnDestroy {
|
||||
|
||||
@Input() termsDisplay;
|
||||
@Input() termsDisplay;
|
||||
@Output() close = new EventEmitter();
|
||||
|
||||
constructor(
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import {Component, EventEmitter, Input, OnInit, Output} from '@angular/core';
|
||||
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
|
||||
import { DomainMember } from '@overflow/commons-typescript/model/domain';
|
||||
import { Member } from '@overflow/commons-typescript/model/member';
|
||||
|
||||
|
@ -9,7 +9,7 @@ import { Member } from '@overflow/commons-typescript/model/member';
|
|||
export class MemberTotpComponent implements OnInit {
|
||||
@Input() domainMember: DomainMember;
|
||||
@Input() totp;
|
||||
@Output() regist = new EventEmitter<{member: Member, code: string, secretCode: string}>();
|
||||
@Output() regist = new EventEmitter<{ member: Member, code: string, secretCode: string }>();
|
||||
@Output() create = new EventEmitter<Member>();
|
||||
|
||||
selectedItem: any;
|
||||
|
@ -24,9 +24,9 @@ export class MemberTotpComponent implements OnInit {
|
|||
|
||||
ngOnInit() {
|
||||
this.lists = [
|
||||
{id: 1, name: 'Email', value: this.domainMember.member.email, description: 'blabla', },
|
||||
{id: 2, name: 'Phone', value: this.domainMember.member.phone, description: 'blabla', },
|
||||
{id: 3, name: 'Google 2factor', value: this.domainMember.member.totpType, description: 'blabla', },
|
||||
{ id: 1, name: 'Email', value: this.domainMember.member.email, description: 'blabla', },
|
||||
{ id: 2, name: 'Phone', value: this.domainMember.member.phone, description: 'blabla', },
|
||||
{ id: 3, name: 'Google 2factor', value: this.domainMember.member.totpType, description: 'blabla', },
|
||||
];
|
||||
}
|
||||
|
||||
|
@ -42,7 +42,7 @@ export class MemberTotpComponent implements OnInit {
|
|||
}
|
||||
|
||||
totpInput(e) {
|
||||
if ( e.target.value.length === 6 ) {
|
||||
if (e.target.value.length === 6) {
|
||||
this.regist.emit(e.target.value);
|
||||
}
|
||||
return;
|
||||
|
|
Loading…
Reference in New Issue
Block a user