PageSourceSearch

https://keepsoddydaisybeautiful.org/build/assets/Index-Da1rSAc4.js

js keepsoddydaisybeautiful.org collected 2026-10-05 22:03:45 UTC 13,746 bytes, 1 lines download raw bytes

1import{X as g,r as h,j as e,S as p,x as m,A as o,G as b}from"./client-BdA7rF3J.js";function y({onClose:a}){const{data:l,setData:s,post:i,processing:c,errors:n}=b({first_name:"",last_name:"",email:"",phone:"",comments:""}),x=r=>{r.preventDefault(),i(route("admin.recycling-event.store"),{onSuccess:()=>a(),preserveScroll:!0})};return e.jsx("div",{className:"fixed inset-0 z-50 overflow-y-auto",children:e.jsxs("div",{className:"flex items-center justify-center min-h-screen px-4",children:[e.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50",onClick:a}),e.jsxs("div",{className:"relative bg-white rounded-lg shadow-xl max-w-lg w-full p-6 z-10",children:[e.jsxs("div",{className:"flex items-center justify-between mb-4",children:[e.jsx("h3",{className:"text-lg font-semibold text-gray-900",children:"Add Volunteer Manually"}),e.jsx("button",{onClick:a,className:"text-gray-400 hover:text-gray-600",children:e.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),e.jsx("p",{className:"text-sm text-gray-500 mb-4",children:"Use this form to add people who reached out directly (phone, in-person, etc.)"}),e.jsxs("form",{onSubmit:x,className:"space-y-4",children:[e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700",children:"First Name *"}),e.jsx("input",{type:"text",value:l.first_name,onChange:r=>s("first_name",r.target.value),className:"mt-1 w-full px-3 py-2 border border-gray-300 rounded-md focus:ring-2 focus:ring-green-500 focus:border-transparent",required:!0}),n.first_name&&e.jsx("p",{className:"mt-1 text-sm text-red-600",children:n.first_name})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700",children:"Last Name *"}),e.jsx("input",{type:"text",value:l.last_name,onChange:r=>s("last_name",r.target.value),className:"mt-1 w-full px-3 py-2 border border-gray-300 rounded-md focus:ring-2 focus:ring-green-500 focus:border-transparent",required:!0}),n.last_name&&e.jsx("p",{className:"mt-1 text-sm text-red-600",children:n.last_name})]})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700",children:"Email"}),e.jsx("input",{type:"email",value:l.email,onChange:r=>s("email",r.target.value),className:"mt-1 w-full px-3 py-2 border border-gray-300 rounded-md focus:ring-2 focus:ring-green-500 focus:border-transparent"}),n.email&&e.jsx("p",{className:"mt-1 text-sm text-red-600",children:n.email})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700",children:"Phone"}),e.jsx("input",{type:"text",value:l.phone,onChange:r=>s("phone",r.target.value),className:"mt-1 w-full px-3 py-2 border border-gray-300 rounded-md focus:ring-2 focus:ring-green-500 focus:border-transparent"})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700",children:"Notes"}),e.jsx("textarea",{value:l.comments,onChange:r=>s("comments",r.target.value),rows:2,placeholder:"How did they reach out? Any special notes?",className:"mt-1 w-full px-3 py-2 border border-gray-300 rounded-md focus:ring-2 focus:ring-green-500 focus:border-transparent"})]}),e.jsxs("div",{className:"flex justify-end gap-3 pt-4 border-t border-gray-200",children:[e.jsx("button",{type:"button",onClick:a,className:"px-4 py-2 text-sm font-medium text-gray-700 bg-gray-100 rounded-lg hover:bg-gray-200 transition-colors",children:"Cancel"}),e.jsx("button",{type:"submit",disabled:c,className:"px-4 py-2 text-sm font-medium text-white bg-green-600 rounded-lg hover:bg-green-700 disabled:opacity-50 transition-colors",children:c?"Adding...":"Add Volunteer"})]})]})]})]})})}function j({registrations:a,stats:l,filters:s}){const{flash:i}=g().props,[c,n]=h.useState(!1),x=t=>{t.preventDefault();const d=new FormData(t.target);o.get(route("admin.recycling-event.index"),{search:d.get("search"),source:s.source},{preserveState:!0})},r=(t,d)=>{o.get(route("admin.recycling-event.index"),{...s,[t]:d===s[t]?"all":d},{preserveState:!0})},u=()=>{o.get(route("admin.recycling-event.index"))};return e.jsxs("div",{className:"min-h-screen bg-gray-50",children:[e.jsx(p,{title:"Recycling Event Volunteers"}),e.jsx("div",{className:"bg-white border-b border-gray-200",children:e.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:e.jsxs("div",{className:"py-6 flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx(m,{href:route("dashboard"),
1className:"text-gray-400 hover:text-gray-600",children:e.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 19l-7-7 7-7"})})}),e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:"♻️ Recycling Event Volunteers"}),e.jsx("p",{className:"text-gray-600 mt-1",children:"Saturday, April 25, 2026 - 9527 W Ridge Trail Rd"})]})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("a",{href:route("public.recycling-volunteer"),target:"_blank",className:"px-4 py-2 text-sm font-medium text-green-700 bg-green-50 rounded-lg hover:bg-green-100 transition-colors",children:"View Public Page"}),e.jsx("button",{onClick:()=>n(!0),className:"px-4 py-2 text-sm font-medium text-white bg-green-600 rounded-lg hover:bg-green-700 transition-colors",children:"+ Add Volunteer"})]})]})})}),(i==null?void 0:i.success)&&e.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 mt-4",children:e.jsx("div",{className:"bg-green-50 border border-green-200 text-green-800 px-4 py-3 rounded-lg",children:i.success})}),e.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8",children:[e.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-5 gap-4 mb-6",children:[e.jsxs("div",{className:"bg-white rounded-lg shadow p-4",children:[e.jsx("div",{className:"text-3xl font-bold text-emerald-600",children:l.total}),e.jsx("div",{className:"text-sm text-gray-500",children:"Total Volunteers"})]}),e.jsxs("div",{className:"bg-white rounded-lg shadow p-4",children:[e.jsx("div",{className:"text-3xl font-bold text-blue-600",children:l.website}),e.jsx("div",{className:"text-sm text-gray-500",children:"Online Sign-ups"})]}),e.jsxs("div",{className:"bg-white rounded-lg shadow p-4",children:[e.jsx("div",{className:"text-3xl font-bold text-amber-600",children:l.manual}),e.jsx("div",{className:"text-sm text-gray-500",children:"Added Manually"})]}),e.jsxs("div",{className:"bg-white rounded-lg shadow p-4",children:[e.jsx("div",{className:"text-3xl font-bold text-green-600",children:l.returning_volunteers}),e.jsx("div",{className:"text-sm text-gray-500",children:"Returning Volunteers"})]}),e.jsxs("div",{className:"bg-white rounded-lg shadow p-4",children:[e.jsx("div",{className:"text-3xl font-bold text-purple-600",children:l.newsletter_signups}),e.jsx("div",{className:"text-sm text-gray-500",children:"Newsletter Sign-ups"})]})]}),e.jsx("div",{className:"bg-white rounded-lg shadow mb-6 p-4",children:e.jsxs("div",{className:"flex flex-wrap items-center gap-4",children:[e.jsx("form",{onSubmit:x,className:"flex-1 min-w-[200px]",children:e.jsxs("div",{className:"relative",children:[e.jsx("input",{type:"text",name:"search",defaultValue:s.search||"",placeholder:"Search by name or email...",className:"w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-green-500 focus:border-transparent"}),e.jsx("button",{type:"submit",className:"absolute right-2 top-1/2 -translate-y-1/2 text-gray-400 hover:text-gray-600",children:e.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})})]})}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsx("button",{onClick:()=>r("source","manual"),className:`px-3 py-1.5 rounded-lg text-sm font-medium transition-colors ${s.source==="manual"?"bg-amber-600 text-white":"bg-gray-100 text-gray-700 hover:bg-gray-200"}`,children:"Manual Only"}),e.jsx("button",{onClick:()=>r("source","website"),className:`px-3 py-1.5 rounded-lg text-sm font-medium transition-colors ${s.source==="website"?"bg-blue-600 text-white":"bg-gray-100 text-gray-700 hover:bg-gray-200"}`,children:"Website Only"}),(s.search||s.source&&s.source!=="all")&&e.jsx("button",{onClick:u,className:"px-3 py-1.5 rounded-lg text-sm font-medium bg-red-100 text-red-700 hover:bg-red-200",children:"Clear"})]}),e.jsx("a",{href:route("admin.recycling-event.export"),className:"px-4 py-2 rounded-lg text-sm font-medium bg-green-600 text-white hover:bg-green-700",children:"Export CSV"})]})}),e.jsxs("div",{className:"bg-white rounded-lg shadow overflow-hidden",children:[e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"min-w-full divide-y divide-gray-200",children:[e.jsx("thead",{className:"bg-gray-50",children:e.jsxs("tr",{children:[e.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Volunteer"}),e.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Source"}),e.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Details"}),e.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Signed Up"}),e.jsx("th",{className:"px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Actions"})]})}),e.jsx("tbody",{className:"bg-white divide-y divide-gray-200",children:a.data.length===0?e.jsx("tr",{children:e.jsx("td",{colSpan:5,className:"px-6 py-12 text-center text-gray-500",children:"No volunteers yet. Share the signup link or add them manually!"})}):a.data.map(t=>e.jsxs("tr",{className:"hover:bg-gray-50",children:[e.jsxs("td",{className:"px-6 py-4 whitespace-nowrap",children:[e.jsxs("div",{className:"font-medium text-gray-900",children:[t.first_name," ",t.last_name]}),t.email&&e.jsx("div",{className:"text-sm text-gray-500",children:t.email}),t.phone&&e.jsx("div",{className:"text-sm text-gray-400",children:t.phone})]}),e.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:e.jsx("span",{className:`inline-flex items-center px-2 py-0.5 rounded text-xs font-medium ${t.source==="manual"?"bg-amber-100 text-amber-800":"bg-blue-100 text-blue-800"}`,children:t.source==="manual"?"Manual":"Website"})}),e.jsxs("td",{className:"px-6 py-4",children:[e.jsxs("div",{className:"flex flex-wrap gap-1",children:[t.has_volunteered_before&&e.jsx("span",{className:"inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-green-100 text-green-800",children:"Returning"}),t.wants_newsletter&&e.jsx("span",{className:"inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-purple-100 text-purple-800",children:"Newsletter"})]}),t.comments&&e.jsx("p",{className:"text-sm text-gray-500 mt-1 max-w-xs truncate",title:t.comments,children:t.comments})]}),e.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-500",children:new Date(t.created_at).toLocaleDateString()}),e.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-right text-sm",children:e.jsx("button",{onClick:()=>{confirm("Remove this volunteer?")&&o.delete(route("admin.recycling-event.destroy",t.id),{preserveScroll:!0})},className:"text-red-600 hover:text-red-900",children:"Remove"})})]},t.id))})]})}),a.last_page>1&&e.jsx("div",{className:"bg-white px-4 py-3 flex items-center justify-between border-t border-gray-200 sm:px-6",children:e.jsxs("div",{className:"hidden sm:flex sm:flex-1 sm:items-center sm:justify-between",children:[e.jsxs("p",{className:"text-sm text-gray-700",children:["Showing ",e.jsx("span",{className:"font-medium",children:a.from})," to"," ",e.jsx("span",{className:"font-medium",children:a.to})," of"," ",e.jsx("span",{className:"font-medium",children:a.total})]}),e.jsx("nav",{className:"relative z-0 inline-flex rounded-md shadow-sm -space-x-px",children:a.links.map((t,d)=>e.jsx(m,{href:t.url||"#",className:`relative inline-flex items-center px-4 py-2 border text-sm font-medium ${t.active?"z-10 bg-green-50 border-green-500 text-green-600":"bg-white border-gray-300 text-gray-500 hover:bg-gray-50"} ${d===0?"rounded-l-md":""} ${d===a.links.length-1?"rounded-r-md":""}`,dangerouslySetInnerHTML:{__html:t.label}},d))})]})})]}),e.jsxs("div",{className:"mt-6 bg-white rounded-lg shadow p-6",children:[e.jsx("h3",{className:"text-lg font-semibold text-gray-900 mb-2",children:"Share the Volunteer Sign-Up Link"}),e.jsx("p",{className:"text-sm text-gray-500 mb-3",children:"Send this link to anyone interested in volunteering:"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("code",{className:"flex-1 bg-gray-100 px-4 py-2 rounded-lg text-sm text-gray-700 overflow-x-auto",children:"https://keepsoddydaisybeautiful.org/recycling-event/volunteer"}),e.jsx("button",{onClick:()=>{navigator.clipboard.writeText("https://keepsoddydaisybeautiful.org/recycling-event/volunteer"),alert("Link copied!")},className:"px-4 py-2 text-sm font-medium text-white bg-green-600 rounded-lg hover:bg-green-700 transition-colors flex-shrink-0",children:"Copy"})]})]})]}),c&&e.jsx(y,{onClose:()=>n(!1)})]})}const v=Object.freeze(Object.defineProperty({__proto__:null,default:j},Symbol.toStringTag,{value:"Module"}));
1export{v as _};

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.