芝麻web文件管理V1.00
编辑当前文件:/home/pulsehostuk9/www/cloud.pulsehost.co.uk/adminpanel/js/9313.494a7abb.js
"use strict";(globalThis["webpackChunkadmin_panel_vue_webclient"]=globalThis["webpackChunkadmin_panel_vue_webclient"]||[]).push([[9313],{9313:(e,t,l)=>{l.r(t),l.d(t,{default:()=>D});var s=l(9835);const i={class:"q-pa-lg"},n={class:"row q-mb-md"},a={class:"col text-h5"},o={class:"row"},r={class:"col-8"},d=["innerHTML"],p={key:0,class:"row q-mt-md"},u={class:"col-8"};function I(e,t,l,I,c,L){const h=(0,s.up)("q-item-label"),m=(0,s.up)("q-btn"),A=(0,s.up)("q-card-section"),_=(0,s.up)("q-card"),w=(0,s.up)("q-card-actions"),g=(0,s.up)("q-dialog"),S=(0,s.up)("q-linear-progress"),E=(0,s.up)("q-inner-loading"),T=(0,s.up)("q-scroll-area"),b=(0,s.Q2)("t");return(0,s.wg)(),(0,s.j4)(T,{class:"full-height full-width"},{default:(0,s.w5)((()=>[(0,s._)("div",i,[(0,s._)("div",n,[(0,s.wy)((0,s._)("div",a,null,512),[[b,"IPALLOWLIST.HEADING_IP_ALLOWLIST"]])]),(0,s.Wm)(_,{flat:"",bordered:"",class:"card-edit-settings q-mt-lg"},{default:(0,s.w5)((()=>[(0,s.Wm)(A,null,{default:(0,s.w5)((()=>[(0,s._)("div",o,[(0,s._)("div",r,[(0,s.Wm)(h,{caption:""},{default:(0,s.w5)((()=>[(0,s._)("div",{innerHTML:L.inscriptionIpAllowlist},null,8,d)])),_:1})])]),c.ipAllowlistEnabled?((0,s.wg)(),(0,s.iD)("div",p,[(0,s._)("div",u,[(0,s.Wm)(m,{unelevated:"","no-caps":"","no-wrap":"",dense:"",class:"q-px-xs",ripple:!1,color:"primary",label:e.$t("IPALLOWLIST.ACTION_DISABLE_IP_ALLOWLIST"),onClick:t[0]||(t[0]=e=>c.confirmIpAllowlist=!0)},null,8,["label"])])])):(0,s.kq)("",!0)])),_:1})])),_:1})]),(0,s.Wm)(g,{modelValue:c.confirmIpAllowlist,"onUpdate:modelValue":t[2]||(t[2]=e=>c.confirmIpAllowlist=e),persistent:""},{default:(0,s.w5)((()=>[(0,s.Wm)(_,{style:{"min-width":"300px"}},{default:(0,s.w5)((()=>[(0,s.Wm)(A,null,{default:(0,s.w5)((()=>[(0,s.wy)((0,s._)("span",null,null,512),[[b,"COREWEBCLIENT.CONFIRM_DISCARD_CHANGES"]])])),_:1}),(0,s.Wm)(w,{align:"right"},{default:(0,s.w5)((()=>[(0,s.Wm)(m,{unelevated:"","no-caps":"",dense:"",class:"q-px-sm",ripple:!1,color:"primary",onClick:L.disableIpAllowlist,label:e.$t("IPALLOWLIST.ACTION_DISABLE_IP_ALLOWLIST")},null,8,["onClick","label"]),(0,s.Wm)(m,{unelevated:"","no-caps":"",dense:"",class:"q-px-sm",ripple:!1,color:"primary",label:e.$t("COREWEBCLIENT.ACTION_CANCEL"),onClick:t[1]||(t[1]=e=>c.confirmIpAllowlist=!1)},null,8,["label"])])),_:1})])),_:1})])),_:1},8,["modelValue"]),(0,s.Wm)(E,{style:{"justify-content":"flex-start"},showing:c.loading||c.saving},{default:(0,s.w5)((()=>[(0,s.Wm)(S,{query:""})])),_:1},8,["showing"])])),_:1})}var c=l(4089),L=l(4409),h=l.n(L),m=l(9706),A=l(2456),_=l(1427),w=l(9336);const g={name:"IpAllowListAdminSettingsPerUser",data(){return{user:null,loading:!1,saving:!1,ipAllowlistEnabled:!1,confirmIpAllowlist:!1}},computed:{inscriptionIpAllowlist(){return this.ipAllowlistEnabled?this.$t("IPALLOWLIST.INFO_IP_ALLOWLIST_ENABLED_FOR_USER",{USER:this.user?.publicId}):this.$t("IPALLOWLIST.INFO_IP_ALLOWLIST_DISABLED_FOR_USER",{USER:this.user?.publicId})}},watch:{$route(e,t){this.parseRoute()}},mounted(){this.parseRoute()},methods:{parseRoute(){const e=c.Z.pPositiveInt(this.$route?.params?.id);this.user?.id!==e&&(this.user={id:e},this.populate())},populate(){this.loading=!0;const e=this.$store.getters["tenants/getCurrentTenantId"];m.Z.getUser(e,this.user.id).then((({user:e,userId:t})=>{t===this.user.id&&(this.loading=!1,e&&h().isFunction(e?.getData)?(this.user=e,this.getUserSettings()):this.$emit("no-user-found"))}))},disableIpAllowlist(){const e={UserId:this.user.id,TenantId:this.user.tenantId};A.Z.sendRequest({moduleName:"IPAllowList",methodName:"DisableUserIpAllowlist",parameters:e}).then((e=>{this.confirmIpAllowlist=!1,e?(this.populate(),_.Z.showReport(this.$t("IPALLOWLIST.REPORT_DISABLE_USER_IP_ALLOWLIST",{USER:this.user.publicId}))):_.Z.showError(this.$t("IPALLOWLIST.ERROR_DISABLE_USER_IP_ALLOWLIST",{USER:this.user.publicId}))}),(e=>{this.confirmIpAllowlist=!1,_.Z.showError(w.Z.getTextFromResponse(e,this.$t("IPALLOWLIST.ERROR_DISABLE_USER_IP_ALLOWLIST",{USER:this.user.publicId})))}))},getUserSettings(){this.loading=!0;const e={UserId:this.user.id,TenantId:this.user.tenantId};A.Z.sendRequest({moduleName:"IPAllowList",methodName:"GetUserSettings",parameters:e}).then((e=>{this.loading=!1,e&&(this.ipAllowlistEnabled=e?.IpAllowlistEnabled)}),(e=>{this.loading=!1,_.Z.showError(w.Z.getTextFromResponse(e))}))}}};var S=l(1639),E=l(6663),T=l(4458),b=l(3190),R=l(3115),W=l(8879),O=l(7743),f=l(1821),P=l(854),C=l(8289),q=l(9984),U=l.n(q);const v=(0,S.Z)(g,[["render",I]]),Z=v;U()(g,"components",{QScrollArea:E.Z,QCard:T.Z,QCardSection:b.Z,QItemLabel:R.Z,QBtn:W.Z,QDialog:O.Z,QCardActions:f.Z,QInnerLoading:P.Z,QLinearProgress:C.Z});var N=l(8936);const D={moduleName:"IPAllowList",requiredModules:[],getAdminUserTabs(){const e=N["default"].getters["user/isUserSuperAdmin"];return e?[{tabName:"ip-allowlist",tabTitle:"IPALLOWLIST.LABEL_SETTINGS_TAB",tabRouteChildren:[{path:"id/:id/ip-allowlist",component:Z},{path:"search/:search/id/:id/ip-allowlist",component:Z},{path:"page/:page/id/:id/ip-allowlist",component:Z},{path:"search/:search/page/:page/id/:id/ip-allowlist",component:Z}]}]:[]}}}}]);