<style>
.control-label {  
  padding-top: 0 !important;
}
.div-left {  
  width: 100%;
}
</style>
<style>
@media only screen and (max-width: 480px), (min-device-width: 300px) and (max-device-width: 480px) {
	.table-checkable tr > td:first-child, .table-checkable tr > th:first-child {
	  max-width: 100%;  
	}
	td:nth-of-type(1)::before {
	  content: "";
	}
}
</style>
<div class="page-content-wrapper">
                <div class="page-content">
                    <div class="page-bar">
                        <div class="page-title-breadcrumb">
                            <div class=" pull-left">
                                <div class="page-title">Leads Notes</div>                                
                            </div>
                            <ol class="breadcrumb page-breadcrumb pull-right">
                                <li><i class="fa fa-home"></i>&nbsp;<a class="parent-item" href="index.php?page=home">Home</a>&nbsp;<i class="fa fa-angle-right"></i>
                                </li>
                                <li><a class="parent-item" href="index.php?page=tech_leads">Manage Leads</a>&nbsp;<i class="fa fa-angle-right"></i></li><li class="active">Notes</li>
                            </ol>
                        </div>
                    </div>
				<div class="row">
                        <div class="col-md-12 col-sm-12">
                            <div class="card card-box">
                                <div class="card-head">
                                    <header></header>                                                                 
                                </div>
                                <div class="card-body" id="bar-parent1">
                                	
                                	<?php if(isset($_REQUEST['success'])){ ?>                                		
                                		<div class="alert alert-success"><?php echo urldecode($_REQUEST['success']); ?></div>
                                	<?php } else if(isset($error)){ ?>                                		
                                		<div class="alert alert-danger"><?php echo $error; ?></div>
                                	<?php } ?>                               	
                                	                              		
                                	
                                	<div class="col-12 row">
                                		<div class="col-8 pl-0 pr-0">                       	                          	                                	
                                    		<form action="" id="form1" class="form-horizontal" method="post">                                         
                                        			<div id="add_note" class="form-group row">		                                                
		                                                <div class="col-10 text-center">                                                    
		                                                    <b>Add Note</b>
		                                                </div>
		                                            </div>													
													<div class="form-group row">
			                                            <label class="col-md-3 control-label">Delivery Date</label>
			                                            <div class="input-group date form_date col-md-4" data-date="" data-date-format="dd MM yyyy" data-link-field="dtp_input2" data-link-format="yyyy-mm-dd">
			                                                <input class="form-control" size="16" value="" type="text">
			                                                <span class="input-group-addon"><span class="fa fa-remove"></span></span>
			                                                <span class="input-group-addon"><span class="fa fa-calendar"></span></span>
			                                            </div>
			                                            <input name="delivery_date" id="dtp_input2" value="<?php if(isset($_POST['delivery_date'])){ echo $_POST['delivery_date']; }?>" type="hidden">
			                                            <br>
			                                        </div>			                                        
													<div class="form-group row">		                                                
		                                                <div class="col-10 text-center">                                                    
		                                                    <textarea name="note" id="note" cols="30" rows="4" class="form-control"><?php if(isset($_POST['note'])){ echo $_POST['note']; }?></textarea>
		                                                </div>
		                                            </div>   
		                                            <div class="form-group row">		                                                
		                                                <div class="col-10 text-center">                                                    
		                                                    <button type="submit" name="submit_note" class="btn btn-info">Submit</button>
		                                                </div>
		                                            </div> 		                                            
		                                             
                                    		</form>
                                    	</div>
                                    	<div class="col-4 pl-0 pr-0"> 
                                    		  <p><b><?php echo $leadsRec['client_name']; ?></b></p>
                                    		  <?php if($leadsRec['phone']!=''){?> 
                                    		  <p>Ph: <?php echo $leadsRec['phone']; ?></p>
                                    		  <?php } ?>
                                    		  <p>Location: <?php echo $leadsRec['location']; ?></p>
                                    		  <p><?php echo $leadsRec['details']; ?></p>  
                                    		  <p>Next Action: <b><?php if($leadsRec['assignee']!='0'){ echo getAdminUserName($leadsRec['assignee']); }?></b></p>                                		
                                    	</div>
                                    </div>
                                    
                                    			<?php if(mysqli_num_rows($taskNotesRs)>0){ ?>
													<div class="col-10 text-center"><b>Task Notes</b></div>
														<?php while($notesRec = mysqli_fetch_array($taskNotesRs)){ ?>
															<div class="form-group row">																
																<div class="col-10 pt-2 border" style="background-color: #efefef;">																	
																	<div class="col-12 row">
																		<div style="width: 30%;float: left;color: #937820;">
																			Added on: <?php echo getFormattedDateTime($notesRec['date']);  ?>&nbsp;&nbsp;&nbsp;
																			<?php if($notesRec['delivery_date']!='0000-00-00'){ ?>
																			Delivery date: <?php echo getFormattedDate($notesRec['delivery_date']);  ?>
																			<?php } ?>
																		</div>
																		<div style="width: 70%;float: left;color: #937820;text-align: right;">
																			Added By: <?php echo getAdminUserName($notesRec['added_by']);  ?> 
																		</div>
																	</div>
																	<div class="col-12 row">
																		<div style="width: 100%;float: left;padding: 4px;">
																			<?php echo nl2br($notesRec['note']);  ?> 
																		</div>																		
																	</div>
																</div> 		
															</div>
														<?php } ?>	
													<?php } ?>
                                    
                                    
                                    
                                </div>
                            </div>
                        </div>
                                                
                    </div>
	</div>
</div>
