|
Server : Apache/2.4.41 (Ubuntu) System : Linux vmi1525618.contaboserver.net 5.4.0-105-generic #119-Ubuntu SMP Mon Mar 7 18:49:24 UTC 2022 x86_64 User : www-data ( 33) PHP Version : 8.2.12 Disable Function : NONE Directory : /var/www/leadai/leadai.co.in/storage/framework/views/ |
Upload File : |
<?php $__env->startSection('content'); ?>
<style>
.male {
background: #8c85ff;
text-transform: capitalize;
color: white;
}
.female {
background: #e16498;
text-transform: capitalize;
color: white;
}
</style>
<!-- begin::main content -->
<main class="main-content">
<div class="container">
<!-- begin::page header -->
<div class="page-header">
<h3><?php echo e(__('message.student')); ?></h3>
<nav aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a
href="<?php echo e(asset('superadmin/dashboard')); ?>"><?php echo e(__('message.dashboard')); ?></a></li>
<li class="breadcrumb-item active" aria-current="page"><?php echo e(__('message.student')); ?>
<?php echo e(__('message.list')); ?></li>
</ol>
</nav>
</div>
<?php
$actual_link = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
$url = explode('?', $actual_link);
$queryUrl = '';
if (isset($url[1])) {
$queryUrl = '?' . $url[1];
}
?>
<!-- end::page header -->
<?php if (isset($component)) { $__componentOriginal8a5ba9c90b64d384232e9948b1023e746ba08e74 = $component; } ?>
<?php $component = $__env->getContainer()->make(App\View\Components\FlashMessage::class, []); ?>
<?php $component->withName('flashMessage'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php $component->withAttributes([]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal8a5ba9c90b64d384232e9948b1023e746ba08e74)): ?>
<?php $component = $__componentOriginal8a5ba9c90b64d384232e9948b1023e746ba08e74; ?>
<?php unset($__componentOriginal8a5ba9c90b64d384232e9948b1023e746ba08e74); ?>
<?php endif; ?>
<div class="card">
<div class="card-header mt-3">
<form method="GET" action="<?php echo e(asset('students-of-week')); ?>">
<div class="row mb-3">
<div class="col-md-4">
<label><?php echo e(__('message.startdate')); ?></label>
<input type="date" class="form-control"
value="<?php echo e(isset($_GET['from_date']) && !empty($_GET['from_date']) ? $_GET['from_date'] : ''); ?>"
name="from_date">
</div>
<div class="col-md-4">
<label><?php echo e(__('message.enddate')); ?></label>
<input type="date" class="form-control"
value="<?php echo e(isset($_GET['to_date']) && !empty($_GET['to_date']) ? $_GET['to_date'] : ''); ?>"
name="to_date">
</div>
</div>
<div class="row mb-3">
<div class="col-md-3">
<label for="class"><?php echo e(__('message.class')); ?></label>
<select class="form-control select2 <?php echo e($errors->has('class') ? 'is-invalid' : ''); ?>"
name="class" id="class">
<?php if(!empty($classes)): ?>
<option value="">--select-class--</option>
<?php $__currentLoopData = $classes; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $class): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<option value="<?php echo e($class->id); ?>"><?php echo e($class->class); ?></option>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
<?php endif; ?>
</select>
<?php if($errors->has('class')): ?>
<div class="invalid-feedback">
<?php echo e($errors->first('class')); ?>
</div>
<?php endif; ?>
</div>
<div class="col-md-3">
<label for="section"><?php echo e(__('message.section')); ?></label>
<select class="form-control select2 <?php echo e($errors->has('section') ? 'is-invalid' : ''); ?>"
name="section" id="section">
</select>
<?php if($errors->has('section')): ?>
<div class="invalid-feedback">
<?php echo e($errors->first('section')); ?>
</div>
<?php endif; ?>
</div>
<div class="col-md-2">
<label for="entry"><?php echo e(__('message.enteries')); ?></label>
<select class="form-control select2" id="entry" name="entry">
<option value="" disabled selected>All</option>
<option value="50" <?php
if (isset($_GET['entry'])) {
if ($_GET['entry'] == '50') {
echo 'selected';
}
}
?>>50</option>
<option value="100" <?php
if (isset($_GET['entry'])) {
if ($_GET['entry'] == '100') {
echo 'selected';
}
}
?>>100</option>
<option value="1000" <?php
if (isset($_GET['entry'])) {
if ($_GET['entry'] == '1000') {
echo 'selected';
}
}
?>>1000</option>
<option value="5000" <?php
if (isset($_GET['entry'])) {
if ($_GET['entry'] == '5000') {
echo 'selected';
}
}
?>>5000</option>
</select>
</div>
<div class="col-md-2">
<label for="section"><?php echo e(__('message.gender')); ?></label>
<select class="form-control select2" id="gender" name="gender">
<option value="">--select-gender--</option>
<option <?php echo e(isset($_GET['gender']) && $_GET['gender'] == 'male' ? 'selected' : ''); ?>
value="male">Male</option>
<option <?php echo e(isset($_GET['gender']) && $_GET['gender'] == 'female' ? 'selected' : ''); ?>
value="female">Female</option>
</select>
</div>
<div class="col-md-2">
<label for="section"><?php echo e(__('message.student')); ?> <?php echo e(__('message.status')); ?></label>
<select class="form-control select2" id="status" name="status">
<option value="">--select-status--</option>
<option <?php echo e(isset($_GET['status']) && $_GET['status'] == '1' ? 'selected' : ''); ?>
value="1">Active</option>
<option <?php echo e(isset($_GET['status']) && $_GET['status'] == '0' ? 'selected' : ''); ?>
value="0">Inactive</option>
</select>
</div>
</div>
<div class="row mb-3">
<div class="col-md-2 mb-3">
<select class="form-control select2" name="type" id="type">
<option value="">--search-type--</option>
<option value="first_name">First Name</option>
<option value="rollno">Rollno</option>
<option value="email">Email</option>
<option value="phone">Phone</option>
<option value="guardian_name">Parent Name</option>
<option value="parent_email">Parent Email</option>
<option value="parent_phone">Parent Phone</option>
</select>
</div>
<div class="col-md-4 mb-3">
<input type="text" id="search" name="search" class="form-control"
value="<?php echo e(Request::has('search') ? Request::get('search') : ''); ?>"
placeholder="Search by Type...">
</div>
<div class="col-md-6 mb-3">
<button type="submit" class="btn btn-success">
<i class="fa fa-search fa-lg"></i>
</button>
<a href="<?php echo e(asset('students-of-week')); ?>" class="btn btn-primary text-white">
<i class="fa fa-recycle fa-lg"></i>
</a>
<?php if(Auth::user()->hasRole('superadmin') || Auth::user()->can('delete-student')){ ?>
<a href="<?php echo e(route('studentOfWeek.add')); ?>" class="btn btn-info text-white">
<i class="fa fa-plus fa-lg mr-2"></i><?php echo e(__('message.studentofweek')); ?>
</a>
<?php } ?>
<?php if(Auth::user()->hasRole('superadmin') || Auth::user()->can('delete-student')){ ?>
<a id="delete-multiple" href="javascript:;" class="btn btn-danger text-white pull-right">
<i class="fa fa-trash-o fa-lg"></i></a>
<?php } ?>
</div>
</div>
</form>
</div>
<div class="card-body">
<?php if(isset($students)): ?>
<div class="table-responsive">
<table id="students" class="table table-striped table-bordered">
<thead>
<tr>
<th>
<input type="checkbox" id="checkAll">
</th>
<th><?php echo e(__('message.oldcode')); ?></th>
<th><?php echo e(__('message.rollno')); ?></th>
<th><?php echo e(__('message.photo')); ?></th>
<th><?php echo e(__('message.studentname')); ?></th>
<th><?php echo e(__('message.fathername')); ?></th>
<th><?php echo e(__('message.schoolname')); ?></th>
<th><?php echo e(__('message.class')); ?></th>
<th><?php echo e(__('message.section')); ?></th>
<th><?php echo e(__('message.assignby')); ?></th>
<th><?php echo e(__('message.created')); ?></th>
<th><?php echo e(__('message.action')); ?></th>
</tr>
</thead>
<tbody>
<?php if(!empty($students)): ?>
<?php $__currentLoopData = $students; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $student): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<tr>
<td>
<input class="studentids" type="checkbox"
value="<?php echo e($student->student_of_weeks_id); ?>" name="studentids[]">
</td>
<td>
<?php echo e($student->previous_admission_no); ?>
</td>
<td>
<button
class="btn btn-info btn-sm waves-effect waves-button waves-light">
<?php echo e($student->enrollment_no); ?>
</button>
</td>
<td>
<?php if(!empty($student->profile_pics)): ?>
<img class="w-50"
src="<?php echo e(asset('public/profiles/') . '/' . $student->profile_pics); ?>"
alt="profile">
<?php else: ?>
<img class="w-50"
src="<?php echo e($student->gender == 'male' ? asset('public/profiles/') . '/male.png' : asset('public/profiles/') . '/female.png'); ?>"
alt="profile">
<?php endif; ?>
</td>
<td>
<span class="font-size-13"><?php echo e($student->fullname); ?></span>
<span
class="badge <?php echo e($student->gender); ?>"><?php echo e($student->gender); ?></span>
</td>
<td>
<?php if($student->guardian->count() > 0): ?>
<?php echo e($student->guardian->first()->father_name); ?>
<?php endif; ?>
</td>
<td>
<?php if($student->school->count() > 0): ?>
<?php echo e($student->school->last()->school); ?>
<?php else: ?>
NA
<?php endif; ?>
</td>
<td>
<?php
$getClass = App\Helpers\Frontend::getSingledata('classes', ['id' => $student->class_id]);
?>
<?php if(!empty($getClass)): ?>
<?php echo e($getClass->class); ?>
<?php else: ?>
NA
<?php endif; ?>
</td>
<td>
<?php
$getSection = App\Helpers\Frontend::getSingledata('sections', ['id' => $student->section_id]);
?>
<?php if(!empty($getSection)): ?>
<?php echo e($getSection->section); ?>
<?php else: ?>
NA
<?php endif; ?>
</td>
<td>
<?php
$teacher = App\Helpers\Frontend::getSingledata('users', ['id' => $student->teacher_id]);
?>
<?php echo e($teacher->name); ?>
</td>
<td>
<button
class="btn btn-success btn-sm waves-effect waves-button waves-light">
<?php echo e(date('d-m-Y', strtotime($student->created_at))); ?>
</button>
</td>
<td>
<div class="dropdown">
<button class="btn btn-sm btn-dark dropdown-toggle" type="button"
data-toggle="dropdown">
<?php echo e(__('message.action')); ?>
</button>
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
<?php if(Auth::user()->hasRole('superadmin') || Auth::user()->can('delete-student')){ ?>
<a class="dropdown-item delete-confirm"
link="<?php echo e(asset('student-of-week/delete') . '/' . $student->student_of_weeks_id); ?>"
href="javascript:;"><?php echo e(__('message.delete')); ?></a>
<?php } ?>
</div>
</div>
</td>
</tr>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
<?php else: ?>
<h1>No Record Found!!</h1>
<?php endif; ?>
</tbody>
</table>
</div>
<div class="pagination-block">
<?php echo e($students->appends($_GET)->links('includes.paginationlinks')); ?>
<label>Showing total <?php echo $students->total(); ?> results</label>
</div>
<?php endif; ?>
</div>
</div>
</div>
</main>
<!-- end::main content -->
<?php $__env->stopSection(); ?>
<?php $__env->startPush('footer-script'); ?>
<script src="<?php echo e(asset('public/admin/vendors/dataTable/jquery.dataTables.min.js')); ?>"></script>
<script src="<?php echo e(asset('public/admin/vendors/dataTable/dataTables.bootstrap4.min.js')); ?>"></script>
<script src="<?php echo e(asset('public/admin/vendors/dataTable/dataTables.responsive.min.js')); ?>"></script>
<script>
// Get Section
$("#class").on('change', function() {
var URL = "<?php echo e(asset('admission/get-section/')); ?>" + "/" + $(this).val();
$.ajax({
type: "GET",
url: URL,
dataType: "JSON",
success: function(data) {
$("#section").empty();
$("#section").select2({
data: data
});
$("#section").val("<?php echo e(Request::get('section')); ?>").trigger('change');
}
});
});
$("#checkAll").click(function() {
$('.studentids').not(this).prop('checked', this.checked);
});
// Delete Multiple
$("#delete-multiple").click(function() {
var URL = "<?php echo e(asset('student-of-week/delete')); ?>";
var student_ids = [];
$('.studentids:checkbox:checked').each(function() {
student_ids.push($(this).val());
});
swal({
title: 'Are you sure?',
text: 'Once deleted, you will not be recover!',
icon: 'warning',
dangerMode: true,
buttons: ["Cancel", "Yes!"],
}).then(function(value) {
if (value) {
$.ajaxSetup({
headers: {
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
}
});
$.ajax({
type: "post",
data: {
"student_ids": student_ids
},
url: URL,
dataType: "html",
success: function(result) {
console.log(result);
}
});
swal("success!", "Successfully deleted!", "success");
window.location.reload();
}
});
});
</script>
<?php if(!empty(Request::get('school'))): ?>
<script>
$("#schools").val("<?php echo e(Request::get('school')); ?>").trigger('change');
</script>
<?php endif; ?>
<?php if(!empty(Request::get('class'))): ?>
<script>
$("#class").val("<?php echo e(Request::get('class')); ?>").trigger('change');
</script>
<?php endif; ?>
<?php if(!empty(Request::get('section'))): ?>
<script>
$("#section").val("<?php echo e(Request::get('section')); ?>").trigger('change');
</script>
<?php endif; ?>
<?php if(!empty(Request::get('type'))): ?>
<script>
$("#type").val("<?php echo e(Request::get('type')); ?>").trigger('change');
</script>
<?php endif; ?>
<!-- end::dataTable -->
<?php $__env->stopPush(); ?>
<?php echo $__env->make('layout', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH F:\xampp\htdocs\school_saas_erp\resources\views/students_of_week/student-list.blade.php ENDPATH**/ ?>