PageSourceSearch

https://helpfoundation.org.uk/assets/ProjectSiteManagement-DS_kH2cx.js

js helpfoundation.org.uk collected 2026-09-24 12:32:26 UTC 22,110 bytes, 1 lines download raw bytes

1import{r as o,j as e}from"./vendor-react-DNw-kZm-.js";import{k as C,$ as S}from"./index-DfHkX6Ng.js";import{g as b,a4 as f,aA as R,h as J,aI as O,ae as z,a8 as U,ah as W,P as q,L as k,aj as P,bo as _,f as H,X,F as K,aX as V}from"./vendor-lucide-xDrOBQYS.js";import"./vendor-router-vKMkWiF4.js";import"./vendor-pdf-C_-frLof.js";import"./vendor-charts-D16dH9ks.js";import"./vendor-stripe-DaacuDhl.js";import"./vendor-radix-CljS1jOz.js";function le(){const[n,D]=o.useState([]),[E,j]=o.useState(!0),[m,y]=o.useState(!1),[T,c]=o.useState(!1),[l,N]=o.useState(null),[x,I]=o.useState(""),[u,L]=o.useState("all"),[s,r]=o.useState({siteName:"",siteCode:"",projectId:"",projectName:"",country:"",state:"",city:"",address:"",latitude:"",longitude:"",coordinatorName:"",coordinatorPhone:"",coordinatorEmail:"",budget:"",siteType:"",status:"planning",startDate:"",endDate:"",description:"",beneficiaries:""}),g=[{id:"PRJ-001",name:"Clean Water for Villages"},{id:"PRJ-002",name:"Education for 100 Children"},{id:"PRJ-003",name:"Emergency Food Relief"},{id:"PRJ-004",name:"Medical Aid Program"},{id:"PRJ-005",name:"Orphan Support Program"}],F=["Water Well","School","Medical Center","Food Distribution Center","Orphanage","Community Center","Mosque","Training Center","Relief Camp","Other"],h=async()=>{try{j(!0);const t=await fetch("https://api.donorhub.cloud/api/project-sites",{headers:{"Content-Type":"application/json",Authorization:`Bearer ${localStorage.getItem("auth_token")}`}});if(!t.ok)throw new Error("Failed to fetch project sites");const a=await t.json();D(a.sites||[])}catch(t){console.error("Error fetching project sites:",t),alert("Failed to load project sites")}finally{j(!1)}};o.useEffect(()=>{h()},[]);const B=()=>{N(null),r({siteName:"",siteCode:"",projectId:"",projectName:"",country:"",state:"",city:"",address:"",latitude:"",longitude:"",coordinatorName:"",coordinatorPhone:"",coordinatorEmail:"",budget:"",siteType:"",status:"planning",startDate:"",endDate:"",description:"",beneficiaries:""}),c(!0)},A=t=>{N(t),r({siteName:t.siteName,siteCode:t.siteCode,projectId:t.projectId,projectName:t.projectName,country:t.country,state:t.state,city:t.city,address:t.address,latitude:t.latitude||"",longitude:t.longitude||"",coordinatorName:t.coordinatorName,coordinatorPhone:t.coordinatorPhone,coordinatorEmail:t.coordinatorEmail,budget:t.budget.toString(),siteType:t.siteType,status:t.status,startDate:t.startDate,endDate:t.endD
1ate,description:t.description,beneficiaries:t.beneficiaries.toString()}),c(!0)},$=async()=>{if(!s.siteName||!s.siteCode||!s.projectId||!s.country||!s.city){alert("Please fill in all required fields");return}try{y(!0);const t=g.find(p=>p.id===s.projectId),a={siteName:s.siteName,siteCode:s.siteCode,projectId:s.projectId,projectName:(t==null?void 0:t.name)||"",country:s.country,state:s.state,city:s.city,address:s.address,latitude:s.latitude,longitude:s.longitude,coordinatorName:s.coordinatorName,coordinatorPhone:s.coordinatorPhone,coordinatorEmail:s.coordinatorEmail,budget:parseFloat(s.budget)||0,budgetSpent:(l==null?void 0:l.budgetSpent)||0,siteType:s.siteType,status:s.status,startDate:s.startDate,endDate:s.endDate,description:s.description,beneficiaries:parseInt(s.beneficiaries)||0},d=l?`https://api.donorhub.cloud/api/project-sites/${l.id}`:"https://api.donorhub.cloud/api/project-sites",w=await fetch(d,{method:l?"PUT":"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${localStorage.getItem("auth_token")}`},body:JSON.stringify(a)});if(!w.ok){const p=await w.text();throw new Error(p||"Failed to save project site")}await h(),c(!1),alert(l?"Project site updated successfully!":"Project site created successfully!")}catch(t){console.error("Error saving project site:",t),alert(`Failed to save project site: ${t}`)}finally{y(!1)}},M=async t=>{if(confirm("Are you sure you want to delete this project site?"))try{if(!(await fetch(`https://api.donorhub.cloud/api/project-sites/${t}`,{method:"DELETE",headers:{"Content-Type":"application/json",Authorization:`Bearer ${localStorage.getItem("auth_token")}`}})).ok)throw new Error("Failed to delete project site");await h(),alert("Project site deleted successfully!")}catch(a){console.error("Error deleting project site:",a),alert("Failed to delete project site")}},v=n.filter(t=>{const a=t.siteName.toLowerCase().includes(x.toLowerCase())||t.siteCode.toLowerCase().includes(x.toLowerCase())||t.city.toLowerCase().includes(x.toLowerCase()),d=u==="all"||t.status===u;return a&&d}),i={total:n.length,active:n.filter(t=>t.status==="active").length,planning:n.filter(t=>t.status==="planning").length,completed:n.filter(t=>t.status==="completed").length,totalBudget:n.reduce((t,a)=>t+a.budget,0),totalBeneficiaries:n.reduce((t,a)=>t+a.beneficiaries,0)};return e.jsxs("div",{className:"space-y-6",children:[e.jsx("div",{className:"bg-gradient-to-r from-green-600 via-teal-600 to-blue-700 rounded-2xl shadow-lg p-8 text-white",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-4xl font-black mb-2",children:"Project Site Management"}),e.jsx("p",{className:"text-green-100 font-semibold text-lg",children:"Manage project sites, locations, and site coordinators"})]}),e.jsx("div",{className:"p-4 bg-white/20 rounded-2xl backdrop-blur-sm",children:e.jsx(b,{className:"w-12 h-12"})})]})}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-6 gap-6",children:[e.jsxs("div",{className:"bg-white rounded-2xl shadow-lg p-6 border-2 border-gray-100",children:[e.jsx(f,{className:"w-10 h-10 text-green-600 mb-3"}),e.jsx("p",{className:"text-3xl font-black text-gray-900",children:i.total}),e.jsx("p",{className:"text-sm text-gray-600 font-semibold",children:"Total Sites"})]}),e.jsxs("div",{className:"bg-white rounded-2xl shadow-lg p-6 border-2 border-gray-100",children:[e.jsx(R,{className:"w-10 h-10 text-blue-600 mb-3"}),e.jsx("p",{className:"text-3xl font-black text-gray-900",children:i.active}),e.jsx("p",{className:"text-sm text-gray-600 font-semibold",children:"Active"})]}),e.jsxs("div",{className:"bg-white rounded-2xl shadow-lg p-6 border-2 border-gray-100",children:[e.jsx(J,{className:"w-10 h-10 text-yellow-600 mb-3"}),e.jsx("p",{className:"text-3xl font-black text-gray-900",children:i.planning}),e.jsx("p",{className:"text-sm text-gray-600 font-semibold",children:"Planning"})]}),e.jsxs("div",{className:"bg-white rounded-2xl shadow-lg p-6 border-2 border-gray-100",children:[e.jsx(O,{className:"w-10 h-10 text-purple-600 mb-3"}),e.jsx("p",{className:"text-3xl font-black text-gray-900",children:i.completed}),e.jsx("p",{className:"text-sm text-gray-600 font-semibold",children:"Completed"})]}),e.jsxs("div",{className:"bg-white rounded-2xl shadow-lg p-6 border-2 border-gray-100",children:[e.jsx(z,{className:"w-10 h-10 text-pink-600 mb-3"}),e.jsxs("p",{className:"text-3xl font-black text-gray-900",children:["£",i.totalBudget.toLocaleStr
1ing()]}),e.jsx("p",{className:"text-sm text-gray-600 font-semibold",children:"Total Budget"})]}),e.jsxs("div",{className:"bg-white rounded-2xl shadow-lg p-6 border-2 border-gray-100",children:[e.jsx(U,{className:"w-10 h-10 text-orange-600 mb-3"}),e.jsx("p",{className:"text-3xl font-black text-gray-900",children:i.totalBeneficiaries.toLocaleString()}),e.jsx("p",{className:"text-sm text-gray-600 font-semibold",children:"Beneficiaries"})]})]}),e.jsxs("div",{className:"flex items-center justify-between gap-4",children:[e.jsxs("div",{className:"flex gap-3 flex-1",children:[e.jsxs("div",{className:"relative flex-1 max-w-md",children:[e.jsx(W,{className:"absolute left-4 top-1/2 -translate-y-1/2 w-5 h-5 text-gray-400"}),e.jsx("input",{type:"text",value:x,onChange:t=>I(t.target.value),placeholder:"Search sites...",className:"w-full pl-12 pr-4 py-3 border-2 border-gray-200 rounded-xl focus:border-green-500 focus:outline-none font-medium"})]}),e.jsxs("select",{value:u,onChange:t=>L(t.target.value),className:"px-4 py-3 border-2 border-gray-200 rounded-xl focus:border-green-500 focus:outline-none font-medium",children:[e.jsx("option",{value:"all",children:"All Status"}),e.jsx("option",{value:"planning",children:"Planning"}),e.jsx("option",{value:"active",children:"Active"}),e.jsx("option",{value:"completed",children:"Completed"}),e.jsx("option",{value:"on-hold",children:"On Hold"}),e.jsx("option",{value:"cancelled",children:"Cancelled"})]})]}),e.jsxs("button",{onClick:B,className:"flex items-center gap-2 px-6 py-3 bg-gradient-to-r from-green-600 to-teal-600 text-white rounded-xl font-bold hover:shadow-lg transition-all",children:[e.jsx(q,{className:"w-5 h-5"}),"Add New Site"]})]}),E?e.jsx("div",{className:"flex items-center justify-center py-12",children:e.jsx(k,{className:"w-12 h-12 text-green-600 animate-spin"})}):e.jsx("div",{className:"grid gap-6",children:v.length===0?e.jsxs("div",{className:"bg-white rounded-2xl shadow-lg border-2 border-gray-100 p-12 text-center",children:[e.jsx(f,{className:"w-16 h-16 text-gray-300 mx-auto mb-4"}),e.jsx("p",{className:"text-xl font-bold text-gray-400",children:"No project sites found"}),e.jsx("p",{className:"text-gray-500 mt-2",children:"Create your first project site to get started"})]}):v.map(t=>{const a=t.budgetSpent/t.budget*100;return e.jsxs("div",{className:"bg-white rounded-2xl shadow-lg border-2 border-gray-100 p-6 hover:shadow-xl transition-all",children:[e.jsxs("div",{className:"flex items-start justify-between mb-4",children:[e.jsxs("div",{className:"flex-1",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[e.jsx("h3",{className:"text-xl font-black text-gray-900",children:t.siteName}),e.jsx("span",{className:"px-3 py-1 bg-gray-100 text-gray-700 rounded-full text-xs font-bold",children:t.siteCode}),e.jsx("span",{className:`px-3 py-1 rounded-full text-xs font-bold ${t.status==="active"?"bg-green-100 text-green-700":t.status==="completed"?"bg-blue-100 text-blue-700":t.status==="on-hold"?"bg-yellow-100 text-yellow-700":t.status==="cancelled"?"bg-red-100 text-red-700":"bg-purple-100 text-purple-700"}`,children:t.status})]}),e.jsxs("p",{className:"text-sm text-gray-600 font-medium mb-3",children:[t.projectName," • ",t.siteType]}),e.jsx("p",{className:"text-gray-700 font-medium mb-3",children:t.description}),e.jsxs("div",{className:"flex items-center gap-6 text-sm",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(b,{className:"w-4 h-4 text-gray-500"}),e.jsxs("span",{className:"font-semibold text-gray-700",children:[t.city,", ",t.state,", ",t.country]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(P,{className:"w-4 h-4 text-gray-500"}),e.jsx("span",{className:"font-semibold text-gray-700",children:t.coordinatorName})]})]})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("button",{onClick:()=>A(t),className:"p-2 bg-green-100 text-green-600 rounded-lg hover:bg-green-200 transition-all",children:e.jsx(_,{className:"w-5 h-5"})}),e.jsx("button",{onClick:()=>M(t.id),className:"p-2 bg-red-100 text-red-600 rounded-lg hover:bg-red-200 transition-all",children:e.jsx(H,{className:"w-5 h-5"})})]})]}),e.jsxs("div",{className:"grid md:grid-cols-4 gap-6 pt-4 border-t-2 border-gray-100",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-bold text-gray-700 mb-2",children:"Budget Progress"}),e.jsx("div",{className:"w-full bg-gray-200 rounded-full h-3 mb-2",children:e.jsx("div",{className:"bg-gradient-to-r from-green-500 to-teal-600 h-3 rounded-full transition-all",style:{width:`${Math.min(a,100)}%`}})}),e.jsxs("p",{className:"text-sm font-black text-green-600",children:["£",t.budgetSpent.toLocaleStr
1ing()," / £",t.budget.toLocaleString()]})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-bold text-gray-700 mb-2",children:"Timeline"}),e.jsxs("p",{className:"text-sm text-gray-900 font-semibold",children:[C(t.startDate)," - ",C(t.endDate)]})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-bold text-gray-700 mb-2",children:"Beneficiaries"}),e.jsx("p",{className:"text-2xl font-black text-gray-900",children:t.beneficiaries.toLocaleString()})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-bold text-gray-700 mb-2",children:"Contact"}),e.jsx("p",{className:"text-sm text-gray-900 font-semibold",children:t.coordinatorPhone})]})]})]},t.id)})}),T&&e.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50 p-4",children:e.jsxs("div",{className:"bg-white rounded-2xl shadow-2xl max-w-4xl w-full max-h-[90vh] overflow-y-auto",children:[e.jsxs("div",{className:"sticky top-0 bg-gradient-to-r from-green-600 to-teal-600 p-6 text-white flex items-center justify-between z-10",children:[e.jsx("h2",{className:"text-2xl font-black",children:l?"Edit Project Site":"Add New Project Site"}),e.jsx("button",{onClick:()=>c(!1),className:"p-2 hover:bg-white/20 rounded-lg transition-all",children:e.jsx(X,{className:"w-6 h-6"})})]}),e.jsxs("div",{className:"p-6 space-y-6",children:[e.jsxs("div",{children:[e.jsxs("h3",{className:"text-lg font-black text-gray-900 mb-4 flex items-center gap-2",children:[e.jsx(f,{className:"w-5 h-5"}),"Basic Information"]}),e.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-bold text-gray-700 mb-2",children:"Site Name *"}),e.jsx("input",{type:"text",value:s.siteName,onChange:t=>r(a=>({...a,siteName:t.target.value})),className:"w-full px-4 py-3 border-2 border-gray-200 rounded-xl focus:border-green-500 focus:outline-none font-medium",placeholder:"Al-Noor Water Well Site"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-bold text-gray-700 mb-2",children:"Site Code *"}),e.jsx("input",{type:"text",value:s.siteCode,onChange:t=>r(a=>({...a,siteCode:t.target.value})),className:"w-full px-4 py-3 border-2 border-gray-200 rounded-xl focus:border-green-500 focus:outline-none font-medium",placeholder:"SITE-001"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-bold text-gray-700 mb-2",children:"Select Project *"}),e.jsxs("select",{value:s.projectId,onChange:t=>{const a=g.find(d=>d.id===t.target.value);r(d=>({...d,projectId:t.target.value,projectName:(a==null?void 0:a.name)||""}))},className:"w-full px-4 py-3 border-2 border-gray-200 rounded-xl focus:border-green-500 focus:outline-none font-medium",children:[e.jsx("option",{value:"",children:"Select a project"}),g.map(t=>e.jsx("option",{value:t.id,children:t.name},t.id))]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-bold text-gray-700 mb-2",children:"Site Type *"}),e.jsxs("select",{value:s.siteType,onChange:t=>r(a=>({...a,siteType:t.target.value})),className:"w-full px-4 py-3 border-2 border-gray-200 rounded-xl focus:border-green-500 focus:outline-none font-medium",children:[e.jsx("option",{value:"",children:"Select site type"}),F.map(t=>e.jsx("option",{value:t,children:t},t))]})]})]})]}),e.jsxs("div",{children:[e.jsxs("h3",{className:"text-lg font-black text-gray-900 mb-4 flex items-center gap-2",children:[e.jsx(b,{className:"w-5 h-5"}),"Location Information"]}),e.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-bold text-gray-700 mb-2",children:"Country *"}),e.jsx("input",{type:"text",value:s.country,onChange:t=>r(a=>({...a,country:t.target.value})),className:"w-full px-4 py-3 border-2 border-gray-200 rounded-xl focus:border-green-500 focus:outline-none font-medium",placeholder:"Pakistan"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-bold text-gray-700 mb-2",children:"State/Province"}),e.jsx("input",{type:"text",value:s.state,onChange:t=>r(a=>({...a,state:t.target.value})),className:"w-full px-4 py-3 border-2 border-gray-200 rounded-xl focus:border-green-500 focus:outline-none font-medium",placeholder:"Punjab"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-bold text-gray-700 mb-2",children:"City *"}),e.jsx("input",{type:"text",value:s.city,onChange:t=>r(a=>({...a,city:t.target.value})),className:"w-full px-4 py-3 border-2 border-gray-200 rounded-xl focus:border-green-500 focus:outline-none font-medium",placeholder:"Lahore"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-bold text-gray-700 mb-2",children:"Address"}),e.jsx("input",{type:"text",value:s.address,onChange:t=>r(a=>({...a,address:t.target.value})),className:"w-full px-4 py-3 border-2 border-gray-200 rounded-xl focus:border-green-500 focus:outline-none font-medium",placeholder:"Street address"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-bold text-gray-700 mb-2",children:"Latitude"}),e.jsx("input",{type:"text",value:s.latitude,onChange:t=>r(a=>({...a,latitude:t.target.value})),className:"w-full px-4 py-3 border-2 border-gray-200 rounded-xl focus:border-green-500 focus:outline-none font-medium",placeholder:"31.5204"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-bold text-gray-700 mb-2",children:"Longitude"}),e.jsx("input",{type:"text",value:s.longitude,onChange:t=>r(a=>({...a,longitude:t.target.value})),className:"w-full px-4 py-3 border-2 border-gray-200 rounded-xl focus:border-green-500 focus:outline-none font-medium",placeholder:"74.3587"})]})]})]}),e.jsxs("div",{children:[e.jsxs("h3",{className:"text-lg font-black text-gray-900 mb-4 flex items-center gap-2",children:[e.jsx(P,{className:"w-5 h-5"}),"Coordinator Information"]}),e.jsxs("div",{className:"grid md:grid-cols-3 gap-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-bold text-gray-700 mb-2",children:"Coordinator Name"}),e.jsx("input",{type:"text",value:s.coordinatorName,onChange:t=>r(a=>({...a,coordinatorName:t.target.value})),className:"w-full px-4 py-3 border-2 border-gray-200 rounded-xl focus:border-green-500 focus:outline-none font-medium",placeholder:"John Doe"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-bold text-gray-700 mb-2",children:"Phone"}),e.jsx("input",{type:"tel",value:s.coordinatorPhone,onChange:t=>r(a=>({...a,coordinatorPhone:t.target.value})),className:"w-full px-4 py-3 border-2 border-gray-200 rounded-xl focus:border-green-500 focus:outline-none font-medium",placeholder:"+92 300 1234567"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-bold text-gray-700 mb-2",children:"Email"}),e.jsx("input",{type:"email",value:s.coordinatorEmail,onChange:t=>r(a=>({...a,coordinatorEmail:t.target.value})),className:"w-full px-4 py-3 border-2 border-gray-200 rounded-xl focus:border-green-500 focus:outline-none font-medium",placeholder:"[email protected]"})]})]})]}),e.jsxs("div",{children:[e.jsxs("h3",{className:"text-lg font-black text-gray-900 mb-4 flex items-center gap-2",children:[e.jsx(K,{className:"w-5 h-5"}),"Project Details"]}
1),e.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-bold text-gray-700 mb-2",children:"Budget (£)"}),e.jsx("input",{type:"number",value:s.budget,onChange:t=>r(a=>({...a,budget:t.target.value})),className:"w-full px-4 py-3 border-2 border-gray-200 rounded-xl focus:border-green-500 focus:outline-none font-medium",placeholder:"50000"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-bold text-gray-700 mb-2",children:"Expected Beneficiaries"}),e.jsx("input",{type:"number",value:s.beneficiaries,onChange:t=>r(a=>({...a,beneficiaries:t.target.value})),className:"w-full px-4 py-3 border-2 border-gray-200 rounded-xl focus:border-green-500 focus:outline-none font-medium",placeholder:"500"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-bold text-gray-700 mb-2",children:"Start Date"}),e.jsx(S,{value:s.startDate,onChange:t=>r(a=>({...a,startDate:t.target.value})),className:"w-full px-4 py-3 border-2 border-gray-200 rounded-xl focus:border-green-500 focus:outline-none font-medium"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-bold text-gray-700 mb-2",children:"End Date"}),e.jsx(S,{value:s.endDate,onChange:t=>r(a=>({...a,endDate:t.target.value})),className:"w-full px-4 py-3 border-2 border-gray-200 rounded-xl focus:border-green-500 focus:outline-none font-medium"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-bold text-gray-700 mb-2",children:"Status"}),e.jsxs("select",{value:s.status,onChange:t=>r(a=>({...a,status:t.target.value})),className:"w-full px-4 py-3 border-2 border-gray-200 rounded-xl focus:border-green-500 focus:outline-none font-medium",children:[e.jsx("option",{value:"planning",children:"Planning"}),e.jsx("option",{value:"active",children:"Active"}),e.jsx("option",{value:"completed",children:"Completed"}),e.jsx("option",{value:"on-hold",children:"On Hold"}),e.jsx("option",{value:"cancelled",children:"Cancelled"})]})]}),e.jsxs("div",{className:"md:col-span-2",children:[e.jsx("label",{className:"block text-sm font-bold text-gray-700 mb-2",children:"Description"}),e.jsx("textarea",{value:s.description,onChange:t=>r(a=>({...a,description:t.target.value})),rows:4,className:"w-full px-4 py-3 border-2 border-gray-200 rounded-xl focus:border-green-500 focus:outline-none font-medium resize-none",placeholder:"Describe the project site..."})]})]})]}),e.jsxs("div",{className:"flex gap-3 pt-4 border-t-2 border-gray-100",children:[e.jsx("button",{onClick:()=>c(!1),disabled:m,className:"flex-1 px-6 py-3 bg-gray-100 text-gray-700 rounded-xl font-bold hover:bg-gray-200 transition-all disabled:opacity-50",children:"Cancel"}),e.jsx("button",{onClick:$,disabled:m,className:"flex-1 px-6 py-3 bg-gradient-to-r from-green-600 to-teal-600 text-white rounded-xl font-bold hover:shadow-lg transition-all flex items-center justify-center gap-2 disabled:opacity-50",children:m?e.jsxs(e.Fragment,{children:[e.jsx(k,{className:"w-5 h-5 animate-spin"}),"Saving..."]}):e.jsxs(e.Fragment,{children:[e.jsx(V,{className:"w-5 h-5"}),l?"Update Site":"Create Site"]})})]})]})]})})]})}export{le as ProjectSiteManagement};

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.