diff --git a/app/Config/Auth.php b/app/Config/Auth.php index 5b67922..90e160a 100644 --- a/app/Config/Auth.php +++ b/app/Config/Auth.php @@ -15,7 +15,7 @@ class Auth extends \Myth\Auth\Config\Auth * * @var string */ - public $defaultUserGroup; + public $defaultUserGroup = 'Prestadores'; /** * -------------------------------------------------------------------- diff --git a/app/Config/Filters.php b/app/Config/Filters.php index 60cc306..ad09df8 100644 --- a/app/Config/Filters.php +++ b/app/Config/Filters.php @@ -26,6 +26,7 @@ class Filters extends BaseConfig 'invalidchars' => InvalidChars::class, 'secureheaders' => SecureHeaders::class, 'login' => \Myth\Auth\Filters\LoginFilter::class, + 'role' => \Myth\Auth\Filters\RoleFilter::class, 'inicio' => InicioFilter::class, 'formulario_inicial' => FormularioInicialFilter::class, ]; diff --git a/app/Config/Routes.php b/app/Config/Routes.php index 351766e..e76f387 100644 --- a/app/Config/Routes.php +++ b/app/Config/Routes.php @@ -2,6 +2,8 @@ namespace Config; +use CodeIgniter\Commands\Utilities\Routes; + // Create a new instance of our RouteCollection class. $routes = Services::routes(); @@ -32,19 +34,49 @@ $routes->set404Override(); * Route Definitions * -------------------------------------------------------------------- */ - // We get a performance increase by specifying the default // route since we don't have to scan directories. -$routes->get('/', 'Prestador::index'); +$routes->get('/', 'Prestador::index', ['as' => 'home']); $routes->get('horas/', 'Prestador::horas'); $routes->match(['get', 'post'], 'registro/', 'Prestador::formulario'); $routes->get('success', 'Prestador::success'); +// ENCUESTAS +$routes->get('encuesta/answered', 'Encuesta::userAnswered'); +$routes->get('encuesta/(:segment)', 'Encuesta::encuesta/$1', ['as' => 'encuesta']); +$routes->post('encuesta/submit/(:segment)', 'Encuesta::submit/$1', ['as' => 'encuesta_submit']); + + + + // utilizar m�todo attemptRegister personalizdo (no requiere de username) $routes->post('register/', 'Auth::attemptRegister'); +// $routes->post('login/', 'Auth::attemptLogin'); -$routes->group('admin', static function ($routes) { +$routes->group('admin', ['filter' => 'role:Admin'], static function ($routes) { $routes->get('/', 'Admin::home', ['as' => 'admin_home']); + + // SOLICITUDES + $routes->get('solicitudes/', 'Admin::solicitudes', ['as' => 'admin_solicitudes']); + $routes->get('solicitud/aprobar/(:segment)', 'Admin::aprobarSolicitud/$1', ['as' => 'admin_solicitud_aprobar']); + $routes->get('solicitud/rechazar/(:segment)', 'Admin::rechazarSolicitud/$1', ['as' => 'admin_solicitud_rechazar']); + $routes->get('solicitud/(:segment)', 'Admin::revisarSolicitud/$1', ['as' => 'admin_solicitud_revisar']); + + // ENCUESTAS + $routes->get('encuestas/', 'Admin::encuestas', ['as' => 'admin_encuestas']); + $routes->match(['get', 'post'], 'encuesta/nueva', 'Admin::nuevaEncuesta', ['as' => 'admin_encuesta_nueva']); + $routes->get('encuesta/(:segment)', 'Admin::encuesta/$1', ['as' => 'admin_encuesta']); + $routes->match(['get', 'post'], 'encuesta/editar/(:segment)', 'Admin::editarEncuesta/$1', ['as' => 'admin_encuesta_editar']); + $routes->get('encuesta/eliminar/(:segment)', 'Admin::eliminarEncuesta/$1', ['as' => 'admin_encuesta_eliminar']); + + // PREGUNTAS + $routes->match(['get', 'post'], 'encuesta/(:segment)/pregunta/', 'Admin::nuevaPregunta/$1', ['as' => 'admin_pregunta_nueva']); + $routes->match(['get', 'post'], 'pregunta/editar/(:segment)', 'Admin::editarPregunta/$1', ['as' => 'admin_pregunta_editar']); + $routes->post('pregunta_post', 'Admin::preguntaPost', ['as' => 'pregunta_post']); + $routes->get('pregunta/eliminar/(:segment)', 'Admin::eliminarPregunta/$1', ['as' => 'admin_pregunta_eliminar']); + + // GRUPOS + $routes->get('create_group/', 'Admin::createGroup'); }); diff --git a/app/Controllers/Admin.php b/app/Controllers/Admin.php index 1be009d..775198e 100644 --- a/app/Controllers/Admin.php +++ b/app/Controllers/Admin.php @@ -2,11 +2,290 @@ namespace App\Controllers; +use App\Entities\PrestadorSolicitudModel; +use App\Models\EncuestaModel; +use App\Models\PreguntaModel; +use App\Models\PrestadorModel; +use App\Models\PrestadorSolicitudModel as ModelsPrestadorSolicitudModel; +use App\Models\UserModel; + class Admin extends BaseController { public function home() { - $data['title'] = 'Inicio'; + $data = [ + 'title' => 'Inicio', + 'solicitudes' => model(PrestadorSolicitudModel::class)->countSolicitudes(), + 'prestadoresActivos' => model(PrestadorModel::class)->countPrestadoresActivos(), + ]; return view('Admin/index', $data); } + + + // SOLICITUDES + public function solicitudes() + { + + $data = [ + 'title' => 'Solicitudes', + 'solicitudes' => model(PrestadorSolicitudModel::class)->getPrestadorSolicitud(), + ]; + return view('Admin/solicitudes', $data); + } + + public function revisarSolicitud($id) + { + + $model = model(ModelsPrestadorSolicitudModel::class); + + if (!$datos = $model->find($id)) { + return redirect()->route('admin_solicitudes')->with('msg', array( + 'type' => 'danger', + 'body' => 'Solicitud no encontrada' + )); + } + + $data = [ + 'id' => $id, + 'email' => user()->email, + 'escuelas' => model(EscuelaModel::class)->getEscuelas(), + 'departamentos' => model(DepartamentoModel::class)->getDepartamentos(), + 'datos' => $datos, + 'revisar' => true, + ]; + + return view('Prestador/formulario_inicial', $data); + } + + public function aprobarSolicitud($id) + { + $solicitudModel = model(ModelsPrestadorSolicitudModel::class); + + // Validar que la solicitud existe + if (!$solicitud = $solicitudModel->find($id)) { + return redirect()->route('admin_solicitudes')->with('msg', array( + 'type' => 'danger', + 'body' => 'Solicitud no encontrada' + )); + } + + // Verificar que status de la solicitud == 0 + if ($solicitud['status'] != 0) { + return redirect()->route('admin_solicitudes')->with('msg', array( + 'type' => 'danger', + 'body' => 'El status de esta solicitud no permite que sea aprobada' + )); + } + + // Encontrar usuario que mandó la solicitud + if (!$user = model(UserModel::class)->findUserWithSolicitud($id)) { + return redirect()->route('admin_solicitudes')->with('msg', array( + 'type' => 'danger', + 'body' => 'Ningún usuario tiene esa solicitud registrada.' + )); + } + + // Crear registro en la tabla prestador + $prestadorModel = model(PrestadorModel::class); + + // Asignar id de la tabla prestador al usuario aprobado + + // Cambiar status de la solicitud + + return redirect()->route('admin_solicitudes')->with('msg', array( + 'type' => 'success', + 'body' => 'Solicitud aprobada. Se activo la cuenta del prestador.' + )); + } + + public function rechazarSolicitud($id) + { + echo 'rechazandp solicitud ' . $id; + } + + // ENCUESTAS + public function encuestas() + { + $data = [ + 'title' => 'Encuestas', + 'encuestas' => model(EncuestaModel::class)->getEncuestas(), + ]; + return view('Admin/encuestas.php', $data); + } + + public function encuesta($id) + { + $data = [ + 'id' => $id, + 'encuesta' => model(EncuestaModel::class)->getEncuestas($id, true), + 'preguntas' => model(PreguntaModel::class)->getPreguntas($id), + + ]; + return view('Admin/encuesta', $data); + } + + public function nuevaEncuesta() + { + // Guardar encuesta + if ($this->request->getMethod() === 'post') { + $encuesta = model(EncuestaModel::class); + + $data = $this->request->getPost(); + // agregar id del usuario actual + $data['user_id'] = user_id(); + + // Validar datos + if (!$encuesta->save($data)) { + return redirect()->back()->withInput()->with('errors', $encuesta->errors()); + } + + return redirect()->route('admin_encuestas')->with('msg', array( + 'type' => 'success', + 'body' => 'Encuesta creada correctamente.' + )); + } + $data = [ + 'title' => 'Nueva encuesta', + ]; + return view('Admin/formularioEncuesta', $data); + } + + public function editarEncuesta($id) + { + $encuesta = model(EncuestaModel::class); + + if ($this->request->getMethod() === 'post') { + + $data = $this->request->getPost(); + + if (!$encuesta->update($id, $data)) { + return redirect()->back()->withInput()->with('errors', $encuesta->errors()); + } + return redirect()->route('admin_encuestas')->with('msg', array( + 'type' => 'success', + 'body' => 'Encuesta editada correctamente', + )); + } + + $data = [ + 'id' => $id, + 'title' => 'Modificar encuesta', + 'datos' => $encuesta->getEncuestas($id), + ]; + + return view('Admin/formularioEncuesta', $data); + } + + public function eliminarEncuesta($id) + { + if (!model(EncuestaModel::class)->delete($id)) { + return redirect()->route('admin_encuestas')->with('msg', array( + 'type' => 'error', + 'body' => 'Error al eliminar la encuesta.' + )); + } + return redirect()->route('admin_encuestas')->with('msg', array( + 'type' => 'success', + 'body' => 'Encuesta eliminada correctamente.' + )); + } + + // PREGUNTAS + + public function nuevaPregunta($id) + { + if ($this->request->getMethod() === 'post') { + $pregunta = model(PreguntaModel::class); + + $data = $this->request->getPost(); + + // Relacionar encuesta($id) con pregunta(survey_id) + $data['survey_id'] = $id; + $data['order_by'] = 1; + + + // Validar y guardar datos + if (!$pregunta->save($data)) { + return redirect()->back()->withInput()->with('errors', $pregunta->errors()); + } + + $url = 'admin/encuesta/' . $id; + return redirect()->to($url)->with('msg', array( + 'type' => 'success', + 'body' => 'Pregunta registrada correctamente', + )); + } + + $data = [ + 'title' => 'Nueva pregunta', + 'id' => $id, + ]; + + return view('Admin/formularioPregunta', $data); + } + + + public function editarPregunta($id) + { + $pregunta = model(PreguntaModel::class); + + if ($this->request->getMethod() === 'post') { + + $data = $this->request->getPost(); + if (!$pregunta->update($id, $data)) { + return redirect()->back()->withInput()->with('errors', $pregunta->errors()); + } + + $encuestaId = $pregunta->find($id)['survey_id']; + + $url = 'admin/encuesta/' . $encuestaId; + return redirect()->to($url)->with('msg', array( + 'type' => 'success', + 'body' => 'Pregunta registrada correctamente', + )); + } + + $data = [ + 'preguntaId' => $id, + 'title' => 'Editar pregunta', + 'datos' => $pregunta->find($id), + ]; + return view('Admin/formularioPregunta', $data); + } + + public function eliminarPregunta(int $id) + { + $model = model('PreguntaModel'); + + if (!$pregunta = $model->find($id)) { + throw \CodeIgniter\Exceptions\PageNotFoundException::forPageNotFound(); + } + + $encuestaId = $pregunta['survey_id']; + $model->delete($id); + + $url = 'admin/encuesta/' . $encuestaId; + + return redirect()->to($url)->with('msg', array( + 'type' => 'success', + 'body' => 'Pregunta eliminada correctamente', + )); + } + + public function preguntaPost() + { + $data = $this->request->getPost(); + $data['survey_id'] = 1; + $data['order_by'] = 1; + + var_dump($data); + } + + // GRUPOS + public function createGroup() + { + // $authorize = service('authorization'); + // $id = $authorize->createGroup('Prestador', 'Prestadores de Servicio Social o Prácticas Profesionales'); + // echo $id; + } } diff --git a/app/Controllers/Auth.php b/app/Controllers/Auth.php index 675db65..3fc6cba 100644 --- a/app/Controllers/Auth.php +++ b/app/Controllers/Auth.php @@ -68,4 +68,45 @@ class Auth extends MythAuthController // Success! return redirect()->route('login')->with('message', lang('Auth.registerSuccess')); } + + public function attemptLogin() + { + $rules = [ + 'login' => 'required', + 'password' => 'required', + ]; + if ($this->config->validFields === ['email']) { + $rules['login'] .= '|valid_email'; + } + + if (!$this->validate($rules)) { + return redirect()->back()->withInput()->with('errors', $this->validator->getErrors()); + } + + $login = $this->request->getPost('login'); + $password = $this->request->getPost('password'); + $remember = (bool) $this->request->getPost('remember'); + + // Determine credential type + $type = filter_var($login, FILTER_VALIDATE_EMAIL) ? 'email' : 'username'; + + // Try to log them in... + if (!$this->auth->attempt([$type => $login, 'password' => $password], $remember)) { + return redirect()->back()->withInput()->with('error', $this->auth->error() ?? lang('Auth.badAttempt')); + } + + // Is the user being forced to reset their password? + if ($this->auth->user()->force_pass_reset === true) { + return redirect()->to(route_to('reset-password') . '?token=' . $this->auth->user()->reset_hash)->withCookies(); + } + + $redirectURL = session('redirect_url') ?? site_url('/'); + unset($_SESSION['redirect_url']); + + helper('auth'); + if (user()->in_groups('Admin')) + $redirectURL = site_url('/admin'); + + return redirect()->to($redirectURL)->withCookies()->with('message', lang('Auth.loginSuccess')); + } } diff --git a/app/Controllers/Encuesta.php b/app/Controllers/Encuesta.php new file mode 100644 index 0000000..696dfc1 --- /dev/null +++ b/app/Controllers/Encuesta.php @@ -0,0 +1,92 @@ +find($id)) { + throw \CodeIgniter\Exceptions\PageNotFoundException::forPageNotFound(); + } + $data = [ + 'id' => $encuesta['id'], + 'title' => $encuesta['title'], + 'preguntas' => model(PreguntaModel::class)->getPreguntas($id), + ]; + return view('Encuesta/template', $data); + } + + public function submit($id) + { + $respuestaModel = model(RespuestaModel::class); + $userId = user_id(); + + $data = $this->request->getPost(); + $respuestas = []; + + foreach ($data as $questionId => $answer) { + if (is_array($answer)) { + foreach ($answer as $a) { + $respuesta = [ + 'survey_id' => $id, + 'user_id' => $userId, + 'answer' => $a, + 'question_id' => $questionId, + ]; + array_push($respuestas, $respuesta); + } + } else { + $respuesta = [ + 'survey_id' => $id, + 'user_id' => $userId, + 'answer' => $answer, + 'question_id' => $questionId, + ]; + + array_push($respuestas, $respuesta); + } + // $answer = implode(chr(13), $answer); + + + }; + + if (!$respuestaModel->insertBatch($respuestas)) { + return redirect()->back() + ->with('msg', array( + 'type' => 'danger', + 'body' => 'No se pudo guardar la encuesta. Inténtalo nuevamente.' + )); + } + + // Registrar que usuario respondió encuesta + $surveyUserModel = model(SurveyUserModel::class); + $surveyUserModel->save([ + 'survey_id' => $id, + 'user_id' => $userId, + ]); + + return redirect()->route('home')->with('msg', array( + 'type' => 'success', + 'body' => 'Encuesta guardada correctamente' + )); + } + + + public function userAnswered() + { + $surveyUserModel = model(SurveyUserModel::class); + + $encuestaId = 23; + $userId = user_id(); + + echo $surveyUserModel->alreadyAnswered($encuestaId, $userId); + } +} diff --git a/app/Controllers/Prestador.php b/app/Controllers/Prestador.php index f3140ec..b2afb7d 100644 --- a/app/Controllers/Prestador.php +++ b/app/Controllers/Prestador.php @@ -3,6 +3,7 @@ namespace App\Controllers; use App\Models\DepartamentoModel; +use App\Models\EncuestaModel; use App\Models\EscuelaModel; use App\Models\HorasModel; use App\Models\PrestadorModel; @@ -24,11 +25,18 @@ class Prestador extends BaseController return $carry + $item['segundos']; }, 0); + // Consultar encuestas disponibles + $encuestaModel = model(EncuestaModel::class); + $horasARealizar = model(PrestadorModel::class)->find(user()->idprestador)['horas_servicio']; + $porcentajeRealizado = $segundosTotal / ($horasARealizar * 1000); + + $encuestas = $encuestaModel->getPrestadorEncuestas($porcentajeRealizado); + $data = [ 'segundosMensuales' => $segundosMensuales, 'horasTotales' => $segundosTotal / 3600, 'segundosDiarios' => $segundosDiarios, - + 'encuestas' => $encuestas, ]; return view('Prestador/index', $data); @@ -75,8 +83,9 @@ class Prestador extends BaseController 'email' => user()->email, 'escuelas' => model(EscuelaModel::class)->getEscuelas(), 'departamentos' => model(DepartamentoModel::class)->getDepartamentos(), - 'datos' => $prestadorModel->getPrestadorSolicitud(user()->rh_prestador_solicitud_id), + 'datos' => user()->rh_prestador_solicitud_id ? $prestadorModel->find(user()->rh_prestador_solicitud_id) : null, ]; + return view('Prestador/formulario_inicial', $data); } } diff --git a/app/Models/EncuestaModel.php b/app/Models/EncuestaModel.php new file mode 100644 index 0000000..a029623 --- /dev/null +++ b/app/Models/EncuestaModel.php @@ -0,0 +1,63 @@ + 'required', + 'user_id' => 'required', + 'perfil' => 'required', + 'fecha' => 'required', + 'status' => 'required', + ]; + + + public function getEncuestas($id = null, $verbose = false) + { + if (!$id) { + return $this->findAll(); + } + + $encuesta = $this->where('id', $id)->first(); + + if ($verbose && $encuesta) { + $encuesta['perfil_nombre'] = $encuesta['perfil'] == 1 ? 'Personal de CEJ' : 'Prestador'; + $encuesta['status_nombre'] = $encuesta['status'] == 0 ? 'No publicada' : 'Publicada'; + + switch ($encuesta['fecha']) { + case 1: + $encuesta['fecha_nombre'] = 'Inicio de servicio'; + break; + case 2: + $encuesta['fecha_nombre'] = '50% de horas o más'; + break; + case 3: + $encuesta['fecha_nombre'] = 'Al terminar el servicio'; + break; + } + } + + return $encuesta; + } + + public function getPrestadorEncuestas($porcentajeCompletado) + { + $fecha = 1 + $porcentajeCompletado * 2; + + return $this + ->select(['id', 'title']) + ->where('perfil', 2) + ->where('fecha <=', $fecha) + ->findAll(); + } +} diff --git a/app/Models/PreguntaModel.php b/app/Models/PreguntaModel.php new file mode 100644 index 0000000..b378478 --- /dev/null +++ b/app/Models/PreguntaModel.php @@ -0,0 +1,27 @@ + 'required', + 'survey_id' => 'required', + 'type' => 'required', + ]; + + public function getPreguntas($encuestaId) + { + return $this + ->where('survey_id', $encuestaId) + ->findAll(); + } +} diff --git a/app/Models/PrestadorModel.php b/app/Models/PrestadorModel.php index 65e33fd..6902145 100644 --- a/app/Models/PrestadorModel.php +++ b/app/Models/PrestadorModel.php @@ -10,9 +10,25 @@ class PrestadorModel extends Model protected $primaryKey = 'idprestador'; protected $useTimestamps = false; + protected $allowedFields = [ + 'nombre', 'apaterno', 'amaterno', 'fechanac', + 'direccion', 'colonia', 'municipio', 'cp', + 'telefono', 'celular', 'email', + 'idescuela', 'carrera', 'grado', 'turno', + 'tipo', 'fechainicio', 'iddepartamento_actual', 'horas_servicio', + 'codigo_estudiante', 'horario', + ]; + function getPrestador($id = null) { return $this->where('idprestador', $id)->first(); } + + function countPrestadoresActivos() + { + return $this + ->where('status', 0) + ->countAllResults(); + } } diff --git a/app/Models/PrestadorSolicitudModel.php b/app/Models/PrestadorSolicitudModel.php index 4b6dcd0..05f493a 100644 --- a/app/Models/PrestadorSolicitudModel.php +++ b/app/Models/PrestadorSolicitudModel.php @@ -54,14 +54,19 @@ class PrestadorSolicitudModel extends Model ]; - // protected $validationMessages = [ - // 'email' => [ - // 'is_unique' => 'Sorry. That email has already been taken. Please choose another.', - // ], - // ]; function getPrestadorSolicitud($id = null) { + if (!$id) { + return $this->where('status', 0)->findAll(); + } return $this->where('id', $id)->first(); } + + function countSolicitudes() + { + return $this + ->where('status', 0) + ->countAllResults(); + } } diff --git a/app/Models/RespuestaModel.php b/app/Models/RespuestaModel.php new file mode 100644 index 0000000..4cd140d --- /dev/null +++ b/app/Models/RespuestaModel.php @@ -0,0 +1,21 @@ + 'required', + 'user_id' => 'required', + 'answer' => 'required', + 'question_id' => 'required', + ]; +} diff --git a/app/Models/SurveyUserModel.php b/app/Models/SurveyUserModel.php new file mode 100644 index 0000000..c1dd307 --- /dev/null +++ b/app/Models/SurveyUserModel.php @@ -0,0 +1,27 @@ + 'required', + 'user_id' => 'required', + ]; + + + public function alreadyAnswered($surveyId, $userId) + { + return $this->where([ + 'survey_id' => $surveyId, + 'user_id' => $userId, + ])->countAllResults(); + } +} diff --git a/app/Models/UserModel.php b/app/Models/UserModel.php index 4e8c923..07486c4 100644 --- a/app/Models/UserModel.php +++ b/app/Models/UserModel.php @@ -120,4 +120,13 @@ class UserModel extends Model 'password' => bin2hex(random_bytes(16)), ]); } + + + public function findUserWithSolicitud($solicitudId) + { + return $this + // ->select('id') + ->where('rh_prestador_solicitud_id', $solicitudId) + ->first(); + } } diff --git a/app/Views/Admin/encuesta.php b/app/Views/Admin/encuesta.php new file mode 100644 index 0000000..212d8d3 --- /dev/null +++ b/app/Views/Admin/encuesta.php @@ -0,0 +1,95 @@ +extend('templates/baseAdmin') ?> + +section('content') ?> + +
+
+
+
+

