2 lines
1.8 KiB
JavaScript
2 lines
1.8 KiB
JavaScript
import{u,m as p,j as e}from"./app-43FwoUKv.js";import{u as d}from"./useTypedPage-_EZ6P4Xz.js";import{A as x}from"./ActionMessage-BR0zIw5R.js";import{F as h}from"./FormSection-fM5DX8Wc.js";import{T as j,I as f}from"./TextInput-CdoY_jBz.js";import{I as n}from"./InputLabel-Cl3yDvOx.js";import{P as g}from"./PrimaryButton-Gixff4KF.js";import{c as v}from"./index-C3aXnQRR.js";import"./transition-aKza8ZE9.js";import"./SectionTitle-CmR6E75W.js";function C(){var r,t,o,m;const c=u(),a=d(),s=p({name:""});function l(){s.post(c("teams.store"),{errorBag:"createTeam",preserveScroll:!0})}return e.jsxs(h,{onSubmit:l,title:"Team Details",description:"Create a new team to collaborate with others on projects.",renderActions:()=>e.jsxs(e.Fragment,{children:[e.jsx(x,{on:s.recentlySuccessful,className:"mr-3",children:"Saved."}),e.jsx(g,{className:v({"opacity-25":s.processing}),disabled:s.processing,children:"Save"})]}),children:[e.jsxs("div",{className:"col-span-6",children:[e.jsx(n,{value:"Team Owner"}),e.jsxs("div",{className:"flex items-center mt-2",children:[e.jsx("img",{className:"w-12 h-12 rounded-full object-cover",src:(r=a.props.auth.user)==null?void 0:r.profile_photo_url,alt:(t=a.props.auth.user)==null?void 0:t.name}),e.jsxs("div",{className:"ml-4 leading-tight",children:[e.jsx("div",{className:"text-gray-900 dark:text-white",children:(o=a.props.auth.user)==null?void 0:o.name}),e.jsx("div",{className:"text-gray-700 dark:text-gray-300 text-sm",children:(m=a.props.auth.user)==null?void 0:m.email})]})]})]}),e.jsxs("div",{className:"col-span-6 sm:col-span-4",children:[e.jsx(n,{htmlFor:"name",value:"Team Name"}),e.jsx(j,{id:"name",type:"text",className:"mt-1 block w-full",value:s.data.name,onChange:i=>s.setData("name",i.currentTarget.value),autoFocus:!0}),e.jsx(f,{message:s.errors.name,className:"mt-2"})]})]})}export{C as default};
|