transcriptor-web/public/build/assets/UpdateTeamNameForm-DroFqiCd.js
2025-04-05 15:58:14 +02:00

2 lines
1.7 KiB
JavaScript

import{u as l,m as i,j as e}from"./app-43FwoUKv.js";import{A as c}from"./ActionMessage-BR0zIw5R.js";import{F as d}from"./FormSection-fM5DX8Wc.js";import{T as p,I as u}from"./TextInput-CdoY_jBz.js";import{I as t}from"./InputLabel-Cl3yDvOx.js";import{P as x}from"./PrimaryButton-Gixff4KF.js";import{c as j}from"./index-C3aXnQRR.js";import"./transition-aKza8ZE9.js";import"./SectionTitle-CmR6E75W.js";function S({team:s,permissions:r}){const m=l(),a=i({name:s.name});function n(){a.put(m("teams.update",[s]),{errorBag:"updateTeamName",preserveScroll:!0})}return e.jsxs(d,{onSubmit:n,title:"Team Name",description:"The team's name and owner information.",renderActions:r.canUpdateTeam?()=>e.jsxs(e.Fragment,{children:[e.jsx(c,{on:a.recentlySuccessful,className:"mr-3",children:"Saved."}),e.jsx(x,{className:j({"opacity-25":a.processing}),disabled:a.processing,children:"Save"})]}):void 0,children:[e.jsxs("div",{className:"col-span-6",children:[e.jsx(t,{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:s.owner.profile_photo_url,alt:s.owner.name}),e.jsxs("div",{className:"ml-4 leading-tight",children:[e.jsx("div",{className:"text-gray-900 dark:text-white",children:s.owner.name}),e.jsx("div",{className:"text-gray-700 dark:text-gray-300 text-sm",children:s.owner.email})]})]})]}),e.jsxs("div",{className:"col-span-6 sm:col-span-4",children:[e.jsx(t,{htmlFor:"name",value:"Team Name"}),e.jsx(p,{id:"name",type:"text",className:"mt-1 block w-full",value:a.data.name,onChange:o=>a.setData("name",o.currentTarget.value),disabled:!r.canUpdateTeam}),e.jsx(u,{message:a.errors.name,className:"mt-2"})]})]})}export{S as default};