<!DOCTYPE html>
<html lang="<?php echo e(app()->getLocale()); ?>">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <!-- CSRF Token -->
    <meta name="csrf-token" content="<?php echo e(csrf_token()); ?>">
    <title><?php echo e(config('app.name', 'Laravel')); ?></title>
    <link rel="shortcut icon" href="<?php echo asset('/media/icons/title.jpg'); ?>" />
    
    
    <link rel="dns-prefetch" href="https://fonts.gstatic.com">
    <link href="https://fonts.googleapis.com/css?family=Raleway:300,400,600" rel="stylesheet" type="text/css">
	<link href="<?php echo asset('/font-awesome/css/font-awesome.min.css'); ?>" media="all" rel="stylesheet" type="text/css"/>
    <link href="<?php echo asset('/css/bootstrap_md.min.css'); ?>" media="all" rel="stylesheet" type="text/css"/>
    <link href="<?php echo asset('/css/mdb.min.css'); ?>" media="all" rel="stylesheet" type="text/css"/>
    <link href="<?php echo asset('/css/toastr.min.css'); ?>" media="all" rel="stylesheet" type="text/css"/>
	<link href="<?php echo asset('/css/floating_button.css'); ?>" media="all" rel="stylesheet" type="text/css" />
    <link href="<?php echo asset('/css/scrollbar.css'); ?>" media="all" rel="stylesheet" type="text/css"/>
    <link href="<?php echo asset('/css/sidebar.css'); ?>" media="all" rel="stylesheet" type="text/css"/>
    <link href="<?php echo asset('/css/responsiv.css'); ?>" media="all" rel="stylesheet" type="text/css" />
    <style type="text/css">
        html , body{
            height: 100%;
        }
        .nevbar_fixed_outside{
            position: fixed;
            width: 100%;
            z-index: 1000;
            height: 85px;
        }
        
        main .container{
            padding-top: 85px;
        }
        
/*        .card_row:hover{
              transform: scale(1.1);  
           
        }*/
        
        .main-container , .custom-div-style{
            height: calc(100vh - 110px);
        }
		.input-group label.error{
			 margin-top: .25rem;
			 font-size: 13px;
			    width: 100%;
		}
        .img_size{
            width: 100px;
            height:90px;
        }
        
        .img_size_internet{
            width: 110px;
            height:100px;           
        }
         .main-container.scroll-div{
            overflow-y: auto;
             overflow-x: hidden;
        }
        
        .card_row{
            margin-top: 23px;
             transition: transform .2s;
        }
        .card_row-last{
           margin-bottom:23px;
        }
        .ml0{
            margin-left: 0px;
        }
    @media (max-width: 768px)
    {
       .f-strip {
            height: 31px;
            padding: 3px 20px 3px 20px;
            font-size: .55rem;
        }
        .main-container{
            height: calc(100vh - 92px);
        }
        
        
        .img_size{
            width: 70px;
            height:60px;
        }
        .img_size_internet{
            width: 83px;
            height:73px;           
        }
        .mt25{
            margin-top: 0px;
        }
        
        .custom-div-style{
             height: 100%;
             margin-bottom: 20px;
        }
        
        .card_row{
            margin-top: 14px;
        }
        .card_row-last{
           margin-bottom:14px;
        }
    }
        
        
.card_hover .card {
  position: relative;
  transition:color 0.25s ease;
  border:3px solid white;
}

.card_hover .card:hover {
  color:blue;
}

.card_hover .card::after {
  position: absolute;
  content: '';
  top:0;
  left: 0;
  width: 0;
  height: 100%;
  background-color:#e6e6e6;
  transform-origin:left;
  transition:width 0.25s ease;
  z-index:-1;
}

.card_hover .card:hover::after {
  width: 100%;
}   
        
        
        
        
    </style>
    
    <noscript>
        <style>

            #u1
            {
                visibility:visible;
                margin-top: 40px;
            }
            body
            {
                visibility: hidden;
                overflow: hidden;
                /*display: :none;*/
            }
        </style>

        <div class="container" id="u1">
            <div class="row">
                <div class="col col-md-12 col-xs-12 col-sm-12 col-lg-12 text-center">
                    <p class="error"><i>Javascript is not enabled in your browser</i></p>
                    <p>Please use the latest version of any one of the browsers for best response.</p>
                </div>
            </div>
            <div class="row mt25" id="r1">
                <div class="col-md-4 col-xs-4   text-center">
                    <img src="<?php echo e(asset('images/mozilla_icon.png')); ?>" class="img-responsive img_size">
                    <p><label>Mozilla Firefox</label></p>
                </div>
                <div class="col-md-4 col-xs-4   text-center">
                    <img src="<?php echo e(asset('images/google_chrome.png')); ?>" class="img-responsive img_size">
                    <p><label>Google Chrome</label></p>
                </div>
                <div class="col-md-4 col-xs-4   text-center">
                    <img src="<?php echo e(asset('images/explorer_icon1.png')); ?>"  class="img-responsive img_size_internet">
                    <p><label>Internet Explorer</label></p>
                </div>
                <br><br>
            </div>
        </div>
    </noscript>
 <?php echo $__env->yieldContent('dynamic_css'); ?>
	<script src="<?php echo e(asset('js/lib/jquery-3.2.1.min.js')); ?>"></script>
