1 line
No EOL
2.9 KiB
JavaScript
1 line
No EOL
2.9 KiB
JavaScript
"use strict";(self.webpackChunkEasyAngular=self.webpackChunkEasyAngular||[]).push([[142],{3142:(h,i,a)=>{a.r(i),a.d(i,{ForgotPasswordComponent:()=>v});var l=a(467),m=a(177),r=a(9417),_=a(4550),u=a(9664),t=a(4438),d=a(1315),c=a(6825);const p=e=>({"is-invalid":e});function f(e,g){1&e&&(t.j41(0,"div",13),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&e&&(t.R7$(),t.SpI(" ",t.bMT(2,1,"FIELD_REQUIRED")," "))}function E(e,g){1&e&&(t.j41(0,"div",13),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&e&&(t.R7$(),t.SpI(" ",t.bMT(2,1,"FIELD_EMAIL")," "))}let v=(()=>{class e{constructor(o,s,n){this.router=o,this.storeService=s,this.appService=n,this.initFormGroup()}initFormGroup(){this.formGroup=new r.gE({email:new r.MJ({value:"",disabled:!1},{validators:[r.k0.required,r.k0.email],nonNullable:!0})})}onClickSubmit(){var o=this;return(0,l.A)(function*(){yield o.forgotPassword()})()}forgotPassword(){var o=this;return(0,l.A)(function*(){o.storeService.isLoading.set(!0);const s=o.formGroup.controls.email.getRawValue(),n=yield o.appService.forgotPassword(s);o.storeService.isLoading.set(!1),n&&o.router.navigate(["/auth/validate-account"])})()}static#t=this.\u0275fac=function(s){return new(s||e)(t.rXU(_.Ix),t.rXU(d.n),t.rXU(c.d))};static#r=this.\u0275cmp=t.VBU({type:e,selectors:[["app-forgot-password"]],standalone:!0,features:[t.aNF],decls:22,vars:19,consts:[[1,"text-center","text-primary","mb-4"],[1,"h2","fw-normal","mb-0"],[1,"d-flex","justify-content-center"],[1,"wrapper"],[3,"ngSubmit","formGroup"],[1,"mb-3"],["for","email",1,"form-label","text-start","w-100"],["type","email","id","email","formControlName","email",1,"form-control",3,"ngClass"],["class","invalid-feedback",4,"ngIf"],[1,"text-center"],["type","submit",1,"btn","btn-primary","px-5",3,"disabled"],[1,"text-center","my-3"],["routerLink","/auth/login"],[1,"invalid-feedback"]],template:function(s,n){1&s&&(t.j41(0,"div",0)(1,"div",1),t.EFF(2),t.nI1(3,"translate"),t.k0s()(),t.j41(4,"div",2)(5,"div",3)(6,"form",4),t.bIt("ngSubmit",function(){return n.onClickSubmit()}),t.j41(7,"div",5)(8,"label",6),t.EFF(9),t.nI1(10,"translate"),t.k0s(),t.nrm(11,"input",7),t.DNE(12,f,3,3,"div",8)(13,E,3,3,"div",8),t.k0s(),t.j41(14,"div",9)(15,"button",10),t.EFF(16),t.nI1(17,"translate"),t.k0s()(),t.j41(18,"div",11)(19,"a",12),t.EFF(20),t.nI1(21,"translate"),t.k0s()()()()()),2&s&&(t.R7$(2),t.JRh(t.bMT(3,9,"FORGOT_YOUR_PWD")),t.R7$(4),t.Y8G("formGroup",n.formGroup),t.R7$(3),t.JRh(t.bMT(10,11,"EMAIL")),t.R7$(2),t.Y8G("ngClass",t.eq3(17,p,n.formGroup.controls.email.errors&&n.formGroup.controls.email.touched)),t.R7$(),t.Y8G("ngIf",n.formGroup.controls.email.hasError("required")),t.R7$(),t.Y8G("ngIf",n.formGroup.controls.email.hasError("email")),t.R7$(2),t.Y8G("disabled",!n.formGroup.valid),t.R7$(),t.SpI(" ",t.bMT(17,13,"RESET_PASSWORD")," "),t.R7$(4),t.JRh(t.bMT(21,15,"BACK_TO_LOGIN")))},dependencies:[r.YN,r.qT,r.me,r.BC,r.cb,r.X1,r.j4,r.JD,m.YU,m.bT,_.Wk,u.h,u.D9],styles:[".wrapper[_ngcontent-%COMP%]{max-width:350px;width:100%}"]})}return e})()}}]); |