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,4DAAiB;QAEjE,mFAAkB;QACgC,2IAAY,cAAU,IAAC;QACrE,yEAAoC;QAI9B,uEAAqE;QACrE,yHAEY;QACd,4DAAiB;QACjB,qFAAqE;QAEnE,wEAAmE;QACnE,yHAEY;QACd,4DAAiB;QAKnB,0EAAkC;QAG9B,wEAA4D;QAC5D,yHAEY;QACd,4DAAiB;QAEnB,0EAAkC;QAG9B,wEAA8D;QAIhE,4DAAiB;QAEnB,0EAAkC;QAC8C,mJAAU,8DAAsD,IAAC;QAC7I,wFAA6F;QAAA,sEAAU;QAAA,4DAAmB;QAC1H,wFAAkC;QAAA,uEAAW;QAAA,4DAAmB;QAGpE,8GAIM;QACN,8GAKM;QAqBR,4DAAM;QAGV,wFAAiE;QACH,wIAAS,cAAU,IAAC;QAAe,oEAAQ;QAAA,4DAAS;QAElH,2EAAsE;QAErC,qFAAyB;QAAA,yEAA6B;QAAA,mEAAO;QAAA,4DAAI;;QApF1F,0DAA8B;QAA9B,2FAA8B;QAMhB,0DAAiE;QAAjE,iIAAiE;QAOjE,0DAAgE;QAAhE,gIAAgE;QAYhE,0DAA0D;QAA1D,0HAA0D;QAgBpD,0DAAgB;QAAhB,yEAAgB;QAChB,0DAAe;QAAf,wEAAe;QAGF,0DAA0C;QAA1C,0GAA0C;QAK1C,0DAA0C;QAA1C,0GAA0C","sources":["./src/app/authentication/authentication-routing.module.ts","./src/app/authentication/authentication.component.ts","./src/app/authentication/authentication.component.html","./src/app/authentication/authentication.module.ts","./src/app/authentication/signin/signin.component.ts","./src/app/authentication/signin/signin.component.html","./src/app/authentication/signout/signout.component.ts","./src/app/authentication/signout/signout.component.html","./src/app/authentication/signup/signup.component.ts","./src/app/authentication/signup/signup.component.html"],"sourcesContent":["import { NgModule } from '@angular/core';\nimport { Routes, RouterModule } from '@angular/router';\n\nimport { AuthenticationComponent } from './authentication.component';\nimport { SigninComponent } from './signin/signin.component';\nimport { SignupComponent } from './signup/signup.component';\n\nconst routes: Routes = [\n {\n path: '',\n component: AuthenticationComponent,\n children: [\n { path: '', redirectTo: 'signin', pathMatch: 'prefix' },\n { path: 'signin', component: SigninComponent },\n { path: 'signup', component: SignupComponent }\n ]\n }\n];\n\n@NgModule({\n imports: [RouterModule.forChild(routes)],\n exports: [RouterModule]\n})\nexport class AuthenticationRoutingModule { }\n","import { Component, OnInit } from '@angular/core';\nimport {Router} from '@angular/router';\n\nimport {AuthService} from '@shared/services';\n\n@Component({\n selector: 'app-authentication',\n templateUrl: './authentication.component.html',\n styleUrls: ['./authentication.component.css']\n})\nexport class AuthenticationComponent implements OnInit {\n\n constructor(\n private router: Router,\n private authService: AuthService\n ) { \n if(this.authService.userValue){\n this.router.navigate(['/account']);\n }\n }\n\n ngOnInit(): void {\n }\n\n}\n","\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\n\nimport { MaterialModule } from '../shared/material.module';\nimport {SharedModule} from '../shared/shared.module';\nimport { AuthenticationRoutingModule } from './authentication-routing.module';\nimport { AuthenticationComponent } from './authentication.component';\nimport { SigninComponent } from './signin/signin.component';\nimport { SignupComponent } from './signup/signup.component';\nimport { SignoutComponent } from './signout/signout.component';\n\n\n@NgModule({\n declarations: [AuthenticationComponent, SigninComponent, SignupComponent, SignoutComponent],\n imports: [\n CommonModule,\n FormsModule,\n MaterialModule,\n SharedModule,\n AuthenticationRoutingModule\n ]\n})\nexport class AuthenticationModule { }\n","import { Component, OnInit, Input, OnDestroy } from '@angular/core';\nimport { Router, ActivatedRoute } from '@angular/router';\nimport { NgForm } from '@angular/forms';\nimport { User, UserDetail, AuthUser } from '@shared/models';\nimport { Subscription } from 'rxjs';\n\nimport { AuthService, AlertService } from '@shared/services';\n\n@Component({\n selector: 'app-signin',\n templateUrl: './signin.component.html',\n styleUrls: ['./signin.component.css']\n})\nexport class SigninComponent implements OnInit, OnDestroy {\n signInForm: NgForm;\n loading = false;\n submitted = false;\n returnUrl: string;\n private subscriptions: Subscription[] = [];\n authUser: AuthUser;\n userDetail: UserDetail;\n constructor(\n private route: ActivatedRoute,\n private router: Router,\n private authService: AuthService,\n private alertService: AlertService) {\n this.authUser = new AuthUser();\n }\n\n onSignIn() {\n this.submitted = true;\n this.alertService.clear();\n // if (this.signInForm.invalid) {\n // return;\n // }\n this.loading = true;\n const subscription = this.authService.login(this.authUser).subscribe(response => {\n this.userDetail = response;\n if (this.userDetail.isActive) {\n //this.globals.userSignedIn = true;\n this.router.navigate([this.returnUrl]);\n location.reload();\n }\n },\n error => {\n this.alertService.error(error);\n this.loading = false;\n });\n this.subscriptions.push(subscription);\n }\n ngOnInit() {\n // get return url from route parameters or default to '/'\n this.returnUrl = this.route.snapshot.queryParams['returnUrl'] || '/account';\n }\n ngOnDestroy() {\n this.subscriptions.forEach(subscription => subscription.unsubscribe());\n }\n}\n","
\n \n \n Sign In\n \n \n
\n
\n
\n \n \n \n User name is required\n \n
\n
\n \n \n \n Password is required\n \n
\n
\n
\n
\n \n Forgot your password?\n \n \n
\n \n \n
\n
\n
","import { Component, OnInit } from '@angular/core';\nimport { AuthService } from '@app/shared/services';\nimport { Router } from '@angular/router';\n\n@Component({\n selector: 'app-signout',\n templateUrl: './signout.component.html',\n styleUrls: ['./signout.component.css']\n})\nexport class SignoutComponent implements OnInit {\n\n constructor(\n private router: Router,\n private authService: AuthService) { }\n\n ngOnInit(): void {\n this.authService.logout();\n this.router.navigate(['/']);\n location.reload();\n }\n\n}\n","

signout works!

\n","import { Component, OnInit } from '@angular/core';\nimport { Router, ActivatedRoute } from '@angular/router';\nimport { FormGroup, FormControl, Validators } from '@angular/forms';\nimport { first } from 'rxjs/operators';\n\nimport { AuthService, AlertService } from '@app/shared/services';\n\n@Component({\n selector: 'app-signup',\n templateUrl: './signup.component.html',\n styleUrls: ['./signup.component.css']\n})\nexport class SignupComponent implements OnInit {\n\n registrationForm = new FormGroup({\n firstName: new FormControl(null, Validators.required),\n lastName: new FormControl(null, Validators.required),\n email: new FormControl(null, Validators.email),\n mobile: new FormControl(null, Validators.required),\n isIndividual: new FormControl(true, Validators.required),\n clientName: new FormControl(null),\n asClientAdmin: new FormControl(true)\n });\n loading = false;\n submitted = false;\n\n\n constructor(private route: ActivatedRoute,\n private router: Router,\n private authService: AuthService,\n private alertService: AlertService) { }\n\n ngOnInit(): void {\n // this.registrationForm = this.formBuilder.group({\n // firstName: [null, Validators.required],\n // lastName: [null, Validators.required],\n // email: [null, Validators.email],\n // mobile: [null, Validators.required],\n // isIndividual: [1, Validators.required],\n // clientName: [null],\n // asClientAdmin: [true]\n // });\n }\n\n // convenience getter for easy access to form fields\n get f() { return this.registrationForm.controls; }\n changeAccountType(isIndividual): void{\n debugger;\n this.registrationForm.patchValue({\n isIndividual: isIndividual\n });\n }\n onSubmit(): void {\n this.submitted = true;\n\n // reset alerts on submit\n this.alertService.clear();\n\n // stop here if form is invalid\n if (this.registrationForm.invalid) {\n return;\n }\n\n this.loading = true;\n this.authService.register(this.registrationForm.value)\n .pipe(first())\n .subscribe(\n data => {\n this.alertService.success('Registration successful', { keepAfterRouteChange: true });\n this.router.navigate(['../signin'], { relativeTo: this.route });\n },\n error => {\n this.alertService.error(error);\n this.loading = false;\n });\n }\n\n}\n","
\n \n \n register\n \n \n
\n
\n
\n \n \n \n \n First name is required\n \n \n \n \n \n \n Last name is required\n \n \n
\n \n
\n \n \n \n \n Email is invalid\n \n \n
\n
\n \n \n \n \n \n
\n
\n \n Individual\n Institution\n \n
\n
\n \n \n \n
\n
\n \n Register as Client Admin\n
\n \n \n
\n
\n
\n \n \n \n
\n \n \n
\n
\n
\n"],"names":[],"sourceRoot":"webpack:///"}