</head>
<body>
<div class="page-loader-wrapper">
    <div class="loader">
        <div class="preloader">
            <div class="spinner-layer pl-red">
                <div class="circle-clipper left">
                    <div class="circle"></div>
                </div>
                <div class="circle-clipper right">
                    <div class="circle"></div>
                </div>
            </div>
        </div>
        <p>Please wait...</p>
    </div>
</div>
    <div id="app">
        <div class="nav-bar-main-div">
            <nav class="navbar navbar-expand-md navbar-light navbar-laravel cust_nav nevbar_fixed_outside" style="padding: 5px 0px;">
                <div class="container">

                    <div class="navbar-header">
                        <a class="navbar-brand" href="<?php echo e(url('/home')); ?>" style="padding-left: 5px;">
                            <img src="<?php echo asset('/images/logo1.png'); ?>" class="header-image-size" style=""> 
                        </a>
                    </div>
                    <div class="nav-item dropdown">
<!--                        <a class="nav-link dropdown-toggle" href="#" id="navbardrop" data-toggle="dropdown">
                            <i class="fa fa-user-circle-o fa-2x" aria-hidden="true"></i>
                        </a>-->
                         <a class="nav-link dropdown-toggle" href="#" id="navbardrop" data-toggle="dropdown">
                            <?php echo e(Auth::user()->username); ?>

                         </a>
                        <div class="dropdown-menu dopdown" style="padding: 3px 20px;">	
<!--                            <a class="dropdown-item" href="#">
                                 <?php echo e(Auth::user()->username); ?>

                            </a>-->
                            <a class="dropdown-item" href="#"  id="passwordChange">
                                <i class="fa fa-key " aria-hidden="true"> </i> Change Password
                            </a>

                            <a class="dropdown-item" href="<?php echo e(route('logout')); ?>"
                               onclick="event.preventDefault(); document.getElementById('logout-form1').submit();" style="border-top: 1px solid #d8d0d0;"><i class="fa fa-power-off" aria-hidden="true"> </i>
                               Logout
                            </a>
                            <form id="logout-form1" action="<?php echo e(route('logout')); ?>" method="POST" style="display: none;">
                                <?php echo e(csrf_field()); ?>

                            </form>
                        </div>
                    </div>
                </div>
            </nav>
        
        </div>
        <div class="main-container scroll-div">
            <div class="container">
                    <?php echo $__env->yieldContent('content'); ?>
            </div>
        </div>
   


        <input type="hidden" id="app_url" name="app_url" value=" <?php echo e(config('app.url', 'http://localhost')); ?>">    
        

        
    </div>
      <!-- Floating table div -->
    <div class="floating-button" href="#" id="msgButton"><i class="fa fa-envelope-o" aria-hidden="true"></i></div>
    <!-- Floating ,odal table -->
    <!-- Modal -->
    <div class="modal right fade" id="employeeMsg" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
  aria-hidden="true">
          <div class="modal-dialog modal-notify modal-warning modal-side modal-bottom-right" role="document">
            <!--Content-->
            <div class="modal-content">
                  <!--Header-->
                  <div class="modal-header text-center">
                    <h4 class="modal-title white-text w-100 font-weight-bold py-2">Message</h4>
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                      <span aria-hidden="true" class="white-text">&times;</span>
                    </button>
                  </div>
                  <?php if($errors->any()): ?>
                    <div class="alert alert-danger">
                        <ul>
                            <?php $__currentLoopData = $errors->all(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $error): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <li><?php echo e($error); ?></li>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        </ul>
                    </div>
                <?php endif; ?>
            <!-- msg send form -->
        <form method="POST" action="send" id="employeeMsgForm" enctype="multipart/form-data">
             <?php echo e(csrf_field()); ?>

              <div class="modal-body">
                
                <div class="form-group">
                    <label>Type</label>
                    <select class="form-control" name="msg_type" id="msg_type">
                        <option value="">==== Please Select====</option>
                        <option value="Normal">Normal</option>
                        <option value="High">High</option>
                        <option value="Critical">Critical</option>
                        <!-- <option>4</option> -->
                    </select>
                </div>
                <div class="form-group">
                    <label>Title</label>
                    <input type="text" name="msg_title" id="msg_title"  class="form-control" placeholder="">
                </div>
                <div class="form-group">
                    <label>Message</label>
                    <textarea class="form-control" rows="5" placeholder="" name="msg_body" id="msg_body"></textarea>
                </div>
                <div class="form-group">
                    <label>Attachment</label><br/>
                    <input type="file" class="form-control"  name="select_file" id="select_file" />
                </div>
              </div>
              <!--Footer-->
              <div class="modal-footer justify-content-center">
                <button type="submit" class="btn btn-sm btn-outline-success waves-effect">Send</button>
                <button type="submit" class="btn btn-sm btn-outline-warning waves-effect" class="close" data-dismiss="modal">Cancel</button>
              </div>
            </form>

           </div>
           <!--/.Content-->
         </div>
    </div>
	
	
