PageSourceSearch

https://simbruinastagna.com/build/assets/EditUser-BjJJD5MF.js

js simbruinastagna.com collected 2026-10-02 14:18:06 UTC 3,323 bytes, 1 lines download raw bytes

1import{C as g,p as x,c as w,s as f,u as r,D as y,w as p,g as e,j as h,E as i,G as n,h as u,t as m,F as v,H as _,I as U}from"./vendor-BbDATUd3.js";import"./TextEditor.vue_vue_type_style_index_0_scoped_f0c46add_lang-D_V6oClh.js";import{_ as D}from"./AuthenticatedLayout-C9RpJy8p.js";import{u as E}from"./app-CvTR85pT.js";/* empty css            */const V={class:"py-12 bg-gray-50 min-h-screen"},N={class:"mx-auto max-w-5xl sm:px-6 lg:px-8"},T={class:"bg-white p-8 shadow-sm rounded-lg border border-gray-200"},C={class:"border border-gray-300 rounded-md p-6"},F={class:"grid grid-cols-1 md:grid-cols-3 gap-x-8 gap-y-6"},S={class:"flex flex-col p-2"},k={class:"flex flex-col p-2"},B={class:"flex flex-col p-2"},P={class:"mt-6 flex items-center gap-4 justify-end"},j=["disabled"],$={__name:"EditUser",props:["auth","data"],setup(d){const l=E(),a=_(!1),t=g({name:d.data.name,email:d.data.email,password:null}),c=U(),b=async()=>{if(a.value=!0,!t.name||!t.email){l.error("All fields are required."),a.value=!1;return}if(t.password&&t.password.length<8){l.error("Password must be at least 8 characters."),a.value=!1;return}try{await t.post(route("users.update",c.props.data.id),{forceFormData:!0,preserveScroll:!1,onSuccess:()=>{l.success("User updated successfully"),setTimeout(()=>{a.value=!1},5e3),window.location.assign(route("users.index"))},onError:()=>{l.error("There was an error updating user.")}})}finally{a.value=!1}};return(M,s)=>(x(),w(v,null,[f(r(y),{title:"Dashboard"}),f(D,{auth:d.auth},{header:p(()=>[...s[3]||(s[3]=[e("h2",{class:"text-xl font-semibold leading-tight text-gray-800"}," Create User ",-1)])]),default:p(()=>[e("div",V,[e("div",N,[e("div",T,[e("form",{onSubmit:h(b,["prevent"])},[e("fieldset",C,[s[7]||(s[7]=e("legend",{class:"text-lg font-semibold text-gray-700 px-3 ml-4"}," User Details ",-1)),e("div",F,[e("div",S,[s[4]||(s[4]=e("label",{for:"icon",class:"text-sm font-medium text-gray-700 mb-1"},"Name",-1)),i(e("input",{"onUpdate:modelValue":s[0]||(s[0]=o=>r(t).name=o),type:"text",class:"border-gray-300 focus:border-blue-500 focus:ring-blue-500 rounded-md shadow-sm text-sm",placeholder:"Enter Name"},null,512),[[n,r(t).name]]),u(" "+m(r(t).errors.name),1)]),e("div",k,[s[5]||(s[5]=e("label",{for:"icon",class:"text-sm font-medium text-gray-700 mb-1"},"Email",-1)),i(e("input",{type:"email","onUpdate:modelValue":s[1]||(s[1]=o=>r(t).email=o),class:"border-gray-300 focus:border-blue-500 focus:ring-blue-500 rounded-md shadow-sm text-sm"},null,512),[[n,r(t).email]]),u(" "+m(r(t).errors.email),1)]),e("div",B,[s[6]||(s[6]=e("label",{for:"icon",class:"text-sm font-medium text-gray-700 mb-1"},"Password",-1)),i(e("input",{type:"password","onUpdate:modelValue":s[2]||(s[2]=o=>r(t).password=o),class:"border-gray-300 focus:border-blue-500 focus:ring-blue-500 rounded-md shadow-sm text-sm"},null,512),[[n,r(t).password]]),u(" "+m(r(t).errors.password),1)])])]),e("div",P,[e("button",{disabled:r(t).processing,type:"submit",class:"inline-flex items-center px-4 py-2 bg-blue-600 border border-transparent rounded-md font-semibold text-xs text-white uppercase tracking-widest hover:bg-blue-700 active:bg-blue-900 focus:outline-none focus:border-blue-900 focus:ring ring-blue-300 transition ease-in-out duration-150"}," Create User ",8,j)])],32)])])])]),_:1},8,["auth"])],64))}};export{$ 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.