+

Perfil:

+

Fecha:

+

Status:

+ Editar encuesta +
+
+ + +
+

Preguntas

+ Nueva pregunta +
+ + + + + + + + + + + + + + + + + + +
PreguntaTipoOpcionesAcciones
+ + +
+ + + + + +
+
+ + + + + + + +endSection() ?> \ No newline at end of file diff --git a/app/Views/Admin/encuestas.php b/app/Views/Admin/encuestas.php new file mode 100644 index 0000000..f12c580 --- /dev/null +++ b/app/Views/Admin/encuestas.php @@ -0,0 +1,74 @@ +extend('templates/baseAdmin') ?> + +section('content') ?> + + + + + + + + + + + + + + + + +
TítuloDescripciónOpciones
+
+ + + + + + + + +
+
+ + + + + + + +endSection() ?> \ No newline at end of file diff --git a/app/Views/Admin/formularioEncuesta.php b/app/Views/Admin/formularioEncuesta.php new file mode 100644 index 0000000..38581f2 --- /dev/null +++ b/app/Views/Admin/formularioEncuesta.php @@ -0,0 +1,45 @@ +extend('templates/baseAdmin') ?> + +section('content') ?> + + +
+ + +
+ + +
+
+ + +
+
+ + +
+ +
+ + +
+
+ + +
+ Cancelar + +
+ +endSection() ?> \ No newline at end of file diff --git a/app/Views/Admin/formularioPregunta.php b/app/Views/Admin/formularioPregunta.php new file mode 100644 index 0000000..3d2fe66 --- /dev/null +++ b/app/Views/Admin/formularioPregunta.php @@ -0,0 +1,44 @@ +extend('templates/baseAdmin') ?> + +section('content') ?> + +
+ + +
+ + +
+
+ + +
+
+ + +
+ + Cancelar + +
+ + + + +endSection() ?> \ No newline at end of file diff --git a/app/Views/Admin/index.php b/app/Views/Admin/index.php index 9b0477b..c2aad8c 100644 --- a/app/Views/Admin/index.php +++ b/app/Views/Admin/index.php @@ -2,6 +2,38 @@ section('content') ?> -

