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.quebec/public_html/_next/static/chunks/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/gositeme/domains/lavocat.quebec/public_html/_next/static/chunks/6968-35b5fdf63b185d7b.js
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6968],{65104:(e,s,a)=>{a.d(s,{A:()=>r});let r=(0,a(11713).A)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]])},70641:(e,s,a)=>{a.d(s,{A:()=>r});let r=(0,a(11713).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"}]])},86968:(e,s,a)=>{a.d(s,{A:()=>p});var r=a(37876),t=a(14232),l=a(10553),i=a(48230),c=a.n(i),n=a(65104),d=a(79516),o=a(65390),x=a(99652),u=a(33654),m=a(72671),h=a(42341),g=a(70641);let p=e=>{var s,a,i;let{title:p="Cases",subtitle:y="Manage your cases",showCreateButton:j=!1,createButtonText:v="Create Case",createButtonHref:f="/admin/cases/new",role:b,userId:N,className:w=""}=e,{data:A}=(0,l.useSession)(),[C,L]=(0,t.useState)([]),[E,D]=(0,t.useState)(!0),[S,k]=(0,t.useState)(""),[I,M]=(0,t.useState)("all"),R=(null==A||null==(s=A.user)?void 0:s.role)==="LAWYER",_=(null==A||null==(a=A.user)?void 0:a.isVerifiedLawyer)||(null==A||null==(i=A.user)?void 0:i.verificationStatus)==="VERIFIED_BARREAU";(0,t.useEffect)(()=>{Y()},[b,N]);let Y=async()=>{try{D(!0);let e="/api/cases";"LAWYER"===b&&N?e="/api/cases?role=lawyer&userId=".concat(N):"CLIENT"===b&&N?e="/api/cases?role=client&userId=".concat(N):("ADMIN"===b||"SUPERADMIN"===b)&&(e="/api/cases?role=admin");let s=await fetch(e);if(s.ok){let e=await s.json();L(e.cases||e||[])}}catch(e){console.error("Error fetching cases:",e)}finally{D(!1)}},V=C.filter(e=>{var s,a;let r=e.title.toLowerCase().includes(S.toLowerCase())||(null==(s=e.description)?void 0:s.toLowerCase().includes(S.toLowerCase()))||(null==(a=e.jurisdiction)?void 0:a.toLowerCase().includes(S.toLowerCase())),t="all"===I||e.status===I;return r&&t}),B=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"}},P=e=>{switch(null==e?void 0: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 E?(0,r.jsx)("div",{className:"bg-white rounded-lg shadow-sm border ".concat(w),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 ".concat(w),children:[R&&!_&&(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:p}),(0,r.jsx)("p",{className:"text-gray-600 mt-1",children:y})]}),j&&(!R||_)&&(0,r.jsxs)(c(),{href:f,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)(n.A,{className:"h-4 w-4 mr-2"}),v]}),j&&R&&!_&&(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)(n.A,{className:"h-4 w-4 mr-2"}),v]})]})}),(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)(d.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:S,onChange:e=>k(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:I,onChange:e=>M(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===V.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:S||"all"!==I?"Try adjusting your search or filters":"Get started by creating your first case"})]}):V.map(e=>{var s,a;return(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 ".concat(B(e.status)),children:e.status}),e.priority&&(0,r.jsx)("span",{className:"px-2 py-1 text-xs font-medium rounded-full ".concat(P(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)(u.A,{className:"h-4 w-4"}),(0,r.jsxs)("span",{children:["Created ",new Date(e.createdAt).toLocaleDateString()]})]}),(null==(s=e.leadLawyer)?void 0:s.name)&&(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:["Lead: ",e.leadLawyer.name]})]}),(null==(a=e._count)?void 0:a.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/".concat(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"===b||"SUPERADMIN"===b||"LAWYER"===b&&e.leadLawyerId===N||"CLIENT"===b&&e.createdBy===N)&&(0,r.jsxs)(c(),{href:"/admin/cases/".concat(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)})})]})}},99652:(e,s,a)=>{a.d(s,{A:()=>r});let r=(0,a(11713).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"}]])}}]);

CasperSecurity Mini