IMMREX7

aku nok ndi : /home/spdtg/www/schoolmis/resources/views/students/
File Up :
aku nok ndi : /home/spdtg/www/schoolmis/resources/views/students/dashboard.blade.php

@extends('students.student_layout')
@section('content')
<div class="row clearfix">
    <div class="col-sm-12">

        <div class="card member-card" style="margin-bottom:10px;">

            <div class="member-img">
                <a href="#" class="">
                    <img src="{{ asset('storage/schools/'.$student->idSchool.'/students/'.$student->photo)}}" class="rounded-circle">

                </a>
            </div>
            <div class="">
                <h4 class="m-t-10">{{$student->firstName}} {{$student->middleName}} {{$student->lastName}}</h4>
            </div>
            <div class="body">
                <div class="row clearfix">
                    <div class="col-sm-4">
                        <p class="text-muted">EC No. : {{$student->ecNo}}</p>
                        <p class="text-muted">Admission No. : {{$student->admissionNo}}</p>
                    </div>
                    <div class="col-sm-4">
                        <p class="text-muted">Father : {{$student->father_fname}} {{$student->father_lname}}</p>
                        <p class="text-muted">Mother : {{$student->mother_fname}} {{$student->mother_lname}}</p>
                    </div>
                    <div class="col-sm-4">
                        @if(isset($student->classM))
                        <p class="text-muted">Class : {{$student->classM->className}}</p>
                        @endif
                        @if(isset($student->section))
                        <p class="text-muted">Section : {{$student->section->sectionName}}</p>
                        @endif
                        <p class="text-muted">Contact No : {{$student->father_mobile}}</p>
                    </div>
                </div>
                <hr>

            </div>

        </div>
    </div>
</div>
<div class="row clearfix">
    <div class="col-sm-12">
        <div class="card">
            <div class="header">
                <h2><strong>View Timetable</strong></h2>
            </div>
            <div class="body table-responsive">
                

                <table class="table">
                    <thead style="background-color: #00d6f3;color:white;">
                        <tr>
                            <th>DAY/TIME</th>
                            @foreach($periods as $var)
                            <th>{{$var->periodName}} <br> {{$var->fromTime}} <br>{{$var->toTime}}</th>
                            @endforeach
                        </tr>
                    </thead>
                    <tbody>
                        @foreach(weekdays() as $key=>$value)
                        <tr>
                            <th style="background-color: #ffa60d;color:white;">{{$value}}</th>
                            @foreach($periods as $var)
                                <?php $timetable = \App\Timetable::where('idPeriod','=',$var->idPeriod)->where('idWeekday','=',$key)->first() ?>
                                @if($var->isLunchBreak == 'N')
                                <td style="border-right: 1px solid #dee2e6;">
                                    <span><strong>{{$timetable->subject->subjectName or ''}}</strong></span><br>
                                    <span><strong>{{$timetable->teacher->firstName or ''}}</strong></span>
                                </td>
                                @else
                                <td style="background-color: #ffa60d;"></td>
                                @endif
                            @endforeach
                    </tr>
                    @endforeach
                    </tbody>
                </table>
            </div>
            {!! Form::close() !!}
        </div>
    </div>
