<!DOCTYPE html>
<html lang="en">


<!-- Mirrored from edumin.dexignlab.com/xhtml/add-departments.html by HTTrack Website Copier/3.x [XR&CO'2014], Tue, 17 Nov 2020 13:56:15 GMT -->
<head>
  
  <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <title>Rizwan </title>
  <!-- Favicon icon -->
    <link rel="icon" type="image/png" sizes="16x16" href="<?php echo base_url();?>assets/images/favicon.png">
    <link rel="stylesheet" href="<?php echo base_url();?>assets/vendor/bootstrap-select/dist/css/bootstrap-select.min.css">
    <link rel="stylesheet" href="<?php echo base_url();?>assets/css/style.css">
  <!-- Pick date -->
    <link rel="stylesheet" href="<?php echo base_url();?>assets/vendor/pickadate/themes/default.css">
    <link rel="stylesheet" href="<?php echo base_url();?>assets/vendor/pickadate/themes/default.date.css">
     <link href="<?php echo base_url();?>assets/vendor/datatables/css/jquery.dataTables.min.css" rel="stylesheet">
       
    <!-- Custom Stylesheet -->
     

</head>

<body>

    <!--*******************
        Preloader start
    ********************-->
        <div id="preloader">
        <div class="sk-three-bounce">
            <div class="sk-child sk-bounce1"></div>
            <div class="sk-child sk-bounce2"></div>
            <div class="sk-child sk-bounce3"></div>
        </div>
    </div>
    <!--*******************
        Preloader end
    ********************-->

    <!--**********************************
        Main wrapper start
    ***********************************-->
    <div id="main-wrapper">

      <?php  $this->load->view('header'); ?>
    
        <!--**********************************
            Content body start
        ***********************************-->
        <div class="content-body">
            <!-- row -->
            <div class="container-fluid">
            
                <div class="row page-titles mx-0">
                    <div class="col-sm-6 p-md-0">
                        <div class="welcome-text">
                            <h4>Edit Complain Hour</h4>
                        </div>
                    </div>
                    <div class="col-sm-6 p-md-0 justify-content-sm-end mt-2 mt-sm-0 d-flex">
                        <ol class="breadcrumb">
                            <li class="breadcrumb-item"><a href="index.html">Home</a></li>
                            <li class="breadcrumb-item active"><a href="javascript:void(0);">Add Complain Hour</a></li>
                        </ol>
                    </div>
                </div>
        
        <div class="row">


                <div class="col-12">
                  <div class="card">
                       <div class="card-header">
             <?php echo form_open(base_url(''),array('class'=>"form-horizontal add_qc_machine", 'id'=>"add_qc_machine")); ?>
                                    
              
        <div id='add_qc_machines' class='alert alert-success solid' style='display:none;'></div>   
			<div class="row">
         

       
 				<div class="col-lg-3 col-md-6 col-sm-12">
                       <div class="form-group">
                            <label class="form-label">Machine:</label>
                             <select class="form-control machine"name="machine" required="required" id="machine">
                                <option value="<?php echo $get_complainhours[0]['machine']; ?>"><?php echo $get_complainhours[0]['machine']; ?></option>
                                <?php  if(!empty($get_machine_data)){   ?>

                                    <?php foreach($get_machine_data as $get_machine){ ?>

                                    <option value="<?php echo $get_machine['machine']; ?>"><?php echo machine_name($get_machine['machine']); ?></option>

                                <?php } } ?>
                                
                            </select>
                         </div>
                        </div>

                     <div class="col-lg-3 col-md-6 col-sm-12">
                       <div class="form-group">
                        <label class="form-label">Item:</label>
                       <input type="text" id="product_name" name="product_name" readonly="readonly" value="<?php echo $get_complainhours[0]['product_name']; ?>"  placeholder="Product Name" required="required"  class="form-control product_name">
                     </div>
                    </div>

                    <div class="col-lg-3 col-md-6 col-sm-12">
                       <div class="form-group">
                        <label class="form-label">Job #:</label>
                       <input type="text" id="job" readonly="readonly" name="job" value="<?php echo $get_complainhours[0]['job']; ?>" placeholder="JOB NO" value="" required="required"  class="form-control job">
                     </div>
                    </div>

        		   <div class="col-lg-3 col-md-6 col-sm-12">
         				  <div class="form-group">
        	                    <label class="form-label">کس وجہ سے کم روکا:</label>
                             <input type="text" id="work_stop"  name="work_stop"  required="required" value="<?php echo $get_complainhours[0]['work_stop']; ?>"  class="form-control work_stop" >
                         </div>
                        </div>
                         
                         <div class="col-lg-3 col-md-6 col-sm-12">
                        <div class="form-group">
                            <label class="form-label">پروڈکشن روکنے کا وقت</label>
                             <input type="time" id="production_time" readonly="readonly" name="production_time" value="<?php echo $get_complainhours[0]['production_time']; ?>" required="required"  class="form-control production_time">
                        </div>
                    </div>

                           <div class="col-lg-3 col-md-6 col-sm-12">
                        <div class="form-group">
                            <label class="form-label">پروڈکشن شروع ہونے کا وقت   </label>
                             <input type="time" id="production_time_start" readonly="readonly"  name="production_time_start"  value="<?php echo $get_complainhours[0]['production_time_start']; ?>" required="required"  class="form-control production_time_start" >
                        </div>
                    </div>

                           
                           <div class="col-lg-3 col-md-6 col-sm-12">
                           <div class="form-group">
                                <label class="form-label">پروڈکشن روکنے کا دورانیہ:</label>
                                  <input type="text" id="production_stoping_time" readonly="readonly" value="<?php echo $get_complainhours[0]['production_stoping_time']; ?>" name="production_stoping_time" required="required"  class="form-control production_stoping_time">
                             </div> 
                             
                           </div>


                           <div class="col-lg-3 col-md-6 col-sm-12">
                               <div class="form-group">
                                    <label class="form-label">کیا اب کم سہی ہوگیا ہے:</label>
                                    <select class="form-control" required="required" name="condition" id="condition">
                                     <option value="<?php echo $get_complainhours[0]['condition']; ?>"><?php echo $get_complainhours[0]['condition']; ?></option>
                                     <option value="yes">ہان</option>
                                     <option value="no">نہیں</option>
                                     <option value="normal">پھیلے سے بہتر ہے</option>
                                        
                            </select>
                         </div>
                        </div>

                          
                        <div class="col-lg-6 col-md-6 col-sm-12">
                            <div class="form-group">
                                <label class="form-label">Remarks:</label>
                                <textarea  class="form-control remarks" name="remarks" id="remarks"><?php echo $get_complainhours[0]['remarks']; ?></textarea>  
                             </div>
                         </div>
                          <div class="col-lg-6 col-md-6 col-sm-12">
            <div class="form-group">
               
                <input type="hidden" value="<?php echo date('Y-m-d H:i:s'); ?>" name="modified" id="modified" class="form-control required">
                <input type="hidden" value="<?php echo date('Y-m-d'); ?>" name="insert_date" id="insert_date" class="form-control required">
               
            </div>
        </div>
                         <input type="hidden" value="<?php echo $this->uri->segment(3); ?>" name="id" id="id" required="required">
                 </div>
                  <button type="submit" id="dis_submit" class="btn btn-primary">Save <i class="icon-arrow-right14 position-right"></i></button>
                  <?php form_close();?>
                 
                            
                           
                          

                        </div>
                    </div>

          
        </div>
            </div>
        </div>
        <!--**********************************
            Content body end
        ***********************************-->


        <!--**********************************
            Footer start
        ***********************************-->
      
        <!--**********************************
            Footer end
        ***********************************-->

    <!--**********************************
           Support ticket button start
        ***********************************-->

        <!--**********************************
           Support ticket button end
        ***********************************-->


    </div>
    <!--**********************************
        Main wrapper end
    ***********************************-->

    <!--**********************************
        Scripts
    ***********************************-->
  <!-- Required vendors -->
   

     <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>


        <style>
        .redborder{
            border:1px solid red;
        }
        </style>

    <script type='text/javascript'>


     
        
    var add_qc_machines = $('#add_qc_machine');   
    
    add_qc_machines.on('submit',function(e){
      $("#dis_submit").attr('disabled', true);
        e.preventDefault();
         var id = $('#id').val();
        var add_qc_machinesdata = add_qc_machines.serialize();
        
      
            $.ajax({
                type:'POST',
                url:'<?php echo base_url('Order_qc/edit_qc_timings/'); ?>'+id,
                data:add_qc_machinesdata,
                dataType:'json',
                success:function(data){
                    console.log('first'+data.status);
                    if(data.status === 'true'){
                        console.log('second'+data.status);
                       $('#add_qc_machines').show().html('Added Successfully');
                       location.href="<?php echo base_url('Order_qc/qc_production_on_machine'); ?>";
                    }else{
                        console.log('third'+data);          
                    }
                },
                error:function(data){console.log(data.responseText);}
            });
       // }
    });

  
    
    </script>   
   
     <?php  $this->load->view('footer'); ?>
        
</body>

<!-- Mirrored from edumin.dexignlab.com/xhtml/add-departments.html by HTTrack Website Copier/3.x [XR&CO'2014], Tue, 17 Nov 2020 13:56:15 GMT -->
</html>