{"version":3,"sources":["./src/app/views/pages/change-password.component.html","./src/app/views/pages/change-password.component.ts","./src/app/views/pages/forget-password.component.html","./src/app/views/pages/forget-password.component.ts","./src/app/views/pages/login.component.html","./src/app/views/pages/login.component.ts","./src/app/views/pages/pages-routing.module.ts","./src/app/views/pages/pages.module.ts","./src/app/views/pages/reset-password.component.html","./src/app/views/pages/reset-password.component.ts"],"names":[],"mappings":";;;;;AAAA,smCAAsmC,cAAc,0S;;;;;;;;;;;;;;;;;;;;;;;ACAzjC;AAGa;AACb;AAEH;AAEb;AAM3C;IAQE,iCAAoB,IAAiB,EAAU,KAAa,EAAU,IAAiB,EAAU,cAA8B,EACvH,MAAqB;QADT,SAAI,GAAJ,IAAI,CAAa;QAAU,UAAK,GAAL,KAAK,CAAQ;QAAU,SAAI,GAAJ,IAAI,CAAa;QAAU,mBAAc,GAAd,cAAc,CAAgB;QACvH,WAAM,GAAN,MAAM,CAAe;QARnB,UAAK,GAAsB,IAAI,2DAAY,EAAE,CAAC;QAC9C,YAAO,GAAsB,IAAI,2DAAY,EAAE,CAAC;QAC1D,iBAAY,GAAW,EAAE,CAAC;QAC1B,wBAAmB,GAAW,EAAE,CAAC;QACjC,iBAAY,GAAW,EAAE,CAAC;QAC1B,aAAQ,GAAY,KAAK,CAAC;QAI1B,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACjE,CAAC;IACH,0CAAQ,GAAR;QAAA,iBAoBG;QAnBD,EAAE,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC;YACnC,EAAE,CAAC,CAAC,IAAI,CAAC,YAAY,KAAK,IAAI,CAAC,mBAAmB,CAAC,CAAC,CAAC;gBACnD,IAAM,QAAQ,GAAG,EAAE,WAAW,EAAE,IAAI,CAAC,mBAAmB,EAAE,WAAW,EAAE,IAAI,CAAC,SAAS,EAAE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AAC,CAAC;gBACJ,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,wBAAwB,EAAE,qCAAqC,CAAC;YACtF,CAAC;QACH,CAAC;QAAC,IAAI,CAAC,CAAC;YACN,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,wBAAwB,EAAE,+CAA+C,CAAC;QAChG,CAAC;IACD,CAAC;IAED,gCAAO,GAAP;QACI,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC;IACtB,CAAC;IACD,kCAAS,GAAT;QACI,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;IACxB,CAAC;IAxCS;QAAT,6DAAM,EAAE;kCAAQ,2DAAY;iDAA2B;IAC9C;QAAT,6DAAM,EAAE;kCAAU,2DAAY;mDAA2B;IARjD,cAAc;QAJ1B,gEAAS,CAAC;;SAEV,CAAC;yCAW4B,4EAAW,EAAiB,+DAAM;YACxC,iEAAO,EAAuB,4EAAW;YACpC,uEAAc,EAAgB,4EAAW;YAC9C,iEAAa,EAA0B,uEAAc;OAZhE,cAAc,CAiD1B;IAAD,qBAAC;CAAA;AAjD0B","file":"pages.module.chunk.js","sourcesContent":["module.exports = \"
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n

Change Password

\\r\\n
\\r\\n
\\r\\n \\r\\n
\\r\\n \\r\\n
\\r\\n\\r\\n
\\r\\n
\\r\\n \\r\\n
\\r\\n \\r\\n
\\r\\n
\\r\\n

{{mDescription}}

\\r\\n
\\r\\n
\\r\\n \\r\\n
\\r\\n
\\r\\n\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/app/views/pages/change-password.component.html\n// module id = ./src/app/views/pages/change-password.component.html\n// module chunks = pages.module","import { UserService } from '../../services/user.services';\r\nimport { AuthenData } from '../../globals/globals';\r\n\r\nimport { Component, OnInit, Output, EventEmitter } from '@angular/core';\r\nimport { AuthService } from '../../services/auth.services';\r\nimport { CoursesService } from '../../services/courses.services';\r\nimport { Router, ActivatedRoute} from '@angular/router';\r\nimport { ImplicitReceiver } from '@angular/compiler';\r\nimport { ToastrService } from 'ngx-toastr';\r\n\r\n@Component({\r\n templateUrl: 'change-password.component.html'\r\n})\r\n\r\nexport class ChangePasswordComponent {\r\n @Output() close: EventEmitter = new EventEmitter();\r\n @Output() refresh: EventEmitter = new EventEmitter();\r\n mNewPassword: string = '';\r\n mConfirmNewPassword: string = '';\r\n mDescription: string = '';\r\n mSuccess: boolean = false;\r\n paramsUrl: any;\r\n constructor(private auth: AuthService, private route: Router, private user: UserService, private activatedRoute: ActivatedRoute,\r\n private toastr: ToastrService) {\r\n this.paramsUrl = this.activatedRoute.snapshot.paramMap.get('id');\r\n }\r\nonSubmit() {\r\n if (this.mNewPassword.length > 5) {\r\n if (this.mNewPassword === this.mConfirmNewPassword) {\r\n const criteria = { newPassword: this.mConfirmNewPassword, encryptText: this.paramsUrl };\r\n this.user.changePassword(criteria).subscribe(result => {\r\n if (result.responseStatus === 1) {\r\n this.toastr.success('Change Password Success.', 'Please Login.')\r\n this.onClose();\r\n this.onRefresh();\r\n this.auth.logout();\r\n } else {\r\n this.toastr.error('Change Password Failed.', result.description)\r\n }\r\n });\r\n } else {\r\n this.toastr.error('Change Password Failed.', 'รหัสผ่านไม่ตรง กรุณาตรวจสอบรหัสผ่าน')\r\n}\r\n } else {\r\n this.toastr.error('Reset Password Failed.', 'รหัสผ่านขั้นต่ำ 6 อักขระ กรุณาตรวจสอบรหัสผ่าน')\r\n}\r\n }\r\n\r\n onClose() {\r\n this.close.emit();\r\n}\r\nonRefresh() {\r\n this.refresh.emit();\r\n}\r\n\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/app/views/pages/change-password.component.ts","module.exports = \"
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n

Forget Password

\\r\\n
\\r\\n
\\r\\n \\r\\n \\r\\n \\r\\n
\\r\\n \\r\\n
\\r\\n
\\r\\n

{{mDescription}}

\\r\\n
\\r\\n
\\r\\n
\\r\\n \\r\\n
\\r\\n
\\r\\n \\r\\n
\\r\\n
\\r\\n
\\r\\n\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/app/views/pages/forget-password.component.html\n// module id = ./src/app/views/pages/forget-password.component.html\n// module chunks = pages.module","import { UserService } from '../../services/user.services';\r\nimport { Globals, AuthenData } from '../../globals/globals';\r\nimport { Component, OnInit } from '@angular/core';\r\nimport { AuthService } from '../../services/auth.services';\r\nimport { CoursesService } from '../../services/courses.services';\r\nimport { Router } from '@angular/router';\r\nimport { ImplicitReceiver } from '@angular/compiler';\r\nimport { ToastrService } from 'ngx-toastr';\r\n\r\n@Component({\r\n templateUrl: 'forget-password.component.html'\r\n})\r\n\r\nexport class ForgetPasswordComponent {\r\n\r\n mUserName: string = '';\r\n mDescription: string = '';\r\n mSuccess: boolean = false;\r\n constructor(private auth: AuthService, private route: Router, private user: UserService, private global: Globals, private toastr: ToastrService,) {\r\n\r\n }\r\n onSubmit() {\r\n const criteria = { userName: this.mUserName, urlSendMail : this.global.UrlSendMail};\r\n this.user.forgetPassword(criteria).subscribe(result => {\r\n if (result.responseStatus === 9) {\r\n this.mSuccess = true;\r\n this.mDescription = 'Invalid email for reset password.';\r\n this.toastr.error('Reset Password Failed.', 'Invalid email for reset password.');\r\n } else if (result.responseStatus === 1) {\r\n this.mSuccess = true;\r\n this.mDescription = 'Please check your email for reset password.';\r\n this.toastr.success('Reset Password Failed.', 'Please check your email for reset password.');\r\n } else if (result.responseStatus === 2) {\r\n this.toastr.error('Reset Password Success.', 'Please check email.');\r\n this.mSuccess = true;\r\n this.mDescription = 'Please check email.';\r\n }\r\n });\r\n }\r\n\r\n onBacktoLogin() {\r\n this.route.navigate(['/pages/login']);\r\n }\r\n\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/app/views/pages/forget-password.component.ts","module.exports = \"
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n\\r\\n
\\r\\n
\\r\\n \\r\\n
\\r\\n
\\r\\n
\\r\\n \\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n \\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n

Login

\\r\\n
\\r\\n
\\r\\n Username or password is incorrect\\r\\n
\\r\\n
\\r\\n

Sign In to your account

\\r\\n
\\r\\n
\\r\\n \\r\\n \\r\\n \\r\\n
\\r\\n \\r\\n
\\r\\n
\\r\\n
\\r\\n \\r\\n \\r\\n \\r\\n
\\r\\n \\r\\n
\\r\\n
\\r\\n
\\r\\n \\r\\n
\\r\\n
\\r\\n \\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/app/views/pages/login.component.html\n// module id = ./src/app/views/pages/login.component.html\n// module chunks = pages.module","import { AuthenData, Globals } from '../../globals/globals';\r\nimport { Component, OnInit } from '@angular/core';\r\nimport { AuthService } from '../../services/auth.services';\r\nimport { CoursesService } from '../../services/courses.services';\r\nimport { Router } from '@angular/router';\r\nimport { ImplicitReceiver } from '@angular/compiler';\r\nimport { TranslateService } from '@ngx-translate/core';\r\nimport { UserService } from '../../services/user.services';\r\n\r\n@Component({\r\n templateUrl: 'login.component.html'\r\n})\r\n\r\nexport class LoginComponent {\r\n\r\n mUsername: string = '';\r\n mPassword: string = '';\r\n checkLogin: boolean;\r\n constructor(private auth: AuthService, private route: Router, private global: Globals, private userService: UserService, private translate: TranslateService) {\r\n this.checkLogin = true;\r\n if (window.localStorage.getItem('token') !== null) {\r\n this.route.navigate(['/menu/mainmanagement']);\r\n }\r\n // translate.setDefaultLang('en');\r\n }\r\n onSubmit() {\r\n this.auth.login(this.mUsername, this.mPassword).subscribe(result => {\r\n this.checkLogin = true;\r\n window.localStorage.setItem('token', JSON.stringify(result));\r\n if (result.role === 'RESET') {\r\n this.route.navigate(['/pages/resetpassword'], { queryParams: { nameReset: result.userName } });\r\n } else {\r\n this.userService.Intitial().subscribe(init => {\r\n this.global.setCookie('sidebar', init);\r\n this.global.setMenuList();\r\n this.route.navigate(['/menu/mainmanagement']);\r\n });\r\n }\r\n }, error => {\r\n // window.alert(error);\r\n this.checkLogin = false;\r\n });\r\n }\r\n\r\n onForgetPassword() {\r\n this.route.navigate(['/pages/forgetpassword']);\r\n }\r\n\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/app/views/pages/login.component.ts","import { RedirectService } from '../../services/redirect.services';\r\nimport { ChangePasswordComponent } from './change-password.component';\r\n\r\nimport { NgModule } from '@angular/core';\r\nimport { Routes, RouterModule } from '@angular/router';\r\nimport { LoginComponent } from './login.component';\r\nimport { ForgetPasswordComponent } from './forget-password.component';\r\nimport { ResetComponent } from './reset-password.component';\r\n\r\nconst routes: Routes = [\r\n {\r\n path: '',\r\n data: {\r\n title: 'Example Pages'\r\n },\r\n children: [\r\n {\r\n path: 'login',\r\n component: LoginComponent,\r\n data: {\r\n title: 'Login Page'\r\n }\r\n },\r\n {\r\n path: 'forgetpassword',\r\n component: ForgetPasswordComponent,\r\n data: {\r\n title: 'Forget Password'\r\n }\r\n },\r\n {\r\n path: 'changepassword/:id',\r\n component: ChangePasswordComponent,\r\n data: {\r\n title: 'Change Password'\r\n }\r\n },\r\n {\r\n path: 'resetpassword',\r\n component: ResetComponent,\r\n data: {\r\n title: 'Reset Password'\r\n }\r\n }\r\n ]\r\n }\r\n];\r\n\r\n@NgModule({\r\n imports: [RouterModule.forChild(routes)],\r\n exports: [RouterModule]\r\n})\r\nexport class PagesRoutingModule { }\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/app/views/pages/pages-routing.module.ts","import { HttpClient } from '@angular/common/http';\r\nimport { ChangePasswordComponent } from './change-password.component';\r\nimport { ResetComponent } from './reset-password.component';\r\nimport { NgModule } from '@angular/core';\r\nimport { LoginComponent } from './login.component';\r\nimport { PagesRoutingModule } from './pages-routing.module';\r\nimport { FormsModule } from '@angular/forms';\r\nimport { ForgetPasswordComponent } from './forget-password.component';\r\nimport { TranslateModule, TranslateLoader, TranslateService } from '@ngx-translate/core';\r\nimport { TranslateHttpLoader } from '@ngx-translate/http-loader';\r\nimport { ToastrModule } from 'ngx-toastr';\r\n\r\n@NgModule({\r\n imports: [\r\n PagesRoutingModule,\r\n FormsModule,\r\n ToastrModule.forRoot(),\r\n TranslateModule.forRoot({\r\n loader: {\r\n provide: TranslateLoader,\r\n useFactory: HttpLoaderFactory,\r\n deps: [HttpClient]\r\n }\r\n })\r\n ],\r\n declarations: [\r\n LoginComponent,\r\n ForgetPasswordComponent,\r\n ChangePasswordComponent,\r\n ResetComponent\r\n ]\r\n})\r\nexport class PagesModule {\r\n constructor(private translate: TranslateService) {\r\n translate.setDefaultLang('th');\r\n }\r\n}\r\nexport function HttpLoaderFactory(http: HttpClient) {\r\n return new TranslateHttpLoader(http, './assets/i18n/', '.json');\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/app/views/pages/pages.module.ts","module.exports = \"
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n

Reset Password

\\r\\n\\r\\n
\\r\\n
\\r\\n \\r\\n \\r\\n \\r\\n
\\r\\n {{this.mRUsername}}\\r\\n
\\r\\n
\\r\\n
\\r\\n \\r\\n
\\r\\n \\r\\n
\\r\\n
\\r\\n
\\r\\n \\r\\n
\\r\\n \\r\\n
\\r\\n
\\r\\n
\\r\\n \\r\\n \\r\\n \\r\\n
\\r\\n \\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n \\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/app/views/pages/reset-password.component.html\n// module id = ./src/app/views/pages/reset-password.component.html\n// module chunks = pages.module","import { AuthenData, Globals } from '../../globals/globals';\r\nimport { Component, OnInit, EventEmitter, Output } from '@angular/core';\r\nimport { AuthService } from '../../services/auth.services';\r\nimport { CoursesService } from '../../services/courses.services';\r\nimport { Router, ActivatedRoute } from '@angular/router';\r\nimport { ImplicitReceiver } from '@angular/compiler';\r\nimport { TranslateService } from '@ngx-translate/core';\r\nimport { UserService } from '../../services/user.services';\r\nimport { ToastrService } from 'ngx-toastr';\r\n\r\n\r\n\r\n@Component({\r\n templateUrl: 'reset-password.component.html'\r\n})\r\n\r\nexport class ResetComponent {\r\n mRUsername: any;\r\n mNPassword: string = '';\r\n mOPassword: string = '';\r\n mNCPassword: string = '';\r\n mAlert: any;\r\n paramsUrl: any;\r\n @Output() close: EventEmitter = new EventEmitter();\r\n @Output() refresh: EventEmitter = new EventEmitter();\r\n constructor(private auth: AuthService, private route: Router,\r\n private global: Globals, private userService: UserService,\r\n private routeActive: ActivatedRoute, private user: UserService,\r\n private toastr: ToastrService, private activatedRoute: ActivatedRoute) {\r\n const nameReset = this.routeActive.snapshot.queryParamMap.get('nameReset');\r\n this.mRUsername = nameReset;\r\n }\r\n onSubmit() {\r\n const criteria = { newPassword: this.mNPassword, hasLogin: true, encryptText: this.mRUsername , oldPassword : this.mOPassword};\r\nif (this.mNPassword.length > 5) {\r\n if (this.mNPassword === this.mNCPassword) {\r\n this.user.resetPassword(criteria).subscribe(result => {\r\n if (result.responseStatus === 1) {\r\n this.toastr.success('Reset Password Success.', 'Please Login.')\r\n this.onClose();\r\n this.onRefresh();\r\n this.auth.logout();\r\n } else if (result.responseStatus === 2) {\r\n this.toastr.error('Reset Password Failed.', 'รหัสผ่านเก่าไม่ตรงกับที่ลงทะเบียนผู้ใช้งาน กรุณาตรวจสอบรหัสผ่าน หรือติดต่อเจ้าหน้าที่ดูแลระบบ')\r\n } else if (result.responseStatus === 3) {\r\n this.toastr.error('Reset Password Failed.', 'รหัสผ่านเก่าตรงกับรหัสผ่านใหม่ กรุณาตั้งรหัสอีกครั้ง')\r\n } else {\r\n this.toastr.error('Reset Password Failed.', 'Please contact admin.')\r\n }\r\n });\r\n } else {\r\n this.toastr.error('Reset Password Failed.', 'รหัสผ่านไม่ตรง กรุณาตรวจสอบรหัสผ่าน')\r\n }\r\n } else {\r\n this.toastr.error('Reset Password Failed.', 'รหัสผ่านขั้นต่ำ 6 อักขระ กรุณาตรวจสอบรหัสผ่าน')\r\n }\r\n }\r\n\r\n onClose() {\r\n this.close.emit();\r\n }\r\n onRefresh() {\r\n this.refresh.emit();\r\n }\r\n\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/app/views/pages/reset-password.component.ts"],"sourceRoot":"webpack:///"}