PageSourceSearch

https://gazprom.kg/assets/SettingsModal-CA9dLfn6.js

js gazprom.kg collected 2026-10-07 03:01:20 UTC 5,997 bytes, 1 lines download raw bytes

1import{T as g,J as f,U as y,_ as v,M as E,c as n,o as t,b as a,u as d,v as r,x as _,F as h,D as k,G as A,w as D,d as C,N,L as B,O as M,E as I,A as V,K as x,t as F}from"./index-ae80RWzP.js";import{_ as U}from"./BaseInput-BByyJOvX.js";import L from"./left-arrow-back-0kXqCHui.js";import"./question-DJwRJGH1.js";const O={data(){return{passwordData:{curPassCode:"",newPassCode:"",reNewPassCode:""},passwordError:{curPassCode:"",newPassCode:"",reNewPassCode:""},inputLabels:{curPassCode:"Старый пароль",newPassCode:"Новый пароль",reNewPassCode:"Повторите пароль"},globalError:"",loading:!1}},computed:{passwordFields(){return["curPassCode","newPassCode","reNewPassCode"]}},methods:{...g(y,["close"]),...g(f,["fetchUserProfile"]),validateField(s,o){this.passwordError[s]="",o?(o.length!==4||/\D/.test(o))&&(this.passwordError[s]="Пароль должен состоять из 4 цифр."):this.passwordError[s]="Поле не может быть пустым.",s==="reNewPassCode"&&o&&o!==this.passwordData.newPassCode&&(this.passwordError.reNewPassCode="Пароли не совпадают.")},async changePassword(){if(this.globalError="",Object.keys(this.passwordData).forEach(s=>{this.validateField(s,this.passwordData[s])}),!Object.values(this.passwordError).some(s=>s)){this.loading=!0;try{await this.$axiosApi.post("/gazprom-app/user/changePass",this.passwordData).then(({data:s})=>{s&&this.close()}).catch(s=>{this.globalError=s.response.data.message||{}})}catch(s){s.response&&s.response.data&&(this.globalError=s.response.data.message||{})}this.loading=!1}},filterNumericInput(s,o){this.passwordData[s]=this.passwordData[s].replace(/\D/g,"").slice(0,o)}}},j={class:"settings-main-title"},z={key:0,class:"error-pass"},T={key:0,class:"error-pass"};function G(s,o,p,P,e,c){const u=U,l=N,w=B,m=E("maska");return t(),n(h,null,[a("p",j,r(s.$t("modals.changePin.title")),1),e.globalError?(t(),n("span",z,r(e.globalError),1)):d("",!0),a("form",{class:"change-pin-form",onSubmit:o[0]||(o[0]=M((...i)=>c.changePassword&&c.changePassword(...i),["prevent"]))},[(t(!0),n(h,null,k(c.passwordFields,i=>(t(),n(h,{key:i},[A(_(u,{placeholder:"****",label:e.inputLabels[i],modelValue:e.passwordData[i],"onUpdate:modelValue":b=>e.passwordData[i]=b,inputType:"password",error:!!e.passwordError[i],onInput:b=>c.filterNumericInput(i,4)},null,8,["label","modelValue","onUpdate:modelValue","error","onInput"]),[[m,"****","unmaskedValue",{unmasked:!0}]]),e.passwordError[i]?(t(),n("span",T,r(e.passwordError[i]),1)):d("",!0)],64))),128)),_(w,{text:e.loading?"":s.$t("modals.changePin.buttons.change"),bgColor:"#1852E0",style:{"align-self":"stretch","margin-top":"20px"}},{btnContent:D(()=>[e.loading?(t(),C(l,{key:0,loaderWidth:"10px",color:"white"})):d("",!0)]),_:1},8,["text"])],32)],64)}const S=v(O,[["render",G],["__scopeId","data-v-8036a0f8"]]),J={name:"AttachedAccountsModal",data(){return{activeSessions:[],globalError:"",loading:!1}},methods:{async fetchSessions(){this.loading=!0;try{await this.$axiosApi.get("gazprom-app/user/active-sessions",{headers:{"auth-token":localStorage.getItem("token")}}).then(({data:s})=>{if(s){const o=s.map(p=>({...p,contactNumber:p.contactNumber.slice(0,-3)+"***"}));this.activeSessions=o}}).catch(s=>{this.globalError=s.response.data.message||{}})}catch(s){console.log(s)}this.loading=!1}},beforeMount(){this.fetchSessions()}},K={сlass:"wrapper"},W={class:"settings-main-title"},q={key:0,class:"active-sessions-list"},H={key:0},Q={class:"info-text"},R={class:"account"},X={class:"contact-number"},Y={key:1,style:{display:"flex","flex-direction":"column"}},Z={class:"info-text"};function ss(s,o,p,P,e,c){const u=I;return t(),n("div",K,[a("p",W,r(s.$t("modals.editAccounts.title")),1),e.loading?(t(),n("div",Y,[(t(),n(h,null,k(3,l=>_(u,{key:l,style:{"border-radius":"32px",height:"40px",width:"100%",margin:"8px 0"}})),64))])):(t(),n("div",q,[e.activeSessions.length===0?(t(),n("div",H,[a("p",Q,r(s.$t("modals.editAccounts.noAccounts")),1)])):d("",!0),(t(!0),n(h,null,k(e.activeSessions,l=>(t(),n("div",{key:l.id,class:"active-sessions-item"},[a("span",R,r(s.$t("modals.editAccounts.account"))+" "+r(l.account),1),a("span",X,r(l.contactNumber),1)]))),128))])),a("div",Z,r(s.$t("modals.editAccounts.info")),1)])}const $=v(J,[["render",ss],["__scopeId","data-v-deec3bea"]]),es={components:{ChangePinModal:S,Arrow:L,AttachedAccountsModal:$},name:"SettingsModal",directives:{maska:x},data(){return{step:"settings"}},computed:{...V(f,["userProfile"])},methods:{...g(y,["close"]),...g(f,["fetchUserProfile"]),handleStep(){this.step="sessions"},handleBackClick(){(this.step==="sessions"||this.step==="changePin")&&(this.step="settings")}}},ts={class:"settings-modal"},os={key:1},ns={class:"settings-main-title"},as={class:"settings-list"},rs={class:"settings-title"},is={class:"settings-subtitle"},cs={class:"settings-title"},ls={class:"settings-subtitle"},ds={key:2,сlass:"wrapper"}
1,ps={key:3,сlass:"wrapper"};function us(s,o,p,P,e,c){var m;const u=F("Arrow"),l=$,w=S;return t(),n("div",ts,[e.step!=="settings"?(t(),C(u,{key:0,onClick:c.handleBackClick,class:"arrow-back"},null,8,["onClick"])):d("",!0),e.step==="settings"?(t(),n("div",os,[a("p",ns,r(s.$t("modals.securitySettings.title")),1),a("div",as,[s.userProfile&&((m=s.userProfile)==null?void 0:m.facilities.length)>0?(t(),n("div",{key:0,class:"settings-item",onClick:o[0]||(o[0]=(...i)=>c.handleStep&&c.handleStep(...i))},[a("span",rs,r(s.$t("modals.securitySettings.activeSessions")),1),a("span",is,r(s.$t("modals.securitySettings.activeSessionsDesc")),1)])):d("",!0),a("div",{class:"settings-item",onClick:o[1]||(o[1]=i=>e.step="changePin")},[a("span",cs,r(s.$t("modals.securitySettings.changePin")),1),a("span",ls,r(s.$t("modals.securitySettings.changePinDesc")),1)])])])):d("",!0),e.step==="sessions"?(t(),n("div",ds,[_(l)])):d("",!0),e.step==="changePin"?(t(),n("div",ps,[_(w)])):d("",!0)])}const ws=v(es,[["render",us],["__scopeId","data-v-23f1f079"]]);export{ws as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.