hey

+
+
+
+
+
+

+

Solicitudes por revisar

+
+
+ +
+ + Ver lista + +
+
+
+ +
+
+

+

Prestadores activos

+
+
+ +
+ + Ver lista + +
+
+
+
endSection() ?> \ No newline at end of file diff --git a/app/Views/Admin/solicitudes.php b/app/Views/Admin/solicitudes.php new file mode 100644 index 0000000..b1bbb92 --- /dev/null +++ b/app/Views/Admin/solicitudes.php @@ -0,0 +1,63 @@ +extend('templates/baseAdmin') ?> + +section('content') ?> + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + +
NombreEmailRevisar
+ + + +
+ +
+
+ + + +endSection() ?> \ No newline at end of file diff --git a/app/Views/Encuesta/template.php b/app/Views/Encuesta/template.php new file mode 100644 index 0000000..8c2149d --- /dev/null +++ b/app/Views/Encuesta/template.php @@ -0,0 +1,54 @@ + +extend('templates/base') ?> + + +section('title') ?>PrestadorendSection() ?> + + +section('content') ?> + +

+ +
+ + + + +
+ + + + + + + + + + + + +
+ + + +
+ + +
+ + + Cancelar + +
+endSection() ?> \ No newline at end of file diff --git a/app/Views/Prestador/formulario_inicial.php b/app/Views/Prestador/formulario_inicial.php index 04495b5..c895620 100644 --- a/app/Views/Prestador/formulario_inicial.php +++ b/app/Views/Prestador/formulario_inicial.php @@ -23,44 +23,44 @@ + ?>" required >
+ ?>" >
+ ?>" >
+ ?>" >
- + >
+ ?>" >
+ ?>" >