</div>
<div class="row clearfix">
    <div class="col-lg-6 col-md-6">
        <div class="card">
            <div class="header">
                <h2><strong>Thoughts</strong></h2>
            </div>
            <div class="body" style="height: 500px;">
                <?php $thoughts = \App\WeekThought::where('idSchool', '=', Auth::guard('student')->user()->idSchool)->orderBy('idThought', 'desc')->limit(1)->first(); ?>
                <!--<div class="card">-->
                @if($thoughts)
                <img class="img-fluid" height="300" src="{{ asset('storage/schools/'.$thoughts->idSchool.'/thoughts/'.$thoughts->image)}}">
                <div class="body" style="height: 150px;">
                    <h3 class="title" style="margin-bottom:10px;">Source : {{$thoughts->source}}</h3>
                    <p class="text">
                        {{ str_limit($thoughts->thought, 100) }}
                        @if (strlen(strip_tags($thoughts->thought)) > 100)
                          <button class="btn btn-xs btn-info js-sweetalertthought" data-type="confirm" data-msg="{{$thoughts->thought}}">readmore..</button>
                        @endif
                    </p>
                    <p class="text">
                    <!--<small class="text-muted">Last updated 3 mins ago</small>-->
                    </p>
                </div>
                @endif
                <!--</div>-->
            </div>
        </div>
    </div>
    <div class="col-lg-6 col-md-6">
        <div class="card">
            <div class="header">
                <h2><strong>Positive News</strong></h2>
            </div>
            <div class="body" style="height:500px;">
                <?php $pnews = \App\PositiveNews::where('idSchool', '=', Auth::guard('student')->user()->idSchool)->orderBy('idNews', 'desc')->limit(1)->first(); ?>
                <!--<div class="card">-->
                @if($pnews)
                <img class="img-fluid" height="300" src="{{ asset('storage/schools/'.$pnews->idSchool.'/positivenews/'.$pnews->image)}}">
                <div class="body" style="height: 150px;">
                    <h3 class="title" style="margin-bottom:10px;">Source : {{$pnews->source}}</h3>
                    <p class="text">
                        {{ str_limit($pnews->news, 100) }}
                        @if (strlen(strip_tags($pnews->news)) > 100)
                          <button class="btn btn-xs btn-info js-pnews" data-type="confirm" data-msg="{{$pnews->news}}">readmore..</button>
                        @endif
                    </p>
                    <p class="text">
                    <!--<small class="text-muted">Last updated 3 mins ago</small>-->
                    </p>
                </div>
                @endif
            </div>
        </div>
    </div>
</div>
<div class="row clearfix">

    <!--</div>
    <div class="row clearfix">-->
    <div class="col-sm-12">
        <div class="card">
            <div class="header">
                <h2><strong>List Of Homeworks</strong></h2>
            </div>
            <div class="body table-responsive">

                <table class="table table-bordered table-striped table-hover js-basic-example dataTable">
                    <thead>
                        <tr>
                            <th>S. No.</th>
                            <th>Date</th>
<!--                            <th>Class</th>
                            <th>Section</th>-->
                            <th>EC No.</th>
                            <th>Subject</th>
                            <th>Homework</th>
                            <th>Homework Doc</th>
                            <!--<th>Action</th>-->
                        </tr>
                    </thead>
                    <tbody>
                        <?php
                        $i = 1;
                        $class_homework = \App\Homework::where('idClass', '=', $student->idClass)
                                ->whereNull('idSection')
                                ->whereNull('idStudent');
                        $section_homework = \App\Homework::where('idSection', '=', $student->idSection)
                                ->whereNull('idStudent');
                        $homeworks = \App\Homework::where('idStudent', '=', $student->idStudent)
                                ->union($class_homework)
                                ->union($section_homework)
                                ->orderBy('idHomework','desc')
                                ->get();
                       
                        ?>
                        @foreach($homeworks as $value)
                        <tr>
                            <th scope="row">{{$i}}</th>
                            <td>{{$value->publishDate}}</td>
<!--                            <td>{{$value->classM->className}}</td>
                            <td>{{$value->section->sectionName}}</td>-->
                            <td>{{$value->student->ecNo or 'All'}}</td>
                            <td>{{$value->subject}}</td>
                            <td><span>{{ str_limit($value->homework, 25) }} <button class="btn btn-xs btn-approve js-sweetalerttext" data-type="confirm" data-msg="{{$value->homework}}">readmore..</button></span></td>
                            <td><a href="{{url('/student/homeworks/' . $value->idHomework.'/viewdoc')}}" target="_blank">View</a></td>
                            <!--<td></td>-->
                        </tr>
