Anons79 Mini Shell

Directory : /home/aplikasiposinfo/public_html/talent.gosepakat.id/public/build/assets/
Upload File :
Current File : /home/aplikasiposinfo/public_html/talent.gosepakat.id/public/build/assets/Edit-BJVDVwDp.js

import{X as h,G as j,r as u,j as e,S as g}from"./app-DxMI4o9N.js";import{A as f}from"./AdminLayout-6oo0SmgT.js";import{B as N}from"./button-B8Pxq7Js.js";import{C as w,a as v,b as C,c as b}from"./card-CT8-BC2p.js";import{I as m}from"./input-8tcg3WnE.js";import{L as l}from"./label-D13yzMLD.js";import{S as y,a as E,b as S,c as U,d as n}from"./select-BHqIF7op.js";import{I as i}from"./InputError-Dgk8wV3g.js";import{L as F}from"./loader-circle-CDy1oi1h.js";import"./utils-CytzSlOG.js";import"./dropdown-menu-DzFv1_3c.js";import"./index-CMAocfcN.js";import"./index-DVcMj88I.js";import"./index-RPLE7Mcg.js";import"./toaster-KyP_eMFq.js";import"./x-CwW0MLuY.js";import"./createLucideIcon-D9tz9LIz.js";import"./Combination-CohorMhW.js";import"./index-DkgsjCnL.js";import"./chevron-right-B1xY88WN.js";import"./users-DxfCxN58.js";import"./graduation-cap-DbzlafFK.js";import"./index-DM0SqlRo.js";function Z({user:s}){const c=h().props.auth.user,{data:o,setData:r,post:p,processing:d,errors:t}=j({nama:s.nama,email:s.email,role:s.role,password:"",password_confirmation:""});u.useEffect(()=>{console.log(s)},[]);const x=a=>{a.preventDefault(),p(route("admin.user.update",{id:s.id}),{onFinish:()=>console.log("okoc")})};return e.jsxs(f,{user:c,header:e.jsx("h2",{className:"text-xl font-semibold leading-tight text-gray-800",children:"Edit User"}),children:[e.jsx(g,{title:"Edit User"}),e.jsx("div",{className:"flex items-center justify-between mb-2",children:e.jsx("h1",{className:"text-lg font-bold md:text-2xl",children:"Edit User"})}),e.jsxs(w,{className:"max-w-2xl shadow-xl",children:[e.jsx(v,{children:e.jsx(C,{children:"Edit User"})}),e.jsx(b,{children:e.jsxs("form",{onSubmit:x,className:"space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(l,{htmlFor:"email",children:"Email*"}),e.jsx(m,{type:"email",onChange:a=>{r("email",a.target.value)},id:"email",placeholder:"[email protected]",value:o.email,required:!0}),e.jsx(i,{message:t.email,className:"mt-2"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(l,{htmlFor:"nama",children:"Nama*"}),e.jsx(m,{onChange:a=>{r("nama",a.target.value)},id:"nama",placeholder:"Nama User",value:o.nama,required:!0}),e.jsx(i,{message:t.nama,className:"mt-2"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(l,{htmlFor:"role",children:"Role*"}),e.jsxs(y,{required:!0,onValueChange:a=>{r("role",a)},value:o.role,children:[e.jsx(E,{className:"w-full",children:e.jsx(S,{placeholder:"Pilih Role"})}),e.jsxs(U,{children:[e.jsx(n,{value:"admin",children:"Admin"}),e.jsx(n,{value:"operator",children:"Operator"})]})]}),e.jsx(i,{message:t.role,className:"mt-2"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(l,{htmlFor:"password",children:"Password (masukan password jika ingin mengubah password lama)*"}),e.jsx(m,{onChange:a=>{r("password",a.target.value)},id:"password",placeholder:"Password",type:"password"}),e.jsx(i,{message:t.password,className:"mt-2"})]}),e.jsxs(N,{disabled:d,children:[d&&e.jsx(F,{className:"animate-spin"})," Edit"]})]})})]})]})}export{Z as default};

Anons79 File Manager Version 1.0, Coded By Anons79
Email: [email protected]