@extends('backEnd.master') @section('title') @lang('parent.parent_dashboard') @endsection @push('css') @endpush @section('mainContent')
{{--
--}} @foreach ($my_childrens as $children)

@lang('parent.my_children')

{{ $children->full_name }}

@php $student_detail = $children; $issueBooks = $student_detail->bookIssue; $homeworkLists = 0; $totalSubjects = 0; $totalOnlineExams = 0; $totalTeachers = 0; $totalExams = 0; $feesDue = 0; $totalPoint = 0; $balance_fees = 0; $pendingHomework = 0; foreach ($student_detail->studentRecords as $record) { $homeworkLists += $record->getHomeWorkAttribute()->count(); $totalSubjects += $record->getAssignSubjectAttribute()->count(); $totalTeachers += $record->getStudentTeacherAttribute()->count(); $totalOnlineExams += $record->getOnlineExamAttribute()->count(); $totalExams += $record->examSchedule()->count(); foreach ($record->feesInvoice as $key => $studentInvoice) { $amount = $studentInvoice->Tamount; $weaver = $studentInvoice->Tweaver; $fine = $studentInvoice->Tfine; $paid_amount = $studentInvoice->Tpaidamount; $sub_total = $studentInvoice->Tsubtotal; $feesDue = $amount + $fine - ($paid_amount + $weaver); } foreach ($record->directFeesInstallments as $feesInstallment) { $balance_fees += discount_fees($feesInstallment->amount, $feesInstallment->discount_amount) - $feesInstallment->paid_amount; } foreach ($record->incidents as $incident) { $totalPoint += $incident->point; } } $attendances = $student_detail->studentAttendances->where('academic_id', generalSetting()->session_id); @endphp
@if (userPermission('parent-dashboard-subject')) @endif @if (userPermission('parent-dashboard-notice')) @endif @if (userPermission('parent-dashboard-exam')) @endif @if (userPermission('parent-dashboard-exam')) @endif @if (userPermission('parent-dashboard-teacher')) @endif @if (userPermission('parent-dashboard-issued-books')) @endif @if (userPermission('parent-dashboard-pending-homeworks')) @endif @if (userPermission('parent-dashboard-attendance-in-current-month')) @endif @if (userPermission('fees.student-fees-list-parent')) @endif @if (moduleStatusCheck('BehaviourRecords')) @endif
@if (userPermission('parent_class_routine'))

@lang('academics.class_routine')