<div class="modal fade right show" id="changePassword" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
  aria-hidden="true">
  <div class="modal-dialog modal-side modal-top-right" role="document">
    <div class="modal-content">
      <div class="modal-header text-center">
        <h4 class="modal-title w-100 font-weight-bold">Change Password</h4>
        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
      </div>
<form action="" method="post" id="changePasswordModel" class="needs-validation" novalidate>
	<?php echo e(csrf_field()); ?>

    <input type="hidden" value="<?php echo e(Auth::user()->username); ?>" name="employee_code">
      <div class="modal-body mx-3">
		<div class="input-group mb-4 mt-2">
		  <div class="input-group-prepend">
			<span class="input-group-text"><i class="fa fa-lock prefix grey-text"></i></span>
		  </div>
		  <input type="password" maxlength="20" minlength="4" value="" style="padding-top: 8px;" name="oldpassword" id="oldpassword" placeholder="Old Password" class="form-control" required>
			<div class="invalid-feedback">
			  Please provide old password. Length should be 4-to-20.
			</div>
		</div>
		<div class="input-group mb-4">
		  <div class="input-group-prepend">
			<span class="input-group-text"><i class="fa fa-lock prefix grey-text"></i></span>
		  </div>
		  <input type="password" maxlength="20" minlength="4" value="" style="padding-top: 8px;" name="newpassword" id="newpassword" placeholder="New Password" class="form-control" required>
			<div class="invalid-feedback">
			  Please provide a new password.Length should be 4-to-20.
			</div>
		</div>
		<div class="input-group mb-4">
		  <div class="input-group-prepend">
			<span class="input-group-text"><i class="fa fa-lock prefix grey-text"></i></span>
		  </div>
		  <input type="password" maxlength="20" minlength="4" value="" style="padding-top: 8px;" name="repassword" id="repassword" placeholder="Confirm New Password" class="form-control" required>
			<div class="invalid-feedback">
			  Please confirm new password again.Length should be 4-to-20
			</div>
		</div>
      </div>
      <div class="modal-footer d-flex justify-content-center">
	    <button type="button" class="btn btn-warning" data-dismiss="modal">Cancel</button>
        <button type="submit" class="btn btn-default">Save</button>

      </div>
  </form>
    </div>
  </div>
</div>
	
	
<script src="<?php echo e(asset('js/lib/popper.min.js')); ?>"></script>
<script src="<?php echo e(asset('js/lib/bootstrap_md.min.js')); ?>"></script>	
<script src="<?php echo e(asset('js/lib/jqueryValidate.js')); ?>"></script>
<script src="<?php echo e(asset('js/lib/jqueryAddValidate.js')); ?>"></script>	
	
<script src="<?php echo e(asset('js/lib/toastr.min.js')); ?>"></script>	
<script src="<?php echo e(asset('js/custom/custom_new.js')); ?>"></script>	
<script>

	$('#passwordChange').on('click',function(e){
		e.preventDefault();
		 $('#changePasswordModel')[0].reset();
		$('#changePassword').modal({backdrop: 'static', keyboard: false});  
	})	

	
$('#changePasswordModel').validate({
        rules: {
            oldpassword: {
                required: true,
                 minlength: 5
            },
            newpassword: {
                required: true,
                minlength: 5
            },
			repassword: {
                required: true,
                minlength: 5,
				equalTo: "#newpassword"
            }
        }
    });
	
