PageSourceSearch

https://fieldbook.xyz/assets/new-D5RqD5a9.js

js fieldbook.xyz collected 2026-09-24 15:15:20 UTC 2,068 bytes, 2 lines download raw bytes

1import{V as g,P as h,W as v,w as y,y as m,v as e,B as u}from"./index-D-WC9wNa.js";import{u as w}from"./index.esm-BYTOezO5.js";import{F as f}from"./formField-5G_v2iNh.js";try{let t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new t.Error().stack;a&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[a]="3a628ac0-c80c-4501-9bd0-431fc7cac54b",t._sentryDebugIdIdentifier="sentry-dbid-3a628ac0-c80c-4501-9bd0-431fc7cac54b")}catch{}const j=()=>{const{register:t,handleSubmit:a,formState:{isValid:b,isSubmitting:s,errors:o}}=w({mode:"all"}),{session:n}=g(),i=h(),r=v(),p=y.useCallback(async({email:l,name:c})=>{const d=await fetch("https://cxhsrqxrhanyaiacwril.supabase.co/functions/v1/send_invitation",{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${n==null?void 0:n.access_token}`},body:JSON.stringify({email:l,name:c})});if(d.ok)r.capture("invitation_sent",{invitee_email:l,invitee_name:c}),m("Successfully sent invitation"),i({to:"/invitations"});else{const x=await d.text();m.warning(`Failed to send invitation: ${x}`)}},[n==null?void 0:n.access_token,i,r]);return e.jsxs("form",{onSubmit:a(p),className:"flex flex-col gap-2",children:[e.jsx(f,{label:"Name",type:"text",...t("name",{required:"Required",minLength:{value:2,message:"Minimum length of 2"}}),error:o.name}),e.jsx(f,{label:"Email",type:"email",...t("email",{required:"Required"}),error:o.email}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(u,{variant:"secondary",className:"w-full",onClick:()=>i({to:"/invitations"}),children:"Cancel"}),e.jsx(u,{className:"w-full",type:"submit",disabled:!b||s,children:s?"Sending...":"Send Invitation"})]})]})},I=()=>e.jsxs("div",{className:"mt-6 flex flex-col gap-4 pb-6 sm:w-full md:w-1/2 lg:w-1/3",children:[e.jsxs("div",{children:[e.jsx("h4",{className:"mb-2 text-xl font-bold",children:"New invitation"}),e.jsx("p",{children:"Invite organisation members to Fieldbook"})]}),e.jsx(j,{})]});export{I as component};
2//# sourceMappingURL=new-D5RqD5a9.js.map

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.