PageSourceSearch

https://www.archr.ai/_next/static/chunks/pages/admin/dashboard/users-fb5df7e780dc2a91.js

js archr.ai collected 2026-10-05 15:28:24 UTC 7,766 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7177],{67707:function(e,n,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/dashboard/users",function(){return s(74691)}])},74691:function(e,n,s){"use strict";s.r(n),s.d(n,{__N_SSP:function(){return w},default:function(){return S}});var a=s(7297),t=s(85893),l=s(83062),r=s(98293),i=s(51904),o=s(76655),d=s(25035),c=s(20841),u=s(67294),m=s(68806),x=s(73359),p=s(65380),h=s(41664),j=s.n(h),f=s(2477),v=s(47207),g=s(23722),N=s(29795);function H(){let e=(0,a.Z)(["\n  query GetPaginatedUsers($page: Int, $limit: Int, $startDate: String, $endDate: String) {\n    paginatedUsers(page: $page, limit: $limit, startDate: $startDate, endDate: $endDate) {\n      users {\n        id\n        name\n        image\n        isRoot\n        role\n        email\n        username\n        projects {\n          id\n          name\n        }\n        organizations {\n          organization {\n            name\n            id\n          }\n        }\n        projectsMaintained {\n          project {\n            name\n            id\n          }\n        }\n        projectsContributed {\n          project {\n            name\n            id\n          }\n        }\n        activeWorkingSession {\n          id\n        }\n        completedHours(startDate: $startDate, endDate: $endDate) {\n          plannedHours\n          actualHours\n        }\n        openHours(startDate: $startDate, endDate: $endDate) {\n          plannedHours\n          actualHours\n        }\n        otherHours(startDate: $startDate, endDate: $endDate) {\n          plannedHours\n          actualHours\n        }\n        totalMaxHours\n      }\n      totalCount\n    }\n  }\n"]);return H=function(){return e},e}let D=(0,m.Ps)(H());var w=!0;function S(e){var n,s,a,m,h;let{session:H}=e,[w,{loading:S,data:b,refetch:y}]=(0,x.t)(D),{startDate:Z,endDate:C,handleDateRangeChange:k}=(0,f.w)(),[F,_]=u.useState(!0),[$,I]=u.useState(null),[P,z]=u.useState(!1),[M,O]=u.useState(1),[U,Y]=u.useState(50),E=(e,n)=>{O(e),Y(n)},q=e=>{I(e),z(!0)},A=async()=>{I(null),z(!1)},L={style:{marginRight:"1.5em"},pageSize:U,current:M,onChange:E,showSizeChanger:!0,total:(null==b?void 0:null===(n=b.paginatedUsers)||void 0===n?void 0:n.totalCount)||0};(0,u.useEffect)(()=>{w({variables:{limit:U,page:M,startDate:Z?null==Z?void 0:Z.toISOString():void 0,endDate:C?null==C?void 0:C.toISOString():void 0}}).then(e=>{})},[M,U,Z,C]);let T=[{title:"Name",dataIndex:"name",key:"name",defaultSortOrder:"descend",sorter(e,n){var s;return null==e?void 0:null===(s=e.name)||void 0===s?void 0:s.localeCompare(null==n?void 0:n.name)},render:(e,n)=>(0,t.jsx)(l.Z,{title:"".concat(null==n?void 0:n.username," (").concat(null==n?void 0:n.email,")"),children:(0,t.jsxs)("span",{className:"flex justify-start items-center gap-2 cursor-pointer",onClick:()=>q(n),children:[(0,t.jsx)("span",{children:(0,t.jsx)(r.C,{src:null==n?void 0:n.image,size:"small",children:e[0]})}),(0,t.jsx)("span",{className:"hover:underline",children:e})]})}),filters:null==b?void 0:null===(s=b.paginatedUsers)||void 0===s?void 0:null===(a=s.users)||void 0===a?void 0:a.map(e=>({text:null==e?void 0:e.name,value:null==e?void 0:e.name})),filterSearch:!0,onFilter(e,n){var s;return null==n?void 0:null===(s=n.name)||void 0===s?void 0:s.toLowerCase().includes(null==e?void 0:e.toLowerCase())}},{title:()=>(0,t.jsx)(l.Z,{title:"Sum of the planned and actual hours of all the completed requirements assigned to the user that were completed between ".concat(Z?Z.format("MM-DD-YYYY"):"project start date"," to ").concat(C?C.format("MM-DD-YYYY"):"now","."),children:(0,t.jsxs)("div",{className:"flex flex-row items-center gap-1",children:[(0,t.jsx)("span",{children:"Completed Hours"}),(0,t.jsx)(d.Z,{size:16,color:"#344054"})]})}),dataIndex:"completedHours",key:"completedHours",render:e=>(0,t.jsxs)("div",{className:"flex flex-col",children:[(0,t.jsxs)("span",{className:"flex gap-2",children:[(0,t.jsx)("p",{className:"font-medium",children:"Planned"}),(0,t.jsx)("span",{children:Number.isFinite(e.plannedHours)?e.plannedHours.toFixed(2):"-"})]}),(0,t.jsxs)("span",{className:"flex gap-2",children:[(0,t.jsx)("p",{className:"font-medium",children:"Actual"}),(0,t.jsx)("span",{children:Number.isFinite(e.actualHours)?e.actualHours.toFixed(2):"-"})]})]}),filterDropdown:()=>(0,t.jsx)(f.Z,{startDate:Z,endDate:C,onChange:k,open:F}),onFilterDropdownOpenChange:e=>_(e),filterIcon:(0,t.jsx)(c.Z,{className:Z&&C&&"text-primary-400"})},{title:()=>(0,t.jsx)(l.Z,{title:"Sum of the planned and actual hours of all the accepted requirements assigned to the user that are of type 'other'",children:(0,t.jsxs)("div",{className:"flex flex-row items-center gap-1",children:[(0,t.jsx)("span",{children:"Other Hours"}),(0,t.jsx)(d.Z,{size:16,color:"#344054"})]})}),dataIndex:"otherHours",key:"otherHours",render:e=>(0,t.jsxs)("div",{className:"flex flex-col",children:[(0,t.jsxs)("span",{className:"flex gap-2",children:[(0,t.jsx)("p",{className:"font-medium",children:"Planned"}),(0,t.jsx)("span",{children:Number.isFinite(e.plannedHours)?e.plannedHours.toFixed(2):"-"})]}),(0,t.jsxs)("span",{className:"flex gap-2",children:[(0,t.jsx)("p",{className:"font-medium",children:"Actual"}),(0,t.jsx)("span",{children:Number.isFinite(e.actualHours)?e.actualHours.toFixed(2):"-"})]})]})},{title:()=>(0,t.jsx)(l.Z,{title:"Sum of the planned and actual hours of all the accepted requirements assigned to the user that have not been completed yet (i.e in stage 'next', 'review', 'working','rejected', 'blocked' ).",children:(0,t.jsxs)("div",{className:"flex flex-row items-center gap-1",children:[(0,t.jsx)("span",{children:"Open Hours"}),(0,t.jsx)(d.Z,{size:16,color:"#344054"})]})}),dataIndex:"openHours",key:"openHours",render:e=>(0,t.jsxs)("div",{className:"flex flex-col",children:[(0,t.jsxs)("span",{className:"flex gap-2",children:[(0,t.jsx)("p",{className:"font-medium",children:"Planned"}),(0,t.jsx)("span",{children:Number.isFinite(e.plannedHours)?e.plannedHours.toFixed(2):"-"})]}),(0,t.jsxs)("span",{className:"flex gap-2",children:[(0,t.jsx)("p",{className:"font-medium",children:"Actual"}),(0,t.jsx)("span",{children:Number.isFinite(e.actualHours)?e.actualHours.toFixed(2):"-"})]})]})},{title:()=>(0,t.jsx)(l.Z,{title:"Sum of weekly availability of the user across all the projects.",children:(0,t.jsxs)("div",{className:"flex flex-row items-center gap-1",children:[(0,t.jsx)("span",{children:"Total max hours"}),(0,t.jsx)(d.Z,{size:16,color:"#344054"})]})}),dataIndex:"totalMaxHours",key:"totalMaxHours",render:e=>(0,t.jsx)("span",{className:"items-center",children:(e||0).toFixed(2)})},{title:"Projects",dataIndex:"projects",key:"projects",render:e=>(0,t.jsx)(t.Fragment,{children:null==e?void 0:e.filter((e,n,s)=>n===s.findIndex(n=>n.id===e.id)).map(e=>(0,t.jsx)(j(),{href:"/projects/".concat(e.id),passHref:!0,className:"hover:underline",target:"_blank",children:(0,t.jsx)(i.Z,{style:{display:"inline-flex",alignItems:"center"},children:(0,t.jsx)("span",{className:"hover:text-primary-500",children:e.name})},e.id)}))})}];return(0,t.jsxs)("div",{children:[S?(0,t.jsx)(p.Z,{}):(0,t.jsx)("div",{className:"border",children:(0,t.jsx)(o.Z,{tableLayout:"fixed",columns:T,dataSource:null!==(h=null==b?void 0:null===(m=b.paginatedUsers)||void 0===m?void 0:m.users)&&void 0!==h?h:[],scroll:{x:!0},pagination:L})}),(0,t.jsx)(v.Z,{title:"".concat((null==$?void 0:$.username)+"'s"," Details"),placement:"right",closable:!0,onClose:A,open:P&&$,children:(0,t.jsxs)("div",{className:"flex flex-col gap-5",children:[(0,t.jsx)(g.Z,{user:$,session:H,handleUserUpdate(){},hideControls:!0}),(0,t.jsx)(N.Z,{user:$,session:H,refetchUsers:y})]})})]})}}},function(e){e.O(0,[1464,9774,2888,179],function(){return e(e.s=67707)}),_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.