PageSourceSearch

https://greenfund.rw/build/assets/Create-BAl1ckIw.js

js greenfund.rw collected 2026-10-02 10:19:01 UTC 6,220 bytes, 1 lines download raw bytes

1import{C as y,c as i,a as m,k as l,u as t,Z as x,l as u,f as r,D as g,g as f,e as c,d as v,h as a,v as d,s as w,F as k}from"./app-B3q2SnoA.js";import C from"./Layout-DJc98_Vc.js";import{_ as n}from"./InputError-C0zZ9OuN.js";import{_ as U}from"./PrimaryButton-HBIzXExn.js";import"./AuthenticationCardLogo-BtSjXMhD.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";const V={class:"max-w-4xl mx-auto"},S={class:"flex justify-between items-center mb-8 pb-6 border-b"},F={key:0,class:"p-4 bg-gray-50 rounded border"},M=["src"],L={class:"grid grid-cols-1 md:grid-cols-2 gap-4"},B={class:"flex items-center justify-end space-x-3 pt-6 border-t"},N={key:0},D={key:1},O={__name:"Create",setup(j){const s=y({name:"",position:"",bio:"",image:"",category:"",twitter_url:"",linkedin_url:"",order:0}),b=()=>{s.post(route("admin.directories.staff.store"),{preserveScroll:!0})};return(p,e)=>(m(),i(k,null,[l(t(x),{title:"Create Staff Member"}),l(C,null,{default:u(()=>[r("div",V,[r("div",S,[e[9]||(e[9]=r("div",null,[r("h1",{class:"text-2xl font-bold text-gray-900"},"Add New Staff Member"),r("p",{class:"text-gray-600 mt-2"},"Create a new staff member entry")],-1)),l(t(g),{href:p.route("admin.directories.staff"),class:"px-4 py-2 bg-gray-200 text-gray-800 rounded-md hover:bg-gray-300"},{default:u(()=>[...e[8]||(e[8]=[f(" Back to Staff ",-1)])]),_:1},8,["href"])]),r("form",{onSubmit:c(b,["prevent"]),class:"bg-white rounded border p-8 space-y-6"},[r("div",null,[e[10]||(e[10]=r("label",{for:"name",class:"block text-sm font-medium text-gray-700 mb-2"},"Name *",-1)),a(r("input",{id:"name","onUpdate:modelValue":e[0]||(e[0]=o=>t(s).name=o),type:"text",class:"w-full px-4 py-2 border border-gray-300 rounded-md focus:ring-2 focus:ring-[#00403F] focus:border-transparent",placeholder:"John Doe",required:""},null,512),[[d,t(s).name]]),l(n,{message:t(s).errors.name,class:"mt-2"},null,8,["message"])]),r("div",null,[e[11]||(e[11]=r("label",{for:"position",class:"block text-sm font-medium text-gray-700 mb-2"},"Position *",-1)),a(r("input",{id:"position","onUpdate:modelValue":e[1]||(e[1]=o=>t(s).position=o),type:"text",class:"w-full px-4 py-2 border border-gray-300 rounded-md focus:ring-2 focus:ring-[#00403F] focus:border-transparent",placeholder:"CEO",required:""},null,512),[[d,t(s).position]]),l(n,{message:t(s).errors.position,class:"mt-2"},null,8,["message"])]),r("div",null,[e[13]||(e[13]=r("label",{for:"category",class:"block text-sm font-medium text-gray-700 mb-2"},"Category",-1)),a(r("select",{id:"category","onUpdate:modelValue":e[2]||(e[2]=o=>t(s).category=o),class:"w-full px-4 py-2 border border-gray-300 rounded-md focus:ring-2 focus:ring-[#00403F] focus:border-transparent"},[...e[12]||(e[12]=[r("option",{value:""},"Select Category...",-1),r("option",{value:"Board of Directors"},"Board of Directors",-1),r("option",{value:"Executive Management"},"Executive Management",-1),r("option",{value:"Staff"},"Staff",-1)])],512),[[w,t(s).category]]),l(n,{message:t(s).errors.category,class:"mt-2"},null,8,["message"])]),r("div",null,[e[14]||(e[14]=r("label",{for:"bio",class:"block text-sm font-medium text-gray-700 mb-2"},"Bio",-1)),a(r("textarea",{id:"bio","onUpdate:modelValue":e[3]||(e[3]=o=>t(s).bio=o),rows:"4",class:"w-full px-4 py-2 border border-gray-300 rounded-md focus:ring-2 focus:ring-[#00403F] focus:border-transparent",placeholder:"Short biography..."},null,512),[[d,t(s).bio]]),l(n,{message:t(s).errors.bio,class:"mt-2"},null,8,["message"])]),r("div",null,[e[15]||(e[15]=r("label",{for:"image",class:"block text-sm font-medium text-gray-700 mb-2"},"Image URL",-1)),a(r("input",{id:"image","onUpdate:modelValue":e[4]||(e[4]=o=>t(s).image=o),type:"text",class:"w-full px-4 py-2 border border-gray-300 rounded-md focus:ring-2 focus:ring-[#00403F] focus:border-transparent",placeholder:"https://example.com/photo.jpg"},null,512),[[d,t(s).image]]),e[16]||(e[16]=r("p",{class:"text-xs text-gray-500 mt-1"},"Paste the image URL from the Media Library",-1)),l(n,{message:t(s).errors.image,class:"mt-2"},null,8,["message"])]),t(s).image?(m(),i("div",F,[e[17]||(e[17]=r("p",{class:"text-sm font-medium text-gray-700 mb-2"},"Image Preview",-1)),r("img",{src:t(s).image,alt:"Preview",class:"h-24 w-24 object-cover rounded"},null,8,M)])):v("",!0),r("div",L,[r("div",null,[e[18]||(e[18]=r("label",{for:"twitter_url",class:"block text-sm font-medium text-gray-700 mb-2"},"Twitter URL",-1)),a(r("input",{id:"twitter_url","onUpdate:modelValue":e[5]||(e[5]=o=>t(s).twitter_url=o),type:"url",class:"w-full px-4 py-2 border border-gray-300 rounded-md focus:ring-2 focus:ring-[#00403F] focu
1s:border-transparent",placeholder:"https://twitter.com/username"},null,512),[[d,t(s).twitter_url]]),l(n,{message:t(s).errors.twitter_url,class:"mt-2"},null,8,["message"])]),r("div",null,[e[19]||(e[19]=r("label",{for:"linkedin_url",class:"block text-sm font-medium text-gray-700 mb-2"},"LinkedIn URL",-1)),a(r("input",{id:"linkedin_url","onUpdate:modelValue":e[6]||(e[6]=o=>t(s).linkedin_url=o),type:"url",class:"w-full px-4 py-2 border border-gray-300 rounded-md focus:ring-2 focus:ring-[#00403F] focus:border-transparent",placeholder:"https://linkedin.com/in/username"},null,512),[[d,t(s).linkedin_url]]),l(n,{message:t(s).errors.linkedin_url,class:"mt-2"},null,8,["message"])])]),r("div",null,[e[20]||(e[20]=r("label",{for:"order",class:"block text-sm font-medium text-gray-700 mb-2"},"Order",-1)),a(r("input",{id:"order","onUpdate:modelValue":e[7]||(e[7]=o=>t(s).order=o),type:"number",class:"w-full px-4 py-2 border border-gray-300 rounded-md focus:ring-2 focus:ring-[#00403F] focus:border-transparent",placeholder:"0"},null,512),[[d,t(s).order]]),e[21]||(e[21]=r("p",{class:"text-xs text-gray-500 mt-1"},"Lower numbers appear first",-1)),l(n,{message:t(s).errors.order,class:"mt-2"},null,8,["message"])]),r("div",B,[l(t(g),{href:p.route("admin.directories.staff"),class:"px-6 py-2 text-gray-700 bg-gray-200 rounded-md hover:bg-gray-300"},{default:u(()=>[...e[22]||(e[22]=[f(" Cancel ",-1)])]),_:1},8,["href"]),l(U,{disabled:t(s).processing,class:"!gap-2"},{default:u(()=>[t(s).processing?(m(),i("span",N,"Creating...")):(m(),i("span",D,"Create Staff Member"))]),_:1},8,["disabled"])])],32)])]),_:1})],64))}};export{O 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.