$('#changePasswordModel').on('submit',function(e){
	e.preventDefault();
	$('#changePasswordModel').validate();
	
	
    if($('#changePasswordModel').valid()){
	   var form = $('#changePasswordModel')[0];
       var data = new FormData(form);
	   $.ajax({
            type: "POST",
		    enctype: 'multipart/form-data',
            processData: false,
            contentType: false,
            cache: false,
            url: "<?php echo e(route('changeUserPassword')); ?>",
            data: data,
            dataType: "json",
            success: function (data) {
                if (data.msgType==true) {
					$('#changePassword').modal('hide');
                    toastr.success(data.msg);
                } else {
					if(data.oldpassword){
					     $('#oldpassword-error').remove();  
					     $('#oldpassword').after('<label id="oldpassword-error" class="error" for="oldpassword">'+data.oldpassword+'</label>');

					}
					if(data.newpassword){
					  $('#newpassword').after('<label id="newpassword-error" class="error" for="newpassword">'+data.newpassword+'</label>');	
					}
				    if(data.repassword){
					  $('#repassword').after('<label id="repassword-error" class="error" for="repassword">'+data.repassword+'</label>');	
					}
					
					
                   toastr.error(data.msg);
                }
            },
            error: function (jqXHR, textStatus, errorThrown) {

                callAjaxErrorFunction(jqXHR, textStatus, errorThrown);
            },
            complete: function (data) {
                $('.page-loader-wrapper').fadeOut();
            }
        });
	 }
	
});
$('#msgButton').on('click',function(e){
    e.preventDefault();
    $('#employeeMsgForm')[0].reset();
    $('#employeeMsg').modal();

 });

  $('#employeeMsgForm').validate({ 
        rules: {
            msg_type: {
                required: true
            },
            msg_title: {
                required: true,
                maxlength: 100
            },
            select_file: {
              required: true,
              extension:'mimes:jpeg,png,jpg,pdf,doc'
            },
            msg_body: {
                required: true,
                maxlength: 250
            }
        }
    });




$('#employeeMsgForm').on('submit',function(e){
    e.preventDefault();
    $('#employeeMsgForm').validate();
    
    
    if($('#employeeMsgForm').valid()){

         $('.page-loader-wrapper').fadeIn();
/*        var formMsg = $('#employeeMsgForm')[0];
        var dataMsg = new FormData(formMsg);*/
            $.ajax({
                headers: {
                    'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
                },
                type: "POST",
                url: '<?php echo e(url('send')); ?>',
                dataType: "json",
                data: new FormData(this),
                contentType: false,
                cache: false,
                processData: false,
                success: function (data) {
                    if(data.msgType == true) {
                        // get_hold_salary_data();
                        toastr.success(data.msg)
                       $('#employeeMsgForm')[0].reset();
                    }else {
                        if(data.error==true){
                              if(data.msg_type){
                                   if($('#msg_type-error').length != 0){
                                      $('#msg_type-error').remove();
                                   }
                                   $('#msg_type').after('<label id="msg_type-error" class="error" for="msg_type" style="">'+data.msg_type+'.</label>');
                             }

                            if(data.msg_title){
                                   if($('#msg_title-error').length != 0){
                                      $('#msg_title-error').remove();
                                   }
                                   $('#msg_title').after('<label id="msg_title-error" class="error" for="msg_title" style="">'+data.msg_type+'.</label>');
                             }

                            if(data.msg_body){
                                   if($('#msg_body-error').length != 0){
                                      $('#msg_body-error').remove();
                                   }
                                   $('#msg_body').after('<label id="msg_body-error" class="error" for="msg_body" style="">'+data.msg_body+'.</label>');
                             }

                            if(data.select_file){
                                   if($('#select_file-error').length != 0){
                                      $('#select_file-error').remove();
                                   }
                                   $('#select_file').after('<label id="select_file-error" class="error" for="select_file" style="">This field is required.</label>');
                             }
                        }else{
                           toastr.error(data.msg)
                        }
                    }
                },
                error: function (jqXHR, textStatus, errorThrown) {
                    callAjaxErrorFunction(jqXHR, textStatus, errorThrown);
                },
                complete: function (data) {
                    $('.page-loader-wrapper').fadeOut();
                }
            });
     }
     
});
</script>			
	
<div class="f-strip">
    <div class="row">
        <div class="col-md-12">Copyright © 2019, PNRD.All rights reserved. Designed, Developed &amp; Maintained by <a href="https://gratiatechnology.com/">Gratia Technology</a></div>
    </div>
</div>	
	
</body>
</html>