@foreach ($children->studentRecords as $key => $record)
@php $height = 0; $tr = []; @endphp @foreach ($sm_weekends as $sm_weekend) @php if (moduleStatusCheck('University')) { $studentClassRoutine = App\SmWeekend::universityStudentClassRoutine($record->un_semester_label_id, $record->un_section_id, $sm_weekend->id); } else { $studentClassRoutine = App\SmWeekend::studentClassRoutineFromRecord($record->class_id, $record->section_id, $sm_weekend->id); } @endphp @if ($studentClassRoutine->count() > $height) @php $height = $studentClassRoutine->count(); @endphp @endif @endforeach @php $used = []; $tr = []; @endphp @foreach ($sm_weekends as $sm_weekend) @php $i = 0; if (moduleStatusCheck('University')) { $studentClassRoutine = App\SmWeekend::universityStudentClassRoutine($record->un_semester_label_id, $record->un_section_id, $sm_weekend->id); } else { $studentClassRoutine = App\SmWeekend::studentClassRoutineFromRecord($record->class_id, $record->section_id, $sm_weekend->id); } @endphp @foreach ($studentClassRoutine as $routine) @php if (!in_array($routine->id, $used)) { if (moduleStatusCheck('University')) { $tr[$i][$sm_weekend->name][$loop->index]['subject'] = $routine->unSubject ? $routine->unSubject->subject_name : ''; $tr[$i][$sm_weekend->name][$loop->index]['subject_code'] = $routine->unSubject ? $routine->unSubject->subject_code : ''; } else { $tr[$i][$sm_weekend->name][$loop->index]['subject'] = $routine->subject ? $routine->subject->subject_name : ''; $tr[$i][$sm_weekend->name][$loop->index]['subject_code'] = $routine->subject ? $routine->subject->subject_code : ''; } $tr[$i][$sm_weekend->name][$loop->index]['class_room'] = $routine->classRoom ? $routine->classRoom->room_no : ''; $tr[$i][$sm_weekend->name][$loop->index]['teacher'] = $routine->teacherDetail ? $routine->teacherDetail->full_name : ''; $tr[$i][$sm_weekend->name][$loop->index]['start_time'] = $routine->start_time; $tr[$i][$sm_weekend->name][$loop->index]['end_time'] = $routine->end_time; $tr[$i][$sm_weekend->name][$loop->index]['is_break'] = $routine->is_break; $used[] = $routine->id; } @endphp @endforeach @php $i++; @endphp @endforeach @for ($i = 0; $i < $height; $i++) @foreach ($tr as $days) @foreach ($sm_weekends as $sm_weekend) @endforeach @endforeach @endfor
{{ @$sm_weekend->name }}
@php $classes = gv($days, $sm_weekend->name); @endphp @if ($classes && gv($classes, $i)) @if ($classes[$i]['is_break']) @lang('academics.break') ({{ date('h:i A', strtotime(@$classes[$i]['start_time'])) }} - {{ date('h:i A', strtotime(@$classes[$i]['end_time'])) }})
@else @lang('common.time') : {{ date('h:i A', strtotime(@$classes[$i]['start_time'])) }} - {{ date('h:i A', strtotime(@$classes[$i]['end_time'])) }}
{{ $classes[$i]['subject'] }} ({{ $classes[$i]['subject_code'] }})
@if ($classes[$i]['class_room']) @lang('academics.room') : {{ $classes[$i]['class_room'] }}
@endif @if ($classes[$i]['teacher']) {{ $classes[$i]['teacher'] }}
@endif @endif @endif
@endforeach
@endif
@if (userPermission('parent_attendance'))
@php $now = Carbon::now(); $year = $now->year; $month = $now->month; $days = cal_days_in_month(CAL_GREGORIAN, $now->month, $now->year); $attendance = $children->attendances; @endphp @include('backEnd.parentPanel.inc._parent_dashboard_attendance_statistics') @include('backEnd.parentPanel.inc._dashboard_subject_attendance_tab')
@endif @if (userPermission('fees.student-fees-list-parent'))
@include('backEnd.parentPanel.inc._fees_info')
@endif @if (userPermission('parent_exam_schedule'))

@lang('exam.exam_routine')

@foreach ($children->studentRecords as $record) @if ($record->Exam) @foreach ($record->Exam->unique(function ($item) { return $item->exam_type_id . $item->class_id . $item->section_id; }) as $key => $exam) @php $exam_routines = App\SmExamSchedule::getAllExams($exam->class_id, $exam->section_id, $exam->exam_type_id); @endphp
@foreach ($exam_routines as $date => $exam_routine) @endforeach
@lang('exam.date_&_day') @lang('exam.subject') @lang('common.class_Sec') @lang('exam.teacher') @lang('exam.time') @lang('exam.duration') @lang('exam.room')
{{ dateConvert($exam_routine->date) }}
{{ Carbon::createFromFormat('Y-m-d', $exam_routine->date)->format('l') }}
{{ $exam_routine->subject ? $exam_routine->subject->subject_name : '' }} {{ $exam_routine->subject ? '(' . $exam_routine->subject->subject_code . ')' : '' }} {{ $exam_routine->class ? $exam_routine->class->class_name : '' }} {{ $exam_routine->section ? '(' . $exam_routine->section->section_name . ')' : '' }} {{ $exam_routine->teacher ? $exam_routine->teacher->full_name : '' }} {{ date('h:i A', strtotime(@$exam_routine->start_time)) }} - {{ date('h:i A', strtotime(@$exam_routine->end_time)) }} @php $duration = strtotime($exam_routine->end_time) - strtotime($exam_routine->start_time); @endphp {{ timeCalculation($duration) }} {{ $exam_routine->classRoom ? $exam_routine->classRoom->room_no : '' }}
@endforeach @endif @endforeach
@endif @endforeach
@include('backEnd.parentPanel.inc._complaint_list_tab')
@if (userPermission('parent-dashboard-calendar'))
@include('backEnd.communicate.commonAcademicCalendar')
@endif
@endsection @include('backEnd.communicate.academic_calendar_css_js')