PageSourceSearch

https://schezy.com/chunks/DosA2gWZPQtNhPLGk4s9u.js

js schezy.com collected 2026-09-29 12:27:33 UTC 4,905 bytes, 1 lines download raw bytes

1import{r as e,u as s,i as t,S as a,j as r}from"./DGrbOkrFsn0voVzUoWkxi-1790053513351.js";import l from"./CwUlqFR9Tc9kgKWCzRlE-.js";import{u as c}from"./G_z35mcMeQsIItbNAJgAg.js";import o from"./Cwc5Fkf4CO55m2V60HDn6.js";import n from"./CVUX0FKZTmG_lNrUkIt3I.js";import{P as i}from"./DJ_fOxsT-yL9xf087r1NM.js";import"./DMpOXg_SNv6ei_SFX_jrX.js";import"./l-jgK5g1z2RCJO6grM3_t.js";import"./CIpdRhfiXBSWbRz-2W63r.js";import"./DfjbUWDNlMnDXVpDaxvye.js";import"./DEgv3bW2ZlSonDnEpkKOb.js";import"./C0VscXY0q_hXYqQxArNlG.js";/* empty css                     */import"./BfzzDmt2RiLmJZVfcg9BD.js";import"./CHSiLyzyFXCI1vlnTHxLQ.js";import"./BHR_E30JFALbpiL80jiU2.js";import"./BlrroQs9l0thMZABoksCJ.js";import"./BL9dUyJlbPDUW1dvFHbSh.js";import"./B5fb8ITR-4qV4a5gN_vIP.js";/* empty css                     *//* empty css                     */const d=()=>{const[d,m]=e.useState([]),[p,j]=e.useState([]),[h,u]=e.useState(""),[x,f]=e.useState(!1),[N,g]=e.useState({}),[b,_]=e.useState([]),{store:D}=s(),{control:y,handleSubmit:v,reset:S,watch:w,formState:{errors:T}}=c(),A=w("fromDate");e.useEffect(()=>{E()},[]);const E=async()=>{try{const e={userId:D.user.id,parentType:D.user.parent_type};let{data:s}=await t.get(a,"admin/getAllStudentByParentId",e);m(s?.data);const r=s?.data?.map(e=>({value:e?.Student?.id,label:e?.Student?.student_name}));_(r),g(r?.[0])}catch(e){}};e.useEffect(()=>{N?.value&&C()},[N]);const C=async e=>{try{f(!1);const s=d.find(e=>e?.student_id===N?.value),r={...e,student_id:s?.student_id??null,section_id:s?.program?.section_id??null,class_id:s?.program?.class_id??null};r.report_for=e?.fromDate&&!e?.toDate||!e?.fromDate&&e?.toDate?"single":"multiple";const l=await t.get(a,"school_attendance/parent",r),c=l?.data;f(!0),c?.data&&Array.isArray(c.data)?(j(c.data),u("")):c?.message&&(j([]),u(c.message))}catch(s){}};return r.jsxs(r.Fragment,{children:[r.jsx("div",{className:"copy-custom-table",children:r.jsx("div",{className:"fee-payment-table",children:r.jsxs("div",{className:"fee-payment-table__hero",children:[r.jsxs("div",{children:[r.jsx("h2",{className:"sc-header-title",children:"Attendance"}),r.jsx("p",{className:"sc-subheader-title",children:"Attendance Report"})]}),r.jsx("div",{className:"fee-payment-table__hero-actions width-965",children:r.jsx("div",{className:"overflow-width-list",children:r.jsx(i,{options:b,selectedStudent:N,onChange:g})})})]})})}),r.jsx("div",{className:"",children:N&&Object?.keys(N).length>0&&r.jsxs("div",{className:"",children:[r.jsxs("form",{className:"sc-bg-light br-radius-24 p-3 mb-1",onSubmit:v(C),children:[r.jsxs("div",{className:"row",children:[r.jsx("div",{className:"col-12 col-sm-6 col-lg-4",children:r.jsxs("div",{className:"sc-form-group",children:[T.fromDate&&r.jsx("span",{className:"text-error",children:T.fromDate.message}),r.jsx(l,{label:"From Date",control:y,name:"fromDate",placeholder:"From Date",isTimeShow:!1,rules:{required:"From Date is required"}})]})}),r.jsx("div",{className:"col-12 col-sm-6 col-lg-4",children:r.jsxs("div",{className:"sc-form-group",children:[T.toDate&&r.jsx("span",{className:"text-error",children:T.toDate.message}),r.jsx(l,{label:"To Date",control:y,name:"toDate",placeholder:"To Date",isTimeShow:!1,maxDate:new Date,rules:{validate:e=>{if(!e)return!0;if(!A)return!0;const s=new Date(A);return new Date(e)>=s||"To Date must be greater than or equal to From Date"}}})]})})]}),r.jsxs("div",{className:"d-flex justify-content-end gap-8",children:[r.jsx("button",{className:"sc-btn-lg px-4 sc-btn--primary",type:"submit",children:"Search"}),r.jsx("button",{className:"sc-btn-lg px-4 sc-btn--secondary",type:"button",onClick:()=>{j([]),S({date:"",fromDate:"",toDate:""})},children:"Clear"})]})]}),p.length>0?p?.map((e,s)=>r.jsx("div",{className:"sc-cstm-section-sm sc-copy-height-unset sc-copy-custom-flex",children:r.jsx(n,{className:"sc-scroll-height ps-3 pe-3",id:"PARENT_ATTENDANCE_COLUMNS",list:[e],itemKey:(e,s)=>e?.id||s,toolbarActions:r.jsx(r.Fragment,{children:r.jsx("div",{className:"d-flex",children:r.jsxs("p",{className:"sc-btn-lg bg-blue-10 d-flex align-items-center justify-content-center font-bold letter-spacing-1 text-uppercase",children:["Date :  ",e?.date?.slice(0,10)]})})}),renderRow:e=>({TEACHER:r.jsx("span",{className:"fee-row__student-name",children:e?.teacher?e.teacher[0].toUpperCase()+e.teacher.slice(1):""}),PERIOD:r.jsx("span",{className:"fee-row__roll",children:e?.period_name}
1),STATUS:r.jsx("span",{className:"fee-row__roll",children:e?.status}),COMMENTS:r.jsx("span",{className:"fee-row__roll",children:e?.comments||"N/A"}),MARKED_BY:r.jsx("span",{className:"fee-row__roll",children:e?.marked_by?e.marked_by[0].toUpperCase()+e.marked_by.slice(1):""})}),noDataMessage:"No Attendance Found"})},s)):x&&r.jsx("div",{className:"nodata-section-xs pt-5 mt-3 border-attendence-parent",children:r.jsx(o,{message:h||"No attendance data found."})})]})})]})};export{d as default};

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.