예제 #1
0
 public function obtenerDatosEvento()
 {
     if (Request::ajax()) {
         $evento = Evento::find(Input::get("id"));
         $reunion = Reunion::whereEventosId(Input::get("id"))->first();
         $datos = array();
         $datos['nombre'] = $reunion->asunto;
         $fechayhora = $evento->start;
         $fechayhora = explode(" ", $fechayhora);
         $datos['ordinaria'] = $reunion->ordinaria == '1' ? "Ordinaria" : "Extraordinaria";
         $datos['fecha'] = $fechayhora[0];
         $datos['hora'] = $fechayhora[1];
         $datos['asignatura'] = Asignatura::whereId(Asignatura::asignaturaJDAActual())->pluck('nombre');
         $datos['departamento'] = Departamento::whereId(Academia::whereId(Asignatura::whereId(Asignatura::asignaturaJDAActual())->pluck('academia_id'))->pluck('departamentos_id'))->pluck('nombre');
         $datos['fecha_actual'] = date('Y-m-d');
         return Response::json(array('success' => true, 'datos' => $datos));
     }
 }
@section('title')
Crear Convocatoria y Orden del Día - SIGA 4
@stop

@section('body')
<div id="cargandoDocumento" class="text-center"><img class="cargandoDocumento" src="{{ asset('images/cargando-documento.gif') }}" /><br/><h1>Generando Documento</h1></div>
    <div id="elegirReunion" class="center-block">
        <h1 class="text-center text-info">Elige la reunión para la cual quieres generar la Convocatoría y Orden del Día</h1><br/>
        <?php 
$collection = Evento::whereAmbitoEvento('asignatura')->where('start', '>', date('Y-m-d H:i:s'))->get()->toArray();
$collection = array_values(array_sort($collection, function ($value) {
    return $value['start'];
}));
$arreglo = array();
foreach ($collection as $clave => $valor) {
    $arreglo[$valor['id']] = $valor['start'] . ' - ' . Reunion::whereEventosId($valor['id'])->pluck('asunto');
}
?>
        {{ Form::select('tipo_documento', $arreglo, null, array('id' => 'selectEvento', 'class' => 'col-sm-12 lead')) }}<br/><br/>
        {{ Form::button('Elegir Reunión', array('id' => 'botonElegirReunion', 'class'=>'btn btn-primary center-block')) }}
    </div>

    <div id="divFormAgregarDocumento" class="fullWidth" style="display:none">
        <h1 class="text-center">Añadir nueva Convocatoria y Orden del Día</h1>
        <div class="col-xs-11 center-block">
            {{ Form::open(array('id'=>'formAgregarDocumento', 'role'=>'form', 'route'=>'jda-doc-conv-ord-dia')) }}
                <span class="mensajeError alert-danger"></span>
                <div class="form-group row">
                {{ Form::label('fecha_creacion', 'Fecha de creación del documento', array('class' => 'col-xs-12 col-sm-6'))}}
                {{ Form::text('fecha_creacion', '', array('class' => 'col-xs-12 col-sm-6', 'readonly')) }}
                </div>
예제 #3
0
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function delete()
 {
     if (Request::ajax()) {
         $id = Input::get('id');
         $evento = Evento::find($id);
         $reunion = Reunion::whereEventosId($id)->first();
         if ($evento->delete()) {
             if (!empty($reunion)) {
                 if ($reunion->delete()) {
                     return array('success' => true);
                 } else {
                     return array('success' => false);
                 }
             } else {
                 return array('success' => true);
             }
         } else {
             return array('success' => false);
         }
     }
 }
예제 #4
0
 public function JDACargarMinuta()
 {
     $data = Input::all();
     $existe = DB::table('registro_minutas')->whereNumMinuta(Input::get('num_minuta'))->whereCiclo(Input::get('ciclo'))->pluck('id');
     if (is_null($existe)) {
         $id_reunion = Reunion::whereEventosId(Input::get('id_evento'))->pluck('id');
         DB::table('registro_minutas')->insertGetId(['num_minuta' => Input::get('num_minuta'), 'ciclo' => Input::get('ciclo'), 'reuniones_id' => $id_reunion]);
         $nombrePDF = $this->CrearCadenaAleatoria();
         $this->AgregarDocumento('Documentos/Minutas/' . $nombrePDF . '.pdf', Input::get('fecha_creacion'), Input::get('ciclo'), MINUTA, Auth::user()->id, null, Asignatura::asignaturaJDAActual());
         $html = View::make('documentos.minuta-jda')->with('data', $data)->render();
         set_time_limit(600);
         $pdf = PDF::loadHTML($html)->setPaper('a4')->save("Documentos/Minutas/" . $nombrePDF . ".pdf");
         return Redirect::route('jda-doc');
     } else {
         return View::make('JDA.documento-minuta')->with('error', array('num_minuta' => Input::get('num_minuta'), 'ciclo' => Input::get('ciclo')));
     }
 }
예제 #5
0
 public function actareunion_all($codcampeonato, $id)
 {
     //$category = DB::select('select * from Tcambio where idreunion=? ',array($id));
     $category = Reunion::find($id);
     $buscar = $id;
     $todoasistente = DB::table('treunion')->join('tasistente', 'treunion.codReunion', '=', 'tasistente.codReunion')->join('tdelegando', 'tasistente.dni', '=', 'tdelegando.dni')->join('tdocente', 'tdelegando.codDocente', '=', 'tdocente.codDocente')->select('tasistente.codAsistente', 'tdocente.codDocente', 'tdocente.nombre', 'tdocente.apellidoP', 'tdocente.apellidoM', 'tdelegando.rol')->where('treunion.codreunion', '=', $id)->get();
     //$todoasistente=DB::select('call resumen_asistente(?)',array($id));
     $todoAgenda = DB::select('select * from tagenda where codReunion=?', array($id));
     $todoConclusion = DB::table('tconclusion')->join('tagenda', 'tconclusion.codAgenda', '=', 'tagenda.codAgenda')->join('treunion', 'treunion.codReunion', '=', 'treunion.codReunion')->select('tconclusion.codConclusion', 'tagenda.codAgenda', 'tconclusion.conclusion')->where('treunion.codreunion', '=', $id)->get();
     return View::make('user_com_organizing.acta.verA')->with('category', $category)->with('todoasistente', $todoasistente)->with('todoAgenda', $todoAgenda)->with('todoConclusion', $todoConclusion)->with('buscar', $buscar)->with('codcampeonato', $codcampeonato);
 }