IMMREX7
@extends('superadmin.layout')
@section('content')
<div class="row clearfix">
<div class="col-sm-12">
<div class="card">
<div class="header">
<h2><strong>List Of Registered Schools</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>School Name</th>
<th>Status</th>
<th>Contact Person</th>
<th>City</th>
<th>Mobile</th>
<th>Email</th>
<th>Password</th>
<th>Website</th>
<th>Online Registration Url</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<?php $i = 1; ?>
@foreach($schools as $school)
<tr>
<th scope="row">{{$i}}</th>
<td>{{$school->schoolName}}</td>
<td>
@if($school->isActive == 'N')
<span class="badge badge-warning">Not-Active</span>
@else
<span class="badge badge-success">Active</span>
@endif
</td>
<td>{{$school->contactPerson}}</td>
<td>{{$school->city}}</td>
<td>{{$school->mobile}}</td>
<td>{{$school->userEmail}}</td>
<td>{{$school->schuser->pwd or ''}}</td>
<td>{{$school->website }}</td>
<td>{{$school->onlineRegUrl}}</td>
<td>
@if($school->onlineRegFormActive == 'N')
<a class="btn btn-warning btn-sm" href="{{url('/admin/sch/'.$school->idSchool.'/online-registration')}}">Activate Online Registration Form</a>
@endif
<br>
<a class="btn btn-primary btn-sm" href="{{url('/admin/schregister/'.$school->idSchool.'/edit')}}">Edit</a>
<a class="btn btn-primary btn-sm" href="{{url('/admin/schregister/'.$school->idSchool.'/')}}">View</a>
<a class="btn btn-success btn-xs" href="{{url('/admin/sch/'.$school->idSchool.'/assignaccess')}}">Assign Access</a>
<br>
<button class="btn btn-danger btn-sm js-sweetalert-delete" data-id="{{$school->idSchool}}" data-type="confirm">DELETE</button>
@if($school->isActive == 'N')
<a class="btn btn-success btn-sm" href="{{url('/admin/sch/'.$school->idSchool.'/activate')}}">Activate</a>
@else
<a class="btn btn-warning btn-sm" href="{{url('/admin/sch/'.$school->idSchool.'/deactivate')}}">Deactivate</a>
@endif
<a class="btn btn-danger btn-sm" target="_blank" href="{{url('/setsessionschool/'.$school->idSchool)}}">Dashboard</a>
<a class="btn btn-info btn-sm" href="{{url('/admin/salary-slip-format/'.$school->idSchool)}}">Salary Format</a>
<a class="btn btn-info btn-sm" href="{{url('/admin/section-update/'.$school->idSchool)}}">Section Update</a>
<!--<button class="btn btn-danger btn-sm js-sweetalert" data-id="{{$school->idSchool}}" data-type="confirm">Dashboard</button>-->
</td>
</tr>
<?php $i++; ?>
@endforeach
</tbody>
</table>
</div>
</div>
</div>
</div>
@stop
@section('script')
<script>
$(document).on('click', '.js-sweetalert-delete', function (e) {
$.ajaxSetup({
headers: {
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
}
});
e.preventDefault();
var id = $(this).data('id');
swal({
title: "Are you sure?",
text: "Are You sure you want to Delete This School!",
type: "warning",
showCancelButton: true,
confirmButtonColor: "#DD6B55",
confirmButtonText: "Yes, Delete!",
closeOnConfirm: true
},
function() {
// console.log('here');
$.ajax({
type: "DELETE",
url: "{{url('/admin/schregister/')}}" +"/"+id,
data: {id:id}
})
.done(function(data) {
swal({
title: "Changed",
text: "School has beeen successfully Deleted !!",
type: "success"
},function() {
window.location = "{{url('/admin')}}";
});
})
.error(function(data) {
swal("Oops", "We couldn't connect to the server!", "error");
});
return false;
});
});
$(document).on('click', '.js-sweetalert', function (e) {
$.ajaxSetup({
headers: {
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
}
});
e.preventDefault();
var id = $(this).data('id');
swal({
title: "Are you sure?",
text: "Are You sure you want to switch the dashboard!",
type: "warning",
showCancelButton: true,
confirmButtonColor: "#DD6B55",
confirmButtonText: "Yes, Switch!",
closeOnConfirm: true
},
function() {
// console.log('here');
$.ajax({
type: "POST",
url: "{{url('/admin/setsessionschool/')}}",
data: {id:id}
})
.done(function(data) {
swal({
title: "Changed",
text: "Dashboard has beeen successfully switched !!",
type: "success"
},function() {
window.location = "{{url('/admin')}}";
});
})
.error(function(data) {
swal("Oops", "We couldn't connect to the server!", "error");
});
return false;
});
});
</script>
@stop
Copyright © 2021 -