/home/ivoiecob/email.hirewise-va.com/adminpanel/js/5452.8803df8f.js
"use strict";(globalThis["webpackChunkadmin_panel_vue_webclient"]=globalThis["webpackChunkadmin_panel_vue_webclient"]||[]).push([[5452],{45452:(i,t,o)=>{o.r(t),o.d(t,{default:()=>ti});var e=o(61758),n=o(58790);const s={class:"q-pa-lg"},a={class:"row q-mb-md"},c={class:"col text-h5"},l={class:"row"},r={class:"col-2 q-mt-sm"},u={class:"col-5"},d={class:"row q-my-md"},S={class:""},T={class:"row q-mt-sm"},f={class:"col-2 q-mt-sm"},A={class:"col-5"},h={class:"row q-mt-md"},E={class:"col-2 q-mt-sm"},m={class:"col-5"},L={class:"row q-my-md"},p={key:0,class:"row q-mt-sm"},P={class:"col-2 q-mt-sm"},N={class:"col-5"},R={key:1,class:"row q-mt-md"},_={class:"col-2 q-mt-sm"},v={class:"col-1"},I={class:"col-2 q-ml-sm"},O={key:2,class:"row q-mt-md"},k={class:"col-2 q-mt-sm"},b={class:"col-2"},g={class:"col-2 q-ml-sm"},D={class:"q-pt-md text-right"};function w(i,t,o,w,C,M){const y=(0,e.g2)("q-input"),U=(0,e.g2)("q-item-label"),F=(0,e.g2)("q-select"),V=(0,e.g2)("q-checkbox"),q=(0,e.g2)("q-card-section"),W=(0,e.g2)("q-card"),B=(0,e.g2)("q-btn"),$=(0,e.g2)("q-linear-progress"),H=(0,e.g2)("q-inner-loading"),Q=(0,e.g2)("q-scroll-area"),Y=(0,e.gN)("t");return(0,e.uX)(),(0,e.Wv)(Q,{class:"full-height full-width"},{default:(0,e.k6)((()=>[(0,e.Lk)("div",s,[(0,e.Lk)("div",a,[(0,e.Lk)("div",c,(0,n.v_)(i.$t("STANDARDRESETPASSWORD.HEADING_SETTINGS_TAB")),1)]),(0,e.bF)(W,{flat:"",bordered:"",class:"card-edit-settings"},{default:(0,e.k6)((()=>[(0,e.bF)(q,null,{default:(0,e.k6)((()=>[(0,e.Lk)("div",l,[(0,e.Lk)("div",r,(0,n.v_)(i.$t("STANDARDRESETPASSWORD.LABEL_RECOVERY_LINK_LIFETIME_MINUTES")),1),(0,e.Lk)("div",u,[(0,e.bF)(y,{outlined:"",dense:"","bg-color":"white",modelValue:C.recoveryLinkLifetimeMinutes,"onUpdate:modelValue":t[0]||(t[0]=i=>C.recoveryLinkLifetimeMinutes=i)},null,8,["modelValue"])])]),(0,e.Lk)("div",d,[(0,e.bF)(U,{caption:""},{default:(0,e.k6)((()=>[(0,e.bo)((0,e.Lk)("span",S,null,512),[[Y,"STANDARDRESETPASSWORD.HINT_RECOVERY_LINK_LIFETIME"]])])),_:1})]),(0,e.Lk)("div",T,[(0,e.Lk)("div",f,(0,n.v_)(i.$t("STANDARDRESETPASSWORD.LABEL_NOTIFICATION_EMAIL")),1),(0,e.Lk)("div",A,[(0,e.bF)(y,{outlined:"",dense:"","bg-color":"white",modelValue:C.notificationEmail,"onUpdate:modelValue":t[1]||(t[1]=i=>C.notificationEmail=i)},null,8,["modelValue"])])]),(0,e.Lk)("div",h,[(0,e.Lk)("div",E,(0,n.v_)(i.$t("STANDARDRESETPASSWORD.LABEL_NOTIFICATION_TYPE")),1),(0,e.Lk)("div",m,[(0,e.bF)(F,{flat:"",outlined:"",dense:"","bg-color":"white",modelValue:C.notificationType,"onUpdate:modelValue":t[2]||(t[2]=i=>C.notificationType=i),options:C.notificationTypes},null,8,["modelValue","options"])])]),(0,e.Lk)("div",L,[(0,e.bF)(U,{caption:""},{default:(0,e.k6)((()=>[(0,e.Lk)("span",null,(0,n.v_)(C.inscription),1)])),_:1})]),"smtp"===C.notificationType.value?((0,e.uX)(),(0,e.CE)("div",p,[(0,e.Lk)("div",P,(0,n.v_)(i.$t("STANDARDRESETPASSWORD.LABEL_NOTIFICATION_HOST")),1),(0,e.Lk)("div",N,[(0,e.bF)(y,{outlined:"",dense:"","bg-color":"white",modelValue:C.notificationHost,"onUpdate:modelValue":t[3]||(t[3]=i=>C.notificationHost=i)},null,8,["modelValue"])])])):(0,e.Q3)("",!0),"smtp"===C.notificationType.value?((0,e.uX)(),(0,e.CE)("div",R,[(0,e.bo)((0,e.Lk)("div",_,null,512),[[Y,"STANDARDRESETPASSWORD.LABEL_NOTIFICATION_PORT"]]),(0,e.Lk)("div",v,[(0,e.bF)(y,{outlined:"",dense:"","bg-color":"white",modelValue:C.notificationPort,"onUpdate:modelValue":t[4]||(t[4]=i=>C.notificationPort=i)},null,8,["modelValue"])]),(0,e.Lk)("div",I,[(0,e.bF)(F,{outlined:"",dense:"","bg-color":"white",modelValue:C.notificationSMTPSecure,"onUpdate:modelValue":t[5]||(t[5]=i=>C.notificationSMTPSecure=i),"emit-value":"","map-options":"",options:C.SMTPSecureOptions},null,8,["modelValue","options"])])])):(0,e.Q3)("",!0),"smtp"===C.notificationType.value?((0,e.uX)(),(0,e.CE)("div",O,[(0,e.Lk)("div",k,[(0,e.bF)(V,{dense:"",modelValue:C.notificationUseAuth,"onUpdate:modelValue":t[6]||(t[6]=i=>C.notificationUseAuth=i)},{default:(0,e.k6)((()=>[(0,e.bF)(U,null,{default:(0,e.k6)((()=>[(0,e.eW)((0,n.v_)(i.$t("STANDARDRESETPASSWORD.LABEL_NOTIFICATION_USE_AUTH")),1)])),_:1})])),_:1},8,["modelValue"])]),(0,e.Lk)("div",b,[(0,e.bF)(y,{outlined:"",dense:"","bg-color":"white",placeholder:i.$t("COREWEBCLIENT.LABEL_LOGIN"),disable:!C.notificationUseAuth,modelValue:C.notificationLogin,"onUpdate:modelValue":t[7]||(t[7]=i=>C.notificationLogin=i)},null,8,["placeholder","disable","modelValue"])]),(0,e.Lk)("div",g,[(0,e.bF)(y,{outlined:"",dense:"","bg-color":"white",placeholder:i.$t("COREWEBCLIENT.LABEL_PASSWORD"),type:"password",autocomplete:"new-password",disable:!C.notificationUseAuth,modelValue:C.notificationPassword,"onUpdate:modelValue":t[8]||(t[8]=i=>C.notificationPassword=i)},null,8,["placeholder","disable","modelValue"])])])):(0,e.Q3)("",!0)])),_:1})])),_:1}),(0,e.Lk)("div",D,[(0,e.bF)(B,{unelevated:"","no-caps":"",dense:"",class:"q-px-sm",ripple:!1,color:"primary",label:i.$t("COREWEBCLIENT.ACTION_SAVE"),onClick:M.save},null,8,["label","onClick"])])]),(0,e.bF)(H,{style:{"justify-content":"flex-start"},showing:C.saving},{default:(0,e.k6)((()=>[(0,e.bF)($,{query:""})])),_:1},8,["showing"])])),_:1})}o(63150),o(26003);var C=o(36720),M=o(38176),y=o(79134),U=o(64512),F=o(3993);const V=" ",q={noSecure:"25",ssl:"465",tls:"587"},W={name:"PasswordResetSettings",data(){return{saving:!1,notificationTypes:[],notificationType:{},inscription:"",recoveryLinkLifetimeMinutes:0,notificationEmail:"",notificationPort:0,notificationHost:"",SMTPSecureEnum:U.A.SMTPSecure,SMTPSecureOptions:[{label:this.$t("STANDARDRESETPASSWORD.LABEL_NOTIFICATION_SMTP_NO_SECURE"),value:U.A.SMTPSecure.noSecure},{label:this.$t("STANDARDRESETPASSWORD.LABEL_NOTIFICATION_SMTP_SSL_SECURE"),value:U.A.SMTPSecure.ssl},{label:this.$t("STANDARDRESETPASSWORD.LABEL_NOTIFICATION_SMTP_TLS_SECURE"),value:U.A.SMTPSecure.tls}],notificationSMTPSecure:U.A.SMTPSecure.noSecure,notificationUseAuth:!1,notificationLogin:"",notificationPassword:V,savedPass:V,hasNotificationPassword:!1}},beforeRouteLeave(i,t,o){this.$root.doBeforeRouteLeave(i,t,o)},mounted(){this.populate()},watch:{"notificationType.value":function(){this.setInscription()},notificationSMTPSecure(i,t){const o=q[Object.keys(this.SMTPSecureEnum).find((i=>this.SMTPSecureEnum[i]===t))],e=q[Object.keys(this.SMTPSecureEnum).find((t=>this.SMTPSecureEnum[t]===i))];this.notificationPort==o&&e&&(this.notificationPort=e)}},methods:{hasChanges(){const i=F.A.getStandardResetPasswordSettings();return this.recoveryLinkLifetimeMinutes!==i.recoveryLinkLifetimeMinutes||this.notificationEmail!==i.notificationEmail||this.notificationPort!==i.notificationPort||this.notificationHost!==i.notificationHost||this.notificationSMTPSecure!==i.notificationSMTPSecure||this.notificationUseAuth!==i.notificationUseAuth||this.notificationLogin!==i.notificationLogin||this.hasNotificationPassword!==i.hasNotificationPassword||this.notificationType.value!==i.notificationType},revertChanges(){this.populate()},populate(){const i=F.A.getStandardResetPasswordSettings();this.recoveryLinkLifetimeMinutes=i.recoveryLinkLifetimeMinutes,this.notificationEmail=i.notificationEmail,this.notificationPort=i.notificationPort,this.notificationHost=i.notificationHost,this.notificationSMTPSecure=i.notificationSMTPSecure,this.notificationUseAuth=i.notificationUseAuth,this.notificationLogin=i.notificationLogin,this.hasNotificationPassword=i.hasNotificationPassword;const t=i.notificationType;this.notificationTypes=[{value:"mail",label:this.$t("STANDARDRESETPASSWORD.LABEL_NOTIFICATION_TYPE_MAIL")},{value:"smtp",label:this.$t("STANDARDRESETPASSWORD.LABEL_NOTIFICATION_TYPE_SMTP")},{value:"account",label:this.$t("STANDARDRESETPASSWORD.LABEL_NOTIFICATION_TYPE_ACCOUNT")}],this.notificationType=this.notificationTypes.find((i=>i.value===t)),this.setInscription()},save(){if(!this.saving){this.saving=!0;const i={NotificationEmail:this.notificationEmail,NotificationType:this.notificationType.value,RecoveryLinkLifetimeMinutes:this.recoveryLinkLifetimeMinutes};"smtp"===this.notificationType.value&&(i.NotificationHost=this.notificationHost,i.NotificationPort=this.notificationPort,i.NotificationSMTPSecure=this.notificationSMTPSecure,i.NotificationUseAuth=this.notificationUseAuth,this.notificationUseAuth?(i.NotificationLogin=this.notificationLogin,this.notificationPassword!==V&&(i.NotificationPassword=this.notificationPassword)):i.NotificationUseAuth=this.notificationUseAuth),y.A.sendRequest({moduleName:"StandardResetPassword",methodName:"UpdateAdminSettings",parameters:i}).then((i=>{this.saving=!1,i?(F.A.saveStandardResetPasswordSettings({notificationHost:this.notificationHost,notificationPort:this.notificationPort,notificationSMTPSecure:this.notificationSMTPSecure,notificationUseAuth:this.notificationUseAuth,notificationLogin:this.notificationLogin,hasNotificationPassword:""!==this.notificationPassword&&this.notificationUseAuth,notificationEmail:this.notificationEmail,notificationType:this.notificationType.value,recoveryLinkLifetimeMinutes:this.recoveryLinkLifetimeMinutes}),this.savedPass=this.notificationPassword,M.A.showReport(this.$t("COREWEBCLIENT.REPORT_SETTINGS_UPDATE_SUCCESS")),this.populate()):M.A.showError(this.$t("COREWEBCLIENT.ERROR_SAVING_SETTINGS_FAILED"))}),(i=>{this.saving=!1,M.A.showError(C.A.getTextFromResponse(i,this.$t("COREWEBCLIENT.ERROR_SAVING_SETTINGS_FAILED")))}))}},setInscription(){switch(this.notificationType?.value){case"smtp":this.inscription=this.$t("STANDARDRESETPASSWORD.HINT_NOTIFICATION_TYPE_SMTP");break;case"mail":this.inscription=this.$t("STANDARDRESETPASSWORD.HINT_NOTIFICATION_TYPE_MAIL");break;case"account":this.inscription=this.$t("STANDARDRESETPASSWORD.HINT_NOTIFICATION_TYPE_ACCOUNT");break}}}};var B=o(12807),$=o(48958),H=o(23316),Q=o(44189),Y=o(39270),G=o(13796),x=o(62606),X=o(37022),j=o(56384),K=o(39035),z=o(35859),J=o(98582),Z=o.n(J);const ii=(0,B.A)(W,[["render",w]]),ti=ii;Z()(W,"components",{QScrollArea:$.A,QCard:H.A,QCardSection:Q.A,QInput:Y.A,QItemLabel:G.A,QSelect:x.A,QCheckbox:X.A,QBtn:j.A,QInnerLoading:K.A,QLinearProgress:z.A})}}]);