PageSourceSearch

https://capjournal.org/_next/static/chunks/pages/admin/dashboard-57a98b3d1ba1673c.js

js capjournal.org collected 2026-10-02 03:30:53 UTC 3,837 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6036],{74505:(e,t,s)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/dashboard",function(){return s(33282)}])},33282:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>w});var l=s(74848),a=s(96540),n=s(37218),r=s(91106),i=s.n(r);function c(){let[e,t]=(0,a.useState)(null),[s,r]=(0,a.useState)(!0),[c,d]=(0,a.useState)(null);return((0,a.useEffect)(()=>{(async()=>{try{let e=await fetch("".concat(n.A,"/api/v1/articles/status_counts"));if(!e.ok)throw Error("Error al obtener datos");let s=await e.json();t(s)}catch(e){console.error(e)}finally{r(!1)}})()},[]),s)?(0,l.jsx)("p",{className:"text-gray-600",children:"login..."}):c?(0,l.jsx)("p",{className:"text-red-500",children:c}):(0,l.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-4",children:[(0,l.jsxs)(i(),{href:"/admin/articles?status=submitted",className:"p-6 bg-purple-100 shadow rounded-xl text-center",children:[(0,l.jsx)("h3",{className:"text-lg font-semibold text-purple-700",children:"Submitted"}),(0,l.jsx)("p",{className:"text-3xl font-bold text-purple-700 ",children:null==e?void 0:e.submitted})]}),(0,l.jsxs)(i(),{href:"/admin/articles?status=on_review",className:"p-6 bg-orange-100 shadow rounded-xl text-center",children:[(0,l.jsx)("h3",{className:"text-lg font-semibold text-orange-700",children:"On Review"}),(0,l.jsx)("p",{className:"text-3xl font-bold text-orange-700",children:null==e?void 0:e.on_review})]}),(0,l.jsxs)(i(),{href:"/admin/articles?status=approved",className:"p-6 bg-blue-100 shadow rounded-xl text-center",children:[(0,l.jsx)("h3",{className:"text-lg font-semibold text-blue-700",children:"Approved"}),(0,l.jsx)("p",{className:"text-3xl font-bold text-blue-700",children:null==e?void 0:e.approved})]}),(0,l.jsxs)(i(),{href:"/admin/articles?status=published",className:"p-6 bg-green-100 shadow rounded-xl text-center",children:[(0,l.jsx)("h3",{className:"text-lg font-semibold text-green-700",children:"Published"}),(0,l.jsx)("p",{className:"text-3xl font-bold text-green-700",children:null==e?void 0:e.published})]})]})}var d=s(15348),o=s(67382),h=s(37323),x=s(91672),u=s(33087),p=s(53550),m=s(95773),f=s(54170);let b={Announcement:"#F59F22","Best Practices":"#FFCB24","Case Study":"#2EB1AD",Column:"#5C40C8","Explained in 60 Seconds":"#F56B22",Innovations:"#FFD324",Interview:"#1FA5D6","Letters to the Editor":"#7C38C8",News:"#E7443E",Opinion:"#30C658","Research & Applications":"#1D93F6",Resources:"#BF2FC8",Reviews:"#FF8F1E"};function j(){let[e,t]=(0,a.useState)([]),[s,r]=(0,a.useState)(!0);return((0,a.useEffect)(()=>{(async()=>{try{var e;let s=await fetch("".concat(n.A,"/api/v1/articles/published_content_types"));if(!s.ok)throw Error("Failed to fetch data");let l=await s.json(),a=null===(e=Object)||void 0===e?void 0:e.entries(l).map(e=>{let[t,s]=e;return{content_type:t,count:Number(s)}}).sort((e,t)=>e.content_type.localeCompare(t.content_type));t(a)}catch(e){console.error("Failed to fetch data:",e)}finally{r(!1)}})()},[]),s)?(0,l.jsx)("p",{children:"Loading..."}):(0,l.jsxs)("div",{className:"w-full h-96 bg-white rounded-xl shadow p-4 pb-8",children:[(0,l.jsx)("h2",{className:"text-xl font-semibold mb-4",children:"Published articles by content type"}),(0,l.jsx)(d.u,{width:"100%",height:"100%",children:(0,l.jsxs)(o.E,{data:e,children:[(0,l.jsx)(h.d,{strokeDasharray:"3 3"}),(0,l.jsx)(x.W,{dataKey:"content_type",tick:{fontSize:12}}),(0,l.jsx)(u.h,{allowDecimals:!1}),(0,l.jsx)(p.m,{}),(0,l.jsx)(m.yP,{dataKey:"count",fill:"#8884d8",children:e.map((e,t)=>(0,l.jsx)(f.f,{fill:b[e.content_type]||"#8884d8"},"cell-".concat(t)))})]})})]})}function w(){return(0,l.jsxs)("div",{className:"p-4",children:[(0,l.jsx)(c,{}),(0,l.jsx)("div",{className:"h-8"}),(0,l.jsx)(j,{})]})}w.isAdmin=!0}},e=>{var t=t=>e(e.s=t);e.O(0,[620,636,6593,8792],()=>t(74505)),_N_E=e.O()}]);

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.