PageSourceSearch

https://thinkproedge.com/_next/static/chunks/pages/admin/class/attendance-report/[csid]-ae534b8baece0d40.js

js thinkproedge.com collected 2026-10-02 01:46:54 UTC 16,784 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[890],{53850:function(e,t,n){"use strict";n.d(t,{W:function(){return d}});var r=n(90063),i=n(55284),a=n(94915),o=n(61918),s=n(84461),c=n(73808),l=n(67294);function u(){return u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u.apply(this,arguments)}var d=(0,r.G)(((e,t)=>{var n=(0,i.Lr)(e),{className:r,centerContent:c}=n,d=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(n,["className","centerContent"]),f=(0,a.m)("Container",e);return l.createElement(o.m$.div,u({ref:t,className:(0,s.cx)("chakra-container",r)},d,{__css:u({},f,c&&{display:"flex",flexDirection:"column",alignItems:"center"})}))}));c.Ts&&(d.displayName="Container")},49444:function(e,t,n){"use strict";n.d(t,{r:function(){return d}});var r=n(90063),i=n(94915),a=n(55284),o=n(61918),s=n(84461),c=n(73808),l=n(67294);function u(){return u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u.apply(this,arguments)}var d=(0,r.G)(((e,t)=>{var n=(0,i.m)("Link",e),r=(0,a.Lr)(e),{className:c,isExternal:d}=r,f=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(r,["className","isExternal"]);return l.createElement(o.m$.a,u({target:d?"_blank":void 0,rel:d?"noopener noreferrer":void 0,ref:t,className:(0,s.cx)("chakra-link",c)},f,{__css:n}))}));c.Ts&&(d.displayName="Link")},99262:function(e,t,n){"use strict";n.d(t,{dy:function(){return _},sc:function(){return w}});var r=n(29676),i=n(61918),a=n(90063),o=n(84461),s=n(73808),c=n(84441),l=n(75926),u=n(67294),d=n(70370);function f(){return f=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},f.apply(this,arguments)}var h={bottom:{motion:{y:"100%"},baseStyle:{maxWidth:"100vw",bottom:0,left:0,right:0}},top:{motion:{y:"-100%"},baseStyle:{maxWidth:"100vw",top:0,left:0,right:0}},left:{motion:{x:"-100%"},baseStyle:{width:"100%",left:0,top:0,bottom:0}},right:{motion:{x:"100%"},baseStyle:{width:"100%",right:0,top:0,bottom:0}}},p={exit:e=>{var t,{motion:n}=null!=(t=h[e])?t:{};return f({},n,{transition:{duration:.15,ease:d.L.easeInOut}})},enter:e=>{var t,{motion:n}=null!=(t=h[e])?t:{},[r]=n?Object.keys(n):["x"];return{[r]:0,transition:{type:"spring",damping:25,stiffness:180}}}},m=u.forwardRef(((e,t)=>{var n,{direction:r="right",style:i,unmountOnExit:a,in:s,className:d}=e,m=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,["direction","style","unmountOnExit","in","className"]),{baseStyle:g}=null!=(n=h[r])?n:{},x=!a||s&&a;return u.createElement(c.M,{custom:r},x&&u.createElement(l.E.div,f({ref:t,initial:"exit",className:(0,o.cx)("chakra-slide",d),animate:s||a?"enter":"exit",exit:"exit",custom:r,variants:p,style:f({position:"fixed"},g,i)},m)))}));s.Ts&&(m.displayName="Slide");var g=n(74691),x=n(51641);function v(){return v=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},v.apply(this,arguments)}function y(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}var[b,j]=(0,g.kr)();function _(e){var t,{isOpen:n,onClose:i,placement:a="right",children:o}=e,s=y(e,["isOpen","onClose","placement","children"]),c=null==(t=(0,r.Fg)().components)?void 0:t.Drawer;return u.createElement(b,{value:{placement:a}},u.createElement(x.u_,v({isOpen:n,onClose:i,styleConfig:c},s),o))}var O=(0,i.m$)(m),w=(0,a.G)(((e,t)=>{var{className:n,children:a}=e,s=y(e,["className","children"]),{getDialogProps:c,getDialogContainerProps:l,isOpen:d}=(0,x.vR)(),f=c(s,t),h=l(),p=(0,o.cx)("chakra-modal__content",n),m=(0,r.yK)(),g=v({display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0},m.dialog),b=v({display:"flex",width:"100vw",height:"100vh",position:"fixed",left:0,top:0},m.dialogContainer),{placement:_}=j();return u.createElement(i.m$.div,v({},h,{className:"chakra-modal__content-container",__css:b}),u.createElement(x.MI,null,u.createElement(O,v({direction:_,in:d,className:p},f,{__css:g}),a)))}));s.Ts&&(w.displayName="DrawerContent")}
1,15267:function(e,t,n){"use strict";n.d(t,{U:function(){return p}});var r=n(22653),i=n(80658),a=n(84461),o=n(73808),s=n(84441),c=n(75926),l=n(67294),u=n(70370);function d(){return d=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},d.apply(this,arguments)}var f=e=>null!=e&&parseInt(e.toString(),10)>0,h={exit:e=>d({},e.animateOpacity&&{opacity:f(e.startingHeight)?1:0},{height:e.startingHeight,transition:{height:{duration:.2,ease:u.L.ease},opacity:{duration:.3,ease:u.L.ease}}}),enter:e=>d({},e.animateOpacity&&{opacity:1},{height:e.endingHeight,transition:{height:{duration:.3,ease:u.L.ease},opacity:{duration:.4,ease:u.L.ease}}})},p=l.forwardRef(((e,t)=>{var{in:n,unmountOnExit:o,animateOpacity:u=!0,startingHeight:p=0,endingHeight:m="auto",style:g,className:x,onAnimationComplete:v}=e,y=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,["in","unmountOnExit","animateOpacity","startingHeight","endingHeight","style","className","onAnimationComplete"]),b=0===p,[j,_]=l.useState(!!n),[O,w]=l.useState((()=>b&&!n&&!f(p)?"none":"block"));(0,r.r)((()=>{w("block"),_(!!n)}),[n]),p>0&&o&&(0,i.ZK)("startingHeight and unmountOnExit are mutually exclusive. You can't use them together");var S={startingHeight:p,endingHeight:m,animateOpacity:u},P=d({ref:t,onAnimationComplete:()=>{!j&&b&&w("none"),null==v||v()},className:(0,a.cx)("chakra-collapse",x)},y,{variants:h,style:d({overflow:"hidden"},g),custom:S});return o?l.createElement(s.M,{initial:!1,custom:S},n&&l.createElement(c.E.div,d({},P,{initial:"exit",animate:"enter",exit:"exit"}))):l.createElement(c.E.div,d({},P,{style:d({},P.style,{display:O}),initial:!1,animate:j?"enter":"exit"}))}));o.Ts&&(p.displayName="Collapse")},34709:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/class/attendance-report/[csid]",function(){return n(57963)}])},7194:function(e,t,n){"use strict";var r=n(85893),i=n(48764),a=n(25543),o=n(3689),s=(0,i.B)({colors:{brand:{primary:"#f15a2d",secondary:"#372d63"}},styles:{global:{}},components:{Button:{variants:{theme:{bg:"#f15a2d",color:"white",border:"2px solid #f15a2d",_hover:{bg:"white",color:"#f15a2d"},_active:{bg:"white",color:"#f15a2d"}}}},Menu:{parts:["menu","item"],baseStyle:{menu:{},item:{fontWeight:"medium",lineHeight:"normal",color:"gray.600",fontSize:"0.95rem",pl:5,py:3}}}}});t.Z=function(e){var t=e.children;return(0,r.jsxs)(a.x,{theme:s,children:[(0,r.jsx)(o.m,{}),t]})}},37597:function(e,t,n){"use strict";var r=n(85893),i=n(74860),a=n(64115),o=n(15267),s=n(49444);t.Z=function(e){var t=e.list,n=e.limit;console.log("list",t);var c=(0,i.q)(),l=c.isOpen,u=c.onToggle,d=t.length;return(0,r.jsxs)(r.Fragment,{children:[t.slice(0,n).map((function(e,t){return(0,r.jsx)(a.x,{children:e},t)})),d>n&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.U,{in:l,animateOpacity:!0,children:t.slice(n).map((function(e,t){return(0,r.jsx)(a.x,{children:e},t)}))}),(0,r.jsx)(s.r,{color:"blue.500",onClick:u,children:l?"Collapse -":"Expand +"})]})]})}},97696:function(e,t,n){"use strict";var r=n(26042),i=n(69396),a=n(85893),o=n(67294),s=n(79521),c=n(48017),l=n(83346),u=n(40980),d=n(64115),f=n(38448),h=n(38104),p=n(85105),m=n(79887),g=n(94096),x=n(87341),v=n(9345),y=n(92362),b=n(84646),j=n(7869),_=n.n(j);t.Z=function(e){var t=e.title,n=e.columnsArray,j=e.dataArray,O=e.customPageSize,w=(0,o.useRef)(null),S=o.useMemo((function(){return j}),[]),P=o.useMemo((function(){return n}),[]),k=(0,s.useTable)({columns:P,data:S,initialState:{pageSize:O||10}},s.useGlobalFilter,s.useSortBy,s.usePagination),E=k.getTableProps,C=k.getTableBodyProps,N=k.headerGroups,Z=k.prepareRow,D=k.rows,H=k.page,T=k.canPreviousPage,M=k.canNextPage,A=(k.pageOptions,k.pageCount,k.gotoPage,k.nextPage),R=k.previousPage,z=k.setPageSize,F=k.state,I=F.pageIndex,L=F.pageSize,Y=k.setGlobalFilter,B=(0,o.useState)(""),G=B[0],W=B[1],$=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,n=(0,o.useState)(e),r=n[0],i=n[1];return(0,o.useEffect)((function(){var n=setTimeout((function(){i(e)}),t);return function(){clearTimeout(n)}}),[e,t]),r}(G,200);(0,o.useEffect)((function(){Y($||void 0)}),[$]);return(0,a.jsxs)(c.xu,{mx:"5",my:"8",children:[(0,a.jsx)(d.x,{fontSize:"xl",children:t}),(0,a.jsxs)(v.r,{mt:"5",templateColumns:"repeat(6, 1fr)",gap:[3,6,6],children:[(0,a.jsx)(v.P,{colSpan:[6,2,1],children:(0,a.jsxs)(f.M,{children:["Show",(0,a.jsx)(h.Ph,{mx:"1",value:L,onChange:function(e){z(Number(e.target.value))},children:[5,10,20,30,40,50].map((function(e){return(0,a.jsx)("option",{value:e,children:e},e)}))}),"entries"]})}),(0,a.jsx)(v.P,{colSpan:[6,2,3],children:(0,a.jsx)(f.M,{children:(0,a.jsx)(p.z,{variant:"theme",onClick:function(){var e=[];D.map((function(t){var r=t.values,i=[];n.map((function(e){0!=e.exportToExcel&&(i[e.Header]=r[e.accessor])})),e.push(i)}));var t=_().utils.book_new(),r=_().utils.json_to_sheet(e);_().utils.book_append_sheet(t,r,["Sheet 1"]),_().writeFile(t,"export.xlsx")},children:"Export to Excel"})})}),(0,a.jsx)(v.P,{colSpan:[6,2,2],children:(0,a.jsxs)(f.M,{children:["Search:",(0,a.jsx)(m.I,{ml:"2",type:"text",onCh
1ange:function(e){return W(e.target.value)}})]})})]}),(0,a.jsx)(c.xu,{my:"3",borderWidth:"1px",borderRadius:"lg",overflow:"auto",children:(0,a.jsxs)(l.iA,(0,i.Z)((0,r.Z)({ref:w},E()),{children:[(0,a.jsx)(l.hr,{children:N.map((function(e){return(0,a.jsx)(l.Tr,(0,i.Z)((0,r.Z)({},e.getHeaderGroupProps()),{children:e.headers.map((function(e){return(0,a.jsxs)(l.Th,(0,i.Z)((0,r.Z)({},e.getHeaderProps(e.getSortByToggleProps())),{isNumeric:e.isNumeric,style:{width:e.width?e.width:"100%"},children:[e.render("Header"),(0,a.jsx)(u.chakra.span,{pl:"4",children:e.isSorted?e.isSortedDesc?(0,a.jsx)(y.A,{"aria-label":"sorted descending"}):(0,a.jsx)(b.$,{"aria-label":"sorted ascending"}):null})]}))}))}))}))}),(0,a.jsx)(l.p3,(0,i.Z)((0,r.Z)({},C()),{children:0==D.length?(0,a.jsx)(l.Tr,{children:(0,a.jsx)(l.Td,{colSpan:n.length,children:(0,a.jsx)(f.M,{children:"No data available"})})}):H.map((function(e,t){return Z(e),(0,a.jsx)(l.Tr,(0,i.Z)((0,r.Z)({},e.getRowProps()),{children:e.cells.map((function(e){return(0,a.jsx)(l.Td,(0,i.Z)((0,r.Z)({},e.getCellProps()),{isNumeric:e.column.isNumeric,children:e.render("Cell")}))}))}))}))}))]}))}),(0,a.jsxs)(g.k,{mt:"3",children:[(0,a.jsxs)(d.x,{children:["Showing ",I*L+1," to"," ",I*L+H.length," of ",D.length," entries"]}),(0,a.jsx)(x.L,{}),(0,a.jsx)(p.z,{mr:"2",onClick:function(){return R()},disabled:!T,children:"Previous"}),(0,a.jsx)(p.z,{onClick:function(){return A()},disabled:!M,children:"Next"})]})]})}},38455:function(e,t,n){"use strict";var r=n(85893),i=n(67294),a=n(9198),o=n.n(a);n(18698);t.Z=function(e){var t=(0,i.useState)(e.selectedDate?new Date(e.selectedDate):new Date),n=t[0],a=t[1],s=e.setDateInParent;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o(),{selected:n,onChange:function(e){a(e),s(e)}}),(0,r.jsx)("style",{children:"\n        .react-datepicker__input-container input {\n          display: block;\n          width: 100%;\n          height: calc(1.5em + .75rem + 2px);\n          padding: .375rem .75rem;\n          font-size: 1rem;\n          font-weight: 400;\n          line-height: 1.5;\n          color: #495057;\n          background-color: #fff;\n          background-clip: padding-box;\n          border: 1px solid #ced4da;\n          border-radius: .25rem;\n          transition: border-color .15s ease-in-out,box-shadow .15s ease-in-out;\n          \n        }\n      "})]})}},57963:function(e,t,n){"use strict";n.r(t),n.d(t,{__N_SSP:function(){return P}});var r=n(4111),i=n(51438),a=n(52951),o=n(14924),s=n(88029),c=n(60460),l=n(85893),u=n(11163),d=n.n(u),f=n(67294),h=n(70978),p=n(53850),m=n(48017),g=n(64115),x=n(38448),v=n(45754),y=n(7194),b=n(64790),j=n(97696),_=n(17289),O=(n(46737),n(30381)),w=n.n(O),S=(n(38455),n(37597),function(e){(0,s.Z)(n,e);var t=(0,c.Z)(n);function n(){var e;return(0,i.Z)(this,n),e=t.apply(this,arguments),(0,o.Z)((0,r.Z)(e),"state",{loggedIn:!1,loading:!1,viewData:!1,classSchedules:[],admissionCodes:[],selectedAids:[],allFaculties:[],chosenFaculty:[],startDate:w()().format("YYYY-MM-DD"),endDate:w()().format("YYYY-MM-DD"),columns:[{Header:"Attendance Date",accessor:"attendance_date"},{Header:"Admission Code",accessor:"admission_code"},{Header:"Student Name",accessor:"student_name"},{Header:"Username",accessor:"student_username"},{Header:"Email ",accessor:"student_email"},{Header:"Phone ",accessor:"student_phone"},{Header:"Attendance Status",accessor:"attendance_status"}]}),(0,o.Z)((0,r.Z)(e),"getData",(function(){e.setState({loading:!0,viewData:!1}),(0,_.sgJ)(e.props.csid).then((function(t){var n=t.data,r=[];n.map((function(e){var t=e.attendance_date,n=e.attendence,i=e.admission_code;console.log(n),n.map((function(e){var n=e.attendence_status,a=e.student,o=a.name,s=a.username,c=a.email,l=a.mobile;r.push({attendance_date:t,admission_code:i.admission_code,student_name:o,student_username:s,student_email:c,student_phone:l,attendance_status:n?"Present":"Absent"})}))})),e.setState({classSchedules:r,loading:!1,viewData:!0})})).catch((function(t){console.log("Error ",t),e.setState({loading:!1})}))})),e}return(0,a.Z)(n,[{key:"componentDidMount",value:function(){if(!(0,h.jl)("admin"))return d().push("/login");this.setState({loggedIn:!0}),this.getData()}},{key:"render",value:function(){return this.state.loggedIn&&(0,l.jsx)(y.Z,{children:(0,l.jsx)(b.Z,{children:(0,l.jsx)(p.W,{bg:"gray.100",minWidth:"full",p:[2,10,10],minHeight:"100vh",children:(0,l.jsxs)(m.xu,{bg:"white",p:"7",border:"1px",borderColor:"gray.200",borderRadius:"5",children:[(0,l.jsx)(g.x,{fontSize:"2xl",children:"Class Attendance Report By Class"}),this.state.loading&&(0,l.jsx)(x.M,{mt:"5",children:(0,l.jsx)(v.$,{})}),this.state.viewData&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(j.Z,{columnsArray:this.state.columns,dataArray:this.state.classSchedules})})]})})})})}}]),n}(f.Component)),P=!0;t.default=S},18685:function(){},20067:function(){},55382:function(){},72095:function(){},72061:function(){},61219:function(){},4111:function(e,t,n){"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,{Z:function(){return r}})},51438:function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,{Z:function(){return r}})},52951:function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function i(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}n.d(t,{Z:function(){return i}})},60460:function(e,t,n){"use strict";function r(e){return r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},r(e)}function i(e){return r(e)}n.d(t,{Z:function(){return s}});var a=n(4111);function o(e,t){return!t||"object"!==((n=t)&&n.constructor===Symbol?"symbol":typeof n)&&"function"!==typeof t?(0,a.Z)(e):t;var n}function s(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=i(e);if(t){var a=i(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return o(this,n)}}},88029:function(e,t,n){"use strict";function r(e,t){return r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},r(e,t)}function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)}n.d(t,{Z:function(){return i}})}},function(e){e.O(0,[4885,2599,3524,4849,5844,9676,7612,5543,9667,9697,2328,4005,9015,1641,6737,9521,9690,9092,8981,4544,4790,9774,2888,179],(function(){return t=34709,e(e.s=t);var t}));var t=e.O();_N_E=t}]);

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.