File size: 756 Bytes
6aa6081
 
 
 
 
 
 
 
 
8381024
 
 
6aa6081
 
8381024
6aa6081
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import api from './api';

export interface ChildAttendance {
  id: number;
  name: string;
  lastname: string;
  card_id: string | null;
  section_name: string | null;
  section_id: number | null;
  entered_campus_today: boolean;
  campus_checkin_time: string | null;
  campus_checkout_time: string | null;
  is_present_today: boolean;
  checkin_time: string | null;
  skipped_class: boolean;
  attendance_last_30_days: number;
  today_schedule: {
    day: number;
    blocks: {
      entry_time: string;
      exit_time: string;
      subject_id: number | null;
      status: string;
    }[];
  } | null;
}

export async function getMyChildren(): Promise<ChildAttendance[]> {
  const { data } = await api.get('/representative/children');
  return data;
}