{"version":3,"sources":["webpack:///./src/app/login/login.component.html","webpack:///./src/app/login/reset-password/reset-password.component.css","webpack:///./src/app/login/reset-password/reset-password.component.html","webpack:///./src/app/login/forgot-password/forgot-password.component.html","webpack:///./src/app/login/shared/credentials.model.ts","webpack:///./src/app/login/login.component.ts","webpack:///./src/app/login/reset-password/reset-password.component.ts","webpack:///./src/app/login/forgot-password/forgot-password.component.ts","webpack:///./src/app/login/login.routing.ts","webpack:///./src/app/login/login.module.ts","webpack:///./src/app/login/forgot-password/forgot-password.component.css","webpack:///./src/app/login/login.component.css"],"names":["module","exports","CredentialsModel","this","password","username","login_component_LoginComponent","LoginComponent","authService","rdCoreService","router","user","errorMessage","prototype","ngOnInit","onLogin","_this","login","then","loginResponse","userEndpoint","userId","get","subscribe","role","id","navigateByUrl","logout","catch","errorRes","message","redirectFunction","path","__decorate","Object","core","selector","rd_core","fesm5_router","reset_password_component_ResetPasswordComponent","ResetPasswordComponent","reset_password_component_decorate","forgot_password_component_ForgotPasswordComponent","ForgotPasswordComponent","submitUsername","forgotPassword","forgot_password_component_decorate","loginRoutes","redirectTo","pathMatch","component","login_routing_LoginRoutingModule","LoginRoutingModule","login_routing_decorate","imports","forChild","loginRoutingComponents","login_module_LoginModule","LoginModule","login_module_decorate","common","fesm5_forms","shared_module","declarations"],"mappings":"8EAAAA,EAAAC,QAAA,y+DCAAD,EAAAC,QAAA,yBCAAD,EAAAC,QAAA,66CCAAD,EAAAC,QAAA,mnDCAAC,EAAA,WAGA,OAHA,WACIC,KAAAC,SAAmB,KACnBD,KAAAE,SAAmB,MAFvB,wbCYAC,EAAA,WAOE,SAAAC,EAAoBC,EAAsCC,EAAuCC,GAA7EP,KAAAK,cAAsCL,KAAAM,gBAAuCN,KAAAO,SALjGP,KAAAE,SAAmB,GACnBF,KAAAC,SAAmB,GACnBD,KAAAQ,KAAO,IAAIT,EACXC,KAAAS,aAAuB,KAkCzB,OA9BEL,EAAAM,UAAAC,SAAA,aAGAP,EAAAM,UAAA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ASR,IAChC9C,SAAUqC,EAAA,MAECc,GAAb,GAEaI,GAA0BlD,EAAgBoC,EAAyBH,mYCRhFkB,EAAA,oBAAAC,KAA0B,OAAbA,EAAWC,GAJvBzB,OAAAC,EAAA,SAAAD,EACCoB,SAAWM,EAAA,aAAcC,EAAA,YAAaC,EAAA,EAAcX,GACpDY,cAAgBP,MAELE,GAAb,uBCZA1D,EAAAC,QAAA,uBCAAD,EAAAC,QAAA","file":"2.f6c3df940c05e0cf7a17.js","sourcesContent":["module.exports = \"\\n\\n
\\n

Log On

\\n

\\n \\n

\\n\\n \\n\\n \\n\\n
\\n
\\n account information\\n\\n
\\n \\n
\\n
\\n \\n \\n
\\n\\n
\\n \\n
\\n
\\n \\n \\n
\\n\\n
\\n \\n remember me??\\n

\\n\\n

\\n \\n Forgot?\\n

\\n\\n
\\n
\\n\\n
\\n {{ errorMessage }}\\n
\\n
\\n\\n
\\n
\\n\\n\\n\"","module.exports = \"\"","module.exports = \"
\\n
\\n
\\n \\\"Rent RD Admin\\n
\\n
\\n
Reset Password
\\n

Create a new password below.

\\n\\n
\\n
\\n
\\n \\n \\n
\\n
\\n \\n \\n
\\n
\\n
\\n\\n\\n Save Password\\n Cancel\\n\\n
\\n
\\n\\n
\\n Woah! Make sure your new password contains at least 8 characters, 1 uppercase, and 1 special character.\\n
\\n\\n
\\n One of these things is not like the other... Make sure your passwords match.\\n
\\n\\n
\\n
\\n\"","module.exports = \"\\n
\\n
\\n
\\n \\\"Rent RD Admin\\n
\\n
\\n
Forgot Password?
\\n

Enter your username below to receive reset instructions in your email.

\\n\\n
\\n
\\n
\\n \\n \\n
\\n
\\n
\\n\\n\\n \\n Back\\n\\n
\\n
\\n\\n
\\n Uh oh... This page currently doesn't work. Sorry for the inconvenience.\\n
\\n \\n
\\n
\\n\"","export class CredentialsModel {\n password: string = null;\n username: string = null;\n}","import 'rxjs';\nimport { Component, OnInit } from '@angular/core';\nimport { Router } from '@angular/router';\nimport { CoreAuthService, CoreApiService } from '@rd/core';\n\nimport { CredentialsModel } from './shared';\n\n@Component({\n selector: 'rd-login',\n templateUrl: './login.component.html',\n styleUrls: ['./login.component.css']\n})\nexport class LoginComponent implements OnInit {\n\n username: string = '';\n password: string = '';\n user = new CredentialsModel();\n errorMessage: string = null;\n\n constructor(private authService: CoreAuthService, private rdCoreService: CoreApiService, private router: Router) {}\n\n ngOnInit() {\n }\n\n onLogin() {\n this.user = {username: this.username, password: this.password};\n // Submit form\n this.authService.login(this.user)\n // TODO: Hopefully this logic will move to the server\n .then( (loginResponse: any) => {\n let userEndpoint = '/users/' + this.authService.userId + '?include=role';\n this.rdCoreService.get(userEndpoint)\n .subscribe((user: any) => {\n if (user.role.id === 1) {\n this.router.navigateByUrl('/');\n } else {\n // Delete all their info\n this.authService.logout();\n this.errorMessage = 'You are not authorized to access this app!';\n }\n });\n })\n .catch( (errorRes) => {\n this.errorMessage = errorRes.message;\n });\n }\n\n redirectFunction(path) {\n // TODO: Find a better way to redirect this\n this.router.navigateByUrl(path);\n }\n}","import { Component, OnInit } from '@angular/core';\n\n@Component({\n selector: 'rd-reset-password',\n templateUrl: './reset-password.component.html',\n styleUrls: ['./reset-password.component.css']\n})\nexport class ResetPasswordComponent implements OnInit {\n\n constructor() {}\n\n ngOnInit() {\n }\n\n}\n","import { Component, OnInit } from '@angular/core';\n\nimport { CoreAuthService } from '@rd/core';\n\n@Component({\n selector: 'rd-forgot-password',\n templateUrl: './forgot-password.component.html',\n styleUrls: ['./forgot-password.component.css']\n})\nexport class ForgotPasswordComponent implements OnInit {\n\n username: string = '';\n\n constructor(private authService: CoreAuthService) {}\n\n ngOnInit() {\n }\n\n submitUsername() {\n this.authService.forgotPassword(this.username);\n }\n\n}\n","import { NgModule } from '@angular/core';\nimport { Routes, RouterModule } from '@angular/router';\n\nimport { LoginComponent } from './login.component';\nimport { ResetPasswordComponent } from './reset-password/reset-password.component';\nimport { ForgotPasswordComponent } from './forgot-password/forgot-password.component';\n\nexport const loginRoutes: Routes = [\n { path: '', redirectTo: 'login', pathMatch: 'full' },\n { path: 'login', component: LoginComponent },\n { path: 'forgot', component: ForgotPasswordComponent },\n { path: 'reset', component: ResetPasswordComponent }\n];\n\n@NgModule({\n imports: [RouterModule.forChild(loginRoutes)],\n exports: [RouterModule]\n})\nexport class LoginRoutingModule { }\n\nexport const loginRoutingComponents = [LoginComponent, ForgotPasswordComponent, ResetPasswordComponent];\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\n\nimport { LoginRoutingModule, loginRoutingComponents } from './login.routing';\n\nimport { SharedModule } from '../shared/shared.module';\n\n@NgModule({\n imports: [ CommonModule, FormsModule, SharedModule, LoginRoutingModule ],\n declarations: [ loginRoutingComponents ]\n})\nexport class LoginModule {}\n","module.exports = \"\"","module.exports = \"\""],"sourceRoot":""}