PageSourceSearch

https://meetborderless.com/build/assets/create-aRBq0tqh.js

js meetborderless.com collected 2026-10-09 22:42:17 UTC 7,326 bytes, 1 lines download raw bytes

1import{j as e}from"./app-C1iegf7Q.js";import{b,u as g,H as _,L as p}from"./inertia-BpyZy4w-.js";import{B as d}from"./button-BE4q1_FS.js";import{I as l}from"./input-DJt0nBB3.js";import{L as r}from"./label-Czc25Mye.js";import{S as N,e as y,f as C,a as S,c as x}from"./select-Bn8hgKYl.js";import{S as n}from"./switch-DhdMz2rn.js";import{T as k}from"./textarea-CXLxrYIG.js";import{a as w}from"./admin-layout-BhXWbUlP.js";import{A as F}from"./arrow-left-DCX0fhKH.js";/* empty css            */import"./index-CGXdj8xB.js";import"./utils-BiuKVCuu.js";import"./index-DdRFMukF.js";import"./index-BdQq_4o_.js";import"./index-Dc_FVRD7.js";import"./index-B0NHTN87.js";import"./index-C48dRAib.js";import"./index-BDqbV96p.js";import"./index-Cja0wFUH.js";import"./index-CL12STDK.js";import"./Combination-Cr5kvm8y.js";import"./index-C_n-C52S.js";import"./index-D4vO54bj.js";import"./index-BRU_LjHB.js";import"./index-XydtsrKA.js";import"./index-Cs5D2gCo.js";import"./index-DyGg2PJd.js";import"./chevron-down-B1YaU0K5.js";import"./createLucideIcon-wqc1LSWg.js";import"./check-0O-UND6N.js";import"./chevron-up-CLp5HMgA.js";import"./app-logo-Dz0wogSq.js";import"./logo-light-DU4bWymm.js";import"./flash-toast-C6O0iVL1.js";import"./info-D2ZN_yLm.js";import"./triangle-alert-C7AVwNi-.js";import"./circle-x-Bp6Mbpgt.js";import"./circle-check-BMWvzPMx.js";import"./x-DQSeRCcH.js";import"./menu-BR3Nc3Gr.js";import"./users-BCcupCXV.js";import"./folder-open-I72SPUVk.js";import"./pound-sterling-D16GLaAZ.js";import"./book-open-DVFlG_9t.js";function ge(){const[o,c]=b.useState(""),{data:s,setData:i,post:h,processing:v,errors:a}=g({name:"",bio:"",avatar:"",title:"",stripe_connect_id:"",stripe_onboarding_complete:!1,specialties:[],credentials:[],provider_type:"specialist",is_featured:!1,is_active:!0,sort_order:""}),j=t=>{t.preventDefault(),h("/admin/providers")},m=()=>{o.trim()&&!s.specialties.includes(o.trim())&&(i("specialties",[...s.specialties,o.trim()]),c(""))},u=t=>{i("specialties",s.specialties.filter(f=>f!==t))};return e.jsxs(w,{children:[e.jsx(_,{title:"Create Provider · Admin"}),e.jsxs("div",{className:"mx-auto max-w-4xl px-4 py-5 sm:px-6 sm:py-7",children:[e.jsxs("div",{className:"mb-5",children:[e.jsxs(p,{href:"/admin/providers",className:"mb-2 inline-flex items-center gap-1 text-xs font-medium text-ink-3 hover:text-ink",children:[e.jsx(F,{className:"h-3.5 w-3.5"}),"Back to providers"]}),e.jsx("h1",{className:"text-xl font-semibold text-ink",children:"Create Provider"})]}),e.jsxs("form",{onSubmit:j,className:"space-y-5",children:[e.jsxs("div",{className:"rounded-card border border-line bg-white p-5",children:[e.jsx("h2",{className:"mb-4 text-sm font-semibold text-ink",children:"Basic Information"}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(r,{htmlFor:"name",children:"Name *"}),e.jsx(l,{id:"name",value:s.name,onChange:t=>i("name",t.target.value),placeholder:"John Smith"}),a.name&&e.jsx("p",{className:"mt-1 text-xs text-red",children:a.name})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(r,{htmlFor:"title",children:"Title"}),e.jsx(l,{id:"title",value:s.title,onChange:t=>i("title",t.target.value),placeholder:"Immigration Consultant"}),a.title&&e.jsx("p",{className:"mt-1 text-xs text-red",children:a.title})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(r,{htmlFor:"bio",children:"Bio"}),e.jsx(k,{id:"bio",value:s.bio,onChange:t=>i("bio",t.target.value),placeholder:"A brief description of the provider...",rows:4}),a.bio&&e.jsx("p",{className:"mt-1 text-xs text-red",children:a.bio})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(r,{htmlFor:"avatar",children:"Avatar URL"}),e.jsx(l,{id:"avatar",value:s.avatar,onChange:t=>i("avatar",t.target.value),placeholder:"https://..."}),a.avatar&&e.jsx("p",{className:"mt-1 text-xs text-red",children:a.avatar})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(r,{children:"Specialties"}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(l,{value:o,onChange:t=>c(t.target.value),placeholder:"Add specialty...",onKeyDown:t=>{t.key==="Enter"&&(t.preventDefault(),m())}}),e.jsx(d,{type:"button",variant:"outline",onClick:m,children:"Add"})]}),e.jsx("div",{className:"mt-2 flex flex-wrap gap-2",children:s.specialties.map(t=>e.jsxs("span",{className:"inline-flex items-center gap-1 rounded-tag bg-bg-2 px-2 py-1 text-sm text-ink-2",children:[t,e.jsx("button",{type:"button",onClick:()=>u(t),className:"text-ink-3 hover:text-red",children:"×"})]},t))})]})]})]}),e.jsxs("div",{className:"rounded-card border border-line bg-white p-5",children:[e.jsx("h2",{className:"mb-4 text-sm font-semibold text-ink",children:"Stripe Connect"}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(r,{htmlFor:"stripe_connect_id",children:"Stripe Connect Account ID"}),e.jsx(l,{id:"stripe_connect_id",value:s.stripe_connect_id,onChange:t=>i("stripe_connect_id",t.target.value),placeholder:"acct_..."}),a.stripe_connect_id&&e.jsx("p",{className:"mt-1 text-xs text-red",children:a.stripe_connect_id})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(n,{id:"stripe_onboarding_complete",checked:s.stripe_onboarding_complete,onCheckedChange:t=>i("stripe_onboarding_complete",t)}),e.jsx(r,{htmlFor:"stripe_onboarding_complete",children:"Stripe Onboarding Complete"})]})]})]}),e.jsxs("div",{className:"rounded-card border border-line bg-white p-5",children:[e.jsx("h2",{className:"mb-4 text-sm font-semibold text-ink",children:"Provider Type & Display Settings"}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(r,{htmlFor:"provider_type",children:"Provider Type *"}),e.jsxs(N,{value:s.provider_type,onValueChange:t=>i("provider_type",t),children:[e.jsx(y,{children:e.jsx(C,{})}),e.jsxs(S,{children:[e.jsx(x,{value:"partner",children:"Partner (Borderless Services)"}),e.jsx(x,{value:"specialist",children:"Specialist (Public Profile)"})]})]}),e.jsx("p",{className:"text-xs text-ink-3",children:s.provider_type==="partner"?"Partner providers work behind the scenes for Borderless services. Their identity is hidden from users.":"Specialist providers have public profiles and users book directly with them."})]}),e.jsxs("div",{className:"flex items-center gap-4 border-t border-line pt-4",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(n,{id:"is_active",checked:s.is_active,onCheckedChange:t=>i("is_active",t)}),e.jsx(r,{htmlFor:"is_active",children:"Active"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(n,{id:"is_featured",checked:s.is_featured,onCheckedChange:t=>i("is_featured",t)}),e.jsx(r,{htmlFor:"is_featured",children:"Featured"})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(r,{htmlFor:"sort_order",children:"Sort Order"}),e.jsx(l,{id:"sort_order",type:"number",value:s.sort_order,onChange:t=>i("sort_order",t.target.value),placeholder:"0",className:"max-w-[120px]"})]})]})]}),e.jsxs("div",{className:"flex justify-end gap-4",children:[e.jsx(d,{type:"button",variant:"outline",asChild:!0,children:e.jsx(p,{href:"/admin/providers",children:"Cancel"})}),e.jsx(d,{type:"submit",disabled:v,children:"Create Provider"})]})]})]})]})}export{ge 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.