PageSourceSearch

https://www.averpoint.com/static/js/4840.cc47f0e0.chunk.js

js averpoint.com collected 2026-10-02 00:17:34 UTC 9,283 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunkaverpoint_react_app=self.webpackChunkaverpoint_react_app||[]).push([[4840],{34840:(e,s,l)=>{l.r(s),l.d(s,{default:()=>C});var a=l(65043),t=l(89391),n=l(97508),i=l(50805),c=l(12689),r=l(55476),o=l(70658),d=l(93248),h=l(70579);function u(e){let{filters:s,setFilters:l,setPage:t,actions:n}=e;const[i,c]=(0,a.useState)([]),[u,m]=(0,a.useState)([]),[x,j]=(0,a.useState)(s.searchQuery||"");(0,a.useEffect)((()=>{!async function(){const e=await n.getSchools(),s=await n.getAdminCourses();c(e.schools||[]),m(s||[])}()}),[]);const v=(0,a.useMemo)((()=>[{label:"All Schools",value:""},...i.map((e=>({label:e.name,value:e._id})))]),[i]),N=(0,a.useMemo)((()=>[{label:"All Courses",value:""},...[...u].sort(((e,s)=>e.name.localeCompare(s.name))).map((e=>({label:e.name,value:e._id})))]),[u]),f=(0,a.useCallback)((0,r.debounce)(500,(e=>{t(1),l((s=>({...s,searchQuery:e})))})),[t,l]);return(0,h.jsx)("div",{className:"daily-checkin-filters",children:(0,h.jsx)("div",{className:"daily-checkin-filter-columns",children:(0,h.jsxs)("div",{className:"d-flex align-items-center",children:[(0,h.jsx)(o.A,{className:"course-dropdown flex-fill",labelName:"School",options:v,value:s.schoolId,onChange:e=>{t(1),l({...s,schoolId:e})}}),(0,h.jsx)(o.A,{className:"course-dropdown flex-fill ml-3",labelName:"Course",options:N,value:s.courseId,onChange:e=>{t(1),l({...s,courseId:e})}}),(0,h.jsx)("div",{className:"flex-fill ml-3",children:(0,h.jsx)(d.A,{labelName:"Search (username / name / email)",name:"search",className:"search-input",value:x,onChange:e=>{j(e.target.value),f(e.target.value)}})})]})})})}var m=l(40378);const x=[{label:"All",value:""},{label:"Within a day",value:"lt1"},{label:"1 to 3 days ago",value:"1to3"},{label:"3 to 7 days ago",value:"3to7"},{label:"7+ days ago",value:"gt7"}];function j(e){let{filters:s,setFilters:l,setPage:t,actions:n}=e;const[i,c]=(0,a.useState)([]),[r,o]=(0,a.useState)([]);(0,a.useEffect)((()=>{!async function(){const e=await n.getDistinctExtensionMeta();c(e.browsers||[]),o(e.devices||[])}()}),[]);const d=(0,a.useMemo)((()=>[{label:"All Browsers",value:""},...[...i].sort(((e,s)=>e.localeCompare(s))).map((e=>({label:e,value:e})))]),[i]),u=(0,a.useMemo)((()=>[{label:"All Devices",value:""},...[...r].sort(((e,s)=>e.localeCompare(s))).map((e=>({label:e,value:e})))]),[r]);return(0,h.jsxs)("tr",{children:[(0,h.jsx)("th",{}),(0,h.jsx)("th",{children:"Name"}),(0,h.jsx)("th",{children:"Email"}),(0,h.jsxs)("th",{className:"text-center",children:["Logged In"," ",(0,h.jsx)(m.A,{options:[{label:"All",value:""},{label:"Yes",value:!0},{label:"No",value:!1}],onChange:e=>l((s=>({...s,isLoggedIn:e}))),value:s.isLoggedIn})]}),(0,h.jsxs)("th",{className:"text-center",children:["Pinned"," ",(0,h.jsx)(m.A,{options:[{label:"All",value:""},{label:"Yes",value:!0},{label:"No",value:!1}],onChange:e=>l((s=>({...s,isPinned:e}))),value:s.isPinned})]}),(0,h.jsxs)("th",{className:"text-center",children:["Last Check-In"," ",(0,h.jsx)(m.A,{options:x,onChange:e=>{if(console.log("atRisk",e),e.find((e=>""===e)))return t(1),void l({...s,atRisk:[]});t(1),l({...s,atRisk:e})},value:s.atRisk,allowSearch:!0,single:!1})]}),(0,h.jsxs)("th",{className:"text-center",children:["Device"," ",(0,h.jsx)(m.A,{options:u,onChange:e=>l((s=>({...s,device:e}))),value:s.device,allowSearch:!0})]}),(0,h.jsxs)("th",{className:"text-center",children:["Browser"," ",(0,h.jsx)(m.A,{options:d,onChange:e=>l((s=>({...s,browser:e}))),value:s.browser,allowSearch:!0})]}),(0,h.jsx)("th",{className:"text-center",children:"Version"})]})}var v=l(89439),N=l(86178),f=l.n(N),g=l(86009);function p(e){let{user:s,actions:l}=e;const[t,n]=(0,a.useState)([]),[i,c]=(0,a.useState)(!1);return(0,a.useEffect)((()=>{(async()=>{try{c(!0);const e=await l.getUserDailyCheckInHistory(s.userId);n(e.checkIns||[])}catch(e){n([])}finally{c(!1)}})()}),[]),(0,h.jsx)("tr",{className:"daily-checkin-history-row",children:(0,h.jsx)("td",{colSpan:9,className:"p-0",children:(0,h.jsxs)("div",{className:"daily-checkin-history-container",children:[(0,h.jsx)("div",{className:"history-title font-weight-600 mb-2",children:"Last 30 Daily Check-Ins"}),i&&(0,h.jsx)("div",{className:"text-center my-4",children:(0,h.jsx)("i",{className:"fa fa-spinner fa-spin fa-2x"})}),!i&&0===t.length&&(0,h.jsx)("div",{className:"text-center my-3",children:"No check-ins found."}),!i&&t.length>0&&(0,h.jsxs)("table",{className:"daily-checkin-history-table",children:[(0,h.jsx)("thead",{children:(0,h.jsxs)("tr",{children:[(0,h.jsx)("th",{children:"Date"}),(0,h.jsx)("th",{className:"text-center",children:"Logged In"}),(0,h.jsx)("th",{className:"text-center",children:"Pinned"}),(0,h.jsx)("th",{className:"text-center",children:"Device"}),(0,h.jsx)("th",{className:"text-center",children:"Browser"}),(0,h.jsx)("th",{className:"text-center",children:"Version"})]})}),(0,h.jsx)("tbody",{children:t.map((e=>(0,h.jsxs)("tr",{children:[(0,h.jsx)("td",{children:f()(e.time).format("MM/DD/YYYY HH:mm")}
1),(0,h.jsx)("td",{className:"text-center",children:(0,g.d3)(e.isLoggedIn)}),(0,h.jsx)("td",{className:"text-center",children:(0,g.d3)(e.isPinned)}),(0,h.jsx)("td",{className:"text-center",children:e.device||"-"}),(0,h.jsx)("td",{className:"text-center",children:e.browser||"-"}),(0,h.jsx)("td",{className:"text-center",children:e.version||"-"})]},e._id)))})]})]})})})}function b(e){var s,l,t;let{user:n,actions:i}=e;const[c,r]=(0,a.useState)(!1),o=n.lastDailyCheckIn,d=null!==(s=n.profile)&&void 0!==s&&s.firstName&&null!==(l=n.profile)&&void 0!==l&&l.lastName?`${n.profile.firstName} ${n.profile.lastName}`:n.username||n.email;(null===(t=n.schools)||void 0===t?void 0:t.length)>0&&n.schools.map((e=>e.displayName)).join(", ");return(0,h.jsxs)(h.Fragment,{children:[(0,h.jsxs)("tr",{className:"cursor-pointer",onClick:()=>r(!c),children:[(0,h.jsx)("td",{children:(0,h.jsx)(v.I,{icon:c?v.Z.CHEVRON_DOWN:v.Z.CHEVRON_RIGHT,className:"mr-2 mt-1 font-size-16"})}),(0,h.jsx)("td",{children:d}),(0,h.jsx)("td",{children:n.email}),(0,h.jsx)("td",{className:"text-center",children:(0,g.d3)(null===o||void 0===o?void 0:o.isLoggedIn)}),(0,h.jsx)("td",{className:"text-center",children:(0,g.d3)(null===o||void 0===o?void 0:o.isPinned)}),(0,h.jsx)("td",{className:"text-center",children:null!==o&&void 0!==o&&o.time?f()(o.time).format("MM/DD/YYYY HH:mm"):"-"}),(0,h.jsx)("td",{className:"text-center",children:(null===o||void 0===o?void 0:o.device)||"-"}),(0,h.jsx)("td",{className:"text-center",children:(null===o||void 0===o?void 0:o.browser)||"-"}),(0,h.jsx)("td",{className:"text-center",children:(null===o||void 0===o?void 0:o.version)||"-"})]}),c?(0,h.jsx)(p,{user:n,actions:i}):null]})}function y(e){let{loading:s,reportData:l,page:a,limit:t,setPage:n,actions:i,filters:c,setFilters:r}=e;return(0,h.jsxs)("div",{className:"daily-checkin-table mt-3",children:[(0,h.jsxs)("table",{children:[(0,h.jsx)("thead",{children:(0,h.jsx)(j,{filters:c,setFilters:r,setPage:n,actions:i})}),(0,h.jsx)("tbody",{children:s?(0,h.jsx)("tr",{children:(0,h.jsx)("td",{colSpan:8,className:"text-center py-4",children:(0,h.jsx)("i",{className:"fa fa-spinner fa-spin"})})}):l&&0!==l.users.length?l.users.map((e=>(0,h.jsx)(b,{user:e,actions:i},e.userId))):(0,h.jsx)("tr",{children:(0,h.jsx)("td",{colSpan:8,className:"text-center py-4",children:"No users found."})})})]}),(()=>{if(!l)return null;const e=Math.ceil(l.total/t);return(0,h.jsxs)("div",{className:"pagination-controls mt-3",children:[(0,h.jsx)("button",{disabled:a<=1,onClick:()=>n(a-1),className:"pagination-btn",children:"Prev"}),(0,h.jsxs)("span",{className:"mx-2",children:["Page ",a," of ",e]}),(0,h.jsx)("button",{disabled:a>=e,onClick:()=>n(a+1),className:"pagination-btn",children:"Next"})]})})()]})}const k=(0,n.Ng)((function(){return{}}),(e=>({actions:(0,i.zH)(c,e)})))((function(e){let{actions:s}=e;const[l,t]=(0,a.useState)({schoolId:{label:"All Schools",value:""},courseId:{label:"All Courses",value:""},atRisk:[],searchQuery:"",browser:"",device:"",isLoggedIn:"",isPinned:""}),[n,i]=(0,a.useState)(1),[c]=(0,a.useState)(25),[r,o]=(0,a.useState)(!1),[d,m]=(0,a.useState)(null),x=(0,a.useRef)(0),j=(0,a.useCallback)((async()=>{try{o(!0);const e=++x.current,a=await s.getDailyCheckInReport({schoolId:l.schoolId.value,courseId:l.courseId.value,searchQuery:l.searchQuery,riskFilter:l.atRisk.filter((e=>e)).map((e=>e)),page:n,limit:c,filters:{browser:l.browser,device:l.device,isLoggedIn:l.isLoggedIn,isPinned:l.isPinned}});e===x.current&&m(a.dailyCheckInReport||null)}catch(e){x.current===x.current&&m(null)}finally{o(!1)}}),[s,l,n,c]);return(0,a.useEffect)((()=>{j()}),[j]),(0,h.jsxs)("div",{className:"daily-checkin",children:[(0,h.jsx)(u,{filters:l,setFilters:t,setPage:i,actions:s}),(0,h.jsx)(y,{loading:r,reportData:d,page:n,limit:c,setPage:i,actions:s,filters:l,setFilters:t})]})}));function C(){return(0,h.jsxs)("div",{className:"container daily-checkin-container mt-4",children:[(0,h.jsxs)("div",{className:"font-weight-600",children:[(0,h.jsx)(t.A,{to:"/analytics",children:"Analytics"})," / Daily Check-In Report"]}),(0,h.jsx)("div",{className:"d-flex align-items-center justify-content-between mt-4",children:(0,h.jsx)("h2",{className:"av-blue font-weight-600 m-0",children:"Daily Check-In Report"})}),(0,h.jsx)(k,{})]})}}}]);
2//# sourceMappingURL=4840.cc47f0e0.chunk.js.map

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.