<?php $i++; ?>
                        @endforeach
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</div>
<div class="row clearfix">
    <div class="col-lg-6 col-md-6">
        <div class="card">
            <div class="header">
                <h2><strong>Newsletter</strong></h2>
            </div>
            <div class="body" style="height: 500px;">
                <?php $newsletter = \App\NewsLetter::where('idSchool', '=', Auth::guard('student')->user()->idSchool)->orderBy('idNewsletter', 'desc')->limit(1)->first(); ?>
                <!--<div class="card">-->
                @if($newsletter)
                <img class="img-fluid" height="300" src="{{ asset('storage/schools/'.$newsletter->idSchool.'/newsletters/'.$newsletter->image)}}">
                <div class="body" style="height: 150px;">
                    <h3 class="title" style="margin-bottom:10px;">Source : {{$newsletter->title}}</h3>
                    <p class="text">
                        {{ str_limit($newsletter->description, 100) }}
                        @if (strlen(strip_tags($newsletter->description)) > 100)
                          <button class="btn btn-xs btn-info js-newsletter" data-type="confirm" data-msg="{{$newsletter->description}}">readmore..</button>
                        @endif
                    </p>
                    <p class="text">
                    <!--<small class="text-muted">Last updated 3 mins ago</small>-->
                    </p>
                </div>
                @endif
                <!--</div>-->
            </div>
        </div>
    </div>
    <div class="col-lg-6 col-md-6">
        <div class="card">
            <div class="header">
                <h2><strong>Circuller</strong></h2>
            </div>
            <div class="body" style="height: 500px;">
                <?php $circuller = \App\Noticeboard::where('idSchool', '=', Auth::guard('student')->user()->idSchool)->orderBy('idNoticeboard', 'desc')->limit(1)->first(); ?>
                <!--<div class="card">-->
                @if($circuller)
                <div class="body" >
                    <h3 class="title" style="margin-bottom:10px;">Source : {{$circuller->subject}}</h3>
                    <p class="text">
                        {{ str_limit($circuller->notice) }}
                    </p>
                    <p class="text">
                    <!--<small class="text-muted">Last updated 3 mins ago</small>-->
                    </p>
                </div>
                @endif
            </div>
        </div>
    </div>
</div>
<div class="row clearfix">
    <div class="col-sm-8">
        <div id="calendar"></div>
    </div>
    <div class="col-sm-4">
        <div class="card activities">
            <div class="header">
                <h2><strong>Upcoming Birthdays</strong></h2>
            </div>
            <div class="body">
                <ul class="list-unstyled activity">
<?php $stds_birday = \App\AdmEntry::where('idClass', '=', Auth::guard('student')->user()->idClass)->whereRaw('MONTH(studentDob) = MONTH(NOW())')->get(); ?>
                    @if(count($stds_birday)>0)
                    @foreach($stds_birday as $d)
                    <li>
                        <a href="javascript:void(0)">
                            <i class="zmdi zmdi-cake bg-red"></i>                    
                            <div class="info">
                                <h4>{{$d->firstName}} {{$d->firstName}} Birthday</h4>                    
                                <small>On {{$d->studentDob}}</small>
                            </div>
                        </a>
                    </li>
                    @endforeach
                    @else
                    <li>No Birthday in this month</li>
                    @endif
                </ul>
            </div>
        </div>
    </div>
</div>
<?php 
$folders = array();
/*$folders = \App\GalleryFolder::where('idSchool', '=', Auth::guard('student')->user()->idSchool)->get();*/ ?>
<!--@if(count($folders)>0)
@foreach($folders as $var)
<div class="row clearfix">
    <div class="col-lg-12 col-md-12 col-sm-12">
        <div class="card">
            <div class="header">
                <h2><strong>{{$var->folderName}} : Images</strong></h2>
            </div>
            <div class="body">
                <div id="aniimated-thumbnials" class="list-unstyled row clearfix">
                    @foreach($var->gal_images as $value)
                    <div class="col-xl-3 col-lg-4 col-md-6 col-sm-12 m-b-20"> <a href="{{ asset('storage/schools/'.$value->idSchool.'/galleries/'.$value->folder->folderName.'/'.$value->image)}}"> 
                            <img class="img-fluid img-thumbnail" height="300" src="{{ asset('storage/schools/'.$value->idSchool.'/galleries/'.$value->folder->folderName.'/'.$value->image)}}" alt=""> </a> </div>
                    @endforeach
                </div>
            </div>
        </div>
    </div>
