<?php $__env->startSection('content'); ?>

<?php

$Group = Auth::user()->group_id;
$Email = Auth::user()->email;

?>

<div class="page-header" style="background-color: #6382a6;;">
  <div class="modulo "><img class="imagenmodulo1" src="<?php echo e(URL::asset('dashboardimage/checklist7.png')); ?>">
  <img class="imagenmodulo2" src="<?php echo e(URL::asset('dashboardimage/linea.png')); ?>">&nbsp   CONTROL DE ACTIVIDADES</div>
</div>

	<?php echo Form::open(array('url'=>'programaciondeactividades?return='.$return, 'class'=>'form-horizontal form-material validated sximo-form','files' => true ,'id'=> 'FormTable' )); ?>

	<div class="toolbar-nav">
		<div class="row">
			
			<div class="col-md-6 " >
				
					<!--<button name="apply" class="tips btn btn-sm btn-primary   "  title="<?php echo e(__('core.btn_back')); ?>" > <?php echo e(__('core.sb_apply')); ?> </button>-->
					<button type="submit" class="btn btn-sm  " name="save" style="border-color:#7fb3e3;">GUARDAR</button>
					<a href="<?php echo e(url($pageModule.'?return='.$return)); ?>" class="tips btn btn-sm " style="border-color:#ff7a7a;" >SALIR</a>	
				
			</div>
			<div class="col-md-6 text-right " >
				<!--<a href="<?php echo e(url($pageModule.'?return='.$return)); ?>" class="tips btn btn-secondary  btn-sm "  title="<?php echo e(__('core.btn_back')); ?>" ><i class="fa  fa-times"></i></a>--> 
			</div>
		</div>
	</div>	


	<div class="card"style="margin-bottom:320px;">
			<div class="card-body" style="overflow-y: scroll;">
	
		
	<div class="row"><div class="col-md-12">
						<fieldset style="border-color:#7fb3e3;"><legend> Información General</legend>
				<?php echo Form::hidden('id', $row['id']); ?>

				
				<?php if($Group =='4'): ?>
				<div style="pointer-events: none;">
			    <?php else: ?>
			    <div>
			    <?php endif; ?>
				
				
									  <div class="form-group row  " >
										<label for="Tipo de Actividad" class=" control-label col-md-4 text-left" style="font-weight:600;" > Tipo de Actividad :</label>
										<div class="col-md-6">
										  <select name='title' rows='5' id='title' class='select2 '   ></select> 
										 </div> 
										 <div class="col-md-2">
										 	
										 </div>
									  </div> 					
									  <div class="form-group row  " >
										<label for="Condominio" class=" control-label col-md-4 text-left" style="font-weight:600;"> Condominio :</label>
										<div class="col-md-6">
										  <select name='Condominio' rows='5' id='Condominio' class='select2 '   ></select> 
										 </div> 
										 <div class="col-md-2">
										 	
										 </div>
									  </div> 					
									  <div class="form-group row  " >
										<label for="Residencia" class=" control-label col-md-4 text-left" style="font-weight:600;"> Residencia :</label>
										<div class="col-md-6">
										  <select name='Residencia' rows='5' id='Residencia' class='select2 '   ></select> 
										 </div> 
										 <div class="col-md-2">
										 	
										 </div>
									  </div> 					
									  <div class="form-group row  " >
										<label for="Descripción" class=" control-label col-md-4 text-left" style="font-weight:600;"> Descripción :</label>
										<div class="col-md-6">
										  <textarea name='description' rows='5' id='description' class='form-control form-control-sm '  
				           ><?php echo e($row['description']); ?></textarea> 
										 </div> 
										 <div class="col-md-2">
										 	
										 </div>
									  </div> 
									  
									  
									  
									  
			 </div>			  
									  
									  
				<?php if($Group=='2'): ?>					  
									  
									  <div class="form-group row  " >
										<label for="Estatus" class=" control-label col-md-4 text-left" style="font-weight:600;"> Estatus :</label>
										<div class="col-md-6">
										  
					<?php $status = explode(',',$row['status']);
					$status_opt = array( 'Programar Actividad' => 'Programar Actividad' ,  'No Completada' => 'No Completada' ,  'Completada' => 'Completada' ,'Deposito' => 'Deposito' , 'Programada' => 'Programada' ,'Revisada' => 'Resvisada',); ?>
					<select name='status' rows='5'   class='select2 '  > 
						<?php 
						foreach($status_opt as $key=>$val)
						{
							echo "<option  value ='$key' ".($row['status'] == $key ? " selected='selected' " : '' ).">$val</option>"; 						
						}						
						?></select> 
										 </div> 
										 <div class="col-md-2">
										 	
										 </div>
									  </div> 
				<?php else: ?>					  
									  
				 <div class="form-group row  " >
										<label for="Estatus" class=" control-label col-md-4 text-left" style="font-weight:600;"> Estatus :</label>
										<div class="col-md-6">
										  
					<?php $status = explode(',',$row['status']);
					$status_opt = array( 'Completada' => 'Completada' ,'Completada' => 'Completada' ,'Programada' => 'Programada' ,'Reprogramar' => 'Reprogramar' ,); ?>
					<select name='status' rows='5'   class='select2 '  > 
						<?php 
						foreach($status_opt as $key=>$val)
						{
							echo "<option  value ='$key' ".($row['status'] == $key ? " selected='selected' " : '' ).">$val</option>"; 						
						}						
						?></select> 
										 </div> 
										 <div class="col-md-2">
										 	
										 </div>
									  </div> 					  
				<?php endif; ?>					  
									  
									  
									  
									  
									  
									  
									  
									  <div class="form-group row  " >
										<label for="Fecha de inicio" class=" control-label col-md-4 text-left" style="font-weight:600;"> Fecha de inicio :</label>
										<div class="col-md-6">
										  
					<?php echo Form::text('fechadeinicio', $row['fechadeinicio'],array('class'=>'form-control form-control-sm datetime')); ?>

				 
										 </div> 
										 <div class="col-md-2">
										 	
										 </div>
									  </div> 					
									  <div class="form-group row  " >
										<label for="Fecha final" class=" control-label col-md-4 text-left" style="font-weight:600;"> Fecha final :</label>
										<div class="col-md-6">
										  
					<?php echo Form::text('fechafinal', $row['fechafinal'],array('class'=>'form-control form-control-sm datetime')); ?>

					
					
					
			   	
					
					
					
					
					
				 
										 </div> 
										 <label for="Vias" class=" control-label col-md-4 col-sm-3 text-right" style="margin-left: -70px;margin-top:30px;">---- PARA MUDANZAS ---- <span class="asterix">  </span></label>	
										 <div class="col-md-2">
										 	
										 </div>
									  </div> 					
									  <div class="form-group row  " >
										<label for="Cantidad ($)" class=" control-label col-md-4 text-left" style="font-weight:600;"> Deposito ($) :</label>
										<div class="col-md-6">
										    
										  <?php if($Group =='4'): ?>
				                          <div style="pointer-events: none;">
			                              <?php else: ?>
			                              <div>
			                              <?php endif; ?>
										  
										  <input  type='text' name='Cantidad' id='Cantidad' value='<?php echo e($row['Cantidad']); ?>' 
						                  class='form-control form-control-sm ' /> 
						     
						                  </div>
						     
						     
										 </div> 
										 <div class="col-md-2">
										 	
										 </div>
									  </div> 					
									  <div class="form-group row  " >
										<label for="Vias" class=" control-label col-md-4 text-left" style="font-weight:600;"> Vias :</label>
										<div class="col-md-6">
										    
										  <?php if($Group =='4'): ?>
				                          <div style="pointer-events: none;">
			                              <?php else: ?>
			                              <div>
			                              <?php endif; ?>
										    
										    
										    
										    
										  <select name='vias[]' multiple rows='5' id='vias' class='select2 '   ></select> 
										 </div> 
										 <div class="col-md-2">
										     
										 </div>    
										     
										 	
										 </div>
									  </div> 					
									  <div class="form-group row  " >
										<label for="Datos" class=" control-label col-md-4 text-left" style="font-weight:600;"> Datos :</label>
										<div class="col-md-6">
										    
										    
										    <?php if($Group =='4'): ?>
				                          <div style="pointer-events: none;">
			                              <?php else: ?>
			                              <div>
			                              <?php endif; ?>
										    
										    
										    
										    
										    
										  <textarea name='Datos' rows='5' id='Datos' class='form-control form-control-sm '  
				           ><?php echo e($row['Datos']); ?></textarea>
				           
				           
				               </div>
				           
				           
										 </div> 
										 <div class="col-md-2">
										 	
										 </div>
									  </div>
									  
									  
									     <?php if($Group == '4'): ?>
									  
									    <div class="form-group row  " style="margin-bottom: -25px;">
										<label for="Asignado" class=" control-label col-md-4 text-left" style="font-weight:600;"> Asignado :</label>
										<div class="col-md-6">
										   <input  type='text' name='Asignado' id='Asignado' value='<?php echo e($Email); ?>' 
						                 readonly    class='form-control input-sm ' /> 
										 </div> 
										 <div class="col-md-2">
										 	
										 </div>
										<?php else: ?> 
										 
										 <div class="form-group row  " style="margin-bottom: -25px;">
										 <label for="Asignado" class=" control-label col-md-4 text-left" style="font-weight:600;"> Asignado :</label>
										 <div class="col-md-6">
										  <select name='Asignado' rows='5' id='Asignado' class='select2 '   ></select> 
										 </div> 
										 <div class="col-md-2" >
										 	
										 </div>
										<?php endif; ?>
										
										
										 
									  </div> </fieldset></div></div>
	
		</div>
		
		<input type="hidden" name="action_task" value="save" />
		
		
		</div>
	</div>		


	<?php echo Form::close(); ?>

