PageSourceSearch

https://www.klikpdpi.com/assets/Penelitian-CabvbXnD.js

js klikpdpi.com collected 2026-10-02 10:37:18 UTC 5,837 bytes, 1 lines download raw bytes

1import{r as b,u as y,b as f,f as N,j as e,L as j,m as l,S as v,l as w,C as _,U as L,M as C,y as o,t as P,s as S}from"./index-hXw6ftrS.js";import{P as I}from"./PageHeader-CzEXAzzt.js";import{B as k}from"./badge-COjR1-IC.js";import{I as V}from"./input-CGBE-TqA.js";const E=()=>{var m,u,x;const[n,p]=b.useState(""),{t:a}=y();f({title:"Penelitian",description:"Proyek dan kegiatan penelitian ilmiah Perhimpunan Dokter Paru Indonesia (PDPI).",canonicalPath:"/ilmiah/penelitian"});const g=t=>({ongoing:{label:a("penelitian.status_ongoing"),className:"bg-accent/10 text-accent border-accent/20"},recruitment:{label:a("penelitian.status_recruitment"),className:"bg-primary/10 text-primary border-primary/20"},completed:{label:a("penelitian.status_completed"),className:"bg-muted text-muted-foreground border-muted-foreground/20"},paused:{label:a("penelitian.status_paused"),className:"bg-destructive/10 text-destructive border-destructive/20"}})[t]||{label:t,className:"bg-muted text-muted-foreground"},{data:s,isLoading:d}=N({queryKey:["research-public"],queryFn:async()=>{const{data:t,error:r}=await S.from("research_projects").select("*").eq("is_published",!0).order("created_at",{ascending:!1});if(r)throw r;return t}}),c=s==null?void 0:s.filter(t=>{var r,i;return t.title.toLowerCase().includes(n.toLowerCase())||((r=t.principal_investigator)==null?void 0:r.toLowerCase().includes(n.toLowerCase()))||((i=t.category)==null?void 0:i.toLowerCase().includes(n.toLowerCase()))}),h=[{label:a("penelitian.stat_active"),value:(((m=s==null?void 0:s.filter(t=>t.status==="ongoing").length)==null?void 0:m.toString())||"0")+"+"},{label:a("penelitian.stat_centers"),value:((u=s==null?void 0:s.reduce((t,r)=>t+(r.centers_count||0),0))==null?void 0:u.toString())||"0"},{label:a("penelitian.stat_subjects"),value:((x=s==null?void 0:s.reduce((t,r)=>t+(r.participants_count||0),0))==null?void 0:x.toLocaleString())||"0"},{label:a("penelitian.stat_total"),value:((s==null?void 0:s.length)||0).toString()}];return e.jsxs(j,{children:[e.jsx(I,{title:a("penelitian.page_title"),subtitle:a("penelitian.page_subtitle")}),e.jsx("section",{className:"py-16 md:py-24 bg-background",children:e.jsxs("div",{className:"container mx-auto px-4 md:px-6",children:[e.jsxs(l.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},className:"relative max-w-md mx-auto mb-10",children:[e.jsx(v,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),e.jsx(V,{placeholder:a("penelitian.search_placeholder"),className:"pl-10",value:n,onChange:t=>p(t.target.value)})]}),!d&&e.jsx(l.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},className:"grid grid-cols-2 md:grid-cols-4 gap-4 mb-12",children:h.map(t=>e.jsxs("div",{className:"bg-card border border-border rounded-xl p-4 text-center",children:[e.jsx("div",{className:"text-2xl md:text-3xl font-bold text-primary mb-1",children:t.value}),e.jsx("div",{className:"text-sm text-muted-foreground",children:t.label})]},t.label))}),d?e.jsx("div",{className:"flex items-center justify-center py-20",children:e.jsx(w,{className:"w-8 h-8 animate-spin text-primary"})}):c&&c.length>0?e.jsxs("div",{className:"space-y-6",children:[e.jsx("h3",{className:"text-2xl font-serif font-bold text-foreground",children:a("penelitian.list_title")}),c.map((t,r)=>{const i=g(t.status);return e.jsx(l.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{delay:r*.05},className:"bg-card border border-border rounded-xl overflow-hidden",children:e.jsxs("div",{className:"p-6",children:[e.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-4 mb-4",children:[e.jsx(k,{className:i.className,children:i.label}),t.period&&e.jsxs("div",{className:"flex items-center gap-1 text-sm text-muted-foreground",children:[e.jsx(_,{className:"w-4 h-4"}),t.period]})]}),e.jsx("h4",{className:"text-lg font-semibold text-foreground mb-3",children:t.title}),t.description&&e.jsx("p",{className:"text-muted-foreground mb-4",children:t.description}),e.jsxs("div",{className:"grid sm:grid-cols-3 gap-4 mb-4",children:[t.participants_count!=null&&t.participants_count>0&&e.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[e.jsx(L,{className:"w-4 h-4 text-primary"}),e.jsx("span",{className:"text-muted-foreground",children:a("penelitian.participants",{n:t.participants_count.toLocaleStr
1ing()})})]}),t.centers_count!=null&&t.centers_count>0&&e.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[e.jsx(C,{className:"w-4 h-4 text-primary"}),e.jsx("span",{className:"text-muted-foreground",children:a("penelitian.centers",{n:t.centers_count})})]}),t.principal_investigator&&e.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[e.jsx(o,{className:"w-4 h-4 text-primary"}),e.jsxs("span",{className:"text-muted-foreground",children:[a("penelitian.pi_label")," ",t.principal_investigator]})]})]})]})},t.id)})]}):e.jsxs(l.div,{initial:{opacity:0},animate:{opacity:1},className:"text-center py-20",children:[e.jsx(o,{className:"w-16 h-16 text-muted-foreground/30 mx-auto mb-4"}),e.jsx("p",{className:"text-muted-foreground text-lg",children:a("penelitian.empty_title")}),e.jsx("p",{className:"text-muted-foreground/60 text-sm mt-2",children:a("penelitian.empty_desc")})]}),e.jsxs(l.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},className:"mt-12 bg-primary/5 border border-primary/20 rounded-2xl p-8 text-center",children:[e.jsx(o,{className:"w-12 h-12 text-primary mx-auto mb-4"}),e.jsx("h3",{className:"text-xl font-serif font-bold text-foreground mb-2",children:a("penelitian.cta_title")}),e.jsx("p",{className:"text-muted-foreground mb-4 max-w-xl mx-auto",children:a("penelitian.cta_desc")}),e.jsx(P,{children:a("penelitian.cta_btn")})]})]})})]})};export{E 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.