PageSourceSearch

https://www.magepulse.com/build/assets/Edit-Ct1RsdlY.js

js magepulse.com collected 2026-10-04 19:31:47 UTC 3,675 bytes, 1 lines download raw bytes

1import{u as h,b as g,j as e,H as j,L as d}from"./app-CYUWr88y.js";import{A as v}from"./AppLayout-9zmSlVnG.js";import{B as l}from"./button-7rtzMWwU.js";import{I as c}from"./input-9rZoLk6I.js";import{L as n}from"./label-zcAEwhsn.js";import{A as _}from"./AdminNav-Bhz8Zdi8.js";import{C as f}from"./chevron-left-DzfvkP-n.js";/* empty css            */import"./MagePulseLogo-CDITWkAT.js";import"./sheet-Cl9XK2Pi.js";import"./createLucideIcon-C2KiRpnT.js";import"./index-DFl4hOeg.js";import"./index-5b-h2TJ-.js";import"./index-CjzK0fdH.js";import"./index-B4HArz6m.js";import"./chevron-right-sFBZUt0m.js";import"./check-DMMpXimy.js";import"./index-CA46NP_U.js";import"./badge-Cwk6uPYq.js";import"./user-TdeAZCPT.js";import"./globe-CDDj5UBv.js";import"./rocket-D3KgpT1l.js";import"./package-CMb2u5w3.js";import"./bell-6Aum8qwx.js";import"./shield-check-xvZ_hvaf.js";import"./users-DpZPN9hJ.js";import"./chevron-down-5eytZEMC.js";function V({editUser:r,teams:u}){const{flash:m}=h().props,{data:a,setData:i,put:p,processing:o,errors:t}=g({name:r.name,email:r.email,current_team_id:String(r.current_team_id??""),must_change_password:r.must_change_password}),x=s=>{s.preventDefault(),p(route("admin.users.update",{user:r.id}))};return e.jsxs(v,{children:[e.jsx(j,{title:`Admin — Edit ${r.name}`}),e.jsx(_,{}),e.jsxs("div",{className:"space-y-6 max-w-xl",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(d,{href:route("admin.users.index"),className:"text-muted-foreground hover:text-foreground",children:e.jsx(f,{className:"h-5 w-5"})}),e.jsx("h1",{className:"text-2xl font-bold",children:"Edit User"})]}),m.message&&e.jsx("div",{className:"rounded-lg border border-green-500/20 bg-green-500/10 px-4 py-3 text-sm text-green-700 dark:text-green-400",children:m.message}),e.jsx("div",{className:"rounded-lg border p-5",children:e.jsxs("form",{onSubmit:x,className:"space-y-5",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(n,{htmlFor:"name",children:"Full name"}),e.jsx(c,{id:"name",value:a.name,onChange:s=>i("name",s.target.value),autoFocus:!0}),t.name&&e.jsx("p",{className:"text-sm text-destructive",children:t.name})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(n,{htmlFor:"email",children:"Email address"}),e.jsx(c,{id:"email",type:"email",value:a.email,onChange:s=>i("email",s.target.value)}),t.email&&e.jsx("p",{className:"text-sm text-destructive",children:t.email})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(n,{htmlFor:"current_team_id",children:"Current team"}),e.jsxs("select",{id:"current_team_id",value:a.current_team_id,onChange:s=>i("current_team_id",s.target.value),className:"flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",children:[e.jsx("option",{value:"",children:"Select a team…"}),u.map(s=>e.jsx("option",{value:s.id,children:s.name},s.id))]}),t.current_team_id&&e.jsx("p",{className:"text-sm text-destructive",children:t.current_team_id})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("input",{id:"must_change_password",type:"checkbox",checked:a.must_change_password,onChange:s=>i("must_change_password",s.target.checked),className:"h-4 w-4 rounded border-input"}),e.jsx(n,{htmlFor:"must_change_password",children:"Require password change on next login"})]}),e.jsxs("div",{className:"flex gap-3",children:[e.jsx(l,{type:"submit",disabled:o,children:o?"Saving…":"Save changes"}),e.jsx(l,{type:"button",variant:"outline",asChild:!0,children:e.jsx(d,{href:route("admin.users.index"),children:"Cancel"})})]})]})})]})]})}export{V 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.