PageSourceSearch

https://toddlersapp.com/build/assets/StudentAttendance-CKo039th.js

js toddlersapp.com collected 2026-10-02 00:57:44 UTC 5,968 bytes, 1 lines download raw bytes

1import{_ as R,u as W,a as X,Z as ee,c as M,r as g,y as D,G as te,S as _,o as Y,d as U,e as i,h as l,w as m,N as x,M as s,a3 as j,j as E,k as O,m as ae,am as le,t as se,i as ne,Q as oe,Y as ie,F as me}from"./admin-CMGpZsj2.js";import{Q as $}from"./QTd-Pnig8V5e.js";import{Q as re}from"./QTable-B2XxdEIW.js";import{u as ue}from"./index-DAq73jVQ.js";import{u as ce}from"./index-CVLLq_jD.js";import{u as de}from"./index-CZXJIjY9.js";import{h as P}from"./moment-BLMuvzoS.js";import{g as G}from"./attendanceStatus-C-hz7l6l.js";/* empty css                                                                          */import"./use-fullscreen-C0ckTti0.js";const fe={class:"q-mt-lg"},_e={class:"col-12 col-xl-3 col-lg-3 col-md-3 col-sm-6"},be={class:"col-12 col-xl-3 col-lg-3 col-md-3 col-sm-6"},pe={class:"col-12 col-xl-3 col-lg-3 col-md-3 col-sm-6"},ge={key:0},ye={__name:"StudentAttendance",setup(ve){const r=W(),h=ue(),u=X(),k=ce(),N=de(),{attendance_list:w}=ee(N);let A=M({branch_id:[]}),c=M({class_room_id:null,year:new Date().getFullYear(),month:String(new Date().getMonth()+1).padStart(2,"0")});const y=g(""),b=g([]),I=g({page:1,rowsPerPage:15}),L=D(()=>({"q-mr-sm":r.screen.xs||r.screen.sm,"q-ml-auto":r.screen.xs,"q-mt-sm":r.screen.xs||r.screen.sm})),z=D(()=>({"q-mt-md":r.screen.xs||r.screen.sm})),Z=g([{name:"index",label:"Sr.",align:"center"},{name:"student_name",label:"Student Name",align:"center",field:a=>a.student_name||"N/A",sortable:!0},{name:"date",label:"Date",align:"center",field:a=>a.date,sortable:!0},{name:"day",label:"Day",align:"center",field:a=>a.day||"N/A"},{name:"checked_in",label:"Checked In",align:"center",field:a=>a.checked_in||"N/A"},{name:"status",label:"Status",align:"center"}]),H=a=>{const t=[];Object.keys(a).forEach(e=>{Object.keys(a[e]).forEach(n=>{var q,C,V,T,B,Q,F;const o=a[e][n],S=(q=o==null?void 0:o[0])==null?void 0:q.status,K=((V=(C=o==null?void 0:o[0])==null?void 0:C.student)==null?void 0:V.name)??"N/A",p=S==="L",d=o.find(v=>v.type==="in"),f=o.slice().reverse().find(v=>v.type==="out");t.push({row_key:`${e}_${n}`,student_id:e,student_name:K,date:P(n).format("DD-MM-YYYY"),day:P(n).format("dddd"),checked_in:p?"N/A":((T=d==null?void 0:d.created_at)==null?void 0:T.slice(11,19))??"N/A",checked_out:p?"N/A":((B=f==null?void 0:f.created_at)==null?void 0:B.slice(11,19))??"N/A",checkin_marked_by:p?"N/A":((Q=d==null?void 0:d.marked_by)==null?void 0:Q.name)??"N/A",checkout_marked_by:p?"N/A":((F=f==null?void 0:f.marked_by)==null?void 0:F.name)??"N/A",status:S})})}),t.sort((e,n)=>e.student_name.localeCompare(n.student_name)||e.row_key.localeCompare(n.row_key)),b.value=t},J=()=>{b.value=[],N.getStudentAttendanceRecord(c).then(a=>{!(a!=null&&a.data)||Object.keys(a.data).length===0?_.fire({text:"No attendance record found for selected classroom",icon:"info",confirmButtonText:"Continue"}):(H(w.value),_.fire({text:a==null?void 0:a.message,icon:"success",confirmButtonText:"Continue"}))},a=>{_.fire({text:a==null?void 0:a.message,icon:"error",confirmButtonText:"Continue"})})};return te(()=>{w.value=[],u==null||u.getUser().then(()=>{var a;((a=u==null?void 0:u.selected_branch)==null?void 0:a.length)>0&&u.selected_branch.forEach(t=>{var e;A.branch_id.push((e=t==null?void 0:t.branch)==null?void 0:e.id)}),h.getRoomsOfMultipleBranches(A).then(t=>{var e;((e=t==null?void 0:t.data)==null?void 0:e.length)==0&&_.fire({text:"No classrooms found of the selected branch",icon:"error",confirmButtonText:"Continue"})},t=>{_.fire({text:t==null?void 0:t.message,icon:"error",confirmButtonText:"Continue"})})})}),(a,t)=>(Y(),U(me,null,[i("div",fe,[l(ae,{onSubmit:t[3]||(t[3]=e=>J()),class:"row main-form-container"},{default:m(()=>[i("div",_e,[t[5]||(t[5]=i("label",{class:"label-required"},"Classroom",-1)),l(x,{class:"q-mr-sm",outlined:"",dense:"",modelValue:s(c).class_room_id,"onUpdate:modelValue":t[0]||(t[0]=e=>s(c).class_room_id=e),options:s(h).multiple_branches_rooms,"option-value":"id",rules:[e=>e!==null&&e!==""||"This field is required"],"option-label":"name","map-options":"","emit-value":""},null,8,["modelValue","options","rules"])]),i("div",be,[t[6]||(t[6]=i("label",{class:"label-required"},"Month",-1)),l(x,{class:"q-mr-sm",outlined:"",dense:"",modelValue:s(c).month,"onUpdate:modelValue":t[1]||(t[1]=e=>s(c).month=e),options:s(k).months_list,"option-value":"id","option-label":"name","map-options":"","emit-value":"",rules:[e=>e!==null&&e!==""||"This field is required"]},null,8,["modelValue","options","rules"])]),i("div",pe,[t[7]||(t[7]=i("label",{class:"label-required"},"Year",-1)),l(x,{class:"q-mr-sm",outlined:"",dense:"",modelValue:s(c).year,"onUpdate:modelValue":t[2]||(t[2]=e=>s(c).year=e),options:s(k).years_list,rules:[e=>e!==null&&e!==""||"This field is required"]},null,8,["modelValue","options","rules"])]),i("div",{class:j(["col-12 col-xl-3 
1col-lg-3 col-md-3 col-sm-6 submitBtnContainer",L.value])},[l(E,{color:"primary",type:"submit",class:j(z.value)},{default:m(()=>[...t[8]||(t[8]=[O("Submit",-1)])]),_:1},8,["class"])],2)]),_:1})]),b.value.length>0?(Y(),U("div",ge,[l(re,{class:"my-sticky-table q-mt-md",rows:b.value,columns:Z.value,"row-key":"row_key",filter:y.value,pagination:I.value},{"top-right":m(e=>[l(E,{flat:"",round:"",dense:"",icon:e.inFullscreen?"fullscreen_exit":"fullscreen",onClick:e.toggleFullscreen},null,8,["icon","onClick"]),l(ne,{class:"tableSearch",borderless:"",dense:"",debounce:"300",modelValue:y.value,"onUpdate:modelValue":t[4]||(t[4]=n=>y.value=n),placeholder:"Search"},{append:m(()=>[l(oe,{name:"search"})]),_:1},8,["modelValue"])]),"body-cell-index":m(e=>[l($,{props:e},{default:m(()=>[O(se(e.pageIndex+1),1)]),_:2},1032,["props"])]),"body-cell-status":m(e=>[l($,{props:e,class:"text-center"},{default:m(()=>[l(le,{label:s(G)(e.row.status).label,variant:s(G)(e.row.status).variant},null,8,["label","variant"])]),_:2},1032,["props"])]),_:1},8,["rows","columns","filter","pagination"])])):ie("",!0)],64))}},Te=R(ye,[["__scopeId","data-v-28042a6e"]]);export{Te 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.