- Created new JavaScript files for map pin, search, and user icons. - Added index.html with basic structure and linked assets. - Included vite.svg for the favicon.
14 lines
11 KiB
JavaScript
14 lines
11 KiB
JavaScript
import{c as p,r as g,j as e,O as N,F as w,D as k,N as C,C as A,M as z,S as P}from"./index-mUEXKEer.js";import{Q as S,C as a,M as l,S as D,T as c}from"./NielsenHeuristics-d7HCIgJi.js";import{C as R,a as M,F as _}from"./file-text-BG0u0kR1.js";import{E as h}from"./eye-QHwXAkqY.js";import{U as I}from"./user-H-bTlvBe.js";import{M as U}from"./map-pin-BhJz-uKs.js";const $=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]],H=p("calendar",$);const L=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],E=p("download",L);const G=[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]],T=p("funnel",G),q=()=>{const[i,r]=g.useState("all"),[u,v]=g.useState(null),s=[{id:"APP-2026-001",parcelId:"GH-0345-22",applicant:"Accra Development Corp",type:"Commercial Development",location:"Tema Industrial Area",submittedDate:"2026-02-15",status:"pending",priority:"high"},{id:"APP-2026-002",parcelId:"GH-0456-22",applicant:"Kumasi Housing Ltd",type:"Residential Complex",location:"Kumasi Metropolitan",submittedDate:"2026-02-18",status:"under_review",priority:"medium"},{id:"APP-2026-003",parcelId:"GH-0567-22",applicant:"Ghana Utilities Co",type:"Infrastructure Upgrade",location:"Greater Accra Region",submittedDate:"2026-02-10",status:"approved",priority:"high"},{id:"APP-2026-004",parcelId:"GH-0678-22",applicant:"Takoradi Ventures",type:"Mixed-Use Development",location:"Sekondi-Takoradi",submittedDate:"2026-02-20",status:"under_review",priority:"low"},{id:"APP-2026-005",parcelId:"GH-0789-22",applicant:"Cape Coast Builders",type:"Hotel Development",location:"Cape Coast",submittedDate:"2026-02-12",status:"rejected",priority:"medium"}],n={total:s.length,pending:s.filter(t=>t.status==="pending").length,underReview:s.filter(t=>t.status==="under_review").length,approved:s.filter(t=>t.status==="approved").length,rejected:s.filter(t=>t.status==="rejected").length},d=i==="all"?s:s.filter(t=>t.status===i),b={pending:{label:"Pending Review",color:"var(--brand-orange-warm)",bg:"bg-brand-orange-warm/10",icon:M},under_review:{label:"Under Review",color:"var(--primary)",bg:"bg-primary/10",icon:h},approved:{label:"Approved",color:"var(--success)",bg:"bg-success/10",icon:R},rejected:{label:"Rejected",color:"var(--destructive)",bg:"bg-destructive/10",icon:A}},j={high:{label:"High",color:"text-destructive",bg:"bg-destructive/10"},medium:{label:"Medium",color:"text-warning",bg:"bg-warning/10"},low:{label:"Low",color:"text-muted-foreground",bg:"bg-muted"}};return e.jsxs("div",{className:"min-h-screen bg-background",children:[e.jsxs("header",{className:"bg-gradient-to-br from-brand-navy to-brand-blue-strong text-white py-8 px-8 relative overflow-hidden",children:[e.jsx("div",{className:"absolute top-0 right-0 opacity-10",children:e.jsx(N,{size:200,color:"white"})}),e.jsx("div",{className:"max-w-7xl mx-auto relative z-10",children:e.jsx("div",{className:"flex items-center justify-between",children:e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx(w,{size:48,color:"var(--brand-orange-warm)"}),e.jsxs("div",{children:[e.jsx("h1",{className:"mb-2",children:"LUSPA Administration"}),e.jsx("p",{className:"text-[length:var(--text-md)] opacity-90",children:"Land Use and Spatial Planning Authority Dashboard"})]})]})})})]}),e.jsxs("div",{className:"max-w-7xl mx-auto p-8 space-y-8",children:[e.jsxs("section",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-6",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(k,{size:24,color:"var(--brand-blue-strong)"}),e.jsx("h2",{children:"Overview"})]}),e.jsx("div",{className:"",children:e.jsx(S,{alignment:"right",actions:[{label:"New Application",symbolName:"sankofa",onClick:()=>alert("New application form"),shortcut:"Ctrl+N",description:"Start new application"},{label:"Export Reports",symbolName:"nyansapo",onClick:()=>alert("Export reports"),shortcut:"Ctrl+E",description:"Download reports"},{label:"View Analytics",symbolName:"nkonsonkonson",onClick:()=>alert("View analytics"),shortcut:"Ctrl+A",description:"System analytics"}],trigger:e.jsx(a,{variant:"secondary",size:"md",children:"Quick Actions"})})})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-5 gap-4",children:[e.jsx(l,{title:"Total Applications",value:n.total,symbolName:"fihankra",onClick:()=>r("all")}),e.jsx(l,{title:"Pending Review",value:n.pending,symbolName:"nkyinkyim",trend:{value:5,isPositive:!0},onClick:()=>r("pending")}),e.jsx(l,{title:"Under Review",value:n.underReview,symbolName:"nyansapo",onClick:()=>r("under_review")}),e.jsx(l,{title:"Approved",value:n.approved,symbolName:"dwennimmen",trend:{value:12,isPositive:!0},onClick:()=>r("approved")}),e.jsx(l,{title:"Rejected",value:n.rejected,symbolName:"mpatapo",onClick:()=>r("rejected")})]})]}),i!=="all"&&e.jsx(D,{status:"success",message:`Showing ${d.length} ${i.replace("_"," ")} application(s)`,symbolName:"nyansapo"}),e.jsxs("section",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-6",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(C,{size:24,color:"var(--brand-blue-strong)"}),e.jsx("h2",{children:"Application Reviews"})]}),e.jsxs("div",{className:"flex gap-3",children:[e.jsx(c,{content:"Filter applications",children:e.jsxs(a,{variant:"ghost",size:"sm",symbolName:"fihankra",onClick:()=>r("all"),children:[e.jsx(T,{size:16}),i!=="all"&&` (${i.replace("_"," ")})`]})}),e.jsx(c,{content:"Export to CSV",children:e.jsx(a,{variant:"ghost",size:"sm",onClick:()=>alert("Export functionality"),children:e.jsx(E,{size:16})})})]})]}),e.jsxs("div",{className:"bg-card rounded-xl border border-border overflow-hidden",children:[e.jsxs("div",{className:"grid grid-cols-12 gap-4 px-6 py-4 bg-muted border-b border-border",children:[e.jsx("div",{className:"col-span-2 text-[length:var(--text-xs)] font-[weight:var(--font-weight-semibold)] uppercase text-muted-foreground",children:"Application ID"}),e.jsx("div",{className:"col-span-2 text-[length:var(--text-xs)] font-[weight:var(--font-weight-semibold)] uppercase text-muted-foreground",children:"Applicant"}),e.jsx("div",{className:"col-span-2 text-[length:var(--text-xs)] font-[weight:var(--font-weight-semibold)] uppercase text-muted-foreground",children:"Type"}),e.jsx("div",{className:"col-span-2 text-[length:var(--text-xs)] font-[weight:var(--font-weight-semibold)] uppercase text-muted-foreground",children:"Location"}),e.jsx("div",{className:"col-span-2 text-[length:var(--text-xs)] font-[weight:var(--font-weight-semibold)] uppercase text-muted-foreground",children:"Status"}),e.jsx("div",{className:"col-span-2 text-[length:var(--text-xs)] font-[weight:var(--font-weight-semibold)] uppercase text-muted-foreground",children:"Actions"})]}),d.map(t=>{const o=b[t.status],m=j[t.priority],f=o.icon,y=u===t.id;return e.jsxs("div",{onClick:()=>v(t.id),className:`
|
|
grid grid-cols-12 gap-4 px-6 py-4
|
|
border-b border-border last:border-b-0
|
|
hover:bg-accent transition-colors cursor-pointer
|
|
${y?"bg-accent":""}
|
|
`,children:[e.jsxs("div",{className:"col-span-2 flex flex-col gap-1",children:[e.jsx("span",{className:"text-[length:var(--text-sm)] font-[weight:var(--font-weight-semibold)] text-foreground",children:t.id}),e.jsxs("div",{className:"flex items-center gap-1 text-[length:var(--text-xs)] text-muted-foreground",children:[e.jsx(_,{size:12}),e.jsx("span",{children:t.parcelId})]})]}),e.jsxs("div",{className:"col-span-2 flex items-start gap-2",children:[e.jsx(I,{size:16,className:"text-muted-foreground mt-0.5"}),e.jsxs("div",{className:"flex flex-col",children:[e.jsx("span",{className:"text-[length:var(--text-sm)] text-foreground",children:t.applicant}),e.jsxs("div",{className:"flex items-center gap-1 text-[length:var(--text-xs)] text-muted-foreground",children:[e.jsx(H,{size:12}),e.jsx("span",{children:new Date(t.submittedDate).toLocaleDateString()})]})]})]}),e.jsx("div",{className:"col-span-2",children:e.jsx("span",{className:"text-[length:var(--text-sm)] text-foreground",children:t.type})}),e.jsxs("div",{className:"col-span-2 flex items-start gap-2",children:[e.jsx(U,{size:16,className:"text-primary mt-0.5"}),e.jsx("span",{className:"text-[length:var(--text-sm)] text-foreground",children:t.location})]}),e.jsxs("div",{className:"col-span-2 flex flex-col gap-2",children:[e.jsxs("span",{className:`
|
|
inline-flex items-center gap-1.5 px-2 py-1 rounded-full
|
|
text-[length:var(--text-xs)] font-[weight:var(--font-weight-semibold)]
|
|
${o.bg} w-fit
|
|
`,style:{color:o.color},children:[e.jsx(f,{size:12}),o.label]}),e.jsxs("span",{className:`
|
|
inline-flex px-2 py-0.5 rounded text-[length:var(--text-xs)]
|
|
${m.bg} ${m.color} w-fit
|
|
`,children:[m.label," Priority"]})]}),e.jsxs("div",{className:"col-span-2 flex items-center gap-2",children:[e.jsx(c,{content:"Review application",children:e.jsx(a,{variant:"primary",size:"sm",onClick:x=>{x.stopPropagation(),alert(`Review ${t.id}`)},children:"Review"})}),e.jsx(c,{content:"View details",children:e.jsx(a,{variant:"ghost",size:"sm",onClick:x=>{x.stopPropagation(),alert(`View details for ${t.id}`)},children:e.jsx(h,{size:16})})})]})]},t.id)})]}),d.length===0&&e.jsxs("div",{className:"bg-card rounded-xl border border-border p-12 text-center",children:[e.jsx(z,{size:64,color:"var(--muted-foreground)",className:"mx-auto mb-4 opacity-50"}),e.jsx("h4",{className:"mb-2 text-muted-foreground",children:"No applications found"}),e.jsx("p",{className:"text-[length:var(--text-sm)] text-muted-foreground",children:"Try adjusting your filters or check back later"})]})]}),e.jsx("section",{className:"bg-gradient-to-r from-brand-navy/5 to-brand-blue-strong/5 rounded-xl p-6 border border-border",children:e.jsxs("div",{className:"flex items-start gap-4",children:[e.jsx(P,{size:40,color:"var(--brand-blue-strong)"}),e.jsxs("div",{className:"flex-1",children:[e.jsx("h5",{className:"mb-2",children:"Application Review Guidelines"}),e.jsx("p",{className:"text-[length:var(--text-sm)] text-muted-foreground mb-3",children:"All applications are reviewed according to LUSPA standards and national planning regulations. Sankofa reminds us to learn from past decisions to improve future planning."}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(a,{variant:"ghost",size:"sm",symbolName:"nyansapo",children:"View Guidelines"}),e.jsx(a,{variant:"ghost",size:"sm",symbolName:"nkonsonkonson",children:"Contact Support"})]})]})]})})]})]})};export{q as LUSPADashboard};
|