diff --git a/app/Encuestas_cargo.php b/app/Encuestas_cargo.php index c659824..bb3de0b 100644 --- a/app/Encuestas_cargo.php +++ b/app/Encuestas_cargo.php @@ -8,7 +8,7 @@ class Encuestas_cargo extends Model { protected $table = "encuestas_cargos"; - protected $fillable = ['descripcion', 'cabecera_encuesta_id', 'cargo_id', 'incluir', 'revisado']; + protected $fillable = ['descripcion', 'cabecera_encuesta_id', 'cargo_id', 'incluir', 'revisado', 'es_contrato_periodo']; protected $casts = ["incluir" => "boolean", "revisado"=>"boolean"]; diff --git a/app/Http/Controllers/BeneficiosController.php b/app/Http/Controllers/BeneficiosController.php index b9d61be..4b1c608 100644 --- a/app/Http/Controllers/BeneficiosController.php +++ b/app/Http/Controllers/BeneficiosController.php @@ -130,8 +130,9 @@ public function edit($id) { if(Auth::user()->is_admin){ $dbData = beneficios_cabecera_encuesta::find($id); + $dbEmpresa = Empresa::find($dbData->empresa_id); }else{ - $empresa = Empresa::find($id); + $dbEmpresa = Empresa::find($id); $dbData = beneficios_cabecera_encuesta::where('empresa_id', $id) ->orderBy('id', 'DESC') ->first(); @@ -163,6 +164,7 @@ public function edit($id) return view('beneficios.complete')->with('dbData', $dbData) ->with('dbMarca', $dbMarca) ->with('dbModelo', $dbModelo) + ->with('dbEmpresa', $dbEmpresa) ->with('dbAseguradora', $dbAseguradora) ->with('dbDetalle', $dbDetalle); @@ -336,6 +338,7 @@ public function report(Request $request){ return view('beneficios_report.charts')->with('dbEmpresa', $dbEmpresa) ->with('item', $item) + ->with('encuesta', $encuesta) ->with('practicas', $practicas) ; } @@ -353,7 +356,10 @@ public function getChartData(Request $request){ $rubro = $empresa->rubro_id; // Ultima encuesta de la empresa - $encuesta = beneficios_cabecera_encuesta::where("empresa_id", $empresa->id)->orderBy('id', 'DESC')->skip(1)->first(); + $encuesta = beneficios_cabecera_encuesta::where("empresa_id", $empresa->id) + ->orderBy('id', 'DESC') + ->skip(1) + ->first(); // Encuestas del rubro $encuestas = beneficios_cabecera_encuesta::where('rubro_id', $rubro) @@ -479,9 +485,14 @@ public function compositionReport(Request $request){ // Recuperamos el Item a mostrar $item = $otrosItems->first(); $pregunta = $item->pregunta; + $encuesta = beneficios_cabecera_encuesta::where('empresa_id', $dbEmpresa->id) + ->orderBy('id', 'DESC') + ->skip(1) + ->first(); return view('beneficios_report.composicion_charts')->with('dbEmpresa', $dbEmpresa) ->with('item', $item) + ->with('encuesta', $encuesta) ->with('otrosItems', $otrosItems) ; } diff --git a/app/Http/Controllers/CargosClientesController.php b/app/Http/Controllers/CargosClientesController.php index 9245414..aa967db 100644 --- a/app/Http/Controllers/CargosClientesController.php +++ b/app/Http/Controllers/CargosClientesController.php @@ -222,6 +222,12 @@ public function update(Request $request, $id){ $dbData->incluir = 1; }; + if($request->es_contrato_periodo){ + $dbData->es_contrato_periodo = 1; + }else{ + $dbData->es_contrato_periodo = 0; + } + $dbData->save(); $dbDetalle->save(); diff --git a/app/Http/Controllers/EncuestasCargosController.php b/app/Http/Controllers/EncuestasCargosController.php index 950f265..dd8c74b 100644 --- a/app/Http/Controllers/EncuestasCargosController.php +++ b/app/Http/Controllers/EncuestasCargosController.php @@ -233,5 +233,56 @@ public function addCargoStore(Request $request, $id){ } + public function getCargos($id){ + ini_set('memory_limit', '1020M'); + ini_set('max_execution_time', 300); + $dbData = Encuestas_cargo::where('cabecera_encuesta_id', $id)->get(); + $dbEncuesta = Cabecera_encuesta::find($id); + $dbEmpresa = $dbEncuesta->empresa->descripcion; + $dbPeriodo = $dbEncuesta->periodo; + $dbCargos = Cargo::pluck('descripcion', 'id'); + //$dbCargos->prepend("Elija una opción", "0"); + $index = 0; + $dbData = $dbData->map(function($item) use($dbCargos, $index){ + $cargos = ''; + foreach ($dbCargos as $id => $cargo) { + //dd($cargo, $item); + if($id == $item->cargo_id ){ + $cargos = $cargos.''; + }else{ + $cargos = $cargos.''; + } + } + $item['cargos'] = ''; + $item['salario_base'] = $item->detalleEncuestas->salario_base; + if($item->incluir){ + $item['incluye'] = 'Sí'; + }else{ + $item['incluye'] = 'No'; + } + $item['editar'] = 'editRevisar'; + $item['guardar'] = 'saveGuardar'; + $index++; + + return $item; + }); + + $data = array(); + foreach ($dbData as $item) { + $data[] = [ $item->descripcion, + $item->cargos, + $item->salario_base, + $item->incluye, + $item->editar, + $item->guardar, + $item->id + ]; + } + + $response = ["data" => $data]; + + return $response; + } + } \ No newline at end of file diff --git a/app/Http/Controllers/EncuestasController.php b/app/Http/Controllers/EncuestasController.php index 62fb1dd..ef9f614 100644 --- a/app/Http/Controllers/EncuestasController.php +++ b/app/Http/Controllers/EncuestasController.php @@ -60,12 +60,19 @@ public function store(Request $request) $oldCargos = Encuestas_cargo::where('cabecera_encuesta_id', $id)->get(); - foreach ($oldCargos as $key => $value) { $cargo = new Encuestas_cargo(); $cargo->descripcion = $value->descripcion; $cargo->cabecera_encuesta_id = $nuevoId; $cargo->cargo_id = $value->cargo_id; + $cargo->incluir = $value->incluir; + if($value->es_contrato_periodo){ + $cargo->es_contrato_periodo = $value->es_contrato_perido; + }else{ + $cargo->es_contrato_periodo = 0; + } + + $cargo->revisado = $value->revisado; $cargo->save(); $oldDetalle = Detalle_encuesta::where('encuestas_cargo_id', $value->id)->get(); diff --git a/app/Http/Controllers/HomeController.php b/app/Http/Controllers/HomeController.php index df98e11..06ba657 100644 --- a/app/Http/Controllers/HomeController.php +++ b/app/Http/Controllers/HomeController.php @@ -83,12 +83,34 @@ public function index() $dbEncuestaAnt = $dbEncuestas->get(1); - //dd($dbEmpresa->rubro_id); + if($dbEncuestaAnt){ + if($dbEncuestaAnt->periodo == $dbEncuesta->periodo){ + $dbEncuestaAnt = $dbEncuestas->get(2); + if(!$dbEncuestaAnt){ + // busca la tercera encuesta (descendente) de navemar para obtener el periodo en el caso de que no tengan encuestas en periodos anteriores + $dbEncuestas = Cabecera_encuesta::where('empresa_id', 22) + ->orderBy('id', 'DESC') + ->get(); + $dbEncuestaAnt = $dbEncuestas->get(2); + } + } + $dbEncuestaOld = $dbEncuestas->get(3); + + if(!$dbEncuestaOld){ + $dbEncuestas = Cabecera_encuesta::where('empresa_id', 22) + ->orderBy('id', 'DESC') + ->get(); + $dbEncuestaAnt = $dbEncuestas->get(3); + } + } + $club = $this->club($dbEmpresa->rubro_id); + return view('clientes.home')->with('dbEmpresa', $dbEmpresa) ->with('club', $club) ->with('dbEncuesta', $dbEncuesta) - ->with('dbEncuestaAnt' , $dbEncuestaAnt); + ->with('dbEncuestaAnt' , $dbEncuestaAnt) + ->with('dbEncuestaOld', $dbEncuestaOld); } } diff --git a/app/Http/Controllers/ImportExportController.php b/app/Http/Controllers/ImportExportController.php index 87fef3b..d239502 100644 --- a/app/Http/Controllers/ImportExportController.php +++ b/app/Http/Controllers/ImportExportController.php @@ -146,7 +146,7 @@ public function download(Request $request){ adicional_amarre, adicional_tipo_combustible, adicional_embarque, adicional_carga, bono_anual, bono_anual_salarios, incentivo_largo_plazo, refrigerio, costo_seguro_medico, cobertura_seguro_medico, costo_seguro_vida, costo_poliza_muerte_natural, - costo_poliza_muerte_accidente, aseguradora_id, car_company, movilidad_full, flota monto_tarjeta_flota, autos_marca_id, autos_modelo_id, tarjeta_flota, monto_movil, + costo_poliza_muerte_accidente, aseguradora_id, car_company, movilidad_full, flota, autos_marca_id, autos_modelo_id, tarjeta_flota, monto_movil, seguro_movil, mantenimiento_movil, monto_km_recorrido, monto_ayuda_escolar, monto_comedor_interno, monto_curso_idioma, cobertura_curso_idioma, tipo_clase_idioma, monto_post_grado, cobertura_post_grado, monto_celular_corporativo, monto_vivienda, @@ -212,8 +212,8 @@ public function download(Request $request){ "CostoSeguroVida"=>$item->costo_seguro_vida, "CarCompany"=>$item->car_company, "MovilidadFull"=>$item->movilidad_full, - "MontoTarjFlota"=>$item->monto_tarjeta_flota, - "TarjFlota"=>$item->tarjeta_flota, + "TarjFlota"=>$item->flota, + "MontoTarjFlota"=>$item->tarjeta_flota, "MontoAutomovil"=>$item->monto_movil, "SeguroAutomovil"=>$item->seguro_movil, "MantenimientoAutomovil"=>$item->mantenimiento_movil, @@ -294,7 +294,9 @@ public function upload(Request $request){ } $cargoClienteDesc = trim($row->cargocliente); $cargoOficialId = trim($row->id_cargo_oficial); - + if($cargoOficialId == ''){ + $cargoOficialId = null; + } $excluir = trim($row->excluir); if($excluir == "NO"){ $incluir = 1; @@ -339,8 +341,8 @@ public function upload(Request $request){ $detalle->costo_seguro_vida = $row->costosegurovida; $detalle->car_company = $row->carcompany; $detalle->movilidad_full = $row->movilidadfull; - $detalle->flota = $row->montotarjetaflota; - $detalle->tarjeta_flota = $row->tarjetaflota; + $detalle->flota = $row->tarjflota; + $detalle->tarjeta_flota = $row->montotarjflota; $detalle->monto_movil = $row->montoautomovil; $detalle->seguro_movil = $row->seguroautomovil; $detalle->mantenimiento_movil = $row->mantenimientoautomovil; diff --git a/app/Http/Controllers/ReporteController.php b/app/Http/Controllers/ReporteController.php index e9be94c..cd32069 100644 --- a/app/Http/Controllers/ReporteController.php +++ b/app/Http/Controllers/ReporteController.php @@ -162,32 +162,52 @@ public function metodologia($id){ } public function ficha($id){ + $reporteEspecial = Session::get('especial'); $dbEmpresa = $id; $empresa = Empresa::find($id); $rubro = $empresa->rubro_id; + $subRubro = $empresa->sub_rubro_id; $locale = $this->getIdioma(); if(Session::has('periodo')){ $per = Session::get('periodo'); - $dbEncuesta = Cabecera_encuesta::where('empresa_id', $id)->whereRaw("periodo = '". $per."'")->first(); + $dbEncuesta = Cabecera_encuesta::where('empresa_id', $id) + ->whereRaw("periodo = '". $per."'") + ->first(); $dbFicha = Ficha_dato::where('rubro_id', $rubro) ->where('periodo', $per) ->first(); + + if($dbFicha){ + $periodo = $dbFicha->periodo; + }else{ + $periodo = $per; + } + }else{ - $dbFicha = Ficha_dato::activa()->where('rubro_id', $rubro)->first(); + $dbFicha = Ficha_dato::activa() + ->where('rubro_id', $rubro) + ->first(); + if($dbFicha){ $periodo = $dbFicha->periodo; - $dbEncuesta = Cabecera_encuesta::where('empresa_id', $id)->where('periodo', $periodo)->first(); + $dbEncuesta = Cabecera_encuesta::where('empresa_id', $id) + ->where('periodo', $periodo)->first(); }else{ - $dbEncuesta = Cabecera_encuesta::where('empresa_id', $id)->whereRaw('id = (select max(id) from cabecera_encuestas where empresa_id = '. $id.')')->first(); + $dbEncuesta = Cabecera_encuesta::where('empresa_id', $id) + ->whereRaw('id = (select max(id) from cabecera_encuestas where empresa_id = '. $id.')') + ->first(); } } - $cargos = Encuestas_cargo::where('cabecera_encuesta_id', $dbEncuesta->id)->get()->count(); - $periodo = $dbEncuesta->periodo; if($dbFicha){ - $cargos = $dbFicha->cargos_emergentes; + if($reporteEspecial){ + $cargos = $this->countEmergentesSegmento($rubro, $subRubro, $periodo); + }else{ + $cargos = $dbFicha->cargos_emergentes; + } + $tipoCambio = $dbFicha = $dbFicha->tipo_cambio; }else{ if ($rubro == 4){ @@ -205,8 +225,17 @@ public function ficha($id){ } $tipoCambio = 5600; } + if($reporteEspecial){ + $participantes = Cabecera_encuesta::where('periodo', $periodo) + ->where('rubro_id', $rubro) + ->where('sub_rubro_id', $subRubro) + ->get(); + }else{ + $participantes = Cabecera_encuesta::where('periodo', $periodo) + ->where('rubro_id', $rubro) + ->get(); + } - $participantes = Cabecera_encuesta::where('periodo', $periodo)->where('rubro_id', $rubro)->get(); $participantes = $participantes->map(function($item){ return $item->empresa; @@ -226,6 +255,27 @@ public function ficha($id){ ->with('participantes', $participantes); } + private function countEmergentesSegmento($rubro, $subRubro, $periodo){ + + $results = DB::select( DB::raw( + "SELECT count(distinct cargo_id) cargos + FROM encuestas_cargos e + WHERE cabecera_encuesta_id in ( select id + from cabecera_encuestas + where rubro_id = :rubro + and sub_rubro_id = :subRubro + and periodo = :periodo)"), + array('rubro' => $rubro, 'subRubro' => $subRubro, 'periodo' => $periodo)); + //return $results; + if($results){ + $count = $results[0]->cargos; + }else{ + $count = 0; + } + return $count; + } + + /** * Display the specified resource. * @@ -282,8 +332,6 @@ public function showCargosClub($id){ } } - - $groupedCargosEmpresas = $cargosEmpresas->groupBy('cargo'); $cargosIds = $groupedCargosEmpresas->map(function($item, $key){ @@ -293,7 +341,7 @@ public function showCargosClub($id){ })->values()->reject(function($value, $key){ return is_null($value); })->sort(); - + $cargos = Cargos_rubro::where('rubro_id', $rubro) ->whereIn('cargo_id', $cargosIds)->get(); //$cargos = Cargos_rubro::where('rubro_id', $rubro)->get(); @@ -317,7 +365,7 @@ public function showCargosClub($id){ }else{ $niveles = Nivel_en::whereIn('id', $colNiveles->unique())->orderBy('descripcion')->get(); } - + return view('report.cargos_club')->with('dbEmpresa', $dbEmpresa) ->with('club', $club) ->with('niveles', $niveles) @@ -327,12 +375,21 @@ public function showCargosClub($id){ public function cargoReport(Request $request){ - return $this->cargoReportAll($request, "view"); + if(Session::get('especial')){ + return $this->cargoReportEspecial($request, "view"); + }else{ + return $this->cargoReportAll($request, "view"); + } + } public function cargoReportExcel(Request $request){ - return $this->cargoReportAll($request, "excel"); + if(Session::get('especial')){ + return $this->cargoReportEspecial($request, "excel"); + }else{ + return $this->cargoReportAll($request, "excel"); + } } public function cargoReportClubExcel(Request $request){ @@ -346,6 +403,7 @@ public function cargoReportClubExcel(Request $request){ }else{ $dbEncuesta = Cabecera_encuesta::where('empresa_id', $dbEmpresa->id)->whereRaw('id = (select max(id) from cabecera_encuestas where empresa_id = '. $dbEmpresa->id.')')->first(); } + $reporteEspecial = Session::get('especial'); // periodo de la encuesta actual (semestral para navieras) $periodo = $dbEncuesta->periodo; // rubro de la empresa del cliente @@ -353,6 +411,7 @@ public function cargoReportClubExcel(Request $request){ // recupera los cargos del periodo para todos los que tengan homologación $encuestasCargos = Encuestas_cargo::where('cabecera_encuesta_id', $dbEncuesta->id) ->whereNotNull('cargo_id') + ->where('incluir', 1) ->get(); // variables de detalle para cada segmento $detalleUniverso = collect(); @@ -362,7 +421,14 @@ public function cargoReportClubExcel(Request $request){ foreach ($encuestasCargos as $encuestaCargo) { $request->request->add(["cargo_id"=> $encuestaCargo->cargo->id]); // procesamos el reporte - $respuesta = $this->cargoReportAll($request, "clubExcel", true); + if($reporteEspecial){ + $respuesta = $this->cargoReportEspecial($request, "clubExcel", true); + $filename = 'Resultados_especial_'.$periodo; + }else{ + $respuesta = $this->cargoReportAll($request, "clubExcel", true); + $filename = 'Resultados_'.$periodo; + } + // preparamos los datos para el array final del cargo $itemArray = array( $encuestaCargo->descripcion, $encuestaCargo->cargo->descripcion, @@ -392,7 +458,7 @@ public function cargoReportClubExcel(Request $request){ $detalleNacional->push($itemArrayNac); $detalleInternacional->push($itemArrayInt); } - $filename = 'Resultados_'.$periodo; + Excel::create($filename, function($excel) use($detalleUniverso, $detalleNacional, $detalleInternacional, $rubro) { $excel->sheet("universo", function($sheet) use($detalleUniverso, $rubro){ @@ -1508,248 +1574,550 @@ public function cargoReportClubExcel(Request $request){ })->export('xlsx'); } - public function nivelReportClubExcel(Request $request){ + public function cargoReportClubEspecial(Request $request){ ini_set('max_execution_time', 0); + // datos de la empresa del cliente + $dbEmpresa = Empresa::find($request->empresa_id); + // si la variable de sesion "periodo" está cargada (solo se carga con navieras) + if(Session::has('periodo')){ + $per = Session::get('periodo'); + $dbEncuesta = Cabecera_encuesta::where('empresa_id', $dbEmpresa->id) + ->where('periodo', $per) + ->first(); + }else{ + $dbEncuesta = Cabecera_encuesta::where('empresa_id', $dbEmpresa->id) + ->whereRaw('id = (select max(id) from cabecera_encuestas where empresa_id = '. $dbEmpresa->id.')') + ->first(); + } // periodo de la encuesta actual (semestral para navieras) - $periodo = $request->periodo; + $periodo = $dbEncuesta->periodo; + + $periodoArray = explode("/", $periodo); + $yearAnt = intval($periodoArray[1]) - 1; + $periodoAnt = $periodoArray[0]."/".$yearAnt; + // buscamos la encuesta del año pasado + $dbEncuestaAnt = Cabecera_encuesta::where('empresa_id', $dbEmpresa->id) + ->where('periodo', $periodoAnt) + ->first(); + + if(!$dbEncuestaAnt){ + $dbEncuestaAnt = Cabecera_encuesta::where('empresa_id', $dbEmpresa->id) + ->where('id', '<', $dbEncuesta->id) + ->orderBy('id', 'DESC') + ->first(); + } + + $dbEncuestasId = Cabecera_encuesta::where('periodo', $periodo) + ->pluck('id'); + // rubro de la empresa del cliente - $rubro = $request->rubro_id; + $rubro = $dbEmpresa->rubro_id; - $encuestasIDs = Cabecera_encuesta::where('periodo', $periodo) - ->where('rubro_id', $rubro) - ->pluck('id'); - // recupera los cargos del periodo para todos los que tengan homologación con niveles - $nivelesCargos = Detalle_encuestas_nivel::distinct() - ->whereIn('cabecera_encuesta_id', $encuestasIDs) - ->whereNotNull('cargo_oficial_id') - ->pluck('nivel_oficial_id'); - // variables de detalle para cada segmento - $detalleUniverso = collect(); - $detalleNacional = collect(); - $detalleInternacional = collect(); + $cargosTrip = Cargo::where('area_id', 57) + ->pluck('id'); + // recupera los cargos del periodo para todos los que tengan homologación + $encuestasCargos = Encuestas_cargo::where('cabecera_encuesta_id', $dbEncuesta->id) + ->whereIn('cargo_id', $cargosTrip) + ->whereNotNull('cargo_id') + ->where('incluir', 1) + ->get(); - $detalleInternacional = collect(); + // variables de detalle para cada segmento + $salarioBase = collect(); + $efectivoTotalAnual = collect(); + $variable = collect(); + $adicionalTotal = collect(); + $contratoNuevo = collect(); + // Procesamiento por cargo - foreach ($nivelesCargos as $value) { - $request->request->add(["nivel_id"=> $value]); + foreach ($encuestasCargos as $encuestaCargo) { + $cargoId = $encuestaCargo->cargo->id; // procesamos el reporte - $respuesta = $this->nivelReport($request, $encuestasIDs, true); - $nivel = Nivel::find($value); + if(!$encuestaCargo->es_contrato_periodo){ + $respuesta = $this->cargoComparativoEspecial($dbEncuesta, $dbEncuestaAnt, $dbEmpresa, $cargoId, false); + }else{ + $respuesta = $this->cargoComparativoEspecial($dbEncuesta, $dbEncuestaAnt, $dbEmpresa, $cargoId, true); + } + + $filename = 'Comparativo_interanual_'.$periodo.'_'.$periodoAnt; + // preparamos los datos para el array final del cargo - $itemArray = array( $nivel->descripcion, - $nivel->descripcion, - ); - $itemArrayNac = $itemArray; - $itemArrayInt = $itemArray; + $itemArray = array( $encuestaCargo->cargo->descripcion); + $itemArrayETA = array( $encuestaCargo->cargo->descripcion); + $itemArrayVar = array( $encuestaCargo->cargo->descripcion); + $itemArrayATA = array( $encuestaCargo->cargo->descripcion); + if($encuestaCargo->es_contrato_periodo){ + $itemArrayContNuevo = array($encuestaCargo->cargo->descripcion); + } + // por cada item del detalle foreach ($respuesta as $key => $item) { - - switch ($key) { - - case 'detalle_universo': - $this->cargaDetalleNivel($item, $itemArray); + //dd($item); + switch ($key) { + case 'detalle_salario_base': + + if($encuestaCargo->es_contrato_periodo){ + $this->CargaDetalleComparativo($item[0], $itemArrayContNuevo, 1); + }else{ + $this->CargaDetalleComparativo($item[0], $itemArray, 0); + } break; - case 'detalle_nacional': - $this->cargaDetalleNivel($item, $itemArrayNac); + + case 'detalle_efectivo_total_anual': + $this->CargaDetalleComparativo($item[0], $itemArrayETA, 0); break; - case 'detalleInternacional': - $this->cargaDetalleNivel($item, $itemArrayInt); + case 'detalle_variable': + $this->CargaDetalleComparativo($item[0], $itemArrayVar, 0); + break; + case 'detalle_adicional_total_anual': + $this->CargaDetalleComparativo($item[0], $itemArrayATA, 0); break; - } + } } - - $detalleUniverso->push($itemArray); - $detalleNacional->push($itemArrayNac); - $detalleInternacional->push($itemArrayInt); - } - - - $filename = 'Resultados_Niveles'.$periodo; - Excel::create($filename, function($excel) use($detalleUniverso, $detalleNacional, $detalleInternacional) { - //Excel::create($filename, function($excel) use($detalleNacional) { - $excel->sheet("universo", function($sheet) use($detalleUniverso){ + $salarioBase->push($itemArray); + $efectivoTotalAnual->push($itemArrayETA); + $variable->push($itemArrayVar); + $adicionalTotal->push($itemArrayATA); + if($encuestaCargo->es_contrato_periodo){ + $contratoNuevo->push($itemArrayContNuevo); + } + } + + Excel::create($filename, function($excel) use($salarioBase, $efectivoTotalAnual, $variable, $adicionalTotal, $contratoNuevo, $periodo, $periodoAnt) { + $excel->sheet("Salario Base", function($sheet) use($salarioBase, $periodo, $periodoAnt){ + $salarioBase = $salarioBase->reject(function($item){ + if(count($item) < 13){ + return $item; + } + + return false; + }); $objDrawing = new PHPExcel_Worksheet_Drawing; $objDrawing->setPath(public_path('images/logo.jpg')); //your image path $objDrawing->setCoordinates('A1'); $objDrawing->setWidthAndHeight(304,60); - $objDrawing->setWorksheet($sheet); + $objDrawing->setWorksheet($sheet); + + + // Título $sheet->cell('A5', function($cell){ - $cell->setValue('NIVEL'); + $cell->setValue('COMPARATIVO INTERANUAL SALARIO BASE'); }); - $sheet->mergeCells('A5:D5'); - $sheet->cells('A5:D5', function($cells){ - $cells->setBackground('#00897b'); + $sheet->mergeCells('A5:M5'); + $sheet->cells('A5:M5', function($cells){ + $cells->setBackground('#0288d1'); $cells->setFontColor("#FFFFFF"); $cells->setFontWeight("bold"); // $cells->setValignment('center'); $cells->setAlignment('center'); }); - // Salario Base Header - $sheet->cell('E5', function($cell){ - $cell->setValue('SALARIO BASE'); + + $sheet->cell('B6', function($cell) use($periodoAnt){ + $cell->setValue('PERIODO '.$periodoAnt); }); - $sheet->mergeCells('E5:J5'); - $sheet->cells('E5:J5', function($cells){ - $cells->setBackground('#0288d1'); + $sheet->mergeCells('B6:G6'); + $sheet->cells('B6:G6', function($cells){ + $cells->setBackground('#7cb342'); $cells->setFontColor("#FFFFFF"); $cells->setFontWeight("bold"); // $cells->setValignment('center'); $cells->setAlignment('center'); - }); - - // Bono Anual - $sheet->cell('K5', function($cell){ - $cell->setValue('BONO ANUAL'); }); - $sheet->mergeCells('K5:P5'); - $sheet->cells('K5:P5', function($cells){ - $cells->setBackground('#ffa000'); + + $sheet->cell('H6', function($cell) use($periodo){ + $cell->setValue('PERIODO '.$periodo); + }); + $sheet->mergeCells('H6:M6'); + $sheet->cells('H6:M6', function($cells){ + $cells->setBackground('#ffb300'); $cells->setFontColor("#FFFFFF"); $cells->setFontWeight("bold"); // $cells->setValignment('center'); $cells->setAlignment('center'); }); - // Total efectivo anual - $sheet->cell('Q5', function($cell){ - $cell->setValue('TOTAL EFECTIVO ANUAL'); - }); - $sheet->mergeCells('Q5:V5'); - $sheet->cells('Q5:V5', function($cells){ - $cells->setBackground('#4a148c'); - $cells->setFontColor("#FFFFFF"); - $cells->setFontWeight("bold"); - // $cells->setValignment('center'); - $cells->setAlignment('center'); - }); + $topeHeader = 2; + $rango = 'A7:M7'; + $itemsHeader = array("Mínimo", "25 Perc.", "Promedio", "Mediana", "75 Perc.", "Máximo"); - $cargoHeader = array("Cargo Company", "Oficial", "Ocupantes", "Casos"); - for ($i= 0; $i < 3; $i++) { + $cargoHeader = array("Cargo Oficial"); + + for ($i= 0; $i < $topeHeader; $i++) { foreach ($itemsHeader as $key => $value) { array_push($cargoHeader, $value); } } - - $sheet->row(6, $cargoHeader); - $sheet->cells('A6:V6', function($cells){ + + $sheet->row(7, $cargoHeader); + $sheet->rows($salarioBase); + $sheet->cells($rango, function($cells){ $cells->setBackground('#a7ffeb'); - }); - - $sheet->rows($detalleUniverso); - $sheet->setFreeze('A7'); + }); + $sheet->setFreeze('A7'); + }); + + $excel->sheet("Efectivo Total Anual", function($sheet) use($efectivoTotalAnual, $periodo, $periodoAnt){ - }); - // hoja nacional - $excel->sheet("nacional", function($sheet) use($detalleNacional){ $objDrawing = new PHPExcel_Worksheet_Drawing; $objDrawing->setPath(public_path('images/logo.jpg')); //your image path $objDrawing->setCoordinates('A1'); $objDrawing->setWidthAndHeight(304,60); - $objDrawing->setWorksheet($sheet); + $objDrawing->setWorksheet($sheet); + + + // Título $sheet->cell('A5', function($cell){ - $cell->setValue('NIVEL'); + $cell->setValue('COMPARATIVO INTERANUAL EFECTIVO TOTAL ANUAL'); }); - $sheet->mergeCells('A5:D5'); - $sheet->cells('A5:D5', function($cells){ - $cells->setBackground('#00897b'); + $sheet->mergeCells('A5:M5'); + $sheet->cells('A5:M5', function($cells){ + $cells->setBackground('#0288d1'); $cells->setFontColor("#FFFFFF"); $cells->setFontWeight("bold"); // $cells->setValignment('center'); $cells->setAlignment('center'); }); - // Salario Base Header - $sheet->cell('E5', function($cell){ - $cell->setValue('SALARIO BASE'); + + $sheet->cell('B6', function($cell) use($periodoAnt){ + $cell->setValue('PERIODO '.$periodoAnt); }); - $sheet->mergeCells('E5:J5'); - $sheet->cells('E5:J5', function($cells){ - $cells->setBackground('#0288d1'); + $sheet->mergeCells('B6:G6'); + $sheet->cells('B6:G6', function($cells){ + $cells->setBackground('#7cb342'); $cells->setFontColor("#FFFFFF"); $cells->setFontWeight("bold"); // $cells->setValignment('center'); $cells->setAlignment('center'); - }); - - // Bono Anual - $sheet->cell('K5', function($cell){ - $cell->setValue('BONO ANUAL'); }); - $sheet->mergeCells('K5:P5'); - $sheet->cells('K5:P5', function($cells){ - $cells->setBackground('#ffa000'); + + $sheet->cell('H6', function($cell) use($periodo){ + $cell->setValue('PERIODO '.$periodo); + }); + $sheet->mergeCells('H6:M6'); + $sheet->cells('H6:M6', function($cells){ + $cells->setBackground('#ffb300'); $cells->setFontColor("#FFFFFF"); $cells->setFontWeight("bold"); // $cells->setValignment('center'); $cells->setAlignment('center'); }); - // Total efectivo anual - $sheet->cell('Q5', function($cell){ - $cell->setValue('TOTAL EFECTIVO ANUAL'); - }); - $sheet->mergeCells('Q5:V5'); - $sheet->cells('Q5:V5', function($cells){ - $cells->setBackground('#4a148c'); - $cells->setFontColor("#FFFFFF"); - $cells->setFontWeight("bold"); - // $cells->setValignment('center'); - $cells->setAlignment('center'); - }); + $topeHeader = 2; + $rango = 'A7:M7'; + $itemsHeader = array("Mínimo", "25 Perc.", "Promedio", "Mediana", "75 Perc.", "Máximo"); - $cargoHeader = array("Cargo Company", "Oficial", "Ocupantes", "Casos"); - for ($i= 0; $i < 3; $i++) { + $cargoHeader = array("Cargo Oficial"); + + for ($i= 0; $i < $topeHeader; $i++) { foreach ($itemsHeader as $key => $value) { array_push($cargoHeader, $value); } } - - $sheet->row(6, $cargoHeader); - $sheet->cells('A6:V6', function($cells){ + + $sheet->row(7, $cargoHeader); + $sheet->rows($efectivoTotalAnual); + $sheet->cells($rango, function($cells){ $cells->setBackground('#a7ffeb'); - }); + }); + $sheet->setFreeze('A7'); + }); + + $excel->sheet("Variable", function($sheet) use($variable, $periodo, $periodoAnt){ - $sheet->rows($detalleNacional); - $sheet->setFreeze('A7'); - }); - // hoja internacional - $excel->sheet("internacional", function($sheet) use($detalleInternacional){ $objDrawing = new PHPExcel_Worksheet_Drawing; $objDrawing->setPath(public_path('images/logo.jpg')); //your image path $objDrawing->setCoordinates('A1'); $objDrawing->setWidthAndHeight(304,60); - $objDrawing->setWorksheet($sheet); + $objDrawing->setWorksheet($sheet); + + + // Título $sheet->cell('A5', function($cell){ - $cell->setValue('NIVEL'); + $cell->setValue('COMPARATIVO INTERANUAL VARIABLE'); }); - $sheet->mergeCells('A5:D5'); - $sheet->cells('A5:D5', function($cells){ - $cells->setBackground('#00897b'); + $sheet->mergeCells('A5:M5'); + $sheet->cells('A5:M5', function($cells){ + $cells->setBackground('#0288d1'); $cells->setFontColor("#FFFFFF"); $cells->setFontWeight("bold"); // $cells->setValignment('center'); $cells->setAlignment('center'); }); - // Salario Base Header - $sheet->cell('E5', function($cell){ - $cell->setValue('SALARIO BASE'); + + $sheet->cell('B6', function($cell) use($periodoAnt){ + $cell->setValue('PERIODO '.$periodoAnt); }); - $sheet->mergeCells('E5:J5'); - $sheet->cells('E5:J5', function($cells){ - $cells->setBackground('#0288d1'); + $sheet->mergeCells('B6:G6'); + $sheet->cells('B6:G6', function($cells){ + $cells->setBackground('#7cb342'); $cells->setFontColor("#FFFFFF"); $cells->setFontWeight("bold"); // $cells->setValignment('center'); $cells->setAlignment('center'); - }); - - // Bono Anual + }); + + $sheet->cell('H6', function($cell) use($periodo){ + $cell->setValue('PERIODO '.$periodo); + }); + $sheet->mergeCells('H6:M6'); + $sheet->cells('H6:M6', function($cells){ + $cells->setBackground('#ffb300'); + $cells->setFontColor("#FFFFFF"); + $cells->setFontWeight("bold"); + // $cells->setValignment('center'); + $cells->setAlignment('center'); + }); + + $topeHeader = 2; + $rango = 'A7:M7'; + + $itemsHeader = array("Mínimo", "25 Perc.", "Promedio", "Mediana", "75 Perc.", "Máximo"); + $cargoHeader = array("Cargo Oficial"); + + for ($i= 0; $i < $topeHeader; $i++) { + foreach ($itemsHeader as $key => $value) { + array_push($cargoHeader, $value); + } + + } + + $sheet->row(7, $cargoHeader); + $sheet->rows($variable); + $sheet->cells($rango, function($cells){ + $cells->setBackground('#a7ffeb'); + }); + $sheet->setFreeze('A7'); + }); + + $excel->sheet("Adicional Total Anual", function($sheet) use($adicionalTotal, $periodo, $periodoAnt){ + + $objDrawing = new PHPExcel_Worksheet_Drawing; + $objDrawing->setPath(public_path('images/logo.jpg')); //your image path + $objDrawing->setCoordinates('A1'); + $objDrawing->setWidthAndHeight(304,60); + $objDrawing->setWorksheet($sheet); + + + + // Título + $sheet->cell('A5', function($cell){ + $cell->setValue('COMPARATIVO INTERANUAL ADICIONAL TOTAL ANUAL'); + }); + $sheet->mergeCells('A5:M5'); + $sheet->cells('A5:M5', function($cells){ + $cells->setBackground('#0288d1'); + $cells->setFontColor("#FFFFFF"); + $cells->setFontWeight("bold"); + // $cells->setValignment('center'); + $cells->setAlignment('center'); + }); + + $sheet->cell('B6', function($cell) use($periodoAnt){ + $cell->setValue('PERIODO '.$periodoAnt); + }); + $sheet->mergeCells('B6:G6'); + $sheet->cells('B6:G6', function($cells){ + $cells->setBackground('#7cb342'); + $cells->setFontColor("#FFFFFF"); + $cells->setFontWeight("bold"); + // $cells->setValignment('center'); + $cells->setAlignment('center'); + }); + + $sheet->cell('H6', function($cell) use($periodo){ + $cell->setValue('PERIODO '.$periodo); + }); + $sheet->mergeCells('H6:M6'); + $sheet->cells('H6:M6', function($cells){ + $cells->setBackground('#ffb300'); + $cells->setFontColor("#FFFFFF"); + $cells->setFontWeight("bold"); + // $cells->setValignment('center'); + $cells->setAlignment('center'); + }); + + $topeHeader = 2; + $rango = 'A7:M7'; + + $itemsHeader = array("Mínimo", "25 Perc.", "Promedio", "Mediana", "75 Perc.", "Máximo"); + $cargoHeader = array("Cargo Oficial"); + + for ($i= 0; $i < $topeHeader; $i++) { + foreach ($itemsHeader as $key => $value) { + array_push($cargoHeader, $value); + } + + } + + $sheet->row(7, $cargoHeader); + $sheet->rows($adicionalTotal); + $sheet->cells($rango, function($cells){ + $cells->setBackground('#a7ffeb'); + }); + $sheet->setFreeze('A7'); + }); + + $excel->sheet("Tripulacion Incorporada", function($sheet) use($contratoNuevo, $periodo){ + + $objDrawing = new PHPExcel_Worksheet_Drawing; + $objDrawing->setPath(public_path('images/logo.jpg')); //your image path + $objDrawing->setCoordinates('A1'); + $objDrawing->setWidthAndHeight(304,60); + $objDrawing->setWorksheet($sheet); + + + + // Título + $sheet->cell('A5', function($cell){ + $cell->setValue('TRIPULACION INCORPORADA EN EL PERIODO'); + }); + $sheet->mergeCells('A5:H5'); + $sheet->cells('A5:H5', function($cells){ + $cells->setBackground('#0288d1'); + $cells->setFontColor("#FFFFFF"); + $cells->setFontWeight("bold"); + // $cells->setValignment('center'); + $cells->setAlignment('center'); + }); + + + + $sheet->cell('B6', function($cell) use($periodo){ + $cell->setValue('PERIODO '.$periodo); + }); + $sheet->mergeCells('B6:H6'); + $sheet->cells('B6:H6', function($cells){ + $cells->setBackground('#ffb300'); + $cells->setFontColor("#FFFFFF"); + $cells->setFontWeight("bold"); + // $cells->setValignment('center'); + $cells->setAlignment('center'); + }); + + $topeHeader = 1; + $rango = 'A7:H7'; + + $itemsHeader = array("Ocupantes","Mínimo", "25 Perc.", "Promedio", "Mediana", "75 Perc.", "Máximo"); + $cargoHeader = array("Cargo Oficial"); + + for ($i= 0; $i < $topeHeader; $i++) { + foreach ($itemsHeader as $key => $value) { + array_push($cargoHeader, $value); + } + + } + + $sheet->row(7, $cargoHeader); + $sheet->rows($contratoNuevo); + $sheet->cells($rango, function($cells){ + $cells->setBackground('#a7ffeb'); + }); + $sheet->setFreeze('A7'); + }); + $excel->setActiveSheetIndex(0); + })->export('xlsx'); + } + + public function nivelReportClubExcel(Request $request){ + ini_set('max_execution_time', 0); + // periodo de la encuesta actual (semestral para navieras) + $periodo = $request->periodo; + // rubro de la empresa del cliente + $rubro = $request->rubro_id; + + $encuestasIDs = Cabecera_encuesta::where('periodo', $periodo) + ->where('rubro_id', $rubro) + ->pluck('id'); + // recupera los cargos del periodo para todos los que tengan homologación con niveles + $nivelesCargos = Detalle_encuestas_nivel::distinct() + ->whereIn('cabecera_encuesta_id', $encuestasIDs) + ->whereNotNull('cargo_oficial_id') + ->pluck('nivel_oficial_id'); + // variables de detalle para cada segmento + $detalleUniverso = collect(); + $detalleNacional = collect(); + $detalleInternacional = collect(); + + $detalleInternacional = collect(); + // Procesamiento por cargo + foreach ($nivelesCargos as $value) { + $request->request->add(["nivel_id"=> $value]); + // procesamos el reporte + $respuesta = $this->nivelReport($request, $encuestasIDs, true); + $nivel = Nivel::find($value); + // preparamos los datos para el array final del cargo + $itemArray = array( $nivel->descripcion, + $nivel->descripcion, + ); + $itemArrayNac = $itemArray; + $itemArrayInt = $itemArray; + // por cada item del detalle + foreach ($respuesta as $key => $item) { + + switch ($key) { + + case 'detalle_universo': + $this->cargaDetalleNivel($item, $itemArray); + break; + case 'detalle_nacional': + $this->cargaDetalleNivel($item, $itemArrayNac); + break; + case 'detalleInternacional': + $this->cargaDetalleNivel($item, $itemArrayInt); + break; + } + + } + + $detalleUniverso->push($itemArray); + $detalleNacional->push($itemArrayNac); + $detalleInternacional->push($itemArrayInt); + } + + + $filename = 'Resultados_Niveles'.$periodo; + + Excel::create($filename, function($excel) use($detalleUniverso, $detalleNacional, $detalleInternacional) { + //Excel::create($filename, function($excel) use($detalleNacional) { + $excel->sheet("universo", function($sheet) use($detalleUniverso){ + $objDrawing = new PHPExcel_Worksheet_Drawing; + $objDrawing->setPath(public_path('images/logo.jpg')); //your image path + $objDrawing->setCoordinates('A1'); + $objDrawing->setWidthAndHeight(304,60); + $objDrawing->setWorksheet($sheet); + + $sheet->cell('A5', function($cell){ + $cell->setValue('NIVEL'); + }); + $sheet->mergeCells('A5:D5'); + $sheet->cells('A5:D5', function($cells){ + $cells->setBackground('#00897b'); + $cells->setFontColor("#FFFFFF"); + $cells->setFontWeight("bold"); + // $cells->setValignment('center'); + $cells->setAlignment('center'); + }); + // Salario Base Header + $sheet->cell('E5', function($cell){ + $cell->setValue('SALARIO BASE'); + }); + $sheet->mergeCells('E5:J5'); + $sheet->cells('E5:J5', function($cells){ + $cells->setBackground('#0288d1'); + $cells->setFontColor("#FFFFFF"); + $cells->setFontWeight("bold"); + // $cells->setValignment('center'); + $cells->setAlignment('center'); + }); + + // Bono Anual $sheet->cell('K5', function($cell){ $cell->setValue('BONO ANUAL'); }); @@ -1788,62 +2156,204 @@ public function nivelReportClubExcel(Request $request){ $cells->setBackground('#a7ffeb'); }); - $sheet->rows($detalleInternacional); + $sheet->rows($detalleUniverso); $sheet->setFreeze('A7'); - }); - $excel->setActiveSheetIndex(0); - })->export('xlsx'); - } - private function cargaDetalle($item, &$itemArray){ - $variableAnual = false; - $efectivoTotal = false; - $efectivoGarantizado = false; - $salarioEmpresa = 0; - $variableAnualEmp = 0; - //dd($item); - foreach ($item as $key => $value) { - switch ($value["Concepto"]) { - case "Comision": - $this->cargador($value, $itemArray, false); - break; - case Lang::get('reportReport.concept_salary'): - //dd("salario"); - $this->cargador($value, $itemArray, true); - $salarioEmpresa = intval(str_replace(".", "", $value["Empresa"])); - break; - case Lang::get('reportReport.concept_annual_cash'): - $efectivoGarantizado = true; - $this->cargador($value, $itemArray, false); - break; - case Lang::get('reportReport.concept_variable_pay'): - $variableAnual = true; - $this->cargador($value, $itemArray, false); - $variableAnualEmp = $value["Empresa"]; - break; - case Lang::get('reportReport.concept_total_incentives'): - $this->cargador($value, $itemArray, false); - break; - case Lang::get('reportReport.concept_bonus'): - $this->cargador($value, $itemArray, false); - break; - case Lang::get('reportReport.concept_total_compensation'): - $this->cargador($value, $itemArray, false); - break; - case Lang::get('reportReport.concept_annual_cash_total'): - $efectivoTotal = true; - $this->cargador($value, $itemArray, false); - break; + + }); + // hoja nacional + $excel->sheet("nacional", function($sheet) use($detalleNacional){ + $objDrawing = new PHPExcel_Worksheet_Drawing; + $objDrawing->setPath(public_path('images/logo.jpg')); //your image path + $objDrawing->setCoordinates('A1'); + $objDrawing->setWidthAndHeight(304,60); + $objDrawing->setWorksheet($sheet); + + $sheet->cell('A5', function($cell){ + $cell->setValue('NIVEL'); + }); + $sheet->mergeCells('A5:D5'); + $sheet->cells('A5:D5', function($cells){ + $cells->setBackground('#00897b'); + $cells->setFontColor("#FFFFFF"); + $cells->setFontWeight("bold"); + // $cells->setValignment('center'); + $cells->setAlignment('center'); + }); + // Salario Base Header + $sheet->cell('E5', function($cell){ + $cell->setValue('SALARIO BASE'); + }); + $sheet->mergeCells('E5:J5'); + $sheet->cells('E5:J5', function($cells){ + $cells->setBackground('#0288d1'); + $cells->setFontColor("#FFFFFF"); + $cells->setFontWeight("bold"); + // $cells->setValignment('center'); + $cells->setAlignment('center'); + }); + + // Bono Anual + $sheet->cell('K5', function($cell){ + $cell->setValue('BONO ANUAL'); + }); + $sheet->mergeCells('K5:P5'); + $sheet->cells('K5:P5', function($cells){ + $cells->setBackground('#ffa000'); + $cells->setFontColor("#FFFFFF"); + $cells->setFontWeight("bold"); + // $cells->setValignment('center'); + $cells->setAlignment('center'); + }); + + // Total efectivo anual + $sheet->cell('Q5', function($cell){ + $cell->setValue('TOTAL EFECTIVO ANUAL'); + }); + $sheet->mergeCells('Q5:V5'); + $sheet->cells('Q5:V5', function($cells){ + $cells->setBackground('#4a148c'); + $cells->setFontColor("#FFFFFF"); + $cells->setFontWeight("bold"); + // $cells->setValignment('center'); + $cells->setAlignment('center'); + }); + $itemsHeader = array("Mínimo", "25 Perc.", "Promedio", "Mediana", "75 Perc.", "Máximo"); + $cargoHeader = array("Cargo Company", "Oficial", "Ocupantes", "Casos"); + for ($i= 0; $i < 3; $i++) { + foreach ($itemsHeader as $key => $value) { + array_push($cargoHeader, $value); + } + + } + + $sheet->row(6, $cargoHeader); + $sheet->cells('A6:V6', function($cells){ + $cells->setBackground('#a7ffeb'); + }); + + $sheet->rows($detalleNacional); + $sheet->setFreeze('A7'); + }); + // hoja internacional + $excel->sheet("internacional", function($sheet) use($detalleInternacional){ + $objDrawing = new PHPExcel_Worksheet_Drawing; + $objDrawing->setPath(public_path('images/logo.jpg')); //your image path + $objDrawing->setCoordinates('A1'); + $objDrawing->setWidthAndHeight(304,60); + $objDrawing->setWorksheet($sheet); + + $sheet->cell('A5', function($cell){ + $cell->setValue('NIVEL'); + }); + $sheet->mergeCells('A5:D5'); + $sheet->cells('A5:D5', function($cells){ + $cells->setBackground('#00897b'); + $cells->setFontColor("#FFFFFF"); + $cells->setFontWeight("bold"); + // $cells->setValignment('center'); + $cells->setAlignment('center'); + }); + // Salario Base Header + $sheet->cell('E5', function($cell){ + $cell->setValue('SALARIO BASE'); + }); + $sheet->mergeCells('E5:J5'); + $sheet->cells('E5:J5', function($cells){ + $cells->setBackground('#0288d1'); + $cells->setFontColor("#FFFFFF"); + $cells->setFontWeight("bold"); + // $cells->setValignment('center'); + $cells->setAlignment('center'); + }); + + // Bono Anual + $sheet->cell('K5', function($cell){ + $cell->setValue('BONO ANUAL'); + }); + $sheet->mergeCells('K5:P5'); + $sheet->cells('K5:P5', function($cells){ + $cells->setBackground('#ffa000'); + $cells->setFontColor("#FFFFFF"); + $cells->setFontWeight("bold"); + // $cells->setValignment('center'); + $cells->setAlignment('center'); + }); + + // Total efectivo anual + $sheet->cell('Q5', function($cell){ + $cell->setValue('TOTAL EFECTIVO ANUAL'); + }); + $sheet->mergeCells('Q5:V5'); + $sheet->cells('Q5:V5', function($cells){ + $cells->setBackground('#4a148c'); + $cells->setFontColor("#FFFFFF"); + $cells->setFontWeight("bold"); + // $cells->setValignment('center'); + $cells->setAlignment('center'); + }); + $itemsHeader = array("Mínimo", "25 Perc.", "Promedio", "Mediana", "75 Perc.", "Máximo"); + $cargoHeader = array("Cargo Company", "Oficial", "Ocupantes", "Casos"); + for ($i= 0; $i < 3; $i++) { + foreach ($itemsHeader as $key => $value) { + array_push($cargoHeader, $value); + } + + } + + $sheet->row(6, $cargoHeader); + $sheet->cells('A6:V6', function($cells){ + $cells->setBackground('#a7ffeb'); + }); + + $sheet->rows($detalleInternacional); + $sheet->setFreeze('A7'); + }); + $excel->setActiveSheetIndex(0); + })->export('xlsx'); + } + private function cargaDetalle($item, &$itemArray){ + $variableAnual = false; + $efectivoTotal = false; + $efectivoGarantizado = false; + $salarioEmpresa = 0; + $variableAnualEmp = 0; + //dd($item); + foreach ($item as $key => $value) { + switch ($value["Concepto"]) { + case "Comision": + $this->cargador($value, $itemArray, false); + break; + case Lang::get('reportReport.concept_salary'): + //dd("salario"); + $this->cargador($value, $itemArray, true); + $salarioEmpresa = intval(str_replace(".", "", $value["Empresa"])); + break; + case Lang::get('reportReport.concept_annual_cash'): + $efectivoGarantizado = true; + $this->cargador($value, $itemArray, false); + break; + case Lang::get('reportReport.concept_variable_pay'): + $variableAnual = true; + $this->cargador($value, $itemArray, false); + $variableAnualEmp = $value["Empresa"]; + break; + case Lang::get('reportReport.concept_total_incentives'): + $this->cargador($value, $itemArray, false); + break; + case Lang::get('reportReport.concept_bonus'): + $this->cargador($value, $itemArray, false); + break; + case Lang::get('reportReport.concept_total_compensation'): + $this->cargador($value, $itemArray, false); + break; + case Lang::get('reportReport.concept_annual_cash_total'): + $efectivoTotal = true; + $this->cargador($value, $itemArray, false); + break; } } - //dd($item); - /*if(!$variableAnual){ - // agregamos 0 a los lugares de Variable Anual - $aux = array_slice($itemArray, 0, 16, true); - array_push($aux, 0,0,0,0,0,0); - $aux2 = array_merge($aux, array_slice($itemArray, 16)); - $itemArray = $aux2; - }*/ + // comparativo salario base if($itemArray[4] > 0){ $compMinSal = round($salarioEmpresa/$itemArray[4] - 1, 2); @@ -2056,6 +2566,31 @@ private function cargaDetalle($item, &$itemArray){ } + } + private function cargaDetalleComparativo($value, &$itemArray, $contNuevo){ + + if($contNuevo){ + array_push($itemArray, $value["Ocupantes"]); + array_push($itemArray, $value["Min"]); + array_push($itemArray, $value["25 Percentil"]); + array_push($itemArray, round($value["Promedio"], 2)); + array_push($itemArray, $value["Mediana"]); + array_push($itemArray, $value["75 Percentil"]); + array_push($itemArray, $value["Max"]); + }else{ + array_push($itemArray, $value["Min Ant"]); + array_push($itemArray, $value["25P Ant"]); + array_push($itemArray, round($value["Prom Ant"], 2)); + array_push($itemArray, $value["Med Ant"]); + array_push($itemArray, $value["75P Ant"]); + array_push($itemArray, $value["Max Ant"]); + array_push($itemArray, $value["Min"]); + array_push($itemArray, $value["25 Percentil"]); + array_push($itemArray, round($value["Promedio"], 2)); + array_push($itemArray, $value["Mediana"]); + array_push($itemArray, $value["75 Percentil"]); + array_push($itemArray, $value["Max"]); + } } private function cargador($value, &$itemArray, $casos){ if($casos){ @@ -3282,6 +3817,7 @@ public function resultadosExcel(Request $request){ $dbDetalle = DB::select($query, ["periodo" => $periodo, "rubro" => $rubro]); $detalle = array(); foreach ($dbDetalle as $key => $item) { + // Efectivo Anual Garantizado $efectivoAnual = $item->salario_anual + $item->gratificacion + @@ -3571,6 +4107,12 @@ public function resultadosExcel(Request $request){ } + /* foreach($detalle as $det){ + if($det["id_cargo_cliente"] == 23066){ + dd($det); + } + + } */ $periodo = implode('_', explode('/', $periodo)); $filename = 'Resultados_'.$periodo.'_'.$rubroDesc; Excel::create($filename, function($excel) use($detalle, $periodo, $rubro) { @@ -3610,9 +4152,33 @@ public function resultadosExcel(Request $request){ public function panel($id){ $dbEmpresa = $id; $rubro = Auth::user()->empresa->rubro_id; + $subRubro = Auth::user()->empresa->sub_rubro_id; + $reporteEspecial = Session::get('especial'); + $club = $this->club($rubro); - $dbEncuesta = Cabecera_encuesta::where('empresa_id', $id)->whereRaw('id = (select max(id) from cabecera_encuestas where empresa_id = '. $id.')')->first(); - $participantes = Cabecera_encuesta::where('periodo', $dbEncuesta->periodo)->where('rubro_id', $rubro)->get(); + $periodo = Session::get('periodo'); + if($periodo){ + $dbEncuesta = Cabecera_encuesta::where('empresa_id', $id) + ->where('periodo', $periodo) + ->first(); + + }else{ + $dbEncuesta = Cabecera_encuesta::where('empresa_id', $id) + ->whereRaw('id = (select max(id) from cabecera_encuestas where empresa_id = '. $id.')') + ->first(); + + } + if($reporteEspecial){ + $participantes = Cabecera_encuesta::where('periodo', $dbEncuesta->periodo) + ->where('rubro_id', $rubro) + ->where('sub_rubro_id', $subRubro) + ->get(); + }else{ + $participantes = Cabecera_encuesta::where('periodo', $dbEncuesta->periodo) + ->where('rubro_id', $rubro) + ->get(); + } + //dd($participantes, $subRubro, $dbEncuesta); $dbData = $participantes->map(function($item){ return $item->empresa; })->reject(function($item){ @@ -3696,9 +4262,15 @@ private function percentile($percentile, $arr) { public function setSession(Request $request){ $request->session()->put('periodo', $request->periodo); + $request->session()->forget('especial'); return "ok"; } + public function setSessionEspecial(Request $request){ + $request->session()->put('periodo', $request->periodo); + $request->session()->put('especial', "true"); + return "ok"; + } private function cargoReportAll(Request $request, $tipo, $muestraComision = true){ //dd($request->all()); @@ -4031,6 +4603,909 @@ private function cargoReportAll(Request $request, $tipo, $muestraComision = true } + private function cargoReportEspecial(Request $request, $tipo, $muestraComision = true){ + //dd($request->all()); + + $dbEmpresa = Empresa::find($request->empresa_id); // datos de la empresa del cliente + if(Session::has('periodo')){ + $per = Session::get('periodo'); + $dbEncuesta = Cabecera_encuesta::where('empresa_id', $dbEmpresa->id) + ->whereRaw("periodo = '". $per."'") + ->first(); + }else{ + if(Auth::user()->is_admin){ + $dbEncuesta = Cabecera_encuesta::where('empresa_id', $dbEmpresa->id) + ->whereRaw("periodo = '". $request->periodo."'") + ->first(); + //dd($dbEncuesta, $request->periodo); + }else{ + $ficha = Ficha_dato::activa()->where('rubro_id', $dbEmpresa->rubro_id)->first(); + if($ficha){ + $per = $ficha->periodo; + }else{ + $per = null; + } + if($per){ + $dbEncuesta = Cabecera_encuesta::where('empresa_id', $dbEmpresa->id) + ->where("periodo",$per) + ->first(); + }else{ + if($dbEmpresa->rubro_id == '1'){ + $per = '06/2018'; + $dbEncuesta = Cabecera_encuesta::where('empresa_id', $dbEmpresa->id) + ->whereRaw("periodo = '". $per."'") + ->first(); + }else{ + $dbEncuesta = Cabecera_encuesta::where('empresa_id', $dbEmpresa->id) + ->whereRaw('id = (select max(id) from cabecera_encuestas where empresa_id = '. $dbEmpresa->id.')') + ->first(); + } + } + + + + } + } + //dd($dbEmpresa, $ficha, $per); + $periodo = $dbEncuesta->periodo; // periodo de la encuesta actual + + $rubro = $dbEmpresa->rubro_id; // rubro de la empresa del cliente + $subRubro = $dbEmpresa->sub_rubro_id; + // cargo oficial para el informe + $cargo = $request->cargo_id; + if($this->getIdioma() == "es"){ + $dbCargo = Cargo::find($cargo); + }else{ + $dbCargo = Cargo_en::find($cargo); + } + + // empresas y cabeceras de encuestas de este periodo para empresas del rubro del cliente + $dbEncuestadas = Cabecera_encuesta::where('periodo', $periodo) + ->where('rubro_id', $rubro) + ->where('sub_rubro_id', $subRubro) + ->get(); + + $encuestadasIds = $dbEncuestadas->pluck("id"); // Ids de las encuestas para where in + // conteo de encuestas según origen + $dbNacionales = 0; + $dbInternacionales = 0; + $dbUniverso = $dbEncuestadas->count(); + $encuestadasNacIds = collect(); + $encuestadasInterIds = collect(); + foreach ($dbEncuestadas as $key => $value) { + if($value->empresa->tipo == 0){ + $dbNacionales++; + $encuestadasNacIds[] = $value->id; + }else{ + $dbInternacionales++; + $encuestadasInterIds[] = $value->id; + }; + } + // Recuperamos los datos de los cargos proveídos por las empresas encuestadas + $dbCargosEncuestas = Encuestas_cargo::whereIn('cabecera_encuesta_id', $encuestadasIds) + ->where('cargo_id', $cargo) + ->where('incluir', 1) + ->get(); + + $dbCargosEncuestasNac = Encuestas_cargo::whereIn('cabecera_encuesta_id', $encuestadasNacIds)->where('cargo_id', $cargo)->where('incluir', 1)->get(); + $dbCargosEncuestasInter = Encuestas_cargo::whereIn('cabecera_encuesta_id', $encuestadasInterIds)->where('cargo_id', $cargo)->where('incluir', 1)->get(); + + $cargosEncuestasIds = $dbCargosEncuestas->pluck('id'); + $cargosEncuestasNacIds = $dbCargosEncuestasNac->pluck('id'); + $cargosEncuestasInterIds = $dbCargosEncuestasInter->pluck('id'); + + // Recuperamos los datos de las encuestas + $dbDetalle = Detalle_encuesta::whereIn('encuestas_cargo_id', $cargosEncuestasIds)->get(); + // Datos de la encuesta llenada por el cliente + $dbClienteEnc = $dbDetalle->where('cabecera_encuesta_id', $dbEncuesta->id)->first(); + // dd($dbEncuesta, $dbClienteEnc, $cargo); + if(empty($dbClienteEnc)){ + // get the column names for the table + $columns = Schema::getColumnListing('detalle_encuestas'); + // create array where column names are keys, and values are null + $columns = array_fill_keys($columns, 0); + $dbClienteEnc = new Detalle_encuesta(); + $dbClienteEnc = $dbClienteEnc->newInstance($columns, true); + } + // conteo de casos encontrados + $countCasos = $dbDetalle->where('cantidad_ocupantes', '>', '0') + ->unique('cabecera_encuesta_id') + ->count(); + $countOcupantes = $dbDetalle->sum('cantidad_ocupantes'); + $countCasosGratif = $dbDetalle->where('cantidad_ocupantes', '>', '0') + ->where('gratificacion', '>', '0') + ->unique('cabecera_encuesta_id')->count(); + $countCasosAguinaldo = $dbDetalle->where('cantidad_ocupantes', '>', '0') + ->where('aguinaldo', '>', '0') + ->unique('cabecera_encuesta_id')->count(); + //$countCasosBeneficios = $dbDetalle->where('beneficios_bancos', '>', 0)->unique('cabecera_encuesta_id')->count(); + $countCasosBono = $dbDetalle->where('cantidad_ocupantes', '>', '0') + ->where('bono_anual', '>', 0) + ->unique('cabecera_encuesta_id')->count(); + + + + $universo = collect(); + $segmento = "universo"; + $this->segmenter( $universo, + $dbUniverso, + $dbDetalle, + $countCasos, + $countCasosGratif, + $countCasosAguinaldo, + // $countCasosBeneficios, + $countCasosBono, + $dbClienteEnc, + $rubro, + $segmento, + $dbCargo, + $muestraComision); + + // conteo de casos encontrados nacionales + $countCasosNac = $encuestadasNacIds->count(); + // buscamos los detalles de las encuestas + $dbDetalleNac = Detalle_encuesta::whereIn('encuestas_cargo_id', $cargosEncuestasNacIds)->get(); + // conteo de casos encontrados + $countOcupantesNac = $dbDetalleNac->sum('cantidad_ocupantes'); + $countCasos = $dbDetalleNac->where('cantidad_ocupantes', '>', '0') + ->unique('cabecera_encuesta_id') + ->count(); + $countCasosGratif = $dbDetalleNac->where('cantidad_ocupantes', '>', '0') + ->where('gratificacion', '>', '0') + ->unique('cabecera_encuesta_id')->count(); + $countCasosAguinaldo = $dbDetalleNac->where('cantidad_ocupantes', '>', '0') + ->where('aguinaldo', '>', '0') + ->unique('cabecera_encuesta_id')->count(); + + $countCasosBono = $dbDetalleNac->where('cantidad_ocupantes', '>', '0') + ->where('bono_anual', '>', 0) + ->unique('cabecera_encuesta_id') + ->count(); + + $nacional = collect(); + $segmento = "nacional"; + $this->segmenter( $nacional, + $countCasosNac, + $dbDetalleNac, + $countCasos, + $countCasosGratif, + $countCasosAguinaldo, + // $countCasosBeneficios, + $countCasosBono, + $dbClienteEnc, + $rubro, + $segmento, + $dbCargo, + $muestraComision); + + // conteo de casos encontrados internacionales + $countCasosInt = $encuestadasInterIds->count(); + // buscamos los detalles de las encuestas + $dbDetalleInt = Detalle_encuesta::whereIn('encuestas_cargo_id', $cargosEncuestasInterIds)->get(); + $countOcupantesInt = $dbDetalleInt->sum('cantidad_ocupantes'); + // conteo de casos encontrados + $countCasos = $dbDetalleInt->where('cantidad_ocupantes', '>', '0') + ->unique('cabecera_encuesta_id') + ->count(); + $countCasosGratif = $dbDetalleInt->where('cantidad_ocupantes', '>', '0') + ->where('gratificacion', '>', '0') + ->unique('cabecera_encuesta_id') + ->count(); + $countCasosAguinaldo = $dbDetalleInt->where('cantidad_ocupantes', '>', '0') + ->where('aguinaldo', '>', '0') + ->unique('cabecera_encuesta_id') + ->count(); + + //$countCasosBeneficios = $dbDetalleInt->where('beneficios_bancos', '>', 0)->unique('cabecera_encuesta_id')->count(); + + + + + $countCasosBono = $dbDetalleInt->where('cantidad_ocupantes', '>', '0') + ->where('bono_anual', '>', 0) + ->unique('cabecera_encuesta_id') + ->count(); + + $internacional = collect(); + $segmento = "internacional"; + + $this->segmenter( $internacional, + $countCasosInt, + $dbDetalleInt, + $countCasos, + $countCasosGratif, + $countCasosAguinaldo, + // $countCasosBeneficios, + $countCasosBono, + $dbClienteEnc, + $rubro, + $segmento, + $dbCargo, + $muestraComision); + if($tipo == "view"){ + if($request->tour){ + $tour = true; + }else{ + $tour = false; + } + + if($request->moneda == "local"){ + $convertir = false; + }else{ + $convertir = true; + } + + $ficha = Ficha_dato::where('periodo', $periodo)->first(); + //dd($ficha); + if($ficha){ + $tipoCambio = $ficha->tipo_cambio; + }else{ + $tipoCambio = 5600; + } + + + return view('report.report')->with('dbCargo', $dbCargo) + ->with('dbEmpresa', $dbEmpresa) + ->with('universo', $universo) + ->with('nacional', $nacional) + ->with('internacional', $internacional) + ->with('countOcupantes', $countOcupantes) + ->with('countOcupantesNac', $countOcupantesNac) + ->with('countOcupantesInt', $countOcupantesInt) + ->with('tour', $tour) + ->with('tipoCambio', $tipoCambio) + ->with('periodo', $periodo) + ->with('convertir', $convertir); + + }elseif($tipo == "excel"){ + $periodo = implode('_', explode('/', $periodo)); + $cargoFileName = str_replace("-", "_", str_replace(" ", "_", $dbCargo->descripcion)); + $filename = 'Resultados_'.$periodo.'_'.$cargoFileName; + $detalleUniverso = $this->segmentArrayFactory($universo); + $detalleNacional = $this->segmentArrayFactory($nacional); + $detalleInternacional = $this->segmentArrayFactory($internacional); + + Excel::create($filename, function($excel) use($detalleUniverso, $detalleNacional, $detalleInternacional ) { + $excel->sheet("universo", function($sheet) use($detalleUniverso){ + $sheet->fromArray($detalleUniverso); + }); + $excel->sheet("nacional", function($sheet) use($detalleNacional){ + $sheet->fromArray($detalleNacional); + }); + $excel->sheet("internacional", function($sheet) use($detalleInternacional){ + $sheet->fromArray($detalleInternacional); + }); + + })->export('xlsx'); + return redirect()->route('resultados'); + }elseif ($tipo == "clubExcel") { + + $cargoFileName = str_replace("-", "_", str_replace(" ", "_", $dbCargo->descripcion)); + $filename = 'Resultados_'.$periodo.'_'.$cargoFileName; + $detalleUniverso = array(); + $detalleNacional = array(); + $detalleInternacional = array(); + foreach ($universo as $value) { + + $detalleUniverso[] = array( "Concepto"=>$value["concepto"], + "ocupantes"=> $countOcupantes, + "Casos"=>$value["casos"], + "Min"=>$value["min"], + "25 Percentil"=>$value["per25"], + "Promedio"=>$value["prom"], + "Mediana"=>$value["med"], + "75 Percentil"=>$value["per75"], + "Max"=>$value["max"], + "Empresa"=>$value["empresa"] + ); + } + foreach ($nacional as $value) { + $detalleNacional[] = array( "Concepto"=>$value["concepto"], + "ocupantes"=> $countOcupantesNac, + "Casos"=>$value["casos"], + "Min"=>$value["min"], + "25 Percentil"=>$value["per25"], + "Promedio"=>$value["prom"], + "Mediana"=>$value["med"], + "75 Percentil"=>$value["per75"], + "Max"=>$value["max"], + "Empresa"=>$value["empresa"] + ); + } + + foreach ($internacional as $value) { + $detalleInternacional[] = array( "Concepto"=>$value["concepto"], + "ocupantes"=> $countOcupantesInt, + "Casos"=>$value["casos"], + "Min"=>$value["min"], + "25 Percentil"=>$value["per25"], + "Promedio"=>$value["prom"], + "Mediana"=>$value["med"], + "75 Percentil"=>$value["per75"], + "Max"=>$value["max"], + "Empresa"=>$value["empresa"] + ); + } + $resultado = collect([ + "detalle_universo"=> $detalleUniverso, + "detalle_nacional"=> $detalleNacional, + "detalleInternacional"=>$detalleInternacional + ]); + + return $resultado; + } + + } + + private function cargoComparativoEspecial($encuesta, $encuestaAnt, $empresa, $cargo, $contNuevo){ + + //dd($dbEmpresa, $ficha, $per); + $periodo = $encuesta->periodo; // periodo de la encuesta actual + $periodoAnt = $encuestaAnt->periodo; + + $rubro = $empresa->rubro_id; // rubro de la empresa del cliente + $subRubro = $empresa->sub_rubro_id; + // cargo oficial para el informe + if($this->getIdioma() == "es"){ + $dbCargo = Cargo::find($cargo); + }else{ + $dbCargo = Cargo_en::find($cargo); + } + + // empresas y cabeceras de encuestas de este periodo para empresas del rubro del cliente + $dbEncuestadas = Cabecera_encuesta::where('periodo', $periodo) + ->where('rubro_id', $rubro) + ->where('sub_rubro_id', $subRubro) + ->get(); + + $encuestadasIds = $dbEncuestadas->pluck("id"); // Ids de las encuestas para where in + // Recuperamos los datos de los cargos proveídos por las empresas encuestadas + $dbCargosEncuestas = Encuestas_cargo::whereIn('cabecera_encuesta_id', $encuestadasIds) + ->where('cargo_id', $cargo) + ->where('incluir', 1) + ->get(); + + $cargosEncuestasIds = $dbCargosEncuestas->pluck('id'); + + // Recuperamos los datos de las encuestas + $dbDetalle = Detalle_encuesta::whereIn('encuestas_cargo_id', $cargosEncuestasIds)->get(); + // Datos de la encuesta llenada por el cliente + $dbClienteEnc = $dbDetalle->where('cabecera_encuesta_id', $encuesta->id)->first(); + // dd($dbEncuesta, $dbClienteEnc, $cargo); + if(empty($dbClienteEnc)){ + // get the column names for the table + $columns = Schema::getColumnListing('detalle_encuestas'); + // create array where column names are keys, and values are null + $columns = array_fill_keys($columns, 0); + $dbClienteEnc = new Detalle_encuesta(); + $dbClienteEnc = $dbClienteEnc->newInstance($columns, true); + } + + // empresas y cabeceras de encuestas de este periodo para empresas del rubro del cliente + $dbEncuestadasAnt = Cabecera_encuesta::where('periodo', $periodoAnt) + ->where('rubro_id', $rubro) + ->where('sub_rubro_id', $subRubro) + ->get(); + + $encuestadasAntIds = $dbEncuestadasAnt->pluck("id"); // Ids de las encuestas para where in + // Recuperamos los datos de los cargos proveídos por las empresas encuestadas + $dbCargosEncuestasAnt = Encuestas_cargo::whereIn('cabecera_encuesta_id', $encuestadasAntIds) + ->where('cargo_id', $cargo) + ->where('incluir', 1) + ->get(); + + $cargosEncuestasAntIds = $dbCargosEncuestasAnt->pluck('id'); + + // Recuperamos los datos de las encuestas + $dbDetalleAnt = Detalle_encuesta::whereIn('encuestas_cargo_id', $cargosEncuestasAntIds)->get(); + // Datos de la encuesta llenada por el cliente + $dbClienteEncAnt = $dbDetalleAnt->where('cabecera_encuesta_id', $encuestaAnt->id)->first(); + // dd($dbEncuesta, $dbClienteEnc, $cargo); + if(empty($dbClienteEncAnt)){ + // get the column names for the table + $columns = Schema::getColumnListing('detalle_encuestas'); + // create array where column names are keys, and values are null + $columns = array_fill_keys($columns, 0); + $dbClienteEnc = new Detalle_encuesta(); + $dbClienteEnc = $dbClienteEnc->newInstance($columns, true); + } + + if($contNuevo){ + $cargosNuevosID = Encuestas_cargo::whereIn('cabecera_encuesta_id', $encuestadasIds) + ->where('cargo_id', $cargo) + ->where('es_contrato_periodo', 1) + ->where('incluir', 1) + ->pluck('id'); + + $countCasos = $dbDetalle->where('cantidad_ocupantes', '>', '0') + ->whereIn('encuestas_cargo_id', $cargosNuevosID) + ->sum('cantidad_ocupantes'); + }else{ + $countCasos = 0; + } + $salBase = collect(); + + $this->segmenterComparativo( $salBase, + $dbDetalle, + $dbDetalleAnt, + $dbClienteEnc, + $dbClienteEncAnt, + "SB", + $dbCargo, + $countCasos); + + + //dd($salBase); + + $detalleSalarioBase = array(); + + foreach ($salBase as $value) { + if($contNuevo){ + $detalleSalarioBase[] = array( "Concepto"=>$value["concepto"], + "Ocupantes" => $value["ocupantes"], + "Min"=>$value["min"], + "25 Percentil"=>$value["per25"], + "Promedio"=>$value["prom"], + "Mediana"=>$value["med"], + "75 Percentil"=>$value["per75"], + "Max"=>$value["max"], + "Empresa"=>$value["empresa"] + ); + }else{ + $detalleSalarioBase[] = array( "Concepto"=>$value["concepto"], + "Min Ant"=>$value["min_ant"], + "25P Ant"=>$value["per25_ant"], + "Prom Ant"=>$value["prom_ant"], + "Med Ant"=>$value["med_ant"], + "75P Ant"=>$value["per75_ant"], + "Max Ant"=>$value["max_ant"], + "Min"=>$value["min"], + "25 Percentil"=>$value["per25"], + "Promedio"=>$value["prom"], + "Mediana"=>$value["med"], + "75 Percentil"=>$value["per75"], + "Max"=>$value["max"], + "Empresa"=>$value["empresa"] + ); + } + + } + + $efectivoTotalAnual = collect(); + + $this->segmenterComparativo( $efectivoTotalAnual, + $dbDetalle, + $dbDetalleAnt, + $dbClienteEnc, + $dbClienteEncAnt, + "ETA", + $dbCargo); + + + //dd($salBase); + + $detalleETA = array(); + + foreach ($efectivoTotalAnual as $value) { + + $detalleETA[] = array( "Concepto"=>$value["concepto"], + "Min Ant"=>$value["min_ant"], + "25P Ant"=>$value["per25_ant"], + "Prom Ant"=>$value["prom_ant"], + "Med Ant"=>$value["med_ant"], + "75P Ant"=>$value["per75_ant"], + "Max Ant"=>$value["max_ant"], + "Min"=>$value["min"], + "25 Percentil"=>$value["per25"], + "Promedio"=>$value["prom"], + "Mediana"=>$value["med"], + "75 Percentil"=>$value["per75"], + "Max"=>$value["max"], + "Empresa"=>$value["empresa"] + ); + } + + $variable = collect(); + + $this->segmenterComparativo( $variable, + $dbDetalle, + $dbDetalleAnt, + $dbClienteEnc, + $dbClienteEncAnt, + "VAR", + $dbCargo); + + + //dd($salBase); + + $detalleVar = array(); + + foreach ($variable as $value) { + + $detalleVar[] = array( "Concepto"=>$value["concepto"], + "Min Ant"=>$value["min_ant"], + "25P Ant"=>$value["per25_ant"], + "Prom Ant"=>$value["prom_ant"], + "Med Ant"=>$value["med_ant"], + "75P Ant"=>$value["per75_ant"], + "Max Ant"=>$value["max_ant"], + "Min"=>$value["min"], + "25 Percentil"=>$value["per25"], + "Promedio"=>$value["prom"], + "Mediana"=>$value["med"], + "75 Percentil"=>$value["per75"], + "Max"=>$value["max"], + "Empresa"=>$value["empresa"] + ); + } + + $adicionalTotal = collect(); + + $this->segmenterComparativo( $adicionalTotal, + $dbDetalle, + $dbDetalleAnt, + $dbClienteEnc, + $dbClienteEncAnt, + "ATA", + $dbCargo); + + + //dd($salBase); + + $detalleATA = array(); + + foreach ($adicionalTotal as $value) { + + $detalleATA[] = array( "Concepto"=>$value["concepto"], + "Min Ant"=>$value["min_ant"], + "25P Ant"=>$value["per25_ant"], + "Prom Ant"=>$value["prom_ant"], + "Med Ant"=>$value["med_ant"], + "75P Ant"=>$value["per75_ant"], + "Max Ant"=>$value["max_ant"], + "Min"=>$value["min"], + "25 Percentil"=>$value["per25"], + "Promedio"=>$value["prom"], + "Mediana"=>$value["med"], + "75 Percentil"=>$value["per75"], + "Max"=>$value["max"], + "Empresa"=>$value["empresa"] + ); + } + $resultado = collect([ + "detalle_salario_base"=> $detalleSalarioBase, + "detalle_efectivo_total_anual" => $detalleETA, + "detalle_variable" => $detalleVar, + "detalle_adicional_total_anual" => $detalleATA + ]); + + return $resultado; + + + } + + private function segmenterComparativo( &$collection, + $detalle, + $detalleAnt, + $dbClienteEnc, + $dbClienteEncAnt, + $concepto, + $dbCargo, + $countCasos = 0){ + + // Salario Base Anterior + $salariosBaseAnt = $detalleAnt->where('salario_base', '>', '0')->pluck('salario_base'); + $salarioMinAnt = $salariosBaseAnt->min(); + $salarioMaxAnt = $salariosBaseAnt->max(); + $salarioPromAnt = $salariosBaseAnt->avg(); + $salarioMedAnt = $this->median($salariosBaseAnt); + $salario25PerAnt = $this->percentile(25,$salariosBaseAnt); + $salario75PerAnt = $this->percentile(75, $salariosBaseAnt); + + // Salario Base + $salariosBase = $detalle->where('salario_base', '>', '0')->pluck('salario_base'); + $salarioMin = $salariosBase->min(); + $salarioMax = $salariosBase->max(); + $salarioProm = $salariosBase->avg(); + $salarioMed = $this->median($salariosBase); + $salario25Per = $this->percentile(25,$salariosBase); + $salario75Per = $this->percentile(75, $salariosBase); + + if($concepto == "SB"){ + $collection->push([ "concepto" => Lang::get('reportReport.concept_salary'), + "ocupantes" => $countCasos, + "min_ant" => $salarioMinAnt, + "max_ant" => $salarioMaxAnt, + "prom_ant" => round($salarioPromAnt, 0), + "med_ant" => round($salarioMedAnt, 0), + "per25_ant" => round($salario25PerAnt, 0), + "per75_ant" => round($salario75PerAnt, 0), + "min" => $salarioMin, + "max" => $salarioMax, + "prom" => round($salarioProm, 0), + "med" => round($salarioMed, 0), + "per25" => round($salario25Per, 0), + "per75" => round($salario75Per, 0), + "empresa" => $dbClienteEnc->salario_base, + "indicador" => "SA" + ]); + + } + + // Salario Base Anual + $salariosBaseAnual = $salariosBase->map(function($item){ + return $item * 12; + }); + + $salarioAnualMin = $salariosBaseAnual->min(); + $salarioAnualMax = $salariosBaseAnual->max(); + $salarioAnualProm = $salariosBaseAnual->avg(); + $salarioAnualMed = $this->median($salariosBaseAnual); + $salarioAnual25Per = $this->percentile(25,$salariosBaseAnual); + $salarioAnual75Per = $this->percentile(75, $salariosBaseAnual); + + //Aguinaldo + $aguinaldos = $detalle->where('aguinaldo', '>', '0')->pluck('aguinaldo'); + $aguinaldoMin = $aguinaldos->min(); + $aguinaldoMax = $aguinaldos->max(); + $aguinaldoProm = $aguinaldos->avg(); + $aguinaldoMed = $this->median($aguinaldos); + $aguinaldo25Per = $this->percentile(25, $aguinaldos); + $aguinaldo75Per = $this->percentile(75, $aguinaldos); + + // Variable Anual Anterior + $plusRendimientoAnt = $detalleAnt->where('plus_rendimiento', '>', '0')->pluck('plus_rendimiento'); + $plusMinAnt = $plusRendimientoAnt->min(); + $plusMaxAnt = $plusRendimientoAnt->max(); + $plusPromAnt = $plusRendimientoAnt->avg(); + $plusMedAnt = $this->median($plusRendimientoAnt); + $plus25PerAnt = $this->percentile(25,$plusRendimientoAnt); + $plus75PerAnt = $this->percentile(75, $plusRendimientoAnt); + + // Variable Anual + $plusRendimiento = $detalle->where('plus_rendimiento', '>', '0')->pluck('plus_rendimiento'); + $plusMin = $plusRendimiento->min(); + $plusMax = $plusRendimiento->max(); + $plusProm = $plusRendimiento->avg(); + $plusMed = $this->median($plusRendimiento); + $plus25Per = $this->percentile(25,$plusRendimiento); + $plus75Per = $this->percentile(75, $plusRendimiento); + $countCasosPlus = $detalle->where('plus_rendimiento', '>', '0')->unique('cabecera_encuesta_id')->count(); + + if($concepto == "VAR"){ + $collection->push([ "concepto" => Lang::get('reportReport.concept_variable_pay'), + "min_ant" => $plusMinAnt, + "max_ant" => $plusMaxAnt, + "prom_ant" => round($plusPromAnt, 0), + "med_ant" => round($plusMedAnt, 0), + "per25_ant" => round($plus25PerAnt, 0), + "per75_ant" => round($plus75PerAnt, 0), + "min" => $plusMin, + "max" => $plusMax, + "prom" => round($plusProm, 0), + "med" => round($plusMed, 0), + "per25" => round($plus25Per, 0), + "per75" => round($plus75Per, 0), + "empresa" => 0, + "indicador" => "ATA" + ]); + + } + + // Adicional Amarre + $adicionalAmarre = $detalle->where('adicional_amarre', '>', '0')->pluck('adicional_amarre'); + $amarreMin = $adicionalAmarre->min(); + $amarreMax = $adicionalAmarre->max(); + $amarreProm = $adicionalAmarre->avg(); + $amarreMed = $this->median($adicionalAmarre); + $amarre25Per = $this->percentile(25,$adicionalAmarre); + $amarre75Per = $this->percentile(75, $adicionalAmarre); + $countCasosAmarre = $detalle->where('adicional_amarre', '>', '0')->unique('cabecera_encuesta_id')->count(); + + // Adicional Tipo de Combustible + $adicionalTipoCombustible = $detalle->where('adicional_tipo_combustible', '>', '0')->pluck('adicional_tipo_combustible'); + $TipoCombustibleMin = $adicionalTipoCombustible->min(); + $TipoCombustibleMax = $adicionalTipoCombustible->max(); + $TipoCombustibleProm = $adicionalTipoCombustible->avg(); + $TipoCombustibleMed = $this->median($adicionalTipoCombustible); + $TipoCombustible25Per = $this->percentile(25,$adicionalTipoCombustible); + $TipoCombustible75Per = $this->percentile(75, $adicionalTipoCombustible); + $countCasosTipoCombustible = $detalle->where('adicional_tipo_combustible', '>', '0')->unique('cabecera_encuesta_id')->count(); + + // Adicional por disponiblidad/embarque + $adicionalEmbarque = $detalle->where('adicional_embarque', '>', '0')->pluck('adicional_embarque'); + $embarqueMin = $adicionalEmbarque->min(); + $embarqueMax = $adicionalEmbarque->max(); + $embarqueProm = $adicionalEmbarque->avg(); + $embarqueMed = $this->median($adicionalEmbarque); + $embarque25Per = $this->percentile(25,$adicionalEmbarque); + $embarque75Per = $this->percentile(75, $adicionalEmbarque); + $countCasosEmbarque = $detalle->where('adicional_embarque', '>', '0')->unique('cabecera_encuesta_id')->count(); + + // Adicional Carga + $adicionalCarga = $detalle->where('adicional_carga', '>', '0')->pluck('adicional_carga'); + $cargaMin = $adicionalCarga->min(); + $cargaMax = $adicionalCarga->max(); + $cargaProm = $adicionalCarga->avg(); + $cargaMed = $this->median($adicionalCarga); + $carga25Per = $this->percentile(25,$adicionalCarga); + $carga75Per = $this->percentile(75, $adicionalCarga); + $countCasosCarga = $detalle->where('adicional_carga', '>', '0')->unique('cabecera_encuesta_id')->count(); + + + // Total Adicional Anterior + + $adicionalAnualAnt = $detalleAnt->where('adicionales_navieras', '>', '0')->pluck('adicionales_navieras'); + $totalAdicionalMinAnt = $adicionalAnualAnt->min(); + $totalAdicionalMaxAnt = $adicionalAnualAnt->max(); + $totalAdicionalPromAnt = $adicionalAnualAnt->avg(); + $totalAdicionalMedAnt = $this->median($adicionalAnualAnt); + $totalAdicional25PerAnt = $this->percentile(25, $adicionalAnualAnt); + $totalAdicional75PerAnt = $this->percentile(75, $adicionalAnualAnt); + + // Total Adicional + $casosAdicionales = $detalle->where('adicionales_navieras', '>', '0')->unique('cabecera_encuesta_id')->count(); + $adicionalAnual = $detalle->where('adicionales_navieras', '>', '0')->pluck('adicionales_navieras'); + $totalAdicionalMin = $adicionalAnual->min(); + $totalAdicionalMax = $adicionalAnual->max(); + $totalAdicionalProm = $adicionalAnual->avg(); + $totalAdicionalMed = $this->median($adicionalAnual); + $totalAdicional25Per = $this->percentile(25, $adicionalAnual); + $totalAdicional75Per = $this->percentile(75, $adicionalAnual); + + if($concepto == "ATA"){ + $collection->push([ "concepto" => Lang::get('reportReport.concept_total_incentives'), + "min_ant" => $totalAdicionalMinAnt, + "max_ant" => $totalAdicionalMaxAnt, + "prom_ant" => round($totalAdicionalPromAnt, 0), + "med_ant" => round($totalAdicionalMedAnt, 0), + "per25_ant" => round($totalAdicional25PerAnt, 0), + "per75_ant" => round($totalAdicional75PerAnt, 0), + "min" => $totalAdicionalMin, + "max" => $totalAdicionalMax, + "prom" => round($totalAdicionalProm, 0), + "med" => round($totalAdicionalMed, 0), + "per25" => round($totalAdicional25Per, 0), + "per75" => round($totalAdicional75Per, 0), + "empresa" => 0, + "indicador" => "ATA" + ]); + + } + + //Bono + $bonos = $detalle->where('bono_anual', '>', '0')->pluck('bono_anual'); + $bonoMin = $bonos->min(); + $bonoMax = $bonos->max(); + $bonoProm = $bonos->avg(); + $bonoMed = $this->median($bonos); + $bono25Per = $this->percentile(25, $bonos); + $bono75Per = $this->percentile(75, $bonos); + + // Efectivo Total Anual Anteior + $detalleAnt = $detalleAnt->map(function($item){ + $item['efectivo_total_anual'] = $item['salario_base'] * 12 + + $item['aguinaldo']; + return $item; + }); + + $efectivoTotalMinAnt = $detalleAnt->pluck('efectivo_total_anual')->min(); + $efectivoTotalMaxAnt = $detalleAnt->pluck('efectivo_total_anual')->max(); + $efectivoTotalPromAnt = $detalleAnt->pluck('efectivo_total_anual')->avg(); + $efectivoTotalMedAnt = $this->median($detalleAnt->pluck('efectivo_total_anual')); + $efectivoTotal25PerAnt = $this->percentile(25, $detalleAnt->pluck('efectivo_total_anual')); + $efectivoTotal75PerAnt = $this->percentile(75, $detalleAnt->pluck('efectivo_total_anual')); + + // Efectivo Total Anual + $detalle = $detalle->map(function($item){ + $item['efectivo_total_anual'] = $item['salario_base'] * 12 + + $item['aguinaldo']; + return $item; + }); + + $efectivoTotalMin = $detalle->pluck('efectivo_total_anual')->min(); + $efectivoTotalMax = $detalle->pluck('efectivo_total_anual')->max(); + $efectivoTotalProm = $detalle->pluck('efectivo_total_anual')->avg(); + $efectivoTotalMed = $this->median($detalle->pluck('efectivo_total_anual')); + $efectivoTotal25Per = $this->percentile(25, $detalle->pluck('efectivo_total_anual')); + $efectivoTotal75Per = $this->percentile(75, $detalle->pluck('efectivo_total_anual')); + + $found = $detalle->where('cabecera_encuesta_id', $dbClienteEnc->cabecera_encuesta_id) + ->first(); + if($found){ + $efectivoTotalEmpresa = $found->efectivo_total_anual; + }else{ + $efectivoTotalEmpresa = 0; + } + + if($concepto == "ETA"){ + $collection->push([ "concepto" => Lang::get('reportReport.concept_annual_cash_total'), + "min_ant" => $efectivoTotalMinAnt, + "max_ant" => $efectivoTotalMaxAnt, + "prom_ant" => round($efectivoTotalPromAnt, 0), + "med_ant" => round($efectivoTotalMedAnt, 0), + "per25_ant" => round($efectivoTotal25PerAnt, 0), + "per75_ant" => round($efectivoTotal75PerAnt, 0), + "min" => $efectivoTotalMin, + "max" => $efectivoTotalMax, + "prom" => round($efectivoTotalProm, 0), + "med" => round($efectivoTotalMed, 0), + "per25" => round($efectivoTotal25Per, 0), + "per75" => round($efectivoTotal75Per, 0), + "empresa" => $efectivoTotalEmpresa, + "indicador" => "ETA" + ]); + + } + + //Beneficios + $beneficiosNavieras = $detalle->where('beneficios_navieras', '>', '0')->pluck('beneficios_navieras'); + //dd($detalle->where('beneficios_navieras', 1)); + $beneficiosMin = $beneficiosNavieras->min(); + $beneficiosMax = $beneficiosNavieras->max(); + $beneficiosProm = $beneficiosNavieras->avg(); + $beneficiosMed = $this->median($beneficiosNavieras); + $beneficios25Per = $this->percentile(25, $beneficiosNavieras); + $beneficios75Per = $this->percentile(75, $beneficiosNavieras); + $casosBeneficiosNavieras = $detalle->where('beneficios_navieras', '>', '0')->unique('cabecera_encuesta_id')->count(); + + //Aguinaldo Impactado + $aguinaldoImpMin = 0; + $aguinaldoImpMax = 0; + $aguinaldoImpProm = 0; + $aguinaldoImpMed = 0; + $aguinaldoImp25Per = 0; + $aguinaldoImp75Per = 0; + $aguinaldoImpEmpresa = 0; + + $detalle = $detalle->map(function($item){ + $item['aguinaldo_impactado'] = (($item['salario_base'] * 12) + + $item['gratificacion'] + + $item['bono_anual'] + + $item['adicionales_navieras'])/12; + return $item; + }); + + $aguinaldoImpMin = $detalle->pluck('aguinaldo_impactado')->min(); + $aguinaldoImpMax = $detalle->pluck('aguinaldo_impactado')->max(); + $aguinaldoImpProm = $detalle->pluck('aguinaldo_impactado')->avg(); + $aguinaldoImpMed = $this->median($detalle->pluck('aguinaldo_impactado')); + $aguinaldoImp25Per = $this->percentile(25, $detalle->pluck('aguinaldo_impactado')); + $aguinaldoImp75Per = $this->percentile(75, $detalle->pluck('aguinaldo_impactado')); + + $found = $detalle->where('cabecera_encuesta_id', $dbClienteEnc->cabecera_encuesta_id) + ->first(); + if($found){ + $aguinaldoImpEmpresa = $found->aguinaldo_impactado; + }else{ + $aguinaldoImpEmpresa = 0; + } + + + //Total Compensación anual + $detalle = $detalle->map(function($item){ + $item['total_comp_anual'] = $item['efectivo_total_anual'] + + $item['beneficios_navieras']; + return $item; + }); + + $totalCompAnualMin = $detalle->pluck('total_comp_anual')->min(); + $totalCompAnualMax = $detalle->pluck('total_comp_anual')->max(); + $totalCompAnualProm = $detalle->pluck('total_comp_anual')->avg(); + $totalCompAnualMed = $this->median($detalle->pluck('total_comp_anual')); + $totalCompAnual25Per = $this->percentile(25, $detalle->pluck('total_comp_anual')); + $totalCompAnual75Per = $this->percentile(75, $detalle->pluck('total_comp_anual')); + + $found = $detalle->where('cabecera_encuesta_id', $dbClienteEnc->cabecera_encuesta_id) + ->first(); + if($found){ + $totalCompAnualEmpresa = $found->total_comp_anual; + }else{ + $totalCompAnualEmpresa = 0; + } + + + } private function segmentArrayFactory($segmentArray){ foreach ($segmentArray as $value) { diff --git a/app/Http/Controllers/RubrosController.php b/app/Http/Controllers/RubrosController.php new file mode 100644 index 0000000..ad2ccc0 --- /dev/null +++ b/app/Http/Controllers/RubrosController.php @@ -0,0 +1,139 @@ +forget('delete_failed'); + } + return view('rubros.list')->with('dbData', $dbData)->with('toast', $toast); + } + + public function create(){ + return view('rubros.create'); + } + + public function store(Request $request){ + $dbData = new Rubro($request->all()); + + DB::beginTransaction(); + try{ + $dbData->save(); + DB::commit(); + flash::elsoftMessage(2010, true); + }catch(Exception $exception){ + DB::rollback(); + if ($exception instanceof \Illuminate\Database\QueryException) { + switch ($exception->errorInfo[1]) { + case 1048: + Flash::elsoftMessage(4001, true); + break; + case 1062: + Flash::elsoftMessage(4002, true); + break; + case 1451: + Flash::elsoftMessage(4003, true); + default: + Flash::elsoftMessage(4000, true); + break; + } + }else{ + Flash::elsoftMessage(3013, true); + } + return redirect()->back(); + } + return redirect()->route('rubros.index'); + } + + public function show($id) + { + // + } + + public function edit($id){ + $dbData = Rubro::find($id); + return view('rubros.edit')->with('dbData', $dbData); + } + + public function update(Request $request, $id){ + + //Rubro en español + $dbData = Rubro::find($id); + //Rubro en inglés + $dbData->fill($request->all()); + + DB::beginTransaction(); + try{ + $dbData->save(); + DB::commit(); + flash::elsoftMessage(2010, true); + }catch(Exception $exception){ + DB::rollback(); + if ($exception instanceof \Illuminate\Database\QueryException) { + switch ($exception->errorInfo[1]) { + case 1048: + Flash::elsoftMessage(4001, true); + break; + case 1062: + Flash::elsoftMessage(4002, true); + break; + case 1451: + Flash::elsoftMessage(4003, true); + default: + Flash::elsoftMessage(4000, true); + break; + } + }else{ + Flash::elsoftMessage(3013, true); + } + return redirect()->back(); + } + + + + return redirect()->route('rubros.index'); + } + + public function destroy($id){ + $dbData = Rubro::find($id); + DB::beginTransaction(); + try{ + $dbData->delete(); + DB::commit(); + flash::elsoftMessage(2011, true); + }catch(Exception $exception){ + DB::rollback(); + if ($exception instanceof \Illuminate\Database\QueryException) { + switch ($exception->errorInfo[1]) { + case 1048: + Flash::elsoftMessage(4001, true); + break; + case 1062: + Flash::elsoftMessage(4002, true); + break; + case 1451: + Flash::elsoftMessage(4003, true); + default: + Flash::elsoftMessage(4000, true); + break; + } + }else{ + Flash::elsoftMessage(3012, true); + } + return redirect()->back(); + } + + return redirect()->route('rubros.index'); + } +} diff --git a/app/Http/Controllers/SubRubrosController.php b/app/Http/Controllers/SubRubrosController.php new file mode 100644 index 0000000..c111e05 --- /dev/null +++ b/app/Http/Controllers/SubRubrosController.php @@ -0,0 +1,133 @@ +with('dbData', $dbData); + } + + /** + * Show the form for creating a new resource. + * + * @return \Illuminate\Http\Response + */ + public function create() + { + $dbRubro = rubro::get()->pluck('descripcion', 'id'); + + return view('sub_rubros.create')->with('dbRubro', $dbRubro); + } + + /** + * Store a newly created resource in storage. + * + * @param \Illuminate\Http\Request $request + * @return \Illuminate\Http\Response + */ + public function store(Request $request) + { + $dbData = new Sub_rubro($request->all()); + $dbData->save(); + return redirect()->route('sub_rubros.index'); + } + + /** + * Display the specified resource. + * + * @param int $id + * @return \Illuminate\Http\Response + */ + public function show($id) + { + // + } + + /** + * Show the form for editing the specified resource. + * + * @param int $id + * @return \Illuminate\Http\Response + */ + public function edit($id) + { + $dbData = Sub_rubro::find($id); + $dbRubro = rubro::get()->pluck('descripcion', 'id'); + return view('sub_rubros.edit')->with('dbData', $dbData) + ->with('dbRubro', $dbRubro); + } + + /** + * Update the specified resource in storage. + * + * @param \Illuminate\Http\Request $request + * @param int $id + * @return \Illuminate\Http\Response + */ + public function update(Request $request, $id) + { + $dbData = Sub_rubro::find($id); + $dbData->fill($request->all()); + $dbData->save(); + + return redirect()->route('sub_rubros.index'); + + } + + /** + * Remove the specified resource from storage. + * + * @param int $id + * @return \Illuminate\Http\Response + */ + public function destroy($id) + { + $dbData = Sub_rubro::find($id); + DB::beginTransaction(); + try{ + $dbData->delete(); + DB::commit(); + flash::elsoftMessage(2011, true); + }catch(Exception $exception){ + DB::rollback(); + if ($exception instanceof \Illuminate\Database\QueryException) { + switch ($exception->errorInfo[1]) { + case 1048: + Flash::elsoftMessage(4001, true); + break; + case 1062: + Flash::elsoftMessage(4002, true); + break; + case 1451: + Flash::elsoftMessage(4003, true); + default: + Flash::elsoftMessage(4000, true); + break; + } + }else{ + Flash::elsoftMessage(3012, true); + } + return redirect()->back(); + } + + return redirect()->route('sub_rubros.index'); + } + + +} diff --git a/app/Rubro.php b/app/Rubro.php index 5b046cc..509d9cb 100644 --- a/app/Rubro.php +++ b/app/Rubro.php @@ -8,7 +8,7 @@ class Rubro extends Model { protected $table = "rubros"; - protected $fillable = ["decripcion"]; + protected $fillable = ["descripcion"]; public function subRubro(){ return $this->hasMany("App\Sub_rubro"); diff --git a/app/Traits/ReportTrait.php b/app/Traits/ReportTrait.php new file mode 100644 index 0000000..231e7f0 --- /dev/null +++ b/app/Traits/ReportTrait.php @@ -0,0 +1,28 @@ +pluck('descripcion', 'id'); + return $rubros; + } + + public function getPeriodos($id){ + // recuperamos todas las encuestas del primer rubro recuperado + $periodos = Cabecera_encuesta::where('rubro_id', $id)->get(); + // filtramos los periodos para el primer rubro recuperado + $periodos = $periodos->map(function($item){ + $rubro = $item->rubro->descripcion; + $periodo = $item->periodo; + $item['periodo_combo'] = $periodo.' - '.$rubro; + return $item; + })->unique('periodo')->pluck('periodo_combo', 'periodo'); + + return $periodos; + } +} \ No newline at end of file diff --git a/database/migrations/2019_04_25_214748_create_sair_pruebas_table.php b/database/migrations/2019_04_25_214748_create_sair_pruebas_table.php new file mode 100644 index 0000000..1698f48 --- /dev/null +++ b/database/migrations/2019_04_25_214748_create_sair_pruebas_table.php @@ -0,0 +1,33 @@ +increments('id'); + $table->string('descripcion'); + $table->decimal('porcentaje_cumplimiento', 5,2); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('sair_pruebas'); + } +} diff --git a/public/css/materialicon.css b/public/css/materialicon.css new file mode 100644 index 0000000..e69de29 diff --git a/public/fonts/MaterialIcons-Regular.eot b/public/fonts/MaterialIcons-Regular.eot new file mode 100644 index 0000000..70508eb Binary files /dev/null and b/public/fonts/MaterialIcons-Regular.eot differ diff --git a/public/fonts/MaterialIcons-Regular.ijmap b/public/fonts/MaterialIcons-Regular.ijmap new file mode 100644 index 0000000..d9f1d25 --- /dev/null +++ b/public/fonts/MaterialIcons-Regular.ijmap @@ -0,0 +1 @@ +{"icons":{"e84d":{"name":"3d Rotation"},"eb3b":{"name":"Ac Unit"},"e190":{"name":"Access Alarm"},"e191":{"name":"Access Alarms"},"e192":{"name":"Access Time"},"e84e":{"name":"Accessibility"},"e914":{"name":"Accessible"},"e84f":{"name":"Account Balance"},"e850":{"name":"Account Balance Wallet"},"e851":{"name":"Account Box"},"e853":{"name":"Account Circle"},"e60e":{"name":"Adb"},"e145":{"name":"Add"},"e439":{"name":"Add A Photo"},"e193":{"name":"Add Alarm"},"e003":{"name":"Add Alert"},"e146":{"name":"Add Box"},"e147":{"name":"Add Circle"},"e148":{"name":"Add Circle Outline"},"e567":{"name":"Add Location"},"e854":{"name":"Add Shopping Cart"},"e39d":{"name":"Add To Photos"},"e05c":{"name":"Add To Queue"},"e39e":{"name":"Adjust"},"e630":{"name":"Airline Seat Flat"},"e631":{"name":"Airline Seat Flat Angled"},"e632":{"name":"Airline Seat Individual Suite"},"e633":{"name":"Airline Seat Legroom Extra"},"e634":{"name":"Airline Seat Legroom Normal"},"e635":{"name":"Airline Seat Legroom Reduced"},"e636":{"name":"Airline Seat Recline Extra"},"e637":{"name":"Airline Seat Recline Normal"},"e195":{"name":"Airplanemode Active"},"e194":{"name":"Airplanemode Inactive"},"e055":{"name":"Airplay"},"eb3c":{"name":"Airport Shuttle"},"e855":{"name":"Alarm"},"e856":{"name":"Alarm Add"},"e857":{"name":"Alarm Off"},"e858":{"name":"Alarm On"},"e019":{"name":"Album"},"eb3d":{"name":"All Inclusive"},"e90b":{"name":"All Out"},"e859":{"name":"Android"},"e85a":{"name":"Announcement"},"e5c3":{"name":"Apps"},"e149":{"name":"Archive"},"e5c4":{"name":"Arrow Back"},"e5db":{"name":"Arrow Downward"},"e5c5":{"name":"Arrow Drop Down"},"e5c6":{"name":"Arrow Drop Down Circle"},"e5c7":{"name":"Arrow Drop Up"},"e5c8":{"name":"Arrow Forward"},"e5d8":{"name":"Arrow Upward"},"e060":{"name":"Art Track"},"e85b":{"name":"Aspect Ratio"},"e85c":{"name":"Assessment"},"e85d":{"name":"Assignment"},"e85e":{"name":"Assignment Ind"},"e85f":{"name":"Assignment Late"},"e860":{"name":"Assignment Return"},"e861":{"name":"Assignment Returned"},"e862":{"name":"Assignment Turned In"},"e39f":{"name":"Assistant"},"e3a0":{"name":"Assistant Photo"},"e226":{"name":"Attach File"},"e227":{"name":"Attach Money"},"e2bc":{"name":"Attachment"},"e3a1":{"name":"Audiotrack"},"e863":{"name":"Autorenew"},"e01b":{"name":"Av Timer"},"e14a":{"name":"Backspace"},"e864":{"name":"Backup"},"e19c":{"name":"Battery Alert"},"e1a3":{"name":"Battery Charging Full"},"e1a4":{"name":"Battery Full"},"e1a5":{"name":"Battery Std"},"e1a6":{"name":"Battery Unknown"},"eb3e":{"name":"Beach Access"},"e52d":{"name":"Beenhere"},"e14b":{"name":"Block"},"e1a7":{"name":"Bluetooth"},"e60f":{"name":"Bluetooth Audio"},"e1a8":{"name":"Bluetooth Connected"},"e1a9":{"name":"Bluetooth Disabled"},"e1aa":{"name":"Bluetooth Searching"},"e3a2":{"name":"Blur Circular"},"e3a3":{"name":"Blur Linear"},"e3a4":{"name":"Blur Off"},"e3a5":{"name":"Blur On"},"e865":{"name":"Book"},"e866":{"name":"Bookmark"},"e867":{"name":"Bookmark Border"},"e228":{"name":"Border All"},"e229":{"name":"Border Bottom"},"e22a":{"name":"Border Clear"},"e22b":{"name":"Border Color"},"e22c":{"name":"Border Horizontal"},"e22d":{"name":"Border Inner"},"e22e":{"name":"Border Left"},"e22f":{"name":"Border Outer"},"e230":{"name":"Border Right"},"e231":{"name":"Border Style"},"e232":{"name":"Border Top"},"e233":{"name":"Border Vertical"},"e06b":{"name":"Branding Watermark"},"e3a6":{"name":"Brightness 1"},"e3a7":{"name":"Brightness 2"},"e3a8":{"name":"Brightness 3"},"e3a9":{"name":"Brightness 4"},"e3aa":{"name":"Brightness 5"},"e3ab":{"name":"Brightness 6"},"e3ac":{"name":"Brightness 7"},"e1ab":{"name":"Brightness Auto"},"e1ac":{"name":"Brightness High"},"e1ad":{"name":"Brightness Low"},"e1ae":{"name":"Brightness Medium"},"e3ad":{"name":"Broken Image"},"e3ae":{"name":"Brush"},"e6dd":{"name":"Bubble Chart"},"e868":{"name":"Bug Report"},"e869":{"name":"Build"},"e43c":{"name":"Burst Mode"},"e0af":{"name":"Business"},"eb3f":{"name":"Business Center"},"e86a":{"name":"Cached"},"e7e9":{"name":"Cake"},"e0b0":{"name":"Call"},"e0b1":{"name":"Call End"},"e0b2":{"name":"Call Made"},"e0b3":{"name":"Call Merge"},"e0b4":{"name":"Call Missed"},"e0e4":{"name":"Call Missed Outgoing"},"e0b5":{"name":"Call Received"},"e0b6":{"name":"Call Split"},"e06c":{"name":"Call To Action"},"e3af":{"name":"Camera"},"e3b0":{"name":"Camera Alt"},"e8fc":{"name":"Camera Enhance"},"e3b1":{"name":"Camera Front"},"e3b2":{"name":"Camera Rear"},"e3b3":{"name":"Camera Roll"},"e5c9":{"name":"Cancel"},"e8f6":{"name":"Card Giftcard"},"e8f7":{"name":"Card Membership"},"e8f8":{"name":"Card Travel"},"eb40":{"name":"Casino"},"e307":{"name":"Cast"},"e308":{"name":"Cast Connected"},"e3b4":{"name":"Center Focus Strong"},"e3b5":{"name":"Center Focus Weak"},"e86b":{"name":"Change History"},"e0b7":{"name":"Chat"},"e0ca":{"name":"Chat Bubble"},"e0cb":{"name":"Chat Bubble Outline"},"e5ca":{"name":"Check"},"e834":{"name":"Check Box"},"e835":{"name":"Check Box Outline Blank"},"e86c":{"name":"Check Circle"},"e5cb":{"name":"Chevron Left"},"e5cc":{"name":"Chevron Right"},"eb41":{"name":"Child Care"},"eb42":{"name":"Child Friendly"},"e86d":{"name":"Chrome Reader Mode"},"e86e":{"name":"Class"},"e14c":{"name":"Clear"},"e0b8":{"name":"Clear All"},"e5cd":{"name":"Close"},"e01c":{"name":"Closed Caption"},"e2bd":{"name":"Cloud"},"e2be":{"name":"Cloud Circle"},"e2bf":{"name":"Cloud Done"},"e2c0":{"name":"Cloud Download"},"e2c1":{"name":"Cloud Off"},"e2c2":{"name":"Cloud Queue"},"e2c3":{"name":"Cloud Upload"},"e86f":{"name":"Code"},"e3b6":{"name":"Collections"},"e431":{"name":"Collections Bookmark"},"e3b7":{"name":"Color Lens"},"e3b8":{"name":"Colorize"},"e0b9":{"name":"Comment"},"e3b9":{"name":"Compare"},"e915":{"name":"Compare Arrows"},"e30a":{"name":"Computer"},"e638":{"name":"Confirmation Number"},"e0d0":{"name":"Contact Mail"},"e0cf":{"name":"Contact Phone"},"e0ba":{"name":"Contacts"},"e14d":{"name":"Content Copy"},"e14e":{"name":"Content Cut"},"e14f":{"name":"Content Paste"},"e3ba":{"name":"Control Point"},"e3bb":{"name":"Control Point Duplicate"},"e90c":{"name":"Copyright"},"e150":{"name":"Create"},"e2cc":{"name":"Create New Folder"},"e870":{"name":"Credit Card"},"e3be":{"name":"Crop"},"e3bc":{"name":"Crop 16 9"},"e3bd":{"name":"Crop 3 2"},"e3bf":{"name":"Crop 5 4"},"e3c0":{"name":"Crop 7 5"},"e3c1":{"name":"Crop Din"},"e3c2":{"name":"Crop Free"},"e3c3":{"name":"Crop Landscape"},"e3c4":{"name":"Crop Original"},"e3c5":{"name":"Crop Portrait"},"e437":{"name":"Crop Rotate"},"e3c6":{"name":"Crop Square"},"e871":{"name":"Dashboard"},"e1af":{"name":"Data Usage"},"e916":{"name":"Date Range"},"e3c7":{"name":"Dehaze"},"e872":{"name":"Delete"},"e92b":{"name":"Delete Forever"},"e16c":{"name":"Delete Sweep"},"e873":{"name":"Description"},"e30b":{"name":"Desktop Mac"},"e30c":{"name":"Desktop Windows"},"e3c8":{"name":"Details"},"e30d":{"name":"Developer Board"},"e1b0":{"name":"Developer Mode"},"e335":{"name":"Device Hub"},"e1b1":{"name":"Devices"},"e337":{"name":"Devices Other"},"e0bb":{"name":"Dialer Sip"},"e0bc":{"name":"Dialpad"},"e52e":{"name":"Directions"},"e52f":{"name":"Directions Bike"},"e532":{"name":"Directions Boat"},"e530":{"name":"Directions Bus"},"e531":{"name":"Directions Car"},"e534":{"name":"Directions Railway"},"e566":{"name":"Directions Run"},"e533":{"name":"Directions Subway"},"e535":{"name":"Directions Transit"},"e536":{"name":"Directions Walk"},"e610":{"name":"Disc Full"},"e875":{"name":"Dns"},"e612":{"name":"Do Not Disturb"},"e611":{"name":"Do Not Disturb Alt"},"e643":{"name":"Do Not Disturb Off"},"e644":{"name":"Do Not Disturb On"},"e30e":{"name":"Dock"},"e7ee":{"name":"Domain"},"e876":{"name":"Done"},"e877":{"name":"Done All"},"e917":{"name":"Donut Large"},"e918":{"name":"Donut Small"},"e151":{"name":"Drafts"},"e25d":{"name":"Drag Handle"},"e613":{"name":"Drive Eta"},"e1b2":{"name":"Dvr"},"e3c9":{"name":"Edit"},"e568":{"name":"Edit Location"},"e8fb":{"name":"Eject"},"e0be":{"name":"Email"},"e63f":{"name":"Enhanced Encryption"},"e01d":{"name":"Equalizer"},"e000":{"name":"Error"},"e001":{"name":"Error Outline"},"e926":{"name":"Euro Symbol"},"e56d":{"name":"Ev Station"},"e878":{"name":"Event"},"e614":{"name":"Event Available"},"e615":{"name":"Event Busy"},"e616":{"name":"Event Note"},"e903":{"name":"Event Seat"},"e879":{"name":"Exit To App"},"e5ce":{"name":"Expand Less"},"e5cf":{"name":"Expand More"},"e01e":{"name":"Explicit"},"e87a":{"name":"Explore"},"e3ca":{"name":"Exposure"},"e3cb":{"name":"Exposure Neg 1"},"e3cc":{"name":"Exposure Neg 2"},"e3cd":{"name":"Exposure Plus 1"},"e3ce":{"name":"Exposure Plus 2"},"e3cf":{"name":"Exposure Zero"},"e87b":{"name":"Extension"},"e87c":{"name":"Face"},"e01f":{"name":"Fast Forward"},"e020":{"name":"Fast Rewind"},"e87d":{"name":"Favorite"},"e87e":{"name":"Favorite Border"},"e06d":{"name":"Featured Play List"},"e06e":{"name":"Featured Video"},"e87f":{"name":"Feedback"},"e05d":{"name":"Fiber Dvr"},"e061":{"name":"Fiber Manual Record"},"e05e":{"name":"Fiber New"},"e06a":{"name":"Fiber Pin"},"e062":{"name":"Fiber Smart Record"},"e2c4":{"name":"File Download"},"e2c6":{"name":"File Upload"},"e3d3":{"name":"Filter"},"e3d0":{"name":"Filter 1"},"e3d1":{"name":"Filter 2"},"e3d2":{"name":"Filter 3"},"e3d4":{"name":"Filter 4"},"e3d5":{"name":"Filter 5"},"e3d6":{"name":"Filter 6"},"e3d7":{"name":"Filter 7"},"e3d8":{"name":"Filter 8"},"e3d9":{"name":"Filter 9"},"e3da":{"name":"Filter 9 Plus"},"e3db":{"name":"Filter B And W"},"e3dc":{"name":"Filter Center Focus"},"e3dd":{"name":"Filter Drama"},"e3de":{"name":"Filter Frames"},"e3df":{"name":"Filter Hdr"},"e152":{"name":"Filter List"},"e3e0":{"name":"Filter None"},"e3e2":{"name":"Filter Tilt Shift"},"e3e3":{"name":"Filter Vintage"},"e880":{"name":"Find In Page"},"e881":{"name":"Find Replace"},"e90d":{"name":"Fingerprint"},"e5dc":{"name":"First Page"},"eb43":{"name":"Fitness Center"},"e153":{"name":"Flag"},"e3e4":{"name":"Flare"},"e3e5":{"name":"Flash Auto"},"e3e6":{"name":"Flash Off"},"e3e7":{"name":"Flash On"},"e539":{"name":"Flight"},"e904":{"name":"Flight Land"},"e905":{"name":"Flight Takeoff"},"e3e8":{"name":"Flip"},"e882":{"name":"Flip To Back"},"e883":{"name":"Flip To Front"},"e2c7":{"name":"Folder"},"e2c8":{"name":"Folder Open"},"e2c9":{"name":"Folder Shared"},"e617":{"name":"Folder Special"},"e167":{"name":"Font Download"},"e234":{"name":"Format Align Center"},"e235":{"name":"Format Align Justify"},"e236":{"name":"Format Align Left"},"e237":{"name":"Format Align Right"},"e238":{"name":"Format Bold"},"e239":{"name":"Format Clear"},"e23a":{"name":"Format Color Fill"},"e23b":{"name":"Format Color Reset"},"e23c":{"name":"Format Color Text"},"e23d":{"name":"Format Indent Decrease"},"e23e":{"name":"Format Indent Increase"},"e23f":{"name":"Format Italic"},"e240":{"name":"Format Line Spacing"},"e241":{"name":"Format List Bulleted"},"e242":{"name":"Format List Numbered"},"e243":{"name":"Format Paint"},"e244":{"name":"Format Quote"},"e25e":{"name":"Format Shapes"},"e245":{"name":"Format Size"},"e246":{"name":"Format Strikethrough"},"e247":{"name":"Format Textdirection L To R"},"e248":{"name":"Format Textdirection R To L"},"e249":{"name":"Format Underlined"},"e0bf":{"name":"Forum"},"e154":{"name":"Forward"},"e056":{"name":"Forward 10"},"e057":{"name":"Forward 30"},"e058":{"name":"Forward 5"},"eb44":{"name":"Free Breakfast"},"e5d0":{"name":"Fullscreen"},"e5d1":{"name":"Fullscreen Exit"},"e24a":{"name":"Functions"},"e927":{"name":"G Translate"},"e30f":{"name":"Gamepad"},"e021":{"name":"Games"},"e90e":{"name":"Gavel"},"e155":{"name":"Gesture"},"e884":{"name":"Get App"},"e908":{"name":"Gif"},"eb45":{"name":"Golf Course"},"e1b3":{"name":"Gps Fixed"},"e1b4":{"name":"Gps Not Fixed"},"e1b5":{"name":"Gps Off"},"e885":{"name":"Grade"},"e3e9":{"name":"Gradient"},"e3ea":{"name":"Grain"},"e1b8":{"name":"Graphic Eq"},"e3eb":{"name":"Grid Off"},"e3ec":{"name":"Grid On"},"e7ef":{"name":"Group"},"e7f0":{"name":"Group Add"},"e886":{"name":"Group Work"},"e052":{"name":"Hd"},"e3ed":{"name":"Hdr Off"},"e3ee":{"name":"Hdr On"},"e3f1":{"name":"Hdr Strong"},"e3f2":{"name":"Hdr Weak"},"e310":{"name":"Headset"},"e311":{"name":"Headset Mic"},"e3f3":{"name":"Healing"},"e023":{"name":"Hearing"},"e887":{"name":"Help"},"e8fd":{"name":"Help Outline"},"e024":{"name":"High Quality"},"e25f":{"name":"Highlight"},"e888":{"name":"Highlight Off"},"e889":{"name":"History"},"e88a":{"name":"Home"},"eb46":{"name":"Hot Tub"},"e53a":{"name":"Hotel"},"e88b":{"name":"Hourglass Empty"},"e88c":{"name":"Hourglass Full"},"e902":{"name":"Http"},"e88d":{"name":"Https"},"e3f4":{"name":"Image"},"e3f5":{"name":"Image Aspect Ratio"},"e0e0":{"name":"Import Contacts"},"e0c3":{"name":"Import Export"},"e912":{"name":"Important Devices"},"e156":{"name":"Inbox"},"e909":{"name":"Indeterminate Check Box"},"e88e":{"name":"Info"},"e88f":{"name":"Info Outline"},"e890":{"name":"Input"},"e24b":{"name":"Insert Chart"},"e24c":{"name":"Insert Comment"},"e24d":{"name":"Insert Drive File"},"e24e":{"name":"Insert Emoticon"},"e24f":{"name":"Insert Invitation"},"e250":{"name":"Insert Link"},"e251":{"name":"Insert Photo"},"e891":{"name":"Invert Colors"},"e0c4":{"name":"Invert Colors Off"},"e3f6":{"name":"Iso"},"e312":{"name":"Keyboard"},"e313":{"name":"Keyboard Arrow Down"},"e314":{"name":"Keyboard Arrow Left"},"e315":{"name":"Keyboard Arrow Right"},"e316":{"name":"Keyboard Arrow Up"},"e317":{"name":"Keyboard Backspace"},"e318":{"name":"Keyboard Capslock"},"e31a":{"name":"Keyboard Hide"},"e31b":{"name":"Keyboard Return"},"e31c":{"name":"Keyboard Tab"},"e31d":{"name":"Keyboard Voice"},"eb47":{"name":"Kitchen"},"e892":{"name":"Label"},"e893":{"name":"Label Outline"},"e3f7":{"name":"Landscape"},"e894":{"name":"Language"},"e31e":{"name":"Laptop"},"e31f":{"name":"Laptop Chromebook"},"e320":{"name":"Laptop Mac"},"e321":{"name":"Laptop Windows"},"e5dd":{"name":"Last Page"},"e895":{"name":"Launch"},"e53b":{"name":"Layers"},"e53c":{"name":"Layers Clear"},"e3f8":{"name":"Leak Add"},"e3f9":{"name":"Leak Remove"},"e3fa":{"name":"Lens"},"e02e":{"name":"Library Add"},"e02f":{"name":"Library Books"},"e030":{"name":"Library Music"},"e90f":{"name":"Lightbulb Outline"},"e919":{"name":"Line Style"},"e91a":{"name":"Line Weight"},"e260":{"name":"Linear Scale"},"e157":{"name":"Link"},"e438":{"name":"Linked Camera"},"e896":{"name":"List"},"e0c6":{"name":"Live Help"},"e639":{"name":"Live Tv"},"e53f":{"name":"Local Activity"},"e53d":{"name":"Local Airport"},"e53e":{"name":"Local Atm"},"e540":{"name":"Local Bar"},"e541":{"name":"Local Cafe"},"e542":{"name":"Local Car Wash"},"e543":{"name":"Local Convenience Store"},"e556":{"name":"Local Dining"},"e544":{"name":"Local Drink"},"e545":{"name":"Local Florist"},"e546":{"name":"Local Gas Station"},"e547":{"name":"Local Grocery Store"},"e548":{"name":"Local Hospital"},"e549":{"name":"Local Hotel"},"e54a":{"name":"Local Laundry Service"},"e54b":{"name":"Local Library"},"e54c":{"name":"Local Mall"},"e54d":{"name":"Local Movies"},"e54e":{"name":"Local Offer"},"e54f":{"name":"Local Parking"},"e550":{"name":"Local Pharmacy"},"e551":{"name":"Local Phone"},"e552":{"name":"Local Pizza"},"e553":{"name":"Local Play"},"e554":{"name":"Local Post Office"},"e555":{"name":"Local Printshop"},"e557":{"name":"Local See"},"e558":{"name":"Local Shipping"},"e559":{"name":"Local Taxi"},"e7f1":{"name":"Location City"},"e1b6":{"name":"Location Disabled"},"e0c7":{"name":"Location Off"},"e0c8":{"name":"Location On"},"e1b7":{"name":"Location Searching"},"e897":{"name":"Lock"},"e898":{"name":"Lock Open"},"e899":{"name":"Lock Outline"},"e3fc":{"name":"Looks"},"e3fb":{"name":"Looks 3"},"e3fd":{"name":"Looks 4"},"e3fe":{"name":"Looks 5"},"e3ff":{"name":"Looks 6"},"e400":{"name":"Looks One"},"e401":{"name":"Looks Two"},"e028":{"name":"Loop"},"e402":{"name":"Loupe"},"e16d":{"name":"Low Priority"},"e89a":{"name":"Loyalty"},"e158":{"name":"Mail"},"e0e1":{"name":"Mail Outline"},"e55b":{"name":"Map"},"e159":{"name":"Markunread"},"e89b":{"name":"Markunread Mailbox"},"e322":{"name":"Memory"},"e5d2":{"name":"Menu"},"e252":{"name":"Merge Type"},"e0c9":{"name":"Message"},"e029":{"name":"Mic"},"e02a":{"name":"Mic None"},"e02b":{"name":"Mic Off"},"e618":{"name":"Mms"},"e253":{"name":"Mode Comment"},"e254":{"name":"Mode Edit"},"e263":{"name":"Monetization On"},"e25c":{"name":"Money Off"},"e403":{"name":"Monochrome Photos"},"e7f2":{"name":"Mood"},"e7f3":{"name":"Mood Bad"},"e619":{"name":"More"},"e5d3":{"name":"More Horiz"},"e5d4":{"name":"More Vert"},"e91b":{"name":"Motorcycle"},"e323":{"name":"Mouse"},"e168":{"name":"Move To Inbox"},"e02c":{"name":"Movie"},"e404":{"name":"Movie Creation"},"e43a":{"name":"Movie Filter"},"e6df":{"name":"Multiline Chart"},"e405":{"name":"Music Note"},"e063":{"name":"Music Video"},"e55c":{"name":"My Location"},"e406":{"name":"Nature"},"e407":{"name":"Nature People"},"e408":{"name":"Navigate Before"},"e409":{"name":"Navigate Next"},"e55d":{"name":"Navigation"},"e569":{"name":"Near Me"},"e1b9":{"name":"Network Cell"},"e640":{"name":"Network Check"},"e61a":{"name":"Network Locked"},"e1ba":{"name":"Network Wifi"},"e031":{"name":"New Releases"},"e16a":{"name":"Next Week"},"e1bb":{"name":"Nfc"},"e641":{"name":"No Encryption"},"e0cc":{"name":"No Sim"},"e033":{"name":"Not Interested"},"e06f":{"name":"Note"},"e89c":{"name":"Note Add"},"e7f4":{"name":"Notifications"},"e7f7":{"name":"Notifications Active"},"e7f5":{"name":"Notifications None"},"e7f6":{"name":"Notifications Off"},"e7f8":{"name":"Notifications Paused"},"e90a":{"name":"Offline Pin"},"e63a":{"name":"Ondemand Video"},"e91c":{"name":"Opacity"},"e89d":{"name":"Open In Browser"},"e89e":{"name":"Open In New"},"e89f":{"name":"Open With"},"e7f9":{"name":"Pages"},"e8a0":{"name":"Pageview"},"e40a":{"name":"Palette"},"e925":{"name":"Pan Tool"},"e40b":{"name":"Panorama"},"e40c":{"name":"Panorama Fish Eye"},"e40d":{"name":"Panorama Horizontal"},"e40e":{"name":"Panorama Vertical"},"e40f":{"name":"Panorama Wide Angle"},"e7fa":{"name":"Party Mode"},"e034":{"name":"Pause"},"e035":{"name":"Pause Circle Filled"},"e036":{"name":"Pause Circle Outline"},"e8a1":{"name":"Payment"},"e7fb":{"name":"People"},"e7fc":{"name":"People Outline"},"e8a2":{"name":"Perm Camera Mic"},"e8a3":{"name":"Perm Contact Calendar"},"e8a4":{"name":"Perm Data Setting"},"e8a5":{"name":"Perm Device Information"},"e8a6":{"name":"Perm Identity"},"e8a7":{"name":"Perm Media"},"e8a8":{"name":"Perm Phone Msg"},"e8a9":{"name":"Perm Scan Wifi"},"e7fd":{"name":"Person"},"e7fe":{"name":"Person Add"},"e7ff":{"name":"Person Outline"},"e55a":{"name":"Person Pin"},"e56a":{"name":"Person Pin Circle"},"e63b":{"name":"Personal Video"},"e91d":{"name":"Pets"},"e0cd":{"name":"Phone"},"e324":{"name":"Phone Android"},"e61b":{"name":"Phone Bluetooth Speaker"},"e61c":{"name":"Phone Forwarded"},"e61d":{"name":"Phone In Talk"},"e325":{"name":"Phone Iphone"},"e61e":{"name":"Phone Locked"},"e61f":{"name":"Phone Missed"},"e620":{"name":"Phone Paused"},"e326":{"name":"Phonelink"},"e0db":{"name":"Phonelink Erase"},"e0dc":{"name":"Phonelink Lock"},"e327":{"name":"Phonelink Off"},"e0dd":{"name":"Phonelink Ring"},"e0de":{"name":"Phonelink Setup"},"e410":{"name":"Photo"},"e411":{"name":"Photo Album"},"e412":{"name":"Photo Camera"},"e43b":{"name":"Photo Filter"},"e413":{"name":"Photo Library"},"e432":{"name":"Photo Size Select Actual"},"e433":{"name":"Photo Size Select Large"},"e434":{"name":"Photo Size Select Small"},"e415":{"name":"Picture As Pdf"},"e8aa":{"name":"Picture In Picture"},"e911":{"name":"Picture In Picture Alt"},"e6c4":{"name":"Pie Chart"},"e6c5":{"name":"Pie Chart Outlined"},"e55e":{"name":"Pin Drop"},"e55f":{"name":"Place"},"e037":{"name":"Play Arrow"},"e038":{"name":"Play Circle Filled"},"e039":{"name":"Play Circle Outline"},"e906":{"name":"Play For Work"},"e03b":{"name":"Playlist Add"},"e065":{"name":"Playlist Add Check"},"e05f":{"name":"Playlist Play"},"e800":{"name":"Plus One"},"e801":{"name":"Poll"},"e8ab":{"name":"Polymer"},"eb48":{"name":"Pool"},"e0ce":{"name":"Portable Wifi Off"},"e416":{"name":"Portrait"},"e63c":{"name":"Power"},"e336":{"name":"Power Input"},"e8ac":{"name":"Power Settings New"},"e91e":{"name":"Pregnant Woman"},"e0df":{"name":"Present To All"},"e8ad":{"name":"Print"},"e645":{"name":"Priority High"},"e80b":{"name":"Public"},"e255":{"name":"Publish"},"e8ae":{"name":"Query Builder"},"e8af":{"name":"Question Answer"},"e03c":{"name":"Queue"},"e03d":{"name":"Queue Music"},"e066":{"name":"Queue Play Next"},"e03e":{"name":"Radio"},"e837":{"name":"Radio Button Checked"},"e836":{"name":"Radio Button Unchecked"},"e560":{"name":"Rate Review"},"e8b0":{"name":"Receipt"},"e03f":{"name":"Recent Actors"},"e91f":{"name":"Record Voice Over"},"e8b1":{"name":"Redeem"},"e15a":{"name":"Redo"},"e5d5":{"name":"Refresh"},"e15b":{"name":"Remove"},"e15c":{"name":"Remove Circle"},"e15d":{"name":"Remove Circle Outline"},"e067":{"name":"Remove From Queue"},"e417":{"name":"Remove Red Eye"},"e928":{"name":"Remove Shopping Cart"},"e8fe":{"name":"Reorder"},"e040":{"name":"Repeat"},"e041":{"name":"Repeat One"},"e042":{"name":"Replay"},"e059":{"name":"Replay 10"},"e05a":{"name":"Replay 30"},"e05b":{"name":"Replay 5"},"e15e":{"name":"Reply"},"e15f":{"name":"Reply All"},"e160":{"name":"Report"},"e8b2":{"name":"Report Problem"},"e56c":{"name":"Restaurant"},"e561":{"name":"Restaurant Menu"},"e8b3":{"name":"Restore"},"e929":{"name":"Restore Page"},"e0d1":{"name":"Ring Volume"},"e8b4":{"name":"Room"},"eb49":{"name":"Room Service"},"e418":{"name":"Rotate 90 Degrees Ccw"},"e419":{"name":"Rotate Left"},"e41a":{"name":"Rotate Right"},"e920":{"name":"Rounded Corner"},"e328":{"name":"Router"},"e921":{"name":"Rowing"},"e0e5":{"name":"Rss Feed"},"e642":{"name":"Rv Hookup"},"e562":{"name":"Satellite"},"e161":{"name":"Save"},"e329":{"name":"Scanner"},"e8b5":{"name":"Schedule"},"e80c":{"name":"School"},"e1be":{"name":"Screen Lock Landscape"},"e1bf":{"name":"Screen Lock Portrait"},"e1c0":{"name":"Screen Lock Rotation"},"e1c1":{"name":"Screen Rotation"},"e0e2":{"name":"Screen Share"},"e623":{"name":"Sd Card"},"e1c2":{"name":"Sd Storage"},"e8b6":{"name":"Search"},"e32a":{"name":"Security"},"e162":{"name":"Select All"},"e163":{"name":"Send"},"e811":{"name":"Sentiment Dissatisfied"},"e812":{"name":"Sentiment Neutral"},"e813":{"name":"Sentiment Satisfied"},"e814":{"name":"Sentiment Very Dissatisfied"},"e815":{"name":"Sentiment Very Satisfied"},"e8b8":{"name":"Settings"},"e8b9":{"name":"Settings Applications"},"e8ba":{"name":"Settings Backup Restore"},"e8bb":{"name":"Settings Bluetooth"},"e8bd":{"name":"Settings Brightness"},"e8bc":{"name":"Settings Cell"},"e8be":{"name":"Settings Ethernet"},"e8bf":{"name":"Settings Input Antenna"},"e8c0":{"name":"Settings Input Component"},"e8c1":{"name":"Settings Input Composite"},"e8c2":{"name":"Settings Input Hdmi"},"e8c3":{"name":"Settings Input Svideo"},"e8c4":{"name":"Settings Overscan"},"e8c5":{"name":"Settings Phone"},"e8c6":{"name":"Settings Power"},"e8c7":{"name":"Settings Remote"},"e1c3":{"name":"Settings System Daydream"},"e8c8":{"name":"Settings Voice"},"e80d":{"name":"Share"},"e8c9":{"name":"Shop"},"e8ca":{"name":"Shop Two"},"e8cb":{"name":"Shopping Basket"},"e8cc":{"name":"Shopping Cart"},"e261":{"name":"Short Text"},"e6e1":{"name":"Show Chart"},"e043":{"name":"Shuffle"},"e1c8":{"name":"Signal Cellular 4 Bar"},"e1cd":{"name":"Signal Cellular Connected No Internet 4 Bar"},"e1ce":{"name":"Signal Cellular No Sim"},"e1cf":{"name":"Signal Cellular Null"},"e1d0":{"name":"Signal Cellular Off"},"e1d8":{"name":"Signal Wifi 4 Bar"},"e1d9":{"name":"Signal Wifi 4 Bar Lock"},"e1da":{"name":"Signal Wifi Off"},"e32b":{"name":"Sim Card"},"e624":{"name":"Sim Card Alert"},"e044":{"name":"Skip Next"},"e045":{"name":"Skip Previous"},"e41b":{"name":"Slideshow"},"e068":{"name":"Slow Motion Video"},"e32c":{"name":"Smartphone"},"eb4a":{"name":"Smoke Free"},"eb4b":{"name":"Smoking Rooms"},"e625":{"name":"Sms"},"e626":{"name":"Sms Failed"},"e046":{"name":"Snooze"},"e164":{"name":"Sort"},"e053":{"name":"Sort By Alpha"},"eb4c":{"name":"Spa"},"e256":{"name":"Space Bar"},"e32d":{"name":"Speaker"},"e32e":{"name":"Speaker Group"},"e8cd":{"name":"Speaker Notes"},"e92a":{"name":"Speaker Notes Off"},"e0d2":{"name":"Speaker Phone"},"e8ce":{"name":"Spellcheck"},"e838":{"name":"Star"},"e83a":{"name":"Star Border"},"e839":{"name":"Star Half"},"e8d0":{"name":"Stars"},"e0d3":{"name":"Stay Current Landscape"},"e0d4":{"name":"Stay Current Portrait"},"e0d5":{"name":"Stay Primary Landscape"},"e0d6":{"name":"Stay Primary Portrait"},"e047":{"name":"Stop"},"e0e3":{"name":"Stop Screen Share"},"e1db":{"name":"Storage"},"e8d1":{"name":"Store"},"e563":{"name":"Store Mall Directory"},"e41c":{"name":"Straighten"},"e56e":{"name":"Streetview"},"e257":{"name":"Strikethrough S"},"e41d":{"name":"Style"},"e5d9":{"name":"Subdirectory Arrow Left"},"e5da":{"name":"Subdirectory Arrow Right"},"e8d2":{"name":"Subject"},"e064":{"name":"Subscriptions"},"e048":{"name":"Subtitles"},"e56f":{"name":"Subway"},"e8d3":{"name":"Supervisor Account"},"e049":{"name":"Surround Sound"},"e0d7":{"name":"Swap Calls"},"e8d4":{"name":"Swap Horiz"},"e8d5":{"name":"Swap Vert"},"e8d6":{"name":"Swap Vertical Circle"},"e41e":{"name":"Switch Camera"},"e41f":{"name":"Switch Video"},"e627":{"name":"Sync"},"e628":{"name":"Sync Disabled"},"e629":{"name":"Sync Problem"},"e62a":{"name":"System Update"},"e8d7":{"name":"System Update Alt"},"e8d8":{"name":"Tab"},"e8d9":{"name":"Tab Unselected"},"e32f":{"name":"Tablet"},"e330":{"name":"Tablet Android"},"e331":{"name":"Tablet Mac"},"e420":{"name":"Tag Faces"},"e62b":{"name":"Tap And Play"},"e564":{"name":"Terrain"},"e262":{"name":"Text Fields"},"e165":{"name":"Text Format"},"e0d8":{"name":"Textsms"},"e421":{"name":"Texture"},"e8da":{"name":"Theaters"},"e8db":{"name":"Thumb Down"},"e8dc":{"name":"Thumb Up"},"e8dd":{"name":"Thumbs Up Down"},"e62c":{"name":"Time To Leave"},"e422":{"name":"Timelapse"},"e922":{"name":"Timeline"},"e425":{"name":"Timer"},"e423":{"name":"Timer 10"},"e424":{"name":"Timer 3"},"e426":{"name":"Timer Off"},"e264":{"name":"Title"},"e8de":{"name":"Toc"},"e8df":{"name":"Today"},"e8e0":{"name":"Toll"},"e427":{"name":"Tonality"},"e913":{"name":"Touch App"},"e332":{"name":"Toys"},"e8e1":{"name":"Track Changes"},"e565":{"name":"Traffic"},"e570":{"name":"Train"},"e571":{"name":"Tram"},"e572":{"name":"Transfer Within A Station"},"e428":{"name":"Transform"},"e8e2":{"name":"Translate"},"e8e3":{"name":"Trending Down"},"e8e4":{"name":"Trending Flat"},"e8e5":{"name":"Trending Up"},"e429":{"name":"Tune"},"e8e6":{"name":"Turned In"},"e8e7":{"name":"Turned In Not"},"e333":{"name":"Tv"},"e169":{"name":"Unarchive"},"e166":{"name":"Undo"},"e5d6":{"name":"Unfold Less"},"e5d7":{"name":"Unfold More"},"e923":{"name":"Update"},"e1e0":{"name":"Usb"},"e8e8":{"name":"Verified User"},"e258":{"name":"Vertical Align Bottom"},"e259":{"name":"Vertical Align Center"},"e25a":{"name":"Vertical Align Top"},"e62d":{"name":"Vibration"},"e070":{"name":"Video Call"},"e071":{"name":"Video Label"},"e04a":{"name":"Video Library"},"e04b":{"name":"Videocam"},"e04c":{"name":"Videocam Off"},"e338":{"name":"Videogame Asset"},"e8e9":{"name":"View Agenda"},"e8ea":{"name":"View Array"},"e8eb":{"name":"View Carousel"},"e8ec":{"name":"View Column"},"e42a":{"name":"View Comfy"},"e42b":{"name":"View Compact"},"e8ed":{"name":"View Day"},"e8ee":{"name":"View Headline"},"e8ef":{"name":"View List"},"e8f0":{"name":"View Module"},"e8f1":{"name":"View Quilt"},"e8f2":{"name":"View Stream"},"e8f3":{"name":"View Week"},"e435":{"name":"Vignette"},"e8f4":{"name":"Visibility"},"e8f5":{"name":"Visibility Off"},"e62e":{"name":"Voice Chat"},"e0d9":{"name":"Voicemail"},"e04d":{"name":"Volume Down"},"e04e":{"name":"Volume Mute"},"e04f":{"name":"Volume Off"},"e050":{"name":"Volume Up"},"e0da":{"name":"Vpn Key"},"e62f":{"name":"Vpn Lock"},"e1bc":{"name":"Wallpaper"},"e002":{"name":"Warning"},"e334":{"name":"Watch"},"e924":{"name":"Watch Later"},"e42c":{"name":"Wb Auto"},"e42d":{"name":"Wb Cloudy"},"e42e":{"name":"Wb Incandescent"},"e436":{"name":"Wb Iridescent"},"e430":{"name":"Wb Sunny"},"e63d":{"name":"Wc"},"e051":{"name":"Web"},"e069":{"name":"Web Asset"},"e16b":{"name":"Weekend"},"e80e":{"name":"Whatshot"},"e1bd":{"name":"Widgets"},"e63e":{"name":"Wifi"},"e1e1":{"name":"Wifi Lock"},"e1e2":{"name":"Wifi Tethering"},"e8f9":{"name":"Work"},"e25b":{"name":"Wrap Text"},"e8fa":{"name":"Youtube Searched For"},"e8ff":{"name":"Zoom In"},"e900":{"name":"Zoom Out"},"e56b":{"name":"Zoom Out Map"}}} \ No newline at end of file diff --git a/public/fonts/MaterialIcons-Regular.svg b/public/fonts/MaterialIcons-Regular.svg new file mode 100644 index 0000000..a449327 --- /dev/null +++ b/public/fonts/MaterialIcons-Regular.svg @@ -0,0 +1,2373 @@ + + + + + +Created by FontForge 20151118 at Mon Feb 8 11:58:02 2016 + By shyndman +Copyright 2015 Google, Inc. All Rights Reserved. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/fonts/MaterialIcons-Regular.ttf b/public/fonts/MaterialIcons-Regular.ttf new file mode 100644 index 0000000..7015564 Binary files /dev/null and b/public/fonts/MaterialIcons-Regular.ttf differ diff --git a/public/fonts/MaterialIcons-Regular.woff b/public/fonts/MaterialIcons-Regular.woff new file mode 100644 index 0000000..b648a3e Binary files /dev/null and b/public/fonts/MaterialIcons-Regular.woff differ diff --git a/public/fonts/MaterialIcons-Regular.woff2 b/public/fonts/MaterialIcons-Regular.woff2 new file mode 100644 index 0000000..9fa2112 Binary files /dev/null and b/public/fonts/MaterialIcons-Regular.woff2 differ diff --git a/public/fonts/README.md b/public/fonts/README.md new file mode 100644 index 0000000..ce4141e --- /dev/null +++ b/public/fonts/README.md @@ -0,0 +1,9 @@ +The recommended way to use the Material Icons font is by linking to the web font hosted on Google Fonts: + +```html + +``` + +Read more in our full usage guide: +http://google.github.io/material-design-icons/#icon-font-for-the-web diff --git a/public/fonts/codepoints b/public/fonts/codepoints new file mode 100644 index 0000000..3c8b075 --- /dev/null +++ b/public/fonts/codepoints @@ -0,0 +1,932 @@ +3d_rotation e84d +ac_unit eb3b +access_alarm e190 +access_alarms e191 +access_time e192 +accessibility e84e +accessible e914 +account_balance e84f +account_balance_wallet e850 +account_box e851 +account_circle e853 +adb e60e +add e145 +add_a_photo e439 +add_alarm e193 +add_alert e003 +add_box e146 +add_circle e147 +add_circle_outline e148 +add_location e567 +add_shopping_cart e854 +add_to_photos e39d +add_to_queue e05c +adjust e39e +airline_seat_flat e630 +airline_seat_flat_angled e631 +airline_seat_individual_suite e632 +airline_seat_legroom_extra e633 +airline_seat_legroom_normal e634 +airline_seat_legroom_reduced e635 +airline_seat_recline_extra e636 +airline_seat_recline_normal e637 +airplanemode_active e195 +airplanemode_inactive e194 +airplay e055 +airport_shuttle eb3c +alarm e855 +alarm_add e856 +alarm_off e857 +alarm_on e858 +album e019 +all_inclusive eb3d +all_out e90b +android e859 +announcement e85a +apps e5c3 +archive e149 +arrow_back e5c4 +arrow_downward e5db +arrow_drop_down e5c5 +arrow_drop_down_circle e5c6 +arrow_drop_up e5c7 +arrow_forward e5c8 +arrow_upward e5d8 +art_track e060 +aspect_ratio e85b +assessment e85c +assignment e85d +assignment_ind e85e +assignment_late e85f +assignment_return e860 +assignment_returned e861 +assignment_turned_in e862 +assistant e39f +assistant_photo e3a0 +attach_file e226 +attach_money e227 +attachment e2bc +audiotrack e3a1 +autorenew e863 +av_timer e01b +backspace e14a +backup e864 +battery_alert e19c +battery_charging_full e1a3 +battery_full e1a4 +battery_std e1a5 +battery_unknown e1a6 +beach_access eb3e +beenhere e52d +block e14b +bluetooth e1a7 +bluetooth_audio e60f +bluetooth_connected e1a8 +bluetooth_disabled e1a9 +bluetooth_searching e1aa +blur_circular e3a2 +blur_linear e3a3 +blur_off e3a4 +blur_on e3a5 +book e865 +bookmark e866 +bookmark_border e867 +border_all e228 +border_bottom e229 +border_clear e22a +border_color e22b +border_horizontal e22c +border_inner e22d +border_left e22e +border_outer e22f +border_right e230 +border_style e231 +border_top e232 +border_vertical e233 +branding_watermark e06b +brightness_1 e3a6 +brightness_2 e3a7 +brightness_3 e3a8 +brightness_4 e3a9 +brightness_5 e3aa +brightness_6 e3ab +brightness_7 e3ac +brightness_auto e1ab +brightness_high e1ac +brightness_low e1ad +brightness_medium e1ae +broken_image e3ad +brush e3ae +bubble_chart e6dd +bug_report e868 +build e869 +burst_mode e43c +business e0af +business_center eb3f +cached e86a +cake e7e9 +call e0b0 +call_end e0b1 +call_made e0b2 +call_merge e0b3 +call_missed e0b4 +call_missed_outgoing e0e4 +call_received e0b5 +call_split e0b6 +call_to_action e06c +camera e3af +camera_alt e3b0 +camera_enhance e8fc +camera_front e3b1 +camera_rear e3b2 +camera_roll e3b3 +cancel e5c9 +card_giftcard e8f6 +card_membership e8f7 +card_travel e8f8 +casino eb40 +cast e307 +cast_connected e308 +center_focus_strong e3b4 +center_focus_weak e3b5 +change_history e86b +chat e0b7 +chat_bubble e0ca +chat_bubble_outline e0cb +check e5ca +check_box e834 +check_box_outline_blank e835 +check_circle e86c +chevron_left e5cb +chevron_right e5cc +child_care eb41 +child_friendly eb42 +chrome_reader_mode e86d +class e86e +clear e14c +clear_all e0b8 +close e5cd +closed_caption e01c +cloud e2bd +cloud_circle e2be +cloud_done e2bf +cloud_download e2c0 +cloud_off e2c1 +cloud_queue e2c2 +cloud_upload e2c3 +code e86f +collections e3b6 +collections_bookmark e431 +color_lens e3b7 +colorize e3b8 +comment e0b9 +compare e3b9 +compare_arrows e915 +computer e30a +confirmation_number e638 +contact_mail e0d0 +contact_phone e0cf +contacts e0ba +content_copy e14d +content_cut e14e +content_paste e14f +control_point e3ba +control_point_duplicate e3bb +copyright e90c +create e150 +create_new_folder e2cc +credit_card e870 +crop e3be +crop_16_9 e3bc +crop_3_2 e3bd +crop_5_4 e3bf +crop_7_5 e3c0 +crop_din e3c1 +crop_free e3c2 +crop_landscape e3c3 +crop_original e3c4 +crop_portrait e3c5 +crop_rotate e437 +crop_square e3c6 +dashboard e871 +data_usage e1af +date_range e916 +dehaze e3c7 +delete e872 +delete_forever e92b +delete_sweep e16c +description e873 +desktop_mac e30b +desktop_windows e30c +details e3c8 +developer_board e30d +developer_mode e1b0 +device_hub e335 +devices e1b1 +devices_other e337 +dialer_sip e0bb +dialpad e0bc +directions e52e +directions_bike e52f +directions_boat e532 +directions_bus e530 +directions_car e531 +directions_railway e534 +directions_run e566 +directions_subway e533 +directions_transit e535 +directions_walk e536 +disc_full e610 +dns e875 +do_not_disturb e612 +do_not_disturb_alt e611 +do_not_disturb_off e643 +do_not_disturb_on e644 +dock e30e +domain e7ee +done e876 +done_all e877 +donut_large e917 +donut_small e918 +drafts e151 +drag_handle e25d +drive_eta e613 +dvr e1b2 +edit e3c9 +edit_location e568 +eject e8fb +email e0be +enhanced_encryption e63f +equalizer e01d +error e000 +error_outline e001 +euro_symbol e926 +ev_station e56d +event e878 +event_available e614 +event_busy e615 +event_note e616 +event_seat e903 +exit_to_app e879 +expand_less e5ce +expand_more e5cf +explicit e01e +explore e87a +exposure e3ca +exposure_neg_1 e3cb +exposure_neg_2 e3cc +exposure_plus_1 e3cd +exposure_plus_2 e3ce +exposure_zero e3cf +extension e87b +face e87c +fast_forward e01f +fast_rewind e020 +favorite e87d +favorite_border e87e +featured_play_list e06d +featured_video e06e +feedback e87f +fiber_dvr e05d +fiber_manual_record e061 +fiber_new e05e +fiber_pin e06a +fiber_smart_record e062 +file_download e2c4 +file_upload e2c6 +filter e3d3 +filter_1 e3d0 +filter_2 e3d1 +filter_3 e3d2 +filter_4 e3d4 +filter_5 e3d5 +filter_6 e3d6 +filter_7 e3d7 +filter_8 e3d8 +filter_9 e3d9 +filter_9_plus e3da +filter_b_and_w e3db +filter_center_focus e3dc +filter_drama e3dd +filter_frames e3de +filter_hdr e3df +filter_list e152 +filter_none e3e0 +filter_tilt_shift e3e2 +filter_vintage e3e3 +find_in_page e880 +find_replace e881 +fingerprint e90d +first_page e5dc +fitness_center eb43 +flag e153 +flare e3e4 +flash_auto e3e5 +flash_off e3e6 +flash_on e3e7 +flight e539 +flight_land e904 +flight_takeoff e905 +flip e3e8 +flip_to_back e882 +flip_to_front e883 +folder e2c7 +folder_open e2c8 +folder_shared e2c9 +folder_special e617 +font_download e167 +format_align_center e234 +format_align_justify e235 +format_align_left e236 +format_align_right e237 +format_bold e238 +format_clear e239 +format_color_fill e23a +format_color_reset e23b +format_color_text e23c +format_indent_decrease e23d +format_indent_increase e23e +format_italic e23f +format_line_spacing e240 +format_list_bulleted e241 +format_list_numbered e242 +format_paint e243 +format_quote e244 +format_shapes e25e +format_size e245 +format_strikethrough e246 +format_textdirection_l_to_r e247 +format_textdirection_r_to_l e248 +format_underlined e249 +forum e0bf +forward e154 +forward_10 e056 +forward_30 e057 +forward_5 e058 +free_breakfast eb44 +fullscreen e5d0 +fullscreen_exit e5d1 +functions e24a +g_translate e927 +gamepad e30f +games e021 +gavel e90e +gesture e155 +get_app e884 +gif e908 +golf_course eb45 +gps_fixed e1b3 +gps_not_fixed e1b4 +gps_off e1b5 +grade e885 +gradient e3e9 +grain e3ea +graphic_eq e1b8 +grid_off e3eb +grid_on e3ec +group e7ef +group_add e7f0 +group_work e886 +hd e052 +hdr_off e3ed +hdr_on e3ee +hdr_strong e3f1 +hdr_weak e3f2 +headset e310 +headset_mic e311 +healing e3f3 +hearing e023 +help e887 +help_outline e8fd +high_quality e024 +highlight e25f +highlight_off e888 +history e889 +home e88a +hot_tub eb46 +hotel e53a +hourglass_empty e88b +hourglass_full e88c +http e902 +https e88d +image e3f4 +image_aspect_ratio e3f5 +import_contacts e0e0 +import_export e0c3 +important_devices e912 +inbox e156 +indeterminate_check_box e909 +info e88e +info_outline e88f +input e890 +insert_chart e24b +insert_comment e24c +insert_drive_file e24d +insert_emoticon e24e +insert_invitation e24f +insert_link e250 +insert_photo e251 +invert_colors e891 +invert_colors_off e0c4 +iso e3f6 +keyboard e312 +keyboard_arrow_down e313 +keyboard_arrow_left e314 +keyboard_arrow_right e315 +keyboard_arrow_up e316 +keyboard_backspace e317 +keyboard_capslock e318 +keyboard_hide e31a +keyboard_return e31b +keyboard_tab e31c +keyboard_voice e31d +kitchen eb47 +label e892 +label_outline e893 +landscape e3f7 +language e894 +laptop e31e +laptop_chromebook e31f +laptop_mac e320 +laptop_windows e321 +last_page e5dd +launch e895 +layers e53b +layers_clear e53c +leak_add e3f8 +leak_remove e3f9 +lens e3fa +library_add e02e +library_books e02f +library_music e030 +lightbulb_outline e90f +line_style e919 +line_weight e91a +linear_scale e260 +link e157 +linked_camera e438 +list e896 +live_help e0c6 +live_tv e639 +local_activity e53f +local_airport e53d +local_atm e53e +local_bar e540 +local_cafe e541 +local_car_wash e542 +local_convenience_store e543 +local_dining e556 +local_drink e544 +local_florist e545 +local_gas_station e546 +local_grocery_store e547 +local_hospital e548 +local_hotel e549 +local_laundry_service e54a +local_library e54b +local_mall e54c +local_movies e54d +local_offer e54e +local_parking e54f +local_pharmacy e550 +local_phone e551 +local_pizza e552 +local_play e553 +local_post_office e554 +local_printshop e555 +local_see e557 +local_shipping e558 +local_taxi e559 +location_city e7f1 +location_disabled e1b6 +location_off e0c7 +location_on e0c8 +location_searching e1b7 +lock e897 +lock_open e898 +lock_outline e899 +looks e3fc +looks_3 e3fb +looks_4 e3fd +looks_5 e3fe +looks_6 e3ff +looks_one e400 +looks_two e401 +loop e028 +loupe e402 +low_priority e16d +loyalty e89a +mail e158 +mail_outline e0e1 +map e55b +markunread e159 +markunread_mailbox e89b +memory e322 +menu e5d2 +merge_type e252 +message e0c9 +mic e029 +mic_none e02a +mic_off e02b +mms e618 +mode_comment e253 +mode_edit e254 +monetization_on e263 +money_off e25c +monochrome_photos e403 +mood e7f2 +mood_bad e7f3 +more e619 +more_horiz e5d3 +more_vert e5d4 +motorcycle e91b +mouse e323 +move_to_inbox e168 +movie e02c +movie_creation e404 +movie_filter e43a +multiline_chart e6df +music_note e405 +music_video e063 +my_location e55c +nature e406 +nature_people e407 +navigate_before e408 +navigate_next e409 +navigation e55d +near_me e569 +network_cell e1b9 +network_check e640 +network_locked e61a +network_wifi e1ba +new_releases e031 +next_week e16a +nfc e1bb +no_encryption e641 +no_sim e0cc +not_interested e033 +note e06f +note_add e89c +notifications e7f4 +notifications_active e7f7 +notifications_none e7f5 +notifications_off e7f6 +notifications_paused e7f8 +offline_pin e90a +ondemand_video e63a +opacity e91c +open_in_browser e89d +open_in_new e89e +open_with e89f +pages e7f9 +pageview e8a0 +palette e40a +pan_tool e925 +panorama e40b +panorama_fish_eye e40c +panorama_horizontal e40d +panorama_vertical e40e +panorama_wide_angle e40f +party_mode e7fa +pause e034 +pause_circle_filled e035 +pause_circle_outline e036 +payment e8a1 +people e7fb +people_outline e7fc +perm_camera_mic e8a2 +perm_contact_calendar e8a3 +perm_data_setting e8a4 +perm_device_information e8a5 +perm_identity e8a6 +perm_media e8a7 +perm_phone_msg e8a8 +perm_scan_wifi e8a9 +person e7fd +person_add e7fe +person_outline e7ff +person_pin e55a +person_pin_circle e56a +personal_video e63b +pets e91d +phone e0cd +phone_android e324 +phone_bluetooth_speaker e61b +phone_forwarded e61c +phone_in_talk e61d +phone_iphone e325 +phone_locked e61e +phone_missed e61f +phone_paused e620 +phonelink e326 +phonelink_erase e0db +phonelink_lock e0dc +phonelink_off e327 +phonelink_ring e0dd +phonelink_setup e0de +photo e410 +photo_album e411 +photo_camera e412 +photo_filter e43b +photo_library e413 +photo_size_select_actual e432 +photo_size_select_large e433 +photo_size_select_small e434 +picture_as_pdf e415 +picture_in_picture e8aa +picture_in_picture_alt e911 +pie_chart e6c4 +pie_chart_outlined e6c5 +pin_drop e55e +place e55f +play_arrow e037 +play_circle_filled e038 +play_circle_outline e039 +play_for_work e906 +playlist_add e03b +playlist_add_check e065 +playlist_play e05f +plus_one e800 +poll e801 +polymer e8ab +pool eb48 +portable_wifi_off e0ce +portrait e416 +power e63c +power_input e336 +power_settings_new e8ac +pregnant_woman e91e +present_to_all e0df +print e8ad +priority_high e645 +public e80b +publish e255 +query_builder e8ae +question_answer e8af +queue e03c +queue_music e03d +queue_play_next e066 +radio e03e +radio_button_checked e837 +radio_button_unchecked e836 +rate_review e560 +receipt e8b0 +recent_actors e03f +record_voice_over e91f +redeem e8b1 +redo e15a +refresh e5d5 +remove e15b +remove_circle e15c +remove_circle_outline e15d +remove_from_queue e067 +remove_red_eye e417 +remove_shopping_cart e928 +reorder e8fe +repeat e040 +repeat_one e041 +replay e042 +replay_10 e059 +replay_30 e05a +replay_5 e05b +reply e15e +reply_all e15f +report e160 +report_problem e8b2 +restaurant e56c +restaurant_menu e561 +restore e8b3 +restore_page e929 +ring_volume e0d1 +room e8b4 +room_service eb49 +rotate_90_degrees_ccw e418 +rotate_left e419 +rotate_right e41a +rounded_corner e920 +router e328 +rowing e921 +rss_feed e0e5 +rv_hookup e642 +satellite e562 +save e161 +scanner e329 +schedule e8b5 +school e80c +screen_lock_landscape e1be +screen_lock_portrait e1bf +screen_lock_rotation e1c0 +screen_rotation e1c1 +screen_share e0e2 +sd_card e623 +sd_storage e1c2 +search e8b6 +security e32a +select_all e162 +send e163 +sentiment_dissatisfied e811 +sentiment_neutral e812 +sentiment_satisfied e813 +sentiment_very_dissatisfied e814 +sentiment_very_satisfied e815 +settings e8b8 +settings_applications e8b9 +settings_backup_restore e8ba +settings_bluetooth e8bb +settings_brightness e8bd +settings_cell e8bc +settings_ethernet e8be +settings_input_antenna e8bf +settings_input_component e8c0 +settings_input_composite e8c1 +settings_input_hdmi e8c2 +settings_input_svideo e8c3 +settings_overscan e8c4 +settings_phone e8c5 +settings_power e8c6 +settings_remote e8c7 +settings_system_daydream e1c3 +settings_voice e8c8 +share e80d +shop e8c9 +shop_two e8ca +shopping_basket e8cb +shopping_cart e8cc +short_text e261 +show_chart e6e1 +shuffle e043 +signal_cellular_4_bar e1c8 +signal_cellular_connected_no_internet_4_bar e1cd +signal_cellular_no_sim e1ce +signal_cellular_null e1cf +signal_cellular_off e1d0 +signal_wifi_4_bar e1d8 +signal_wifi_4_bar_lock e1d9 +signal_wifi_off e1da +sim_card e32b +sim_card_alert e624 +skip_next e044 +skip_previous e045 +slideshow e41b +slow_motion_video e068 +smartphone e32c +smoke_free eb4a +smoking_rooms eb4b +sms e625 +sms_failed e626 +snooze e046 +sort e164 +sort_by_alpha e053 +spa eb4c +space_bar e256 +speaker e32d +speaker_group e32e +speaker_notes e8cd +speaker_notes_off e92a +speaker_phone e0d2 +spellcheck e8ce +star e838 +star_border e83a +star_half e839 +stars e8d0 +stay_current_landscape e0d3 +stay_current_portrait e0d4 +stay_primary_landscape e0d5 +stay_primary_portrait e0d6 +stop e047 +stop_screen_share e0e3 +storage e1db +store e8d1 +store_mall_directory e563 +straighten e41c +streetview e56e +strikethrough_s e257 +style e41d +subdirectory_arrow_left e5d9 +subdirectory_arrow_right e5da +subject e8d2 +subscriptions e064 +subtitles e048 +subway e56f +supervisor_account e8d3 +surround_sound e049 +swap_calls e0d7 +swap_horiz e8d4 +swap_vert e8d5 +swap_vertical_circle e8d6 +switch_camera e41e +switch_video e41f +sync e627 +sync_disabled e628 +sync_problem e629 +system_update e62a +system_update_alt e8d7 +tab e8d8 +tab_unselected e8d9 +tablet e32f +tablet_android e330 +tablet_mac e331 +tag_faces e420 +tap_and_play e62b +terrain e564 +text_fields e262 +text_format e165 +textsms e0d8 +texture e421 +theaters e8da +thumb_down e8db +thumb_up e8dc +thumbs_up_down e8dd +time_to_leave e62c +timelapse e422 +timeline e922 +timer e425 +timer_10 e423 +timer_3 e424 +timer_off e426 +title e264 +toc e8de +today e8df +toll e8e0 +tonality e427 +touch_app e913 +toys e332 +track_changes e8e1 +traffic e565 +train e570 +tram e571 +transfer_within_a_station e572 +transform e428 +translate e8e2 +trending_down e8e3 +trending_flat e8e4 +trending_up e8e5 +tune e429 +turned_in e8e6 +turned_in_not e8e7 +tv e333 +unarchive e169 +undo e166 +unfold_less e5d6 +unfold_more e5d7 +update e923 +usb e1e0 +verified_user e8e8 +vertical_align_bottom e258 +vertical_align_center e259 +vertical_align_top e25a +vibration e62d +video_call e070 +video_label e071 +video_library e04a +videocam e04b +videocam_off e04c +videogame_asset e338 +view_agenda e8e9 +view_array e8ea +view_carousel e8eb +view_column e8ec +view_comfy e42a +view_compact e42b +view_day e8ed +view_headline e8ee +view_list e8ef +view_module e8f0 +view_quilt e8f1 +view_stream e8f2 +view_week e8f3 +vignette e435 +visibility e8f4 +visibility_off e8f5 +voice_chat e62e +voicemail e0d9 +volume_down e04d +volume_mute e04e +volume_off e04f +volume_up e050 +vpn_key e0da +vpn_lock e62f +wallpaper e1bc +warning e002 +watch e334 +watch_later e924 +wb_auto e42c +wb_cloudy e42d +wb_incandescent e42e +wb_iridescent e436 +wb_sunny e430 +wc e63d +web e051 +web_asset e069 +weekend e16b +whatshot e80e +widgets e1bd +wifi e63e +wifi_lock e1e1 +wifi_tethering e1e2 +work e8f9 +wrap_text e25b +youtube_searched_for e8fa +zoom_in e8ff +zoom_out e900 +zoom_out_map e56b diff --git a/public/fonts/material-icons.css b/public/fonts/material-icons.css new file mode 100644 index 0000000..2270c09 --- /dev/null +++ b/public/fonts/material-icons.css @@ -0,0 +1,36 @@ +@font-face { + font-family: 'Material Icons'; + font-style: normal; + font-weight: 400; + src: url(MaterialIcons-Regular.eot); /* For IE6-8 */ + src: local('Material Icons'), + local('MaterialIcons-Regular'), + url(MaterialIcons-Regular.woff2) format('woff2'), + url(MaterialIcons-Regular.woff) format('woff'), + url(MaterialIcons-Regular.ttf) format('truetype'); +} + +.material-icons { + font-family: 'Material Icons'; + font-weight: normal; + font-style: normal; + font-size: 24px; /* Preferred icon size */ + display: inline-block; + line-height: 1; + text-transform: none; + letter-spacing: normal; + word-wrap: normal; + white-space: nowrap; + direction: ltr; + + /* Support for all WebKit browsers. */ + -webkit-font-smoothing: antialiased; + /* Support for Safari and Chrome. */ + text-rendering: optimizeLegibility; + + /* Support for Firefox. */ + -moz-osx-font-smoothing: grayscale; + + /* Support for IE. */ + font-feature-settings: 'liga'; +} diff --git a/resources/lang/es/reportThecnicalSheet.php b/resources/lang/es/reportThecnicalSheet.php index c8b1775..0907361 100644 --- a/resources/lang/es/reportThecnicalSheet.php +++ b/resources/lang/es/reportThecnicalSheet.php @@ -1,7 +1,7 @@ "Fecha/Corte", - "tab_label_jobs" => "Casos Emergentes", + "tab_label_jobs" => "Cargos Emergentes", "tab_label_panel" => "Participantes N°", "tab_label_exchange" => "Tipo de Cambio", diff --git a/resources/views/beneficios/complete.blade.php b/resources/views/beneficios/complete.blade.php index 5cc8e5c..541f3a5 100644 --- a/resources/views/beneficios/complete.blade.php +++ b/resources/views/beneficios/complete.blade.php @@ -1,5 +1,21 @@ -@extends('layout') +@extends('layouts.report') +@include('includes.benefit_nav') +@section('breadcrumbs') + +@endsection @section('content') +
Fecha de Corte: {{$dbData->periodo}}
diff --git a/resources/views/beneficios_report/charts.blade.php b/resources/views/beneficios_report/charts.blade.php index 81e779a..7ec1352 100644 --- a/resources/views/beneficios_report/charts.blade.php +++ b/resources/views/beneficios_report/charts.blade.php @@ -19,6 +19,7 @@ @endsection @section('content') +
Fecha de Corte:{{$encuesta->periodo}}
diff --git a/resources/views/beneficios_report/composicion_charts.blade.php b/resources/views/beneficios_report/composicion_charts.blade.php index ca43027..c5a7596 100644 --- a/resources/views/beneficios_report/composicion_charts.blade.php +++ b/resources/views/beneficios_report/composicion_charts.blade.php @@ -18,6 +18,7 @@ @endsection @section('content') +
Fecha de Corte:{{$encuesta->periodo}}
diff --git a/resources/views/cargos_clientes/edit.blade.php b/resources/views/cargos_clientes/edit.blade.php index 0d5ed9b..4371d06 100644 --- a/resources/views/cargos_clientes/edit.blade.php +++ b/resources/views/cargos_clientes/edit.blade.php @@ -344,10 +344,26 @@
- +
+ +
+
+ +
diff --git a/resources/views/clientes/home.blade.php b/resources/views/clientes/home.blade.php index a223a46..9989c7b 100644 --- a/resources/views/clientes/home.blade.php +++ b/resources/views/clientes/home.blade.php @@ -2,7 +2,7 @@ @section('content')
-
+

{{ $club }}

@@ -57,7 +57,12 @@ + + @if ($dbEmpresa->sub_rubro_id == 25) + + dashboardReporte Especial + + @endif @endif @@ -69,40 +74,72 @@ - + @stop @push('scripts') @endpush \ No newline at end of file diff --git a/resources/views/encuestas/create.blade.php b/resources/views/encuestas/create.blade.php index 8cc5561..5d7ddb9 100644 --- a/resources/views/encuestas/create.blade.php +++ b/resources/views/encuestas/create.blade.php @@ -3,7 +3,7 @@
-

Crear Nueva Encuesta tasa

+

Crear Nueva Encuesta

diff --git a/resources/views/encuestas_cargos/edit.blade.php b/resources/views/encuestas_cargos/edit.blade.php index 387eefb..68c30b7 100644 --- a/resources/views/encuestas_cargos/edit.blade.php +++ b/resources/views/encuestas_cargos/edit.blade.php @@ -309,8 +309,9 @@
- + +
diff --git a/resources/views/encuestas_cargos/show.blade copy.php b/resources/views/encuestas_cargos/show.blade copy.php new file mode 100644 index 0000000..b303ecd --- /dev/null +++ b/resources/views/encuestas_cargos/show.blade copy.php @@ -0,0 +1,193 @@ +@extends('layout') + +@section('content') +
+
+ addCargo +
+
+ + @if($dbData) +
+
+
+

Listado de Cargos - {{$dbEmpresa or ''}} {{$dbPeriodo or ''}}

+
+ + + + + + + + + + + + + + + + + + + + + + + @foreach($dbData as $est) + + + + + + + + + + @endforeach + +
DescripcionCargo OficialSalarioIncluirOpciones
DescripcionCargo OficialSalario
{{ $est->descripcion }} + + + {{ DB::table('detalle_encuestas') + ->where('encuestas_cargo_id', $est->id) + ->where('cabecera_encuesta_id', $est->cabecera_encuesta_id) + ->value('salario_base')}} + + @if($est->incluir) + Sí + @else + No + @endif + + + + editRevisar + + + + saveGuardar + +
+
+
+
+ @else +
+
+

Listado de Cargos

+
+
+
+ Saludos +

Esta es la primera vez que participa de la Encuesta, por favor ingrese un cargo nuevo

+
+
+ +
+
+
+ @endif +@endsection +@push('scripts') + +@endpush \ No newline at end of file diff --git a/resources/views/encuestas_cargos/show.blade.php b/resources/views/encuestas_cargos/show.blade.php index b303ecd..403707d 100644 --- a/resources/views/encuestas_cargos/show.blade.php +++ b/resources/views/encuestas_cargos/show.blade.php @@ -8,7 +8,7 @@
@if($dbData) -
+

Listado de Cargos - {{$dbEmpresa or ''}} {{$dbPeriodo or ''}}

@@ -21,7 +21,8 @@ Cargo Oficial Salario Incluir - Opciones + Opciones + @@ -34,49 +35,7 @@ - - @foreach($dbData as $est) - - {{ $est->descripcion }} - - - - - {{ DB::table('detalle_encuestas') - ->where('encuestas_cargo_id', $est->id) - ->where('cabecera_encuesta_id', $est->cabecera_encuesta_id) - ->value('salario_base')}} - - - @if($est->incluir) - Sí - @else - No - @endif - - - - - editRevisar - - - - - saveGuardar - - - - - @endforeach - +
@@ -107,8 +66,23 @@ var title = $(this).text(); $(this).html( '' ); } ); - + + var spinner = '
'+ + '
'+ + '
'+ + '
'+ + '
'+ + '
'+ + '
'+ + '
'+ + '
'+ + '
'+ + '
'+ + '
'+ + '
'; var table = $('#listado_cargos').DataTable({ + processing: true, + ajax: "{{route('encuestas_cargos.getCargos', $id)}}", "scrollX": false, "scrollCollapse": false, "lengthChange": false, @@ -129,7 +103,12 @@ "width":"15%", "orderable": false, "searchable": false, - } + }, + { + targets:[6], + visible: false + } + ], @@ -140,7 +119,8 @@ "zeroRecords": "No hay registros - Lo sentimos", "info": "Página _PAGE_ de _PAGES_", "infoEmpty": "No hay registros disponibles", - "infoFiltered": "(Filtrado de un total de _MAX_ registros)" + "infoFiltered": "(Filtrado de un total de _MAX_ registros)", + processing: spinner }, drawCallback: function() { $('.select2').select2(); @@ -148,25 +128,19 @@ }); - table.columns().every(function(){ - var that = this; - $('input', this.header()).on('keyup change', function(){ - if ( that.search() !== this.value ) { - that - .search( this.value ) - .draw(); - } - }); - } ); + table.columns().every(function(){ + var that = this; + $('input', this.header()).on('keyup change', function(){ + if ( that.search() !== this.value ) { + that + .search( this.value ) + .draw(); + } + }); + }); }); - /*$("#listado").on('change', '.cargo_select', function(e){ - var id = $(this).val(); - var input = $(this).closest("tr").find("input[name=cargo_id]"); - input.val(id); - });*/ - $("#listado_cargos").on('click', '.guardar', function(e){ e.preventDefault(); var id = $(this).closest("tr").find("input[name=cargo_id]").val(); diff --git a/resources/views/includes/benefit_nav.blade.php b/resources/views/includes/benefit_nav.blade.php index f21add6..f583282 100644 --- a/resources/views/includes/benefit_nav.blade.php +++ b/resources/views/includes/benefit_nav.blade.php @@ -30,3 +30,35 @@ @endsection +@section('nav_mobile') + +@endsection diff --git a/resources/views/layout.blade.php b/resources/views/layout.blade.php index 2692969..a6d96f8 100644 --- a/resources/views/layout.blade.php +++ b/resources/views/layout.blade.php @@ -7,7 +7,7 @@ {!! MaterializeCSS::include_css() !!} - + @@ -49,10 +49,104 @@
  • Reporte - Niveles
  • + @if(Auth::check()) + @if(Auth::user()->is_admin) + + + @elseif(Auth::user()->is_benefit) + @yield('nav_mobile') + @else + + @endif + @else + + @endif @@ -167,6 +261,10 @@ "tooltipClass": "customIntro" }); + $(document).ready(function(){ + $('.sidenav').sidenav(); + }); + @include('includes.translation_script') @stack('scripts') diff --git a/resources/views/report/cargos_club.blade.php b/resources/views/report/cargos_club.blade.php index 9348af9..8d10e9f 100644 --- a/resources/views/report/cargos_club.blade.php +++ b/resources/views/report/cargos_club.blade.php @@ -9,14 +9,28 @@ @section('content')
    -
    -
    - - - -
    +
    +
    +
    + + + +
    +
    +
    +
    + + + @if (session('especial')) + + @endif +
    + +

    Club {!! $club !!}

    diff --git a/resources/views/report/layout.blade.php b/resources/views/report/layout.blade.php index ac70aaa..e5107b3 100644 --- a/resources/views/report/layout.blade.php +++ b/resources/views/report/layout.blade.php @@ -7,7 +7,7 @@ {!! MaterializeCSS::include_css() !!} - + @@ -26,9 +26,52 @@
  • @lang('reportLayout.menu_universe')
  • + @if(Auth::check()) + + @else + + @endif