"use strict";(globalThis["webpackChunkbaggisowtfaresystem"]=globalThis["webpackChunkbaggisowtfaresystem"]||[]).push([[330],{8330:(e,l,a)=>{a.r(l),a.d(l,{default:()=>y});var n=a(1347),u=a(7763),t=a(4187),s=a(455),r=a(2986),i=a(5767);const d={__name:"FirstPasswordChange",setup(e){const l=(0,s.rd)(),a=(0,i.n)(),d=(0,t.KR)(""),o=(0,t.KR)(""),c=(0,t.KR)(""),v=(0,t.KR)(!1),g=(0,t.KR)("");async function m(){if(g.value="",d.value&&o.value&&c.value)if(o.value===c.value){v.value=!0;try{await r.Ay.post("/password/change",{current_password:d.value,new_password:o.value}),a.clearSession(),l.replace("/login")}catch(e){g.value=e?.data?.message||e?.message||"Şifre güncellenemedi"}finally{v.value=!1}}else g.value="Yeni şifreler eşleşmiyor";else g.value="Tüm alanlar zorunludur"}return(e,l)=>{const a=(0,n.g2)("q-card-section"),t=(0,n.g2)("q-input"),s=(0,n.g2)("q-banner"),r=(0,n.g2)("q-btn"),i=(0,n.g2)("q-card-actions"),p=(0,n.g2)("q-card"),b=(0,n.g2)("q-page");return(0,n.uX)(),(0,n.Wv)(b,{class:"flex flex-center"},{default:(0,n.k6)(()=>[(0,n.bF)(p,{style:{width:"420px","max-width":"90vw"}},{default:(0,n.k6)(()=>[(0,n.bF)(a,null,{default:(0,n.k6)(()=>[...l[3]||(l[3]=[(0,n.Lk)("div",{class:"text-h6"},"Şifre Yenileme Zorunlu",-1),(0,n.Lk)("div",{class:"text-caption text-grey-7 q-mt-xs"}," Sistemi kullanabilmek için yeni bir şifre belirlemelisiniz. ",-1)])]),_:1}),(0,n.bF)(a,{class:"q-gutter-md"},{default:(0,n.k6)(()=>[(0,n.bF)(t,{modelValue:d.value,"onUpdate:modelValue":l[0]||(l[0]=e=>d.value=e),type:"password",label:"Mevcut Şifre",outlined:"",dense:""},null,8,["modelValue"]),(0,n.bF)(t,{modelValue:o.value,"onUpdate:modelValue":l[1]||(l[1]=e=>o.value=e),type:"password",label:"Yeni Şifre",outlined:"",dense:""},null,8,["modelValue"]),(0,n.bF)(t,{modelValue:c.value,"onUpdate:modelValue":l[2]||(l[2]=e=>c.value=e),type:"password",label:"Yeni Şifre (Tekrar)",outlined:"",dense:""},null,8,["modelValue"]),g.value?((0,n.uX)(),(0,n.Wv)(s,{key:0,class:"bg-red-1 text-red q-mt-sm",rounded:""},{default:(0,n.k6)(()=>[(0,n.eW)((0,u.v_)(g.value),1)]),_:1})):(0,n.Q3)("",!0)]),_:1}),(0,n.bF)(i,{align:"right"},{default:(0,n.k6)(()=>[(0,n.bF)(r,{label:"Kaydet",color:"primary",loading:v.value,onClick:m},null,8,["loading"])]),_:1})]),_:1})]),_:1})}}};var o=a(5013),c=a(3341),v=a(222),g=a(6067),m=a(7453),p=a(5034),b=a(2677),f=a(272),k=a.n(f);const w=d,y=w;k()(d,"components",{QPage:o.A,QCard:c.A,QCardSection:v.A,QInput:g.A,QBanner:m.A,QCardActions:p.A,QBtn:b.A})}}]);