</div>
@endforeach
@endif-->

@stop
@section('script')
<script>
$(function () {
    $('#aniimated-thumbnials').lightGallery({
        thumbnail: true,
        selector: 'a'
    });
});
$(document).ready(function () {
    var date = new Date()
    var d    = date.getDate(),
        m    = date.getMonth(),
        y    = date.getFullYear();
    $('#calendar').fullCalendar({
      header    : {
        left  : 'prev,next today',
        center: 'title',
        right : 'month,agendaWeek,agendaDay'
      },
      buttonText: {
        today: 'today',
        month: 'month',
        week : 'week',
        day  : 'day'
      },
      //Random default events
      events    : [
          @foreach($holidays as $val)
          
          {
            title          : '{{$val->holidayName}}',
            start          : new Date({{Carbon\Carbon::parse($val->fromDate)->format('Y,m,d')}}),
            end          : new Date({{Carbon\Carbon::parse($val->toDate)->format('Y,m,d')}}),
            allDay         : true,
            backgroundColor: '#00a65a', //Success (green)
            borderColor    : '#00a65a' ,//Success (green)
            textColor : '#fff'
          },
          @endforeach
        
      ],
      timeFormat: 'H(:mm)' ,
      editable  : true,
      droppable : true, // this allows things to be dropped onto the calendar !!!
      drop      : function (date, allDay) { // this function is called when something is dropped

        // retrieve the dropped element's stored Event Object
        var originalEventObject = $(this).data('eventObject')

        // we need to copy it, so that multiple events don't have a reference to the same object
        var copiedEventObject = $.extend({}, originalEventObject)

        // assign it the date that was reported
        copiedEventObject.start           = date
        copiedEventObject.allDay          = allDay
        copiedEventObject.backgroundColor = $(this).css('background-color')
        copiedEventObject.borderColor     = $(this).css('border-color')
     //   copiedEventObject.textColor     = $(this).css('text-color')

        // render the event on the calendar
        // the last `true` argument determines if the event "sticks" (http://arshaw.com/fullcalendar/docs/event_rendering/renderEvent/)
        $('#calendar').fullCalendar('renderEvent', copiedEventObject, true)

        // is the "remove after drop" checkbox checked?
        if ($('#drop-remove').is(':checked')) {
          // if so, remove the element from the "Draggable Events" list
          $(this).remove();
        }

      }
    })
    
    });
$(document).on('click', '.js-sweetalerttext', function (e) {
    var msg = $(this).data('msg');
    swal({
            title: "",
            text: msg,
            showCancelButton: false,
            confirmButtonColor: "#DD6B55",
            closeOnConfirm: true
        });
        
});
$(document).on('click', '.js-sweetalertthought', function (e) {
    var msg = $(this).data('msg');
    swal({
            title: "",
            text: msg,
            showCancelButton: false,
            confirmButtonColor: "#DD6B55",
            closeOnConfirm: true
        });
});
$(document).on('click', '.js-pnews', function (e) {
    var msg = $(this).data('msg');
    swal({
            title: "",
            text: msg,
            showCancelButton: false,
            confirmButtonColor: "#DD6B55",
            closeOnConfirm: true
    });
});
$(document).on('click', '.js-newsletter', function (e) {
    var msg = $(this).data('msg');
    swal({
            title: "",
            text: msg,
            showCancelButton: false,
            confirmButtonColor: "#DD6B55",
            closeOnConfirm: true
    });
});
</script>
@stop

Copyright © 2021 - 2025 IMMREX7