/home/ivoiecob/email.hirewise-va.com/adminpanel/js/1985.28653a54.js
"use strict";(globalThis["webpackChunkadmin_panel_vue_webclient"]=globalThis["webpackChunkadmin_panel_vue_webclient"]||[]).push([[1985],{21985:(t,e,o)=>{o.r(e),o.d(e,{default:()=>H});var a=o(61758);const i={class:"q-pa-lg"},n={class:"row q-mb-md"},s={class:"col text-h5"},r={class:"row"},l={class:"col-8"},c=["innerHTML"],u={key:0,class:"row q-mt-md"},d={class:"col-8"},h=["innerHTML"];function A(t,e,o,A,T,p){const F=(0,a.g2)("q-item-label"),m=(0,a.g2)("q-btn"),g=(0,a.g2)("q-card-section"),b=(0,a.g2)("q-card"),w=(0,a.g2)("q-card-actions"),_=(0,a.g2)("q-dialog"),R=(0,a.g2)("q-linear-progress"),E=(0,a.g2)("q-inner-loading"),I=(0,a.g2)("q-scroll-area"),O=(0,a.gN)("t");return(0,a.uX)(),(0,a.Wv)(I,{class:"full-height full-width"},{default:(0,a.k6)((()=>[(0,a.Lk)("div",i,[(0,a.Lk)("div",n,[(0,a.bo)((0,a.Lk)("div",s,null,512),[[O,"TWOFACTORAUTH.HEADING_SETTINGS_TAB"]])]),(0,a.bF)(b,{flat:"",bordered:"",class:"card-edit-settings"},{default:(0,a.k6)((()=>[(0,a.bF)(g,null,{default:(0,a.k6)((()=>[(0,a.Lk)("div",r,[(0,a.Lk)("div",l,[(0,a.bF)(F,{caption:""},{default:(0,a.k6)((()=>[(0,a.Lk)("div",{innerHTML:p.inscriptionTwoFactorAuthentication},null,8,c)])),_:1})])]),T.twoFactorAuthEnabled?((0,a.uX)(),(0,a.CE)("div",u,[(0,a.Lk)("div",d,[(0,a.bF)(m,{unelevated:"","no-caps":"","no-wrap":"",dense:"",class:"q-px-xs",ripple:!1,color:"primary",label:t.$t("TWOFACTORAUTH.ACTION_DISABLE_TFA"),onClick:p.showTwoFactorAuthenticationDialogue},null,8,["label","onClick"])])])):(0,a.Q3)("",!0)])),_:1})])),_:1})]),(0,a.bF)(_,{modelValue:T.confirmTwoFactorAuthentication,"onUpdate:modelValue":e[1]||(e[1]=t=>T.confirmTwoFactorAuthentication=t),persistent:""},{default:(0,a.k6)((()=>[(0,a.bF)(b,{style:{"min-width":"300px"}},{default:(0,a.k6)((()=>[(0,a.bF)(g,null,{default:(0,a.k6)((()=>[(0,a.Lk)("span",{innerHTML:p.confirmDisableTwoFactorAuthentication},null,8,h)])),_:1}),(0,a.bF)(w,{align:"right"},{default:(0,a.k6)((()=>[(0,a.bF)(m,{unelevated:"","no-caps":"",dense:"",class:"q-px-sm",ripple:!1,color:"primary",onClick:p.disableTwoFactorAuthentication,label:t.$t("TWOFACTORAUTH.ACTION_DISABLE_TFA")},null,8,["onClick","label"]),(0,a.bF)(m,{unelevated:"","no-caps":"",dense:"",class:"q-px-sm",ripple:!1,color:"primary",label:t.$t("COREWEBCLIENT.ACTION_CANCEL"),onClick:e[0]||(e[0]=t=>T.confirmTwoFactorAuthentication=!1)},null,8,["label"])])),_:1})])),_:1})])),_:1},8,["modelValue"]),(0,a.bF)(E,{style:{"justify-content":"flex-start"},showing:T.loading||T.saving},{default:(0,a.k6)((()=>[(0,a.bF)(R,{query:""})])),_:1},8,["showing"])])),_:1})}var T=o(79134),p=o(38176),F=o(36720),m=o(35118),g=o(43436),b=o.n(g),w=o(64595);const _={name:"TwoFactorAuthAdminSettingsPerUser",data(){return{user:null,loading:!1,saving:!1,twoFactorAuthEnabled:!1,confirmTwoFactorAuthentication:!1}},computed:{inscriptionTwoFactorAuthentication(){return this.twoFactorAuthEnabled?this.$t("TWOFACTORAUTH.INFO_TFA_ENABLED_FOR_USER",{USER:this.user?.publicId}):this.$t("TWOFACTORAUTH.INFO_TFA_DISABLED_FOR_USER",{USER:this.user?.publicId})},confirmDisableTwoFactorAuthentication(){return this.$t("TWOFACTORAUTH.CONFIRM_DISABLE_TFA",{USER:this.user?.publicId})}},watch:{$route(t,e){this.parseRoute()}},mounted(){this.parseRoute()},methods:{disableTwoFactorAuthentication(){const t={UserId:this.user.id,TenantId:this.user.tenantId};T.A.sendRequest({moduleName:"TwoFactorAuth",methodName:"DisableUserTwoFactorAuth",parameters:t}).then((t=>{this.confirmTwoFactorAuthentication=!1,t?(this.populate(),p.A.showReport(this.$t("TWOFACTORAUTH.REPORT_DISABLE_USER_TFA",{USER:this.user.publicId}))):p.A.showError(this.$t("TWOFACTORAUTH.ERROR_DISABLE_USER_TFA",{USER:this.user.publicId}))}),(t=>{this.confirmTwoFactorAuthentication=!1,p.A.showError(F.A.getTextFromResponse(t,this.$t("TWOFACTORAUTH.ERROR_DISABLE_USER_TFA",{USER:this.user.publicId})))}))},showTwoFactorAuthenticationDialogue(){this.confirmTwoFactorAuthentication=!0},parseRoute(){const t=m.A.pPositiveInt(this.$route?.params?.id);this.user?.id!==t&&(this.user={id:t},this.populate())},populate(){this.loading=!0;const t=this.$store.getters["tenants/getCurrentTenantId"];w.A.getUser(t,this.user.id).then((({user:t,userId:e})=>{e===this.user.id&&(this.loading=!1,t&&b().isFunction(t?.getData)?(this.user=t,this.getUserSettings()):this.$emit("no-user-found"))}))},getUserSettings(){this.loading=!0;const t={UserId:this.user.id,TenantId:this.user.tenantId};T.A.sendRequest({moduleName:"TwoFactorAuth",methodName:"GetUserSettings",parameters:t}).then((t=>{this.loading=!1,t&&(this.twoFactorAuthEnabled=t?.TwoFactorAuthEnabled)}),(t=>{this.loading=!1,p.A.showError(F.A.getTextFromResponse(t))}))}}};var R=o(12807),E=o(48958),I=o(23316),O=o(44189),f=o(13796),C=o(56384),U=o(20558),S=o(62669),k=o(39035),L=o(35859),v=o(98582),q=o.n(v);const N=(0,R.A)(_,[["render",A]]),D=N;q()(_,"components",{QScrollArea:E.A,QCard:I.A,QCardSection:O.A,QItemLabel:f.A,QBtn:C.A,QDialog:U.A,QCardActions:S.A,QInnerLoading:k.A,QLinearProgress:L.A});const H={moduleName:"TwoFactorAuth",requiredModules:[],getAdminUserTabs(){return[{tabName:"two-factor-auth",tabTitle:"TWOFACTORAUTH.LABEL_SETTINGS_TAB",tabRouteChildren:[{path:"id/:id/two-factor-auth",component:D},{path:"search/:search/id/:id/two-factor-auth",component:D},{path:"page/:page/id/:id/two-factor-auth",component:D},{path:"search/:search/page/:page/id/:id/two-factor-auth",component:D}]}]}}}}]);