IMMREX7
<?php $__env->startSection('content'); ?>
<div class="row clearfix">
<div class="col-lg-12 col-md-12 col-sm-12">
<div class="card">
<div class="header">
<h2><strong><?php if(isset($extraFeehead)): ?>Edit <?php else: ?> Add <?php endif; ?></strong> Extra Fee Head
</h2>
</div>
<div class="body">
<?php if(isset($extraFeehead)): ?>
<?php echo Form::model($extraFeehead, ['method' => 'PATCH', 'action' => ['School\ExtraFeeController@update', $extraFeehead->idExtraFeehead], 'class' => 'form-horizontal']); ?>
<?php else: ?>
<?php echo Form::open(['url' => 'school/extra-feehead', 'class' => 'form-horizontal']); ?>
<?php endif; ?>
<div class="row clearfix">
<div class="col-sm-3 form-control-label">
<label for="classname" class="required">Class</label>
</div>
<div class="col-sm-3">
<div class="form-group">
<?php if(isset($extraFeehead)): ?>
<?php echo Form::select('idClass',$classes,null,['class' => 'form-control show-tick ms']); ?>
<?php else: ?>
<div style="border:1px solid #ccc; width:250px; height: 110px; overflow-y: scroll;">
<div class="checkbox-inline" style="padding-left:10px;padding-top:5px;"><label style="margin-right:42px;"><strong>Select All</label></strong>
<input type="checkbox" class="select-all" name='all'>
<?php $__currentLoopData = $classes; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key=>$value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<?php if($value != "Select All"): ?>
<div class="checkbox-inline" style="padding-left:5px;">
<label style="margin-right:10px;"><?php echo e($value); ?></label>
<input type="checkbox" name="classes[]" value="<?php echo e($key); ?>" class="chkall">
</div>
<?php endif; ?>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</div>
</div>
<?php endif; ?>
<?php if($errors->has('idClass')): ?>
<label id="minmaxlength-error" class="error" for="minmaxlength">
<strong><?php echo e($errors->first('idClass')); ?></strong>
</label>
<?php endif; ?>
<?php if($errors->has('all')): ?>
<label id="minmaxlength-error" class="error" for="minmaxlength">
<strong>Either Select All or any one class to add the feehead</strong>
</label>
<?php endif; ?>
<span id='classerror'></span>
</div>
</div>
</div>
<div class="row clearfix">
<div class="col-sm-3 form-control-label">
<label for="classname" class="required">Fee Header Name</label>
</div>
<div class="col-sm-3">
<div class="form-group">
<?php echo Form::text('feeheadName',null,['class' => 'form-control show-tick ms']); ?>
<?php if($errors->has('feeheadName')): ?>
<label id="minmaxlength-error" class="error" for="minmaxlength">
<strong><?php echo e($errors->first('feeheadName')); ?></strong>
</label>
<?php endif; ?>
</div>
</div>
</div>
<div class="row clearfix">
<div class="col-sm-3 form-control-label">
<label for="classname" class="required">Collection Type</label>
</div>
<div class="col-sm-3">
<div class="form-group">
<?php echo Form::select('type',['Offline'=>'Offline','Online'=>'Online'],null,['class' => 'form-control show-tick ms select2']); ?>
<?php if($errors->has('type')): ?>
<label id="minmaxlength-error" class="error" for="minmaxlength">
<strong><?php echo e($errors->first('type')); ?></strong>
</label>
<?php endif; ?>
</div>
</div>
</div>
<div class="row clearfix">
<div class="col-sm-3 form-control-label">
<label for="classname" class="required">Amount</label>
</div>
<div class="col-sm-3">
<div class="form-group">
<?php echo Form::number('amount',null,['class' => 'form-control show-tick ms']); ?>
<?php if($errors->has('amount')): ?>
<label id="minmaxlength-error" class="error" for="minmaxlength">
<strong><?php echo e($errors->first('amount')); ?></strong>
</label>
<?php endif; ?>
</div>
</div>
</div>
<div class="row clearfix">
<div class="col-sm-8 offset-sm-2">
<?php if(isset($extraFeehead)): ?>
<?php echo Form::submit('UPDATE',['class' => 'btn btn-raised btn-primary btn-round waves-effect']); ?>
<?php else: ?>
<?php echo Form::submit('SAVE',['class' => 'btn btn-raised btn-primary btn-round waves-effect']); ?>
<?php endif; ?>
<?php echo Form::close(); ?>
</div>
</div>
</div>
</div>
</div>
<div class="col-sm-12">
<div class="card">
<div class="header">
<h2><strong>Extra Fee Header</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>Class</th>
<th>Feehead Name</th>
<th>Amount</th>
<th>Type</th>
<th>Created By</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<?php $i = 1; ?>
<?php $__currentLoopData = $extraFeeheads; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $var): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<tr>
<th scope="row"><?php echo e($i); ?></th>
<?php if(isset($var->idClass)): ?>
<td><?php echo e($var->className); ?></td>
<?php else: ?>
<td>All Classes</td>
<?php endif; ?>
<td><?php echo e($var->feeheadName); ?></td>
<td><?php echo e($var->amount); ?></td>
<td><?php echo e($var->type); ?></td>
<td><?php echo e($var->name); ?></td>
<td>
<a href="<?php echo e(url('school/extra-feehead/' . $var->idExtraFeehead . '/edit')); ?>" class="btn btn-raised btn-info waves-effect btn-round">Edit </a>
<button class="btn btn-raised btn-danger waves-effect btn-round js-sweetalert" data-id="<?php echo e($var->idExtraFeehead); ?>" data-type="confirm">DELETE</button>
</td>
</tr>
<?php $i++; ?>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('script'); ?>
<script>
$(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 delete this feehead!",
type: "warning",
showCancelButton: true,
confirmButtonColor: "#DD6B55",
confirmButtonText: "Yes, delete it!",
closeOnConfirm: true
},
function() {
// console.log('here');
$.ajax({
type: "DELETE",
url: "<?php echo e(url('/school/extra-feehead/')); ?>" +"/"+id,
data: {id:id}
})
.done(function(data) {
swal({
title: "Deleted",
text: "Feehead has been successfully deleted",
type: "success"
},function() {
location.reload();
});
})
.error(function(data) {
swal("Oops", "We couldn't connect to the server!", "error");
});
return false;
});
});
</script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('schools.school_layout', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
Copyright © 2021 -