T.ME/BIBIL_0DAY
CasperSecurity


Server : Apache/2
System : Linux server-15-235-50-60 5.15.0-164-generic #174-Ubuntu SMP Fri Nov 14 20:25:16 UTC 2025 x86_64
User : gositeme ( 1004)
PHP Version : 8.2.29
Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Directory :  /home/gositeme/domains/lavocat.ca/private_html/.next/server/chunks/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/gositeme/domains/lavocat.ca/private_html/.next/server/chunks/5273.js
"use strict";exports.id=5273,exports.ids=[5273],exports.modules={41919:(e,s,a)=>{a.d(s,{A:()=>r});let r=(0,a(72386).A)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]])},47864:(e,s,a)=>{a.d(s,{A:()=>r});let r=(0,a(72386).A)("square-pen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]])},57341:(e,s,a)=>{a.d(s,{A:()=>r});let r=(0,a(72386).A)("map-pin",[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]])},95273:(e,s,a)=>{a.d(s,{A:()=>p});var r=a(8732),t=a(82015),l=a(4722),i=a(19918),c=a.n(i),d=a(41919),n=a(35091),o=a(30703),x=a(57341),m=a(5453),u=a(13838),h=a(27290),g=a(47864);let p=({title:e="Cases",subtitle:s="Manage your cases",showCreateButton:a=!1,createButtonText:i="Create Case",createButtonHref:p="/admin/cases/new",role:y,userId:j,className:f=""})=>{let{data:b}=(0,l.useSession)(),[v,N]=(0,t.useState)([]),[w,A]=(0,t.useState)(!0),[C,L]=(0,t.useState)(""),[D,E]=(0,t.useState)("all"),S=b?.user?.role==="LAWYER",I=b?.user?.isVerifiedLawyer||b?.user?.verificationStatus==="VERIFIED_BARREAU";(0,t.useEffect)(()=>{M()},[y,j]);let M=async()=>{try{A(!0);let e="/api/cases";"LAWYER"===y&&j?e=`/api/cases?role=lawyer&userId=${j}`:"CLIENT"===y&&j?e=`/api/cases?role=client&userId=${j}`:("ADMIN"===y||"SUPERADMIN"===y)&&(e="/api/cases?role=admin");let s=await fetch(e);if(s.ok){let e=await s.json();N(e.cases||e||[])}}catch(e){console.error("Error fetching cases:",e)}finally{A(!1)}},R=v.filter(e=>{let s=e.title.toLowerCase().includes(C.toLowerCase())||e.description?.toLowerCase().includes(C.toLowerCase())||e.jurisdiction?.toLowerCase().includes(C.toLowerCase()),a="all"===D||e.status===D;return s&&a}),$=e=>{switch(e.toLowerCase()){case"active":return"bg-green-100 text-green-800";case"pending":return"bg-yellow-100 text-yellow-800";case"closed":default:return"bg-gray-100 text-gray-800";case"draft":return"bg-blue-100 text-blue-800"}},k=e=>{switch(e?.toLowerCase()){case"high":return"bg-red-100 text-red-800";case"medium":return"bg-yellow-100 text-yellow-800";case"low":return"bg-green-100 text-green-800";default:return"bg-gray-100 text-gray-800"}};return w?(0,r.jsx)("div",{className:`bg-white rounded-lg shadow-sm border ${f}`,children:(0,r.jsx)("div",{className:"p-6",children:(0,r.jsxs)("div",{className:"animate-pulse",children:[(0,r.jsx)("div",{className:"h-4 bg-gray-200 rounded w-1/4 mb-4"}),(0,r.jsx)("div",{className:"space-y-3",children:[1,2,3].map(e=>(0,r.jsx)("div",{className:"h-16 bg-gray-200 rounded"},e))})]})})}):(0,r.jsxs)("div",{className:`bg-white rounded-lg shadow-sm border ${f}`,children:[S&&!I&&(0,r.jsxs)("div",{className:"p-4 bg-yellow-100 border-l-4 border-yellow-500 text-yellow-800 rounded-t",children:[(0,r.jsx)("strong",{children:"Account Not Verified:"})," You must complete Barreau verification to create or manage cases. Sensitive actions are disabled until you are verified."]}),(0,r.jsx)("div",{className:"p-6 border-b border-gray-200",children:(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("h1",{className:"text-2xl font-bold text-gray-900",children:e}),(0,r.jsx)("p",{className:"text-gray-600 mt-1",children:s})]}),a&&(!S||I)&&(0,r.jsxs)(c(),{href:p,className:"inline-flex items-center px-4 py-2 bg-blue-600 text-white text-sm font-medium rounded-lg hover:bg-blue-700 transition-colors",children:[(0,r.jsx)(d.A,{className:"h-4 w-4 mr-2"}),i]}),a&&S&&!I&&(0,r.jsxs)("button",{className:"inline-flex items-center px-4 py-2 bg-gray-300 text-gray-500 text-sm font-medium rounded-lg cursor-not-allowed",disabled:!0,title:"You must be a verified lawyer to create a new case.",children:[(0,r.jsx)(d.A,{className:"h-4 w-4 mr-2"}),i]})]})}),(0,r.jsx)("div",{className:"p-6 border-b border-gray-200",children:(0,r.jsxs)("div",{className:"flex flex-col sm:flex-row gap-4",children:[(0,r.jsx)("div",{className:"flex-1",children:(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)(n.A,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-gray-400"}),(0,r.jsx)("input",{type:"text",placeholder:"Search cases...",value:C,onChange:e=>L(e.target.value),className:"w-full pl-10 pr-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500"})]})}),(0,r.jsx)("div",{className:"flex gap-2",children:(0,r.jsxs)("select",{value:D,onChange:e=>E(e.target.value),className:"px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500",children:[(0,r.jsx)("option",{value:"all",children:"All Status"}),(0,r.jsx)("option",{value:"active",children:"Active"}),(0,r.jsx)("option",{value:"pending",children:"Pending"}),(0,r.jsx)("option",{value:"closed",children:"Closed"}),(0,r.jsx)("option",{value:"draft",children:"Draft"})]})})]})}),(0,r.jsx)("div",{className:"divide-y divide-gray-200",children:0===R.length?(0,r.jsxs)("div",{className:"p-6 text-center",children:[(0,r.jsx)(o.A,{className:"h-12 w-12 text-gray-400 mx-auto mb-4"}),(0,r.jsx)("h3",{className:"text-lg font-medium text-gray-900 mb-2",children:"No cases found"}),(0,r.jsx)("p",{className:"text-gray-600",children:C||"all"!==D?"Try adjusting your search or filters":"Get started by creating your first case"})]}):R.map(e=>(0,r.jsx)("div",{className:"p-6 hover:bg-gray-50 transition-colors",children:(0,r.jsxs)("div",{className:"flex items-start justify-between",children:[(0,r.jsxs)("div",{className:"flex-1",children:[(0,r.jsxs)("div",{className:"flex items-center gap-3 mb-2",children:[(0,r.jsx)("h3",{className:"text-lg font-semibold text-gray-900",children:e.title}),(0,r.jsx)("span",{className:`px-2 py-1 text-xs font-medium rounded-full ${$(e.status)}`,children:e.status}),e.priority&&(0,r.jsx)("span",{className:`px-2 py-1 text-xs font-medium rounded-full ${k(e.priority)}`,children:e.priority})]}),e.description&&(0,r.jsx)("p",{className:"text-gray-600 mb-3 line-clamp-2",children:e.description}),(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-4 text-sm text-gray-500",children:[e.jurisdiction&&(0,r.jsxs)("div",{className:"flex items-center gap-1",children:[(0,r.jsx)(x.A,{className:"h-4 w-4"}),(0,r.jsx)("span",{children:e.jurisdiction})]}),e.court&&(0,r.jsxs)("div",{className:"flex items-center gap-1",children:[(0,r.jsx)(o.A,{className:"h-4 w-4"}),(0,r.jsx)("span",{children:e.court})]}),(0,r.jsxs)("div",{className:"flex items-center gap-1",children:[(0,r.jsx)(m.A,{className:"h-4 w-4"}),(0,r.jsxs)("span",{children:["Created ",new Date(e.createdAt).toLocaleDateString()]})]}),e.leadLawyer?.name&&(0,r.jsxs)("div",{className:"flex items-center gap-1",children:[(0,r.jsx)(u.A,{className:"h-4 w-4"}),(0,r.jsxs)("span",{children:["Lead: ",e.leadLawyer.name]})]}),e._count?.registrations&&(0,r.jsx)("div",{className:"flex items-center gap-1",children:(0,r.jsxs)("span",{children:["\uD83D\uDCDD ",e._count.registrations," applications"]})})]})]}),(0,r.jsxs)("div",{className:"flex items-center gap-2 ml-4",children:[(0,r.jsxs)(c(),{href:`/public/cases/${e.id}`,className:"inline-flex items-center px-3 py-1 text-sm text-blue-600 hover:text-blue-800 hover:bg-blue-50 rounded-md transition-colors",children:[(0,r.jsx)(h.A,{className:"h-4 w-4 mr-1"}),"View"]}),("ADMIN"===y||"SUPERADMIN"===y||"LAWYER"===y&&e.leadLawyerId===j||"CLIENT"===y&&e.createdBy===j)&&(0,r.jsxs)(c(),{href:`/admin/cases/${e.id}/edit`,className:"inline-flex items-center px-3 py-1 text-sm text-gray-600 hover:text-gray-800 hover:bg-gray-50 rounded-md transition-colors",children:[(0,r.jsx)(g.A,{className:"h-4 w-4 mr-1"}),"Edit"]})]})]})},e.id))})]})}}};

CasperSecurity Mini