@@ -71,25 +71,25 @@ + ?>" >
+ ?>" >
+ ?>" >
+ ?>" >

@@ -101,11 +101,11 @@ + ?>" >
- > @@ -116,17 +116,17 @@ + ?>" >
+ ?>" >
- > @@ -140,7 +140,7 @@
- > @@ -149,7 +149,7 @@
- > @@ -160,17 +160,17 @@ + ?>" required >
+ ?>" >
- > @@ -179,19 +179,34 @@
-
- +
+ >
-
- - Cancelar - - -
+ + + + + + + +
+ + Cancelar + + +
+ + + +
diff --git a/app/Views/Prestador/index.php b/app/Views/Prestador/index.php index 9cca44b..a9a7b55 100644 --- a/app/Views/Prestador/index.php +++ b/app/Views/Prestador/index.php @@ -17,6 +17,24 @@ section('content') ?>
+ + +
+
+
+ Encuestas disponibles +
+
+
+ + + +
+
+
+
+ +
diff --git a/app/Views/templates/base.php b/app/Views/templates/base.php index 898b3e1..bbff675 100644 --- a/app/Views/templates/base.php +++ b/app/Views/templates/base.php @@ -25,7 +25,18 @@ include('templates/navbar') ?>
+ + + + + + + renderSection('content') ?> +
diff --git a/app/Views/templates/baseAdmin.php b/app/Views/templates/baseAdmin.php index ce3d318..d43b9d0 100644 --- a/app/Views/templates/baseAdmin.php +++ b/app/Views/templates/baseAdmin.php @@ -17,149 +17,12 @@ scratch. This page gets rid of all links and provides the needed markup only. +
- -
-
- -
- -
-
-
+
@@ -238,18 +103,21 @@ scratch. This page gets rid of all links and provides the needed markup only.
+ + + +
-

-
-
- +

@@ -257,7 +125,7 @@ scratch. This page gets rid of all links and provides the needed markup only. -
+
renderSection('content') ?>
@@ -276,15 +144,6 @@ scratch. This page gets rid of all links and provides the needed markup only. - -
- -
- Anything you want -
- - Copyright © 2014-2021 COPARMEX. All rights reserved. -