PageSourceSearch

https://app.uetdskamu.com/assets/superadmin.users._id-BbbJc4Xm.js

js uetdskamu.com collected 2026-09-24 14:20:17 UTC 3,437 bytes, 1 lines download raw bytes

1import{cD as f,cE as b,cF as h,cG as j,r as y,z as g,j as e,aM as N,ae as S,f as k,n as K,d as m,L as v,B as _}from"./index-Djb4nDM2.js";import{u as P,s as R,F as I}from"./zod-B7Sam9Rg.js";import{I as l}from"./InputFormItem-CYtbgmGC.js";import{S as d}from"./SelectFormItem--52x28ia.js";import{S as E}from"./SubmitButton-BqNVxAs5.js";import"./label-IDLx24iy.js";import"./dialog-DU7Jgi03.js";import"./popover-Crc2ZTAq.js";const T=[{label:"Tenant Admin",value:"tenant_admin"},{label:"Tenant User",value:"tenant_user"}],U=[{label:"Aktif",value:"aktif"},{label:"Pasif",value:"pasif"}],G=function(){const{id:c}=f.useParams(),r=Number(c),{data:a,isPending:u}=b(r),{mutate:x,isPending:i}=h(),s=P({resolver:R(j),mode:"onSubmit",defaultValues:{username:"",email:"",telefon:"",name:"",status:"aktif",role:"tenant_user"}});if(y.useEffect(()=>{a!=null&&a.data&&s.reset({username:a.data.username,email:a.data.email,telefon:g(a.data.telefon),name:a.data.name,status:a.data.status==="pasif"?"pasif":"aktif",role:a.data.role==="tenant_admin"?"tenant_admin":"tenant_user"})},[a,s]),u)return e.jsx(N,{});if(!(a!=null&&a.data))return e.jsx("div",{children:"Kullanıcı bulunamadı."});const n=a.data;return e.jsx(S,{routeId:"/_superadmin/superadmin/users/$id",title:n.name,actions:e.jsx(v,{to:"/superadmin/users",search:{pageSize:50},children:e.jsx(_,{variant:"outline",children:"Kullanıcı Listesi"})}),children:e.jsx("div",{className:"mx-auto max-w-3xl",children:e.jsx(I,{...s,children:e.jsxs("form",{className:"space-y-6",onSubmit:s.handleSubmit(t=>x({id:r,body:{...t,username:t.username.trim(),email:t.email.trim(),name:t.name.trim(),telefon:K(t.telefon)??t.telefon}},{onSuccess:()=>m.success("Kullanıcı güncellendi"),onError:p=>{var o;return m.error(((o=p.error)==null?void 0:o.message)||"Kullanıcı güncellenemedi")}})),children:[e.jsxs("div",{className:"rounded-2xl border border-border/70 bg-white p-6",children:[e.jsxs("div",{className:"mb-6",children:[e.jsx("h2",{className:"text-lg font-semibold",children:"Kullanıcı Bilgileri"}),e.jsxs("p",{className:"text-sm text-muted-foreground",children:[n.tenant_name," tenantı altındaki kullanıcıyı düzenleyin."]})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsx(l,{className:"xl:block",form:s,formKey:"name",label:"Ad Soyad",placeholder:"Ad Soyad",type:"text"}),e.jsx(l,{className:"xl:block",form:s,formKey:"username",label:"Kullanıcı Adı",placeholder:"Kullanıcı Adı",type:"text"}),e.jsx(l,{className:"xl:block",form:s,formKey:"email",label:"E-posta",placeholder:"E-posta",type:"email"}),e.jsx(l,{className:"xl:block",form:s,formKey:"telefon",label:"Telefon",placeholder:"(5xx) xxx xx xx",type:"text",onChange:t=>k(t)}),e.jsx(d,{className:"xl:block",form:s,formKey:"role",label:"Rol",items:T,inputPlaceholder:"Rol seçiniz"}),e.jsx(d,{className:"xl:block",form:s,formKey:"status",label:"Durum",items:U,inputPlaceholder:"Durum seçiniz"})]})]}),e.jsx("div",{className:"rounded-2xl border border-border/70 bg-white p-6",children:e.jsxs("div",{className:"grid gap-2 text-sm text-muted-foreground md:grid-cols-2",children:[e.jsxs("div",{children:["Tenant: ",n.tenant_name]}),e.jsxs("div",{children:["ID: ",n.id]}),e.jsxs("div",{children:["Oluşturma: ",n.created_at]}),e.jsxs("div",{children:["Güncelleme: ",n.updated_at]})]})}),e.jsx("div",{className:"flex justify-end",children:e.jsx(E,{className:"w-40",disabled:i,loading:i,title:"Kaydet"})})]})})})})};export{G as component};

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.