<?php echo $__env->make('sximo.module.template.ajax.formjavascript', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>	
   <script type="text/javascript">
	$(document).ready(function() { 
		
		
		
		$("#title").jCombo("<?php echo url('programaciondeactividades/comboselect?filter=tipodeactividad:Tipo:Tipo'); ?>",
		{ initial_text: "-- Seleccionar --", selected_value : '<?php echo e($row["title"]); ?>' });
		
		
		
		
		$("#Condominio").jCombo("<?php echo url('programaciondeactividades/comboselect?filter=condominios:Nombre:Nombre'); ?>",
		{ initial_text: "-- Seleccionar --",selected_value : '<?php echo e($row["Condominio"]); ?>' });
		
	    $("#Residencia").jCombo("<?php echo url('programaciondeactividades/comboselect?filter=residencia:Nombre:Nombre'); ?>&parent=Condominio:",
		{  parent: '#Condominio',initial_text: "-- Seleccionar --", selected_value : '<?php echo e($row["Residencia"]); ?>' });
		
		
		
		
		
		$("#vias").jCombo("<?php echo url('programaciondeactividades/comboselect?filter=vias:Tipo:Tipo'); ?>",
		{ initial_text: "-- Seleccionar --", selected_value : '<?php echo e($row["vias"]); ?>' });
		
		$("#Asignado").jCombo("<?php echo url('programaciondeactividades/comboselect?filter=supervisores:Email:Email'); ?>",
		{ initial_text: "-- Seleccionar --", selected_value : '<?php echo e($row["Asignado"]); ?>' });
		 	
		 	 

		$('.removeMultiFiles').on('click',function(){
			var file =  $(this).attr('url') ;
			var removeUrl = '<?php echo e(url( $pageModule."/removefiles?file=")); ?>'+ file;
			$(this).parent().remove();
			$.get(removeUrl,function(response){});
			$(this).parent('div').empty();	
			return false;
		});
	});
	
$('.datetime').bootstrapMaterialDatePicker({ format:'YYYY-MM-DD hh:mm A',lang : 'es', cancelText: 'Cancelar'});		
	</script>
	
<style>
 .btn:focus,.btn:active {
   outline: none !important;
   box-shadow: none;
}      
    
</style>


<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/tempdpe5/public_html/intelpropertyrd/aplicacionmobile/resources/views/programaciondeactividades/form.blade.php ENDPATH**/ ?>