![]() 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/static/chunks/pages/ |
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6309],{2482:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>R});var s=a(37876),l=a(14232),r=a(89099),n=a(10553),o=a(18847),i=a.n(o),d=a(34358),c=a(80252),u=a(26320),m=a(84758),x=a(22333),p=a(69064),h=a(84697),g=a(97566),b=a(50704),v=a(87965),j=a(94768),y=a(72287),f=a(14312);a(9665);let N=[{value:"24h",label:"Last 24h"},{value:"7d",label:"Last 7 days"},{value:"30d",label:"Last 30 days"},{value:"90d",label:"Last 90 days"},{value:"custom",label:"Custom Range"}],w=[{value:"all",label:"All Users"},{value:"admin",label:"Admin"},{value:"lawyer",label:"Lawyer"},{value:"client",label:"Client"},{value:"judge",label:"Judge"},{value:"jurist",label:"Jurist"},{value:"mediator",label:"Mediator"},{value:"business",label:"Business"},{value:"guest",label:"Guest"}],S=[{value:"all",label:"All Devices"},{value:"desktop",label:"Desktop"},{value:"mobile",label:"Mobile"},{value:"tablet",label:"Tablet"}],D=[{value:"all",label:"All Types"},{value:"users",label:"Users"},{value:"cases",label:"Cases"},{value:"documents",label:"Documents"},{value:"businesses",label:"Businesses"}],A=[{value:"all",label:"All Regions"},{value:"quebec",label:"Quebec"},{value:"ontario",label:"Ontario"},{value:"british_columbia",label:"British Columbia"},{value:"alberta",label:"Alberta"},{value:"federal",label:"Federal"},{value:"international",label:"International"}];i()(()=>Promise.all([a.e(9625),a.e(8435),a.e(6045),a.e(3075),a.e(7499),a.e(3682),a.e(100),a.e(9899)]).then(a.bind(a,50100)),{loadableGenerated:{webpack:()=>[50100]},ssr:!1});let C=i()(()=>Promise.all([a.e(8435),a.e(6045),a.e(6214),a.e(6756),a.e(3180)]).then(a.bind(a,10799)),{loadableGenerated:{webpack:()=>[10799]},ssr:!1}),E={en:{dashboard:"Admin Dashboard",manage:"Manage class action applications here.",stats:{total:"Total Applications",pending:"Pending",approved:"Approved",rejected:"Rejected"},manageUsers:"Manage Users",newApplication:"Create New Application",noApplications:"No applications found.",searchPlaceholder:"Search by name or email...",allStatuses:"All Statuses",status:{all:"All Statuses",pending:"Pending",approved:"Approved",rejected:"Rejected"},bulk:{approve:"Approve",reject:"Reject",delete:"Delete"},table:{date:"Date",name:"Name",detainee:"Detainee",status:"Status",actions:"Actions"},confirmDelete:"Are you sure you want to delete this application?",errorDelete:"Error deleting application",errorLoad:"Error loading applications",errorRefresh:"Error refreshing registrations",document:{add:"Add Document",uploading:"Uploading...",uploadError:"Error uploading document",delete:"Delete Document",deleteConfirm:"Are you sure you want to delete this document?",deleteError:"Error deleting document",documents:"Documents"},modal:{newApplication:"New Application",close:"Close"},fileTooLarge:"File is too large (max 100MB)",unsupportedFile:"Unsupported file type",approve:"Approve",reject:"Reject",delete:"Delete",actions:"Actions",loading:"Loading...",restore:{title:"Restore Backup",description:"Upload a backup file to restore the system to a previous state.",button:"Restore Backup",upload:"Upload Backup File",success:"Restore completed successfully",error:"Restore failed",close:"Close",loading:"Restoring..."}},fr:{dashboard:"Tableau de Bord Administrateur",manage:"G\xe9rez les demandes d'action collective ici.",stats:{total:"Total des demandes",pending:"En attente",approved:"Approuv\xe9es",rejected:"Rejet\xe9es"},manageUsers:"G\xe9rer les utilisateurs",newApplication:"Cr\xe9er une nouvelle demande",noApplications:"Aucune demande trouv\xe9e.",searchPlaceholder:"Rechercher par nom ou email...",allStatuses:"Tous les statuts",status:{all:"Tous les statuts",pending:"En attente",approved:"Approuv\xe9",rejected:"Rejet\xe9"},bulk:{approve:"Approuver",reject:"Rejeter",delete:"Supprimer"},table:{date:"Date",name:"Nom",detainee:"D\xe9tenu",status:"Statut",actions:"Actions"},confirmDelete:"\xcates-vous s\xfbr de vouloir supprimer cette demande ?",errorDelete:"Erreur lors de la suppression de la demande",errorLoad:"Erreur lors du chargement des demandes",errorRefresh:"Erreur lors du rafra\xeechissement des demandes",document:{add:"Ajouter un document",uploading:"T\xe9l\xe9chargement...",uploadError:"Erreur lors du t\xe9l\xe9chargement du document",delete:"Supprimer le document",deleteConfirm:"\xcates-vous s\xfbr de vouloir supprimer ce document ?",deleteError:"Erreur lors de la suppression du document",documents:"Documents"},modal:{newApplication:"Nouvelle demande",close:"Fermer"},fileTooLarge:"Le fichier est trop volumineux (max 100MB)",unsupportedFile:"Type de fichier non support\xe9",approve:"Approuver",reject:"Rejeter",delete:"Supprimer",actions:"Actions",loading:"Chargement...",restore:{title:"Restaurer la Sauvegarde",description:"T\xe9l\xe9chargez un fichier de sauvegarde pour restaurer le syst\xe8me \xe0 un \xe9tat pr\xe9c\xe9dent.",button:"Restaurer la Sauvegarde",upload:"T\xe9l\xe9charger le Fichier de Sauvegarde",success:"Restauration termin\xe9e avec succ\xe8s",error:"Restauration \xe9chou\xe9e",close:"Fermer",loading:"Restauration..."}}};function T(e,t,a){let s=[t.join(",")];for(let a of e)s.push(t.map(e=>{var t;return JSON.stringify(null!=(t=a[e])?t:"")}).join(","));let l=new Blob([s.join("\n")],{type:"text/csv"}),r=window.URL.createObjectURL(l),n=document.createElement("a");n.href=r,n.download=a,n.click(),window.URL.revokeObjectURL(r)}function k(e,t,a,s){let l=new f.Ay;l.text(e,14,16),l.autoTable({head:[a],body:t.map(e=>a.map(t=>{var a;return null!=(a=e[t])?a:""})),startY:22,styles:{fontSize:9},headStyles:{fillColor:[99,102,241]}}),l.save(s)}function R(){let{data:e,status:t}=(0,n.useSession)(),a=(0,r.useRouter)(),{locale:o}=a,[i,f]=(0,l.useState)([]),[R,L]=(0,l.useState)(!0),[U,_]=(0,l.useState)(""),[F,M]=(0,l.useState)(""),[P,q]=(0,l.useState)("ALL"),[z,B]=(0,l.useState)([]),[Q,W]=(0,l.useState)(!1),[O,G]=(0,l.useState)({total:0,pending:0,approved:0,rejected:0}),[K,I]=(0,l.useState)(!1),[J,V]=(0,l.useState)(null),[X,Y]=(0,l.useState)(null),[Z,H]=(0,l.useState)(!1),[$,ee]=(0,l.useState)(""),[et,ea]=(0,l.useState)(null),[es,el]=(0,l.useState)(!1),[er,en]=(0,l.useState)(null),[eo,ei]=(0,l.useState)(!1),[ed,ec]=(0,l.useState)(null),[eu,em]=(0,l.useState)(!1),[ex,ep]=(0,l.useState)(null),[eh,eg]=(0,l.useState)({open:!1,registrationId:null});E[o]||E.en;let[eb,ev]=(0,l.useState)(!1),[ej,ey]=(0,l.useState)(null),[ef,eN]=(0,l.useState)(!0),[ew,eS]=(0,l.useState)(""),[eD,eA]=(0,l.useState)("7d"),[eC,eE]=(0,l.useState)("all"),[eT,ek]=(0,l.useState)(""),[eR,eL]=(0,l.useState)(""),[eU,e_]=(0,l.useState)("all"),[eF,eM]=(0,l.useState)("all"),[eP,eq]=(0,l.useState)("all"),[ez,eB]=(0,l.useState)("all");return((0,l.useEffect)(()=>{let e=()=>{ev(window.innerWidth<768)};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]),(0,l.useEffect)(()=>{if("loading"!==t){if(!e)return void a.push("/auth/login");if(!(0,d.Mu)(e)){console.log("User role:",e.user.role,"redirecting to user dashboard"),a.push("/user/dashboard");return}}},[e,t,a]),(0,l.useEffect)(()=>{(async()=>{var a;if(console.log("Admin Dashboard - Status:",t),console.log("Admin Dashboard - Session:",e),console.log("Admin Dashboard - User Role:",null==e||null==(a=e.user)?void 0:a.role),"authenticated"!==t||!(0,d.Mu)(e))return console.log("Admin Dashboard - Not authenticated or not admin, returning");try{console.log("Admin Dashboard - Fetching registrations...");let e=await fetch("/api/admin/registrations");if(console.log("Admin Dashboard - Response status:",e.status),!e.ok){let t=await e.json();throw console.log("Admin Dashboard - Error data:",t),Error(t.message||"Failed to fetch registrations")}let t=await e.json();f(t);let a={total:t.length,pending:t.filter(e=>"PENDING"===e.status).length,approved:t.filter(e=>"APPROVED"===e.status).length,rejected:t.filter(e=>"REJECTED"===e.status).length};G(a)}catch(e){_(e.message||"Error loading data"),console.error("Error:",e)}finally{L(!1)}})()},[t,e]),(0,l.useEffect)(()=>{let e=async()=>{eN(!0);try{let e=new URLSearchParams({type:"overview",userType:eC,deviceType:eU,searchType:eF,region:eP,organization:ez});"custom"===eD&&eT&&eR?(e.set("startDate",eT),e.set("endDate",eR)):e.set("period",eD);let t=await fetch("/api/search/analytics?".concat(e));if(!t.ok)throw Error("Failed to fetch search analytics");let a=await t.json();ey(a)}catch(e){eS(e.message||"Error loading analytics")}finally{eN(!1)}};("custom"!==eD||eT&&eR)&&e()},[eD,eC,eU,eF,eP,ez,eT,eR]),i.filter(e=>{let t=e.firstName.toLowerCase().includes(F.toLowerCase())||e.lastName.toLowerCase().includes(F.toLowerCase())||e.email.toLowerCase().includes(F.toLowerCase()),a="ALL"===P||e.status===P;return t&&a}),"loading"===t||R)?(0,s.jsx)(C,{children:(0,s.jsx)("div",{className:"flex justify-center items-center ".concat(eb?"min-h-64":"min-h-96"),children:(0,s.jsxs)("div",{className:"text-center",children:[(0,s.jsx)("div",{className:"animate-spin rounded-full border-4 border-blue-500 border-t-transparent ".concat(eb?"w-12 h-12":"w-16 h-16"," mx-auto mb-4")}),(0,s.jsx)("p",{className:"text-gray-600 ".concat(eb?"text-sm":""),children:"Loading admin panel..."})]})})}):e&&(0,d.Mu)(e)?(0,s.jsx)(C,{children:(0,s.jsxs)("div",{className:"mx-auto ".concat(eb?"px-2 py-4 max-w-full":"max-w-6xl px-4 py-8"),children:[(0,s.jsxs)("div",{className:"text-center mb-8 bg-gradient-to-r from-blue-600 to-purple-600 text-white rounded-xl shadow-xl ".concat(eb?"p-6":"p-8"),children:[(0,s.jsx)("h1",{className:"font-bold mb-2 ".concat(eb?"text-2xl":"text-4xl"),children:"Admin Panel"}),(0,s.jsxs)("p",{className:"".concat(eb?"text-sm":"text-lg"),children:["Welcome back, ",e.user.name,"! Manage the multi-case legal platform from here."]})]}),(0,s.jsxs)("div",{className:"grid gap-4 mb-8 ".concat(eb?"grid-cols-2":"grid-cols-2 md:grid-cols-4"),children:[(0,s.jsxs)("div",{className:"bg-white rounded-lg shadow-md border-l-4 border-blue-500 ".concat(eb?"p-4":"p-6"),children:[(0,s.jsx)("div",{className:"text-blue-600 mb-2 ".concat(eb?"text-2xl":"text-3xl"),children:"\uD83D\uDC65"}),(0,s.jsx)("div",{className:"font-bold text-gray-800 ".concat(eb?"text-lg":"text-2xl"),children:"Users"}),(0,s.jsx)("div",{className:"text-gray-600 ".concat(eb?"text-xs":"text-sm"),children:"Total registered"})]}),(0,s.jsxs)("div",{className:"bg-white rounded-lg shadow-md border-l-4 border-green-500 ".concat(eb?"p-4":"p-6"),children:[(0,s.jsx)("div",{className:"text-green-600 mb-2 ".concat(eb?"text-2xl":"text-3xl"),children:"\uD83D\uDCCB"}),(0,s.jsx)("div",{className:"font-bold text-gray-800 ".concat(eb?"text-lg":"text-2xl"),children:"Apps"}),(0,s.jsx)("div",{className:"text-gray-600 ".concat(eb?"text-xs":"text-sm"),children:"Applications"})]}),(0,s.jsxs)("div",{className:"bg-white rounded-lg shadow-md border-l-4 border-purple-500 ".concat(eb?"p-4":"p-6"),children:[(0,s.jsx)("div",{className:"text-purple-600 mb-2 ".concat(eb?"text-2xl":"text-3xl"),children:"\uD83D\uDCDD"}),(0,s.jsx)("div",{className:"font-bold text-gray-800 ".concat(eb?"text-lg":"text-2xl"),children:"Regs"}),(0,s.jsx)("div",{className:"text-gray-600 ".concat(eb?"text-xs":"text-sm"),children:"Registrations"})]}),(0,s.jsxs)("div",{className:"bg-white rounded-lg shadow-md border-l-4 border-yellow-500 ".concat(eb?"p-4":"p-6"),children:[(0,s.jsx)("div",{className:"text-yellow-600 mb-2 ".concat(eb?"text-2xl":"text-3xl"),children:"\uD83D\uDC51"}),(0,s.jsx)("div",{className:"font-bold text-gray-800 ".concat(eb?"text-lg":"text-2xl"),children:"Admins"}),(0,s.jsx)("div",{className:"text-gray-600 ".concat(eb?"text-xs":"text-sm"),children:"Admin users"})]})]}),(0,s.jsxs)("div",{className:"mb-8 bg-white rounded-xl shadow-xl border border-gray-200 ".concat(eb?"p-6":"p-8"),children:[(0,s.jsx)("h2",{className:"font-bold text-gray-800 mb-4 ".concat(eb?"text-xl":"text-2xl"),children:"Search Analytics"}),(0,s.jsxs)("div",{className:"mb-4 flex flex-wrap gap-4 items-center",children:[(0,s.jsxs)("label",{className:"text-sm font-medium text-gray-700",children:["Date Range:",(0,s.jsx)("select",{className:"ml-2 px-2 py-1 border rounded",value:eD,onChange:e=>eA(e.target.value),children:N.map(e=>(0,s.jsx)("option",{value:e.value,children:e.label},e.value))})]}),"custom"===eD&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("label",{className:"text-sm font-medium text-gray-700",children:["From:",(0,s.jsx)("input",{type:"date",className:"ml-2 px-2 py-1 border rounded",value:eT,onChange:e=>ek(e.target.value),max:eR||void 0})]}),(0,s.jsxs)("label",{className:"text-sm font-medium text-gray-700",children:["To:",(0,s.jsx)("input",{type:"date",className:"ml-2 px-2 py-1 border rounded",value:eR,onChange:e=>eL(e.target.value),min:eT||void 0})]})]}),(0,s.jsxs)("label",{className:"text-sm font-medium text-gray-700",children:["User Type:",(0,s.jsx)("select",{className:"ml-2 px-2 py-1 border rounded",value:eC,onChange:e=>eE(e.target.value),children:w.map(e=>(0,s.jsx)("option",{value:e.value,children:e.label},e.value))})]}),(0,s.jsxs)("label",{className:"text-sm font-medium text-gray-700",children:["Device:",(0,s.jsx)("select",{className:"ml-2 px-2 py-1 border rounded",value:eU,onChange:e=>e_(e.target.value),children:S.map(e=>(0,s.jsx)("option",{value:e.value,children:e.label},e.value))})]}),(0,s.jsxs)("label",{className:"text-sm font-medium text-gray-700",children:["Search Type:",(0,s.jsx)("select",{className:"ml-2 px-2 py-1 border rounded",value:eF,onChange:e=>eM(e.target.value),children:D.map(e=>(0,s.jsx)("option",{value:e.value,children:e.label},e.value))})]}),(0,s.jsxs)("label",{className:"text-sm font-medium text-gray-700",children:["Region:",(0,s.jsx)("select",{className:"ml-2 px-2 py-1 border rounded",value:eP,onChange:e=>eq(e.target.value),children:A.map(e=>(0,s.jsx)("option",{value:e.value,children:e.label},e.value))})]}),(0,s.jsxs)("label",{className:"text-sm font-medium text-gray-700",children:["Organization:",(0,s.jsx)("input",{type:"text",className:"ml-2 px-2 py-1 border rounded",placeholder:"All organizations",value:"all"===ez?"":ez,onChange:e=>eB(e.target.value||"all")})]})]}),(0,s.jsxs)("div",{className:"mb-4 flex flex-wrap gap-2",children:[(0,s.jsx)("button",{className:"bg-blue-600 text-white px-3 py-1 rounded hover:bg-blue-700 text-xs font-semibold",onClick:()=>ej&&T(ej.searchTrends,["date","searches","unique_users"],"search_trends.csv"),children:"Export Trends (CSV)"}),(0,s.jsx)("button",{className:"bg-green-600 text-white px-3 py-1 rounded hover:bg-green-700 text-xs font-semibold",onClick:()=>{var e;return ej&&void T(ej.popularQueries,["query","count"],(e="top_queries.csv").endsWith(".csv")?e:e+".csv")},children:"Export Top Queries (Excel)"}),(0,s.jsx)("button",{className:"bg-purple-600 text-white px-3 py-1 rounded hover:bg-purple-700 text-xs font-semibold",onClick:()=>ej&&k("Search Trends",ej.searchTrends,["date","searches","unique_users"],"search_trends.pdf"),children:"Export Trends (PDF)"}),(0,s.jsx)("button",{className:"bg-yellow-600 text-white px-3 py-1 rounded hover:bg-yellow-700 text-xs font-semibold",onClick:()=>ej&&k("Top Queries",ej.popularQueries,["query","count"],"top_queries.pdf"),children:"Export Top Queries (PDF)"})]}),ef?(0,s.jsx)("div",{className:"text-gray-500",children:"Loading search analytics..."}):ew?(0,s.jsx)("div",{className:"text-red-500",children:ew}):ej?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"grid gap-4 mb-6 ".concat(eb?"grid-cols-2":"grid-cols-4"),children:[(0,s.jsxs)("div",{className:"bg-blue-50 rounded-lg p-4 text-center",children:[(0,s.jsx)("div",{className:"text-2xl font-bold text-blue-700",children:ej.totalSearches}),(0,s.jsx)("div",{className:"text-xs text-gray-600 mt-1",children:"Total Searches"})]}),(0,s.jsxs)("div",{className:"bg-green-50 rounded-lg p-4 text-center",children:[(0,s.jsx)("div",{className:"text-2xl font-bold text-green-700",children:ej.uniqueUsers}),(0,s.jsx)("div",{className:"text-xs text-gray-600 mt-1",children:"Unique Users"})]}),(0,s.jsxs)("div",{className:"bg-purple-50 rounded-lg p-4 text-center",children:[(0,s.jsxs)("div",{className:"text-2xl font-bold text-purple-700",children:[ej.averageSearchTime.toFixed(0)," ms"]}),(0,s.jsx)("div",{className:"text-xs text-gray-600 mt-1",children:"Avg. Search Time"})]}),(0,s.jsxs)("div",{className:"bg-yellow-50 rounded-lg p-4 text-center",children:[(0,s.jsxs)("div",{className:"text-2xl font-bold text-yellow-700",children:[ej.clickThroughRate.toFixed(1),"%"]}),(0,s.jsx)("div",{className:"text-xs text-gray-600 mt-1",children:"Click-Through Rate"})]})]}),(0,s.jsxs)("div",{className:"grid gap-8 mb-8 ".concat(eb?"grid-cols-1":"grid-cols-2"),children:[(0,s.jsxs)("div",{className:"bg-gray-50 rounded-lg p-4",children:[(0,s.jsx)("h3",{className:"font-semibold text-gray-700 mb-2",children:"Search Trends (Last 30 Days)"}),(0,s.jsx)(c.u,{width:"100%",height:260,children:(0,s.jsxs)(u.b,{data:ej.searchTrends,margin:{top:10,right:20,left:0,bottom:0},children:[(0,s.jsx)(m.d,{strokeDasharray:"3 3"}),(0,s.jsx)(x.W,{dataKey:"date",tick:{fontSize:12}}),(0,s.jsx)(p.h,{tick:{fontSize:12}}),(0,s.jsx)(h.m,{}),(0,s.jsx)(g.s,{}),(0,s.jsx)(b.N,{type:"monotone",dataKey:"searches",stroke:"#2563eb",name:"Searches",strokeWidth:2}),(0,s.jsx)(b.N,{type:"monotone",dataKey:"unique_users",stroke:"#16a34a",name:"Unique Users",strokeWidth:2})]})})]}),(0,s.jsxs)("div",{className:"bg-gray-50 rounded-lg p-4",children:[(0,s.jsx)("h3",{className:"font-semibold text-gray-700 mb-2",children:"Top Queries"}),(0,s.jsx)(c.u,{width:"100%",height:260,children:(0,s.jsxs)(v.E,{data:ej.popularQueries,layout:"vertical",margin:{top:10,right:20,left:0,bottom:0},children:[(0,s.jsx)(m.d,{strokeDasharray:"3 3"}),(0,s.jsx)(x.W,{type:"number",tick:{fontSize:12},allowDecimals:!1}),(0,s.jsx)(p.h,{dataKey:"query",type:"category",tick:{fontSize:12},width:120}),(0,s.jsx)(h.m,{}),(0,s.jsx)(j.y,{dataKey:"count",fill:"#6366f1",name:"Count",children:(0,s.jsx)(y.Z,{dataKey:"count",position:"right"})})]})})]})]}),(0,s.jsxs)("div",{className:"mb-6",children:[(0,s.jsx)("h3",{className:"font-semibold text-gray-700 mb-2",children:"Top Queries (Table)"}),(0,s.jsx)("div",{className:"overflow-x-auto",children:(0,s.jsxs)("table",{className:"min-w-full text-sm border",children:[(0,s.jsx)("thead",{children:(0,s.jsxs)("tr",{className:"bg-gray-100",children:[(0,s.jsx)("th",{className:"px-3 py-2 text-left",children:"Query"}),(0,s.jsx)("th",{className:"px-3 py-2 text-left",children:"Count"})]})}),(0,s.jsx)("tbody",{children:ej.popularQueries.map((e,t)=>(0,s.jsxs)("tr",{className:t%2==0?"bg-white":"bg-gray-50",children:[(0,s.jsx)("td",{className:"px-3 py-2 font-mono",children:e.query}),(0,s.jsx)("td",{className:"px-3 py-2",children:e.count})]},e.query))})]})})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("h3",{className:"font-semibold text-gray-700 mb-2",children:"Search Trends (Table)"}),(0,s.jsx)("div",{className:"overflow-x-auto",children:(0,s.jsxs)("table",{className:"min-w-full text-xs border",children:[(0,s.jsx)("thead",{children:(0,s.jsxs)("tr",{className:"bg-gray-100",children:[(0,s.jsx)("th",{className:"px-2 py-1 text-left",children:"Date"}),(0,s.jsx)("th",{className:"px-2 py-1 text-left",children:"Searches"}),(0,s.jsx)("th",{className:"px-2 py-1 text-left",children:"Unique Users"})]})}),(0,s.jsx)("tbody",{children:ej.searchTrends.map((e,t)=>(0,s.jsxs)("tr",{className:t%2==0?"bg-white":"bg-gray-50",children:[(0,s.jsx)("td",{className:"px-2 py-1 font-mono",children:e.date}),(0,s.jsx)("td",{className:"px-2 py-1",children:e.searches}),(0,s.jsx)("td",{className:"px-2 py-1",children:e.unique_users})]},e.date))})]})})]})]}):null]}),(0,s.jsx)("div",{className:"grid gap-6 ".concat(eb?"grid-cols-1":"md:grid-cols-2 lg:grid-cols-3"),children:[{title:"Dashboard",description:"View comprehensive admin dashboard with statistics and management tools",href:"/admin/dashboard",icon:"\uD83D\uDCCA",color:"from-blue-500 to-blue-600"},{title:"Case Management",description:"Create and manage legal cases, view applications, and assign lawyers",href:"/admin/case-management",icon:"⚖️",color:"from-blue-600 to-purple-600"},{title:"User Management",description:"Manage user accounts, permissions, and access levels",href:"/admin/users",icon:"\uD83D\uDC65",color:"from-green-500 to-green-600"},{title:"Public Notifications",description:"Manage banners, toasts, and engagement prompts for public visitors",href:"/admin/notifications",icon:"\uD83D\uDCE2",color:"from-red-500 to-red-600"},{title:"Applications",description:"Review and manage legal case applications from clients",href:"/admin/applications",icon:"\uD83D\uDCCB",color:"from-purple-500 to-purple-600"},{title:"Registrations",description:"View and manage user registrations across all cases",href:"/admin/registrations",icon:"\uD83D\uDCDD",color:"from-indigo-500 to-indigo-600"},{title:"System Settings",description:"Configure system settings and options",href:"/admin/options",icon:"⚙️",color:"from-gray-500 to-gray-600"},{title:"Admin Management",description:"Grant or revoke admin privileges to users",href:"/admin/make-admin",icon:"\uD83D\uDC51",color:"from-yellow-500 to-yellow-600"}].map((e,t)=>(0,s.jsxs)("div",{className:"bg-gradient-to-br ".concat(e.color," text-white rounded-xl shadow-xl hover:shadow-2xl transform hover:scale-105 transition-all duration-200 cursor-pointer ").concat(eb?"p-6":"p-8"),onClick:()=>a.push(e.href),children:[(0,s.jsx)("div",{className:"text-center mb-4 ".concat(eb?"text-4xl":"text-5xl"),children:e.icon}),(0,s.jsx)("h2",{className:"font-bold text-center mb-3 ".concat(eb?"text-lg":"text-xl"),children:e.title}),(0,s.jsx)("p",{className:"text-center leading-relaxed opacity-90 ".concat(eb?"text-sm":""),children:e.description}),(0,s.jsx)("div",{className:"text-center mt-4",children:(0,s.jsxs)("div",{className:"inline-block bg-white/20 rounded-lg font-semibold hover:bg-white/30 transition-all duration-200 ".concat(eb?"px-4 py-2 text-sm":"px-6 py-3"),children:["Access ",e.title]})})]},e.href))}),(0,s.jsxs)("div",{className:"mt-8 bg-white rounded-xl shadow-xl border border-gray-200 ".concat(eb?"p-6":"p-8"),children:[(0,s.jsx)("h2",{className:"font-bold text-gray-800 mb-4 ".concat(eb?"text-xl":"text-2xl"),children:"Recent Activity"}),(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsxs)("div",{className:"flex items-center space-x-4 border-l-4 border-indigo-500 ".concat(eb?"pl-3 py-2":"pl-4 py-3"," bg-indigo-50 rounded-r-lg"),children:[(0,s.jsx)("div",{className:"text-indigo-600 ".concat(eb?"text-lg":"text-xl"),children:"⚖️"}),(0,s.jsxs)("div",{className:"flex-1",children:[(0,s.jsx)("div",{className:"font-semibold text-gray-800 ".concat(eb?"text-sm":""),children:"Bordeaux Class Action Case Active"}),(0,s.jsx)("div",{className:"text-gray-600 ".concat(eb?"text-xs":"text-sm"),children:"Case management system operational"})]})]}),(0,s.jsxs)("div",{className:"flex items-center space-x-4 border-l-4 border-blue-500 ".concat(eb?"pl-3 py-2":"pl-4 py-3"," bg-blue-50 rounded-r-lg"),children:[(0,s.jsx)("div",{className:"text-blue-600 ".concat(eb?"text-lg":"text-xl"),children:"\uD83D\uDC65"}),(0,s.jsxs)("div",{className:"flex-1",children:[(0,s.jsx)("div",{className:"font-semibold text-gray-800 ".concat(eb?"text-sm":""),children:"ADW Law Firm Configured"}),(0,s.jsx)("div",{className:"text-gray-600 ".concat(eb?"text-xs":"text-sm"),children:"4 lawyers + Justin Wee (ADMIN) ready"})]})]}),(0,s.jsxs)("div",{className:"flex items-center space-x-4 border-l-4 border-purple-500 ".concat(eb?"pl-3 py-2":"pl-4 py-3"," bg-purple-50 rounded-r-lg"),children:[(0,s.jsx)("div",{className:"text-purple-600 ".concat(eb?"text-lg":"text-xl"),children:"\uD83E\uDD16"}),(0,s.jsxs)("div",{className:"flex-1",children:[(0,s.jsx)("div",{className:"font-semibold text-gray-800 ".concat(eb?"text-sm":""),children:"AI Assignment System Ready"}),(0,s.jsx)("div",{className:"text-gray-600 ".concat(eb?"text-xs":"text-sm"),children:"Smart case matching enabled"})]})]})]})]}),(0,s.jsxs)("div",{className:"mt-8 text-center space-y-4 ".concat(eb?"":"space-y-0 space-x-4 flex flex-wrap justify-center"),children:[(0,s.jsx)("button",{onClick:()=>a.push("/admin/case-management"),className:"bg-indigo-600 text-white rounded-lg font-semibold shadow-lg hover:bg-indigo-700 hover:scale-105 transition-all duration-200 ".concat(eb?"w-full px-6 py-3":"px-8 py-4"),children:"⚖️ Manage Cases"}),(0,s.jsx)("button",{onClick:()=>a.push("/admin/applications"),className:"bg-blue-600 text-white rounded-lg font-semibold shadow-lg hover:bg-blue-700 hover:scale-105 transition-all duration-200 ".concat(eb?"w-full px-6 py-3":"px-8 py-4"),children:"Review Applications"}),(0,s.jsx)("button",{onClick:()=>a.push("/admin/users"),className:"bg-green-600 text-white rounded-lg font-semibold shadow-lg hover:bg-green-700 hover:scale-105 transition-all duration-200 ".concat(eb?"w-full px-6 py-3":"px-8 py-4"),children:"Manage Users"}),(0,s.jsx)("button",{onClick:()=>a.push("/admin/notifications"),className:"bg-red-600 text-white rounded-lg font-semibold shadow-lg hover:bg-red-700 hover:scale-105 transition-all duration-200 ".concat(eb?"w-full px-6 py-3":"px-8 py-4"),children:"\uD83D\uDCE2 Public Notifications"}),(0,s.jsx)("button",{onClick:()=>a.push("/admin/dashboard"),className:"bg-purple-600 text-white rounded-lg font-semibold shadow-lg hover:bg-purple-700 hover:scale-105 transition-all duration-200 ".concat(eb?"w-full px-6 py-3":"px-8 py-4"),children:"View Dashboard"})]})]})}):null}},51565:(e,t,a)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin",function(){return a(2482)}])}},e=>{var t=t=>e(e.s=t);e.O(0,[8513,347,2909,4706,3064,4358,636,6593,8792],()=>t(51565)),_N_E=e.O()}]);