1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[191,19763],{19763:function(e,l,s){s.r(l);var d=s(85893);s(67294),l.default=e=>{let{height:l}=e;return(0,d.jsx)("div",{className:"product_shimmer_container",children:(0,d.jsx)("div",{className:"product_shimmer_card_div",children:(0,d.jsx)("div",{style:{height:l},className:"productshimmer_image_div",children:(0,d.jsx)("div",{className:"image_div"})})})})}},191:function(e,l,s){s.r(l),s.d(l,{default:function(){return r}});var d=s(85893),t=s(66775),n=s(55376),a=s(56429),i=s(88738),o=s(19763),c=s(67294);function r(e){var l,s,t,r,u,m,x,h,v,b,p,j,f,g,N,w,y;let{viewData:k,setViewData:A}=e,[C,S]=(0,c.useState)(null),[_,I]=(0,c.useState)(null),[M,z]=(0,c.useState)(!1);(0,c.useEffect)(()=>{Object.keys(k).length>0&&(setTimeout(()=>z(!0),1e3),S((null==k?void 0:k.present)||0),I((null==k?void 0:k.absent)||0))},[k]);let D=C+_,E=((null==k?void 0:k.present)/D*100).toFixed(0),R=((null==k?void 0:k.absent)/D*100).toFixed(0);return(0,d.jsx)("div",{className:"modal fade",id:"ViewAcademicStudentAttendanceModal","data-bs-backdrop":"static",children:(0,d.jsx)("div",{className:"modal-dialog modal-dialog-centered modal-dialog-scrollable",children:(0,d.jsxs)("div",{className:"modal-content",children:[(0,d.jsxs)("div",{className:"modal-header bg-primary",style:{color:"white"},children:[(0,d.jsx)("h6",{className:"modal-title text-white",children:"View : Student Attendance"}),(0,d.jsx)("button",{type:"button",className:"btn-close btn-close-white","data-bs-dismiss":"modal","aria-label":"Close",id:"ViewAcademicStudentAttendanceModalClose",onClick:()=>{A({})}})]}),(0,d.jsxs)("div",{className:"modal-body",children:[M?(0,d.jsxs)("div",{className:"row",children:[(0,d.jsx)("div",{className:"col-7",children:(0,d.jsx)(n.$Q,{style:{height:"120%",width:"100%"},options:{responsive:!0,plugins:{legend:{display:!1},tooltip:{callbacks:{label:function(e){let l=e.raw;return" ".concat(l,"%")}}},title:{display:!1},datalabels:{display:!0}},scales:{y:{beginAtZero:!0,max:100,ticks:{callback:function(e){return e+"%"}},title:{display:!0,text:"Percentage"}}}},data:{labels:["Present","Absent"],datasets:[{label:"Attendance %",data:[E,R],backgroundColor:["#28a745","#dc3545"],borderRadius:{topLeft:5,topRight:5},barThickness:40,datalabels:{color:"#000",anchor:"end",align:"top",offset:-7,formatter:(e,l)=>0===l.dataIndex?C:_,font:{size:12}}}]},plugins:[a.Z]})}),(0,d.jsxs)("div",{className:"col-5",children:[(0,d.jsxs)("div",{className:"d-flex justify-content-between mb-2",children:[(0,d.jsx)("span",{className:"card-text mb-1 font-13",children:"Student:"}),(0,d.jsxs)("span",{style:{fontSize:13,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"200px",display:"inline-block"},children:[null==k?void 0:null===(t=k.studentId)||void 0===t?void 0:null===(s=t.userId)||void 0===s?void 0:null===(l=s.name)||void 0===l?void 0:l.firstName,(0,d.jsxs)(i.g,{children:[(0,d.jsxs)(i.g.When,{isTrue:null!=k&&null!==(m=k.studentId)&&void 0!==m&&null!==(u=m.userId)&&void 0!==u&&null!==(r=u.name)&&void 0!==r&&!!r.middleName,children:["\xa0",(null==k?void 0:null===(v=k.studentId)||void 0===v?void 0:null===(h=v.userId)||void 0===h?void 0:null===(x=h.name)||void 0===x?void 0:x.middleName)+" "+(null==k?void 0:null===(j=k.studentId)||void 0===j?void 0:null===(p=j.userId)||void 0===p?void 0:null===(b=p.name)||void 0===b?void 0:b.lastName)]}),(0,d.jsxs)(i.g.Else,{children:["\xa0",null==k?void 0:null===(N=k.studentId)||void 0===N?void 0:null===(g=N.userId)||void 0===g?void 0:null===(f=g.name)||void 0===f?void 0:f.lastName]})]})]})]}),(0,d.jsxs)("div",{className:"d-flex justify-content-between mb-2 align-items-center",children:[(0,d.jsx)("span",{className:"card-text mb-1 font-13",children:"Total Classes:"}),(0,d.jsxs)("span",{style:{backgroundColor:"white",borderRadius:"0.375rem",border:"1px solid #0600c0",color:"#0600c0",padding:"3px 7px",fontSize:"12px"},children:[D," Classes"]})]}),(0,d.jsxs)("div",{className:"d-flex justify-content-between mb-2 align-items-center",children:[(0,d.jsx)("span",{className:"card-text mb-1 font-13",children:"Present:"}),(0,d.jsxs)("span",{style:{backgroundColor:"white",borderRadius:"0.375rem",border:"1px solid rgb(0, 192, 102)",color:"rgb(0, 192, 102)",padding:"3px 7px",fontSize:"12px"},children:[null==k?void 0:k.present," Classes"]}
1)]}),(0,d.jsxs)("div",{className:"d-flex justify-content-between mb-2 align-items-center",children:[(0,d.jsx)("span",{className:"card-text mb-1 font-13",children:"Absent:"}),(0,d.jsxs)("span",{style:{backgroundColor:"white",borderRadius:"0.375rem",border:"1px solid #c00006",color:"#c00006",padding:"3px 7px",fontSize:"12px"},children:[null==k?void 0:k.absent," Classes"]})]})]})]}):(0,d.jsx)(o.default,{height:"2.4rem"}),(0,d.jsx)("div",{className:"mt-3",children:(0,d.jsxs)(i.g,{children:[(0,d.jsx)(i.g.When,{isTrue:(null==k?void 0:k.MarkedAttendance)&&(null==k?void 0:null===(w=k.MarkedAttendance)||void 0===w?void 0:w.length)>0,children:(0,d.jsxs)("table",{className:"table table-hover table-striped table-bordered",children:[(0,d.jsx)("thead",{children:(0,d.jsxs)("tr",{children:[(0,d.jsx)("th",{className:"fw-medium",children:"#"}),(0,d.jsx)("th",{className:"fw-medium",children:"Date ( DD-MM-YYYY )"}),(0,d.jsx)("th",{className:"fw-medium",children:"Present / Absent"})]})}),(0,d.jsx)("tbody",{children:null==k?void 0:null===(y=k.MarkedAttendance)||void 0===y?void 0:y.map((e,l)=>{let s=(null==e?void 0:e.attendance)==="absent";return(0,d.jsxs)("tr",{children:[(0,d.jsx)("td",{children:l+1}),(0,d.jsx)("td",{children:null==e?void 0:e.date}),(0,d.jsx)("td",{children:(0,d.jsx)("span",{className:"text-capitalize ".concat(s?"text-danger":""),children:null==e?void 0:e.attendance})})]},l)})})]})}),(0,d.jsx)(i.g.Else,{children:(0,d.jsx)("div",{className:"my-4 text-center",children:(0,d.jsx)("p",{className:"p-0 m-0 font-14",children:"No Attendance Data Found !"})})})]})})]})]})})})}t.kL.register(t.uw,t.f$,t.ZL,t.Dx,t.u,t.De,a.Z)}}]);
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.