diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..f79f99a --- /dev/null +++ b/.env.example @@ -0,0 +1,46 @@ +APP_NAME=DRENAX +APP_ENV=local +APP_KEY=base64:Im+P7IaQuCaLVvCByz3KbD8GtxXKaOzh2HnRFNDmvcM= +APP_DEBUG=true +APP_LOG_LEVEL=debug +APP_URL=http://localhost + +DB_CONNECTION=mysql +DB_HOST=mariadb +DB_PORT="${DB_PORT}" +DB_DATABASE="${DB_DATABASE}" +DB_USERNAME="${DB_USERNAME}" +DB_PASSWORD="${DB_PASSWORD}" + +BROADCAST_DRIVER=log +CACHE_DRIVER=file +SESSION_DRIVER=file +QUEUE_DRIVER=sync + +REDIS_HOST=127.0.0.1 +REDIS_PASSWORD=null +REDIS_PORT=6379 + +MAIL_DRIVER=smtp +MAIL_HOST=smtp.gmail.com +MAIL_PORT=587 +MAIL_USERNAME=servicios.drenax@gmail.com +MAIL_PASSWORD=qhskdjghifhnleio +MAIL_ENCRYPTION=tls +MAIL_FROM_ADDRESS=servicios.drenax@gmail.com +MAIL_FROM_NAME=DRENAX + +#MAIL_DRIVER=smtp +#MAIL_HOST=smtp.gmail.com +#MAIL_PORT=587 +#MAIL_USERNAME=contactoo.drenax@gmail.com +#MAIL_PASSWORD=rwebnafassbutirx +#MAIL_ENCRYPTION=tls +#MAIL_FROM_ADDRESS=contactoo.drenax@gmail.com +#MAIL_FROM_NAME=DRENAX + +PUSHER_APP_ID= +PUSHER_APP_KEY= +PUSHER_APP_SECRET= + +AMBIENTE=DEV diff --git a/.env.example.old b/.env.example.old new file mode 100644 index 0000000..668c06f --- /dev/null +++ b/.env.example.old @@ -0,0 +1,33 @@ +APP_NAME=Laravel +APP_ENV=local +APP_KEY= +APP_DEBUG=true +APP_LOG_LEVEL=debug +APP_URL=http://localhost + +DB_CONNECTION=mysql +DB_HOST=127.0.0.1 +DB_PORT=3306 +DB_DATABASE=homestead +DB_USERNAME=homestead +DB_PASSWORD=secret + +BROADCAST_DRIVER=log +CACHE_DRIVER=file +SESSION_DRIVER=file +QUEUE_DRIVER=sync + +REDIS_HOST=127.0.0.1 +REDIS_PASSWORD=null +REDIS_PORT=6379 + +MAIL_DRIVER=smtp +MAIL_HOST=smtp.mailtrap.io +MAIL_PORT=2525 +MAIL_USERNAME=null +MAIL_PASSWORD=null +MAIL_ENCRYPTION=null + +PUSHER_APP_ID= +PUSHER_APP_KEY= +PUSHER_APP_SECRET= diff --git a/.gitattributes b/.gitattributes index dfe0770..967315d 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,2 +1,5 @@ -# Auto detect text files and perform LF normalization * text=auto +*.css linguist-vendored +*.scss linguist-vendored +*.js linguist-vendored +CHANGELOG.md export-ignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..4ff696f --- /dev/null +++ b/.gitignore @@ -0,0 +1,13 @@ +/node_modules +/public/hot +/public/storage +/storage/*.key +/vendor +/.idea +/.vagrant +Homestead.json +Homestead.yaml +npm-debug.log +yarn-error.log +.env +*.DS_Store diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..0474093 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,73 @@ +# Imagen base +FROM php:7.2-fpm + +# Actualizar el sistema e instalar dependencias +RUN apt-get update && apt-get install -y \ + libfreetype6-dev \ + libcurl4-openssl-dev pkg-config libssl-dev \ + libjpeg62-turbo-dev \ + git \ + libzip-dev \ + zip \ + libmcrypt-dev \ + libmagickwand-dev \ + libpng-dev \ + libxml2-dev \ + supervisor \ + nginx \ + && docker-php-ext-install -j$(nproc) iconv \ + && docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \ + && docker-php-ext-install -j$(nproc) gd \ + && docker-php-ext-install -j$(nproc) pdo_mysql zip \ + && docker-php-ext-install exif \ + && docker-php-ext-install soap \ + && docker-php-ext-install zip \ + && pecl install imagick \ + && docker-php-ext-enable imagick + +#Limpiar cache +RUN apt-get clean && rm -rf /var/lib/apt/lists/* + +# Instalar Composer +RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer + +# Copiar tu aplicación al directorio de trabajo +RUN mkdir /var/www/laravel +# Establecer el directorio de trabajo +WORKDIR /var/www/laravel + +RUN echo 'memory_limit = 10G' >> /usr/local/etc/php/conf.d/docker-php-memlimit.ini; + +RUN usermod -a -G www-data root + +# Configuración adicional de Nginx, PHP y supervisord +COPY ./docker/supervisor.conf /etc/supervisor/conf.d/supervisord.conf +COPY ./docker/php.ini /usr/local/etc/php/conf.d/prep.ini +COPY ./docker/nginx.conf /etc/nginx/sites-available/default +COPY ./docker/nginx-default.conf /etc/nginx/nginx.conf +COPY ./docker/php-fpm.conf /usr/local/etc/php-fpm.d/www.conf + +COPY ./docker/entrypoint-production.sh /usr/bin/docker-entrypoint.sh +RUN ["chmod", "+x", "/usr/bin/docker-entrypoint.sh"] + +# PHP Error Log Files +RUN mkdir /var/log/php +RUN touch /var/log/php/errors.log && chmod 777 /var/log/php/errors.log + +# Establecer el directorio de trabajo +WORKDIR /var/www/laravel + +# Instalar dependencias de Composer +#COPY ./composer.json /var/www/laravel +#COPY ./composer.lock /var/www/laravel +#RUN cd /var/www/laravel \ && composer install --no-interaction --no-plugins --no-scripts + +# Configurar permisos de directorios y archivos +#RUN chown -R www-data:www-data /var/www/laravel/storage \ && chown -R www-data:www-data /var/www/laravel/bootstrap + +# Comando por defecto al iniciar el contenedor +EXPOSE 80 + +ENTRYPOINT ["/usr/bin/docker-entrypoint.sh"] + +CMD ["/usr/bin/supervisord", "-n", "-c", "/etc/supervisor/conf.d/supervisord.conf"] \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..2fd50b6 --- /dev/null +++ b/README.md @@ -0,0 +1,51 @@ +

+ +

+Build Status +Total Downloads +Latest Stable Version +License +

+ +## About Laravel + +Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experience to be truly fulfilling. Laravel attempts to take the pain out of development by easing common tasks used in the majority of web projects, such as: + +- [Simple, fast routing engine](https://laravel.com/docs/routing). +- [Powerful dependency injection container](https://laravel.com/docs/container). +- Multiple back-ends for [session](https://laravel.com/docs/session) and [cache](https://laravel.com/docs/cache) storage. +- Expressive, intuitive [database ORM](https://laravel.com/docs/eloquent). +- Database agnostic [schema migrations](https://laravel.com/docs/migrations). +- [Robust background job processing](https://laravel.com/docs/queues). +- [Real-time event broadcasting](https://laravel.com/docs/broadcasting). + +Laravel is accessible, yet powerful, providing tools needed for large, robust applications. A superb combination of simplicity, elegance, and innovation give you tools you need to build any application with which you are tasked. + +## Learning Laravel + +Laravel has the most extensive and thorough documentation and video tutorial library of any modern web application framework. The [Laravel documentation](https://laravel.com/docs) is thorough, complete, and makes it a breeze to get started learning the framework. + +If you're not in the mood to read, [Laracasts](https://laracasts.com) contains over 900 video tutorials on a range of topics including Laravel, modern PHP, unit testing, JavaScript, and more. Boost the skill level of yourself and your entire team by digging into our comprehensive video library. + +## Laravel Sponsors + +We would like to extend our thanks to the following sponsors for helping fund on-going Laravel development. If you are interested in becoming a sponsor, please visit the Laravel [Patreon page](http://patreon.com/taylorotwell): + +- **[Vehikl](http://vehikl.com)** +- **[Tighten Co.](https://tighten.co)** +- **[British Software Development](https://www.britishsoftware.co)** +- **[Styde](https://styde.net)** +- [Fragrantica](https://www.fragrantica.com) +- [SOFTonSOFA](https://softonsofa.com/) + +## Contributing + +Thank you for considering contributing to the Laravel framework! The contribution guide can be found in the [Laravel documentation](http://laravel.com/docs/contributions). + +## Security Vulnerabilities + +If you discover a security vulnerability within Laravel, please send an e-mail to Taylor Otwell at taylor@laravel.com. All security vulnerabilities will be promptly addressed. + +## License + +The Laravel framework is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT). diff --git a/app/Console/Commands/RolePermissions.php b/app/Console/Commands/RolePermissions.php new file mode 100644 index 0000000..86cce3c --- /dev/null +++ b/app/Console/Commands/RolePermissions.php @@ -0,0 +1,76 @@ +orderBy('id')->get(); + + $procesos = array('Salir'); + + foreach ($roles as $r){ + array_push($procesos, $r->name); + } + + $proceso = $this->choice('Proceso ?', $procesos, 0); + + if($proceso == 'Salir'){ + $this->info('BYE :)'); + dd(); + } + + $rolName = $proceso; + $this->info('Actualizando permisos para: ' . $rolName); + $role = Sentinel::findRoleByName($rolName); + + $permisos = []; + $routeCollection = Route::getRoutes(); + foreach ($routeCollection as $value) { + if($value->getName()!=""){ + $permisos[$value->getName()] = true; + } + } + $role->permissions = $permisos; + $role->save(); + + $this->info('Permisos actualizados para rol: ' . $rolName); + + } +} diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php new file mode 100644 index 0000000..f7baccf --- /dev/null +++ b/app/Console/Kernel.php @@ -0,0 +1,40 @@ +command('inspire') + // ->hourly(); + } + + /** + * Register the Closure based commands for the application. + * + * @return void + */ + protected function commands() + { + require base_path('routes/console.php'); + } +} diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php new file mode 100644 index 0000000..133bdb2 --- /dev/null +++ b/app/Exceptions/Handler.php @@ -0,0 +1,112 @@ +notFound('Ruta no encontrada'); + } + + if($exception instanceof ModelNotFoundException){ + + return response()->notFound('Recurso no encontrado'); + } + + if($exception instanceof ValidationException){ + + $errors = $exception->validator->errors(); + return response()->unprocessable('Parametros inválidos',$errors); + + }else if($exception instanceof TokenExpiredException) { + + return response()->unauthorized($exception->getMessage()); + + }else if($exception instanceof UnauthorizedHttpException){ + + return response()->unauthorized($exception->getMessage()); + + }else if($exception instanceof TokenBlacklistedException){ + + return response()->unauthorized($exception->getMessage()); + + }else if($exception instanceof TokenInvalidException){ + + return response()->badRequest($exception->getMessage()); + } + + else if($exception instanceof JWTException) { + + return response()->badRequest($exception->getMessage() ); + } + + + + return parent::render($request, $exception); + } + + /** + * Convert an authentication exception into an unauthenticated response. + * + * @param \Illuminate\Http\Request $request + * @param \Illuminate\Auth\AuthenticationException $exception + * @return \Illuminate\Http\Response + */ + protected function unauthenticated($request, AuthenticationException $exception) + { + if ($request->expectsJson()) { + return response()->json(['error' => 'Unauthenticated.'], 401); + } + + return redirect()->guest(route('login')); + } +} diff --git a/app/Http/Controllers/Administrador/ClientesController.php b/app/Http/Controllers/Administrador/ClientesController.php new file mode 100644 index 0000000..c5b224f --- /dev/null +++ b/app/Http/Controllers/Administrador/ClientesController.php @@ -0,0 +1,467 @@ +input('deleted'); + $orderBy = $request->input('sortBy','users.nombre'); + $order = $request->input('order','asc'); + $queryBuilder = Cliente::select('clientes.*', 'users.nombre as asesor_nombre', 'users.apellido_paterno as asesor_apellido_paterno', 'users.apellido_materno as asesor_apellido_materno', 'sucursales.nombre as sucursal_nombre') + ->join('users', 'users.id', '=', 'clientes.asesor_id') + ->join('sucursales', 'sucursales.id', '=', 'clientes.sucursal_id') + ->where('clientes.sucursal_id', $user->sucursal_id) + ->orderBy($orderBy,$order); + + if($query = $request->get('query',false)){ + $queryBuilder->where(function($q) use ($query){ + $q->where('clientes.denominacion','like','%' .$query.'%') + ->orWhere('sucursales.nombre','like','%' .$query.'%'); + }); + } + + if($deleted) { + $queryBuilder->onlyTrashed(); + } + + if($perPage = $request->input('perPage',false)){ + $clientes = $queryBuilder->paginate($perPage); + }else{ + $clientes = ['data'=>$queryBuilder->get()]; + } + + return response()->success($clientes); + } + + /** + * Store a newly created resource in storage. + * + * @param \Illuminate\Http\Request $request + * @return \Illuminate\Http\Response + */ + public function store(ClientesRequest $request) + { + $data = $request->all(); + + DB::beginTransaction(); + try { + $cliente = Cliente::create($data); + + if($data['requiere_factura']){ + $cliente->registroDatosFiscales()->create($data['datos_fiscales']); + } + + DB::commit(); + + return response()->success($cliente); + } catch (\Exception $e) { + DB::rollBack(); + Log::info($e->getMessage()); + return response()->unprocessable('Error', ['Error al guardar el Cliente.']); + } + } + + /** + * Display the specified resource. + * + * @param int $id + * @return \Illuminate\Http\Response + */ + public function show($id) + { + $cliente = Cliente::select('clientes.*', 'users.nombre as asesor_nombre', 'users.apellido_paterno as asesor_apellido_paterno', 'users.apellido_materno as asesor_apellido_materno', 'sucursales.nombre as sucursal_nombre') + ->join('users', 'users.id', '=', 'clientes.asesor_id') + ->join('sucursales', 'sucursales.id', '=', 'clientes.sucursal_id') + ->where('clientes.id', $id) + ->withTrashed() + ->first(); + + $cliente->datos_fiscales = ClienteDatoFiscal::where('cliente_id', $id)->first(); + + return response()->success($cliente); + } + + /** + * Update the specified resource in storage. + * + * @param \Illuminate\Http\Request $request + * @param int $id + * @return \Illuminate\Http\Response + */ + public function update(ClientesRequest $request, $id) + { + $data = $request->all(); + + DB::beginTransaction(); + try { + $cliente = Cliente::where('id',$id) + ->withTrashed() + ->firstOrFail(); + + $cliente->update($data); + + if($data['requiere_factura']){ + $cliente->registroDatosFiscales()->update($data['datos_fiscales']); + }else{ + $cliente->registroDatosFiscales()->delete(); + } + + DB::commit(); + + return response()->success($cliente); + } catch (\Exception $e) { + DB::rollBack(); + Log::info($e->getMessage()); + return response()->unprocessable('Error', ['Error al actualizar el Cliente.']); + } + } + + /** + * Remove the specified resource from storage. + * + * @param int $id + * @return \Illuminate\Http\Response + */ + public function destroy($id, Request $request) + { + $deleted = $request->input('deleted'); + + if($deleted){ + $cliente = Cliente::where('id',$id) + ->onlyTrashed() + ->first(); + + $cliente->restore(); + }else{ + $cliente = Cliente::findOrFail($id); + $cliente->delete(); + } + + return response()->success(['result' => 'ok']); + } + + public function indexDomiciliosXCliente(Request $request, $id) + { + + $orderBy = $request->input('sortBy','nombre_sucursal'); + $order = $request->input('order','asc'); + + $queryBuilder = ClienteDomicilio::where('cliente_id', $id) + ->orderBy($orderBy,$order); + + if($query = $request->get('query',false)){ + $queryBuilder->where(function($q) use ($query){ + $q->where('nombre_sucursal','like','%' .$query.'%') + ->orWhere('calle','like','%' .$query.'%') + ->orWhere('entre_calles','like','%' .$query.'%') + ->orWhere('num_ext','like','%' .$query.'%') + ->orWhere('colonia','like','%' .$query.'%') + ->orWhere('ciudad','like','%' .$query.'%') + ->orWhere('cp','like','%' .$query.'%') + ->orWhere('telefono','like','%' .$query.'%') + ->orWhere('celular_responsable','like','%' .$query.'%'); + }); + } + + $cliente = Cliente::where('id', $id)->first(); + + if($perPage = $request->input('perPage',false)){ + $data = collect($queryBuilder->paginate($perPage))->put('cliente_denominacion', $cliente->denominacion)->all(); + }else{ + $data = ['data'=>$queryBuilder->get(), 'cliente_denominacion' => $cliente->denominacion]; + } + + return response()->success($data); + } + + public function showDomicilioXCliente($cliente_id, $id) + { + $domicilio = ClienteDomicilio::where('cliente_id', $cliente_id) + ->where('id', $id) + ->firstOrFail(); + + return response()->success($domicilio); + } + + public function updateDomicilioXCliente(ClientesDomiciliosRequest $request, $cliente_id, $id) + { + $data = $request->all(); + + $nombre_croquis_pdf = null; + $croquis_pdf = substr($request->input('nombre_croquis', false), strpos($request->input('nombre_croquis', false), ',') +1); + + if ($croquis_pdf) { + $nombre_croquis_pdf = 'croquis_cliente_' . $cliente_id . '_domicilio_' . $id . '.pdf'; + Storage::disk('public')->put('pdf_croquis/' . $nombre_croquis_pdf, base64_decode($croquis_pdf)); + } + + $validator = Validator::make($data, [ + 'nombre_sucursal' => [ + Rule::unique('clientes_domicilios')->where(function ($query) use($cliente_id, $id) { + $query->where('cliente_id', $cliente_id) + ->where('id', '<>',$id); + }) + ], + 'numero_sucursal' => [ + Rule::unique('clientes_domicilios')->where(function ($query) use($cliente_id, $id) { + $query->where('cliente_id', $cliente_id) + ->where('id', '<>',$id); + }) + ] + ]); + + if($validator->fails()){ + return response()->unprocessable('Parametros inválidos',$validator->errors()->all()); + } + + $domicilio = ClienteDomicilio::where('cliente_id', $cliente_id) + ->where('id', $id) + ->firstOrFail(); + + $data['nombre_croquis'] = $nombre_croquis_pdf; + + $domicilio->update($data); + + return response()->success($domicilio); + } + + public function storeDomicilioXCliente(ClientesDomiciliosRequest $request, $cliente_id) + { + $data = $request->all(); + $nombre_croquis_pdf = null; + + $validator = Validator::make($data, [ + 'nombre_sucursal' => [ + Rule::unique('clientes_domicilios')->where(function ($query) use($cliente_id) { + $query->where('cliente_id', $cliente_id); + }) + ], + 'numero_sucursal' => [ + Rule::unique('clientes_domicilios')->where(function ($query) use($cliente_id) { + $query->where('cliente_id', $cliente_id); + }) + ] + ]); + + if($validator->fails()){ + return response()->unprocessable('Parametros inválidos',$validator->errors()->all()); + } + + $cliente = Cliente::where('id', $cliente_id)->firstOrFail(); + + //Se agregan valores por default de lat y lng + $lat = $request->input('lat', null); + $lng = $request->input('lng', null); + $data['lat'] = ($lat)? $lat : '24.772795'; + $data['lng'] = ($lng)? $lng : '-107.4432'; + + $domicilio = $cliente->registroDomicilios()->create($data); + + $croquis_pdf = substr($request->input('nombre_croquis', false), strpos($request->input('nombre_croquis', false), ',') +1); + + if ($croquis_pdf) { + $nombre_croquis_pdf = 'croquis_cliente_' . $cliente_id .'_domicilio_' .$domicilio->id .'.pdf'; + Storage::disk('public')->put('pdf_croquis/' . $nombre_croquis_pdf, base64_decode($croquis_pdf)); + } + + $domicilio->update([ + 'nombre_croquis' => $nombre_croquis_pdf + ]); + + return response()->success($domicilio); + } + + public function destroyDomicilioXCliente($cliente_id, $id){ + + ClienteDomicilio::where('id', $id) + ->where('cliente_id', $cliente_id) + ->delete(); + + return response()->success(['result' => 'ok']); + } + + public function asesores(Request $request){ + + $orderBy = $request->input('sortBy','nombre'); + $order = $request->input('order','asc'); + + $queryBuilder = User::select('users.*', DB::raw("coalesce (roles.name, '') as role"), 'roles.id as role_id', 'tipos_empleados.nombre as tipo_empleado', 'tipos_empleados.id as tipo_empleado_id', 'sucursales.id as sucursal_id', 'sucursales.nombre as sucursal') + ->orderBy($orderBy,$order) + ->leftJoin('role_users', 'role_users.user_id', '=', 'users.id') + ->leftJoin('roles', 'roles.id', '=', 'role_users.role_id') + ->join('sucursales', 'sucursales.id', '=', 'users.sucursal_id') + ->join('tipos_empleados', 'tipos_empleados.id', '=', 'users.tipo_empleado_id') + ->where('users.tipo_empleado_id', ATENCION_CLIENTES); + + if($query = $request->get('query',false)){ + $queryBuilder->where(function($q) use ($query){ + $q->where('users.email','like','%' .$query.'%') + ->orWhere('users.nombre','like','%' .$query.'%') + ->orWhere('users.apellido_paterno','like','%' .$query.'%') + ->orWhere('users.apellido_materno','like','%' .$query.'%') + ->orWhere('users.telefono','like','%' .$query.'%') + ->orWhere('roles.name','like','%' .$query.'%'); + }); + } + + if($perPage = $request->input('perPage',false)){ + $data = $queryBuilder->paginate($perPage); + }else{ + $data = ['data'=>$queryBuilder->get()]; + } + + return response()->success($data); + } + + public function formasPago(Request $request){ + + $orderBy = $request->input('sortBy','descripcion'); + $order = $request->input('order','asc'); + + $queryBuilder = FacturaFormaPago::orderBy($orderBy,$order); + + if($query = $request->get('query',false)){ + $queryBuilder->where(function($q) use ($query){ + $q->where('descripcion','like','%' .$query.'%'); + }); + } + + if($perPage = $request->input('perPage',false)){ + $data = $queryBuilder->paginate($perPage); + }else{ + $data = ['data'=>$queryBuilder->get()]; + } + + return response()->success($data); + } + + public function metodosPago(Request $request){ + + $orderBy = $request->input('sortBy','descripcion'); + $order = $request->input('order','asc'); + + $queryBuilder = FacturaMetodoPago::orderBy($orderBy,$order); + + if($query = $request->get('query',false)){ + $queryBuilder->where(function($q) use ($query){ + $q->where('descripcion','like','%' .$query.'%'); + }); + } + + if($perPage = $request->input('perPage',false)){ + $data = $queryBuilder->paginate($perPage); + }else{ + $data = ['data'=>$queryBuilder->get()]; + } + + return response()->success($data); + } + + public function tipoComprobante(Request $request){ + + $orderBy = $request->input('sortBy','descripcion'); + $order = $request->input('order','asc'); + + $queryBuilder = FacturaTipoComprobante::orderBy($orderBy,$order); + + if($query = $request->get('query',false)){ + $queryBuilder->where(function($q) use ($query){ + $q->where('descripcion','like','%' .$query.'%'); + }); + } + + if($perPage = $request->input('perPage',false)){ + $data = $queryBuilder->paginate($perPage); + }else{ + $data = ['data'=>$queryBuilder->get()]; + } + + return response()->success($data); + } + + public function usoCFDI(Request $request){ + + $orderBy = $request->input('sortBy','descripcion'); + $order = $request->input('order','asc'); + + $queryBuilder = FacturaUsoCFDI::orderBy($orderBy,$order); + + if($query = $request->get('query',false)){ + $queryBuilder->where(function($q) use ($query){ + $q->where('descripcion','like','%' .$query.'%'); + }); + } + + if($perPage = $request->input('perPage',false)){ + $data = $queryBuilder->paginate($perPage); + }else{ + $data = ['data'=>$queryBuilder->get()]; + } + + return response()->success($data); + } + + public function sucursales(Request $request){ + + $orderBy = $request->input('sortBy','nombre'); + $order = $request->input('order','asc'); + + $queryBuilder = Sucursal::orderBy($orderBy,$order); + + if($query = $request->get('query',false)){ + $queryBuilder->where(function($q) use ($query){ + $q->where('nombre','like','%' .$query.'%'); + }); + } + + if($perPage = $request->input('perPage',false)){ + $data = $queryBuilder->paginate($perPage); + }else{ + $data = ['data'=>$queryBuilder->get()]; + } + + return response()->success($data); + } + + public function mostrarPDF($domicilio_id){ + + $domicilio = ClienteDomicilio::select('nombre_croquis')->where('id', $domicilio_id)->firstOrFail(); + + if($domicilio->nombre_croquis && Storage::disk('public')->exists("pdf_croquis/". $domicilio->nombre_croquis)) { + return response()->file(storage_path('app/public/pdf_croquis/' . $domicilio->nombre_croquis)); + }else{ + return response()->unprocessable('El domicilio del cliente no tiene asignado PDF. Favor de adjuntarlo.'); + } + } +} diff --git a/app/Http/Controllers/Administrador/EstatusServiciosController.php b/app/Http/Controllers/Administrador/EstatusServiciosController.php new file mode 100644 index 0000000..7a6b0a3 --- /dev/null +++ b/app/Http/Controllers/Administrador/EstatusServiciosController.php @@ -0,0 +1,124 @@ +input('deleted'); + $orderBy = $request->input('sortBy','nombre'); + $order = $request->input('order','asc'); + $queryBuilder = CatEstatuServicio::orderBy($orderBy,$order); + + if($query = $request->get('query',false)){ + $queryBuilder->where(function($q) use ($query){ + $q->where('nombre','like','%' .$query.'%'); + }); + } + + if($deleted) { + $queryBuilder->onlyTrashed(); + } + + if($perPage = $request->input('perPage',false)){ + $estatus = $queryBuilder->paginate($perPage); + }else{ + $estatus = ['data'=>$queryBuilder->get()]; + } + + return response()->success($estatus); + } + + /** + * Store a newly created resource in storage. + * + * @param \Illuminate\Http\Request $request + * @return \Illuminate\Http\Response + */ + public function store(EstatusServiciosRequest $request) + { + $data = $request->all(); + + try { + $estatus = CatEstatuServicio::create($data); + + return response()->success($estatus); + } catch (\Exception $e) { + return response()->unprocessable('Error', ['Error al guardar el Estatus de Servicio.']); + } + } + + /** + * Display the specified resource. + * + * @param int $id + * @return \Illuminate\Http\Response + */ + public function show($id) + { + $estatus = CatEstatuServicio::where('id', $id) + ->withTrashed() + ->firstOrFail(); + + return response()->success($estatus); + } + + /** + * Update the specified resource in storage. + * + * @param \Illuminate\Http\Request $request + * @param int $id + * @return \Illuminate\Http\Response + */ + public function update(EstatusServiciosRequest $request, $id) + { + $data = $request->all(); + + try { + $estatus = CatEstatuServicio::where('id',$id) + ->withTrashed() + ->firstOrFail(); + + $estatus->update($data); + + return response()->success($estatus); + } catch (\Exception $e) { + return response()->unprocessable('Error', ['Error al actualizar el Estatus de Servicio.']); + } + } + + /** + * Remove the specified resource from storage. + * + * @param int $id + * @return \Illuminate\Http\Response + */ + public function destroy($id, Request $request) + { + $deleted = $request->input('deleted'); + + if($deleted){ + $estatus = CatEstatuServicio::where('id',$id) + ->onlyTrashed() + ->first(); + + $estatus->restore(); + }else{ + $estatus = CatEstatuServicio::findOrFail($id); + $estatus->delete(); + } + + return response()->success(['result' => 'ok']); + } +} diff --git a/app/Http/Controllers/Administrador/FormasPagosController.php b/app/Http/Controllers/Administrador/FormasPagosController.php new file mode 100644 index 0000000..8f79bb8 --- /dev/null +++ b/app/Http/Controllers/Administrador/FormasPagosController.php @@ -0,0 +1,123 @@ +input('deleted'); + $orderBy = $request->input('sortBy','nombre'); + $order = $request->input('order','asc'); + $queryBuilder = CatFormaPago::orderBy($orderBy,$order); + + if($query = $request->get('query',false)){ + $queryBuilder->where(function($q) use ($query){ + $q->where('nombre','like','%' .$query.'%'); + }); + } + + if($deleted) { + $queryBuilder->onlyTrashed(); + } + + if($perPage = $request->input('perPage',false)){ + $forma_pago = $queryBuilder->paginate($perPage); + }else{ + $forma_pago = ['data'=>$queryBuilder->get()]; + } + + return response()->success($forma_pago); + } + + /** + * Store a newly created resource in storage. + * + * @param \Illuminate\Http\Request $request + * @return \Illuminate\Http\Response + */ + public function store(FormasPagosRequest $request) + { + $data = $request->all(); + + try { + $forma_pago = CatFormaPago::create($data); + + return response()->success($forma_pago); + } catch (\Exception $e) { + return response()->unprocessable('Error', ['Error al guardar el Estatus de Servicio.']); + } + } + + /** + * Display the specified resource. + * + * @param int $id + * @return \Illuminate\Http\Response + */ + public function show($id) + { + $forma_pago = CatFormaPago::where('id', $id) + ->withTrashed() + ->firstOrFail(); + + return response()->success($forma_pago); + } + + /** + * Update the specified resource in storage. + * + * @param \Illuminate\Http\Request $request + * @param int $id + * @return \Illuminate\Http\Response + */ + public function update(FormasPagosRequest $request, $id) + { + $data = $request->all(); + + try { + $forma_pago = CatFormaPago::where('id',$id) + ->withTrashed() + ->firstOrFail(); + + $forma_pago->update($data); + + return response()->success($forma_pago); + } catch (\Exception $e) { + return response()->unprocessable('Error', ['Error al actualizar el Estatus de Servicio.']); + } + } + + /** + * Remove the specified resource from storage. + * + * @param int $id + * @return \Illuminate\Http\Response + */ + public function destroy($id, Request $request) + { + $deleted = $request->input('deleted'); + + if($deleted){ + $forma_pago = CatFormaPago::where('id',$id) + ->onlyTrashed() + ->first(); + + $forma_pago->restore(); + }else{ + $forma_pago = CatFormaPago::findOrFail($id); + $forma_pago->delete(); + } + + return response()->success(['result' => 'ok']); + } +} diff --git a/app/Http/Controllers/Administrador/OrigenesController.php b/app/Http/Controllers/Administrador/OrigenesController.php new file mode 100644 index 0000000..c80bcb9 --- /dev/null +++ b/app/Http/Controllers/Administrador/OrigenesController.php @@ -0,0 +1,103 @@ +input('sortBy','nombre'); + $order = $request->input('order','asc'); + + $queryBuilder = CatOrigen::orderBy($orderBy,$order); + + if($query = $request->get('query',false)){ + $queryBuilder->where(function($q) use ($query){ + $q->where('nombre','like','%' .$query.'%'); + }); + } + + if($perPage = $request->input('perPage',false)){ + $data = $queryBuilder->paginate($perPage); + }else{ + $data = ['data'=>$queryBuilder->get()]; + } + + return response()->success($data); + } + + /** + * Show the form for creating a new resource. + * + * @return \Illuminate\Http\Response + */ + public function create() + { + // + } + + /** + * Store a newly created resource in storage. + * + * @param \Illuminate\Http\Request $request + * @return \Illuminate\Http\Response + */ + public function store(Request $request) + { + // + } + + /** + * 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) + { + // + } + + /** + * Update the specified resource in storage. + * + * @param \Illuminate\Http\Request $request + * @param int $id + * @return \Illuminate\Http\Response + */ + public function update(Request $request, $id) + { + // + } + + /** + * Remove the specified resource from storage. + * + * @param int $id + * @return \Illuminate\Http\Response + */ + public function destroy($id) + { + // + } +} diff --git a/app/Http/Controllers/Administrador/RolesController.php b/app/Http/Controllers/Administrador/RolesController.php new file mode 100644 index 0000000..eaa1873 --- /dev/null +++ b/app/Http/Controllers/Administrador/RolesController.php @@ -0,0 +1,175 @@ +input('sortBy','name'); + $order = $request->input('order','asc'); + $queryBuilder = Rol::orderBy($orderBy,$order); + + if($query = $request->get('query',false)){ + $queryBuilder->where(function($q) use ($query){ + $q->where('name','like','%' .$query.'%') + ->orWhere('slug','like','%' .$query.'%'); + }); + } + + if($perPage = $request->input('perPage',false)){ + $users = $queryBuilder->paginate($perPage); + }else{ + $users = ['data'=>$queryBuilder->get()]; + } + + return response()->success($users); + + } + + /** + * Store a newly created resource in storage. + * + * @param \Illuminate\Http\Request $request + * @return \Illuminate\Http\Response + */ + public function store(RolesRequest $request) + { + $data = $request->only([ + 'slug', + 'name', + 'movil', + 'web' + ]); + $existe = Rol::where('slug','=',$data['slug']) + ->where('name','=',$data['name']) + ->first(); + + if($existe){ + return response()->unprocessable('Error', ['El rol ya se encuentra registrado']); + } + + $rol = Rol::create($data); + + $role = Sentinel::findRoleById($rol->id); + + foreach ($request->input('permissions') as $key => $value){ + $role->addPermission($key, ($value == "true")? true : false); + $role->save(); + } + + return response()->success($rol); + } + + /** + * Display the specified resource. + * + * @param int $id + * @return \Illuminate\Http\Response + */ + public function show($id) + { + $role = Sentinel::findRoleById($id); + + $routeCollection = Route::getRoutes(); + foreach ($routeCollection as $value) { + $collection[] = ['name'=>$value->getName()]; + } + $collection = collect($collection); + $sorted = $collection->sortBy('name'); + $sorted->values()->all(); + + $permisos = []; + foreach ($sorted as $value) { + if($value['name']!=''){ + $permisos[$value['name']] = false; + } + } + + $role['permissions'] = collect($permisos) + ->merge($role['permissions']) + ->all(); + //Log::info("roles show"); + //Log::info($role); + return response()->success($role); + } + + + + /** + * Update the specified resource in storage. + * + * @param \Illuminate\Http\Request $request + * @param int $id + * @return \Illuminate\Http\Response + */ + public function update(RolesRequest $request, $id) + { + $rol = Rol::findOrFail($id); + + $data = $request->only(['slug','name','permissions','movil','web']); + + $role = Sentinel::findRoleById($id); + + foreach ($data['permissions'] as $key => $value){ + $role->updatePermission($key, ($value == "true")? true : false); + $role->addPermission($key, ($value == "true")? true : false); + $role->save(); + } + + $rol->slug = $data['slug']; + $rol->name = $data['name']; + $rol->movil = $data['movil']; + $rol->web = $data['web']; + $rol->save(); + + return response()->success($rol); + } + + /** + * Remove the specified resource from storage. + * + * @param int $id + * @return \Illuminate\Http\Response + */ + public function destroy($id) + { + $rol = Rol::findOrFail($id); + $rol->delete(); + + return response()->success(['result'=>true]); + } + + public function rutas(){ + + $routeCollection = Route::getRoutes(); + foreach ($routeCollection as $value) { + $collection[] = ['name'=>$value->getName()]; + } + $collection = collect($collection); + $sorted = $collection->values()->all(); + + $permisos = []; + foreach ($sorted as $value) { + if($value['name']!=''){ + $permisos[$value['name']] = false; + } + } + + return response()->success($permisos); + } +} diff --git a/app/Http/Controllers/Administrador/ServiciosController.php b/app/Http/Controllers/Administrador/ServiciosController.php new file mode 100644 index 0000000..d6f92e0 --- /dev/null +++ b/app/Http/Controllers/Administrador/ServiciosController.php @@ -0,0 +1,124 @@ +input('deleted'); + $orderBy = $request->input('sortBy','nombre'); + $order = $request->input('order','asc'); + $queryBuilder = CatServicio::orderBy($orderBy,$order); + + if($query = $request->get('query',false)){ + $queryBuilder->where(function($q) use ($query){ + $q->where('nombre','like','%' .$query.'%'); + }); + } + + if($deleted) { + $queryBuilder->onlyTrashed(); + } + + if($perPage = $request->input('perPage',false)){ + $servicios = $queryBuilder->paginate($perPage); + }else{ + $servicios = ['data'=>$queryBuilder->get()]; + } + + return response()->success($servicios); + } + + /** + * Store a newly created resource in storage. + * + * @param \Illuminate\Http\Request $request + * @return \Illuminate\Http\Response + */ + public function store(ServiciosRequest $request) + { + $data = $request->all(); + + try { + $servicios = CatServicio::create($data); + + return response()->success($servicios); + } catch (\Exception $e) { + return response()->unprocessable('Error', ['Error al guardar el Estatus de Servicio.']); + } + } + + /** + * Display the specified resource. + * + * @param int $id + * @return \Illuminate\Http\Response + */ + public function show($id) + { + $servicios = CatServicio::where('id', $id) + ->withTrashed() + ->firstOrFail(); + + return response()->success($servicios); + } + + /** + * Update the specified resource in storage. + * + * @param \Illuminate\Http\Request $request + * @param int $id + * @return \Illuminate\Http\Response + */ + public function update(ServiciosRequest $request, $id) + { + $data = $request->all(); + + try { + $servicios = CatServicio::where('id',$id) + ->withTrashed() + ->firstOrFail(); + + $servicios->update($data); + + return response()->success($servicios); + } catch (\Exception $e) { + return response()->unprocessable('Error', ['Error al actualizar el Estatus de Servicio.']); + } + } + + /** + * Remove the specified resource from storage. + * + * @param int $id + * @return \Illuminate\Http\Response + */ + public function destroy($id, Request $request) + { + $deleted = $request->input('deleted'); + + if($deleted){ + $servicios = CatServicio::where('id',$id) + ->onlyTrashed() + ->first(); + + $servicios->restore(); + }else{ + $servicios = CatServicio::findOrFail($id); + $servicios->delete(); + } + + return response()->success(['result' => 'ok']); + } +} diff --git a/app/Http/Controllers/Administrador/SucursalesController.php b/app/Http/Controllers/Administrador/SucursalesController.php new file mode 100644 index 0000000..81e2b96 --- /dev/null +++ b/app/Http/Controllers/Administrador/SucursalesController.php @@ -0,0 +1,127 @@ +input('deleted'); + $orderBy = $request->input('sortBy','nombre'); + $order = $request->input('order','asc'); + $queryBuilder = Sucursal::orderBy($orderBy,$order); + + if($query = $request->get('query',false)){ + $queryBuilder->where(function($q) use ($query){ + $q->where('nombre','like','%' .$query.'%'); + }); + } + + if($deleted) { + $queryBuilder->onlyTrashed(); + } + + if($perPage = $request->input('perPage',false)){ + $sucursal = $queryBuilder->paginate($perPage); + }else{ + $sucursal = ['data'=>$queryBuilder->get()]; + } + + return response()->success($sucursal); + } + + /** + * Store a newly created resource in storage. + * + * @param \Illuminate\Http\Request $request + * @return \Illuminate\Http\Response + */ + public function store(SucursalesRequest $request) + { + $data = $request->all(); + + try { + $sucursal = Sucursal::create($data); + + return response()->success($sucursal); + } catch (\Exception $e) { + return response()->unprocessable('Error', ['Error al guardar la sucursal.']); + } + } + + /** + * Display the specified resource. + * + * @param int $id + * @return \Illuminate\Http\Response + */ + public function show($id) + { + $sucursal = Sucursal::where('id', $id) + ->withTrashed() + ->firstOrFail(); + + return response()->success($sucursal); + } + + /** + * Update the specified resource in storage. + * + * @param \Illuminate\Http\Request $request + * @param int $id + * @return \Illuminate\Http\Response + */ + public function update(SucursalesRequest $request, $id) + { + $data = $request->all(); + + try { + $sucursal = Sucursal::where('id',$id) + ->withTrashed() + ->firstOrFail(); + + $sucursal->update($data); + + return response()->success($sucursal); + } catch (\Exception $e) { + return response()->unprocessable('Error', ['Error al actualizar la sucursal.']); + } + } + + /** + * Remove the specified resource from storage. + * + * @param int $id + * @return \Illuminate\Http\Response + */ + public function destroy($id, Request $request) + { + $deleted = $request->input('deleted'); + + if($deleted){ + $sucursal = Sucursal::where('id',$id) + ->onlyTrashed() + ->first(); + + $sucursal->restore(); + }else{ + $sucursal = Sucursal::findOrFail($id); + $sucursal->delete(); + + VehiculoSucursal::where('sucursal_id', $id)->delete(); + } + + return response()->success(['result' => 'ok']); + } +} diff --git a/app/Http/Controllers/Administrador/TiposServiciosController.php b/app/Http/Controllers/Administrador/TiposServiciosController.php new file mode 100644 index 0000000..8f83997 --- /dev/null +++ b/app/Http/Controllers/Administrador/TiposServiciosController.php @@ -0,0 +1,124 @@ +input('deleted'); + $orderBy = $request->input('sortBy','nombre'); + $order = $request->input('order','asc'); + $queryBuilder = CatTipoServicio::orderBy($orderBy,$order); + + if($query = $request->get('query',false)){ + $queryBuilder->where(function($q) use ($query){ + $q->where('nombre','like','%' .$query.'%'); + }); + } + + if($deleted) { + $queryBuilder->onlyTrashed(); + } + + if($perPage = $request->input('perPage',false)){ + $tipos_servicios = $queryBuilder->paginate($perPage); + }else{ + $tipos_servicios = ['data'=>$queryBuilder->get()]; + } + + return response()->success($tipos_servicios); + } + + /** + * Store a newly created resource in storage. + * + * @param \Illuminate\Http\Request $request + * @return \Illuminate\Http\Response + */ + public function store(TiposServiciosRequest $request) + { + $data = $request->all(); + + try { + $tipos_servicios = CatTipoServicio::create($data); + + return response()->success($tipos_servicios); + } catch (\Exception $e) { + return response()->unprocessable('Error', ['Error al guardar el Estatus de Servicio.']); + } + } + + /** + * Display the specified resource. + * + * @param int $id + * @return \Illuminate\Http\Response + */ + public function show($id) + { + $tipos_servicios = CatTipoServicio::where('id', $id) + ->withTrashed() + ->firstOrFail(); + + return response()->success($tipos_servicios); + } + + /** + * Update the specified resource in storage. + * + * @param \Illuminate\Http\Request $request + * @param int $id + * @return \Illuminate\Http\Response + */ + public function update(TiposServiciosRequest $request, $id) + { + $data = $request->all(); + + try { + $tipos_servicios = CatTipoServicio::where('id',$id) + ->withTrashed() + ->firstOrFail(); + + $tipos_servicios->update($data); + + return response()->success($tipos_servicios); + } catch (\Exception $e) { + return response()->unprocessable('Error', ['Error al actualizar el Estatus de Servicio.']); + } + } + + /** + * Remove the specified resource from storage. + * + * @param int $id + * @return \Illuminate\Http\Response + */ + public function destroy($id, Request $request) + { + $deleted = $request->input('deleted'); + + if($deleted){ + $tipos_servicios = CatTipoServicio::where('id',$id) + ->onlyTrashed() + ->first(); + + $tipos_servicios->restore(); + }else{ + $tipos_servicios = CatTipoServicio::findOrFail($id); + $tipos_servicios->delete(); + } + + return response()->success(['result' => 'ok']); + } +} diff --git a/app/Http/Controllers/Administrador/TiposVehiculosController.php b/app/Http/Controllers/Administrador/TiposVehiculosController.php new file mode 100644 index 0000000..bb49019 --- /dev/null +++ b/app/Http/Controllers/Administrador/TiposVehiculosController.php @@ -0,0 +1,111 @@ +input('deleted'); + $orderBy = $request->input('sortBy','nombre'); + $order = $request->input('order','asc'); + $queryBuilder = TipoVehiculo::orderBy($orderBy,$order); + + if($query = $request->get('query',false)){ + $queryBuilder->where(function($q) use ($query){ + $q->where('nombre','like','%' .$query.'%'); + }); + } + + if($deleted) { + $queryBuilder->onlyTrashed(); + } + + if($perPage = $request->input('perPage',false)){ + $tipo_vehiculo = $queryBuilder->paginate($perPage); + }else{ + $tipo_vehiculo = ['data'=>$queryBuilder->get()]; + } + + return response()->success($tipo_vehiculo); + } + + /** + * Store a newly created resource in storage. + * + * @param \Illuminate\Http\Request $request + * @return \Illuminate\Http\Response + */ + public function store(TiposVehiculosRequest $request) + { + $data = $request->all(); + + try { + $tipo_vehiculo = TipoVehiculo::create($data); + + return response()->success($tipo_vehiculo); + } catch (\Exception $e) { + Log::info($e->getMessage()); + return response()->unprocessable('Error', ['Error al guardar el Tipo de Vehiculo.']); + } + } + + /** + * Display the specified resource. + * + * @param int $id + * @return \Illuminate\Http\Response + */ + public function show($id) + { + $tipo_vehiculo = TipoVehiculo::where('id', $id) + ->withTrashed() + ->firstOrFail(); + + return response()->success($tipo_vehiculo); + } + + /** + * Update the specified resource in storage. + * + * @param \Illuminate\Http\Request $request + * @param int $id + * @return \Illuminate\Http\Response + */ + public function update(TiposVehiculosRequest $request, $id) + { + $data = $request->all(); + + try { + $tipo_vehiculo = TipoVehiculo::where('id',$id) + ->withTrashed() + ->firstOrFail(); + + $tipo_vehiculo->update($data); + + return response()->success($tipo_vehiculo); + } catch (\Exception $e) { + return response()->unprocessable('Error', ['Error al guardar el Tipo de Vehiculo.']); + } + } + + /** + * Remove the specified resource from storage. + * + * @param int $id + * @return \Illuminate\Http\Response + */ + public function destroy($id) + { + // + } +} diff --git a/app/Http/Controllers/Administrador/UsersController.php b/app/Http/Controllers/Administrador/UsersController.php new file mode 100644 index 0000000..702c2b8 --- /dev/null +++ b/app/Http/Controllers/Administrador/UsersController.php @@ -0,0 +1,216 @@ +input('deleted'); + $orderBy = $request->input('sortBy','users.nombre'); + $order = $request->input('order','asc'); + $queryBuilder = User::select('users.*', DB::raw("coalesce (roles.name, '') as role"), 'roles.id as role_id', 'tipos_empleados.nombre as tipo_empleado', 'tipos_empleados.id as tipo_empleado_id', 'sucursales.id as sucursal_id', 'sucursales.nombre as sucursal') + ->orderBy($orderBy,$order) + ->leftJoin('role_users', 'role_users.user_id', '=', 'users.id') + ->leftJoin('roles', 'roles.id', '=', 'role_users.role_id') + ->join('sucursales', 'sucursales.id', '=', 'users.sucursal_id') + ->join('tipos_empleados', 'tipos_empleados.id', '=', 'users.tipo_empleado_id') + ->where('users.sucursal_id', $user->sucursal_id); + + if($query = $request->get('query',false)){ + $queryBuilder->where(function($q) use ($query){ + $q->where('users.email','like','%' .$query.'%') + ->orWhere('users.nombre','like','%' .$query.'%') + ->orWhere('users.apellido_paterno','like','%' .$query.'%') + ->orWhere('users.apellido_materno','like','%' .$query.'%') + ->orWhere('users.telefono','like','%' .$query.'%'); + }); + } + + if($deleted) { + $queryBuilder->onlyTrashed(); + } + + if($perPage = $request->input('perPage',false)){ + $users = $queryBuilder->paginate($perPage); + }else{ + $users = ['data'=>$queryBuilder->get()]; + } + + return response()->success($users); + } + + /** + * Store a newly created resource in storage. + * + * @param \Illuminate\Http\Request $request + * @return \Illuminate\Http\Response + */ + public function store(UserRequest $request) + { + $data = $request->all(); + + DB::beginTransaction(); + try { + + $tipo = TipoEmpleado::where('id', $data['tipo_empleado_id'])->first(); + if($tipo->login){ + $data['password'] = bcrypt($data['password']); + }else{ + $data['password'] = bcrypt(PASSWORD); + } + + $user = User::create($data); + + $user_sentinel = Sentinel::findById($user->id); + $role = Sentinel::findRoleById($data['role_id']); + $role->users()->attach($user_sentinel); + + DB::commit(); + + return response()->success($user); + } catch (\Exception $e) { + DB::rollBack(); + return response()->unprocessable('Error', ['Error al guardar el usuario.']); + } + } + + /** + * Display the specified resource. + * + * @param int $id + * @return \Illuminate\Http\Response + */ + public function show($id) + { + $user = User::select('users.*', 'roles.name as role', 'roles.id as role_id', 'tipos_empleados.nombre as tipo_empleado', 'tipos_empleados.id as tipo_empleado_id', 'sucursales.id as sucursal_id', 'sucursales.nombre as sucursal') + ->leftJoin('role_users', 'role_users.user_id', '=', 'users.id') + ->leftJoin('roles', 'roles.id', '=', 'role_users.role_id') + ->join('tipos_empleados', 'tipos_empleados.id', '=', 'users.tipo_empleado_id') + ->join('sucursales', 'sucursales.id', '=', 'users.sucursal_id') + ->where('users.id', $id) + ->withTrashed() + ->firstOrFail(); + + return response()->success($user); + } + + /** + * Update the specified resource in storage. + * + * @param \Illuminate\Http\Request $request + * @param int $id + * @return \Illuminate\Http\Response + */ + public function update(UserRequest $request, $id) + { + $data = $request->all(); + + DB::beginTransaction(); + try { + + if(trim($data['password']) != ''){ + $data['password'] = bcrypt($data['password']); + }else{ + $data = collect($data)->forget('password')->all(); + } + + $user = User::where('id',$id) + ->withTrashed() + ->firstOrFail(); + + $user->update($data); + + RolUser::where('user_id', $id) + ->update(['role_id' => $data['role_id']]); + + DB::commit(); + + return response()->success($user); + } catch (\Exception $e) { + DB::rollBack(); + return response()->unprocessable('Error', ['Error al actualizar el usuario.']); + } + } + + /** + * Remove the specified resource from storage. + * + * @param int $id + * @return \Illuminate\Http\Response + */ + public function destroy($id, Request $request) + { + $deleted = $request->input('deleted'); + + if($deleted){ + $user = User::where('id',$id) + ->onlyTrashed() + ->first(); + + $user->restore(); + }else{ + $user = User::findOrFail($id); + $user->delete(); + } + + return response()->success(['result' => 'ok']); + } + + public function tiposEmpleados(){ + + $tipos_empleados = TipoEmpleado::get(); + + return response()->success($tipos_empleados); + } + + public function sucursales(Request $request){ + + $orderBy = $request->input('sortBy','nombre'); + $order = $request->input('order','asc'); + + $queryBuilder = Sucursal::orderBy($orderBy,$order); + + if($query = $request->get('query',false)){ + $queryBuilder->where(function($q) use ($query){ + $q->where('nombre','like','%' .$query.'%'); + }); + } + + if($perPage = $request->input('perPage',false)){ + $data = $queryBuilder->paginate($perPage); + }else{ + $data = ['data'=>$queryBuilder->get()]; + } + + return response()->success($data); + } + + public function filtrosUsuarios(){ + $sucursales = Sucursal::get(); + $tipos_empleados = TipoEmpleado::get(); + $roles = Rol::get(); + + return response()->success(compact('sucursales', 'tipos_empleados', 'roles')); + } +} diff --git a/app/Http/Controllers/Administrador/VehiculosController.php b/app/Http/Controllers/Administrador/VehiculosController.php new file mode 100644 index 0000000..5fc4bb8 --- /dev/null +++ b/app/Http/Controllers/Administrador/VehiculosController.php @@ -0,0 +1,214 @@ +input('deleted'); + $orderBy = $request->input('sortBy','id'); + $order = $request->input('order','asc'); + $queryBuilder = Vehiculo::select('cat_vehiculos.*', 'cat_tipos_vehiculos.nombre as tipo_vehiculo') + ->join('cat_tipos_vehiculos', 'cat_tipos_vehiculos.id', '=', 'cat_vehiculos.tipo_vehiculo_id') + ->join('vehiculos_sucursales', 'vehiculos_sucursales.vehiculo_id', '=', 'cat_vehiculos.id') + ->where('vehiculos_sucursales.sucursal_id', $user->sucursal_id) + ->orderBy($orderBy,$order); + + if($query = $request->get('query',false)){ + $queryBuilder->where(function($q) use ($query){ + $q->where('num_economico','like','%' .$query.'%') + ->orWhere('cat_tipos_vehiculos.nombre','like','%' .$query.'%'); + }); + } + + if($deleted) { + $queryBuilder->onlyTrashed(); + } + + if($perPage = $request->input('perPage',false)){ + $data = $queryBuilder->paginate($perPage); + foreach ($data->items() as $vehiculo){ + $vehiculo->sucursales = VehiculoSucursal::select('sucursales.id as sucursal_id', 'sucursales.nombre as sucursal') + ->where('vehiculo_id', $vehiculo->id) + ->join('sucursales', 'sucursales.id', '=', 'vehiculos_sucursales.sucursal_id') + ->get(); + } + + $vehiculo = $data; + }else{ + $data = $queryBuilder->get(); + foreach ($data as $vehiculo){ + $vehiculo->sucursales = VehiculoSucursal::select('sucursales.id as sucursal_id', 'sucursales.nombre as sucursal') + ->where('vehiculo_id', $vehiculo->id) + ->join('sucursales', 'sucursales.id', '=', 'vehiculos_sucursales.sucursal_id') + ->get(); + } + + $vehiculo = ['data'=>$data]; + } + + return response()->success($vehiculo); + } + + /** + * Store a newly created resource in storage. + * + * @param \Illuminate\Http\Request $request + * @return \Illuminate\Http\Response + */ + public function store(VehiculosRequest $request) + { + $data = $request->all(); + + foreach ($data['sucursales'] as $s){ + if(!Sucursal::where('id', $s)->first()){ + return response()->unprocessable('Error', ['No se encuentra la sucursal ingresada.']); + } + } + + DB::beginTransaction(); + try { + $vehiculo = Vehiculo::create($data); + + foreach ($data['sucursales'] as $s){ + VehiculoSucursal::create(['vehiculo_id' => $vehiculo->id, 'sucursal_id' => $s]); + } + + DB::commit(); + + return response()->success($vehiculo); + } catch (\Exception $e) { + DB::rollBack(); + return response()->unprocessable('Error', ['Error al guardar el Estatus de Servicio.']); + } + } + + /** + * Display the specified resource. + * + * @param int $id + * @return \Illuminate\Http\Response + */ + public function show($id) + { + $vehiculo = Vehiculo::select('cat_vehiculos.*', 'cat_tipos_vehiculos.nombre as tipo_vehiculo') + ->where('cat_vehiculos.id', $id) + ->join('cat_tipos_vehiculos', 'cat_tipos_vehiculos.id', '=', 'cat_vehiculos.tipo_vehiculo_id') + ->withTrashed() + ->firstOrFail(); + + $vehiculo->sucursales = VehiculoSucursal::select('sucursales.id as sucursal_id', 'sucursales.nombre as sucursal') + ->where('vehiculo_id', $vehiculo->id) + ->join('sucursales', 'sucursales.id', '=', 'vehiculos_sucursales.sucursal_id') + ->get(); + + return response()->success($vehiculo); + } + + /** + * Update the specified resource in storage. + * + * @param \Illuminate\Http\Request $request + * @param int $id + * @return \Illuminate\Http\Response + */ + public function update(VehiculosRequest $request, $id) + { + $data = $request->all(); + + DB::beginTransaction(); + try { + $vehiculo = Vehiculo::where('id',$id) + ->withTrashed() + ->firstOrFail(); + + $vehiculo->update($data); + + VehiculoSucursal::where('vehiculo_id', $id)->delete(); + + foreach ($data['sucursales'] as $s){ + VehiculoSucursal::create(['vehiculo_id' => $vehiculo->id, 'sucursal_id' => $s]); + } + + DB::commit(); + return response()->success($vehiculo); + } catch (\Exception $e) { + DB::rollBack(); + return response()->unprocessable('Error', ['Error al actualizar el Estatus de Servicio.']); + } + } + + /** + * Remove the specified resource from storage. + * + * @param int $id + * @return \Illuminate\Http\Response + */ + public function destroy($id, Request $request) + { + $deleted = $request->input('deleted'); + + if($deleted){ + $vehiculo = Vehiculo::where('id',$id) + ->onlyTrashed() + ->first(); + + $vehiculo->restore(); + }else{ + $vehiculo = Vehiculo::findOrFail($id); + $vehiculo->delete(); + + VehiculoSucursal::where('vehiculo_id', $id)->delete(); + } + + return response()->success(['result' => 'ok']); + } + + public function sucursales(){ + + $sucursales = Sucursal::get(); + + return response()->success($sucursales); + } + + public function tiposVehiculos(Request $request){ + + $orderBy = $request->input('sortBy','nombre'); + $order = $request->input('order','asc'); + + $queryBuilder = TipoVehiculo::orderBy($orderBy,$order); + + if($query = $request->get('query',false)){ + $queryBuilder->where(function($q) use ($query){ + $q->where('nombre','like','%' .$query.'%'); + }); + } + + if($perPage = $request->input('perPage',false)){ + $data = $queryBuilder->paginate($perPage); + }else{ + $data = ['data'=>$queryBuilder->get()]; + } + + return response()->success($data); + } +} diff --git a/app/Http/Controllers/AtencionClientes/EncuestasController.php b/app/Http/Controllers/AtencionClientes/EncuestasController.php new file mode 100644 index 0000000..09f0dd5 --- /dev/null +++ b/app/Http/Controllers/AtencionClientes/EncuestasController.php @@ -0,0 +1,110 @@ +join('cat_servicios', 'servicios_det.servicio_id', '=', 'cat_servicios.id') + ->leftJoin('servicios_progreso', 'servicios_det.id','=','servicios_progreso.servicio_det_id') + ->where('servicios_det.id', $servicio_id) + ->firstOrFail(); + + $servicio = ServicioEnc::select('clientes.denominacion', 'clientes_domicilios.nombre_responsable_sucursal as contacto') + ->join('clientes', 'servicios_enc.cliente_id', '=', 'clientes.id') + ->join('clientes_domicilios', 'servicios_enc.cliente_domicilio_id', '=', 'clientes_domicilios.id') + ->where('servicios_enc.id', $servicio_det->servicio_enc_id) + ->first(); + + if($servicio_det->tipo_servicio_id == DOMESTICO){ + $encuesta = ServicioEncuestaDomestico::select('servicios_encuestas_domestico.*', 'respuestas_domestico.puntuacion', 'respuestas_domestico.tipo_campo') + ->leftJoin('respuestas_domestico','servicios_encuestas_domestico.respuesta_id', '=', 'respuestas_domestico.id') + ->where('servicios_encuestas_domestico.servicio_det_id', $servicio_id) + ->get(); + + $nombre_cliente = $servicio->denominacion; + $servicio_evaluado = $servicio_det->servicio_evaluado; + $fecha = $servicio_det->fecha_solicitud; + $firma = $servicio_det->firma; + }else{ + $encuesta = ServicioEncuestaEmpresarial::select('servicios_encuestas_empresarial.*', 'respuestas_empresarial.puntuacion', 'respuestas_empresarial.tipo_campo') + ->leftJoin('respuestas_empresarial', 'servicios_encuestas_empresarial.respuesta_id', '=', 'respuestas_empresarial.id') + ->where('servicios_encuestas_empresarial.servicio_det_id', $servicio_id) + ->get(); + + $empresa = $servicio->denominacion; + $contacto = $servicio->contacto; + $servicio_evaluado = $servicio_det->servicio_evaluado; + $fecha = $servicio_det->fecha_solicitud; + $firma = $servicio_det->firma; + } + $preguntas = []; + if($servicio_det->requiere_encuesta && count($encuesta) > 0) { + + $result_collect = collect($encuesta)->where('tipo_campo', '=', 'Checkbox'); + $count = $result_collect->count(); + $sum = $result_collect->sum('puntuacion'); + $puntuacion = $sum / $count; + + $preguntas_id = collect($encuesta)->pluck('pregunta_id'); + + $orden = 1; + + if ($servicio_det->tipo_servicio_id == DOMESTICO) { + $preguntas = PreguntaDomestico::withTrashed()->whereIn('id',$preguntas_id)->orderBy('orden', 'asc')->get(); + + foreach ($preguntas as $eD){ + $eD->respuestas = RespuestaDomestico::withTrashed()->where('pregunta_id', $eD->id) + ->get(); + + $eD->orden = $orden++; + } + }else{ + $preguntas = PreguntaEmpresarial::withTrashed()->whereIn('id',$preguntas_id)->orderBy('orden', 'asc')->get(); + + foreach ($preguntas as $eE){ + $eE->respuestas = RespuestaEmpresarial::withTrashed()->where('pregunta_id', $eE->id) + ->get(); + $eE->orden = $orden++; + } + } + + foreach ($preguntas as $p){ + foreach ($p->respuestas as $r){ + foreach ($encuesta as $e){ + if($r->pregunta_id == $e->pregunta_id){ + if($r->id == $e->respuesta_id && $r->tipo_campo == 'Checkbox'){ + $r->seleccionado = 1; + }else{ + $r->seleccionado = ($r->tipo_campo == 'Checkbox')? 0 : null; + } + $r->respuesta = ($e->respuesta)? $e->respuesta : null; + } + } + } + } + } + + $puntuacion = round($puntuacion, 2); + + return response()->success(compact('empresa', 'contacto', 'nombre_cliente', 'servicio_evaluado', 'fecha', 'firma', 'preguntas', 'puntuacion')); + } +} diff --git a/app/Http/Controllers/AtencionClientes/ServiciosController.php b/app/Http/Controllers/AtencionClientes/ServiciosController.php new file mode 100644 index 0000000..a1c182e --- /dev/null +++ b/app/Http/Controllers/AtencionClientes/ServiciosController.php @@ -0,0 +1,1457 @@ +input('deleted'); + $orderBy = $request->input('sortBy', 'servicios_det.fecha_solicitud'); + $order = $request->input('order', 'ASC'); + $user = Auth::user(); + + $campos = [ + 'servicios_progreso.id as progreso_solicitud_id', + 'servicios_enc.id as solicitud_servicio_id', + 'servicios_enc.forma_pago_id', + 'cat_formas_pagos.nombre as forma_pago_nombre', + 'cat_formas_pagos.zeros as forma_pago_zeros', + 'fecha_agenda', + 'usuario_agenda_id', + 'users.nombre as usuario_agenda_nombre', + 'users.apellido_paterno as usuario_agenda_apellido_paterno', + 'users.apellido_materno as usuario_agenda_apellido_materno', + 'servicios_enc.cliente_id', + 'clientes.denominacion', + 'servicios_enc.cliente_domicilio_id', + 'clientes_domicilios.nombre_responsable_sucursal as clientes_nombre_responsable_sucursal', + 'clientes_domicilios.celular_responsable as clientes_celular_responsable', + 'clientes_domicilios.calle as clientes_calle', + 'clientes_domicilios.num_ext as clientes_num_ext', + 'clientes_domicilios.num_int as clientes_num_int', + 'clientes_domicilios.colonia as clientes_colonia', + 'clientes_domicilios.cp as clientes_cp', + 'clientes_domicilios.telefono as clientes_telefono', + 'clientes_domicilios.lat as clientes_lat', + 'clientes_domicilios.lng as clientes_lng', + 'servicios_enc.deleted_at', + 'servicios_det.id', + 'servicios_det.servicio_id', + 'cat_servicios.nombre as servicio_nombre', + 'servicios_det.estatus_servicio_id', + 'cat_estatus_servicios.nombre as estatus_servicio_nombre', + 'servicios_det.tipo_servicio_id', + 'cat_tipos_servicios.nombre as tipo_servicio_nombre', + 'cat_estatus_servicios.color_1 as estatus_servicio_color_1', + 'cat_estatus_servicios.color_2 as estatus_servicio_color_2', + 'fecha_solicitud', + 'servicios_det.duracion', + 'definido_cliente', + 'servicios_det.operador_id', + 'operador.nombre as operador_nombre', + 'operador.apellido_paterno as operador_apellido_paterno', + 'operador.apellido_materno as operador_apellido_materno', + 'servicios_det.vehiculo_id', + 'cat_vehiculos.num_economico as vehiculo_num_economico', + 'servicios_det.fecha_solicitud', + 'sucursales.nombre as vehiculo_sucursal', + 'sucursales.id as vehiculo_sucursal_id', + 'sucursal_operador.nombre as operador_sucursal', + 'sucursal_operador.id as operador_sucursal_id', + 'servicios_det.auxiliar_1 as auxiliar_1_id', + 'servicios_det.auxiliar_2 as auxiliar_2_id', + 'auxiliares_1.nombre as auxiliar_1', + 'auxiliares_2.nombre as auxiliar_2', + 'sucursal_auxiliares_1.nombre as sucursal_auxiliar_1', + 'sucursal_auxiliares_2.nombre as sucursal_auxiliar_2', + 'servicios_det.costo_servicio', + 'servicios_det.aceptado', + 'servicios_det.observacion_atencion_cliente', + 'servicios_det.requiere_encuesta', + 'servicios_progreso.litraje', + 'servicios_det.facturado', + 'cat_motivos_estatus.nombre as motivo_estatus', + DB::raw("IF(encuesta_contestada = 1, 1, 0) 'encuesta_contestada'") + ]; + + $queryBuilder = ServicioDet::select($campos) + ->joinDetalleServicioDet() + ->join('servicios_enc', 'servicios_enc.id', '=', 'servicios_det.servicio_enc_id') + ->join('cat_formas_pagos', 'cat_formas_pagos.id', '=', 'servicios_enc.forma_pago_id') + ->join('users', 'users.id', '=', 'servicios_enc.usuario_agenda_id') + ->join('clientes', 'clientes.id', '=', 'servicios_enc.cliente_id') + ->join('clientes_domicilios', 'clientes_domicilios.id', '=', 'servicios_enc.cliente_domicilio_id') + ->leftJoin('servicios_progreso', 'servicios_progreso.servicio_det_id', '=', 'servicios_det.id') + ->leftJoin('cat_motivos_estatus', 'cat_motivos_estatus.id', '=', 'servicios_det.cat_motivos_estatus_id') + ->where('servicios_enc.sucursal_id', $user->sucursal_id) + ->orderBy($orderBy, $order); + + if ($estatus_servicio = $request->get('estatus_servicio', false)) { + $queryBuilder->where('servicios_det.estatus_servicio_id', $estatus_servicio); + } + + if ($fecha = $request->get('fecha', false)) { + $queryBuilder->whereDate('servicios_det.fecha_solicitud', $fecha); + } + + if ($query = $request->get('query', false)) { + $queryBuilder->where(function ($q) use ($query) { + $q->where('servicios_enc.id', 'like', '%' . $query . '%') + ->orWhere('operador.nombre', 'like', '%' . $query . '%') + ->orWhere('operador.apellido_paterno', 'like', '%' . $query . '%') + ->orWhere('operador.apellido_materno', 'like', '%' . $query . '%') + ->orWhere('clientes.denominacion', 'like', '%' . $query . '%') + ->orWhere('clientes_domicilios.colonia', 'like', '%' . $query . '%') + ->orWhere('clientes_domicilios.telefono', 'like', '%' . $query . '%') + ->orWhere('clientes_domicilios.celular_responsable', 'like', '%' . $query . '%') + ->orWhere('cat_formas_pagos.nombre', 'like', '%' . $query . '%') + ->orWhere('cat_estatus_servicios.nombre', 'like', '%' . $query . '%'); + }); + } + + if ($deleted) { + $queryBuilder->onlyTrashed(); + } + + if ($perPage = $request->input('perPage', false)) { + + $data = $queryBuilder->paginate($perPage); + foreach ($data->items() as $servicio) { + $servicio->cantidad_servicios = ServicioDet::where('servicio_enc_id', $servicio->solicitud_servicio_id) + ->count(); + + $iniciado = ServicioProgreso::where('servicio_enc_id', $servicio->solicitud_servicio_id) + ->where('servicio_det_id', $servicio->id) + ->first(); + + $servicio->iniciado = ($iniciado) ? 1 : 0; + + $servicio->tiempo_atencion = $this->diferenciaFechas($servicio->fecha_agenda, $servicio->fecha_solicitud); + } + + $servicios = $data; + } else { + $data = $queryBuilder->get(); + foreach ($data as $servicio) { + $servicio->cantidad_servicios = ServicioDet::where('servicio_enc_id', $servicio->solicitud_servicio_id) + ->count(); + + $iniciado = ServicioProgreso::where('servicio_enc_id', $servicio->solicitud_servicio_id) + ->where('servicio_det_id', $servicio->id) + ->first(); + + $servicio->iniciado = ($iniciado) ? 1 : 0; + + $servicio->tiempo_atencion = $this->diferenciaFechas($servicio->fecha_agenda, $servicio->fecha_solicitud); + } + + $servicios = ['data' => $data]; + } + + return response()->success($servicios); + } + + /** + * Store a newly created resource in storage. + * + * @param \Illuminate\Http\Request $request + * @return \Illuminate\Http\Response + */ + public function store(ServiciosRequest $request) + { + ini_set('default_socket_timeout', 10800); + ini_set('memory_limit', '-1'); + set_time_limit(0); + + $data = $request->all(); + $data_servicios = $data['servicios']; + $user = Auth::user(); + + DB::beginTransaction(); + try { + $data['fecha_agenda'] = Carbon::now()->toDateTimeString(); + $data['usuario_agenda_id'] = $user->id; + $data['sucursal_id'] = $user->sucursal_id; + $servicio = ServicioEnc::create($data); + + $now = Carbon::now()->format('Y-m-d'); + + foreach ($data_servicios as $servicios) { + + $contain_aux_1 = array_key_exists('auxiliar_1', $servicios); + $contain_aux_2 = array_key_exists('auxiliar_2', $servicios); + $fecha_solicitada = Carbon::createFromTimeString($servicios['fecha_solicitud'])->format('Y-m-d'); + + if ($fecha_solicitada < $now) { + DB::rollBack(); + return response()->unprocessable('Error', ['La fecha de solicitud no puede ser anterior a la actual']); + } + + if ($contain_aux_1 && $contain_aux_2) { + if ($servicios['auxiliar_1'] == $servicios['auxiliar_2']) { + + $aux = User::where('id', $servicios['auxiliar_1'])->first(); + + $error_aux = ["El auxiliar: '" . $aux->nombre . " " . $aux->apellido_paterno . " " . $aux->apellido_materno . "' no está disponible."]; + + DB::rollBack(); + return response()->unprocessable('Error', $error_aux); + } + } + + $servicios_data = $servicios; + $servicios_data['servicio_det_id'] = ''; + $validacion = $this->validarOperadorVehiculoLocal($servicios_data); + + if (count($validacion) > 0) { + DB::rollBack(); + return response()->unprocessable('Error', $validacion[0]); + } + + //Comentado por rechazo del cliente + /*if($fecha_solicitada != $now){ + $servicios['aceptado'] = 1; + }*/ + + $servicios['aceptado'] = 1; + + $servicio->servicios()->create($servicios); + } + + $dservicios = ServicioDet::where('servicio_enc_id', $servicio->id)->get(); + + $correos = []; + $correo_cliente = Cliente::select('email')->where('id', $servicio->cliente_id)->first(); + $correo_cliente_domicilio = ClienteDomicilio::select('email')->where('id', $servicio->cliente_domicilio_id)->first(); + + if ($correo_cliente && $correo_cliente->email) { + array_push($correos, $correo_cliente->email); + } + if ($correo_cliente_domicilio && $correo_cliente_domicilio->email) { + array_push($correos, $correo_cliente_domicilio->email); + } + + /* foreach ($dservicios as $servicios){ + if((count($correos) > 0) && ($servicios->estatus_servicio_id == PENDIENTE || $servicios->estatus_servicio_id == REPROGRAMADO || $servicios->estatus_servicio_id == VISITA || $servicios['estatus_servicio_id'] == PAGADO)){ + Mail::to($correos)->send(new SolicitudServicio($servicios->id)); + } + }*/ + + foreach ($dservicios as $servicios) { + $fecha_solicitada = Carbon::createFromTimeString($servicios->fecha_solicitud)->format('Y-m-d'); + + //Envio de notificacion + $usuario = User::where('id', $servicios->operador_id)->first(); + + if (Carbon::parse($usuario->last_login)->isToday() && ($usuario->token_firebase && $fecha_solicitada == $now) && ($servicios->estatus_servicio_id == PENDIENTE || $servicios->estatus_servicio_id == REPROGRAMADO || $servicios->estatus_servicio_id == VISITA || $servicios['estatus_servicio_id'] == PAGADO)) { + + if (!$this->enviarNotificacion($servicios, $usuario)) { + DB::rollBack(); + return response()->unprocessable('Error', ['Error al actualizar el Servicio.']); + } + } + } + + DB::commit(); + + return response()->success(['result' => 'ok']); + } catch (\Exception $e) { + DB::rollBack(); + Log::info($e); + return response()->unprocessable('Error', ['Error al guardar el Servicio.']); + } + } + + private function validarOperadorVehiculoLocal($data) + { + + $fecha_solicitada = $data['fecha_solicitud']; + list($h, $m) = explode(":", $data['duracion']); + $fecha_solicitada_duracion = Carbon::createFromTimeString($data['fecha_solicitud']) + ->addHour($h) + ->addMinutes($m) + ->toDateTimeString(); + + $fecha_solicitud = Carbon::createFromTimeString($data['fecha_solicitud'])->format('Y-m-d'); + + /*if(is_numeric($data['servicio_det_id'])){ + + $servicios = ServicioDet::select("servicios_det.*", + DB::raw("CASE WHEN (fecha_solicitud>='$fecha_solicitada' OR ADDTIME(fecha_solicitud, duracion)<='$fecha_solicitada') AND + (fecha_solicitud>='$fecha_solicitada_duracion' OR ADDTIME(fecha_solicitud, duracion)<='$fecha_solicitada_duracion') + THEN 'DISPONIBLE' ELSE 'NO_DISPONIBLE' END AS validacion_1"), + DB::raw("CASE WHEN (fecha_solicitud='$fecha_solicitada' AND ADDTIME(fecha_solicitud, duracion)='$fecha_solicitada_duracion') + THEN 'NO_DISPONIBLE' ELSE null END AS validacion_2")) + ->whereDate('fecha_solicitud', $fecha_solicitud) + //->whereDate('fecha_solicitud', Carbon::now()->format('Y-m-d')) + ->where('id', '<>', $data['servicio_det_id']) + ->whereIn('estatus_servicio_id',[PENDIENTE,REPROGRAMADO,PAGADO,VISITA]) + ->get(); + }else{ + $servicios = ServicioDet::select("servicios_det.*", + DB::raw("CASE WHEN (fecha_solicitud>='$fecha_solicitada' OR ADDTIME(fecha_solicitud, duracion)<='$fecha_solicitada') AND + (fecha_solicitud>='$fecha_solicitada_duracion' OR ADDTIME(fecha_solicitud, duracion)<='$fecha_solicitada_duracion') + THEN 'DISPONIBLE' ELSE 'NO_DISPONIBLE' END AS validacion_1"), + DB::raw("CASE WHEN (fecha_solicitud='$fecha_solicitada' AND ADDTIME(fecha_solicitud, duracion)='$fecha_solicitada_duracion') + THEN 'NO_DISPONIBLE' ELSE null END AS validacion_2")) + ->whereDate('fecha_solicitud', $fecha_solicitud) + //->whereDate('fecha_solicitud', Carbon::now()->format('Y-m-d')) + ->whereIn('estatus_servicio_id',[PENDIENTE,REPROGRAMADO,PAGADO,VISITA]) + ->get(); + }*/ + + $servicios = ServicioDet::select("servicios_det.*", + DB::raw("CASE WHEN('$fecha_solicitada'<=fecha_solicitud AND '$fecha_solicitada'fecha_solicitud AND '$fecha_solicitada_duracion'=ADDTIME(fecha_solicitud, duracion)) + THEN 'NO_DISPONIBLE' + ELSE + (CASE WHEN('$fecha_solicitada'>=fecha_solicitud AND '$fecha_solicitada_duracion'<=ADDTIME(fecha_solicitud, duracion)) + THEN 'NO_DISPONIBLE' + ELSE + (CASE WHEN('$fecha_solicitada'>fecha_solicitud AND '$fecha_solicitada'=ADDTIME(fecha_solicitud, duracion)) + THEN 'NO_DISPONIBLE' + ELSE + 'DISPONIBLE' + END) + END) + END) + END AS 'validacion_1'")) + ->whereDate('fecha_solicitud', $fecha_solicitud) + ->whereIn('estatus_servicio_id', [PENDIENTE, REPROGRAMADO, PAGADO, VISITA]); + + if (is_numeric($data['servicio_det_id'])) { + $servicios->where('id', '<>', $data['servicio_det_id']); + } + + $servicios = $servicios->get(); + + $ocupados = array(); + foreach ($servicios as $s) { + if (($s->validacion_1 == "NO_DISPONIBLE")) { + + $exists_operador = collect($ocupados)->contains('operador_id', $s->operador_id); + $exists_vehiculo = collect($ocupados)->contains('vehiculo_id', $s->vehiculo_id); + + if (!$exists_operador && !$exists_vehiculo) { + + $operador = User::where('id', $s->operador_id)->first(); + $operador_name = ($s->operador_id == $data['operador_id']) ? "El operador: '" . $operador->nombre . " " . $operador->apellido_paterno . " " . $operador->apellido_materno . "' no está disponible." : null; + + $vehiculo = Vehiculo::where('id', $s->vehiculo_id)->first(); + $vehiculo_name = ($s->vehiculo_id == $data['vehiculo_id']) ? "El vehiculo: '" . $vehiculo->num_economico . "' no está disponible." : null; + + $auxiliar_1 = User::where('id', $s->auxiliar_1)->first(); + $auxiliar_2 = User::where('id', $s->auxiliar_2)->first(); + + $contain_aux_1 = array_key_exists('auxiliar_1', $data); + $contain_aux_2 = array_key_exists('auxiliar_2', $data); + + if ($auxiliar_1) { + $auxiliar_1_name = ($contain_aux_1 && $s->auxiliar_1 == $data['auxiliar_1']) ? "El auxiliar: '" . $auxiliar_1->nombre . " " . $auxiliar_1->apellido_paterno . " " . $auxiliar_1->apellido_materno . "' no está disponible." : null; + } + + if ($auxiliar_2) { + $auxiliar_2_name = ($contain_aux_2 && $s->auxiliar_2 == $data['auxiliar_2']) ? "El auxiliar: '" . $auxiliar_2->nombre . " " . $auxiliar_2->apellido_paterno . " " . $auxiliar_2->apellido_materno . "' no está disponible." : null; + } + + $auxiliar_3_name = null; + + $salida_array = compact('operador_name', 'vehiculo_name', 'auxiliar_1_name', 'auxiliar_2_name', 'auxiliar_3_name'); + + $salida = collect($salida_array)->filter()->values(); + + if (count($salida) > 0) { + array_push($ocupados, $salida); + } + } + } + } + return $ocupados; + } + + public function validarOperadorVehiculo(Request $request) + { + + $data = $request->all(); + + $fecha_solicitada = $data['fecha_solicitud']; + $fecha_solicitada_duracion = Carbon::createFromTimeString($data['fecha_solicitud']) + ->addHour($data['horas_duracion']) + ->addMinutes($data['minutos_duracion']) + ->toDateTimeString(); + + $fecha_solicitud = Carbon::createFromTimeString($data['fecha_solicitud'])->format('Y-m-d'); + + /*if(is_numeric($data['servicio_det_id'])){ + $servicios = ServicioDet::select("servicios_det.*", + DB::raw("CASE WHEN (fecha_solicitud>='$fecha_solicitada' OR ADDTIME(fecha_solicitud, duracion)<='$fecha_solicitada') AND + (fecha_solicitud>='$fecha_solicitada_duracion' OR ADDTIME(fecha_solicitud, duracion)<='$fecha_solicitada_duracion') + THEN 'DISPONIBLE' ELSE 'NO_DISPONIBLE' END AS validacion_1"), + DB::raw("CASE WHEN (fecha_solicitud='$fecha_solicitada' AND ADDTIME(fecha_solicitud, duracion)='$fecha_solicitada_duracion') + THEN 'NO_DISPONIBLE' ELSE null END AS validacion_2")) + ->whereDate('fecha_solicitud', $fecha_solicitud) + //->whereDate('fecha_solicitud', Carbon::now()->format('Y-m-d')) + //->where('id', '<>', $data['servicio_det_id']) + ->whereIn('estatus_servicio_id',[PENDIENTE,REPROGRAMADO,PAGADO,VISITA]) + ->get(); + }else{ + $servicios = ServicioDet::select("servicios_det.*", + DB::raw("CASE WHEN (fecha_solicitud>='$fecha_solicitada' OR ADDTIME(fecha_solicitud, duracion)<='$fecha_solicitada') AND + (fecha_solicitud>='$fecha_solicitada_duracion' OR ADDTIME(fecha_solicitud, duracion)<='$fecha_solicitada_duracion') + THEN 'DISPONIBLE' ELSE 'NO_DISPONIBLE' END AS validacion_1"), + DB::raw("CASE WHEN (fecha_solicitud='$fecha_solicitada' AND ADDTIME(fecha_solicitud, duracion)='$fecha_solicitada_duracion') + THEN 'NO_DISPONIBLE' ELSE null END AS validacion_2")) + ->whereDate('fecha_solicitud', $fecha_solicitud) + //->whereDate('fecha_solicitud', Carbon::now()->format('Y-m-d')) + ->whereIn('estatus_servicio_id',[PENDIENTE,REPROGRAMADO,PAGADO,VISITA]) + ->get(); + }*/ + + $servicios = ServicioDet::select("servicios_det.*", + DB::raw("CASE WHEN('$fecha_solicitada'<=fecha_solicitud AND '$fecha_solicitada'fecha_solicitud AND '$fecha_solicitada_duracion'=ADDTIME(fecha_solicitud, duracion)) + THEN 'NO_DISPONIBLE' + ELSE + (CASE WHEN('$fecha_solicitada'>=fecha_solicitud AND '$fecha_solicitada_duracion'<=ADDTIME(fecha_solicitud, duracion)) + THEN 'NO_DISPONIBLE' + ELSE + (CASE WHEN('$fecha_solicitada'>fecha_solicitud AND '$fecha_solicitada'=ADDTIME(fecha_solicitud, duracion)) + THEN 'NO_DISPONIBLE' + ELSE + 'DISPONIBLE' + END) + END) + END) + END AS 'validacion_1'")) + ->whereDate('fecha_solicitud', $fecha_solicitud) + ->whereIn('estatus_servicio_id', [PENDIENTE, REPROGRAMADO, PAGADO, VISITA]) + ->get(); + + $ocupados = array(); + foreach ($servicios as $s) { + //if(($s->validacion_1 == "NO_DISPONIBLE") || ($s->validacion_1 == "DISPONIBLE" && $s->validacion_2 == "NO_DISPONIBLE")){ + if (($s->validacion_1 == "NO_DISPONIBLE")) { + $exists_operador = collect($ocupados)->contains('operador_id', $s->operador_id); + $exists_vehiculo = collect($ocupados)->contains('vehiculo_id', $s->vehiculo_id); + + if (!$exists_operador && !$exists_vehiculo) { + array_push($ocupados, ['operador_id' => $s->operador_id, 'vehiculo_id' => $s->vehiculo_id, 'solicitud_servicio_id' => $s->id, 'auxiliar_1' => $s->auxiliar_1, 'auxiliar_2' => $s->auxiliar_2, 'servicio_id' => $s->id]); + } + } + } + + return response()->success($ocupados); + } + + /** + * Display the specified resource. + * + * @param int $id + * @return \Illuminate\Http\Response + */ + public function show($id) + { + + $user = Auth::user(); + $permiso_especial = Auth::user()->permiso_especial; + $now = Carbon::now()->format('Y-m-d'); + + $campos_enc = [ + 'servicios_enc.id', + 'servicios_enc.forma_pago_id', + 'cat_formas_pagos.nombre as forma_pago_nombre', + 'cat_formas_pagos.zeros as forma_pago_zeros', + 'fecha_agenda', + 'usuario_agenda_id', + 'users.nombre as usuario_agenda_nombre', + 'users.apellido_paterno as usuario_agenda_apellido_paterno', + 'users.apellido_materno as usuario_agenda_apellido_materno', + 'servicios_enc.cliente_id', + 'clientes.denominacion', + 'servicios_enc.cliente_domicilio_id', + 'clientes_domicilios.calle as clientes_calle', + 'clientes_domicilios.num_ext as clientes_num_ext', + 'clientes_domicilios.num_int as clientes_num_int', + 'clientes_domicilios.colonia as clientes_colonia', + 'clientes_domicilios.cp as clientes_cp', + 'clientes_domicilios.telefono as clientes_telefono', + 'clientes_domicilios.lat as clientes_lat', + 'clientes_domicilios.lng as clientes_lng', + 'servicios_enc.deleted_at', + 'servicios_enc.origen_id', + 'cat_origenes.nombre as origen_nombre', + ]; + + $servicio_enc = ServicioEnc::select($campos_enc) + ->joinDetalleServicioEnc() + ->join('cat_origenes', 'servicios_enc.origen_id', '=', 'cat_origenes.id') + ->where('servicios_enc.id', $id) + ->where('servicios_enc.sucursal_id', $user->sucursal_id) + ->first(); + + $campos_det = [ + 'servicios_det.id', + 'servicios_det.servicio_id', + 'cat_servicios.nombre as servicio_nombre', + 'servicios_det.estatus_servicio_id', + 'cat_estatus_servicios.nombre as estatus_servicio_nombre', + 'cat_estatus_servicios.color_1 as estatus_servicio_color_1', + 'cat_estatus_servicios.color_2 as estatus_servicio_color_2', + 'servicios_det.tipo_servicio_id', + 'cat_tipos_servicios.nombre as tipo_servicio_nombre', + 'duracion', + 'definido_cliente', + 'servicios_det.operador_id', + 'operador.nombre as operador_nombre', + 'operador.apellido_paterno as operador_apellido_paterno', + 'operador.apellido_materno as operador_apellido_materno', + 'servicios_det.vehiculo_id', + 'cat_vehiculos.num_economico as vehiculo_num_economico', + 'servicios_det.fecha_solicitud', + 'sucursales.nombre as vehiculo_sucursal', + 'sucursales.id as vehiculo_sucursal_id', + 'sucursal_operador.nombre as operador_sucursal', + 'sucursal_operador.id as operador_sucursal_id', + 'servicios_det.auxiliar_1 as auxiliar_1_id', + 'servicios_det.auxiliar_2 as auxiliar_2_id', + 'auxiliares_1.nombre as auxiliar_1', + 'auxiliares_2.nombre as auxiliar_2', + 'sucursal_auxiliares_1.nombre as sucursal_auxiliar_1', + 'sucursal_auxiliares_2.nombre as sucursal_auxiliar_2', + 'servicios_det.costo_servicio', + 'servicios_det.aceptado', + 'servicios_det.observacion_atencion_cliente', + 'servicios_det.requiere_encuesta', + 'servicios_det.facturado' + ]; + + $servicio_enc->servicios = ServicioDet::select($campos_det) + ->joinDetalleServicioDet() + ->where('servicio_enc_id', $id) + ->get(); + + foreach ($servicio_enc->servicios as $servicio) { + $iniciado = ServicioProgreso::where('servicio_enc_id', $id) + ->where('servicio_det_id', $servicio->id) + ->whereNull('fecha_fin_servidor') + ->first(); + + $servicio->iniciado = ($iniciado) ? 1 : 0; + + list($fecha, $hora) = explode(" ", $servicio->fecha_solicitud); + + $estatus_servicio = $servicio->estatus_servicio_id; + $servicio->puede_editar = $this->validarEditar($iniciado, $estatus_servicio, $fecha, $now, $permiso_especial); + } + + //$servicio_enc->permiso_especial = $permiso_especial; + return response()->success($servicio_enc); + } + + public function validarEditar($iniciado, $estatus_servicio, $fecha, $now, $permiso_especial) + { + $user_rol = RolUser::where('user_id', Auth::user()->id)->first(); + + if ($permiso_especial) { + //Tienen permiso especial + $puede_editar = 1; + } elseif ($fecha >= $now && $estatus_servicio == PENDIENTE && !$iniciado && $user_rol->role_id == 1) { + $puede_editar = 2; + } else { + $puede_editar = 0; + } + + return $puede_editar; + + } + + /** + * Update the specified resource in storage. + * + * @param \Illuminate\Http\Request $request + * @param int $id + * @return \Illuminate\Http\Response + */ + public function update(ServiciosRequest $request, $id) + { + $data = $request->all(); + $data_servicios = $data['servicios']; + $now = Carbon::now()->format('Y-m-d'); + + DB::beginTransaction(); + try { + $servicio = ServicioEnc::where('id', $id) + ->withTrashed() + ->firstOrFail(); + + $servicio->update($data); + + // + $correos = []; + + $correo_cliente = Cliente::select('email')->where('id', $servicio->cliente_id)->first(); + $correo_cliente_domicilio = ClienteDomicilio::select('email')->where('id', $servicio->cliente_domicilio_id)->first(); + + if ($correo_cliente && $correo_cliente->email) { + array_push($correos, $correo_cliente->email); + } + if ($correo_cliente_domicilio && $correo_cliente_domicilio->email) { + array_push($correos, $correo_cliente_domicilio->email); + } + // + + foreach ($data_servicios as $servicios) { + + $contain_aux_1 = array_key_exists('auxiliar_1', $servicios); + $contain_aux_2 = array_key_exists('auxiliar_2', $servicios); + + if ($contain_aux_1 && $contain_aux_2) { + if ($servicios['auxiliar_1'] == $servicios['auxiliar_2']) { + + $aux = User::where('id', $servicios['auxiliar_1'])->first(); + + $error_aux = ["El auxiliar: '" . $aux->nombre . " " . $aux->apellido_paterno . " " . $aux->apellido_materno . "' no está disponible."]; + + DB::rollBack(); + return response()->unprocessable('Error', $error_aux); + } + } + + $servicios_data = $servicios; + $servicios_data['servicio_det_id'] = $servicios['id']; + $validacion = $this->validarOperadorVehiculoLocal($servicios_data); + + if (count($validacion) > 0) { + DB::rollBack(); + return response()->unprocessable('Error', $validacion[0]); + } + + if ($servicios['estatus_servicio_id'] == NEGATIVO || $servicios['estatus_servicio_id'] == REALIZADO || $servicios['estatus_servicio_id'] == CANCELADO) { + + if (Auth::user()->permiso_especial) { + $datos = [ + 'estatus_servicio_id' => $servicios['estatus_servicio_id'], + 'costo_servicio' => $servicios['costo_servicio'], + 'operador_id' => $servicios['operador_id'], + 'vehiculo_id' => $servicios['vehiculo_id'], + 'tipo_servicio_id' => $servicios['tipo_servicio_id'], + 'servicio_id' => $servicios['servicio_id'], + 'facturado' => $servicios['facturado'], + 'observacion_atencion_cliente' => $servicios['observacion_atencion_cliente'] + ]; + + if ($contain_aux_1) { + $datos['auxiliar_1'] = $servicios['auxiliar_1']; + } + + if ($contain_aux_2) { + $datos['auxiliar_2'] = $servicios['auxiliar_2']; + } + + } else { + if ($servicios['estatus_servicio_id'] == NEGATIVO) { + $datos = [ + 'estatus_servicio_id' => $servicios['estatus_servicio_id'], + 'costo_servicio' => $servicios['costo_servicio'] + ]; + } else { + $datos = [ + 'estatus_servicio_id' => $servicios['estatus_servicio_id'] + ]; + } + } + + $s = ServicioDet::where('id', $servicios['id']) + ->first(); + + $s_enc = $s->servicio_enc_id; + $s_det = $s->id; + + $s->update($datos); + + if($servicios['estatus_servicio_id'] == NEGATIVO || $servicios['estatus_servicio_id'] == REALIZADO){ + $auxiliar_id = null; + if($contain_aux_1){ + $auxiliar_id = $datos['auxiliar_1']; + }elseif($contain_aux_2){ + $auxiliar_id = $datos['auxiliar_2']; + } + $this->changePDF($servicios['costo_servicio'], $servicios['operador_id'], $auxiliar_id,$servicios['vehiculo_id'], $s_enc, $s_det, $servicios['fecha_solicitud']); + } + + } else { + $servicio = ServicioDet::where('id', $servicios['id']) + ->first(); + + $usuario = User::where('id', $servicios['operador_id'])->first(); + + $now = Carbon::now()->format('Y-m-d'); + $fecha_solicitada = Carbon::createFromTimeString($servicios['fecha_solicitud'])->format('Y-m-d'); + + if (Carbon::parse($usuario->last_login)->isToday() && ($usuario->token_firebase && $fecha_solicitada == $now && $servicio->operador_id != $servicios['operador_id']) && ($servicios['estatus_servicio_id'] == PENDIENTE || $servicios['estatus_servicio_id'] == REPROGRAMADO || $servicios['estatus_servicio_id'] == VISITA || $servicios['estatus_servicio_id'] == PAGADO)) { + if (!$this->enviarNotificacion($servicios, $usuario)) { + DB::rollBack(); + return response()->unprocessable('Error', ['Error al actualizar el Servicio.']); + } + } + + if (!$servicio->aceptado && !$servicio->operador_id && !$servicio->operador_id) { + + $servicios['aceptado'] = 0; + $servicios['observacion'] = null; + $servicio->update($servicios); + + //Envio de notificacion + if (Carbon::parse($usuario->last_login)->isToday() && ($usuario->token_firebase && $fecha_solicitada == $now) && ($servicios['estatus_servicio_id'] == PENDIENTE || $servicios['estatus_servicio_id'] == REPROGRAMADO || $servicios['estatus_servicio_id'] == VISITA || $servicios['estatus_servicio_id'] == PAGADO)) { + if (!$this->enviarNotificacion($servicios, $usuario)) { + DB::rollBack(); + return response()->unprocessable('Error', ['Error al actualizar el Servicio.']); + } + } + + } else { + $servicio['facturado'] = $servicios['facturado']; + $servicio->update($servicios); + } + + // + /*if (count($correos) > 0) { + try { + Mail::to($correos)->send(new SolicitudServicio($servicios['id'])); + } catch (\Exception $e) { + \Log::info("Error al enviar correo: " . json_encode($e->getMessage())); + } + }*/ + // + } + } + + DB::commit(); + + return response()->success($servicio); + } catch (\Exception $e) { + DB::rollBack(); + Log::info($e); + return response()->unprocessable('Error', ['Error al actualizar el Servicio.']); + } + } + + public function changePDF($costo, $asesor_id, $auxiliar_id, $vehiculo_id, $servicio_enc_id, $servicio_det_id, $fecha_solicitud){ + + $ruta_pdf = "app/public/servicios/recibos_pdf/solicitud_" . $servicio_enc_id."_servicio_" . $servicio_det_id . ".pdf"; + + if(Storage::disk('public')->exists("servicios/recibos_pdf/solicitud_" . $servicio_enc_id."_servicio_" . $servicio_det_id . ".pdf")){ + $this->updatePDF($costo, $asesor_id, $auxiliar_id, $vehiculo_id, $ruta_pdf, $fecha_solicitud); + }else{ + $this->generarPDF($servicio_enc_id, $servicio_det_id, true); + } + + return true; + } + + public function updatePDF($costo, $asesor_id, $auxiliar_id, $vehiculo_id, $ruta_pdf, $fecha_solicitud){ + + $date1 = new Carbon($fecha_solicitud); + $date2 = new Carbon("2023-02-02"); + + $is_less = $date1->lt($date2); + + $pdf = new FPDI('P','mm','Letter'); + $pdf->SetAutoPageBreak(false); + $pdf->AddFont('Helvetica', 'N', 'helvetica.php'); + + $pdf->AddPage('P','Letter'); + $pdf->setSourceFile(storage_path($ruta_pdf)); + $tplId = $pdf->importPage(1); + + $pdf->useTemplate($tplId); + $pdf->setMargins(0,0,0); + + $pdf->SetFont('helvetica','N',12); + + $pdf->SetFillColor(255,255,255); + + if($is_less){ + $pdf->Rect(13.2, 234.5, 36.7, 4.8, 'F'); + + $pdf->SetXY(14.45,232.2); + $pdf->Write(10, $costo); + + $pdf->Rect(13.2, 245.6, 92.5, 4.8, 'F'); + + $pdf->SetXY(15,243); + $pdf->Write(10, $this->name($asesor_id)); + }else{ + $pdf->Rect(11.5, 233.7, 37, 4.8, 'F'); + + $pdf->SetXY(13.2,231.8); + $pdf->Write(10, $costo); + + $pdf->Rect(11.5, 245.5, 92.5, 6.5, 'F'); + + $pdf->SetXY(13.4,243); + $pdf->Write(10, $this->name($asesor_id)); + } + + /*$pdf->Rect(11.5, 256.7, 92.5, 6.5, 'F'); + + $pdf->SetXY(15,252); + $pdf->Write(10, $auxiliar_id ? $this->name($auxiliar_id) : ''); + + $pdf->Rect(107, 256.5, 48.5, 6.8, 'F'); + + $pdf->SetXY(110,252); + $pdf->Write(10, $this->name($vehiculo_id, false));*/ + + $pdf->Output(storage_path($ruta_pdf),'F',true); + + return true; + } + + public function name($id, $is_user = true){ + + if($is_user){ + $user = User::where('id', $id) + ->firstOrFail(); + $name = $user->nombre . ' ' . $user->apellido_paterno . ' ' . $user->apellido_materno; + }else{ + $vehiculo = Vehiculo::where('id', $id) + ->firstOrFail(); + $name = $vehiculo->num_economico; + } + + return $name; + } + + private function enviarNotificacion($servicios, $usuario) + { + + try { + $authorization = config('firebase')['authorization']; + $project_id = config('firebase')['project_id']; + $endpoint = config('firebase')['endpoint']; + + $headers = [ + 'Authorization' => 'key=' . $authorization, + 'project_id' => $project_id, + 'content-type' => 'application/json' + ]; + + $cat_servicio = CatServicio::where('id', $servicios['servicio_id'])->first(); + + $datos = ['registration_ids' => array($usuario->token_firebase), + 'data' => ['servicio_id' => $servicios['id'], 'title' => 'Nuevo servicio asignado', 'body' => $cat_servicio->nombre]]; + + $client = new Client(); + $client->post($endpoint, [ + 'headers' => $headers, + 'json' => $datos, + ]); + return true; + } catch (\Exception $e) { + Log::info("Firebase error: " . json_encode($e->getMessage())); + return false; + } + } + + /** + * Remove the specified resource from storage. + * + * @param int $id + * @return \Illuminate\Http\Response + */ + public function destroy($id, Request $request) + { + $deleted = $request->input('deleted'); + + if ($deleted) { + $servicio = ServicioEnc::where('id', $id) + ->onlyTrashed() + ->first(); + + $servicio->restore(); + } else { + $servicio = ServicioEnc::findOrFail($id); + $servicio->delete(); + } + + return response()->success(['result' => 'ok']); + } + + public function servicios(Request $request) + { + + $orderBy = $request->input('sortBy', 'nombre'); + $order = $request->input('order', 'asc'); + + $queryBuilder = CatServicio::orderBy($orderBy, $order); + + if ($query = $request->get('query', false)) { + $queryBuilder->where(function ($q) use ($query) { + $q->where('nombre', 'like', '%' . $query . '%'); + }); + } + + if ($perPage = $request->input('perPage', false)) { + $data = $queryBuilder->paginate($perPage); + } else { + $data = ['data' => $queryBuilder->get()]; + } + + return response()->success($data); + } + + public function estatusServicios(Request $request) + { + + $orderBy = $request->input('sortBy', 'nombre'); + $order = $request->input('order', 'asc'); + + $queryBuilder = CatEstatuServicio::orderBy($orderBy, $order); + + if ($query = $request->get('query', false)) { + $queryBuilder->where(function ($q) use ($query) { + $q->where('nombre', 'like', '%' . $query . '%'); + }); + } + + if ($perPage = $request->input('perPage', false)) { + $data = $queryBuilder->paginate($perPage); + } else { + $data = ['data' => $queryBuilder->get()]; + } + + return response()->success($data); + } + + public function formasPagos(Request $request) + { + + $orderBy = $request->input('sortBy', 'nombre'); + $order = $request->input('order', 'asc'); + + $queryBuilder = CatFormaPago::orderBy($orderBy, $order); + + if ($query = $request->get('query', false)) { + $queryBuilder->where(function ($q) use ($query) { + $q->where('nombre', 'like', '%' . $query . '%'); + }); + } + + if ($perPage = $request->input('perPage', false)) { + $data = $queryBuilder->paginate($perPage); + } else { + $data = ['data' => $queryBuilder->get()]; + } + + return response()->success($data); + } + + public function tiposServicios(Request $request) + { + + $orderBy = $request->input('sortBy', 'nombre'); + $order = $request->input('order', 'asc'); + + $queryBuilder = CatTipoServicio::orderBy($orderBy, $order); + + if ($query = $request->get('query', false)) { + $queryBuilder->where(function ($q) use ($query) { + $q->where('nombre', 'like', '%' . $query . '%'); + }); + } + + if ($perPage = $request->input('perPage', false)) { + $data = $queryBuilder->paginate($perPage); + } else { + $data = ['data' => $queryBuilder->get()]; + } + + return response()->success($data); + } + + public function clientes(Request $request) + { + + $orderBy = $request->input('sortBy', 'denominacion'); + $order = $request->input('order', 'asc'); + $user = Auth::user(); + + $queryBuilder = Cliente::select('clientes.*') + ->leftJoin('clientes_domicilios', function ($join) { + $join->on('clientes.id', '=', 'clientes_domicilios.cliente_id'); + $join->whereNull('clientes_domicilios.deleted_at'); + }) + ->where('sucursal_id', $user->sucursal_id) + ->orderBy($orderBy, $order); + + if ($query = $request->get('query', false)) { + $queryBuilder->where(function ($q) use ($query) { + $q->where('clientes.denominacion', 'like', '%' . $query . '%') + ->orWhere('clientes_domicilios.telefono', '=', $query) + ->orWhere('clientes.id', '=', $query); + }); + } + + $queryBuilder->groupBy('clientes.id'); + + if ($perPage = $request->input('perPage', false)) { + $data = $queryBuilder->paginate($perPage); + } else { + $data = ['data' => $queryBuilder->get()]; + } + + return response()->success($data); + } + + public function domicilioXCliente($cliente_id, Request $request) + { + + $orderBy = $request->input('sortBy', 'calle'); + $order = $request->input('order', 'asc'); + + $queryBuilder = ClienteDomicilio::where('cliente_id', $cliente_id)->orderBy($orderBy, $order); + + if ($query = $request->get('query', false)) { + $queryBuilder->where(function ($q) use ($query) { + $q->where('calle', 'like', '%' . $query . '%'); + }); + } + + if ($perPage = $request->input('perPage', false)) { + $data = $queryBuilder->paginate($perPage); + } else { + $data = ['data' => $queryBuilder->get()]; + } + + return response()->success($data); + } + + public function operadores(Request $request) + { + + $orderBy = $request->input('sortBy', 'users.nombre'); + $order = $request->input('order', 'asc'); + $user = Auth::user(); + + $queryBuilder = User::select('users.*', 'sucursales.nombre as sucursal') + ->where('tipo_empleado_id', ASESOR_OPERACIONES) + ->where('users.sucursal_id', $user->sucursal_id) + ->join('sucursales', 'sucursales.id', '=', 'users.sucursal_id') + ->orderBy($orderBy, $order); + + if ($query = $request->get('query', false)) { + $queryBuilder->where(function ($q) use ($query) { + $q->where('users.nombre', 'like', '%' . $query . '%') + ->orWhere('users.apellido_paterno', 'like', '%' . $query . '%') + ->orWhere('users.apellido_materno', 'like', '%' . $query . '%'); + }); + } + + if ($perPage = $request->input('perPage', false)) { + $data = $queryBuilder->paginate($perPage); + } else { + $data = ['data' => $queryBuilder->get()]; + } + + return response()->success($data); + } + + public function vehiculos(Request $request) + { + + $orderBy = $request->input('sortBy', 'num_economico'); + $order = $request->input('order', 'asc'); + $user = Auth::user(); + + $queryBuilder = Vehiculo::select('cat_vehiculos.*') + ->join('vehiculos_sucursales', 'vehiculos_sucursales.vehiculo_id', '=', 'cat_vehiculos.id') + ->where('sucursal_id', $user->sucursal_id) + ->orderBy($orderBy, $order); + + if ($query = $request->get('query', false)) { + $queryBuilder->where(function ($q) use ($query) { + $q->where('num_economico', 'like', '%' . $query . '%'); + }); + } + + if ($perPage = $request->input('perPage', false)) { + + $data = $queryBuilder->paginate($perPage); + foreach ($data->items() as $vehiculo) { + $vehiculo->sucursales = VehiculoSucursal::select('sucursales.id as sucursal_id', 'sucursales.nombre as sucursal') + ->join('sucursales', 'sucursales.id', '=', 'vehiculos_sucursales.sucursal_id') + ->where('vehiculo_id', $vehiculo->id) + ->get(); + } + + $vehiculo = $data; + } else { + $data = $queryBuilder->get(); + foreach ($data as $vehiculo) { + $vehiculo->sucursales = VehiculoSucursal::select('sucursales.id as sucursal_id', 'sucursales.nombre as sucursal') + ->join('sucursales', 'sucursales.id', '=', 'vehiculos_sucursales.sucursal_id') + ->where('vehiculo_id', $vehiculo->id) + ->get(); + } + + $vehiculo = ['data' => $data]; + } + + return response()->success($vehiculo); + } + + public function auxiliares(Request $request) + { + + $orderBy = $request->input('sortBy', 'users.nombre'); + $order = $request->input('order', 'asc'); + $user = Auth::user(); + + $queryBuilder = User::select('users.*', 'sucursales.nombre as sucursal') + ->join('sucursales', 'sucursales.id', '=', 'users.sucursal_id') + ->whereIn('tipo_empleado_id', [AUXILIAR_TECNICO_1, AUXILIAR_TECNICO_2]) + ->where('users.sucursal_id', $user->sucursal_id) + ->orderBy($orderBy, $order); + + if ($query = $request->get('query', false)) { + $queryBuilder->where(function ($q) use ($query) { + $q->where('users.nombre', 'like', '%' . $query . '%') + ->orWhere('users.apellido_paterno', 'like', '%' . $query . '%') + ->orWhere('users.apellido_materno', 'like', '%' . $query . '%'); + }); + } + + if ($perPage = $request->input('perPage', false)) { + $data = $queryBuilder->paginate($perPage); + } else { + $data = ['data' => $queryBuilder->get()]; + } + + return response()->success($data); + } + + public function origenes(Request $request) + { + + $orderBy = $request->input('sortBy', 'nombre'); + $order = $request->input('order', 'asc'); + + $queryBuilder = CatOrigen::orderBy($orderBy, $order); + + if ($query = $request->get('query', false)) { + $queryBuilder->where(function ($q) use ($query) { + $q->where('nombre', 'like', '%' . $query . '%'); + }); + } + + if ($perPage = $request->input('perPage', false)) { + $data = $queryBuilder->paginate($perPage); + } else { + $data = ['data' => $queryBuilder->get()]; + } + + return response()->success($data); + } + + public function removeAuxiliar(Request $request, $servicio_id, $auxiliar_id) + { + + $todos = $request->input('todos'); + if ($todos) { + ServicioDet::where('id', $servicio_id) + ->first() + ->update(['auxiliar_1' => null, 'auxiliar_2' => null]); + + } else { + + $servicio_det_1 = ServicioDet::where('id', $servicio_id) + ->where('auxiliar_1', $auxiliar_id) + ->first(); + $servicio_det_2 = ServicioDet::where('id', $servicio_id) + ->where('auxiliar_2', $auxiliar_id) + ->first(); + + if ($servicio_det_1) { + $servicio_det_1->update(['auxiliar_1' => null]); + } elseif ($servicio_det_2) { + $servicio_det_2->update(['auxiliar_2' => null]); + } + } + + return response()->success(['result' => 'ok']); + } + + public function generarPDF($servicio_enc_id, $servicio_det_id, $local = false) + { + + setlocale(LC_MONETARY, 'en_US'); + + $det = ServicioDet::where('id', $servicio_det_id)->first(); + + if ($det->estatus_servicio_id != REALIZADO && $det->estatus_servicio_id != NEGATIVO) { + return response()->unprocessable('Error', ['El servicio no está terminado.']); + } + + $servicio_progreso_id = ServicioProgreso::where('servicio_enc_id', $servicio_enc_id) + ->where('servicio_det_id', $servicio_det_id) + ->first(); + + if($servicio_progreso_id && Storage::disk('public')->exists("servicios/recibos_pdf/solicitud_" . $servicio_enc_id."_servicio_" . $servicio_det_id . ".pdf")) { + + return response()->file(storage_path('app/public/servicios/recibos_pdf/' . 'solicitud_' . $servicio_enc_id . '_servicio_' . $servicio_det_id . '.pdf')); + } + + $campos = [ + 'servicios_enc.id as folio', + 'clientes.denominacion as nombre_cliente', + DB::raw("DATE_FORMAT(`servicios_det`.`fecha_solicitud`, '%d/%m/%Y') as 'fecha_solicitud'"), + 'clientes_domicilios.ciudad', + 'clientes_domicilios.celular_responsable as telefono', + 'clientes_domicilios.nombre_responsable_sucursal as contacto', + 'cat_servicios.nombre as servicio', + 'servicios_progreso.comentarios as observaciones', + 'servicios_det.costo_servicio', + DB::raw("TIME_FORMAT(`servicios_progreso`.`fecha_ini_celular`, '%H:%i:%s') as 'fecha_inicio'"), + 'servicios_progreso.duracion', + DB::raw("TIME_FORMAT(`servicios_progreso`.`fecha_fin_celular`, '%H:%i:%s') as 'fecha_final'"), + DB::raw("CONCAT(asesor.nombre,' ',asesor.apellido_paterno,' ',asesor.apellido_materno) as asesor"), + 'sucursales.nombre as sucursal', + DB::raw("CONCAT(auxiliar.nombre,' ',auxiliar.apellido_paterno,' ',auxiliar.apellido_materno) as auxiliar"), + 'cat_vehiculos.num_economico as vehiculo', + 'servicios_progreso.firma', + 'estatus_servicio_id', + 'clientes_domicilios.calle', + 'clientes_domicilios.num_ext', + 'clientes_domicilios.num_int', + 'clientes_domicilios.colonia', + 'clientes_domicilios.cp', + 'servicios_progreso.aplica_garantia', + 'cat_motivos_estatus.nombre as motivo_estatus' + ]; + + $servicios = ServicioDet::select($campos) + ->join('servicios_enc', 'servicios_det.servicio_enc_id', '=', 'servicios_enc.id') + ->join('clientes', 'servicios_enc.cliente_id', '=', 'clientes.id') + ->join('clientes_domicilios', 'servicios_enc.cliente_domicilio_id', '=', 'clientes_domicilios.id') + ->join('cat_servicios', 'servicios_det.servicio_id', '=', 'cat_servicios.id') + ->leftJoin('servicios_progreso', 'servicios_det.id', '=', 'servicios_progreso.servicio_det_id') + ->join('users as asesor', 'servicios_det.operador_id', '=', 'asesor.id') + ->leftJoin('users as auxiliar', 'servicios_det.auxiliar_1', '=', 'auxiliar.id') + ->join('sucursales', 'servicios_enc.sucursal_id', '=', 'sucursales.id') + ->join('cat_vehiculos', 'servicios_det.vehiculo_id', '=', 'cat_vehiculos.id') + ->leftJoin('cat_motivos_estatus', 'cat_motivos_estatus.id', '=', 'servicios_det.cat_motivos_estatus_id') + ->where('servicios_det.id', $servicio_det_id) + ->where('servicios_det.servicio_enc_id', $servicio_enc_id) + ->firstOrFail(); + + $num_int = ($servicios->num_int) ? ' INT. ' . $servicios->num_int : ''; + $cp = ($servicios->cp) ? ' C.P. ' . $servicios->cp : ''; + $servicios['domicilio'] = 'CALLE ' . $servicios->calle . ' ' . $servicios->num_ext . $num_int . ', COL. ' . $servicios->colonia . $cp; + + $servicios['folio'] = str_pad($servicios->folio, 5, "0", STR_PAD_LEFT); + $servicios['telefono'] = $this->phone_number_format($servicios->telefono); + + if ($servicios->estatus_servicio_id == NEGATIVO) { + $costo_negativo = $servicios->costo_servicio; + $costo = 0.00; + } else { + $costo_negativo = 0.00; + $costo = $servicios->costo_servicio; + } + + $servicios['costo_servicio'] = money_format('%(#10n', $costo); + $servicios['costo_negativo'] = money_format('%(#10n', $costo_negativo); + + if ($servicios->duracion) { + list($h, $m, $s) = explode(":", $servicios->duracion); + $servicios['duracion'] = (int)$h . 'hr ' . $m . 'm ' . $s . 's'; + } else { + $servicios['duracion'] = "00hr 00m 00s"; + } + + /* + if ($servicio_progreso_id) { + + $evidencias_inicio = ServicioEvidencia::where('servicio_progreso_id', $servicio_progreso_id->id) + ->where('etapa', 'Inicio') + ->get(); + + $evidencias_proceso = ServicioEvidencia::where('servicio_progreso_id', $servicio_progreso_id->id) + ->where('etapa', 'Proceso') + ->get(); + + $evidencias_terminado = ServicioEvidencia::where('servicio_progreso_id', $servicio_progreso_id->id) + ->where('etapa', 'Final') + ->get(); + + $inicio = 0; + $proceso = 0; + $terminado = 0; + foreach ($evidencias_inicio as $e_i) { + $inicio++; + $servicios["evidencia_inicio_$inicio"] = $e_i->imagen; + } + + foreach ($evidencias_proceso as $e_p) { + $proceso++; + $servicios["evidencia_proceso_$proceso"] = $e_p->imagen; + } + + foreach ($evidencias_terminado as $e_t) { + $terminado++; + $servicios["evidencia_terminado_$terminado"] = $e_t->imagen; + } + } + */ + + try { + + $pdf = App::make('dompdf.wrapper'); + $pdf->loadHTML(view('recibos/servicios-lite', compact('servicios'))); + + $nombre_pdf = 'solicitud_' . $servicio_enc_id . '_servicio_' . $servicio_det_id . '.pdf'; + + Storage::disk('public')->put('servicios/recibos_pdf/' . $nombre_pdf, $pdf->output()); + + return $pdf->stream($nombre_pdf); + + } catch (\Exception $e) { + Log::info($e); + return response()->unprocessable('Error', ['Error al generar PDF.']); + } + } + + function phone_number_format($number) + { + // Allow only Digits, remove all other characters. + $number = preg_replace("/[^\d]/", "", $number); + + // get number length. + $length = strlen($number); + + // if number = 10 + if ($length == 10) { + $number = preg_replace("/^1?(\d{3})(\d{3})(\d{4})$/", "($1) $2 $3", $number); + } + + return $number; + + } + + function actualizarLitraje(LitrajeRequest $request, $id) + { + $litraje = $request->input('litraje'); + + if (Auth::user()->permiso_especial) { + $servicio_progreso = ServicioProgreso::findOrFail($id); + /*if($servicio_progreso->litraje){ + return response()->unprocessable('Error', ['Este servicio ya cuenta con un litraje asignado']); + }*/ + $servicio_progreso->update(['litraje' => $litraje]); + + return response()->success(['result' => 'ok']); + } + + return response()->unauthorized('No es posible actualizar, pongase en contacto con un administrador'); + } + + function filtrosServicios(Request $request){ + $user = Auth::user(); + + $origenes = CatOrigen::select('id', 'nombre')->orderBy('nombre','ASC')->get(); + $formas_pagos= CatFormaPago::select('id', 'nombre')->orderBy('nombre','ASC')->get(); + $estatus_servicios = CatEstatuServicio::select('id', 'nombre')->orderBy('nombre','ASC')->get(); + $servicios = CatServicio::select('id', 'nombre')->orderBy('nombre','ASC')->get(); + $tipo_servicio = CatTipoServicio::select('id', 'nombre')->orderBy('nombre','ASC')->get(); + $vehiculos = Vehiculo::select('id', 'num_economico', 'descripcion', 'tipo_vehiculo_id')->orderBy('descripcion','ASC')->get(); + $operadores = User::select('users.*', 'sucursales.nombre as sucursal')->where('tipo_empleado_id', ASESOR_OPERACIONES)->where('users.sucursal_id', $user->sucursal_id)->join('sucursales', 'sucursales.id', '=', 'users.sucursal_id')->orderBy('users.nombre','ASC')->get(); + $auxiliares = User::select('users.*', 'sucursales.nombre as sucursal')->join('sucursales', 'sucursales.id', '=', 'users.sucursal_id')->whereIn('tipo_empleado_id', [AUXILIAR_TECNICO_1, AUXILIAR_TECNICO_2])->where('users.sucursal_id', $user->sucursal_id)->orderBy('users.nombre','ASC')->get(); + + return response()->success(compact('origenes', 'formas_pagos', 'estatus_servicios', 'servicios', 'tipo_servicio', 'vehiculos', 'operadores', 'auxiliares')); + } + + public function agenda(Request $request){ + $start_day = $request->input('start_day'); + $end_day = $request->input('end_day'); + + $campos = [ + DB::raw("CONCAT(`users`.`nombre`,' ',`users`.`apellido_paterno`) as nombre_operador"), + DB::raw("DATE_FORMAT(`fecha_solicitud`, '%h:%i %p') as hora_servicio"), + DB::raw("DATE_FORMAT(`duracion`, '%Hh %im') as duracion_servicio"), + "clientes.denominacion as denominacion_cliente", + "fecha_solicitud as start_day", + DB::raw("ADDTIME(`fecha_solicitud`, `duracion`) as end_day"), + "color_web as color_estatus", + "cat_estatus_servicios.nombre as nombre_estatus" + ]; + + $servicios = ServicioDet::select($campos) + ->join('users', 'servicios_det.operador_id', '=', 'users.id') + ->join('cat_estatus_servicios', 'servicios_det.estatus_servicio_id', '=', 'cat_estatus_servicios.id') + ->join('servicios_enc', 'servicios_det.servicio_enc_id', '=', 'servicios_enc.id') + ->join('clientes', 'servicios_enc.cliente_id', '=', 'clientes.id') + ->where('servicios_enc.sucursal_id', Auth::user()->sucursal_id); + + if($start_day && $end_day){ + $servicios->whereRaw("Date(`fecha_solicitud`) between '$start_day' and '$end_day'"); + }else{ + $servicios->whereRaw("Date(`fecha_solicitud`) = '$start_day'"); + } + + $servicios = $servicios->orderBy('servicios_det.operador_id')->get(); + + return response()->success($servicios); + } +} diff --git a/app/Http/Controllers/Auth/AuthenticateController.php b/app/Http/Controllers/Auth/AuthenticateController.php new file mode 100644 index 0000000..013e378 --- /dev/null +++ b/app/Http/Controllers/Auth/AuthenticateController.php @@ -0,0 +1,229 @@ +only('email', 'password'); + $dispositivo_id = $request->input('dispositivo_id', NULL); + $version_apk = $request->input('version_apk', false); + $version_parametro = Parametro::where('llave',LLAVE_VERSION_APLICACION)->first(); + + + try { + + $usuario = User::where('email', $credentials['email'])->first(); + + + if ($usuario) { + $tipo = TipoEmpleado::where('id', $usuario->tipo_empleado_id)->first(); + + if (!$tipo->login) { + return response()->forbidden('No cuentas con los suficientes permisos para acceder a este módulo.'); + } + } + + try { + if (!$user = Sentinel::forceAuthenticate($credentials)) { + return response()->unauthorized('Usuario y/o contraseña incorrectas.'); + } + } catch (ThrottlingException $e) { + return response()->tooManyAttempts('too_many_attempts'); + } + + $token = JWTAuth::attempt($credentials); + + if (!$token) { + return response()->unauthorized('Usuario y/o contraseña incorrectas.'); + } + + $application = $request->header('Application'); + + if ($application == 'MOVIL' && (!$version_apk || $version_apk != $version_parametro->valor)){ + return response()->unauthorized('Existe una nueva versión disponible, contacta con tu supervisor.'); + } + + $user = Auth::user(); + + $role_id = RolUser::where('user_id', $user->id)->first(); + $role = Sentinel::findRoleById($role_id->role_id); + + $this->validarAplicacion($application, $role); + + if ($dispositivo_id != null) { + $user->dispositivo_id = $dispositivo_id; + $user->update(); + } + + return response()->success(compact('user', 'token', 'role')); + + + } catch (JWTException $e) { + // something went wrong whilst attempting to encode the token + return response()->json(['error' => 'could_not_create_token'], 500); + + } catch (NotActivatedException $e) { + + return response()->badRequest($e->getMessage()); + } catch (\Exception $e) { + + if ($e->getCode() == 400) { + return response()->badRequest($e->getMessage()); + } + + if ($e->getCode() == 401) { + return response()->unauthorized($e->getMessage()); + } + + if ($e->getCode() == 403) { + return response()->forbidden($e->getMessage()); + } + + if ($e->getCode() == 404) { + return response()->notFound($e->getMessage()); + } + + if ($e->getCode() == 422) { + return response()->unprocessable('Error', [$e->getMessage()]); + } + + return response()->json(['error' => $e->getMessage()], $e->getCode()); + + } + } + + public function validarAplicacion($application, $role) + { + + if (!$application) + throw new \Exception('El header Application es obligatorio.', 400); + + + if (strtoupper($application) == 'MOVIL') { + + if (!$role->movil) { + throw new \Exception('No cuentas con los suficientes permisos para acceder a este módulo.', 403); + } + + } elseif (strtoupper($application) == 'WEB') { + + if (!$role->web) { + throw new \Exception('No cuentas con los suficientes permisos para acceder a este módulo.', 403); + } + + } + } + + /** + * Actualizar json token web + * Retorna un nuevo token de acceso **JWT** + * + * @param App\Http\Request $request + * @return \Illuminate\Http\Response + */ + public function refreshAccessToken(Request $request) + { + + $token = JWTAuth::parseToken()->refresh(); + + return response()->success(compact('token')); + + } + + /** + * + * Recuperar Contraseña + * @param App\Http\Request $request + * @return \Illuminate\Http\Response + */ + public function recoverPassword(Request $request) + { + $email = $request->input('email', false); + + $user = User::where('email', $email)->first(); + + if (!$user) { + return response()->unprocessable('Error', ['El usuario no se encuentra disponible.']); + } + + $newpass = str_random(4); + $newpass = strtolower($newpass); + $user->password = bcrypt($newpass); + $user->solicitar = 1; + $user->save(); + $user['nueva'] = $newpass; + Mail::to($email)->send(new ResetPassword($user)); + $mensaje = "Acabamos de enviar un correo electrónico con su contraseña."; + + return response()->success(['result' => $mensaje]); + } + + /** + * + * Actualizar Contraseña + * @param App\Http\Request $request + * @return \Illuminate\Http\Response + */ + public function updatePassword(Request $request) + { + $user = Auth::user(); + + $data = $request->only([ + 'old_password', + 'password', + 'password_confirm' + ]); + + $current_password = Auth::attempt(['email' => $user->email, 'password' => $data['old_password']]); + + if ($current_password) { + if ($data['password'] == $data['password_confirm']) { + $user->password = bcrypt($data['password']); + $user->solicitar = 0; + $user->update(); + return response()->success(['result' => 'Contraseña actualizada correctamente']); + } else { + $msg = 'Las contraseñas no coinciden.'; + return response()->unprocessable('Error', [$msg]); + } + } else { + return response()->unprocessable('Error', ['Contraseña actual incorrecta.']); + } + } + + public function tokenFirebase(TokenFirebaseRequest $request) + { + + $user = Auth::user(); + + $data = $request->only(['token_firebase']); + + User::where('id', $user->id)->first()->update($data); + + return response()->success(['result' => 'ok']); + } +} diff --git a/app/Http/Controllers/Auth/ForgotPasswordController.php b/app/Http/Controllers/Auth/ForgotPasswordController.php new file mode 100644 index 0000000..6a247fe --- /dev/null +++ b/app/Http/Controllers/Auth/ForgotPasswordController.php @@ -0,0 +1,32 @@ +middleware('guest'); + } +} diff --git a/app/Http/Controllers/Auth/LoginController.php b/app/Http/Controllers/Auth/LoginController.php new file mode 100644 index 0000000..b2ea669 --- /dev/null +++ b/app/Http/Controllers/Auth/LoginController.php @@ -0,0 +1,39 @@ +middleware('guest')->except('logout'); + } +} diff --git a/app/Http/Controllers/Auth/RegisterController.php b/app/Http/Controllers/Auth/RegisterController.php new file mode 100644 index 0000000..f77265a --- /dev/null +++ b/app/Http/Controllers/Auth/RegisterController.php @@ -0,0 +1,71 @@ +middleware('guest'); + } + + /** + * Get a validator for an incoming registration request. + * + * @param array $data + * @return \Illuminate\Contracts\Validation\Validator + */ + protected function validator(array $data) + { + return Validator::make($data, [ + 'name' => 'required|string|max:255', + 'email' => 'required|string|email|max:255|unique:users', + 'password' => 'required|string|min:6|confirmed', + ]); + } + + /** + * Create a new user instance after a valid registration. + * + * @param array $data + * @return \App\User + */ + protected function create(array $data) + { + return User::create([ + 'name' => $data['name'], + 'email' => $data['email'], + 'password' => bcrypt($data['password']), + ]); + } +} diff --git a/app/Http/Controllers/Auth/ResetPasswordController.php b/app/Http/Controllers/Auth/ResetPasswordController.php new file mode 100644 index 0000000..cf726ee --- /dev/null +++ b/app/Http/Controllers/Auth/ResetPasswordController.php @@ -0,0 +1,39 @@ +middleware('guest'); + } +} diff --git a/app/Http/Controllers/Controller.php b/app/Http/Controllers/Controller.php new file mode 100644 index 0000000..954adec --- /dev/null +++ b/app/Http/Controllers/Controller.php @@ -0,0 +1,211 @@ + 0){ + $total_segundos = 0; + for ($i = 0; $i < count($array_tiempos); $i ++){ + + if($array_tiempos[$i]){ + list($h,$m,$s) = explode(":", $array_tiempos[$i]); + $seg_h = ((int)$h * 3600); + $seg_m = ((int)$m * 60); + $seg_s = (int)$s; + + $total_segundos += ($seg_h + $seg_m + $seg_s); + } + } + + $horas = floor($total_segundos / 3600); + $minutos = floor(($total_segundos - ($horas * 3600)) / 60); + $segundos = $total_segundos - ($horas * 3600) - ($minutos * 60); + + $horas = str_pad($horas, 2, 0, STR_PAD_LEFT); + $minutos = str_pad($minutos, 2, 0, STR_PAD_LEFT); + $segundos = str_pad($segundos, 2, 0, STR_PAD_LEFT); + + return $horas . ':' . $minutos . ":" . $segundos; + }else{ + return "00:00:00"; + } + } + + public function diferenciaFechas($t1, $t2){ + + $tiempo_atencion = Carbon::parse($t1)->diffInMinutes(Carbon::parse($t2)); + $d = intval($tiempo_atencion / 1440); + $h = intval(($tiempo_atencion - ($d * 1440)) / 60); + $m = intval(($tiempo_atencion - ($d * 1440) - ($h * 60)) % 60); + + return $d.' días, '.$h.' horas y '.$m.' minutos'; + } + + public function formatearFechaHora($fecha_hora){ + + list($fecha, $hora) = explode(" ", $fecha_hora); + list($y, $m, $d) = explode("-", $fecha); + list($hr, $min) = explode(":", $hora); + + return $d.'/'.$m.'/'.$y.' '.$hr.':'.$min; + } + + public function base64ToImage($base64, $mime = 'image/jpeg'){ + $image_decode = base64_decode($base64); + $resource = imagecreatefromstring($image_decode); + + ob_start(); + + if($mime === 'image/jpeg'){ + imagejpeg($resource); + }else{ + imagepng($resource); + } + + return ob_get_clean(); + } + + public function camposSolicitudesServiciosOperador(){ + + $user = Auth::user(); + $costo_servicio_negativo = Sucursal::select('costo_negativo')->where('sucursales.id', $user->sucursal_id)->first(); + + return [ + 'servicios_enc.id as solicitud_servicio_id', + 'servicios_enc.forma_pago_id', + 'cat_formas_pagos.nombre as forma_pago_nombre', + 'fecha_agenda', + 'usuario_agenda_id', + 'users.nombre as usuario_agenda_nombre', + 'users.apellido_paterno as usuario_agenda_apellido_paterno', + 'users.apellido_materno as usuario_agenda_apellido_materno', + 'servicios_enc.cliente_id', + 'clientes.denominacion', + 'servicios_enc.cliente_domicilio_id', + 'clientes_domicilios.nombre_responsable_sucursal as clientes_nombre_responsable_sucursal', + 'clientes_domicilios.celular_responsable as clientes_celular_responsable', + 'clientes_domicilios.calle as clientes_calle', + 'clientes_domicilios.num_ext as clientes_num_ext', + 'clientes_domicilios.num_int as clientes_num_int', + 'clientes_domicilios.colonia as clientes_colonia', + 'clientes_domicilios.cp as clientes_cp', + 'clientes_domicilios.ciudad as clientes_ciudad', + 'clientes_domicilios.telefono as clientes_telefono', + 'clientes_domicilios.lat as clientes_lat', + 'clientes_domicilios.lng as clientes_lng', + 'clientes_domicilios.nombre_croquis as nombre_croquis', + 'clientes_domicilios.nombre_sucursal as nombre_sucursal', + 'servicios_enc.deleted_at', + 'servicios_det.id', + 'servicios_det.servicio_id', + 'cat_servicios.nombre as servicio_nombre', + 'servicios_det.estatus_servicio_id', + 'cat_estatus_servicios.nombre as estatus_servicio_nombre', + 'servicios_det.tipo_servicio_id', + 'cat_tipos_servicios.nombre as tipo_servicio_nombre', + 'cat_estatus_servicios.color_1 as estatus_servicio_color_1', + 'cat_estatus_servicios.color_2 as estatus_servicio_color_2', + 'fecha_solicitud', + 'servicios_det.duracion', + 'definido_cliente', + 'servicios_det.operador_id', + 'operador.nombre as operador_nombre', + 'operador.apellido_paterno as operador_apellido_paterno', + 'operador.apellido_materno as operador_apellido_materno', + 'servicios_det.vehiculo_id', + 'cat_vehiculos.num_economico as vehiculo_num_economico', + 'servicios_det.fecha_solicitud', + 'sucursales.nombre as vehiculo_sucursal', + 'sucursales.id as vehiculo_sucursal_id', + 'sucursal_operador.nombre as operador_sucursal', + 'sucursal_operador.id as operador_sucursal_id', + 'servicios_det.auxiliar_1 as auxiliar_1_id', + 'servicios_det.auxiliar_2 as auxiliar_2_id', + 'auxiliares_1.nombre as auxiliar_1', + 'auxiliares_1.apellido_paterno as auxiliar_1_apellido_paterno', + 'auxiliares_1.apellido_materno as auxiliar_1_apellido_materno', + 'auxiliares_2.nombre as auxiliar_2', + 'sucursal_auxiliares_1.nombre as sucursal_auxiliar_1', + 'sucursal_auxiliares_2.nombre as sucursal_auxiliar_2', + 'servicios_det.costo_servicio', + 'servicios_det.aceptado', + 'servicios_det.observacion_atencion_cliente', + 'servicios_det.requiere_encuesta', + DB::raw("$costo_servicio_negativo->costo_negativo as 'costo_servicio_negativo'") + ]; + } + + public function getMicroSeconds(){ + $micro = explode(" ", microtime()); + return $micro[1]; + } + + public function decodeZip($base64, $path){ + $zip = base64_decode($base64); + file_put_contents($path, $zip); + return $path; + } +} diff --git a/app/Http/Controllers/Operador/CheckListController.php b/app/Http/Controllers/Operador/CheckListController.php new file mode 100644 index 0000000..e33b778 --- /dev/null +++ b/app/Http/Controllers/Operador/CheckListController.php @@ -0,0 +1,469 @@ +format('Y-m-d'); + $checklist = [ + [ + 'id' => 1, + 'nombre' => "VEHÍCULO ASIGNADO", + 'tipo_radio_btn' => 0, + 'tipo_text' => 0, + 'tipo_checkbox' => 0, + 'tipo' => 'REVISION', + 'fecha' => $now + ], + [ + 'id' => 2, + 'nombre' => "NIVEL DE ACEITE MOTOR PRINCIPAL", + 'tipo_radio_btn' => 1, + 'tipo_text' => 1, + 'tipo_checkbox' => 0, + 'tipo' => 'REVISION', + 'fecha' => $now + ], + [ + 'id' => 3, + 'nombre' => "NIVEL DE ANTICONGELANTE MOTOR PRINCIPAL", + 'tipo_radio_btn' => 1, + 'tipo_text' => 1, + 'tipo_checkbox' => 0, + 'tipo' => 'REVISION', + 'fecha' => $now + ], + [ + 'id' => 4, + 'nombre' => "NIVEL ACEITE HIDRAULICO MOTOR PRINCIPAL", + 'tipo_radio_btn' => 1, + 'tipo_text' => 1, + 'tipo_checkbox' => 0, + 'tipo' => 'REVISION', + 'fecha' => $now + ], + [ + 'id' => 5, + 'nombre' => "NIVEL DE ANTICONGELANTE BOMBA SUCCION", + 'tipo_radio_btn' => 1, + 'tipo_text' => 1, + 'tipo_checkbox' => 0, + 'tipo' => 'REVISION', + 'fecha' => $now + ], + [ + 'id' => 6, + 'nombre' => "NIVEL DE ACEITE BOMBA DE SUCCION", + 'tipo_radio_btn' => 1, + 'tipo_text' => 1, + 'tipo_checkbox' => 0, + 'tipo' => 'REVISION', + 'fecha' => $now + ], + [ + 'id' => 7, + 'nombre' => "NIVEL DE COMBUSTIBLE MOTOR PRINCIPAL", + 'tipo_radio_btn' => 1, + 'tipo_text' => 1, + 'tipo_checkbox' => 0, + 'tipo' => 'REVISION', + 'fecha' => $now + ], + [ + 'id' => 8, + 'nombre' => "NIVEL DE COMBUSTIBLE MOTOR AUXILIAR", + 'tipo_radio_btn' => 1, + 'tipo_text' => 1, + 'tipo_checkbox' => 0, + 'tipo' => 'REVISION', + 'fecha' => $now + ], + [ + 'id' => 9, + 'nombre' => "NIVEL DE TANQUE DE AGUA", + 'tipo_radio_btn' => 1, + 'tipo_text' => 1, + 'tipo_checkbox' => 0, + 'tipo' => 'REVISION', + 'fecha' => $now + ], + [ + 'id' => 10, + 'nombre' => "REVISION DE LLANTAS", + 'tipo_radio_btn' => 1, + 'tipo_text' => 1, + 'tipo_checkbox' => 0, + 'tipo' => 'REVISION', + 'fecha' => $now + ], + [ + 'id' => 11, + 'nombre' => "LIMPIEZA DE VEHÍCULO", + 'tipo_radio_btn' => 0, + 'tipo_text' => 1, + 'tipo_checkbox' => 0, + 'tipo' => 'REVISION', + 'fecha' => $now + ], + [ + 'id' => 12, + 'nombre' => "REPORTE DE FALLAS E INCIDENCIAS", + 'tipo_radio_btn' => 0, + 'tipo_text' => 1, + 'tipo_checkbox' => 0, + 'tipo' => 'REVISION', + 'fecha' => $now + ], + [ + 'id' => 13, + 'nombre' => "TARJETA DE CIRCULACIÓN", + 'tipo_radio_btn' => 0, + 'tipo_text' => 0, + 'tipo_checkbox' => 1, + 'tipo' => 'MATERIAL', + 'fecha' => $now + ], + [ + 'id' => 14, + 'nombre' => "MALETIN", + 'tipo_radio_btn' => 0, + 'tipo_text' => 0, + 'tipo_checkbox' => 1, + 'tipo' => 'MATERIAL', + 'fecha' => $now + ], + [ + 'id' => 15, + 'nombre' => "LICENCIA VIGENTE", + 'tipo_radio_btn' => 0, + 'tipo_text' => 0, + 'tipo_checkbox' => 1, + 'tipo' => 'MATERIAL', + 'fecha' => $now + ], + [ + 'id' => 16, + 'nombre' => "PÓLIZA DE SEGURO", + 'tipo_radio_btn' => 0, + 'tipo_text' => 0, + 'tipo_checkbox' => 1, + 'tipo' => 'MATERIAL', + 'fecha' => $now + ], + [ + 'id' => 17, + 'nombre' => "ALTA DE SEGURO", + 'tipo_radio_btn' => 0, + 'tipo_text' => 0, + 'tipo_checkbox' => 1, + 'tipo' => 'MATERIAL', + 'fecha' => $now + ], + [ + 'id' => 18, + 'nombre' => "RECIBOS", + 'tipo_radio_btn' => 0, + 'tipo_text' => 0, + 'tipo_checkbox' => 1, + 'tipo' => 'MATERIAL', + 'fecha' => $now + ], + /*[ + 'id' => 19, + 'nombre' => "ENCUESTA", + 'tipo_radio_btn' => 0, + 'tipo_text' => 0, + 'tipo_checkbox' => 1, + 'tipo' => 'MATERIAL', + 'fecha' => $now + ],*/ + [ + 'id' => 20, + 'nombre' => "PERMISO DE TIRADAS", + 'tipo_radio_btn' => 0, + 'tipo_text' => 0, + 'tipo_checkbox' => 1, + 'tipo' => 'MATERIAL', + 'fecha' => $now + ], + [ + 'id' => 21, + 'nombre' => "RADIO", + 'tipo_radio_btn' => 0, + 'tipo_text' => 0, + 'tipo_checkbox' => 1, + 'tipo' => 'MATERIAL', + 'fecha' => $now + ], + [ + 'id' => 22, + 'nombre' => "COMENTARIOS", + 'tipo_radio_btn' => 0, + 'tipo_text' => 1, + 'tipo_checkbox' => 0, + 'tipo' => 'MATERIAL', + 'fecha' => $now + ], + [ + 'id' => 23, + 'nombre' => "PALA", + 'tipo_radio_btn' => 0, + 'tipo_text' => 0, + 'tipo_checkbox' => 1, + 'tipo' => 'HERRAMIENTA', + 'fecha' => $now + ], + [ + 'id' => 24, + 'nombre' => "BARRA", + 'tipo_radio_btn' => 0, + 'tipo_text' => 0, + 'tipo_checkbox' => 1, + 'tipo' => 'HERRAMIENTA', + 'fecha' => $now + ], + [ + 'id' => 25, + 'nombre' => "ESPATULA", + 'tipo_radio_btn' => 0, + 'tipo_text' => 0, + 'tipo_checkbox' => 1, + 'tipo' => 'HERRAMIENTA', + 'fecha' => $now + ], + [ + 'id' => 26, + 'nombre' => "CAJA DE HERRAMIENTAS", + 'tipo_radio_btn' => 0, + 'tipo_text' => 0, + 'tipo_checkbox' => 1, + 'tipo' => 'HERRAMIENTA', + 'fecha' => $now + ], + [ + 'id' => 27, + 'nombre' => "SANITIZANTE", + 'tipo_radio_btn' => 0, + 'tipo_text' => 0, + 'tipo_checkbox' => 1, + 'tipo' => 'HERRAMIENTA', + 'fecha' => $now + ], + [ + 'id' => 28, + 'nombre' => "CONOS", + 'tipo_radio_btn' => 0, + 'tipo_text' => 0, + 'tipo_checkbox' => 1, + 'tipo' => 'HERRAMIENTA', + 'fecha' => $now + ], + [ + 'id' => 29, + 'nombre' => "CHALECO", + 'tipo_radio_btn' => 0, + 'tipo_text' => 0, + 'tipo_checkbox' => 1, + 'tipo' => 'HERRAMIENTA', + 'fecha' => $now + ], + [ + 'id' => 30, + 'nombre' => "CASCO", + 'tipo_radio_btn' => 0, + 'tipo_text' => 0, + 'tipo_checkbox' => 1, + 'tipo' => 'HERRAMIENTA', + 'fecha' => $now + ], + [ + 'id' => 31, + 'nombre' => "K-60", + 'tipo_radio_btn' => 0, + 'tipo_text' => 0, + 'tipo_checkbox' => 1, + 'tipo' => 'HERRAMIENTA', + 'fecha' => $now + ], + [ + 'id' => 32, + 'nombre' => "K-06", + 'tipo_radio_btn' => 0, + 'tipo_text' => 0, + 'tipo_checkbox' => 1, + 'tipo' => 'HERRAMIENTA', + 'fecha' => $now + ], + [ + 'id' => 33, + 'nombre' => "BOQUILLA SANITARIA", + 'tipo_radio_btn' => 0, + 'tipo_text' => 0, + 'tipo_checkbox' => 1, + 'tipo' => 'HERRAMIENTA', + 'fecha' => $now + ], + [ + 'id' => 34, + 'nombre' => "COMENTARIOS", + 'tipo_radio_btn' => 0, + 'tipo_text' => 1, + 'tipo_checkbox' => 0, + 'tipo' => 'HERRAMIENTA', + 'fecha' => $now + ] + ]; + + $reinicio = $request->input('cambiar_vehiculo', 0); + + if($reinicio == 0){ + if(RespuestaOperadorEnc::where('user_id',Auth::id())->whereDate('fecha',$now)->first()){ + $checklist = []; + } + } + + return response()->success($checklist); + } + + /** + * Store a newly created resource in storage. + * + * @param \Illuminate\Http\Request $request + * @return \Illuminate\Http\Response + */ + public function store(RespuestasOperadorRequest $request) + { + $user_id = Auth::id(); + $user = Auth::user(); + $data = $request->all(); + $ambiente = strtolower(config('ambiente')['ambiente']); + + $correos_sucursales_prod = CorreoSucursal::select('email')->where('correos_sucursales.sucursal_id', $user->sucursal_id)->get(); + $correos = ($ambiente == 'dev')? $correos_sucursales_prod : CORREOS_DEV; + + DB::beginTransaction(); + try { + + $fecha = $data[0]['fecha']; + + $respuesta_operador_enc = RespuestaOperadorEnc::create(['user_id' => $user_id, 'fecha' => $fecha]); + + foreach ($data as $d){ + + $info = [ + 'respuestas_operador_enc_id' => $respuesta_operador_enc->id, + 'nombre' => $d['nombre'], + 'tipo' => $d['tipo'], + 'tipo_checkbox' => $d['tipo_checkbox'], + 'tipo_text' => $d['tipo_text'], + 'tipo_radio_btn' => $d['tipo_radio_btn'], + 'respuesta_checkbox' => array_key_exists('respuesta_checkbox', $d) ? $d['respuesta_checkbox'] : null, + 'respuesta_text' => array_key_exists('respuesta_text', $d) ? $d['respuesta_text'] : null, + 'respuesta_radio_btn' => array_key_exists('respuesta_radio_btn', $d) ? $d['respuesta_radio_btn'] : null + ]; + + RespuestaOperadorDet::create($info); + } + + + DB::commit(); + + try { + Mail::to($correos)->send(new RespuestasOperador($respuesta_operador_enc->id)); + } catch (\Exception $e) { + \Log::info("Error al enviar correo: " . json_encode($e->getMessage())); + } + + return response()->success(['result' => 'ok']); + } catch (\Exception $e) { + DB::rollBack(); + Log::info($e->getMessage()); + return response()->unprocessable('Error', [$e->getMessage()]); + } + } + + /** + * Display the specified resource. + * + * @param int $id + * @return \Illuminate\Http\Response + */ + public function show($id) + { + Auth::user(); + + $campos = [ + 'user_id', + 'nombre', + 'tipo', + 'tipo_checkbox', + 'tipo_text', + 'tipo_radio_btn', + 'respuesta_checkbox', + 'respuesta_text', + 'respuesta_radio_btn', + 'fecha' + ]; + + $respuestas_operador = RespuestaOperador::select($campos) + ->where('user_id', $id) + ->first(); + + return response()->success($respuestas_operador); + } + + /** + * Update the specified resource in storage. + * + * @param \Illuminate\Http\Request $request + * @param int $id + * @return \Illuminate\Http\Response + */ + public function update(Request $request, $id) + { + // + } + + /** + * Remove the specified resource from storage. + * + * @param int $id + * @return \Illuminate\Http\Response + */ + public function destroy($id) + { + // + } + + public function vehiculos(){ + + $vehiculos = Vehiculo::select('id', 'num_economico as nombre')->get(); + + return response()->success($vehiculos); + } +} diff --git a/app/Http/Controllers/Operador/DesplazamientosController.php b/app/Http/Controllers/Operador/DesplazamientosController.php new file mode 100644 index 0000000..13d3fd1 --- /dev/null +++ b/app/Http/Controllers/Operador/DesplazamientosController.php @@ -0,0 +1,28 @@ +toArray(); + + Auth::user($data) + ->desplazamientos() + ->createMany($data);*/ + + return response()->success(['result' => 'ok']); + } +} diff --git a/app/Http/Controllers/Operador/EncuestasController.php b/app/Http/Controllers/Operador/EncuestasController.php new file mode 100644 index 0000000..05d0ae5 --- /dev/null +++ b/app/Http/Controllers/Operador/EncuestasController.php @@ -0,0 +1,130 @@ +format('Y-m-d'); + $servicio_det = ServicioDet::where('id', $servicio_id)->firstOrFail(); + + list($fecha) = explode(" ", $servicio_det->fecha_solicitud); + + //Validar fecha de solicitud + if($now != $fecha){ + //return response()->unprocessable('Parametros inválidos',['No se puede realizar la encuesta ya que corresponde a otra fecha.']); + } + + $data = $request->all(); + + if($servicio_det->tipo_servicio_id == DOMESTICO) { + $validator = Validator::make($data, [ + '*.pregunta_id' => 'numeric|exists:preguntas_domestico,id', + '*.respuesta_id' => 'numeric|exists:respuestas_domestico,id', + '*.respuesta' => 'string|max:255' + ]); + + if(ServicioEncuestaDomestico::where('servicio_det_id', $servicio_id)->first()){ + //return response()->unprocessable('Parametros inválidos',['La encuesta para este servicio ya se realizó.']); + return response()->success(['result' => 'ok']); + } + + foreach ($data as $d){ + if(isset($d['respuesta_id'])){ + $respuesta = RespuestaDomestico::where('pregunta_id', $d['pregunta_id']) + ->where('id', $d['respuesta_id']) + ->first(); + + if(!$respuesta){ + return response()->unprocessable('Parametros inválidos',['La respuesta no corresponde a la pregunta.']); + } + } + } + }else{ + $validator = Validator::make($data, [ + '*.pregunta_id' => 'numeric|exists:preguntas_empresarial,id', + '*.respuesta_id' => 'numeric|exists:respuestas_empresarial,id', + '*.respuesta' => 'string|max:255' + ]); + + if(ServicioEncuestaEmpresarial::where('servicio_det_id', $servicio_id)->first()){ + //return response()->unprocessable('Parametros inválidos',['La encuesta para este servicio ya se realizó.']); + return response()->success(['result' => 'ok']); + } + + foreach ($data as $d){ + if(isset($d['respuesta_id'])){ + $respuesta = RespuestaEmpresarial::where('pregunta_id', $d['pregunta_id']) + ->where('id', $d['respuesta_id']) + ->first(); + + if(!$respuesta){ + return response()->unprocessable('Parametros inválidos',['La respuesta no corresponde a la pregunta.']); + } + } + } + } + + if($validator->fails()){ + return response()->unprocessable('Parametros inválidos',$validator->errors()->all()); + } + + DB::beginTransaction(); + try { + if($servicio_det->tipo_servicio_id == DOMESTICO) { + foreach ($data as $d){ + + $data_domestico = [ + 'servicio_det_id' => $servicio_id, + 'pregunta_id' => $d['pregunta_id'], + 'respuesta_id' => (isset($d['respuesta_id']))? $d['respuesta_id'] : null, + 'respuesta' => (isset($d['respuesta']))? $d['respuesta'] : null + ]; + ServicioEncuestaDomestico::create($data_domestico); + } + + }else{ + foreach ($data as $d){ + $data_empresarial = [ + 'servicio_det_id' => $servicio_id, + 'pregunta_id' => $d['pregunta_id'], + 'respuesta_id' => (isset($d['respuesta_id']))? $d['respuesta_id'] : null, + 'respuesta' => (isset($d['respuesta']))? $d['respuesta'] : null + ]; + ServicioEncuestaEmpresarial::create($data_empresarial); + } + } + + $servicio_progreso = ServicioProgreso::where('servicio_enc_id', $servicio_det->servicio_enc_id) + ->where('servicio_det_id', $servicio_det->id) + ->first(); + + if($servicio_progreso){ + $servicio_progreso->update(['encuesta_contestada' => 1]); + } + + DB::commit(); + + return response()->success(['result' => 'ok']); + } catch (\Exception $e) { + DB::rollBack(); + return response()->unprocessable('Error', ['Error al realizar la encuesta.']); + } + } +} diff --git a/app/Http/Controllers/Operador/JornadaController.php b/app/Http/Controllers/Operador/JornadaController.php new file mode 100644 index 0000000..1d8ce7d --- /dev/null +++ b/app/Http/Controllers/Operador/JornadaController.php @@ -0,0 +1,193 @@ +all(); + + $user = Auth::user(); + $fecha = Carbon::now()->toDateTimeString(); + + DB::beginTransaction(); + try { + + $bitacora = BitacoraLaboral::where('usuario_id', $user->id) + ->whereNull('fecha_hora_fin') + ->first(); + + if($bitacora){ + DB::rollBack(); + return response()->unprocessable('JORNADA_YA_INICIADA', [$bitacora->id]); + } + + $campos = $this->camposSolicitudesServiciosOperador(); + + $servicios = ServicioDet::select($campos) + ->joinDetalleServicioDet() + ->joinDetalleServicioDetMovil() + ->leftJoin('servicios_progreso', function($join) + { + $join->on('servicios_enc.id', '=', 'servicios_progreso.servicio_enc_id'); + $join->on('servicios_det.id', '=', 'servicios_progreso.servicio_det_id'); + }) + ->whereNull('servicios_progreso.id') + ->whereIn('servicios_det.estatus_servicio_id', [PENDIENTE, REPROGRAMADO, VISITA, PAGADO]) + ->where('servicios_det.operador_id', $user->id) + ->where('servicios_enc.sucursal_id', $user->sucursal_id) + ->whereDate('servicios_det.fecha_solicitud', Carbon::now()->format('Y-m-d')) + ->orderBy('servicios_det.fecha_solicitud') + ->get(); + + /*$fecha_actual = Carbon::now()->format('Y-m-d'); + + $servicios = []; + + foreach ($servicios_list as $s){ + + $fecha_asignacion = Carbon::createFromTimeString($s->fecha_agenda)->format('Y-m-d'); + + if($fecha_asignacion == $fecha_actual && $s->aceptado){ + $servicios[] = $s; + }elseif ($fecha_asignacion != $fecha_actual){ + $servicios[] = $s; + } + }*/ + + $encuesta_operador = RespuestaOperadorEnc::select('respuestas_operador_enc.id') + ->join('respuestas_operador_det', 'respuestas_operador_det.respuestas_operador_enc_id', '=', 'respuestas_operador_enc.id') + ->where('respuestas_operador_enc.user_id', $user->id) + ->orderBy('respuestas_operador_enc.created_at','desc') + ->first(); + + $vehiculo_operador = RespuestaOperadorDet::select('cat_vehiculos.id', 'respuestas_operador_det.respuesta_text') + ->join('respuestas_operador_enc', 'respuestas_operador_enc.id', '=', 'respuestas_operador_det.respuestas_operador_enc_id') + ->join('cat_vehiculos','cat_vehiculos.num_economico', '=', 'respuestas_operador_det.respuesta_text') + ->where('respuestas_operador_enc.user_id', $user->id) + ->where('respuestas_operador_det.nombre', '=',VEHICULO_ASIGNADO) + ->where('respuestas_operador_det.respuestas_operador_enc_id', $encuesta_operador->id) + ->first(); + + //$servi = collect($servicios)->first(); + //$data['vehiculo_id'] = ($servi) ? $servi->vehiculo_id : null; + + $data['vehiculo_id'] = ($vehiculo_operador->id) ? $vehiculo_operador->id : 2; + + $data['usuario_id'] = $user->id; + $data['fecha_hora_ini'] = $fecha; + $jornada = BitacoraLaboral::create($data); + + $data_desplazamiento = [ + 'bitacora_laboral_id' => $jornada->id, + 'usuario_id' => $user->id, + 'fecha' => $fecha, + 'modelo_celular' => $data['modelo_celular'], + 'bateria' => $data['bateria'], + 'lat' => $data['lat_ini'], + 'lng' => $data['lng_ini'] + ]; + + UsuarioDesplazamiento::create($data_desplazamiento); + + User::where('id', $user->id)->first()->update(['token_firebase' => $data['token_firebase']]); + + $parametros = Parametro::get(); + + $encuesta_domestico = PreguntaDomestico::get(); + + foreach ($encuesta_domestico as $eD){ + $eD->respuestas = RespuestaDomestico::where('pregunta_id', $eD->id)->get(); + } + + $encuesta_empresarial = PreguntaEmpresarial::get(); + + foreach ($encuesta_empresarial as $eE){ + $eE->respuestas = RespuestaEmpresarial::where('pregunta_id', $eE->id)->get(); + } + + $motivos_estatus = CatMotivoEstatus::select('id', 'nombre as descripcion') + ->get(); + + DB::commit(); + + return response()->success(compact('servicios', 'parametros', 'jornada', 'encuesta_domestico', 'encuesta_empresarial', 'motivos_estatus')); + } catch (\Exception $e) { + DB::rollBack(); + Log::info($e->getMessage()); + return response()->unprocessable('Error', ['Error al guardar el inicio de jornada.']); + } + } + + public function finalizarJornada(FinalizarJornadaRequest $request, $id){ + + $data = $request->all(); + + $user = Auth::user(); + $fecha = Carbon::now()->toDateTimeString(); + + DB::beginTransaction(); + try { + + $jornada = BitacoraLaboral::where('id',$id) + ->first(); + + if($jornada->fecha_hora_fin){ + DB::rollBack(); + return response()->unprocessable('Error', ['La jornada ya se encuentra finalizada.']); + } + + $data['fecha_hora_fin'] = $fecha; + $jornada->update($data); + + $data_desplazamiento = [ + 'bitacora_laboral_id' => $id, + 'usuario_id' => $user->id, + 'fecha' => $fecha, + 'modelo_celular' => $data['modelo_celular'], + 'bateria' => $data['bateria'], + 'lat' => $data['lat_fin'], + 'lng' => $data['lng_fin'] + ]; + + UsuarioDesplazamiento::create($data_desplazamiento); + + User::where('id', $user->id)->update(['token_firebase' => NULL]); + DB::commit(); + + return response()->success(['result' => 'ok']); + } catch (\Exception $e) { + DB::rollBack(); + return response()->unprocessable('Error', ['Error al guardar el fin de jornada.']); + } + } +} diff --git a/app/Http/Controllers/Operador/ServiciosController.php b/app/Http/Controllers/Operador/ServiciosController.php new file mode 100644 index 0000000..69399be --- /dev/null +++ b/app/Http/Controllers/Operador/ServiciosController.php @@ -0,0 +1,267 @@ +last_login)->isToday()){ + return response()->json(['error'=>'Es necesario iniciar sesión el día de hoy'],420); + } + + $ayer = Carbon::yesterday()->format('Y-m-d 23:00:00'); + $hoy = Carbon::now()->format('Y-m-d 23:59:59'); + + $campos = $this->camposSolicitudesServiciosOperador(); + + $s = ServicioDet::select($campos) + ->joinDetalleServicioDet() + ->joinDetalleServicioDetMovil() + ->leftJoin('servicios_progreso', function($join) + { + $join->on('servicios_enc.id', '=', 'servicios_progreso.servicio_enc_id'); + $join->on('servicios_det.id', '=', 'servicios_progreso.servicio_det_id'); + }) + ->whereNull('servicios_progreso.id') + ->whereIn('servicios_det.estatus_servicio_id', [PENDIENTE, REPROGRAMADO, VISITA, PAGADO]) + ->where('servicios_det.operador_id', $user->id) + ->where('servicios_enc.sucursal_id', $user->sucursal_id) + ->whereBetween('servicios_det.fecha_solicitud', [$ayer, $hoy]) + ->get(); + + $servicios_progresos = ServicioProgreso::select('servicio_det_id')->get(); + if(count($servicios_progresos) != 0){ + $servicios = collect($s)->whereNotIn('id',$servicios_progresos->pluck('servicio_det_id'))->all(); + }else{ + $servicios = $s; + } + + $tiempo_anclaje = Parametro::where('llave',LLAVE_ANCLAJE_SERVICIO_HORAS)->first(); + $tiempo_anclaje = ($tiempo_anclaje)? $tiempo_anclaje->valor : ANCLAJE_SERVICIO_HORAS; + $tiempo_anclaje = (1 + $tiempo_anclaje) * 60; + + $data = []; + $hoy = Carbon::now(); + $hoy_dia = $hoy->format('Y-m-d'); + + foreach ($servicios as $s){ + if(Carbon::parse($s->fecha_solicitud)->format('Y-m-d') == $hoy_dia){ + array_push($data, $s); + }else{ + if(Carbon::parse($s->fecha_solicitud)->diffInMinutes($hoy) <= $tiempo_anclaje){ + array_push($data, $s); + } + } + } + + //Comentado por rechazo del cliente + /*$fecha_actual = Carbon::now()->format('Y-m-d'); + + $salida = []; + + foreach ($servicios as $s){ + + $fecha_asignacion = Carbon::createFromTimeString($s->fecha_agenda)->format('Y-m-d'); + + if($fecha_asignacion == $fecha_actual && $s->aceptado){ + $salida[] = $s; + }elseif ($fecha_asignacion != $fecha_actual){ + $salida[] = $s; + } + }*/ + + return response()->success($data); + } + + /** + * Display the specified resource. + * + * @param int $id + * @return \Illuminate\Http\Response + */ + public function show($id) + { + $user = Auth::user(); + + $campos = $this->camposSolicitudesServiciosOperador(); + + $servicios = ServicioDet::select($campos) + ->joinDetalleServicioDet() + ->joinDetalleServicioDetMovil() + ->where('servicios_det.id', $id) + ->whereIn('servicios_det.estatus_servicio_id', [PENDIENTE, REPROGRAMADO, VISITA, PAGADO]) + ->where('servicios_det.operador_id', $user->id) + ->where('servicios_enc.sucursal_id', $user->sucursal_id) + ->whereDate('servicios_det.fecha_solicitud', Carbon::now()->format('Y-m-d')) + ->first(); + + return response()->success($servicios); + } + + public function aceptarSolicitud($id){ + + DB::beginTransaction(); + try { + + $ambiente = strtolower(config('ambiente')['ambiente']); + + $url = config('ambiente')[$ambiente]; + + $servicio_det = ServicioDet::where('id',$id)->first(); + + if(!$servicio_det){ + DB::rollBack(); + return response()->unprocessable('Error', ['El servicio no se encontró en nuestros registros.']); + } + + $servicio_det->update(['aceptado' => 1]); + + $servicio_enc = ServicioEnc::where('id',$servicio_det->servicio_enc_id)->first(); + $usuario = User::where('id', $servicio_enc->usuario_agenda_id)->first(); + + if($usuario->token_firebase) { + + $authorization = config('firebase')['authorization']; + $project_id = config('firebase')['project_id']; + $endpoint = config('firebase')['endpoint']; + + $headers = [ + 'Authorization' => 'key=' . $authorization, + 'project_id' => $project_id, + 'content-type' => 'application/json' + ]; + + $cat_servicio = CatServicio::where('id', $servicio_det->servicio_id)->first(); + + $datos = ['registration_ids' => array($usuario->token_firebase), + 'data' => ['url' => $url, 'solicitud_id' => $servicio_det->servicio_enc_id,'servicio_id' => $id, 'title' => 'Servicio Aceptado', 'body' => $cat_servicio->nombre, 'observacion' => '']]; + + $client = new Client(); + $client->post($endpoint, [ + 'headers' => $headers, + 'json' => $datos, + ]); + } + + DB::commit(); + + return response()->success(['result' => 'ok']); + + } catch (\Exception $e) { + DB::rollBack(); + return response()->unprocessable('Error', ['Error al aceptar solicitud.']); + } + } + + public function rechazarSolicitud(RechazarSolicitudRequest $request, $id){ + + $data = $request->all(); + + DB::beginTransaction(); + try { + + $ambiente = strtolower(config('ambiente')['ambiente']); + + $url = config('ambiente')[$ambiente]; + + $servicio_det = ServicioDet::where('id',$id)->first(); + + if(!$servicio_det){ + DB::rollBack(); + return response()->unprocessable('Error', ['El servicio no se encontró en nuestros registros.']); + } + + $servicio_det->update(['aceptado' => 0, 'operador_id' => null, 'vehiculo_id' => null, 'auxiliar_1' => null, 'auxiliar_2' => null, 'observacion' => $data['observacion']]); + + $servicio_enc = ServicioEnc::where('id',$servicio_det->servicio_enc_id)->first(); + $usuario = User::where('id', $servicio_enc->usuario_agenda_id)->first(); + + if($usuario->token_firebase) { + + $authorization = config('firebase')['authorization']; + $project_id = config('firebase')['project_id']; + $endpoint = config('firebase')['endpoint']; + + $headers = [ + 'Authorization' => 'key=' . $authorization, + 'project_id' => $project_id, + 'content-type' => 'application/json' + ]; + + $cat_servicio = CatServicio::where('id', $servicio_det->servicio_id)->first(); + + $datos = ['registration_ids' => array($usuario->token_firebase), + 'data' => ['url' => $url, 'solicitud_id' => $servicio_det->servicio_enc_id, 'servicio_id' => $id, 'title' => 'Servicio Rechazado', 'body' => $cat_servicio->nombre, 'observacion' => $data['observacion']]]; + + $client = new Client(); + $client->post($endpoint, [ + 'headers' => $headers, + 'json' => $datos, + ]); + } + + DB::commit(); + + return response()->success(['result' => 'ok']); + + } catch (\Exception $e) { + DB::rollBack(); + return response()->unprocessable('Error', ['Error al rechazar solicitud.']); + } + } + + public function ServiciosDiaSiguiente() + { + $user = Auth::user(); + + $campos = $this->camposSolicitudesServiciosOperador(); + + $s = ServicioDet::select($campos) + ->joinDetalleServicioDet() + ->joinDetalleServicioDetMovil() + ->whereIn('servicios_det.estatus_servicio_id', [PENDIENTE, REPROGRAMADO, VISITA, PAGADO]) + ->where('servicios_det.operador_id', $user->id) + ->where('servicios_enc.sucursal_id', $user->sucursal_id) + ->whereDate('servicios_det.fecha_solicitud', Carbon::tomorrow()->format('Y-m-d')) + ->get(); + + + $servicios_progresos = ServicioProgreso::select('servicio_det_id')->get(); + if(count($servicios_progresos) != 0){ + $servicios = collect($s)->whereNotIn('id',$servicios_progresos->pluck('servicio_det_id'))->all(); + }else{ + $servicios = $s; + } + + return response()->success($servicios); + } +} diff --git a/app/Http/Controllers/Operador/ServiciosProgresoController.php b/app/Http/Controllers/Operador/ServiciosProgresoController.php new file mode 100644 index 0000000..8e27237 --- /dev/null +++ b/app/Http/Controllers/Operador/ServiciosProgresoController.php @@ -0,0 +1,474 @@ +all(); + $now = Carbon::now()->format('Y-m-d'); + $servicio = ServicioProgreso::where('servicio_enc_id', $data['servicio_enc_id']) + ->where('servicio_det_id', $data['servicio_det_id']) + ->first(); + + $servicio_det = ServicioDet::where('servicio_enc_id', $data['servicio_enc_id']) + ->where('id', $data['servicio_det_id']) + ->first(); + + list($fecha) = explode(" ", $servicio_det->fecha_solicitud); + + //Validar fecha de solicitud + if($now != $fecha){ + //return response()->unprocessable('Parametros inválidos',['El servicio no se puede iniciar ya que corresponde a otra fecha.']); + } + + //Validar que el servicio no este iniciado + if($servicio){ + return response()->unprocessable('Parametros inválidos',['El servicio ya está iniciado.']); + } + $data['fecha_ini_servidor'] = Carbon::now()->toDateTimeString(); + + //Se agrego por detalle de Geolocalizacion + $servicio_enc = ServicioEnc::select('clientes_domicilios.lat','clientes_domicilios.lng') + ->join('clientes_domicilios','servicios_enc.cliente_domicilio_id', '=','clientes_domicilios.id') + ->where('servicios_enc.id', $servicio_det->servicio_enc_id) + ->first(); + + $data['lat_ini'] = $servicio_enc->lat; + $data['lng_ini'] = $servicio_enc->lng; + // + + ServicioProgreso::create($data); + + return response()->success(['result' => 'ok']); + } + + /** + * Finalizar Servicio. + * + * @param \Illuminate\Http\Request $request + * @return \Illuminate\Http\Response + */ + public function finalizarServicio(FinalizarServicioRequest $request) + { + $data = $request->only(['fecha_fin_celular', 'duracion', 'lat_fin', 'lng_fin', 'comentarios', 'aplica_garantia','litraje']); + $cat_motivos_estatus_id = $request->input('cat_motivos_estatus_id',0); + $now = Carbon::now(); + + $servicio_enc_id = $request->input('servicio_enc_id'); + $servicio_det_id = $request->input('servicio_det_id'); + $litraje = $request->litraje; + + $servicio_progreso = ServicioProgreso::where('servicio_enc_id', $servicio_enc_id) + ->where('servicio_det_id', $servicio_det_id) + ->first(); + + $servicio_det = ServicioDet::where('servicio_enc_id', $servicio_enc_id) + ->where('id', $servicio_det_id) + ->first(); + $servicio = ServicioEnc::where('id', $servicio_enc_id)->first(); + + $correos = []; + $correo_cliente = Cliente::select('email')->where('id', $servicio->cliente_id)->first(); + $correo_cliente_domicilio = ClienteDomicilio::select('email')->where('id', $servicio->cliente_domicilio_id)->first(); + + if($correo_cliente && $correo_cliente->email){ + array_push($correos, $correo_cliente->email); + } + if($correo_cliente_domicilio && $correo_cliente_domicilio->email){ + array_push($correos, $correo_cliente_domicilio->email); + } + + //Validar fecha de solicitud + /* + list($fecha) = explode(" ", $servicio_det->fecha_solicitud); + + if($now->format('Y-m-d') != $fecha){ + return response()->unprocessable('Parametros inválidos',['No se puede finalizar el servicio ya que corresponde a otra fecha.']); + }*/ + + //Validar que el servicio no este terminado + if($servicio_det->estatus_servicio_id == REALIZADO){ + return response()->unprocessable('Parametros inválidos',['El servicio ya está terminado']); + } + + //Validar que el servicio esté iniciado + if(!$servicio_progreso){ + return response()->unprocessable('Parametros inválidos',['El servicio no está iniciado.']); + } + + DB::beginTransaction(); + try { + $data['fecha_fin_servidor'] = $now->toDateTimeString(); + + //Se agrego por detalle de Geolocalizacion + $servicio_enc = ServicioEnc::select('clientes_domicilios.lat','clientes_domicilios.lng') + ->join('clientes_domicilios','servicios_enc.cliente_domicilio_id', '=','clientes_domicilios.id') + ->where('servicios_enc.id', $servicio_det->servicio_enc_id) + ->first(); + $data['lat_fin'] = $servicio_enc->lat; + $data['lng_fin'] = $servicio_enc->lng; + if($litraje == 0){ + $data['litraje'] = null; + }else{ + $data['litraje'] = $litraje; + } + + $servicio_progreso->update($data); + if ($cat_motivos_estatus_id != 0){ + $servicio_det->update( + [ + 'estatus_servicio_id' => NEGATIVO, + 'cat_motivos_estatus_id' => $cat_motivos_estatus_id, + 'costo_servicio' => COSTO_SERVICIO_NEGATIVO, + ] + ); + } else{ + $servicio_det->update(['estatus_servicio_id' => REALIZADO]); + } + + DB::commit(); + + try { + if(count($correos) > 0){ + Mail::to($correos)->send(new SolicitudServicioTerminado($servicio_enc_id,$servicio_det_id)); + } + }catch (\Exception $e){ + return response()->success(['result' => 'ok']); + } + + return response()->success(['result' => 'ok']); + + } catch (\Exception $e) { + DB::rollBack(); + Log::info($e); + return response()->unprocessable('Error', ['Error al finalizar servicio.']); + } + } + + /** + * Guardar Evidencia. + * + * @param \Illuminate\Http\Request $request + * @return \Illuminate\Http\Response + */ + public function guardarEvidencia(GuardarEvidenciaRequest $request) + { + $data = $request->only(['etapa', 'lat', 'lng', 'servicio_enc_id', 'servicio_det_id']); + + $servicio_progreso = ServicioProgreso::where('servicio_enc_id', $data['servicio_enc_id']) + ->where('servicio_det_id', $data['servicio_det_id']) + ->first(); + + $servicio_det = ServicioDet::where('servicio_enc_id', $data['servicio_enc_id']) + ->where('id', $data['servicio_det_id']) + ->first(); + + //Validar que el servicio no este terminado + if($servicio_det->estatus_servicio_id == REALIZADO){ + return response()->success(['result' => 'ok']); + } + + //Validar que el servicio esté iniciado + if(!$servicio_progreso){ + return response()->success(['result' => 'ok']); + } + + //Validar imagen + if (!$request->hasFile('imagen') || !$request->file('imagen')->isValid()){ + return response()->success(['result' => 'ok']); + } + + //Validar etapa + if($data['etapa'] != 'Inicio' && $data['etapa'] != 'Proceso' && $data['etapa'] != 'Final'){ + return response()->success(['result' => 'ok']); + } + + $imagen = $request->imagen; + + $uuid = $imagen->hash('sha256'); + + //Validar que la imagen no haya sido capturada + if(ServicioEvidencia::where('uuid', $uuid)->first()){ + return response()->success(['result' => 'ok']); + } + + DB::beginTransaction(); + try { + + $data['uuid'] = $uuid; + $data['servicio_progreso_id'] = $servicio_progreso->id; + + //Se agrego por detalle de Geolocalizacion + $servicio_enc = ServicioEnc::select('clientes_domicilios.lat','clientes_domicilios.lng') + ->join('clientes_domicilios','servicios_enc.cliente_domicilio_id', '=','clientes_domicilios.id') + ->where('servicios_enc.id', $servicio_det->servicio_enc_id) + ->first(); + $data['lat'] = $servicio_enc->lat; + $data['lng'] = $servicio_enc->lng; + // + + $evidencia = ServicioEvidencia::create($data); + + /* + * IMAGEN + */ + + $nombre_img = 'solicitud_'.$data['servicio_enc_id'].'_servicio_'.$data['servicio_det_id'].'_evidencia_'.$evidencia->id.'.'.$imagen->extension(); + $imagen->storeAs('public/servicios/evidencias', $nombre_img); + + $evidencia->update(['imagen' => $nombre_img]); + + DB::commit(); + + return response()->success(['result' => 'ok']); + } catch (\Exception $e) { + DB::rollBack(); + Log::info($e); + return response()->success(['result' => 'ok']); + } + } + + /** + * Guardar Evidencia. + * + * @param \Illuminate\Http\Request $request + * @return \Illuminate\Http\Response + */ + public function guardarFirmas(GuardarFirmaRequest $request) + { + + $data = $request->only(['servicio_enc_id', 'servicio_det_id']); + + $servicio_progreso = ServicioProgreso::where('servicio_enc_id', $data['servicio_enc_id']) + ->where('servicio_det_id', $data['servicio_det_id']) + ->first(); + + /* + * Validar imagen + * Se comenta por el cambio de guardado + */ + if (!$request->hasFile('imagen') || !$request->file('imagen')->isValid()){ + return response()->success(['result' => 'ok']); + } + + $imagen = $request->imagen; + + try { + + /* + * IMAGEN + */ + + $nombre_img = 'firma_'.'solicitud_'.$data['servicio_enc_id'].'_servicio_'.$data['servicio_det_id'].'.'.$imagen->extension(); + $imagen->storeAs('public/servicios/firmas', $nombre_img); + + $servicio_progreso->update(['firma' => $nombre_img]); + + return response()->success(['result' => 'ok']); + } catch (\Exception $e) { + Log::info($e); + return response()->success(['result' => 'ok']); + } + } + + /** + * Guardar Evidencia. + * + * @param \Illuminate\Http\Request $request + * @return \Illuminate\Http\Response + */ + /*public function guardarEvidencia(GuardarEvidenciaRequest $request) + { + $data = $request->only(['etapa', 'lat', 'lng', 'servicio_enc_id', 'servicio_det_id']); + $imagen = $request->input('imagen'); + $now = Carbon::now()->format('Y-m-d'); + + $servicio_progreso = ServicioProgreso::where('servicio_enc_id', $data['servicio_enc_id']) + ->where('servicio_det_id', $data['servicio_det_id']) + ->first(); + + $servicio_det = ServicioDet::where('servicio_enc_id', $data['servicio_enc_id']) + ->where('id', $data['servicio_det_id']) + ->first(); + + list($fecha) = explode(" ", $servicio_det->fecha_solicitud); + + //Validar fecha de solicitud + if($now != $fecha){ + //return response()->unprocessable('Parametros inválidos',['No se pueden guardar evidencias ya que el servicio corresponde a otra fecha.']); + } + + //Validar que el servicio no este terminado + if($servicio_det->estatus_servicio_id == REALIZADO){ + //return response()->unprocessable('Parametros inválidos',['El servicio ya está terminado']); + + //Se agrega para que regrese la petición pero no se guarda información + return response()->success(['result' => 'ok']); + } + + //Validar que el servicio esté iniciado + if(!$servicio_progreso){ + //return response()->unprocessable('Parametros inválidos',['El servicio no está iniciado.']); + + //Se agrega para que regrese la petición pero no se guarda información + return response()->success(['result' => 'ok']); + } + + //Validar imagen + //if (!$request->hasFile('imagen') || !$request->file('imagen')->isValid()){ + // return response()->unprocessable('Parametros inválidos',['Imagen invalida']); + //} + + //Validar etapa + if($data['etapa'] != 'Inicio' && $data['etapa'] != 'Proceso' && $data['etapa'] != 'Final'){ + //return response()->unprocessable('Parametros inválidos',['El valor etapa no es valido']); + + //Se agrega para que regrese la petición pero no se guarda información + return response()->success(['result' => 'ok']); + } + + //$imagen = $request->imagen; + + //$uuid = hash_file('sha256', $imagen); + + //Validar que la imagen no haya sido capturada + //if(ServicioEvidencia::where('uuid', $uuid)->first()){ + return response()->unprocessable('Parametros inválidos',['La imagen ya fue capturada']); + //} + + DB::beginTransaction(); + try { + + $data['uuid'] = hash('sha256', $imagen); + $data['servicio_progreso_id'] = $servicio_progreso->id; + + //Se agrego por detalle de Geolocalizacion + $servicio_enc = ServicioEnc::select('clientes_domicilios.lat','clientes_domicilios.lng') + ->join('clientes_domicilios','servicios_enc.cliente_domicilio_id', '=','clientes_domicilios.id') + ->where('servicios_enc.id', $servicio_det->servicio_enc_id) + ->first(); + $data['lat'] = $servicio_enc->lat; + $data['lng'] = $servicio_enc->lng; + // + + $evidencia = ServicioEvidencia::create($data); + + //$nombre_img = 'solicitud_'.$data['servicio_enc_id'].'_servicio_'.$data['servicio_det_id'].'_evidencia_'.$evidencia->id.'.'.$imagen->extension(); + //$imagen->storeAs('public/servicios/evidencias', $nombre_img); + + $nombre_img = 'solicitud_'.$data['servicio_enc_id'].'_servicio_'.$data['servicio_det_id'].'_evidencia_'.$evidencia->id.'.jpeg'; + Storage::disk('public')->put('servicios/evidencias/' . $nombre_img, $this->base64ToImage($imagen), 'public'); + + $evidencia->update(['imagen' => $nombre_img]); + + DB::commit(); + + return response()->success(['result' => 'ok']); + } catch (\Exception $e) { + DB::rollBack(); + Log::info($e); + return response()->unprocessable('Error', ['Error al guardar la evidencia.']); + } + } + + public function guardarFirmas(GuardarFirmaRequest $request) + { + + $data = $request->only(['servicio_enc_id', 'servicio_det_id']); + + $servicio_progreso = ServicioProgreso::where('servicio_enc_id', $data['servicio_enc_id']) + ->where('servicio_det_id', $data['servicio_det_id']) + ->first(); + +// $now = Carbon::now()->format('Y-m-d'); +// +// $servicio_det = ServicioDet::where('servicio_enc_id', $data['servicio_enc_id']) +// ->where('id', $data['servicio_det_id']) +// ->first(); +// +// list($fecha) = explode(" ", $servicio_det->fecha_solicitud); +// +// //Validar fecha de solicitud +// if($now != $fecha){ +// return response()->unprocessable('Parametros inválidos',['No se pueden guardar evidencias ya que el servicio corresponde a otra fecha.']); +// } +// +// //Validar que el servicio no este terminado +// if($servicio_det->estatus_servicio_id == REALIZADO){ +// return response()->unprocessable('Parametros inválidos',['El servicio ya está terminado']); +// } +// +// //Validar que el servicio esté iniciado +// if(!$servicio_progreso){ +// return response()->unprocessable('Parametros inválidos',['El servicio no está iniciado.']); +// } + +// if (!$request->hasFile('imagen') || !$request->file('imagen')->isValid()){ +// return response()->unprocessable('Parametros inválidos',['Imagen invalida']); +// } + + $imagen = $request->input('imagen'); + + try { + +// $nombre_img = 'firma_'.'solicitud_'.$data['servicio_enc_id'].'_servicio_'.$data['servicio_det_id'].'.'.$imagen->extension(); +// $imagen->storeAs('public/servicios/firmas', $nombre_img); + + $nombre_img = 'firma_'.'solicitud_'.$data['servicio_enc_id'].'_servicio_'.$data['servicio_det_id'].'.jpeg'; + Storage::disk('public')->put('servicios/firmas/' . $nombre_img, $this->base64ToImage($imagen), 'public'); + + $servicio_progreso->update(['firma' => $nombre_img]); + + return response()->success(['result' => 'ok']); + } catch (\Exception $e) { + Log::info($e); + return response()->unprocessable('Error', ['Error al guardar la firma.']); + } + }*/ + + public function verificarServicio(Request $request){ + + $servicios_id = $request->all(); + + $servicios = array(); + foreach ($servicios_id as $s){ + $servicio_det = ServicioDet::find($s); + + if($servicio_det && $servicio_det->estatus_servicio_id == REALIZADO){ + array_push($servicios,['servicio_id' => $s]); + } + } + + return response()->success($servicios); + } +} diff --git a/app/Http/Controllers/Operador/ServiciosProgresoNewController.php b/app/Http/Controllers/Operador/ServiciosProgresoNewController.php new file mode 100644 index 0000000..e0140cd --- /dev/null +++ b/app/Http/Controllers/Operador/ServiciosProgresoNewController.php @@ -0,0 +1,294 @@ +only(['fecha_fin_celular', 'duracion', 'lat_fin', 'lng_fin', 'comentarios', 'aplica_garantia','litraje']); + $cat_motivos_estatus_id = $request->input('cat_motivos_estatus_id',0); + $now = Carbon::now(); + + $servicio_enc_id = $request->input('servicio_enc_id'); + $servicio_det_id = $request->input('servicio_det_id'); + + $litraje = $request->input('litraje', null); + + $servicio_progreso = ServicioProgreso::where('servicio_enc_id', $servicio_enc_id) + ->where('servicio_det_id', $servicio_det_id) + ->first(); + + $servicio_det = ServicioDet::where('servicio_enc_id', $servicio_enc_id) + ->where('id', $servicio_det_id) + ->first(); + $servicio = ServicioEnc::where('id', $servicio_enc_id)->first(); + + $correos = []; + $correo_cliente = Cliente::select('email')->where('id', $servicio->cliente_id)->first(); + $correo_cliente_domicilio = ClienteDomicilio::select('email')->where('id', $servicio->cliente_domicilio_id)->first(); + + if($correo_cliente && $correo_cliente->email){ + $correos[] = $correo_cliente->email; + } + if($correo_cliente_domicilio && $correo_cliente_domicilio->email){ + $correos[] = $correo_cliente_domicilio->email; + } + + //Validar que el servicio no este terminado + if($servicio_det->estatus_servicio_id == REALIZADO){ + return response()->success(['result' => 'ok']); + } + + //Validar que el servicio esté iniciado + if(!$servicio_progreso){ + return response()->unprocessable('Parametros inválidos',['El servicio no está iniciado.']); + } + + if (!$recibo = $request->input('recibo')){ + return response()->unprocessable('Parametros inválidos',['No se ha podido generar el recibo.']); + } + + DB::beginTransaction(); + try { + + //ENCUESTA + if($encuesta = $request->input('encuesta')){ + $this->encuesta($encuesta, $servicio_det_id); + $finalizar_servicio_data['encuesta_contestada'] = 1; + } + // + + $finalizar_servicio_data['fecha_fin_servidor'] = $now->toDateTimeString(); + + //Se agrego por detalle de Geolocalizacion + $servicio_enc = ServicioEnc::select('clientes_domicilios.lat','clientes_domicilios.lng') + ->join('clientes_domicilios','servicios_enc.cliente_domicilio_id', '=','clientes_domicilios.id') + ->where('servicios_enc.id', $servicio_det->servicio_enc_id) + ->first(); + $finalizar_servicio_data['lat_fin'] = $servicio_enc->lat; + $finalizar_servicio_data['lng_fin'] = $servicio_enc->lng; + $finalizar_servicio_data['litraje'] = ($litraje == 0)? null: $litraje; + + $costo_servicio_negativo = Sucursal::select('costo_negativo')->where('sucursales.id', $user->sucursal_id)->get(); + + $servicio_progreso->update($finalizar_servicio_data); + if ($cat_motivos_estatus_id != 0){ + $servicio_det->update( + [ + 'estatus_servicio_id' => NEGATIVO, + 'cat_motivos_estatus_id' => $cat_motivos_estatus_id, + 'costo_servicio' => $costo_servicio_negativo, + ] + ); + } else{ + $servicio_det->update(['estatus_servicio_id' => REALIZADO]); + } + + $recibo = base64_decode($recibo); + $nombre = 'solicitud_' . $servicio_enc_id . '_servicio_' . $servicio_det_id . '.pdf'; + Storage::disk('public')->put('servicios/recibos_pdf/' . $nombre, $recibo); + + DB::commit(); + + try { + $ambiente = strtolower(config('ambiente')['ambiente']); + if(count($correos) > 0 && $ambiente == 'dev'){ + try { + Mail::to($correos)->send(new SolicitudServicioTerminadoNew($servicio_enc_id,$servicio_det_id, $nombre)); + } catch (\Exception $e) { + \Log::info("Error al enviar correo: " . json_encode($e->getMessage())); + } + } + }catch (\Exception $e){ + return response()->success(['result' => 'ok']); + } + return response()->success(['result' => 'ok']); + + } catch (\Exception $e) { + DB::rollBack(); + Log::info($e); + return response()->unprocessable('Error', ['Error al finalizar servicio.']); + } + } + + public function encuesta($data, $servicio_id) + { + $servicio_det = ServicioDet::where('id', $servicio_id)->firstOrFail(); + + if($servicio_det->tipo_servicio_id == DOMESTICO) { + $validator = Validator::make($data, [ + '*.pregunta_id' => 'numeric|exists:preguntas_domestico,id', + '*.respuesta_id' => 'numeric|exists:respuestas_domestico,id', + '*.respuesta' => 'string|max:255' + ]); + + if(ServicioEncuestaDomestico::where('servicio_det_id', $servicio_id)->first()){ + return false; + } + + foreach ($data as $d){ + if(isset($d['respuesta_id'])){ + $respuesta = RespuestaDomestico::where('pregunta_id', $d['pregunta_id']) + ->where('id', $d['respuesta_id']) + ->first(); + + if(!$respuesta){ + return false; + } + } + } + }else{ + $validator = Validator::make($data, [ + '*.pregunta_id' => 'numeric|exists:preguntas_empresarial,id', + '*.respuesta_id' => 'numeric|exists:respuestas_empresarial,id', + '*.respuesta' => 'string|max:255' + ]); + + if(ServicioEncuestaEmpresarial::where('servicio_det_id', $servicio_id)->first()){ + return false; + } + + foreach ($data as $d){ + if(isset($d['respuesta_id'])){ + $respuesta = RespuestaEmpresarial::where('pregunta_id', $d['pregunta_id']) + ->where('id', $d['respuesta_id']) + ->first(); + + if(!$respuesta){ + return false; + } + } + } + } + + if($validator->fails()){ + return false; + } + + DB::beginTransaction(); + try { + if($servicio_det->tipo_servicio_id == DOMESTICO) { + foreach ($data as $d){ + + $data_domestico = [ + 'servicio_det_id' => $servicio_id, + 'pregunta_id' => $d['pregunta_id'], + 'respuesta_id' => (isset($d['respuesta_id']))? $d['respuesta_id'] : null, + 'respuesta' => (isset($d['respuesta']))? $d['respuesta'] : null + ]; + ServicioEncuestaDomestico::create($data_domestico); + } + + }else{ + foreach ($data as $d){ + $data_empresarial = [ + 'servicio_det_id' => $servicio_id, + 'pregunta_id' => $d['pregunta_id'], + 'respuesta_id' => (isset($d['respuesta_id']))? $d['respuesta_id'] : null, + 'respuesta' => (isset($d['respuesta']))? $d['respuesta'] : null + ]; + ServicioEncuestaEmpresarial::create($data_empresarial); + } + } + DB::commit(); + + return true; + } catch (\Exception $e) { + DB::rollBack(); + return false; + } + } + + public function saveEvidence($evidencia, $servicio_enc_id, $servicio_det_id, $servicio_progreso_id){ + $image = storage_path(DEFAULT_PATH_ZIP_EVIDENCES.$evidencia['nombre']); + + if(file_exists($image)){ + $data['uuid'] = hash_file('sha256', $image); + + if(ServicioEvidencia::where('uuid', $data['uuid'])->first()){ + unlink($image); + return false; + } + + //Se agrego por detalle de Geolocalizacion + $servicio_enc = ServicioEnc::select('clientes_domicilios.lat','clientes_domicilios.lng') + ->join('clientes_domicilios','servicios_enc.cliente_domicilio_id', '=','clientes_domicilios.id') + ->where('servicios_enc.id', $servicio_enc_id) + ->first(); + + $data['lat'] = $servicio_enc->lat; + $data['lng'] = $servicio_enc->lng; + $data['servicio_progreso_id'] = $servicio_progreso_id; + $data['etapa'] = $evidencia['etapa']; + + $evidence = ServicioEvidencia::create($data); + $nombre_img = 'solicitud_'.$servicio_enc_id.'_servicio_'.$servicio_det_id.'_evidencia_'.$evidence->id.'.jpg'; + rename($image, storage_path("app/public/servicios/evidencias/$nombre_img")); + $evidence->update(['imagen' => $nombre_img]); + } + + return true; + } + + private function saveEvidenceImage($pathFile, Collection $collect_evidencias, $servicio_enc_id, $servicio_det_id, $servicio_progreso_id){ + $zip = new \ZipArchive; + $pathInfo = pathinfo(realpath($pathFile), PATHINFO_DIRNAME); + if($zip->open($pathFile)){ + if($zip->extractTo($pathInfo)){ + for($i=0;$i<$zip->numFiles;++$i){ + $stat = $zip->statIndex($i); + if($evidencia = $collect_evidencias->where('nombre', '=', basename($stat['name']))->first()) + $this->saveEvidence($evidencia, $servicio_enc_id, $servicio_det_id, $servicio_progreso_id); + } + } + $zip->close(); + unlink($pathFile); + } + + return true; + } + + private function saveSignature($base64_firma, $servicio_enc_id, $servicio_det_id, $servicio_progreso){ + $nombre_img = 'firma_'.'solicitud_'.$servicio_enc_id.'_servicio_'.$servicio_det_id.'.jpg'; + Storage::disk('public')->put('servicios/firmas/' . $nombre_img, $this->base64ToImage($base64_firma), 'public'); + $servicio_progreso->update(['firma' => $nombre_img]); + + return true; + } +} diff --git a/app/Http/Controllers/Operador/VehiculosIncidenciasController.php b/app/Http/Controllers/Operador/VehiculosIncidenciasController.php new file mode 100644 index 0000000..1bd4aec --- /dev/null +++ b/app/Http/Controllers/Operador/VehiculosIncidenciasController.php @@ -0,0 +1,57 @@ +input('vehiculo_id'); + + $incidencia = VehiculoIncidencia::where('vehiculo_id', $vehiculo_id) + ->latest() + ->first(); + + if ($incidencia && !$incidencia->resuelta) { + return response()->success($incidencia); + } else { + return response()->success(null); + } + } + + public function store(VehiculosIncidenciasRequest $request) + { + $data = $request->only('vehiculo_id', 'descripcion'); + $user_id = Auth::id(); + + $bitacora_laboral = BitacoraLaboral::where('usuario_id', $user_id) + ->latest() + ->first();; + + VehiculoIncidencia::create([ + 'vehiculo_id' => $bitacora_laboral->vehiculo_id, + 'user_id' => $user_id, + 'descripcion' => $data['descripcion'], + ]); + + return response()->success(['result' => 'ok']); + } + + public function resolver($id) + { + $incidencia = VehiculoIncidencia::findOrfail($id); + + $incidencia->update([ + 'resuelta' => true + ]); + + return response()->success(['result' => 'ok']); + } +} diff --git a/app/Http/Controllers/Reportes/CapacidadAprovechadaController.php b/app/Http/Controllers/Reportes/CapacidadAprovechadaController.php new file mode 100644 index 0000000..b81cc48 --- /dev/null +++ b/app/Http/Controllers/Reportes/CapacidadAprovechadaController.php @@ -0,0 +1,409 @@ +input('sucursal'); + $fecha_inicio = $request->input('fecha_inicio'); + $fecha_final = $request->input('fecha_final'); + + $orderBy = $request->input('sortBy','id'); + $order = $request->input('order','asc'); + + $queryBuilder = Vehiculo::select('id', 'num_economico') + ->join('vehiculos_sucursales', 'cat_vehiculos.id', '=', 'vehiculos_sucursales.vehiculo_id') + ->where('vehiculos_sucursales.sucursal_id', $sucursal) + ->orderBy($orderBy,$order); + + if($query = $request->get('query',false)){ + $queryBuilder->where(function($q) use ($query){ + $q->where('num_economico','like','%' .$query.'%'); + }); + } + + if($perPage = $request->input('perPage',false)){ + + $data = $queryBuilder->paginate($perPage); + foreach ($data->items() as $v){ + $v->servicios_cantidad = ServicioDet::where('servicios_det.vehiculo_id', $v->id) + ->whereDate('servicios_det.fecha_solicitud','>=',$fecha_inicio) + ->whereDate('servicios_det.fecha_solicitud','<=',$fecha_final) + ->count(); + } + + $vehiculos = $data; + }else{ + + $data = $queryBuilder->get(); + foreach ($data as $v){ + $v->servicios_cantidad = ServicioDet::where('servicios_det.vehiculo_id', $v->id) + ->whereDate('servicios_det.fecha_solicitud','>=',$fecha_inicio) + ->whereDate('servicios_det.fecha_solicitud','<=',$fecha_final) + ->count(); + } + + $vehiculos = ['data'=>$data]; + } + + return response()->success($vehiculos); + } + + public function reportes(CapacidadAprovechadaRequest $request){ + + $orderBy = $request->input('sortBy','servicios_enc.id'); + $order = $request->input('order','asc'); + + $sucursal = $request->input('sucursal'); + $fecha_inicio = $request->input('fecha_inicio'); + $fecha_final = $request->input('fecha_final'); + $vehiculo_id = $request->input('vehiculo_id'); + + $campos = [ + 'servicios_enc.id as numero_solicitud', + DB::raw("DATE(servicios_det.fecha_solicitud) as 'fecha_servicio'"), + DB::raw("TIME(servicios_det.fecha_solicitud) as 'hora_servicio'"), + 'cat_servicios.nombre as servicio', + 'servicios_det.costo_servicio as costo', + 'cat_tipos_servicios.nombre as tipo_servicio', + 'cat_estatus_servicios.nombre as estatus_servicio', + 'clientes.denominacion as nombre_cliente', + 'clientes_domicilios.calle as calle_cliente', + 'clientes_domicilios.entre_calles as entre_calles_cliente', + 'clientes_domicilios.num_ext as num_ext_cliente', + 'clientes_domicilios.num_int as num_int_cliente', + 'clientes_domicilios.colonia as colonia_cliente', + 'clientes_domicilios.ciudad as ciudad_cliente', + 'clientes_domicilios.cp as cp_cliente', + 'asesor.nombre as nombre_asesor', + 'asesor.apellido_paterno as apellido_paterno_asesor', + 'asesor.apellido_materno as apellido_materno_asesor', + 'auxiliar.nombre as nombre_auxiliar', + 'auxiliar.apellido_paterno as apellido_paterno_auxiliar', + 'auxiliar.apellido_materno as apellido_materno_auxiliar', + 'servicios_progreso.duracion as duracion_servicio' + ]; + + $queryBuilder = ServicioDet::select($campos) + ->join('servicios_enc', 'servicios_det.servicio_enc_id', '=', 'servicios_enc.id') + ->join('cat_servicios', 'servicios_det.servicio_id', '=', 'cat_servicios.id') + ->join('cat_tipos_servicios', 'servicios_det.tipo_servicio_id', '=', 'cat_tipos_servicios.id') + ->join('cat_estatus_servicios','servicios_det.estatus_servicio_id','=','cat_estatus_servicios.id') + ->join('clientes','servicios_enc.cliente_id','=','clientes.id') + ->join('clientes_domicilios','servicios_enc.cliente_domicilio_id','=','clientes_domicilios.id') + ->join('users as asesor', 'servicios_det.operador_id', '=', 'asesor.id') + ->leftJoin('users as auxiliar', 'servicios_det.auxiliar_1', '=', 'auxiliar.id') + ->leftJoin('servicios_progreso', 'servicios_det.id', '=', 'servicios_progreso.servicio_det_id') + ->where('servicios_enc.sucursal_id', $sucursal) + ->where('servicios_det.vehiculo_id', $vehiculo_id) + ->whereDate('servicios_det.fecha_solicitud','>=',$fecha_inicio) + ->whereDate('servicios_det.fecha_solicitud','<=',$fecha_final) + ->orderBy($orderBy,$order); + + if($query = $request->get('query',false)){ + $queryBuilder->where(function($q) use ($query){ + //$q->where('nombre','like','%' .$query.'%'); + }); + } + + $total_servicios = $queryBuilder->count(); + $total_costo = $queryBuilder->sum('servicios_det.costo_servicio'); + $total_duracion = $this->sumarTiempos($queryBuilder->pluck('duracion_servicio')); + + if($perPage = $request->input('perPage',false)){ + $data = $queryBuilder->paginate($perPage)->toArray(); + }else{ + $data = ['data'=>$queryBuilder->get()]; + } + + $data['total_servicios'] = $total_servicios; + $data['total_costo'] = $total_costo; + list($h,$m,$s) = explode(':',$total_duracion); + $data['total_duracion'] = $h."hr ".$m."m ".$s."s"; + + return response()->success($data); + } + + public function generarExcel(CapacidadAprovechadaRequest $request){ + + $sucursal = $request->input('sucursal'); + $fecha_inicio = $request->input('fecha_inicio'); + $fecha_final = $request->input('fecha_final'); + $vehiculo_id = $request->input('vehiculo_id'); + + $campos = [ + 'servicios_enc.id as numero_solicitud', + DB::raw("DATE(servicios_det.fecha_solicitud) as 'fecha_servicio'"), + DB::raw("TIME(servicios_det.fecha_solicitud) as 'hora_servicio'"), + 'cat_servicios.nombre as servicio', + 'servicios_det.costo_servicio as costo', + 'cat_tipos_servicios.nombre as tipo_servicio', + 'cat_estatus_servicios.nombre as estatus_servicio', + 'clientes.denominacion as nombre_cliente', + DB::raw("CONCAT(clientes_domicilios.calle,' ',clientes_domicilios.num_ext,' ', clientes_domicilios.colonia,' ',clientes_domicilios.cp,' ',clientes_domicilios.ciudad) as domicilio"), + DB::raw("CONCAT(asesor.nombre,' ',asesor.apellido_paterno,' ',asesor.apellido_materno) as asesor"), + DB::raw("CONCAT(auxiliar.nombre,' ',auxiliar.apellido_paterno,' ',auxiliar.apellido_materno) as auxiliar"), + 'servicios_progreso.duracion as duracion_servicio' + ]; + + $queryBuilder = ServicioDet::select($campos) + ->join('servicios_enc', 'servicios_det.servicio_enc_id', '=', 'servicios_enc.id') + ->join('cat_servicios', 'servicios_det.servicio_id', '=', 'cat_servicios.id') + ->join('cat_tipos_servicios', 'servicios_det.tipo_servicio_id', '=', 'cat_tipos_servicios.id') + ->join('cat_estatus_servicios','servicios_det.estatus_servicio_id','=','cat_estatus_servicios.id') + ->join('clientes','servicios_enc.cliente_id','=','clientes.id') + ->join('clientes_domicilios','servicios_enc.cliente_domicilio_id','=','clientes_domicilios.id') + ->join('users as asesor', 'servicios_det.operador_id', '=', 'asesor.id') + ->leftJoin('users as auxiliar', 'servicios_det.auxiliar_1', '=', 'auxiliar.id') + ->leftJoin('servicios_progreso', 'servicios_det.id', '=', 'servicios_progreso.servicio_det_id') + ->where('servicios_enc.sucursal_id', $sucursal) + ->where('servicios_det.vehiculo_id', $vehiculo_id) + ->whereDate('servicios_det.fecha_solicitud','>=',$fecha_inicio) + ->whereDate('servicios_det.fecha_solicitud','<=',$fecha_final) + ->orderBy('servicios_enc.id','asc'); + + $servicios = $queryBuilder->get(); + $total = $queryBuilder->count(); + $total_costo = $queryBuilder->sum('servicios_det.costo_servicio'); + $duracion = $this->sumarTiempos($queryBuilder->pluck('duracion_servicio')); + list($h,$m,$s) = explode(':',$duracion); + $total_duracion = $h."hr ".$m."m ".$s."s"; + + $vehiculo = Vehiculo::select('num_economico', 'cat_tipos_vehiculos.nombre as tipo_vehiculo') + ->join('cat_tipos_vehiculos', 'cat_vehiculos.tipo_vehiculo_id', '=', 'cat_tipos_vehiculos.id') + ->where('cat_vehiculos.id', $vehiculo_id) + ->first(); + + $titulo = "Reporte Capacidad Aprovechada ".$vehiculo->num_economico."_".$vehiculo->tipo_vehiculo; + + list($y_i, $m_i, $d_i) = explode("-", $fecha_inicio); + list($y_f, $m_f, $d_f) = explode("-", $fecha_final); + $f_i = $d_i."_".$m_i."_".$y_i; + $f_f = $d_f."_".$m_f."_".$y_f; + $nombre = "Reporte_Capacidad_Aprovechada_".$vehiculo->num_economico."_".$vehiculo->tipo_vehiculo."_".$f_i."-".$f_f; + + foreach ($servicios as $s){ + $s->costo = floatval($s->costo); + list($y, $m, $d) = explode("-", $s->fecha_servicio); + $s->fecha_servicio = "$d/$m/$y"; + $s->numero_solicitud = (int)$s->numero_solicitud; + } + + Excel::create($nombre, function($excel) use($servicios, $titulo, $fecha_inicio, $fecha_final, $total, $total_costo, $total_duracion){ + + // Set the title + $excel->setTitle('Reporte de Servicios de Cliente'); + + // Chain the setters + $excel->setCreator('DRENAX') + ->setCompany('DRENAX'); + + // Call them separately + $excel->setDescription('Reporte de Servicios de Cliente'); + + $excel->sheet('Reporte_Capacidad_Aprovechada', function ($sheet) use($servicios, $titulo, $fecha_inicio, $fecha_final, $total, $total_costo, $total_duracion) { + + $sheet->setColumnFormat(array( + 'F' => '"$"#,##0.00_-', + 'C' => 'd/m/y', + 'L8' => '"$"#,##0.00_-' + )); + + //Mostrar logo + $sheet->mergeCells('B2:D6'); + + $objDrawing = new \PHPExcel_Worksheet_Drawing; + $objDrawing->setPath(resource_path('assets/images/logos').'/logo_drenax.png'); + $objDrawing->setWidth(95); + $objDrawing->setHeight(80); + $objDrawing->setCoordinates('B2'); + $objDrawing->setOffsetX(9); + $objDrawing->setOffsetY(9); + $objDrawing->setWorksheet($sheet); + + $sheet->mergeCells('G2:J6'); + + $sheet->cell('G2', function($cell) use($titulo) { + + $cell->setFontFamily('Aharoni'); + $cell->setFontWeight('bold'); + $cell->setAlignment('center'); + $cell->setValignment('center'); + $cell->setFontSize(20); + $cell->setValue($titulo); + + }); + + $sheet->cell('H8', function($cell) use($fecha_inicio) { + list($y, $m, $d) = explode("-", $fecha_inicio); + + $cell->setFontFamily('Calibri'); + $cell->setAlignment('left'); + $cell->setFontSize(12); + $cell->setValue('Del: '.$d.'/'.$m.'/'.$y); + + }); + + $sheet->cell('I8', function($cell) use($fecha_final) { + list($y, $m, $d) = explode("-", $fecha_final); + + $cell->setFontFamily('Calibri'); + $cell->setAlignment('left'); + $cell->setFontSize(12); + $cell->setValue('Al: '.$d.'/'.$m.'/'.$y); + + }); + + $sheet->cell('K7', function($cell) { + $cell->setFontFamily('Calibri'); + $cell->setAlignment('left'); + $cell->setFontSize(12); + $cell->setValue('Total en Horas de servicio:'); + + }); + + $sheet->cell('K8', function($cell) use($total_duracion) { + $cell->setFontFamily('Calibri'); + $cell->setAlignment('left'); + $cell->setFontSize(12); + $cell->setValue($total_duracion); + + }); + + $sheet->cell('L7', function($cell) { + $cell->setFontFamily('Calibri'); + $cell->setAlignment('left'); + $cell->setFontSize(12); + $cell->setValue('Total en Costos del servicio:'); + + }); + + $sheet->cell('L8', function($cell) use($total_costo) { + $cell->setFontFamily('Calibri'); + $cell->setAlignment('left'); + $cell->setFontSize(12); + $cell->setValue($total_costo); + + }); + + $sheet->cell('M7', function($cell) { + $cell->setFontFamily('Calibri'); + $cell->setAlignment('left'); + $cell->setFontSize(12); + $cell->setValue('Total:'); + + }); + + $sheet->cell('M8', function($cell) use($total) { + $cell->setFontFamily('Calibri'); + $cell->setAlignment('left'); + $cell->setFontSize(12); + $cell->setValue($total.' Servicios'); + + }); + + //Mostar valores de consulta + $sheet->fromArray($servicios, null, 'B9', true); + + //Formato en columnas de titulo + $sheet->cells('B9:M9', function ($cells) { + $cells->setBackground('#001870'); + $cells->setFontColor('#ffffff'); + $cells->setFontSize(13); + $cells->setFontFamily('Calibri'); + $cells->setAlignment('left'); + $cells->setFontWeight('bold'); + }); + + $sheet->getStyle('B9:M9' , $sheet->getHighestRow())->getAlignment()->setWrapText(true); + + //Titulos personalizados + $titulos_cell = [ + ['cell' => 'B9', 'titulo' => 'Número de solicitud'], + ['cell' => 'C9', 'titulo' => 'Fecha del servicio'], + ['cell' => 'D9', 'titulo' => 'Hora del servicio'], + ['cell' => 'E9', 'titulo' => 'Servicio'], + ['cell' => 'F9', 'titulo' => 'Costo de servicio'], + ['cell' => 'G9', 'titulo' => 'Tipo de servicio'], + ['cell' => 'H9', 'titulo' => 'Estatus de servicio'], + ['cell' => 'I9', 'titulo' => 'Nombre del cliente'], + ['cell' => 'J9', 'titulo' => 'Domicilio de servicio'], + ['cell' => 'K9', 'titulo' => 'Asesor de operaciones'], + ['cell' => 'L9', 'titulo' => 'Auxiliar de operaciones'], + ['cell' => 'M9', 'titulo' => 'Duración del servicio (cronómetro)'] + ]; + + foreach ($titulos_cell as $t){ + $sheet->cell($t['cell'], function($cell) use($t) { + $cell->setValue($t['titulo']); + }); + } + + //Size a columnas indicadas + $columns_set = [ + 'B9', 'C9', 'D9', 'M9' + ]; + + foreach ($columns_set as $c){ + $set_column = [ + $c => [ + 'width' => ($c == 'M9')? 23: 14, + 'height' => 40 + ] + ]; + $sheet->setSize($set_column); + } + + //AutoSize en columnas indicadas + $columns_auto= [ + 'E','F','G','H','I','J','K', 'L' + ]; + + foreach ($columns_auto as $c){ + $sheet->getColumnDimension($c)->setAutoSize(true); + } + + $sheet->setWidth(array( + 'A' => 3, + )); + + //Borde + $columns_border= [ + 'B','C','D','E','F','G','H','I','J','K','L','M' + ]; + + for ($i=0; $i<= $total; $i++){ + $row = 9 + $i; + + foreach ($columns_border as $cb){ + $border = "$cb$row:$cb$row"; + $sheet->cells($border, function ($cells) { + $cells->setBorder('thin', 'thin', 'thin', 'thin'); + }); + + if($row != 9 && ($cb == 'C' || $cb == 'D' || $cb == 'F' || $cb == 'N')){ + $sheet->cells("$cb$row", function ($cells) { + $cells->setAlignment('right'); + }); + } + } + } + }); + + + })->store('xls', storage_path('app') . '/public/reportes/servicios_capacidad/'); + + return response()->success(['nombre_archivo' => $nombre.'.xls?micro='.$this->getMicroSeconds()]); + } +} diff --git a/app/Http/Controllers/Reportes/EncuestasGeneralController.php b/app/Http/Controllers/Reportes/EncuestasGeneralController.php new file mode 100644 index 0000000..91fa41f --- /dev/null +++ b/app/Http/Controllers/Reportes/EncuestasGeneralController.php @@ -0,0 +1,709 @@ +input('year'); + $month = $request->input('mes',Carbon::now()->format('m')); + $operador_id = $request->input('operador_id', 0); + $sucursal = $request->input('sucursal'); + + $empresarial = $this->empresarial($month, $year, $operador_id, $sucursal); + $domestico = $this->domestico($month, $year, $operador_id, $sucursal); + + return response()->success(compact('domestico', 'empresarial')); + + } + + public function domestico($month, $year, $operador_id, $sucursal) { + + $servicios_det = ServicioDet::select('servicios_det.id') + ->join('servicios_enc', 'servicios_det.servicio_enc_id', '=', 'servicios_enc.id') + ->whereMonth('servicios_det.fecha_solicitud', $month) + ->whereYear('servicios_det.fecha_solicitud', $year) + ->where('requiere_encuesta', 1) + ->where('servicios_enc.sucursal_id', $sucursal) + ->where('tipo_servicio_id', DOMESTICO); + + if($operador_id){ + $servicios_det->where(function($q) use ($operador_id){ + $q->where('operador_id',$operador_id) + ->orWhere('auxiliar_1',$operador_id) + ->orWhere('auxiliar_2',$operador_id); + }); + } + + $id = $servicios_det->pluck('id'); + + $d = ServicioEncuestaDomestico::select('preguntas_domestico.nombre as pregunta', DB::raw('ROUND(AVG(coalesce(respuestas_domestico.puntuacion,0)), 2) as puntuacion')) + ->join('respuestas_domestico', 'servicios_encuestas_domestico.respuesta_id', '=', 'respuestas_domestico.id') + ->join('preguntas_domestico','servicios_encuestas_domestico.pregunta_id', '=','preguntas_domestico.id') + ->whereIn('servicio_det_id', $id) + ->whereNotNull('respuesta_id') + ->groupBy('servicios_encuestas_domestico.pregunta_id', 'preguntas_domestico.nombre') + ->get(); + + $salida = []; + foreach ($d as $e){ + $salida[] = [$e->pregunta, (float)$e->puntuacion]; + } + + return $salida; + } + + public function empresarial($month, $year, $operador_id, $sucursal){ + + $servicios_det = ServicioDet::select('servicios_det.id') + ->join('servicios_enc', 'servicios_det.servicio_enc_id', '=', 'servicios_enc.id') + ->whereMonth('servicios_det.fecha_solicitud', $month) + ->whereYear('servicios_det.fecha_solicitud', $year) + ->where('requiere_encuesta', 1) + ->where('servicios_enc.sucursal_id', $sucursal) + ->where('tipo_servicio_id', EMPRESARIAL); + + if($operador_id){ + $servicios_det->where(function($q) use ($operador_id){ + $q->where('operador_id',$operador_id) + ->orWhere('auxiliar_1',$operador_id) + ->orWhere('auxiliar_2',$operador_id); + }); + } + + $id = $servicios_det->pluck('id'); + + + $e = ServicioEncuestaEmpresarial::select('preguntas_empresarial.nombre as pregunta', DB::raw('ROUND(AVG(coalesce(respuestas_empresarial.puntuacion,0)), 2) as puntuacion')) + ->join('respuestas_empresarial', 'servicios_encuestas_empresarial.respuesta_id', '=', 'respuestas_empresarial.id') + ->join('preguntas_empresarial','servicios_encuestas_empresarial.pregunta_id', '=','preguntas_empresarial.id') + ->whereIn('servicio_det_id', $id) + ->whereNotNull('respuesta_id') + ->groupBy('servicios_encuestas_empresarial.pregunta_id', 'preguntas_empresarial.nombre') + ->get(); + + $salida = []; + foreach ($e as $l){ + $salida[] = [$l->pregunta, (float)$l->puntuacion]; + } + + return $salida; + } + + + public function generarExcel(EncuestasGeneralRequest $request) { + + $year = $request->input('year'); + $month = $request->input('mes',Carbon::now()->format('m')); + $operador_id = $request->input('operador_id', null); + $sucursal = $request->input('sucursal', 1); + + + /*$domestico = PreguntaDomestico::select('nombre') + ->where('mostrar_numero', 1) + ->get(); + + $preguntas_domestico = []; + + foreach ($domestico as $l){ + $preguntas_domestico[] = [$l->nombre]; + } + + $empresarial = PreguntaEmpresarial::select('nombre') + ->where('mostrar_numero', 1) + ->get(); + $preguntas_empresarial = []; + + foreach ($empresarial as $z){ + $preguntas_empresarial[] = [$z->nombre]; + }*/ + + // Se va a calcular el promedio para domestico + + (int)$suma = 0; + (int)$contador= 0; + (double)$promedio_domestico = 0; + $domestico = $this->domesticoExcel($year, $month, $operador_id, $sucursal); + + $dom = []; + foreach ($domestico as $domestic) { + $preg = []; + foreach($domestic->preguntas as $detalle) { + if($detalle->puntuacion){ + $preg[] = $detalle->puntuacion; + $suma += $detalle->puntuacion; + $contador = $contador + 1; + } + } + + $det = [$domestic->servicio_id, $domestic->fecha_solicitud, $domestic->cliente, $domestic->operador, $domestic->fecha_nacimiento, $domestic->correo]; + $dom[] = array_merge($det, $preg); + } + if($contador){ + (double)$promedio_domestico = $suma / $contador; + } + + + //Cálculo del promedio de empresarial + + $empresarial = $this->empresarialExcel($year, $month, $operador_id, $sucursal); + + + (int)$suma_e = 0; + (int)$contador_e= 0; + (double)$promedio_empresarial = 0; + $empa = []; + + foreach ($empresarial as $empresa) { + $preg = []; + foreach($empresa->preguntas as $detalle) { + if($detalle->puntuacion){ + $preg[] = $detalle->puntuacion; + $suma_e += $detalle->puntuacion; + $contador_e = $contador_e + 1; + } + } + $det = [$empresa->servicio_id, $empresa->fecha_solicitud, $empresa->cliente, $empresa->operador, $empresa->fecha_nacimiento, $empresa->correo]; + $empa[] = array_merge($det, $preg); + + } + + if($contador_e){ + (double)$promedio_empresarial = $suma_e / $contador_e; + } + + + //Información que va necesitar el excel nombre y titulos + $total = $domestico->count(); + + + + //Transformar el número del mes por la información + $mes = ''; + $meses = ['Enero', 'Febrero', 'Marzo', 'Abril', 'Mayo', 'Junio', 'Julio', 'Agosto', 'Septiembre', 'Octubre', 'Noviembre', 'Diciembre']; + foreach ($meses as $key => $m){ + if($key+1 == $month) { + $mes = $m; + } + } + + if($operador_id){ + $query = User::select(DB::raw("CONCAT(users.nombre,' ', users.apellido_paterno, ' ', users.apellido_materno) as operador")) + ->where('id', $operador_id) + ->first(); + $operador_title = $query->operador; + + } + + $total_e = $empresarial->count(); + + $nombre = ($operador_id) ? "Reporte_encuestas_domestico_empresarial".'_'.$mes.'_'.$year.'_detalle'.'_'. str_replace(' ', '_', $operador_title) : "Reporte_encuestas_domestico_empresarial".'_'.$mes.'_'.$year.'_'.$operador_title; + + $titulo_domestico = ($operador_id) ? "Reporte encuestas doméstico".' '.$operador_title : "Reporte encuestas doméstico general"; + $titulo_empresarial = ($operador_id) ? "Reporte encuestas empresarial".' '.$operador_title : "Reporte encuestas empresarial general"; + + + + + + //Generación del excel + Excel::create($nombre, function ($excel) use($dom, $total, $titulo_domestico, $promedio_domestico, $promedio_empresarial, $titulo_empresarial, $empa, $total_e, $sucursal, $mes, $year) { + // Set del título del documento + $excel->setTitle('Reporte de Encuestas'); + + // Seters de la campañía + $excel->setCreator('DRENAX') + ->setCompany('DRENAX'); + + // Creación de la descripción + $excel->setDescription('Reporte de Encuesta en servicios'); + + $excel->sheet('Reporte_encuestas_domestico', function ($sheet) use($dom, $titulo_domestico, $total, $promedio_domestico, $sucursal, $mes, $year){ + + $sheet->mergeCells('B2:D6'); + + //Mostrar el logo + + $objDrawing = new \PHPExcel_Worksheet_Drawing; + $objDrawing->setPath(resource_path('assets/images/logos').'/logo_drenax.png'); + $objDrawing->setWidth(95); + $objDrawing->setHeight(80); + $objDrawing->setCoordinates('B2'); + $objDrawing->setOffsetX(9); + $objDrawing->setOffsetY(9); + $objDrawing->setWorksheet($sheet); + + //Mostrar el título de la hoja de excel + $sheet->mergeCells('G2:J6'); + + $sheet->cell('G2', function($cell) use($titulo_domestico) { + + $cell->setFontFamily('Aharoni'); + $cell->setFontWeight('bold'); + $cell->setAlignment('center'); + $cell->setValignment('center'); + $cell->setFontSize(20); + $cell->setValue($titulo_domestico); + + }); + + //Información entre el encabezado y la información + $sheet->cell('N7', function($cell) { + $cell->setFontFamily('Calibri'); + $cell->setAlignment('left'); + $cell->setFontSize(12); + $cell->setValue('Fecha'); + + }); + + $sheet->cell('N8', function($cell) use($mes, $year) { + $cell->setFontFamily('Calibri'); + $cell->setAlignment('left'); + $cell->setFontSize(12); + $cell->setValue($mes.' '.$year); + }); + + $sheet->cell('O7', function($cell) { + $cell->setFontFamily('Calibri'); + $cell->setAlignment('left'); + $cell->setFontSize(12); + $cell->setValue('Promedio General:'); + + }); + + $sheet->cell('O8', function($cell) use($promedio_domestico) { + $cell->setFontFamily('Calibri'); + $cell->setAlignment('left'); + $cell->setFontSize(12); + $cell->setValue($promedio_domestico.'%'); + }); + + // Mostar valores de consulta + $sheet->fromArray($dom, null, 'B9', true); + + //Formato en columnas de titulo + $sheet->cells('B9:O9', function ($cells) { + $cells->setBackground('#001870'); + $cells->setFontColor('#ffffff'); + $cells->setFontSize(13); + $cells->setFontFamily('Calibri'); + $cells->setAlignment('left'); + $cells->setFontWeight('bold'); + }); + // Asignar el listado + $sheet->getStyle('B9:O9' , $sheet->getHighestRow())->getAlignment()->setWrapText(true); + + //Titulos personalizados + $titulos_cell = [ + ['cell' => 'B9', 'titulo' => 'Número de servicio'], + ['cell' => 'C9', 'titulo' => 'Fecha de solicitud'], + ['cell' => 'D9', 'titulo' => 'Cliente'], + ['cell' => 'E9', 'titulo' => 'Asesor asignado'], + ['cell' => 'F9', 'titulo' => 'Fecha de nacimiento'], + ['cell' => 'G9', 'titulo' => 'Correo'], + ['cell' => 'H9', 'titulo' => '¿El personal se presentó y mostró la orden de trabajo previo a la realización de su servicio?'], + ['cell' => 'I9', 'titulo' => '¿Cómo califica la puntualidad de nuestro personal?'], + ['cell' => 'J9', 'titulo' => '¿Cómo califica la imagen de nuestro personal?'], + ['cell' => 'K9', 'titulo' => '¿El asesor usó los instrumentos de seguridad e higiene para la correcta ejecución del servicio?'], + ['cell' => 'L9', 'titulo' => '¿Cómo califica la atención y asesoría brindada por los asesores?'], + ['cell' => 'M9', 'titulo' => '¿El servicio fue efectivo quedando conforme con lo que contrató?'], + ['cell' => 'N9', 'titulo' => '¿Cómo califica la atención y asesoría telefonica?'], + ['cell' => 'O9', 'titulo' => 'De acuerdo al servicio recibido, ¿usted nos recomendaría?'] + ]; + + // Obtener los títulos de la tabla + foreach ($titulos_cell as $t){ + $sheet->cell($t['cell'], function($cell) use($t) { + $cell->setValue($t['titulo']); + }); + } + + //Darle un tamaño a las celdas + $columns_set = [ + 'B9', 'C9', 'D9', 'K9', 'L9' + ]; + + foreach ($columns_set as $c){ + $set_column = [ + $c => [ + 'width' => ($c == 'D9' || $c == 'G9')? 25: 16, + 'height' => 40 + ] + ]; + $sheet->setSize($set_column); + } + + $question_set = [ + 'H9', 'I9', 'J9', 'K9', 'L9', 'M9', 'N9', 'O9' + ]; + + foreach ($question_set as $q){ + $question = [ + $q => [ + 'width' => 35, + 'height' => 50 + ] + ]; + $sheet->setSize($question); + } + + + //Tamaño automático en columnas indicadas + $columns_auto= [ + 'E','F','G' + ]; + + foreach ($columns_auto as $c){ + $sheet->getColumnDimension($c)->setAutoSize(true); + } + + $sheet->setWidth(array( + 'A' => 3, + )); + //Borde + $columns_border= [ + 'B','C','D','E','F','G','H','I','J','K','L', 'M', 'N', 'O' + ]; + + for ($i=0; $i<= $total; $i++){ + $row = 9 + $i; + + foreach ($columns_border as $cb){ + $border = "$cb$row:$cb$row"; + $sheet->cells($border, function ($cells) { + $cells->setBorder('thin', 'thin', 'thin', 'thin'); + }); + + if($row != 9 && ($cb == 'C' || $cb == 'F' || $cb == 'L')){ + $sheet->cells("$cb$row", function ($cells) { + $cells->setAlignment('right'); + }); + } + } + } + + + + + }); + + $excel->sheet('Reporte_encuestas_empresarial', function ($sheet) use($promedio_domestico, $sucursal, $mes, $year, $titulo_empresarial, $promedio_empresarial, $empa, $total_e){ + $sheet->mergeCells('B2:D6'); + + //Mostrar el logo + + $objDrawing = new \PHPExcel_Worksheet_Drawing; + $objDrawing->setPath(resource_path('assets/images/logos').'/logo_drenax.png'); + $objDrawing->setWidth(95); + $objDrawing->setHeight(80); + $objDrawing->setCoordinates('B2'); + $objDrawing->setOffsetX(9); + $objDrawing->setOffsetY(9); + $objDrawing->setWorksheet($sheet); + + //Mostrar el título de la hoja de excel + $sheet->mergeCells('G2:J6'); + + $sheet->cell('G2', function($cell) use($titulo_empresarial) { + + $cell->setFontFamily('Aharoni'); + $cell->setFontWeight('bold'); + $cell->setAlignment('center'); + $cell->setValignment('center'); + $cell->setFontSize(20); + $cell->setValue($titulo_empresarial); + + }); + + //Información entre el encabezado y la información + $sheet->cell('P7', function($cell) { + $cell->setFontFamily('Calibri'); + $cell->setAlignment('left'); + $cell->setFontSize(12); + $cell->setValue('Fecha'); + + }); + + $sheet->cell('P8', function($cell) use($mes, $year) { + $cell->setFontFamily('Calibri'); + $cell->setAlignment('left'); + $cell->setFontSize(12); + $cell->setValue($mes.' '.$year); + }); + + $sheet->cell('Q7', function($cell) { + $cell->setFontFamily('Calibri'); + $cell->setAlignment('left'); + $cell->setFontSize(12); + $cell->setValue('Promedio General:'); + + }); + + $sheet->cell('Q8', function($cell) use($promedio_empresarial) { + $cell->setFontFamily('Calibri'); + $cell->setAlignment('left'); + $cell->setFontSize(12); + $cell->setValue($promedio_empresarial.'%'); + }); + + // Mostar valores de consulta + $sheet->fromArray($empa, null, 'B9', true); + + //Formato en columnas de titulo + $sheet->cells('B9:Q9', function ($cells) { + $cells->setBackground('#001870'); + $cells->setFontColor('#ffffff'); + $cells->setFontSize(13); + $cells->setFontFamily('Calibri'); + $cells->setAlignment('left'); + $cells->setFontWeight('bold'); + }); + + $sheet->getStyle('B9:Q9' , $sheet->getHighestRow())->getAlignment()->setWrapText(true); + + //Titulos personalizados + $titulos_cell = [ + ['cell' => 'B9', 'titulo' => 'Número de servicio'], + ['cell' => 'C9', 'titulo' => 'Fecha de solicitud'], + ['cell' => 'D9', 'titulo' => 'Cliente'], + ['cell' => 'E9', 'titulo' => 'Asesor asignado'], + ['cell' => 'F9', 'titulo' => 'Fecha de nacimiento'], + ['cell' => 'G9', 'titulo' => 'Correo'], + ['cell' => 'H9', 'titulo' => '¿Su servicio fue programado en tiempo y forma?'], + ['cell' => 'I9', 'titulo' => '¿El asesor de operaciones realiza recibo de servicio, y es llenado correctamente hora de inicio y hora final?'], + ['cell' => 'J9', 'titulo' => '¿Cómo califica la imagen del personal?'], + ['cell' => 'K9', 'titulo' => '¿El asesor usó los instrumentos de seguridad e higiene para la correcta ejecución del servicio?'], + ['cell' => 'L9', 'titulo' => '¿Cómo califica la atención y asesoría brindada por los asesores de operaciones?'], + ['cell' => 'M9', 'titulo' => '¿Cómo califica la calidad del servicio contratado?'], + ['cell' => 'N9', 'titulo' => '¿Cómo califica la atención y asesoría telefonica?'], + ['cell' => 'O9', 'titulo' => '¿Recibió su factura del mes en tiempo y forma?'], + ['cell' => 'P9', 'titulo' => '¿Cómo califica nuestra área de cobranza?'], + ['cell' => 'Q9', 'titulo' => '¿Cómo califica en general a la empresa DRENAX?'] + ]; + + // Obtener los títulos de la tabla + foreach ($titulos_cell as $t){ + $sheet->cell($t['cell'], function($cell) use($t) { + $cell->setValue($t['titulo']); + }); + } + + //Darle un tamaño a las celdas + $columns_set = [ + 'B9', 'C9', 'D9', 'K9', 'L9' + ]; + + foreach ($columns_set as $c){ + $set_column = [ + $c => [ + 'width' => ($c == 'D9' || $c == 'G9')? 25: 16, + 'height' => 40 + ] + ]; + $sheet->setSize($set_column); + } + + $question_set = [ + 'H9', 'I9', 'J9', 'K9', 'L9', 'M9', 'N9', 'O9', 'P9', 'Q9' + ]; + + foreach ($question_set as $q){ + $question = [ + $q => [ + 'width' => 35, + 'height' => 50 + ] + ]; + $sheet->setSize($question); + } + + + //Tamaño automático en columnas indicadas + $columns_auto= [ + 'E','F','G' + ]; + + foreach ($columns_auto as $c){ + $sheet->getColumnDimension($c)->setAutoSize(true); + } + + $sheet->setWidth(array( + 'A' => 3, + )); + //Borde + $columns_border= [ + 'B','C','D','E','F','G','H','I','J','K','L', 'M', 'N', 'O', 'P', 'Q' + ]; + + for ($i=0; $i<= $total_e; $i++){ + $row = 9 + $i; + + foreach ($columns_border as $cb){ + $border = "$cb$row:$cb$row"; + $sheet->cells($border, function ($cells) { + $cells->setBorder('thin', 'thin', 'thin', 'thin'); + }); + + if($row != 9 && ($cb == 'C' || $cb == 'F' || $cb == 'L')){ + $sheet->cells("$cb$row", function ($cells) { + $cells->setAlignment('right'); + }); + } + } + } + }); + + // Hoja de excel por defecto + $excel->setActiveSheetIndex(0); + + })->store('xls', storage_path('app') . '/public/reportes/servicios_encuestas/'); + + return response()->success(['nombre_archivo' => $nombre.'.xls?micro='.$this->getMicroSeconds()]); + + } + + public function domesticoExcel($year, $month, $operador_id, $sucursal){ + // Campos que se necesitan para mostrar en el reporte de excel + $campos = [ + 'servicios_det.id as servicio_id', + DB::raw("DATE(servicios_det.fecha_solicitud) as 'fecha_solicitud'"), + 'clientes.denominacion as cliente', + DB::raw("CONCAT(users.nombre,' ', users.apellido_paterno, ' ', users.apellido_materno) as operador")]; + //Consulta pra trae y filtrar la información para mostrar + $servicios_det = ServicioDet::select($campos) + ->join('users', 'servicios_det.operador_id', '=', 'users.id') + ->join('servicios_enc', 'servicio_enc_id', '=', 'servicios_enc.id') + ->join('clientes', 'servicios_enc.cliente_id', '=', 'clientes.id') + ->whereMonth('servicios_det.fecha_solicitud', $month) + ->whereYear('servicios_det.fecha_solicitud', $year) + ->where('requiere_encuesta', 1) + ->where('tipo_servicio_id', DOMESTICO) + ->where('users.sucursal_id', $sucursal) + ->orderBy('users.tipo_empleado_id', 'asc') + ->orderBy('servicios_det.id', 'asc') + ->orderBy('operador', 'asc'); + + // Validamos si está filtrado por asesor o bien auxiliar de operación + if($operador_id){ + $servicios_det->where(function($q) use ($operador_id){ + $q->where('operador_id',$operador_id) + ->orWhere('auxiliar_1',$operador_id) + ->orWhere('auxiliar_2',$operador_id); + }); + } + // Obtenemos los datos antes que se va a realizar la próxima consulta + $servicios = $servicios_det->get(); + + foreach($servicios as $servicio){ + // Esta consulta es para traer la cantidad de preguntas que vamos a mostrar en el excel + $servicio->preguntas = ServicioEncuestaDomestico::select('respuestas_domestico.puntuacion as puntuacion') + ->join('respuestas_domestico', 'respuesta_id','=','respuestas_domestico.id') + ->where('servicio_det_id', $servicio->servicio_id) + ->get(); + // obtenemos la fecha de nacimiento del cliente en caso de haberla mandado + $fecha = ServicioEncuestaDomestico::select('respuesta') + ->where('servicio_det_id', $servicio->servicio_id) + ->where('pregunta_id', 11) + ->first(); + $servicio->fecha_nacimiento = ($fecha)? $fecha->respuesta : null; + //Obtenemos el correo del cliente en caso dde haberla aceptado + $correo = ServicioEncuestaDomestico::select('respuesta') + ->where('servicio_det_id', $servicio->servicio_id) + ->where('pregunta_id', 10) + ->first(); + $servicio->correo = ($correo)? $correo->respuesta : null; + } + + return $servicios; + } + + // Esta funcion es para traer los datos que necesitamos para la hoja de servicios empresariales + + public function empresarialExcel($year, $month, $operador_id, $sucursal){ + $campos = [ + 'servicios_det.id as servicio_id', + DB::raw("DATE(servicios_det.fecha_solicitud) as 'fecha_solicitud'"), + 'clientes.denominacion as cliente', + DB::raw("CONCAT(users.nombre,' ', users.apellido_paterno, ' ', users.apellido_materno) as operador")]; + + $servicios_det = ServicioDet::select($campos) + ->join('users', 'servicios_det.operador_id', '=', 'users.id') + ->join('servicios_enc', 'servicio_enc_id', '=', 'servicios_enc.id') + ->join('clientes', 'servicios_enc.cliente_id', '=', 'clientes.id') + ->whereMonth('servicios_det.fecha_solicitud', $month) + ->whereYear('servicios_det.fecha_solicitud', $year) + ->where('requiere_encuesta', 1) + ->where('tipo_servicio_id', EMPRESARIAL) + ->where('users.sucursal_id', $sucursal) + ->orderBy('users.tipo_empleado_id', 'asc') + ->orderBy('servicios_det.id', 'asc') + ->orderBy('operador', 'asc'); + + if($operador_id){ + $servicios_det->where(function($q) use ($operador_id){ + $q->where('operador_id',$operador_id) + ->orWhere('auxiliar_1',$operador_id) + ->orWhere('auxiliar_2',$operador_id); + }); + } + + $servicios_emp = $servicios_det->get(); + + + foreach($servicios_emp as $servicio_emp){ + + $servicio_emp->preguntas = ServicioEncuestaEmpresarial::select('respuestas_empresarial.puntuacion as puntuacion') + ->join('respuestas_empresarial', 'respuesta_id','=','respuestas_empresarial.id') + ->where('servicio_det_id', $servicio_emp->servicio_id) + ->get(); + + $fecha = ServicioEncuestaEmpresarial::select('respuesta') + ->where('servicio_det_id', $servicio_emp->servicio_id) + ->where('pregunta_id', 11) + ->first(); + + $servicio_emp->fecha_nacimiento = ($fecha)? $fecha->respuesta : null; + + $correo = ServicioEncuestaEmpresarial::select('respuesta') + ->where('servicio_det_id', $servicio_emp->servicio_id) + ->where('pregunta_id', 10) + ->first(); + + $servicio_emp->correo = ($correo)? $correo->respuesta : null; + } + + + + return $servicios_emp; + + } + + + +} diff --git a/app/Http/Controllers/Reportes/FiltrosController.php b/app/Http/Controllers/Reportes/FiltrosController.php new file mode 100644 index 0000000..be529d9 --- /dev/null +++ b/app/Http/Controllers/Reportes/FiltrosController.php @@ -0,0 +1,261 @@ +input('deleted'); + $orderBy = $request->input('sortBy','nombre'); + $order = $request->input('order','asc'); + $queryBuilder = Sucursal::orderBy($orderBy,$order); + + if($query = $request->get('query',false)){ + $queryBuilder->where(function($q) use ($query){ + $q->where('nombre','like','%' .$query.'%'); + }); + } + + if($deleted) { + $queryBuilder->onlyTrashed(); + } + + if($perPage = $request->input('perPage',false)){ + $sucursal = $queryBuilder->paginate($perPage); + }else{ + $sucursal = ['data'=>$queryBuilder->get()]; + } + + return response()->success($sucursal); + } + + public function servicios(Request $request) + { + $deleted = $request->input('deleted'); + $orderBy = $request->input('sortBy','nombre'); + $order = $request->input('order','asc'); + $queryBuilder = CatServicio::orderBy($orderBy,$order); + + if($query = $request->get('query',false)){ + $queryBuilder->where(function($q) use ($query){ + $q->where('nombre','like','%' .$query.'%'); + }); + } + + if($deleted) { + $queryBuilder->onlyTrashed(); + } + + if($perPage = $request->input('perPage',false)){ + $servicios = $queryBuilder->paginate($perPage); + }else{ + $servicios = ['data'=>$queryBuilder->get()]; + } + + return response()->success($servicios); + } + + public function tiposServicio(Request $request) + { + $deleted = $request->input('deleted'); + $orderBy = $request->input('sortBy','nombre'); + $order = $request->input('order','asc'); + $queryBuilder = CatTipoServicio::orderBy($orderBy,$order); + + if($query = $request->get('query',false)){ + $queryBuilder->where(function($q) use ($query){ + $q->where('nombre','like','%' .$query.'%'); + }); + } + + if($deleted) { + $queryBuilder->onlyTrashed(); + } + + if($perPage = $request->input('perPage',false)){ + $tipos_servicios = $queryBuilder->paginate($perPage); + }else{ + $tipos_servicios = ['data'=>$queryBuilder->get()]; + } + + return response()->success($tipos_servicios); + } + + public function estatusServicio(Request $request) + { + $deleted = $request->input('deleted'); + $orderBy = $request->input('sortBy','nombre'); + $order = $request->input('order','asc'); + $queryBuilder = CatEstatuServicio::orderBy($orderBy,$order); + + if($query = $request->get('query',false)){ + $queryBuilder->where(function($q) use ($query){ + $q->where('nombre','like','%' .$query.'%'); + }); + } + + if($deleted) { + $queryBuilder->onlyTrashed(); + } + + if($perPage = $request->input('perPage',false)){ + $estatus = $queryBuilder->paginate($perPage); + }else{ + $estatus = ['data'=>$queryBuilder->get()]; + } + + return response()->success($estatus); + } + + public function origenes(Request $request) + { + $orderBy = $request->input('sortBy','nombre'); + $order = $request->input('order','asc'); + + $queryBuilder = CatOrigen::orderBy($orderBy,$order); + + if($query = $request->get('query',false)){ + $queryBuilder->where(function($q) use ($query){ + $q->where('nombre','like','%' .$query.'%'); + }); + } + + if($perPage = $request->input('perPage',false)){ + $data = $queryBuilder->paginate($perPage); + }else{ + $data = ['data'=>$queryBuilder->get()]; + } + + return response()->success($data); + } + + public function asesores(FiltroAsesoresRequest $request) { + + $sucursal = $request->input('sucursal'); + $orderBy = $request->input('sortBy','tipo_empleado_id'); + $order = $request->input('order','asc'); + $month = $request->input('mes'); + $year = $request->input('year'); + + $queryBuilder = User::select('id', 'nombre', 'apellido_paterno', 'apellido_materno', 'tipo_empleado_id') + ->where('sucursal_id', $sucursal) + ->whereIn('tipo_empleado_id', [ASESOR_OPERACIONES, AUXILIAR_TECNICO_1, AUXILIAR_TECNICO_2]) + ->orderBy($orderBy, $order) + ->orderBy('nombre','asc'); + + if($query = $request->get('query',false)){ + $queryBuilder->where(function($q) use ($query){ + $q->where('nombre','like','%' .$query.'%') + ->orWhere('apellido_paterno','like','%' .$query.'%') + ->orWhere('apellido_materno','like','%' .$query.'%'); + }); + } + + if($perPage = $request->input('perPage',false)){ + + $data = $queryBuilder->paginate($perPage); + foreach ($data->items() as $u){ + + if($u->tipo_empleado_id == ASESOR_OPERACIONES){ + $u->tipo_empleado = 'Asesor de Operaciones'; + + $servi = ServicioDet::select('id') + ->where('servicios_det.operador_id', $u->id) + ->whereMonth('fecha_solicitud', $month) + ->whereYear('fecha_solicitud', $year) + ->where('requiere_encuesta', 1)->pluck('id'); + + $encuesta_d = ServicioEncuestaDomestico::select('servicio_det_id')->whereIn('servicio_det_id',$servi)->groupBy('servicio_det_id')->get(); + $encuesta_e = ServicioEncuestaEmpresarial::select('servicio_det_id')->whereIn('servicio_det_id',$servi)->groupBy('servicio_det_id')->get(); + $total = count($encuesta_d) + count($encuesta_e); + + $u->servicios_cantidad = $total.' Encuestas '.' de '.count($servi).' Servicios'; + + /*$u->servicios_cantidad = ServicioDet::where('servicios_det.operador_id', $u->id) + ->whereMonth('fecha_solicitud', $month) + ->whereYear('fecha_solicitud', $year) + ->where('requiere_encuesta', 1)->count();*/ + } + + if($u->tipo_empleado_id == AUXILIAR_TECNICO_1 || $u->tipo_empleado_id == AUXILIAR_TECNICO_2){ + $u->tipo_empleado = 'Auxiliar de Operaciones'; + + $servi = ServicioDet::select('id') + ->whereMonth('fecha_solicitud', $month) + ->whereYear('fecha_solicitud', $year) + ->where(function($q) use ($u){ + $q->where('servicios_det.auxiliar_1', $u->id) + ->orWhere('servicios_det.auxiliar_2', $u->id); + })->pluck('id'); + + $encuesta_d = ServicioEncuestaDomestico::select('servicio_det_id')->whereIn('servicio_det_id',$servi)->groupBy('servicio_det_id')->get(); + $encuesta_e = ServicioEncuestaEmpresarial::select('servicio_det_id')->whereIn('servicio_det_id',$servi)->groupBy('servicio_det_id')->get(); + $total = count($encuesta_d) + count($encuesta_e); + + $u->servicios_cantidad = $total.' Encuestas '. ' de '. count($servi).' Servicios'; + + } + + } + + $users = $data; + + } else{ + + $data = $queryBuilder->get(); + + foreach ($data as $u){ + + if($u->tipo_empleado_id == ASESOR_OPERACIONES){ + $u->tipo_empleado = 'Asesor de Operaciones'; + $u->servicios_cantidad = ServicioDet::where('operador_id', $u->id) + ->where('requiere_encuesta', 1) + ->whereMonth('fecha_solicitud', $month) + ->whereYear('fecha_solicitud', $year) + ->count(); + } + + if($u->tipo_empleado_id == AUXILIAR_TECNICO_1 || $u->tipo_empleado_id == AUXILIAR_TECNICO_2){ + $u->tipo_empleado = 'Auxiliar de Operaciones'; + + $u->servicios_cantidad = ServicioDet::whereMonth('fecha_solicitud', $month) + ->whereYear('fecha_solicitud', $year) + ->where(function($q) use ($u){ + $q->where('servicios_det.auxiliar_1', $u->id) + ->orWhere('servicios_det.auxiliar_2', $u->id); + }) + ->count(); + } + } + + $users = ['data'=>collect($data)->where('servicios_cantidad','<>',0)->values()]; + + } + + + + return response()->success($users); + + + } +} diff --git a/app/Http/Controllers/Reportes/MensualController.php b/app/Http/Controllers/Reportes/MensualController.php new file mode 100644 index 0000000..89d7167 --- /dev/null +++ b/app/Http/Controllers/Reportes/MensualController.php @@ -0,0 +1,285 @@ +format("W"); + return $week; + } + + public function reportes(){ + $mes_actual = Carbon::now()->format('m'); + + $currentWeek = $this->getWeek(date("Y-m-d")); + $firstDateOfMonth = date("Y").'-'.date("m").'-01'; + $firstWeek = $this->getWeek($firstDateOfMonth); + $lastDateOfMonth = date("Y-m-t", strtotime($firstDateOfMonth)); + $lastWeek = $this->getWeek($lastDateOfMonth); + + $servicios_nombre_precios = $this->serviciosNombresPrecios($mes_actual); + $tipos_servicios = $this->tiposServicios($mes_actual); + $tipos_estados_servicio = $this->tipoEstadoServicio($mes_actual); + $tipos_origen = $this->tiposOrigen($mes_actual); + $atencion_cliente = $this->atencionCliente($mes_actual); + $operadores = $this->operadores($mes_actual); + $servicios_vehiculos_precios = $this->serviciosVehiculosPrecios($mes_actual); + $capacidad_aprovechada = $this->capacidadAprovechada($mes_actual, $firstWeek, $lastWeek); + + return response()->success(compact('servicios_nombre_precios','tipos_servicios', 'tipos_estados_servicio', 'tipos_origen', 'atencion_cliente', 'operadores', 'servicios_vehiculos_precios', 'capacidad_aprovechada')); + } + + public function serviciosNombresPrecios($mes_actual){ + + $servicios = ServicioDet::select('cat_servicios.nombre as name', DB::raw("SUM(servicios_det.costo_servicio) AS costo, count(servicios_det.servicio_id) as y")) + ->join('cat_servicios', 'servicios_det.servicio_id', '=', 'cat_servicios.id') + ->whereMonth('servicios_det.fecha_solicitud', $mes_actual) + ->groupBy('cat_servicios.nombre') + ->get(); + + $total_costo = (string)number_format(collect($servicios)->sum('costo'),2); + + return compact('servicios', 'total_costo'); + } + + public function tiposServicios($mes_actual){ + + $sevicios = ServicioDet::select('cat_tipos_servicios.nombre as name', DB::raw("count(servicios_det.tipo_servicio_id) as y")) + ->join('cat_tipos_servicios', 'servicios_det.tipo_servicio_id', '=', 'cat_tipos_servicios.id') + ->whereMonth('servicios_det.fecha_solicitud', $mes_actual) + ->groupBy('cat_tipos_servicios.nombre') + ->get(); + + return $sevicios; + } + + public function tipoEstadoServicio($mes_actual){ + + $sevicios = ServicioDet::select('cat_estatus_servicios.nombre as name', DB::raw("count(servicios_det.estatus_servicio_id) as y")) + ->join('cat_estatus_servicios', 'servicios_det.estatus_servicio_id', '=', 'cat_estatus_servicios.id') + ->whereMonth('servicios_det.fecha_solicitud', $mes_actual) + ->groupBy('cat_estatus_servicios.nombre') + ->get(); + + return $sevicios; + } + + public function tiposOrigen($mes_actual){ + + $sevicios = ServicioEnc::select('cat_origenes.nombre as name', DB::raw("count(servicios_enc.origen_id) as y")) + ->join('servicios_det', 'servicios_enc.id', '=', 'servicios_det.servicio_enc_id') + ->join('cat_origenes', 'servicios_enc.origen_id', '=', 'cat_origenes.id') + ->whereMonth('servicios_det.fecha_solicitud', $mes_actual) + ->groupBy('cat_origenes.nombre') + ->get(); + + return $sevicios; + } + + public function atencionCliente($mes_actual){ + + $usuarios_series = []; + $estatus_series = []; + + $estatus_servicio = CatEstatuServicio::get(); + + foreach ($estatus_servicio as $e){ + + $usuarios_series = []; + $valores_estatus = []; + + $atencion_cliente = User::select('id', DB::raw("CONCAT(nombre, ' ',apellido_paterno) as nombre_atencion")) + ->where('tipo_empleado_id', ATENCION_CLIENTES) + ->get(); + + foreach ($atencion_cliente as $aC){ + + $total = ServicioEnc::join('servicios_det', 'servicios_enc.id', '=', 'servicios_det.servicio_enc_id') + ->join('cat_estatus_servicios', 'servicios_det.estatus_servicio_id', '=', 'cat_estatus_servicios.id') + ->where('servicios_enc.usuario_agenda_id',$aC->id) + ->whereMonth('servicios_det.fecha_solicitud', $mes_actual); + + + $total_general = ($total->count() == 1)? " (".$total->count()." servicio)" : " (".$total->count()." servicios)"; + $nombre = $aC->nombre_atencion.$total_general; + + array_push($usuarios_series, $nombre); + + $total_estatus = $total->where('servicios_det.estatus_servicio_id', $e->id)->count(); + array_push($valores_estatus, $total_estatus); + } + + $estatus_series[$e->nombre] = $valores_estatus; + } + + + $datos = []; + foreach ($estatus_series as $key => $e){ + array_push($datos, ["name"=>$key, "data"=>$e]); + } + + $result = ["usuarios"=>$usuarios_series, "datos"=>$datos]; + + return $result; + } + + public function operadores($mes_actual){ + + $usuarios_series = []; + $estatus_series = []; + + $estatus_servicio = CatEstatuServicio::get(); + + foreach ($estatus_servicio as $e){ + + $usuarios_series = []; + $valores_estatus = []; + + $operadores = User::select('id', DB::raw("CONCAT(nombre, ' ',apellido_paterno) as nombre_atencion")) + ->where('tipo_empleado_id', ASESOR_OPERACIONES) + ->get(); + + foreach ($operadores as $o){ + + + $total = ServicioDet::join('cat_estatus_servicios', 'servicios_det.estatus_servicio_id', '=', 'cat_estatus_servicios.id') + ->where('servicios_det.operador_id',$o->id) + ->whereMonth('servicios_det.fecha_solicitud', $mes_actual); + + $total_general = ($total->count() == 1)? " (".$total->count()." servicio)" : " (".$total->count()." servicios)"; + $nombre = $o->nombre_atencion.$total_general; + + array_push($usuarios_series, $nombre); + + $total_estatus = $total->where('servicios_det.estatus_servicio_id', $e->id)->count(); + array_push($valores_estatus, $total_estatus); + } + + $estatus_series[$e->nombre] = $valores_estatus; + } + + + $datos = []; + foreach ($estatus_series as $key => $e){ + array_push($datos, ["name"=>$key, "data"=>$e]); + } + $result = ["usuarios"=>$usuarios_series, "datos"=>$datos]; + + + return $result; + } + + public function serviciosVehiculosPrecios($mes_actual){ + + $servicios = ServicioDet::select('cat_vehiculos.num_economico as name', DB::raw("SUM(servicios_det.costo_servicio) AS costo, count(servicios_det.servicio_id) as y")) + ->join('cat_vehiculos', 'servicios_det.vehiculo_id', '=', 'cat_vehiculos.id') + ->whereMonth('servicios_det.fecha_solicitud', $mes_actual) + ->groupBy('cat_vehiculos.num_economico') + ->get(); + + return $servicios; + } + + public function capacidadAprovechada($mes_actual, $firstWeek, $lastWeek){ + + $respuesta = []; + $index = 0; + + $tipos_vehiculo = TipoVehiculo::select(['id', 'nombre'])->orderBy('nombre')->get(); + foreach ($tipos_vehiculo as $t){ + $tmpId = $t->id; + $tmpNombre = $t->nombre; + + $campos = [ + 'cat_vehiculos.tipo_vehiculo_id', + 'cat_tipos_vehiculos.nombre AS tipo_vehiculo', + 'cat_tipos_vehiculos.objetivo_mensual', + DB::raw("SEC_TO_TIME(SUM(TIME_TO_SEC(servicios_progreso.duracion))) AS 'total_duracion'"), + DB::raw("TRUNCATE(SUM((TIME_TO_SEC(TIME(servicios_progreso.duracion))/60)/60), 3) AS 'total_duracion_fracc'") + ]; + + $objetivoSemanal = 0; + $objetivoMensual = 0; + $totalWeeks = 0; + $sumatoriaPorcentajes = 0.0; + + $informacion = []; + + for($i=$firstWeek;$i<=$lastWeek;$i++){ + // execute this week + $datos = ServicioDet::select($campos) + ->join('servicios_enc', 'servicios_det.servicio_enc_id', '=', 'servicios_enc.id') + ->join('cat_servicios', 'servicios_det.servicio_id', '=', 'cat_servicios.id') + ->join('cat_tipos_servicios', 'servicios_det.tipo_servicio_id', '=', 'cat_tipos_servicios.id') + ->join('cat_estatus_servicios','servicios_det.estatus_servicio_id','=','cat_estatus_servicios.id') + ->join('cat_vehiculos', 'servicios_det.vehiculo_id', '=', 'cat_vehiculos.id') + ->join('cat_tipos_vehiculos', 'cat_tipos_vehiculos.id', '=', 'cat_vehiculos.tipo_vehiculo_id') + ->leftJoin('servicios_progreso', 'servicios_det.id', '=', 'servicios_progreso.servicio_det_id') + ->join('cat_origenes', 'servicios_enc.origen_id', '=', 'cat_origenes.id') + ->where('cat_vehiculos.tipo_vehiculo_id', $tmpId) + //->whereMonth('servicios_det.fecha_solicitud', $mes_actual) + ->whereRaw("WEEKOFYEAR(DATE(servicios_det.fecha_solicitud))=?", $i) + ->groupBy('cat_vehiculos.tipo_vehiculo_id', 'cat_tipos_vehiculos.nombre', 'cat_tipos_vehiculos.objetivo_mensual') + ->first(); + + if($datos){ + $sumatoriaPorcentajes = floatval($sumatoriaPorcentajes) + floatval($datos->total_duracion_fracc); + $objetivoMensual = $datos->objetivo_mensual; + array_push($informacion, [ + 'week_num'=>$i, + 'total_duracion'=>$datos->total_duracion, + 'total_duracion_fracc'=>$datos->total_duracion_fracc, + ]); + }else{ + array_push($informacion, [ + 'week_num'=>$i, + 'total_duracion'=>null, + 'total_duracion_fracc'=>null + ]); + } + + $totalWeeks++; + } + + $respuesta[$index]['tipo_vehiculo_id'] = $tmpId; + $respuesta[$index]['tipo_vehiculo'] = $tmpNombre; + $respuesta[$index]['objetivo_mensual'] = $objetivoMensual; + $respuesta[$index]['objetivo_semanal'] = ($totalWeeks == 0) ? 0 : $objetivoMensual/($totalWeeks); + $respuesta[$index]['semanas'] = $totalWeeks; + $respuesta[$index]['total_cumplimiento'] = $sumatoriaPorcentajes; + $respuesta[$index]['datos'] = $informacion; + $index++; + } + + return $respuesta; + } + + function obtener_semana($date) { + + $date2 = strtotime($date); + $inicio0 = strtotime('sunday this week -1 week', $date2); + $inicio=date('Y-m-d', $inicio0); + + $dias = array(); + for($i=1;$i<=7;$i++){ + $dia = date("Y-m-d", strtotime("$inicio +$i day")); + array_push($dias,$dia); + } + + return $dias; + } +} diff --git a/app/Http/Controllers/Reportes/ProductividadAtencionClientesController.php b/app/Http/Controllers/Reportes/ProductividadAtencionClientesController.php new file mode 100644 index 0000000..a0a0237 --- /dev/null +++ b/app/Http/Controllers/Reportes/ProductividadAtencionClientesController.php @@ -0,0 +1,408 @@ +input('sucursal'); + $fecha_inicio = $request->input('fecha_inicio'); + $fecha_final = $request->input('fecha_final'); + $definio = $request->input('definio'); + + $orderBy = $request->input('sortBy','nombre'); + $order = $request->input('order','asc'); + + $queryBuilder = User::select('id', 'nombre', 'apellido_paterno', 'apellido_materno') + ->where('tipo_empleado_id', ATENCION_CLIENTES) + ->where('sucursal_id', $sucursal) + ->orderBy($orderBy,$order); + + if($query = $request->get('query',false)){ + $queryBuilder->where(function($q) use ($query){ + $q->where('nombre','like','%' .$query.'%') + ->orWhere('apellido_paterno','like','%' .$query.'%') + ->orWhere('apellido_materno','like','%' .$query.'%'); + }); + } + + if($perPage = $request->input('perPage',false)){ + + $data = $queryBuilder->paginate($perPage); + foreach ($data->items() as $u){ + $count = ServicioDet::join('servicios_enc','servicios_det.servicio_enc_id', '=', 'servicios_enc.id') + ->where('servicios_enc.usuario_agenda_id', $u->id) + ->whereDate('servicios_det.fecha_solicitud','>=',$fecha_inicio) + ->whereDate('servicios_det.fecha_solicitud','<=',$fecha_final); + + if($definio == DEFINIO_CLIENTE){ + $count->where('servicios_det.definido_cliente', 1); + } + + if($definio == DEFINIO_ATENCION_CLIENTE){ + $count->where('servicios_det.definido_cliente', 0); + } + + $u->servicios_cantidad = $count->count(); + } + + $users = $data; + }else{ + + $data = $queryBuilder->get(); + foreach ($data as $u){ + $count = ServicioDet::join('servicios_enc','servicios_det.servicio_enc_id', '=', 'servicios_enc.id') + ->where('servicios_enc.usuario_agenda_id', $u->id) + ->whereDate('servicios_det.fecha_solicitud','>=',$fecha_inicio) + ->whereDate('servicios_det.fecha_solicitud','<=',$fecha_final); + + if($definio == DEFINIO_CLIENTE){ + $count->where('servicios_det.definido_cliente', 1); + } + + if($definio == DEFINIO_ATENCION_CLIENTE){ + $count->where('servicios_det.definido_cliente', 0); + } + + $u->servicios_cantidad = $count->count(); + } + + $users = ['data'=>$data]; + } + + return response()->success($users); + } + + public function reportes(ProductividadAtencionClientesRequest $request){ + + $orderBy = $request->input('sortBy','servicios_enc.id'); + $order = $request->input('order','asc'); + + $sucursal = $request->input('sucursal'); + $fecha_inicio = $request->input('fecha_inicio'); + $fecha_final = $request->input('fecha_final'); + $usuario_id = $request->input('usuario_id'); + $definio = $request->input('definio'); + + $campos = [ + 'servicios_enc.id as numero_solicitud', + DB::raw("DATE(servicios_det.fecha_solicitud) as 'fecha_servicio'"), + DB::raw("TIME(servicios_det.fecha_solicitud) as 'hora_servicio'"), + 'cat_servicios.nombre as servicio', + 'servicios_det.costo_servicio as costo', + 'cat_tipos_servicios.nombre as tipo_servicio', + 'cat_estatus_servicios.nombre as estatus_servicio', + 'clientes.denominacion as nombre_cliente', + 'clientes_domicilios.calle as calle_cliente', + 'clientes_domicilios.entre_calles as entre_calles_cliente', + 'clientes_domicilios.num_ext as num_ext_cliente', + 'clientes_domicilios.num_int as num_int_cliente', + 'clientes_domicilios.colonia as colonia_cliente', + 'clientes_domicilios.ciudad as ciudad_cliente', + 'clientes_domicilios.cp as cp_cliente', + 'asesor.nombre as nombre_asesor', + 'asesor.apellido_paterno as apellido_paterno_asesor', + 'asesor.apellido_materno as apellido_materno_asesor', + 'auxiliar.nombre as nombre_auxiliar', + 'auxiliar.apellido_paterno as apellido_paterno_auxiliar', + 'auxiliar.apellido_materno as apellido_materno_auxiliar', + 'cat_vehiculos.num_economico as vehiculo', + 'servicios_progreso.duracion as duracion_servicio' + ]; + + $queryBuilder = ServicioDet::select($campos) + ->join('servicios_enc', 'servicios_det.servicio_enc_id', '=', 'servicios_enc.id') + ->join('cat_servicios', 'servicios_det.servicio_id', '=', 'cat_servicios.id') + ->join('cat_tipos_servicios', 'servicios_det.tipo_servicio_id', '=', 'cat_tipos_servicios.id') + ->join('cat_estatus_servicios','servicios_det.estatus_servicio_id','=','cat_estatus_servicios.id') + ->join('clientes','servicios_enc.cliente_id','=','clientes.id') + ->join('clientes_domicilios','servicios_enc.cliente_domicilio_id','=','clientes_domicilios.id') + ->join('users as asesor', 'servicios_det.operador_id', '=', 'asesor.id') + ->leftJoin('users as auxiliar', 'servicios_det.auxiliar_1', '=', 'auxiliar.id') + ->join('cat_vehiculos', 'servicios_det.vehiculo_id', '=', 'cat_vehiculos.id') + ->leftJoin('servicios_progreso', 'servicios_det.id', '=', 'servicios_progreso.servicio_det_id') + ->where('servicios_enc.sucursal_id', $sucursal) + ->where('servicios_enc.usuario_agenda_id', $usuario_id) + ->whereDate('servicios_det.fecha_solicitud','>=',$fecha_inicio) + ->whereDate('servicios_det.fecha_solicitud','<=',$fecha_final) + ->orderBy($orderBy,$order); + + if($definio == DEFINIO_CLIENTE){ + $queryBuilder->where('servicios_det.definido_cliente', 1); + } + + if($definio == DEFINIO_ATENCION_CLIENTE){ + $queryBuilder->where('servicios_det.definido_cliente', 0); + } + + if($query = $request->get('query',false)){ + $queryBuilder->where(function($q) use ($query){ + //$q->where('nombre','like','%' .$query.'%'); + }); + } + + if($perPage = $request->input('perPage',false)){ + $data = $queryBuilder->paginate($perPage); + }else{ + $data = ['data'=>$queryBuilder->get()]; + } + + return response()->success($data); + } + + public function generarExcel(ProductividadAtencionClientesRequest $request){ + + $sucursal = $request->input('sucursal'); + $fecha_inicio = $request->input('fecha_inicio'); + $fecha_final = $request->input('fecha_final'); + $usuario_id = $request->input('usuario_id'); + $definio = $request->input('definio'); + + $campos = [ + 'servicios_enc.id as numero_solicitud', + DB::raw("DATE(servicios_det.fecha_solicitud) as 'fecha_servicio'"), + DB::raw("TIME(servicios_det.fecha_solicitud) as 'hora_servicio'"), + 'cat_servicios.nombre as servicio', + 'servicios_det.costo_servicio as costo', + 'cat_tipos_servicios.nombre as tipo_servicio', + 'cat_estatus_servicios.nombre as estatus_servicio', + 'clientes.denominacion as nombre_cliente', + DB::raw("CONCAT(clientes_domicilios.calle,' ',clientes_domicilios.num_ext,' ', clientes_domicilios.colonia,' ',clientes_domicilios.cp,' ',clientes_domicilios.ciudad) as domicilio"), + DB::raw("CONCAT(asesor.nombre,' ',asesor.apellido_paterno,' ',asesor.apellido_materno) as asesor"), + DB::raw("CONCAT(auxiliar.nombre,' ',auxiliar.apellido_paterno,' ',auxiliar.apellido_materno) as auxiliar"), + 'cat_vehiculos.num_economico as vehiculo', + 'servicios_progreso.duracion as duracion_servicio' + ]; + + $queryBuilder = ServicioDet::select($campos) + ->join('servicios_enc', 'servicios_det.servicio_enc_id', '=', 'servicios_enc.id') + ->join('cat_servicios', 'servicios_det.servicio_id', '=', 'cat_servicios.id') + ->join('cat_tipos_servicios', 'servicios_det.tipo_servicio_id', '=', 'cat_tipos_servicios.id') + ->join('cat_estatus_servicios','servicios_det.estatus_servicio_id','=','cat_estatus_servicios.id') + ->join('clientes','servicios_enc.cliente_id','=','clientes.id') + ->join('clientes_domicilios','servicios_enc.cliente_domicilio_id','=','clientes_domicilios.id') + ->join('users as asesor', 'servicios_det.operador_id', '=', 'asesor.id') + ->leftJoin('users as auxiliar', 'servicios_det.auxiliar_1', '=', 'auxiliar.id') + ->join('cat_vehiculos', 'servicios_det.vehiculo_id', '=', 'cat_vehiculos.id') + ->leftJoin('servicios_progreso', 'servicios_det.id', '=', 'servicios_progreso.servicio_det_id') + ->where('servicios_enc.sucursal_id', $sucursal) + ->where('servicios_enc.usuario_agenda_id', $usuario_id) + ->whereDate('servicios_det.fecha_solicitud','>=',$fecha_inicio) + ->whereDate('servicios_det.fecha_solicitud','<=',$fecha_final) + ->orderBy('servicios_enc.id','asc'); + + if($definio == DEFINIO_CLIENTE){ + $queryBuilder->where('servicios_det.definido_cliente', 1); + } + + if($definio == DEFINIO_ATENCION_CLIENTE){ + $queryBuilder->where('servicios_det.definido_cliente', 0); + } + + $servicios = $queryBuilder->get(); + $total = $queryBuilder->count(); + + $nombre_usuario = User::where('id', $usuario_id)->first(); + $titulo = "Reporte de Servicios Atención a Cliente ".$nombre_usuario->nombre." ".$nombre_usuario->apellido_paterno; + + list($y_i, $m_i, $d_i) = explode("-", $fecha_inicio); + list($y_f, $m_f, $d_f) = explode("-", $fecha_final); + $f_i = $d_i."_".$m_i."_".$y_i; + $f_f = $d_f."_".$m_f."_".$y_f; + $nombre = "Reporte_Atención_Cliente_".$nombre_usuario->nombre."_".$nombre_usuario->apellido_paterno."_".$f_i."-".$f_f; + + foreach ($servicios as $s){ + $s->costo = floatval($s->costo); + list($y, $m, $d) = explode("-", $s->fecha_servicio); + $s->fecha_servicio = "$d/$m/$y"; + $s->numero_solicitud = (int)$s->numero_solicitud; + } + + Excel::create($nombre, function($excel) use($servicios, $titulo, $fecha_inicio, $fecha_final, $total){ + + // Set the title + $excel->setTitle('Reporte de Servicios Atención a Cliente'); + + // Chain the setters + $excel->setCreator('DRENAX') + ->setCompany('DRENAX'); + + // Call them separately + $excel->setDescription('Reporte de Servicios Atención a Cliente'); + + $excel->sheet('Reporte_Servicios_AtnCliente', function ($sheet) use($servicios, $titulo, $fecha_inicio, $fecha_final, $total) { + + $sheet->setColumnFormat(array( + 'F' => '"$"#,##0.00_-', + 'C' => 'd/m/y' + )); + + //Mostrar logo + $sheet->mergeCells('B2:D6'); + + $objDrawing = new \PHPExcel_Worksheet_Drawing; + $objDrawing->setPath(resource_path('assets/images/logos').'/logo_drenax.png'); + $objDrawing->setWidth(95); + $objDrawing->setHeight(80); + $objDrawing->setCoordinates('B2'); + $objDrawing->setOffsetX(9); + $objDrawing->setOffsetY(9); + $objDrawing->setWorksheet($sheet); + + $sheet->mergeCells('I2:L6'); + + $sheet->cell('I2', function($cell) use($titulo, $fecha_inicio, $fecha_final, $total) { + + $cell->setFontFamily('Aharoni'); + $cell->setFontWeight('bold'); + $cell->setAlignment('center'); + $cell->setValignment('center'); + $cell->setFontSize(20); + $cell->setValue($titulo); + + }); + + $sheet->cell('J8', function($cell) use($fecha_inicio) { + list($y, $m, $d) = explode("-", $fecha_inicio); + + $cell->setFontFamily('Calibri'); + $cell->setAlignment('left'); + $cell->setFontSize(12); + $cell->setValue('Del: '.$d.'/'.$m.'/'.$y); + + }); + + $sheet->cell('K8', function($cell) use($fecha_final) { + list($y, $m, $d) = explode("-", $fecha_final); + + $cell->setFontFamily('Calibri'); + $cell->setAlignment('left'); + $cell->setFontSize(12); + $cell->setValue('Al: '.$d.'/'.$m.'/'.$y); + + }); + + $sheet->cell('M8', function($cell) { + $cell->setFontFamily('Calibri'); + $cell->setAlignment('left'); + $cell->setFontSize(12); + $cell->setValue('Total:'); + + }); + + $sheet->cell('N8', function($cell) use($total) { + $cell->setFontFamily('Calibri'); + $cell->setAlignment('left'); + $cell->setFontSize(12); + $cell->setValue($total.' Servicios'); + + }); + + //Mostar valores de consulta + $sheet->fromArray($servicios, null, 'B9', true); + + //Formato en columnas de titulo + $sheet->cells('B9:N9', function ($cells) { + $cells->setBackground('#001870'); + $cells->setFontColor('#ffffff'); + $cells->setFontSize(13); + $cells->setFontFamily('Calibri'); + $cells->setAlignment('left'); + $cells->setFontWeight('bold'); + }); + + $sheet->getStyle('B9:N9' , $sheet->getHighestRow())->getAlignment()->setWrapText(true); + + //Titulos personalizados + $titulos_cell = [ + ['cell' => 'B9', 'titulo' => 'Número de solicitud'], + ['cell' => 'C9', 'titulo' => 'Fecha del servicio'], + ['cell' => 'D9', 'titulo' => 'Hora del servicio'], + ['cell' => 'E9', 'titulo' => 'Servicio'], + ['cell' => 'F9', 'titulo' => 'Costo de servicio'], + ['cell' => 'G9', 'titulo' => 'Tipo de servicio'], + ['cell' => 'H9', 'titulo' => 'Estatus de servicio'], + ['cell' => 'I9', 'titulo' => 'Nombre del cliente'], + ['cell' => 'J9', 'titulo' => 'Domicilio de servicio'], + ['cell' => 'K9', 'titulo' => 'Asesor de operaciones'], + ['cell' => 'L9', 'titulo' => 'Auxiliar de operaciones'], + ['cell' => 'M9', 'titulo' => 'Vehiculo asignado'], + ['cell' => 'N9', 'titulo' => 'Duración del servicio (cronómetro)'] + ]; + + foreach ($titulos_cell as $t){ + $sheet->cell($t['cell'], function($cell) use($t) { + $cell->setValue($t['titulo']); + }); + } + + //Size a columnas indicadas + $columns_set = [ + 'B9', 'C9', 'D9', 'M9', 'N9' + ]; + + foreach ($columns_set as $c){ + $set_column = [ + $c => [ + 'width' => ($c == 'N9')? 23: 14, + 'height' => 40 + ] + ]; + $sheet->setSize($set_column); + } + + //AutoSize en columnas indicadas + $columns_auto= [ + 'E','F','G','H','I','J','K','L' + ]; + + foreach ($columns_auto as $c){ + $sheet->getColumnDimension($c)->setAutoSize(true); + } + + $sheet->setWidth(array( + 'A' => 3, + )); + + //Borde + $columns_border= [ + 'B','C','D','E','F','G','H','I','J','K','L','M','N' + ]; + + for ($i=0; $i<= $total; $i++){ + $row = 9 + $i; + + foreach ($columns_border as $cb){ + $border = "$cb$row:$cb$row"; + $sheet->cells($border, function ($cells) { + $cells->setBorder('thin', 'thin', 'thin', 'thin'); + }); + + if($row != 9 && ($cb == 'C' || $cb == 'D' || $cb == 'F' || $cb == 'N')){ + $sheet->cells("$cb$row", function ($cells) { + $cells->setAlignment('right'); + }); + } + } + } + }); + + + })->store('xls', storage_path('app') . '/public/reportes/productividad_atencion_clientes/'); + + return response()->success(['nombre_archivo' => $nombre.'.xls?micro='.$this->getMicroSeconds()]); + } +} diff --git a/app/Http/Controllers/Reportes/SemanalController.php b/app/Http/Controllers/Reportes/SemanalController.php new file mode 100644 index 0000000..39b1fed --- /dev/null +++ b/app/Http/Controllers/Reportes/SemanalController.php @@ -0,0 +1,272 @@ +format("W"); + return $week; + } + + public function reportes(){ + + $fecha_actual = Carbon::now()->format('Y-m-d'); + $dias_semana = $this->obtener_semana($fecha_actual); + + $currentWeek = $this->getWeek(date("Y-m-d")); + $firstDateOfMonth = date("Y").'-'.date("m").'-01'; + $firstWeek = $this->getWeek($firstDateOfMonth); + $lastDateOfMonth = date("Y-m-t", strtotime($firstDateOfMonth)); + $lastWeek = $this->getWeek($lastDateOfMonth); + $weeks = 0; + for($i=$firstWeek;$i<=$lastWeek;$i++) $weeks++; + + $servicios_nombre_precios = $this->serviciosNombresPrecios($dias_semana); + $tipos_servicios = $this->tiposServicios($dias_semana); + $tipos_estados_servicio = $this->tipoEstadoServicio($dias_semana); + $tipos_origen = $this->tiposOrigen($dias_semana); + $atencion_cliente = $this->atencionCliente($dias_semana); + $operadores = $this->operadores($dias_semana); + $servicios_vehiculos_precios = $this->serviciosVehiculosPrecios($dias_semana); + $capacidad_aprovechada = $this->capacidadAprovechada($currentWeek, $weeks); + + return response()->success(compact('servicios_nombre_precios','tipos_servicios', 'tipos_estados_servicio', 'tipos_origen', 'atencion_cliente', 'operadores', 'servicios_vehiculos_precios', 'capacidad_aprovechada')); + } + + public function serviciosNombresPrecios($dias_semana){ + + $servicios = ServicioDet::select('cat_servicios.nombre as name', DB::raw("SUM(servicios_det.costo_servicio) AS costo, count(servicios_det.servicio_id) as y")) + ->join('cat_servicios', 'servicios_det.servicio_id', '=', 'cat_servicios.id') + ->whereIn(DB::raw("DATE(servicios_det.fecha_solicitud)"),$dias_semana) + ->groupBy('cat_servicios.nombre') + ->get(); + + $total_costo = (string)number_format(collect($servicios)->sum('costo'),2); + + return compact('servicios', 'total_costo'); + } + + public function tiposServicios($dias_semana){ + + $servicios = ServicioDet::select('cat_tipos_servicios.nombre as name', DB::raw("count(servicios_det.tipo_servicio_id) as y")) + ->join('cat_tipos_servicios', 'servicios_det.tipo_servicio_id', '=', 'cat_tipos_servicios.id') + ->whereIn(DB::raw("DATE(servicios_det.fecha_solicitud)"),$dias_semana) + ->groupBy('cat_tipos_servicios.nombre') + ->get(); + + return $servicios; + } + + public function tipoEstadoServicio($dias_semana){ + + $servicios = ServicioDet::select('cat_estatus_servicios.nombre as name', DB::raw("count(servicios_det.estatus_servicio_id) as y")) + ->join('cat_estatus_servicios', 'servicios_det.estatus_servicio_id', '=', 'cat_estatus_servicios.id') + ->whereIn(DB::raw("DATE(servicios_det.fecha_solicitud)"),$dias_semana) + ->groupBy('cat_estatus_servicios.nombre') + ->get(); + + return $servicios; + } + + public function tiposOrigen($dias_semana){ + + $servicios = ServicioEnc::select('cat_origenes.nombre as name', DB::raw("count(servicios_enc.origen_id) as y")) + ->join('servicios_det', 'servicios_enc.id', '=', 'servicios_det.servicio_enc_id') + ->join('cat_origenes', 'servicios_enc.origen_id', '=', 'cat_origenes.id') + ->whereIn(DB::raw("DATE(servicios_det.fecha_solicitud)"),$dias_semana) + ->groupBy('cat_origenes.nombre') + ->get(); + + return $servicios; + } + + public function atencionCliente($dias_semana){ + + $usuarios_series = []; + $estatus_series = []; + + $estatus_servicio = CatEstatuServicio::get(); + + foreach ($estatus_servicio as $e){ + + $usuarios_series = []; + $valores_estatus = []; + + $atencion_cliente = User::select('id', DB::raw("CONCAT(nombre, ' ',apellido_paterno) as nombre_atencion")) + ->where('tipo_empleado_id', ATENCION_CLIENTES) + ->get(); + + foreach ($atencion_cliente as $aC){ + + $total = ServicioEnc::join('servicios_det', 'servicios_enc.id', '=', 'servicios_det.servicio_enc_id') + ->join('cat_estatus_servicios', 'servicios_det.estatus_servicio_id', '=', 'cat_estatus_servicios.id') + ->where('servicios_enc.usuario_agenda_id',$aC->id) + ->whereIn(DB::raw("DATE(servicios_det.fecha_solicitud)"),$dias_semana); + + + $total_general = ($total->count() == 1)? " (".$total->count()." servicio)" : " (".$total->count()." servicios)"; + $nombre = $aC->nombre_atencion.$total_general; + + array_push($usuarios_series, $nombre); + + $total_estatus = $total->where('servicios_det.estatus_servicio_id', $e->id)->count(); + array_push($valores_estatus, $total_estatus); + } + + $estatus_series[$e->nombre] = $valores_estatus; + } + + + $datos = []; + foreach ($estatus_series as $key => $e){ + array_push($datos, ["name"=>$key, "data"=>$e]); + } + + $result = ["usuarios"=>$usuarios_series, "datos"=>$datos]; + + return $result; + } + + public function operadores($dias_semana){ + + $usuarios_series = []; + $estatus_series = []; + + $estatus_servicio = CatEstatuServicio::get(); + + foreach ($estatus_servicio as $e){ + + $usuarios_series = []; + $valores_estatus = []; + + $operadores = User::select('id', DB::raw("CONCAT(nombre, ' ',apellido_paterno) as nombre_atencion")) + ->where('tipo_empleado_id', ASESOR_OPERACIONES) + ->get(); + + foreach ($operadores as $o){ + + + $total = ServicioDet::join('cat_estatus_servicios', 'servicios_det.estatus_servicio_id', '=', 'cat_estatus_servicios.id') + ->where('servicios_det.operador_id',$o->id) + ->whereIn(DB::raw("DATE(servicios_det.fecha_solicitud)"),$dias_semana); + + $total_general = ($total->count() == 1)? " (".$total->count()." servicio)" : " (".$total->count()." servicios)"; + $nombre = $o->nombre_atencion.$total_general; + + array_push($usuarios_series, $nombre); + + $total_estatus = $total->where('servicios_det.estatus_servicio_id', $e->id)->count(); + array_push($valores_estatus, $total_estatus); + } + + $estatus_series[$e->nombre] = $valores_estatus; + } + + + $datos = []; + foreach ($estatus_series as $key => $e){ + array_push($datos, ["name"=>$key, "data"=>$e]); + } + $result = ["usuarios"=>$usuarios_series, "datos"=>$datos]; + + + return $result; + } + + public function serviciosVehiculosPrecios($dias_semana){ + + $servicios = ServicioDet::select('cat_vehiculos.num_economico as name', DB::raw("SUM(servicios_det.costo_servicio) AS costo, count(servicios_det.servicio_id) as y")) + ->join('cat_vehiculos', 'servicios_det.vehiculo_id', '=', 'cat_vehiculos.id') + ->whereIn(DB::raw("DATE(servicios_det.fecha_solicitud)"),$dias_semana) + ->groupBy('cat_vehiculos.num_economico') + ->get(); + + return $servicios; + } + + public function capacidadAprovechada($semana_actual, $weeks=4){ + + $respuesta = []; + + $tipos_vehiculo = TipoVehiculo::select(['id', 'nombre'])->orderBy('nombre')->get(); + foreach ($tipos_vehiculo as $t){ + $tmpId = $t->id; + $tmpNombre = $t->nombre; + + $campos = [ + 'cat_vehiculos.tipo_vehiculo_id', + 'cat_tipos_vehiculos.nombre AS tipo_vehiculo', + 'cat_tipos_vehiculos.objetivo_mensual', + DB::raw("SEC_TO_TIME(SUM(TIME_TO_SEC(servicios_progreso.duracion))) AS 'total_duracion'"), + DB::raw("TRUNCATE(SUM((TIME_TO_SEC(TIME(servicios_progreso.duracion))/60)/60), 3) AS 'total_duracion_fracc'") + ]; + + $datos = ServicioDet::select($campos) + ->join('servicios_enc', 'servicios_det.servicio_enc_id', '=', 'servicios_enc.id') + ->join('cat_servicios', 'servicios_det.servicio_id', '=', 'cat_servicios.id') + ->join('cat_tipos_servicios', 'servicios_det.tipo_servicio_id', '=', 'cat_tipos_servicios.id') + ->join('cat_estatus_servicios','servicios_det.estatus_servicio_id','=','cat_estatus_servicios.id') + ->join('cat_vehiculos', 'servicios_det.vehiculo_id', '=', 'cat_vehiculos.id') + ->join('cat_tipos_vehiculos', 'cat_tipos_vehiculos.id', '=', 'cat_vehiculos.tipo_vehiculo_id') + ->leftJoin('servicios_progreso', 'servicios_det.id', '=', 'servicios_progreso.servicio_det_id') + ->join('cat_origenes', 'servicios_enc.origen_id', '=', 'cat_origenes.id') + ->where('cat_vehiculos.tipo_vehiculo_id', $tmpId) + ->whereRaw("WEEKOFYEAR(DATE(servicios_det.fecha_solicitud))=?", $semana_actual) + ->groupBy('cat_vehiculos.tipo_vehiculo_id', 'cat_tipos_vehiculos.nombre', 'cat_tipos_vehiculos.objetivo_mensual') + ->first(); + + if($datos){ + array_push($respuesta, [ + 'tipo_vehiculo_id'=>$datos->tipo_vehiculo_id, + 'tipo_vehiculo'=>$datos->tipo_vehiculo, + 'objetivo_mensual'=>$datos->objetivo_mensual, + 'objetivo_semanal'=>($weeks == 0) ? 0 : $datos->objetivo_mensual/($weeks), + 'semanas'=>$weeks, + 'total_duracion'=>$datos->total_duracion, + 'total_duracion_fracc'=>$datos->total_duracion_fracc, + ]); + }else{ + array_push($respuesta, [ + 'tipo_vehiculo_id'=>$tmpId, + 'tipo_vehiculo'=>$tmpNombre, + 'objetivo_mensual'=>0, + 'objetivo_semanal'=>0, + 'semanas'=>$weeks, + 'total_duracion'=>null, + 'total_duracion_fracc'=>null + ]); + } + } + + return $respuesta; + } + + function obtener_semana($date) { + + $date2 = strtotime($date); + $inicio0 = strtotime('sunday this week -1 week', $date2); + $inicio=date('Y-m-d', $inicio0); + + $dias = array(); + for($i=1;$i<=7;$i++){ + $dia = date("Y-m-d", strtotime("$inicio +$i day")); + array_push($dias,$dia); + } + + return $dias; + } + +} diff --git a/app/Http/Controllers/Reportes/ServiciosAsesoresController.php b/app/Http/Controllers/Reportes/ServiciosAsesoresController.php new file mode 100644 index 0000000..5a2bb93 --- /dev/null +++ b/app/Http/Controllers/Reportes/ServiciosAsesoresController.php @@ -0,0 +1,444 @@ +input('sucursal'); + $fecha_inicio = $request->input('fecha_inicio'); + $fecha_final = $request->input('fecha_final'); + + $orderBy = $request->input('sortBy','nombre'); + $order = $request->input('order','asc'); + + $queryBuilder = User::select('id', 'nombre', 'apellido_paterno', 'apellido_materno', 'tipo_empleado_id') + ->where('sucursal_id', $sucursal) + ->whereIn('tipo_empleado_id', [ASESOR_OPERACIONES, AUXILIAR_TECNICO_1, AUXILIAR_TECNICO_2]) + ->orderBy($orderBy,$order); + + if($query = $request->get('query',false)){ + $queryBuilder->where(function($q) use ($query){ + $q->where('nombre','like','%' .$query.'%') + ->orWhere('apellido_paterno','like','%' .$query.'%') + ->orWhere('apellido_materno','like','%' .$query.'%'); + }); + } + + if($perPage = $request->input('perPage',false)){ + + $data = $queryBuilder->paginate($perPage); + foreach ($data->items() as $u){ + + if($u->tipo_empleado_id == ASESOR_OPERACIONES){ + $u->tipo_empleado = 'Asesor de Operaciones'; + + $u->servicios_cantidad = ServicioDet::where('servicios_det.operador_id', $u->id) + ->whereDate('servicios_det.fecha_solicitud','>=',$fecha_inicio) + ->whereDate('servicios_det.fecha_solicitud','<=',$fecha_final) + ->count(); + } + + if($u->tipo_empleado_id == AUXILIAR_TECNICO_1 || $u->tipo_empleado_id == AUXILIAR_TECNICO_2){ + $u->tipo_empleado = 'Auxiliar de Operaciones'; + + $u->servicios_cantidad = ServicioDet::where(function($q) use ($u){ + $q->where('servicios_det.auxiliar_1', $u->id) + ->orWhere('servicios_det.auxiliar_2', $u->id); + }) + ->whereDate('servicios_det.fecha_solicitud','>=',$fecha_inicio) + ->whereDate('servicios_det.fecha_solicitud','<=',$fecha_final) + ->count(); + } + + } + + $users = $data; + }else{ + + $data = $queryBuilder->get(); + foreach ($data as $u){ + $u->servicios_cantidad = ServicioDet::where('servicios_det.operador_id', $u->id) + ->whereDate('servicios_det.fecha_solicitud','>=',$fecha_inicio) + ->whereDate('servicios_det.fecha_solicitud','<=',$fecha_final) + ->count(); + + if($u->tipo_empleado_id == ASESOR_OPERACIONES){ + $u->tipo_empleado = 'Asesor de Operaciones'; + } + + if($u->tipo_empleado_id == AUXILIAR_TECNICO_1 || $u->tipo_empleado_id == AUXILIAR_TECNICO_2){ + $u->tipo_empleado = 'Auxiliar de Operaciones'; + } + } + + $users = ['data'=>$data]; + } + + return response()->success($users); + } + + public function reportes(ServiciosAsesoresRequest $request){ + + $orderBy = $request->input('sortBy','servicios_enc.id'); + $order = $request->input('order','asc'); + + $sucursal = $request->input('sucursal'); + $fecha_inicio = $request->input('fecha_inicio'); + $fecha_final = $request->input('fecha_final'); + $usuario_id = $request->input('usuario_id'); + + $campos = [ + 'servicios_enc.id as numero_solicitud', + DB::raw("DATE(servicios_det.fecha_solicitud) as 'fecha_servicio'"), + DB::raw("TIME(servicios_det.fecha_solicitud) as 'hora_servicio'"), + 'cat_servicios.nombre as servicio', + 'servicios_det.costo_servicio as costo', + 'cat_tipos_servicios.nombre as tipo_servicio', + 'cat_estatus_servicios.nombre as estatus_servicio', + 'clientes.denominacion as nombre_cliente', + 'clientes_domicilios.calle as calle_cliente', + 'clientes_domicilios.entre_calles as entre_calles_cliente', + 'clientes_domicilios.num_ext as num_ext_cliente', + 'clientes_domicilios.num_int as num_int_cliente', + 'clientes_domicilios.colonia as colonia_cliente', + 'clientes_domicilios.ciudad as ciudad_cliente', + 'clientes_domicilios.cp as cp_cliente', + 'auxiliar.nombre as nombre_auxiliar', + 'auxiliar.apellido_paterno as apellido_paterno_auxiliar', + 'auxiliar.apellido_materno as apellido_materno_auxiliar', + 'cat_vehiculos.num_economico as vehiculo', + 'servicios_progreso.duracion as duracion_servicio', + 'servicios_progreso.litraje as litraje' + ]; + + $queryBuilder = ServicioDet::select($campos) + ->join('servicios_enc', 'servicios_det.servicio_enc_id', '=', 'servicios_enc.id') + ->join('cat_servicios', 'servicios_det.servicio_id', '=', 'cat_servicios.id') + ->join('cat_tipos_servicios', 'servicios_det.tipo_servicio_id', '=', 'cat_tipos_servicios.id') + ->join('cat_estatus_servicios','servicios_det.estatus_servicio_id','=','cat_estatus_servicios.id') + ->join('clientes','servicios_enc.cliente_id','=','clientes.id') + ->join('clientes_domicilios','servicios_enc.cliente_domicilio_id','=','clientes_domicilios.id') + ->leftJoin('users as auxiliar', 'servicios_det.auxiliar_1', '=', 'auxiliar.id') + ->join('cat_vehiculos', 'servicios_det.vehiculo_id', '=', 'cat_vehiculos.id') + ->leftJoin('servicios_progreso', 'servicios_det.id', '=', 'servicios_progreso.servicio_det_id') + ->where('servicios_enc.sucursal_id', $sucursal) + ->whereDate('servicios_det.fecha_solicitud','>=',$fecha_inicio) + ->whereDate('servicios_det.fecha_solicitud','<=',$fecha_final) + ->orderBy($orderBy,$order); + + $user = User::where('id', $usuario_id)->first(); + + if($user->tipo_empleado_id == ASESOR_OPERACIONES){ + $queryBuilder->where('servicios_det.operador_id', $usuario_id); + } + + if($user->tipo_empleado_id == AUXILIAR_TECNICO_1 || $user->tipo_empleado_id == AUXILIAR_TECNICO_2){ + $queryBuilder->where(function($q) use ($usuario_id){ + $q->where('servicios_det.auxiliar_1', $usuario_id) + ->orWhere('servicios_det.auxiliar_2', $usuario_id); + }); + } + + if($query = $request->get('query',false)){ + $queryBuilder->where(function($q) use ($query){ + //$q->where('nombre','like','%' .$query.'%'); + }); + } + + if($perPage = $request->input('perPage',false)){ + $data = $queryBuilder->paginate($perPage)->toArray(); + }else{ + $data = ['data'=>$queryBuilder->get()]; + } + + $total_duracion = $this->sumarTiempos($queryBuilder->pluck('duracion_servicio')); + list($h,$m,$s) = explode(':',$total_duracion); + $data['total_duracion'] = $h."hr ".$m."m ".$s."s"; + + return response()->success($data); + } + + public function generarExcel(ServiciosAsesoresRequest $request){ + + $sucursal = $request->input('sucursal'); + $fecha_inicio = $request->input('fecha_inicio'); + $fecha_final = $request->input('fecha_final'); + $usuario_id = $request->input('usuario_id'); + + $campos = [ + 'servicios_enc.id as numero_solicitud', + DB::raw("DATE(servicios_det.fecha_solicitud) as 'fecha_servicio'"), + DB::raw("TIME(servicios_det.fecha_solicitud) as 'hora_servicio'"), + 'cat_servicios.nombre as servicio', + 'servicios_det.costo_servicio as costo', + 'cat_tipos_servicios.nombre as tipo_servicio', + 'cat_estatus_servicios.nombre as estatus_servicio', + 'clientes.denominacion as nombre_cliente', + DB::raw("CONCAT(clientes_domicilios.calle,' ',clientes_domicilios.num_ext,' ', clientes_domicilios.colonia,' ',clientes_domicilios.cp,' ',clientes_domicilios.ciudad) as domicilio"), + //DB::raw("CONCAT(auxiliar.nombre,' ',auxiliar.apellido_paterno,' ',auxiliar.apellido_materno) as auxiliar"), + 'cat_vehiculos.num_economico as vehiculo', + 'servicios_progreso.duracion as duracion_servicio', + 'servicios_progreso.litraje as litraje' + + ]; + + $queryBuilder = ServicioDet::select($campos) + ->join('servicios_enc', 'servicios_det.servicio_enc_id', '=', 'servicios_enc.id') + ->join('cat_servicios', 'servicios_det.servicio_id', '=', 'cat_servicios.id') + ->join('cat_tipos_servicios', 'servicios_det.tipo_servicio_id', '=', 'cat_tipos_servicios.id') + ->join('cat_estatus_servicios','servicios_det.estatus_servicio_id','=','cat_estatus_servicios.id') + ->join('clientes','servicios_enc.cliente_id','=','clientes.id') + ->join('clientes_domicilios','servicios_enc.cliente_domicilio_id','=','clientes_domicilios.id') + ->leftJoin('users as auxiliar', 'servicios_det.auxiliar_1', '=', 'auxiliar.id') + ->join('cat_vehiculos', 'servicios_det.vehiculo_id', '=', 'cat_vehiculos.id') + ->leftJoin('servicios_progreso', 'servicios_det.id', '=', 'servicios_progreso.servicio_det_id') + ->where('servicios_enc.sucursal_id', $sucursal) + ->whereDate('servicios_det.fecha_solicitud','>=',$fecha_inicio) + ->whereDate('servicios_det.fecha_solicitud','<=',$fecha_final) + ->orderBy('servicios_enc.id','asc'); + + $user = User::where('id', $usuario_id)->first(); + + if($user->tipo_empleado_id == ASESOR_OPERACIONES){ + $queryBuilder->where('servicios_det.operador_id', $usuario_id); + } + + if($user->tipo_empleado_id == AUXILIAR_TECNICO_1 || $user->tipo_empleado_id == AUXILIAR_TECNICO_2){ + $queryBuilder->where(function($q) use ($usuario_id){ + $q->where('servicios_det.auxiliar_1', $usuario_id) + ->orWhere('servicios_det.auxiliar_2', $usuario_id); + }); + } + + $servicios = $queryBuilder->get(); + + $total = $queryBuilder->count(); + + $total_duracion = $this->sumarTiempos($queryBuilder->pluck('duracion_servicio')); + list($h,$m,$s) = explode(':',$total_duracion); + $total_duracion = $h."hr ".$m."m ".$s."s"; + + $nombre_usuario = User::where('id', $usuario_id)->first(); + $titulo = "Reporte de Servicios Otorgados ".$nombre_usuario->nombre." ".$nombre_usuario->apellido_paterno; + + list($y_i, $m_i, $d_i) = explode("-", $fecha_inicio); + list($y_f, $m_f, $d_f) = explode("-", $fecha_final); + $f_i = $d_i."_".$m_i."_".$y_i; + $f_f = $d_f."_".$m_f."_".$y_f; + $nombre = "Reporte_Servicios_Otorgados_".$nombre_usuario->nombre."_".$nombre_usuario->apellido_paterno."_".$f_i."-".$f_f; + + foreach ($servicios as $s){ + $s->costo = floatval($s->costo); + list($y, $m, $d) = explode("-", $s->fecha_servicio); + $s->fecha_servicio = "$d/$m/$y"; + $s->numero_solicitud = (int)$s->numero_solicitud; + } + + Excel::create($nombre, function($excel) use($servicios, $titulo, $fecha_inicio, $fecha_final, $total, $total_duracion){ + + // Set the title + $excel->setTitle('Reporte de Servicios Otorgados'); + + // Chain the setters + $excel->setCreator('DRENAX') + ->setCompany('DRENAX'); + + // Call them separately + $excel->setDescription('Reporte de Servicios Otorgados'); + + $excel->sheet('Reporte_Servicios_Asesor', function ($sheet) use($servicios, $titulo, $fecha_inicio, $fecha_final, $total, $total_duracion) { + + $sheet->setColumnFormat(array( + 'F' => '"$"#,##0.00_-', + 'C' => 'd/m/y', + 'M' => '#,#' + )); + + //Mostrar logo + $sheet->mergeCells('B2:D6'); + + $objDrawing = new \PHPExcel_Worksheet_Drawing; + $objDrawing->setPath(resource_path('assets/images/logos').'/logo_drenax.png'); + $objDrawing->setWidth(95); + $objDrawing->setHeight(80); + $objDrawing->setCoordinates('B2'); + $objDrawing->setOffsetX(9); + $objDrawing->setOffsetY(9); + $objDrawing->setWorksheet($sheet); + + $sheet->mergeCells('G2:J6'); + + $sheet->cell('G2', function($cell) use($titulo) { + + $cell->setFontFamily('Aharoni'); + $cell->setFontWeight('bold'); + $cell->setAlignment('center'); + $cell->setValignment('center'); + $cell->setFontSize(20); + $cell->setValue($titulo); + + }); + + $sheet->cell('H8', function($cell) use($fecha_inicio) { + list($y, $m, $d) = explode("-", $fecha_inicio); + + $cell->setFontFamily('Calibri'); + $cell->setAlignment('left'); + $cell->setFontSize(12); + $cell->setValue('Del: '.$d.'/'.$m.'/'.$y); + + }); + + $sheet->cell('I8', function($cell) use($fecha_final) { + list($y, $m, $d) = explode("-", $fecha_final); + + $cell->setFontFamily('Calibri'); + $cell->setAlignment('left'); + $cell->setFontSize(12); + $cell->setValue('Al: '.$d.'/'.$m.'/'.$y); + + }); + + $sheet->cell('K7', function($cell) { + $cell->setFontFamily('Calibri'); + $cell->setAlignment('left'); + $cell->setFontSize(12); + $cell->setValue('Duración:'); + + }); + + $sheet->cell('K8', function($cell) use($total_duracion) { + $cell->setFontFamily('Calibri'); + $cell->setAlignment('left'); + $cell->setFontSize(12); + $cell->setValue($total_duracion); + + }); + + $sheet->cell('L7', function($cell) { + $cell->setFontFamily('Calibri'); + $cell->setAlignment('left'); + $cell->setFontSize(12); + $cell->setValue('Total:'); + + }); + + $sheet->cell('L8', function($cell) use($total) { + $cell->setFontFamily('Calibri'); + $cell->setAlignment('left'); + $cell->setFontSize(12); + $cell->setValue($total.' Servicios'); + + }); + + //Mostar valores de consulta + $sheet->fromArray($servicios, null, 'B9', true); + + //Formato en columnas de titulo + $sheet->cells('B9:M9', function ($cells) { + $cells->setBackground('#001870'); + $cells->setFontColor('#ffffff'); + $cells->setFontSize(13); + $cells->setFontFamily('Calibri'); + $cells->setAlignment('left'); + $cells->setFontWeight('bold'); + }); + + $sheet->getStyle('B9:M9' , $sheet->getHighestRow())->getAlignment()->setWrapText(true); + + + //Titulos personalizados + $titulos_cell = [ + ['cell' => 'B9', 'titulo' => 'Número de solicitud'], + ['cell' => 'C9', 'titulo' => 'Fecha del servicio'], + ['cell' => 'D9', 'titulo' => 'Hora del servicio'], + ['cell' => 'E9', 'titulo' => 'Servicio'], + ['cell' => 'F9', 'titulo' => 'Costo de servicio'], + ['cell' => 'G9', 'titulo' => 'Tipo de servicio'], + ['cell' => 'H9', 'titulo' => 'Estatus de servicio'], + ['cell' => 'I9', 'titulo' => 'Nombre del cliente'], + ['cell' => 'J9', 'titulo' => 'Domicilio de servicio'], + ['cell' => 'K9', 'titulo' => 'Vehiculo asignado'], + ['cell' => 'L9', 'titulo' => 'Duración del servicio (cronómetro)'], + ['cell' => 'M9', 'titulo' => 'Litraje'] + ]; + + foreach ($titulos_cell as $t){ + $sheet->cell($t['cell'], function($cell) use($t) { + $cell->setValue($t['titulo']); + }); + } + + //Size a columnas indicadas + $columns_set = [ + 'B9', 'C9', 'D9', 'K9', 'L9' + ]; + + foreach ($columns_set as $c){ + $set_column = [ + $c => [ + 'width' => ($c == 'L9' || $c == 'K9')? 23: 14, + 'height' => 40 + ] + ]; + $sheet->setSize($set_column); + } + + //AutoSize en columnas indicadas + $columns_auto= [ + 'E','F','G','H','I','J' + ]; + + foreach ($columns_auto as $c){ + $sheet->getColumnDimension($c)->setAutoSize(true); + } + + $sheet->setWidth(array( + 'A' => 3, + )); + + //Borde + $columns_border= [ + 'B','C','D','E','F','G','H','I','J','K','L','M' + ]; + + for ($i=0; $i<= $total; $i++){ + $row = 9 + $i; + + foreach ($columns_border as $cb){ + $border = "$cb$row:$cb$row"; + $sheet->cells($border, function ($cells) { + $cells->setBorder('thin', 'thin', 'thin', 'thin'); + }); + + if($row != 9 && ($cb == 'C' || $cb == 'D' || $cb == 'F' || $cb == 'L')){ + $sheet->cells("$cb$row", function ($cells) { + $cells->setAlignment('right'); + }); + } + } + } + }); + + + })->store('xls', storage_path('app') . '/public/reportes/servicios_asesores/'); + + return response()->success(['nombre_archivo' => $nombre.'.xls?micro='.$this->getMicroSeconds()]); + } +} diff --git a/app/Http/Controllers/Reportes/ServiciosClientesController.php b/app/Http/Controllers/Reportes/ServiciosClientesController.php new file mode 100644 index 0000000..213aa77 --- /dev/null +++ b/app/Http/Controllers/Reportes/ServiciosClientesController.php @@ -0,0 +1,368 @@ +input('sucursal'); + $fecha_inicio = $request->input('fecha_inicio'); + $fecha_final = $request->input('fecha_final'); + + $orderBy = $request->input('sortBy','denominacion'); + $order = $request->input('order','asc'); + + $queryBuilder = Cliente::select('clientes.id', 'clientes.denominacion') + ->join('servicios_enc', 'clientes.id', '=', 'servicios_enc.cliente_id') + ->join('servicios_det', 'servicios_enc.id', '=', 'servicios_det.servicio_enc_id') + ->whereDate('servicios_det.fecha_solicitud','>=',$fecha_inicio) + ->whereDate('servicios_det.fecha_solicitud','<=',$fecha_final) + ->where('clientes.sucursal_id', $sucursal) + ->orderBy($orderBy,$order); + + if($query = $request->get('query',false)){ + $queryBuilder->where(function($q) use ($query){ + $q->where('denominacion','like','%' .$query.'%'); + }); + } + $queryBuilder = $queryBuilder->groupBy(['clientes.id', 'clientes.denominacion']); + if($perPage = $request->input('perPage',false)){ + + $data = $queryBuilder->paginate($perPage); + foreach ($data->items() as $u){ + $u->servicios_cantidad = ServicioDet::join('servicios_enc','servicios_det.servicio_enc_id', '=', 'servicios_enc.id') + ->where('servicios_enc.cliente_id', $u->id) + ->whereDate('servicios_det.fecha_solicitud','>=',$fecha_inicio) + ->whereDate('servicios_det.fecha_solicitud','<=',$fecha_final) + ->count(); + } + + $users = $data; + }else{ + + $data = $queryBuilder->get(); + foreach ($data as $u){ + $u->servicios_cantidad = ServicioDet::join('servicios_enc','servicios_det.servicio_enc_id', '=', 'servicios_enc.id') + ->where('servicios_enc.cliente_id', $u->id) + ->whereDate('servicios_det.fecha_solicitud','>=',$fecha_inicio) + ->whereDate('servicios_det.fecha_solicitud','<=',$fecha_final) + ->count(); + } + + $users = ['data'=>$data]; + } + + return response()->success($users); + } + + public function reportes(ServiciosClientesRequest $request){ + + $orderBy = $request->input('sortBy','servicios_enc.id'); + $order = $request->input('order','asc'); + + $sucursal = $request->input('sucursal'); + $fecha_inicio = $request->input('fecha_inicio'); + $fecha_final = $request->input('fecha_final'); + $cliente_id = $request->input('cliente_id'); + + $campos = [ + 'servicios_enc.id as numero_solicitud', + DB::raw("DATE(servicios_det.fecha_solicitud) as 'fecha_servicio'"), + DB::raw("TIME(servicios_det.fecha_solicitud) as 'hora_servicio'"), + 'cat_servicios.nombre as servicio', + 'servicios_det.costo_servicio as costo', + 'cat_tipos_servicios.nombre as tipo_servicio', + 'cat_estatus_servicios.nombre as estatus_servicio', + 'clientes_domicilios.calle as calle_cliente', + 'clientes_domicilios.entre_calles as entre_calles_cliente', + 'clientes_domicilios.num_ext as num_ext_cliente', + 'clientes_domicilios.num_int as num_int_cliente', + 'clientes_domicilios.colonia as colonia_cliente', + 'clientes_domicilios.ciudad as ciudad_cliente', + 'clientes_domicilios.cp as cp_cliente', + 'asesor.nombre as nombre_asesor', + 'asesor.apellido_paterno as apellido_paterno_asesor', + 'asesor.apellido_materno as apellido_materno_asesor', + 'auxiliar.nombre as nombre_auxiliar', + 'auxiliar.apellido_paterno as apellido_paterno_auxiliar', + 'auxiliar.apellido_materno as apellido_materno_auxiliar', + 'cat_vehiculos.num_economico as vehiculo', + 'servicios_progreso.duracion as duracion_servicio', + 'servicios_progreso.litraje as litraje' + ]; + + $queryBuilder = ServicioDet::select($campos) + ->join('servicios_enc', 'servicios_det.servicio_enc_id', '=', 'servicios_enc.id') + ->join('cat_servicios', 'servicios_det.servicio_id', '=', 'cat_servicios.id') + ->join('cat_tipos_servicios', 'servicios_det.tipo_servicio_id', '=', 'cat_tipos_servicios.id') + ->join('cat_estatus_servicios','servicios_det.estatus_servicio_id','=','cat_estatus_servicios.id') + ->join('clientes_domicilios','servicios_enc.cliente_domicilio_id','=','clientes_domicilios.id') + ->join('users as asesor', 'servicios_det.operador_id', '=', 'asesor.id') + ->leftJoin('users as auxiliar', 'servicios_det.auxiliar_1', '=', 'auxiliar.id') + ->join('cat_vehiculos', 'servicios_det.vehiculo_id', '=', 'cat_vehiculos.id') + ->leftJoin('servicios_progreso', 'servicios_det.id', '=', 'servicios_progreso.servicio_det_id') + ->where('servicios_enc.sucursal_id', $sucursal) + ->where('servicios_enc.cliente_id', $cliente_id) + ->whereDate('servicios_det.fecha_solicitud','>=',$fecha_inicio) + ->whereDate('servicios_det.fecha_solicitud','<=',$fecha_final) + ->orderBy($orderBy,$order); + + if($query = $request->get('query',false)){ + $queryBuilder->where(function($q) use ($query){ + //$q->where('nombre','like','%' .$query.'%'); + }); + } + + if($perPage = $request->input('perPage',false)){ + $data = $queryBuilder->paginate($perPage); + }else{ + $data = ['data'=>$queryBuilder->get()]; + } + + return response()->success($data); + } + + public function generarExcel(ServiciosClientesRequest $request){ + + $sucursal = $request->input('sucursal'); + $fecha_inicio = $request->input('fecha_inicio'); + $fecha_final = $request->input('fecha_final'); + $cliente_id = $request->input('cliente_id'); + + $campos = [ + 'servicios_enc.id as numero_solicitud', + DB::raw("DATE(servicios_det.fecha_solicitud) as 'fecha_servicio'"), + DB::raw("TIME(servicios_det.fecha_solicitud) as 'hora_servicio'"), + 'cat_servicios.nombre as servicio', + 'servicios_det.costo_servicio as costo', + 'cat_tipos_servicios.nombre as tipo_servicio', + 'cat_estatus_servicios.nombre as estatus_servicio', + DB::raw("CONCAT(clientes_domicilios.calle,' ',clientes_domicilios.num_ext,' ', clientes_domicilios.colonia,' ',clientes_domicilios.cp,' ',clientes_domicilios.ciudad) as domicilio"), + DB::raw("CONCAT(asesor.nombre,' ',asesor.apellido_paterno,' ',asesor.apellido_materno) as asesor"), + DB::raw("CONCAT(auxiliar.nombre,' ',auxiliar.apellido_paterno,' ',auxiliar.apellido_materno) as auxiliar"), + 'cat_vehiculos.num_economico as vehiculo', + 'servicios_progreso.duracion as duracion_servicio', + 'servicios_progreso.litraje as litraje' + ]; + + $queryBuilder = ServicioDet::select($campos) + ->join('servicios_enc', 'servicios_det.servicio_enc_id', '=', 'servicios_enc.id') + ->join('cat_servicios', 'servicios_det.servicio_id', '=', 'cat_servicios.id') + ->join('cat_tipos_servicios', 'servicios_det.tipo_servicio_id', '=', 'cat_tipos_servicios.id') + ->join('cat_estatus_servicios','servicios_det.estatus_servicio_id','=','cat_estatus_servicios.id') + ->join('clientes_domicilios','servicios_enc.cliente_domicilio_id','=','clientes_domicilios.id') + ->join('users as asesor', 'servicios_det.operador_id', '=', 'asesor.id') + ->leftJoin('users as auxiliar', 'servicios_det.auxiliar_1', '=', 'auxiliar.id') + ->join('cat_vehiculos', 'servicios_det.vehiculo_id', '=', 'cat_vehiculos.id') + ->leftJoin('servicios_progreso', 'servicios_det.id', '=', 'servicios_progreso.servicio_det_id') + ->where('servicios_enc.sucursal_id', $sucursal) + ->where('servicios_enc.cliente_id', $cliente_id) + ->whereDate('servicios_det.fecha_solicitud','>=',$fecha_inicio) + ->whereDate('servicios_det.fecha_solicitud','<=',$fecha_final) + ->orderBy('servicios_enc.id','asc'); + + $servicios = $queryBuilder->get(); + $total = $queryBuilder->count(); + + $cliente = Cliente::where('id', $cliente_id)->first(); + $titulo = "Reporte de Servicios de Cliente ".$cliente->denominacion; + + list($y_i, $m_i, $d_i) = explode("-", $fecha_inicio); + list($y_f, $m_f, $d_f) = explode("-", $fecha_final); + $f_i = $d_i."_".$m_i."_".$y_i; + $f_f = $d_f."_".$m_f."_".$y_f; + $nombre = "Reporte_Servicios_Cliente_".$cliente->denominacion."_".$f_i."-".$f_f; + + foreach ($servicios as $s){ + $s->costo = floatval($s->costo); + list($y, $m, $d) = explode("-", $s->fecha_servicio); + $s->fecha_servicio = "$d/$m/$y"; + $s->numero_solicitud = (int)$s->numero_solicitud; + } + + Excel::create($nombre, function($excel) use($servicios, $titulo, $fecha_inicio, $fecha_final, $total){ + + // Set the title + $excel->setTitle('Reporte de Servicios de Cliente'); + + // Chain the setters + $excel->setCreator('DRENAX') + ->setCompany('DRENAX'); + + // Call them separately + $excel->setDescription('Reporte de Servicios de Cliente'); + + $excel->sheet('Reporte_Servicios_Cliente', function ($sheet) use($servicios, $titulo, $fecha_inicio, $fecha_final, $total) { + + $sheet->setColumnFormat(array( + 'F' => '"$"#,##0.00_-', + 'C' => 'd/m/y', + 'N' => '#,#' + )); + + //Mostrar logo + $sheet->mergeCells('B2:D6'); + + $objDrawing = new \PHPExcel_Worksheet_Drawing; + $objDrawing->setPath(resource_path('assets/images/logos').'/logo_drenax.png'); + $objDrawing->setWidth(95); + $objDrawing->setHeight(80); + $objDrawing->setCoordinates('B2'); + $objDrawing->setOffsetX(9); + $objDrawing->setOffsetY(9); + $objDrawing->setWorksheet($sheet); + + $sheet->mergeCells('H2:K6'); + + $sheet->cell('H2', function($cell) use($titulo, $fecha_inicio, $fecha_final, $total) { + + $cell->setFontFamily('Aharoni'); + $cell->setFontWeight('bold'); + $cell->setAlignment('center'); + $cell->setValignment('center'); + $cell->setFontSize(20); + $cell->setValue($titulo); + + }); + + $sheet->cell('I8', function($cell) use($fecha_inicio) { + list($y, $m, $d) = explode("-", $fecha_inicio); + + $cell->setFontFamily('Calibri'); + $cell->setAlignment('left'); + $cell->setFontSize(12); + $cell->setValue('Del: '.$d.'/'.$m.'/'.$y); + + }); + + $sheet->cell('J8', function($cell) use($fecha_final) { + list($y, $m, $d) = explode("-", $fecha_final); + + $cell->setFontFamily('Calibri'); + $cell->setAlignment('left'); + $cell->setFontSize(12); + $cell->setValue('Al: '.$d.'/'.$m.'/'.$y); + + }); + + $sheet->cell('L8', function($cell) { + $cell->setFontFamily('Calibri'); + $cell->setAlignment('left'); + $cell->setFontSize(12); + $cell->setValue('Total:'); + + }); + + $sheet->cell('M8', function($cell) use($total) { + $cell->setFontFamily('Calibri'); + $cell->setAlignment('left'); + $cell->setFontSize(12); + $cell->setValue($total.' Servicios'); + + }); + + //Mostar valores de consulta + $sheet->fromArray($servicios, null, 'B9', true); + + //Formato en columnas de titulo + $sheet->cells('B9:N9', function ($cells) { + $cells->setBackground('#001870'); + $cells->setFontColor('#ffffff'); + $cells->setFontSize(13); + $cells->setFontFamily('Calibri'); + $cells->setAlignment('left'); + $cells->setFontWeight('bold'); + }); + + $sheet->getStyle('B9:N9' , $sheet->getHighestRow())->getAlignment()->setWrapText(true); + + //Titulos personalizados + $titulos_cell = [ + ['cell' => 'B9', 'titulo' => 'Número de solicitud'], + ['cell' => 'C9', 'titulo' => 'Fecha del servicio'], + ['cell' => 'D9', 'titulo' => 'Hora del servicio'], + ['cell' => 'E9', 'titulo' => 'Servicio'], + ['cell' => 'F9', 'titulo' => 'Costo de servicio'], + ['cell' => 'G9', 'titulo' => 'Tipo de servicio'], + ['cell' => 'H9', 'titulo' => 'Estatus de servicio'], + ['cell' => 'I9', 'titulo' => 'Domicilio de servicio'], + ['cell' => 'J9', 'titulo' => 'Asesor de operaciones'], + ['cell' => 'K9', 'titulo' => 'Auxiliar de operaciones'], + ['cell' => 'L9', 'titulo' => 'Vehiculo asignado'], + ['cell' => 'M9', 'titulo' => 'Duración del servicio (cronómetro)'], + ['cell' => 'N9', 'titulo' => 'Litraje'] + ]; + + foreach ($titulos_cell as $t){ + $sheet->cell($t['cell'], function($cell) use($t) { + $cell->setValue($t['titulo']); + }); + } + + //Size a columnas indicadas + $columns_set = [ + 'B9', 'C9', 'D9', 'L9', 'M9' + ]; + + foreach ($columns_set as $c){ + $set_column = [ + $c => [ + 'width' => ($c == 'N9')? 23: 14, + 'height' => 50 + ] + ]; + $sheet->setSize($set_column); + } + + //AutoSize en columnas indicadas + $columns_auto= [ + 'E','F','G','H','I','J','K' + ]; + + foreach ($columns_auto as $c){ + $sheet->getColumnDimension($c)->setAutoSize(true); + } + + $sheet->setWidth(array( + 'A' => 3, + )); + + //Borde + $columns_border= [ + 'B','C','D','E','F','G','H','I','J','K','L','M','N' + ]; + + for ($i=0; $i<= $total; $i++){ + $row = 9 + $i; + + foreach ($columns_border as $cb){ + $border = "$cb$row:$cb$row"; + $sheet->cells($border, function ($cells) { + $cells->setBorder('thin', 'thin', 'thin', 'thin'); + }); + + if($row != 9 && ($cb == 'C' || $cb == 'D' || $cb == 'F' || $cb == 'N')){ + $sheet->cells("$cb$row", function ($cells) { + $cells->setAlignment('right'); + }); + } + } + } + }); + + + })->store('xls', storage_path('app') . '/public/reportes/servicios_clientes/'); + + return response()->success(['nombre_archivo' => $nombre.'.xls?micro='.$this->getMicroSeconds()]); + } +} diff --git a/app/Http/Controllers/Reportes/ServiciosController.php b/app/Http/Controllers/Reportes/ServiciosController.php new file mode 100644 index 0000000..85f720e --- /dev/null +++ b/app/Http/Controllers/Reportes/ServiciosController.php @@ -0,0 +1,429 @@ +input('sortBy','servicios_enc.id'); + $order = $request->input('order','asc'); + + $sucursal = $request->input('sucursal'); + $fecha_inicio = $request->input('fecha_inicio'); + $fecha_final = $request->input('fecha_final'); + $tipo_servicio = $request->input('tipo_servicio'); + $estado_servicio = $request->input('estado_servicio'); + $servicio = $request->input('servicio'); + $origen = $request->input('origen'); + + $campos = [ + 'servicios_enc.id as numero_solicitud', + DB::raw("DATE(servicios_det.fecha_solicitud) as 'fecha_servicio'"), + DB::raw("TIME(servicios_det.fecha_solicitud) as 'hora_servicio'"), + 'cat_servicios.nombre as servicio', + 'servicios_det.costo_servicio as costo', + 'cat_tipos_servicios.nombre as tipo_servicio', + 'cat_estatus_servicios.nombre as estatus_servicio', + 'clientes.denominacion as nombre_cliente', + 'clientes_domicilios.calle as calle_cliente', + 'clientes_domicilios.entre_calles as entre_calles_cliente', + 'clientes_domicilios.num_ext as num_ext_cliente', + 'clientes_domicilios.num_int as num_int_cliente', + 'clientes_domicilios.colonia as colonia_cliente', + 'clientes_domicilios.ciudad as ciudad_cliente', + 'clientes_domicilios.cp as cp_cliente', + 'asesor.nombre as nombre_asesor', + 'asesor.apellido_paterno as apellido_paterno_asesor', + 'asesor.apellido_materno as apellido_materno_asesor', + 'auxiliar.nombre as nombre_auxiliar', + 'auxiliar.apellido_paterno as apellido_paterno_auxiliar', + 'auxiliar.apellido_materno as apellido_materno_auxiliar', + 'cat_vehiculos.num_economico as vehiculo', + 'servicios_progreso.duracion as duracion_servicio', + DB::raw("DATE(servicios_progreso.fecha_ini_servidor) as 'fecha_inicio_servicio'"), + DB::raw("TIME(servicios_progreso.fecha_ini_servidor) as 'hora_inicio_servicio'"), + DB::raw("TIME_FORMAT(TIMEDIFF(servicios_det.fecha_solicitud, servicios_progreso.fecha_ini_servidor),'%Hhr %im %ss') as diferencia"), + 'cat_origenes.nombre as origen', + 'servicios_progreso.litraje as litraje' + ]; + + $queryBuilder = ServicioDet::select($campos) + ->join('servicios_enc', 'servicios_det.servicio_enc_id', '=', 'servicios_enc.id') + ->join('cat_servicios', 'servicios_det.servicio_id', '=', 'cat_servicios.id') + ->join('cat_tipos_servicios', 'servicios_det.tipo_servicio_id', '=', 'cat_tipos_servicios.id') + ->join('cat_estatus_servicios','servicios_det.estatus_servicio_id','=','cat_estatus_servicios.id') + ->join('clientes','servicios_enc.cliente_id','=','clientes.id') + ->join('clientes_domicilios','servicios_enc.cliente_domicilio_id','=','clientes_domicilios.id') + ->join('users as asesor', 'servicios_det.operador_id', '=', 'asesor.id') + ->leftJoin('users as auxiliar', 'servicios_det.auxiliar_1', '=', 'auxiliar.id') + ->join('cat_vehiculos', 'servicios_det.vehiculo_id', '=', 'cat_vehiculos.id') + ->leftJoin('servicios_progreso', 'servicios_det.id', '=', 'servicios_progreso.servicio_det_id') + ->join('cat_origenes', 'servicios_enc.origen_id', '=', 'cat_origenes.id') + ->where('servicios_enc.sucursal_id', $sucursal) + ->whereDate('servicios_det.fecha_solicitud','>=',$fecha_inicio) + ->whereDate('servicios_det.fecha_solicitud','<=',$fecha_final) + ->orderBy($orderBy,$order); + + if($tipo_servicio != 0){ + $queryBuilder->where('servicios_det.tipo_servicio_id', $tipo_servicio); + } + + if($estado_servicio != 0){ + $queryBuilder->where('servicios_det.estatus_servicio_id', $estado_servicio); + } + + if($servicio != 0){ + $queryBuilder->where('servicios_det.servicio_id', $servicio); + } + + if($origen != 0){ + $queryBuilder->where('servicios_enc.origen_id', $origen); + } + + if($query = $request->get('query',false)){ + $queryBuilder->where(function($q) use ($query){ + //$q->where('nombre','like','%' .$query.'%'); + }); + } + $total_servicios = $queryBuilder->count(); + $total_costo = $queryBuilder->sum('servicios_det.costo_servicio'); + + if($perPage = $request->input('perPage',false)){ + $data = $queryBuilder->paginate($perPage)->toArray(); + }else{ + $data = ['data'=>$queryBuilder->get()]; + } + + $data['total_servicios'] = $total_servicios; + $data['total_costo'] = $total_costo; + + return response()->success($data); + } + + public function generarExcel(ServiciosRequest $request){ + + $sucursal = $request->input('sucursal'); + $fecha_inicio = $request->input('fecha_inicio'); + $fecha_final = $request->input('fecha_final'); + $tipo_servicio = $request->input('tipo_servicio'); + $estado_servicio = $request->input('estado_servicio'); + $servicio = $request->input('servicio'); + $origen = $request->input('origen'); + + $campos = [ + 'servicios_enc.id as numero_solicitud', + 'servicios_enc.fecha_agenda', + 'servicios_det.fecha_solicitud', + 'servicios_det.fecha_solicitud as tiempo_atencion', + 'cat_servicios.nombre as servicio', + 'servicios_det.costo_servicio as costo', + 'cat_tipos_servicios.nombre as tipo_servicio', + 'cat_estatus_servicios.nombre as estatus_servicio', + 'clientes.denominacion as nombre_cliente', + 'clientes.email as email_cliente', + DB::raw("CONCAT(clientes_domicilios.calle,' ',clientes_domicilios.num_ext,' ', clientes_domicilios.colonia,' ',clientes_domicilios.cp,' ',clientes_domicilios.ciudad) as domicilio"), + 'clientes_domicilios.email as email_domicilio', + DB::raw("CONCAT(asesor.nombre,' ',asesor.apellido_paterno,' ',asesor.apellido_materno) as asesor"), + DB::raw("CONCAT(auxiliar.nombre,' ',auxiliar.apellido_paterno,' ',auxiliar.apellido_materno) as auxiliar"), + 'cat_vehiculos.num_economico as vehiculo', + 'servicios_progreso.duracion as duracion_servicio', + DB::raw("TIME(servicios_progreso.fecha_ini_servidor) as 'hora_inicio_servicio'"), + DB::raw("TIME_FORMAT(TIMEDIFF(servicios_det.fecha_solicitud, servicios_progreso.fecha_ini_servidor),'%Hhr %im %ss') as diferencia"), + 'cat_origenes.nombre as origen', + 'servicios_progreso.litraje as litraje', + 'servicios_det.facturado as facturado', + 'cat_formas_pagos.nombre as forma_pago', + ]; + + $queryBuilder = ServicioDet::select($campos) + ->join('servicios_enc', 'servicios_det.servicio_enc_id', '=', 'servicios_enc.id') + ->join('cat_servicios', 'servicios_det.servicio_id', '=', 'cat_servicios.id') + ->join('cat_tipos_servicios', 'servicios_det.tipo_servicio_id', '=', 'cat_tipos_servicios.id') + ->join('cat_estatus_servicios','servicios_det.estatus_servicio_id','=','cat_estatus_servicios.id') + ->join('clientes','servicios_enc.cliente_id','=','clientes.id') + ->join('clientes_domicilios','servicios_enc.cliente_domicilio_id','=','clientes_domicilios.id') + ->join('users as asesor', 'servicios_det.operador_id', '=', 'asesor.id') + ->join('cat_formas_pagos', 'cat_formas_pagos.id', '=', 'servicios_enc.forma_pago_id') + ->leftJoin('users as auxiliar', 'servicios_det.auxiliar_1', '=', 'auxiliar.id') + ->join('cat_vehiculos', 'servicios_det.vehiculo_id', '=', 'cat_vehiculos.id') + ->leftJoin('servicios_progreso', 'servicios_det.id', '=', 'servicios_progreso.servicio_det_id') + ->join('cat_origenes', 'servicios_enc.origen_id', '=', 'cat_origenes.id') + ->where('servicios_enc.sucursal_id', $sucursal) + ->whereDate('servicios_det.fecha_solicitud','>=',$fecha_inicio) + ->whereDate('servicios_det.fecha_solicitud','<=',$fecha_final) + ->orderBy('servicios_enc.id','asc'); + + if($tipo_servicio != 0){ + $queryBuilder->where('servicios_det.tipo_servicio_id', $tipo_servicio); + } + + if($estado_servicio != 0){ + $queryBuilder->where('servicios_det.estatus_servicio_id', $estado_servicio); + } + + if($servicio != 0){ + $queryBuilder->where('servicios_det.servicio_id', $servicio); + } + + if($origen != 0){ + $queryBuilder->where('servicios_enc.origen_id', $origen); + } + + $servicios = $queryBuilder->get(); + $total = $queryBuilder->count(); + $total_costo = $queryBuilder->sum('servicios_det.costo_servicio'); + $total_litraje = $queryBuilder->sum('servicios_progreso.litraje'); + + $nombre_sucursal = Sucursal::where('id', $sucursal)->first(); + $titulo = "Reporte de Servicios ".$nombre_sucursal->nombre; + + list($y_i, $m_i, $d_i) = explode("-", $fecha_inicio); + list($y_f, $m_f, $d_f) = explode("-", $fecha_final); + $f_i = $d_i."_".$m_i."_".$y_i; + $f_f = $d_f."_".$m_f."_".$y_f; + $nombre = "Reporte_Servicios_".$nombre_sucursal->nombre."_".$f_i."-".$f_f; + + foreach ($servicios as $s){ + $s->costo = floatval($s->costo); + $s->numero_solicitud = (int)$s->numero_solicitud; + if($s->facturado > 0){ + $s->facturado = "Facturado"; + }else{ + $s->facturado = "No facturado"; + } + + $s->tiempo_atencion = $this->diferenciaFechas($s->fecha_agenda, $s->fecha_solicitud); + $s->fecha_agenda = $this->formatearFechaHora($s->fecha_agenda); + $s->fecha_solicitud = $this->formatearFechaHora($s->fecha_solicitud); + } + + Excel::create($nombre, function($excel) use($servicios, $titulo, $fecha_inicio, $fecha_final, $total, $total_costo, $total_litraje){ + + // Set the title + $excel->setTitle('Reporte de Servicios'); + + // Chain the setters + $excel->setCreator('DRENAX') + ->setCompany('DRENAX'); + + // Call them separately + $excel->setDescription('Reporte de Servicios'); + + $excel->sheet('Reporte_Servicios_Sucursal', function ($sheet) use($servicios, $titulo, $fecha_inicio, $fecha_final, $total, $total_costo, $total_litraje) { + + $sheet->setColumnFormat(array( + 'G' => '"$"#,##0.00_-', + 'C' => 'd/m/y', + 'N8' => '"$"#,##0.00_-', + 'S' => '#,#', + 'P8' => '#,#' + )); + + //Mostrar logo + $sheet->mergeCells('B2:D6'); + + $objDrawing = new \PHPExcel_Worksheet_Drawing; + $objDrawing->setPath(resource_path('assets/images/logos').'/logo_drenax.png'); + $objDrawing->setWidth(95); + $objDrawing->setHeight(80); + $objDrawing->setCoordinates('B2'); + $objDrawing->setOffsetX(9); + $objDrawing->setOffsetY(9); + $objDrawing->setWorksheet($sheet); + + $sheet->mergeCells('I2:L6'); + + $sheet->cell('I2', function($cell) use($titulo) { + + $cell->setFontFamily('Aharoni'); + $cell->setFontWeight('bold'); + $cell->setAlignment('center'); + $cell->setValignment('center'); + $cell->setFontSize(20); + $cell->setValue($titulo); + + }); + + $sheet->cell('K8', function($cell) use($fecha_inicio) { + list($y, $m, $d) = explode("-", $fecha_inicio); + + $cell->setFontFamily('Calibri'); + $cell->setAlignment('left'); + $cell->setFontSize(12); + $cell->setValue('Del: '.$d.'/'.$m.'/'.$y); + + }); + + $sheet->cell('L8', function($cell) use($fecha_final) { + list($y, $m, $d) = explode("-", $fecha_final); + + $cell->setFontFamily('Calibri'); + $cell->setAlignment('left'); + $cell->setFontSize(12); + $cell->setValue('Al: '.$d.'/'.$m.'/'.$y); + + }); + + $sheet->cell('N7', function($cell) { + $cell->setFontFamily('Calibri'); + $cell->setAlignment('left'); + $cell->setFontSize(12); + $cell->setValue('Costo:'); + + }); + + $sheet->cell('N8', function($cell) use ($total_costo) { + $cell->setFontFamily('Calibri'); + $cell->setAlignment('right'); + $cell->setFontSize(12); + $cell->setValue($total_costo); + }); + + $sheet->cell('O7', function($cell) { + $cell->setFontFamily('Calibri'); + $cell->setAlignment('left'); + $cell->setFontSize(12); + $cell->setValue('Total:'); + + }); + + $sheet->cell('O8', function($cell) use($total) { + $cell->setFontFamily('Calibri'); + $cell->setAlignment('left'); + $cell->setFontSize(12); + $cell->setValue($total.' Servicios'); + + }); + + $sheet->cell('P7', function($cell) { + $cell->setFontFamily('Calibri'); + $cell->setAlignment('left'); + $cell->setFontSize(12); + $cell->setValue('Total litros:'); + + }); + + $sheet->cell('P8', function($cell) use($total_litraje) { + $cell->setFontFamily('Calibri'); + $cell->setAlignment('left'); + $cell->setFontSize(12); + $cell->setValue($total_litraje); + + }); + + //Mostar valores de consulta + $sheet->fromArray($servicios, null, 'B9', true); + + //Formato en columnas de titulo + $sheet->cells('B9:W9', function ($cells) { + $cells->setBackground('#001870'); + $cells->setFontColor('#ffffff'); + $cells->setFontSize(13); + $cells->setFontFamily('Calibri'); + $cells->setAlignment('left'); + $cells->setFontWeight('bold'); + }); + + $sheet->getStyle('B9:R9' , $sheet->getHighestRow())->getAlignment()->setWrapText(true); + + //Titulos personalizados + $titulos_cell = [ + ['cell' => 'B9', 'titulo' => 'Número de solicitud'], + ['cell' => 'C9', 'titulo' => 'Fecha y hora de registro'], + ['cell' => 'D9', 'titulo' => 'Fecha y hora programada'], + ['cell' => 'E9', 'titulo' => 'Tiempo de atención'], + ['cell' => 'F9', 'titulo' => 'Servicio'], + ['cell' => 'G9', 'titulo' => 'Costo de servicio'], + ['cell' => 'H9', 'titulo' => 'Tipo de servicio'], + ['cell' => 'I9', 'titulo' => 'Estatus de servicio'], + ['cell' => 'J9', 'titulo' => 'Nombre del cliente'], + ['cell' => 'K9', 'titulo' => 'Email del cliente'], + ['cell' => 'L9', 'titulo' => 'Domicilio de servicio'], + ['cell' => 'M9', 'titulo' => 'Email de domicilio'], + ['cell' => 'N9', 'titulo' => 'Asesor de operaciones'], + ['cell' => 'O9', 'titulo' => 'Auxiliar de operaciones'], + ['cell' => 'P9', 'titulo' => 'Vehículo asignado'], + ['cell' => 'Q9', 'titulo' => 'Duración del servicio (cronómetro)'], + ['cell' => 'R9', 'titulo' => 'Hora inicio'], + ['cell' => 'S9', 'titulo' => 'Puntualidad'], + ['cell' => 'T9', 'titulo' => 'Origen'], + ['cell' => 'U9', 'titulo' => 'Litraje'], + ['cell' => 'V9', 'titulo' => 'Facturado'], + ['cell' => 'W9', 'titulo' => 'Forma de pago'], + ]; + + foreach ($titulos_cell as $t){ + $sheet->cell($t['cell'], function($cell) use($t) { + $cell->setValue($t['titulo']); + }); + } + + //Size a columnas indicadas + $columns_set = [ + 'B9', 'C9', 'D9', 'N9', 'O9', 'U9', 'V9', 'W9' + ]; + + foreach ($columns_set as $c){ + $set_column = [ + $c => [ + 'width' => ($c == 'O9' || $c == 'Q9')? 23: ($c == 'B9') ? 14 : 20, + 'height' => 40 + ] + ]; + $sheet->setSize($set_column); + } + + //AutoSize en columnas indicadas + $columns_auto= [ + 'E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W' + ]; + + foreach ($columns_auto as $c){ + $sheet->getColumnDimension($c)->setAutoSize(true); + } + + $sheet->setWidth(array( + 'A' => 3, + )); + + //Borde + $columns_border= [ + 'B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W' + ]; + + for ($i=0; $i<= $total; $i++){ + $row = 9 + $i; + + foreach ($columns_border as $cb){ + $border = "$cb$row:$cb$row"; + $sheet->cells($border, function ($cells) { + $cells->setBorder('thin', 'thin', 'thin', 'thin'); + }); + + if($row != 9 && ($cb == 'C' || $cb == 'D' || $cb == 'G' || $cb == 'O' || $cb == 'P' || $cb == 'Q' || $cb == 'S' || $cb == 'T')){ + $sheet->cells("$cb$row", function ($cells) { + $cells->setAlignment('right'); + }); + } + } + } + }); + + + })->store('xls', storage_path('app') . '/public/reportes/servicios/'); + + return response()->success(['nombre_archivo' => $nombre.'.xls?micro='.$this->getMicroSeconds()]); + } +} diff --git a/app/Http/Controllers/SupervisorOperaciones/AsesoresController.php b/app/Http/Controllers/SupervisorOperaciones/AsesoresController.php new file mode 100644 index 0000000..1908928 --- /dev/null +++ b/app/Http/Controllers/SupervisorOperaciones/AsesoresController.php @@ -0,0 +1,128 @@ +where('tipo_empleado_id', ASESOR_OPERACIONES) + ->where('sucursal_id', $user->sucursal_id) + ->get(); + + foreach ($asesores as $a){ + $consulta = ServicioDet::join('servicios_enc', 'servicios_enc.id', '=', 'servicios_det.servicio_enc_id') + ->where('servicios_det.operador_id', $a->id) + ->where('servicios_enc.sucursal_id', $user->sucursal_id) + ->whereDate('servicios_det.fecha_solicitud', Carbon::now()->format('Y-m-d')); + + //$a->servicios_total = $consulta->whereIn('servicios_det.estatus_servicio_id', [PENDIENTE, REALIZADO])->count(); + $a->servicios_total = $consulta->count(); + $a->servicios_pendiente = $consulta->whereNotIn('servicios_det.estatus_servicio_id', [REALIZADO])->count(); + } + + return response()->success($asesores); + } + + /** + * Display the specified resource. + * + * @param int $id + * @return \Illuminate\Http\Response + */ + public function serviciosXAsesor($asesor_id) + { + $user = Auth::user(); + + $campos = [ + 'servicios_enc.id as solicitud_servicio_id', + 'servicios_enc.forma_pago_id', + 'cat_formas_pagos.nombre as forma_pago_nombre', + 'fecha_agenda', + 'usuario_agenda_id', + 'users.nombre as usuario_agenda_nombre', + 'users.apellido_paterno as usuario_agenda_apellido_paterno', + 'users.apellido_materno as usuario_agenda_apellido_materno', + 'servicios_enc.cliente_id', + 'clientes.denominacion', + 'servicios_enc.cliente_domicilio_id', + 'clientes_domicilios.nombre_responsable_sucursal as clientes_nombre_responsable_sucursal', + 'clientes_domicilios.celular_responsable as clientes_celular_responsable', + 'clientes_domicilios.calle as clientes_calle', + 'clientes_domicilios.num_ext as clientes_num_ext', + 'clientes_domicilios.num_int as clientes_num_int', + 'clientes_domicilios.colonia as clientes_colonia', + 'clientes_domicilios.cp as clientes_cp', + 'clientes_domicilios.telefono as clientes_telefono', + 'clientes_domicilios.lat as clientes_lat', + 'clientes_domicilios.lng as clientes_lng', + 'servicios_enc.deleted_at', + 'servicios_det.id', + 'servicios_det.servicio_id', + 'cat_servicios.nombre as servicio_nombre', + 'servicios_det.estatus_servicio_id', + 'cat_estatus_servicios.nombre as estatus_servicio_nombre', + 'servicios_det.tipo_servicio_id', + 'cat_tipos_servicios.nombre as tipo_servicio_nombre', + 'cat_estatus_servicios.color_1 as estatus_servicio_color_1', + 'cat_estatus_servicios.color_2 as estatus_servicio_color_2', + 'fecha_solicitud', + 'duracion', + 'definido_cliente', + 'servicios_det.operador_id', + 'operador.nombre as operador_nombre', + 'operador.apellido_paterno as operador_apellido_paterno', + 'operador.apellido_materno as operador_apellido_materno', + 'servicios_det.vehiculo_id', + 'cat_vehiculos.num_economico as vehiculo_num_economico', + 'servicios_det.fecha_solicitud', + 'sucursales.nombre as vehiculo_sucursal', + 'sucursales.id as vehiculo_sucursal_id', + 'sucursal_operador.nombre as operador_sucursal', + 'sucursal_operador.id as operador_sucursal_id', + 'servicios_det.auxiliar_1 as auxiliar_1_id', + 'servicios_det.auxiliar_2 as auxiliar_2_id', + 'auxiliares_1.nombre as auxiliar_1', + 'auxiliares_2.nombre as auxiliar_2', + 'sucursal_auxiliares_1.nombre as sucursal_auxiliar_1', + 'sucursal_auxiliares_2.nombre as sucursal_auxiliar_2', + 'servicios_det.costo_servicio', + 'servicios_det.aceptado', + 'servicios_det.observacion_atencion_cliente' + ]; + + $servicios = ServicioDet::select($campos) + ->joinDetalleServicioDet() + ->join('servicios_enc', 'servicios_enc.id', '=', 'servicios_det.servicio_enc_id') + ->join('cat_formas_pagos', 'cat_formas_pagos.id', '=', 'servicios_enc.forma_pago_id') + ->join('users', 'users.id', '=', 'servicios_enc.usuario_agenda_id') + ->join('clientes', 'clientes.id', '=', 'servicios_enc.cliente_id') + ->join('clientes_domicilios', 'clientes_domicilios.id', '=', 'servicios_enc.cliente_domicilio_id') + //->whereIn('servicios_det.estatus_servicio_id', [PENDIENTE, REALIZADO]) + ->where('servicios_det.operador_id', $asesor_id) + ->where('servicios_enc.sucursal_id', $user->sucursal_id) + ->whereDate('servicios_det.fecha_solicitud', Carbon::now()->format('Y-m-d')) + ->orderBy('servicios_det.fecha_solicitud') + ->get(); + + return response()->success($servicios); + } +} diff --git a/app/Http/Controllers/SupervisorOperaciones/JornadaController.php b/app/Http/Controllers/SupervisorOperaciones/JornadaController.php new file mode 100644 index 0000000..8d2c9ad --- /dev/null +++ b/app/Http/Controllers/SupervisorOperaciones/JornadaController.php @@ -0,0 +1,68 @@ +toDateTimeString(); + + DB::beginTransaction(); + try { + + $bitacora = BitacoraLaboral::where('usuario_id', $user->id) + ->whereNull('fecha_hora_fin') + ->first(); + + if($bitacora){ + DB::rollBack(); + return response()->unprocessable('JORNADA_YA_INICIADA', [$bitacora->id]); + } + + $bitacora_laboral = BitacoraLaboral::create(['fecha_hora_ini' => $fecha, 'usuario_id' => $user->id]); + + DB::commit(); + + return response()->success($bitacora_laboral); + } catch (\Exception $e) { + DB::rollBack(); + Log::info($e->getMessage()); + return response()->unprocessable('Error', ['Error al guardar el inicio de jornada.']); + } + } + + public function finalizarJornada(Request $request, $id){ + + $fecha = Carbon::now()->toDateTimeString(); + + DB::beginTransaction(); + try { + + $jornada = BitacoraLaboral::where('id',$id)->first(); + + if($jornada->fecha_hora_fin){ + DB::rollBack(); + return response()->unprocessable('Error', ['La jornada ya se encuentra finalizada.']); + } + + $jornada->update(['fecha_hora_fin' => $fecha]); + + DB::commit(); + + return response()->success(['result' => 'ok']); + } catch (\Exception $e) { + DB::rollBack(); + return response()->unprocessable('Error', ['Error al guardar el fin de jornada.']); + } + } +} diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php new file mode 100644 index 0000000..b7f9a82 --- /dev/null +++ b/app/Http/Kernel.php @@ -0,0 +1,65 @@ + [ + \App\Http\Middleware\EncryptCookies::class, + \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class, + \Illuminate\Session\Middleware\StartSession::class, + // \Illuminate\Session\Middleware\AuthenticateSession::class, + \Illuminate\View\Middleware\ShareErrorsFromSession::class, + \App\Http\Middleware\VerifyCsrfToken::class, + \Illuminate\Routing\Middleware\SubstituteBindings::class, + ], + + 'api' => [ + 'throttle:60,1', + 'bindings', + \Barryvdh\Cors\HandleCors::class, + ], + ]; + + /** + * The application's route middleware. + * + * These middleware may be assigned to groups or used individually. + * + * @var array + */ + protected $routeMiddleware = [ + 'auth' => \Illuminate\Auth\Middleware\Authenticate::class, + 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class, + 'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class, + 'can' => \Illuminate\Auth\Middleware\Authorize::class, + 'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class, + 'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class, + 'jwt' => \Tymon\JWTAuth\Middleware\GetUserFromToken::class, + 'acl.sentinel'=>\App\Http\Middleware\SentinelACL::class, + 'request.log' => RequestLogs::class, + ]; +} diff --git a/app/Http/Middleware/EncryptCookies.php b/app/Http/Middleware/EncryptCookies.php new file mode 100644 index 0000000..3aa15f8 --- /dev/null +++ b/app/Http/Middleware/EncryptCookies.php @@ -0,0 +1,17 @@ +check()) { + return redirect('/home'); + } + + return $next($request); + } +} diff --git a/app/Http/Middleware/RequestLogs.php b/app/Http/Middleware/RequestLogs.php new file mode 100644 index 0000000..6242da6 --- /dev/null +++ b/app/Http/Middleware/RequestLogs.php @@ -0,0 +1,49 @@ +getRequestUri(); + if(str_contains($request_uri,'?')){ + list($request_uri, $query) = explode('?', $request_uri); + } + + $data = [ + 'device_info' => $request->header('DEVICE-INFO'), + 'browser_info' => $request->header('BROWSER-INFO'), + 'ip' => $request->ip(), + 'request_uri' => $request_uri, + ]; + + if(Auth::check()){ + $data['user_id'] = Auth::id(); + }else{ + $data['user_id'] = User::where('email', $request->input('email')) + ->first() + ->id; + } + + UserLoginLog::create($data); + }catch (\Exception $exception){ + \Log::info(json_encode($exception)); + } + + return $next($request); + } +} diff --git a/app/Http/Middleware/SentinelACL.php b/app/Http/Middleware/SentinelACL.php new file mode 100644 index 0000000..53b3392 --- /dev/null +++ b/app/Http/Middleware/SentinelACL.php @@ -0,0 +1,56 @@ +auth = $auth; + + } + + + /** + * Handle an incoming request. + * + * @param \Illuminate\Http\Request $request + * @param \Closure $next + * @return mixed + */ + public function handle($request, Closure $next) { + $currentRouteName = $request->route()->getName(); + + $usuario = Auth::user(); + + if($usuario === null){ + return response()->unauthorized('unauthorized'); + } + + $user = Sentinel::findById($usuario->id); + + if (!$user->hasAccess($currentRouteName) ) { + return response()->forbidden('dont_have_permission'); + } + + return $next($request); + } +} diff --git a/app/Http/Middleware/TrimStrings.php b/app/Http/Middleware/TrimStrings.php new file mode 100644 index 0000000..943e9a4 --- /dev/null +++ b/app/Http/Middleware/TrimStrings.php @@ -0,0 +1,18 @@ +'string|required|max:191', + 'numero_sucursal' => 'numeric|required', + 'nombre_responsable_sucursal'=>'string|required|max:191', + 'calle'=>'string|required|max:191', + 'entre_calles'=>'max:191', + 'num_ext'=>'string|required|max:10', + 'num_int'=>'nullable|max:10', + 'colonia'=>'string|required|max:191', + 'ciudad'=>'string|required|max:191', + 'cp'=>'max:191', + 'telefono' => 'alpha_num|required|max:10', + 'celular_responsable' => 'alpha_num|required|max:10', + //'lat' => 'numeric|required', + //'lng' => 'numeric|required' + ]; + } +} diff --git a/app/Http/Requests/Administrador/ClientesRequest.php b/app/Http/Requests/Administrador/ClientesRequest.php new file mode 100644 index 0000000..4f964a6 --- /dev/null +++ b/app/Http/Requests/Administrador/ClientesRequest.php @@ -0,0 +1,84 @@ +method()=='PUT'){ + + $params = $this->route()->parameters(); + $id = $params['cliente']; + + return [ + 'denominacion' => 'string|required|max:191|unique:clientes,denominacion,'.$id.',id', + 'asesor_id' => 'alpha_num|required|exists:users,id', + 'requiere_factura' => 'boolean|required', + 'datos_fiscales.razon_social'=>'string|max:191|unique:clientes_datos_fiscales,razon_social,'.$id.',cliente_id', + 'datos_fiscales.rfc'=>'string|min:12|max:13', + 'datos_fiscales.email'=>'string|email|max:191', + 'datos_fiscales.calle'=>'string|max:191', + 'datos_fiscales.num_ext'=>'string|max:10', + 'datos_fiscales.num_int'=>'nullable|max:10', + 'datos_fiscales.colonia'=>'string|max:191', + 'datos_fiscales.localidad'=>'string|max:191', + 'datos_fiscales.municipio'=>'string|max:191', + 'datos_fiscales.estado'=>'string|max:191', + 'datos_fiscales.pais'=>'string|max:191', + 'datos_fiscales.cp'=>'string|max:191', + 'datos_fiscales.factura_uso_cfdi_id' => 'alpha_num|exists:facturas_uso_cfdi,id', + 'datos_fiscales.factura_tipo_comprobante_id' => 'alpha_num|exists:facturas_tipo_comprobante,id', + 'datos_fiscales.factura_metodos_pago_id' => 'alpha_num|exists:facturas_metodos_pago,id', + 'datos_fiscales.factura_formas_pago_id' => 'alpha_num|exists:facturas_formas_pago,id', + 'datos_fiscales.condicion_pago'=>'string|max:191', + 'datos_fiscales.retencion_iva'=>'boolean', + 'datos_fiscales.observacion'=>'max:191' + ]; + + }else{ + + return [ + 'denominacion' => 'string|required|max:191|unique:clientes,denominacion', + 'asesor_id' => 'alpha_num|required|exists:users,id', + 'requiere_factura' => 'boolean|required', + 'datos_fiscales.razon_social'=>'string|max:191|unique:clientes_datos_fiscales,razon_social', + 'datos_fiscales.rfc'=>'string|min:12|max:13|unique:clientes_datos_fiscales,rfc', + 'datos_fiscales.email'=>'string|email|max:191', + 'datos_fiscales.calle'=>'string|max:191', + 'datos_fiscales.num_ext'=>'string|max:10', + 'datos_fiscales.num_int'=>'nullable|max:10', + 'datos_fiscales.colonia'=>'string|max:191', + 'datos_fiscales.localidad'=>'string|max:191', + 'datos_fiscales.municipio'=>'string|max:191', + 'datos_fiscales.estado'=>'string|max:191', + 'datos_fiscales.pais'=>'string|max:191', + 'datos_fiscales.cp'=>'string|max:191', + 'datos_fiscales.factura_uso_cfdi_id' => 'alpha_num|exists:facturas_uso_cfdi,id', + 'datos_fiscales.factura_tipo_comprobante_id' => 'alpha_num|exists:facturas_tipo_comprobante,id', + 'datos_fiscales.factura_metodos_pago_id' => 'alpha_num|exists:facturas_metodos_pago,id', + 'datos_fiscales.factura_formas_pago_id' => 'alpha_num|exists:facturas_formas_pago,id', + 'datos_fiscales.condicion_pago'=>'string|max:191', + 'datos_fiscales.retencion_iva'=>'boolean', + 'datos_fiscales.observacion'=>'max:191' + ]; + } + } +} diff --git a/app/Http/Requests/Administrador/EstatusServiciosRequest.php b/app/Http/Requests/Administrador/EstatusServiciosRequest.php new file mode 100644 index 0000000..d7bb94f --- /dev/null +++ b/app/Http/Requests/Administrador/EstatusServiciosRequest.php @@ -0,0 +1,54 @@ +method()=='PUT'){ + + $params = $this->route()->parameters(); + $id = $params['estatus_servicio']; + + return [ + 'nombre' => 'string|required|min:1|max:191|unique:cat_estatus_servicios,nombre,'.$id.',id', + 'color_1' => 'required|regex:/^(?=.*#[a-fA-F0-9]{6}).+$/', + 'color_2' => 'regex:/^(?=.*#[a-fA-F0-9]{6}).+$/', + ]; + + }else{ + + return [ + 'nombre' => 'string|required|min:1|max:191|unique:cat_estatus_servicios,nombre', + 'color_1' => 'required|regex:/^(?=.*#[a-fA-F0-9]{6}).+$/', + 'color_2' => 'regex:/^(?=.*#[a-fA-F0-9]{6}).+$/', + ]; + } + } + + public function messages() + { + $messages = [ + 'nombre.unique' => 'El nombre que ingresó ya se encuentra en nuestros registros.' + ]; + return $messages; + } +} diff --git a/app/Http/Requests/Administrador/FormasPagosRequest.php b/app/Http/Requests/Administrador/FormasPagosRequest.php new file mode 100644 index 0000000..66b1581 --- /dev/null +++ b/app/Http/Requests/Administrador/FormasPagosRequest.php @@ -0,0 +1,48 @@ +method()=='PUT'){ + $params = $this->route()->parameters(); + $id = $params['formas_pago']; + + return [ + 'nombre' => 'string|required|min:1|max:191|unique:cat_formas_pagos,nombre,'.$id.',id', + 'zeros' => 'string|min:1|max:1', + ]; + }else{ + return [ + 'nombre' => 'string|required|min:1|max:191|unique:cat_formas_pagos,nombre', + 'zeros' => 'string|min:1|max:1', + ]; + } + } + + public function messages() + { + $messages = [ + 'nombre.unique' => 'El nombre que ingresó ya se encuentra en nuestros registros.' + ]; + return $messages; + } +} diff --git a/app/Http/Requests/Administrador/RolesRequest.php b/app/Http/Requests/Administrador/RolesRequest.php new file mode 100644 index 0000000..09593d3 --- /dev/null +++ b/app/Http/Requests/Administrador/RolesRequest.php @@ -0,0 +1,61 @@ +method() == "PUT") { + $params = $this->route()->parameters(); + $id = $params['role']; + return [ + 'name' => "string|required|min:1|max:128|unique:roles,name,$id,id", + 'slug' => "string|required|min:1|max:128|unique:roles,slug,$id,id", + 'movil' => 'boolean', + 'web' => 'boolean', + ]; + } else { + return [ + 'name' => 'string|required|min:1|max:128|unique:roles,name', + 'slug' => 'string|required|min:1|max:128|unique:roles,slug', + 'movil' => 'boolean', + 'web' => 'boolean', + ]; + } + } + + public function messages() + { + $messages = [ + 'name.string' => 'El nombre del rol debe tener caracteres.', + 'name.required' => 'El nombre del rol es requerido.', + 'name.min' => 'El tamaño mínimo del nombre del rol es 1.', + 'name.max' => 'El tamaño máximo del nombre del rol es 128.', + 'slug.string' => 'El slug del rol debe tener caracteres.', + 'slug.required' => 'El slug del rol es requerido.', + 'slug.min' => 'El tamaño mínimo del slug del rol es 1.', + 'slug.max' => 'El tamaño máximo del slug del rol es 128.', + 'slug.unique' => 'El slug ya está en uso.', + 'name.unique' => 'El nombre ya está en uso.' + ]; + return $messages; + } +} diff --git a/app/Http/Requests/Administrador/ServiciosRequest.php b/app/Http/Requests/Administrador/ServiciosRequest.php new file mode 100644 index 0000000..3b3ee9c --- /dev/null +++ b/app/Http/Requests/Administrador/ServiciosRequest.php @@ -0,0 +1,50 @@ +method()=='PUT'){ + + $params = $this->route()->parameters(); + $id = $params['servicio']; + + return [ + 'nombre' => 'string|required|min:1|max:191|unique:cat_servicios,nombre,'.$id.',id', + ]; + + }else{ + + return [ + 'nombre' => 'string|required|min:1|max:191|unique:cat_servicios,nombre', + ]; + } + } + + public function messages() + { + $messages = [ + 'nombre.unique' => 'El nombre que ingresó ya se encuentra en nuestros registros.' + ]; + return $messages; + } +} diff --git a/app/Http/Requests/Administrador/SucursalesRequest.php b/app/Http/Requests/Administrador/SucursalesRequest.php new file mode 100644 index 0000000..74e63b5 --- /dev/null +++ b/app/Http/Requests/Administrador/SucursalesRequest.php @@ -0,0 +1,66 @@ +method()=='PUT'){ + + $params = $this->route()->parameters(); + $id = $params['sucursale']; + + return [ + 'nombre' => 'string|required|min:1|max:191|unique:sucursales,nombre,'.$id.',id', + 'calle' => 'string|required|min:1|max:191', + 'num_ext' => 'string|required|min:1|max:191', + 'num_int' => 'string|nullable|min:1|max:191', + 'colonia' => 'string|required|min:1|max:191', + 'cp' => 'string|required|min:1|max:191', + 'telefono' => 'alpha_num|required|max:10', + 'gerente' => 'string|required|min:1|max:191', + 'encargado' => 'string|required|min:1|max:191', + ]; + + }else{ + + return [ + 'nombre' => 'string|required|min:1|max:191|unique:sucursales,nombre', + 'calle' => 'string|required|min:1|max:191', + 'num_ext' => 'string|required|min:1|max:191', + 'num_int' => 'string|nullable|min:1|max:191', + 'colonia' => 'string|required|min:1|max:191', + 'cp' => 'string|required|min:1|max:191', + 'telefono' => 'alpha_num|required|max:10', + 'gerente' => 'string|required|min:1|max:191', + 'encargado' => 'string|required|min:1|max:191', + ]; + } + } + + public function messages() + { + $messages = [ + 'nombre.unique' => 'El nombre que ingresó ya se encuentra en nuestros registros.' + ]; + return $messages; + } +} diff --git a/app/Http/Requests/Administrador/TiposServiciosRequest.php b/app/Http/Requests/Administrador/TiposServiciosRequest.php new file mode 100644 index 0000000..75b679c --- /dev/null +++ b/app/Http/Requests/Administrador/TiposServiciosRequest.php @@ -0,0 +1,50 @@ +method()=='PUT'){ + + $params = $this->route()->parameters(); + $id = $params['tipos_servicio']; + + return [ + 'nombre' => 'string|required|min:1|max:191|unique:cat_tipos_servicios,nombre,'.$id.',id', + ]; + + }else{ + + return [ + 'nombre' => 'string|required|min:1|max:191|unique:cat_tipos_servicios,nombre', + ]; + } + } + + public function messages() + { + $messages = [ + 'nombre.unique' => 'El nombre que ingresó ya se encuentra en nuestros registros.' + ]; + return $messages; + } +} diff --git a/app/Http/Requests/Administrador/TiposVehiculosRequest.php b/app/Http/Requests/Administrador/TiposVehiculosRequest.php new file mode 100644 index 0000000..9d432af --- /dev/null +++ b/app/Http/Requests/Administrador/TiposVehiculosRequest.php @@ -0,0 +1,48 @@ +method()=='PUT'){ + $params = $this->route()->parameters(); + $id = $params['tipos_vehiculo']; + + return [ + 'nombre' => 'string|required|min:1|max:191|unique:cat_tipos_vehiculos,nombre,'.$id.',id', + 'objetivo_mensual' => 'numeric|max:1000', + ]; + }else{ + return [ + 'nombre' => 'string|required|min:1|max:191|unique:cat_tipos_vehiculos,nombre', + 'objetivo_mensual' => 'numeric|max:1000', + ]; + } + } + + public function messages() + { + $messages = [ + 'nombre.unique' => 'El nombre que ingresó ya se encuentra en nuestros registros.' + ]; + return $messages; + } +} diff --git a/app/Http/Requests/Administrador/UserRequest.php b/app/Http/Requests/Administrador/UserRequest.php new file mode 100644 index 0000000..341a6e0 --- /dev/null +++ b/app/Http/Requests/Administrador/UserRequest.php @@ -0,0 +1,64 @@ +method()=='PUT'){ + + $params = $this->route()->parameters(); + $id = $params['usuario']; + + return [ + 'email' => 'string|required|email|max:191|unique:users,email,'.$id.',id', + //'password' => 'string|min:5', + 'nombre' => 'string|required|min:1|max:191', + 'apellido_paterno' => 'string|required|min:1|max:191', + 'apellido_materno' =>'string|required|min:1|max:191', + 'telefono' =>'alpha_num|required|max:10', + 'role_id' => 'required|exists:roles,id', + 'sucursal_id' => 'required|exists:sucursales,id', + ]; + + }else{ + + return [ + 'email' => 'string|required|email|max:255|unique:users,email', + //'password' => 'string|min:5', + 'nombre' => 'string|required|min:1|max:255', + 'apellido_paterno' => 'string|required|min:1|max:191', + 'apellido_materno' =>'string|required|min:1|max:191', + 'telefono' =>'alpha_num|required|max:10', + 'role_id' => 'required|exists:roles,id', + 'sucursal_id' => 'required|exists:sucursales,id', + ]; + } + } + + public function messages() + { + $messages = [ + 'email.unique' => 'El email que ingresó ya se encuentra en nuestros registros.' + ]; + return $messages; + } +} diff --git a/app/Http/Requests/Administrador/VehiculosRequest.php b/app/Http/Requests/Administrador/VehiculosRequest.php new file mode 100644 index 0000000..9963faa --- /dev/null +++ b/app/Http/Requests/Administrador/VehiculosRequest.php @@ -0,0 +1,53 @@ +method()=='PUT'){ + + $params = $this->route()->parameters(); + $id = $params['vehiculo']; + + return [ + 'num_economico' => 'string|required|max:191|unique:cat_vehiculos,num_economico,'.$id.',id', + 'descripcion' => 'string|max:100', + 'sucursales' => 'array|required', + 'tipo_vehiculo_id' => 'required|exists:cat_tipos_vehiculos,id', + ]; + }else{ + return [ + 'num_economico' => 'string|required|max:191|unique:cat_vehiculos,num_economico', + 'descripcion' => 'string|max:100', + 'sucursales' => 'array|required', + 'tipo_vehiculo_id' => 'required|exists:cat_tipos_vehiculos,id', + ]; + } + } + + public function messages() + { + $messages = [ + 'num_economico.unique' => 'El Vehículo que ingresó ya se encuentra en nuestros registros.' + ]; + return $messages; + } +} diff --git a/app/Http/Requests/AtencionCliente/LitrajeRequest.php b/app/Http/Requests/AtencionCliente/LitrajeRequest.php new file mode 100644 index 0000000..a7c891e --- /dev/null +++ b/app/Http/Requests/AtencionCliente/LitrajeRequest.php @@ -0,0 +1,30 @@ + 'required|integer' + ]; + } +} diff --git a/app/Http/Requests/AtencionCliente/ServiciosRequest.php b/app/Http/Requests/AtencionCliente/ServiciosRequest.php new file mode 100644 index 0000000..e7cec5d --- /dev/null +++ b/app/Http/Requests/AtencionCliente/ServiciosRequest.php @@ -0,0 +1,83 @@ +method()=='PUT'){ + return [ + 'cliente_id' => 'alpha_num|required|exists:clientes,id', + 'cliente_domicilio_id' => 'alpha_num|required|exists:clientes_domicilios,id', + 'forma_pago_id' => 'alpha_num|required|exists:cat_formas_pagos,id', + 'origen_id' => 'alpha_num|required|exists:cat_origenes,id', + 'servicios' => 'array|required|max:3', + 'servicios.*.id' => 'alpha_num|required|exists:servicios_det,id', + 'servicios.*.servicio_id' => 'alpha_num|required|exists:cat_servicios,id', + 'servicios.*.estatus_servicio_id' => 'alpha_num|required|exists:cat_estatus_servicios,id', + 'servicios.*.tipo_servicio_id' => 'alpha_num|required|exists:cat_tipos_servicios,id', + 'servicios.*.fecha_solicitud' => 'required|date_format:"Y-m-d H:i:s"', + //'usuario_agenda_id' => 'alpha_num|required|exists:users,id', + 'servicios.*.duracion' => 'required|date_format:"H:i:s"', + 'servicios.*.definido_cliente' => 'boolean|required', + 'servicios.*.operador_id' => 'alpha_num|required|exists:users,id', + 'servicios.*.vehiculo_id' => 'alpha_num|required|exists:cat_vehiculos,id', + 'servicios.*.auxiliar_1' => 'nullable|exists:users,id', + 'servicios.*.auxiliar_2' => 'nullable|exists:users,id', + 'servicios.*.costo_servicio' => 'required|numeric|max:999999', + 'servicios.*.observacion_atencion_cliente' => 'max:700', + 'servicios.*.requiere_encuesta' => 'boolean|required', + 'servicios.*.facturado' => 'boolean|required', + ]; + }else{ + return [ + 'cliente_id' => 'alpha_num|required|exists:clientes,id', + 'cliente_domicilio_id' => 'alpha_num|required|exists:clientes_domicilios,id', + 'forma_pago_id' => 'alpha_num|required|exists:cat_formas_pagos,id', + 'origen_id' => 'alpha_num|required|exists:cat_origenes,id', + 'servicios' => 'array|required|max:3', + 'servicios.*.servicio_id' => 'alpha_num|required|exists:cat_servicios,id', + 'servicios.*.estatus_servicio_id' => 'alpha_num|required|exists:cat_estatus_servicios,id', + 'servicios.*.tipo_servicio_id' => 'alpha_num|required|exists:cat_tipos_servicios,id', + 'servicios.*.fecha_solicitud' => 'required|date_format:"Y-m-d H:i:s"', + //'usuario_agenda_id' => 'alpha_num|required|exists:users,id', + 'servicios.*.duracion' => 'required|date_format:"H:i:s"', + 'servicios.*.definido_cliente' => 'boolean|required', + 'servicios.*.operador_id' => 'alpha_num|required|exists:users,id', + 'servicios.*.vehiculo_id' => 'alpha_num|required|exists:cat_vehiculos,id', + 'servicios.*.auxiliar_1' => 'nullable|exists:users,id', + 'servicios.*.auxiliar_2' => 'nullable|exists:users,id', + 'servicios.*.costo_servicio' => 'required|numeric|max:999999', + 'servicios.*.observacion_atencion_cliente' => 'max:700', + 'servicios.*.requiere_encuesta' => 'boolean|required', + 'servicios.*.facturado' => 'boolean|required', + ]; + } + } + + public function messages() + { + $messages = [ + 'servicios.*.costo_servicio.max' => 'El costo máximo de servicio es de $999,999.99' + ]; + return $messages; + } +} diff --git a/app/Http/Requests/LoginRequest.php b/app/Http/Requests/LoginRequest.php new file mode 100644 index 0000000..6b4212a --- /dev/null +++ b/app/Http/Requests/LoginRequest.php @@ -0,0 +1,33 @@ + 'required', + 'password' => 'required', + 'dispositivo_id' => 'string|nullable', + 'version_apk' => 'string|nullable' + ]; + } +} diff --git a/app/Http/Requests/Operador/DesplazamientoRequest.php b/app/Http/Requests/Operador/DesplazamientoRequest.php new file mode 100644 index 0000000..74e3f8a --- /dev/null +++ b/app/Http/Requests/Operador/DesplazamientoRequest.php @@ -0,0 +1,34 @@ + 'required|numeric', + '*.lng' => 'required|numeric', + '*.modelo_celular' => 'string|required', + '*.bateria' => 'numeric|required|max:100', + '*.fecha' => 'required|date_format:"Y-m-d H:i:s"' + ]; + } +} diff --git a/app/Http/Requests/Operador/FinalizarJornadaRequest.php b/app/Http/Requests/Operador/FinalizarJornadaRequest.php new file mode 100644 index 0000000..6a86680 --- /dev/null +++ b/app/Http/Requests/Operador/FinalizarJornadaRequest.php @@ -0,0 +1,34 @@ + 'numeric|required', + 'lat_fin' => 'required|numeric', + 'lng_fin' => 'required|numeric', + 'modelo_celular' => 'string|required', + 'bateria' => 'numeric|required|max:100' + ]; + } +} diff --git a/app/Http/Requests/Operador/FinalizarServicioRequest.php b/app/Http/Requests/Operador/FinalizarServicioRequest.php new file mode 100644 index 0000000..417d602 --- /dev/null +++ b/app/Http/Requests/Operador/FinalizarServicioRequest.php @@ -0,0 +1,36 @@ + 'alpha_num|required|exists:servicios_enc,id', + 'servicio_det_id' => 'alpha_num|required|exists:servicios_det,id', + 'fecha_fin_celular' => 'required|date_format:"Y-m-d H:i:s"', + 'duracion' => 'required|date_format:"H:i:s"', + 'comentarios' => 'max:505', + 'aplica_garantia' => 'required', + 'cat_motivos_estatus_id' => 'integer' + ]; + } +} diff --git a/app/Http/Requests/Operador/GuardarEvidenciaRequest.php b/app/Http/Requests/Operador/GuardarEvidenciaRequest.php new file mode 100644 index 0000000..a79f718 --- /dev/null +++ b/app/Http/Requests/Operador/GuardarEvidenciaRequest.php @@ -0,0 +1,34 @@ + 'alpha_num|required|exists:servicios_enc,id', + 'servicio_det_id' => 'alpha_num|required|exists:servicios_det,id', + 'etapa' => 'required|string', + //'lat' => 'required|numeric', + //'lng' => 'required|numeric', + ]; + } +} diff --git a/app/Http/Requests/Operador/GuardarFirmaRequest.php b/app/Http/Requests/Operador/GuardarFirmaRequest.php new file mode 100644 index 0000000..fc38a83 --- /dev/null +++ b/app/Http/Requests/Operador/GuardarFirmaRequest.php @@ -0,0 +1,31 @@ + 'alpha_num|required|exists:servicios_enc,id', + 'servicio_det_id' => 'alpha_num|required|exists:servicios_det,id', + ]; + } +} diff --git a/app/Http/Requests/Operador/IniciarServicioRequest.php b/app/Http/Requests/Operador/IniciarServicioRequest.php new file mode 100644 index 0000000..4b00795 --- /dev/null +++ b/app/Http/Requests/Operador/IniciarServicioRequest.php @@ -0,0 +1,34 @@ + 'alpha_num|required|exists:servicios_enc,id', + 'servicio_det_id' => 'alpha_num|required|exists:servicios_det,id', + 'fecha_ini_celular' => 'required|date_format:"Y-m-d H:i:s"', + //'lat_ini' => 'required|numeric', + //'lng_ini' => 'required|numeric', + ]; + } +} diff --git a/app/Http/Requests/Operador/InicioJornadaRequest.php b/app/Http/Requests/Operador/InicioJornadaRequest.php new file mode 100644 index 0000000..1ecaf7e --- /dev/null +++ b/app/Http/Requests/Operador/InicioJornadaRequest.php @@ -0,0 +1,35 @@ + 'numeric|required', + 'lat_ini' => 'required|numeric', + 'lng_ini' => 'required|numeric', + 'modelo_celular' => 'string|required', + 'bateria' => 'numeric|required|max:100', + 'token_firebase' => 'string|required' + ]; + } +} diff --git a/app/Http/Requests/Operador/RechazarSolicitudRequest.php b/app/Http/Requests/Operador/RechazarSolicitudRequest.php new file mode 100644 index 0000000..01b63d0 --- /dev/null +++ b/app/Http/Requests/Operador/RechazarSolicitudRequest.php @@ -0,0 +1,30 @@ + 'string|required|max:255', + ]; + } +} diff --git a/app/Http/Requests/Operador/RespuestasOperadorRequest.php b/app/Http/Requests/Operador/RespuestasOperadorRequest.php new file mode 100644 index 0000000..a086348 --- /dev/null +++ b/app/Http/Requests/Operador/RespuestasOperadorRequest.php @@ -0,0 +1,38 @@ + 'string|required', + '*.tipo' => 'string|required', + '*.tipo_checkbox' => 'boolean|required', + '*.tipo_text' => 'boolean|required', + '*.tipo_radio_btn' => 'boolean|required', + '*.respuesta_checkbox' => 'boolean|nullable', + '*.respuesta_text' => 'string|nullable', + '*.respuesta_radio_btn' => 'string|nullable', + '*.fecha' => 'date|required' + ]; + } +} diff --git a/app/Http/Requests/Operador/UltimaIncidenciaRequest.php b/app/Http/Requests/Operador/UltimaIncidenciaRequest.php new file mode 100644 index 0000000..dfccb3e --- /dev/null +++ b/app/Http/Requests/Operador/UltimaIncidenciaRequest.php @@ -0,0 +1,30 @@ + 'integer|required|exists:cat_vehiculos,id', + ]; + } +} diff --git a/app/Http/Requests/Operador/VehiculosIncidenciasRequest.php b/app/Http/Requests/Operador/VehiculosIncidenciasRequest.php new file mode 100644 index 0000000..9a5a882 --- /dev/null +++ b/app/Http/Requests/Operador/VehiculosIncidenciasRequest.php @@ -0,0 +1,30 @@ + 'string|required|', + ]; + } +} diff --git a/app/Http/Requests/Reportes/CapacidadAprovechadaRequest.php b/app/Http/Requests/Reportes/CapacidadAprovechadaRequest.php new file mode 100644 index 0000000..d5bd55b --- /dev/null +++ b/app/Http/Requests/Reportes/CapacidadAprovechadaRequest.php @@ -0,0 +1,33 @@ + 'alpha_num|required', + 'fecha_inicio' => 'required|date_format:"Y-m-d"', + 'fecha_final' => 'required|date_format:"Y-m-d"', + 'vehiculo_id' => 'alpha_num|required', + ]; + } +} diff --git a/app/Http/Requests/Reportes/ConsultarAsesoresRequest.php b/app/Http/Requests/Reportes/ConsultarAsesoresRequest.php new file mode 100644 index 0000000..64e3d97 --- /dev/null +++ b/app/Http/Requests/Reportes/ConsultarAsesoresRequest.php @@ -0,0 +1,32 @@ + 'alpha_num|required', + 'fecha_inicio' => 'required|date_format:"Y-m-d"', + 'fecha_final' => 'required|date_format:"Y-m-d"' + ]; + } +} diff --git a/app/Http/Requests/Reportes/ConsultarAtencionClientesRequest.php b/app/Http/Requests/Reportes/ConsultarAtencionClientesRequest.php new file mode 100644 index 0000000..522a86b --- /dev/null +++ b/app/Http/Requests/Reportes/ConsultarAtencionClientesRequest.php @@ -0,0 +1,33 @@ + 'alpha_num|required', + 'fecha_inicio' => 'required|date_format:"Y-m-d"', + 'fecha_final' => 'required|date_format:"Y-m-d"', + 'definio' => 'alpha_num|required', + ]; + } +} diff --git a/app/Http/Requests/Reportes/ConsultarClientesRequest.php b/app/Http/Requests/Reportes/ConsultarClientesRequest.php new file mode 100644 index 0000000..4aae206 --- /dev/null +++ b/app/Http/Requests/Reportes/ConsultarClientesRequest.php @@ -0,0 +1,32 @@ + 'alpha_num|required', + 'fecha_inicio' => 'required|date_format:"Y-m-d"', + 'fecha_final' => 'required|date_format:"Y-m-d"' + ]; + } +} diff --git a/app/Http/Requests/Reportes/ConsultarVehiculosRequest.php b/app/Http/Requests/Reportes/ConsultarVehiculosRequest.php new file mode 100644 index 0000000..a2c2499 --- /dev/null +++ b/app/Http/Requests/Reportes/ConsultarVehiculosRequest.php @@ -0,0 +1,32 @@ + 'alpha_num|required', + 'fecha_inicio' => 'required|date_format:"Y-m-d"', + 'fecha_final' => 'required|date_format:"Y-m-d"' + ]; + } +} diff --git a/app/Http/Requests/Reportes/EncuestasGeneralRequest.php b/app/Http/Requests/Reportes/EncuestasGeneralRequest.php new file mode 100644 index 0000000..fd55fd6 --- /dev/null +++ b/app/Http/Requests/Reportes/EncuestasGeneralRequest.php @@ -0,0 +1,31 @@ + 'alpha_num|required', + 'mes' => 'required' + ]; + } +} diff --git a/app/Http/Requests/Reportes/FiltroAsesoresRequest.php b/app/Http/Requests/Reportes/FiltroAsesoresRequest.php new file mode 100644 index 0000000..8555780 --- /dev/null +++ b/app/Http/Requests/Reportes/FiltroAsesoresRequest.php @@ -0,0 +1,31 @@ + 'alpha_num|required', + 'mes' => 'required' + ]; + } +} diff --git a/app/Http/Requests/Reportes/ProductividadAtencionClientesRequest.php b/app/Http/Requests/Reportes/ProductividadAtencionClientesRequest.php new file mode 100644 index 0000000..ead8d38 --- /dev/null +++ b/app/Http/Requests/Reportes/ProductividadAtencionClientesRequest.php @@ -0,0 +1,34 @@ + 'alpha_num|required', + 'fecha_inicio' => 'required|date_format:"Y-m-d"', + 'fecha_final' => 'required|date_format:"Y-m-d"', + 'usuario_id' => 'alpha_num|required', + 'definio' => 'alpha_num|required', + ]; + } +} diff --git a/app/Http/Requests/Reportes/ServiciosAsesoresRequest.php b/app/Http/Requests/Reportes/ServiciosAsesoresRequest.php new file mode 100644 index 0000000..b0e941a --- /dev/null +++ b/app/Http/Requests/Reportes/ServiciosAsesoresRequest.php @@ -0,0 +1,33 @@ + 'alpha_num|required', + 'fecha_inicio' => 'required|date_format:"Y-m-d"', + 'fecha_final' => 'required|date_format:"Y-m-d"', + 'usuario_id' => 'alpha_num|required', + ]; + } +} diff --git a/app/Http/Requests/Reportes/ServiciosClientesRequest.php b/app/Http/Requests/Reportes/ServiciosClientesRequest.php new file mode 100644 index 0000000..c248ea3 --- /dev/null +++ b/app/Http/Requests/Reportes/ServiciosClientesRequest.php @@ -0,0 +1,33 @@ + 'alpha_num|required', + 'fecha_inicio' => 'required|date_format:"Y-m-d"', + 'fecha_final' => 'required|date_format:"Y-m-d"', + 'cliente_id' => 'alpha_num|required', + ]; + } +} diff --git a/app/Http/Requests/Reportes/ServiciosRequest.php b/app/Http/Requests/Reportes/ServiciosRequest.php new file mode 100644 index 0000000..c34db69 --- /dev/null +++ b/app/Http/Requests/Reportes/ServiciosRequest.php @@ -0,0 +1,36 @@ + 'alpha_num|required', + 'fecha_inicio' => 'required|date_format:"Y-m-d"', + 'fecha_final' => 'required|date_format:"Y-m-d"', + 'tipo_servicio' => 'alpha_num|required', + 'estado_servicio' => 'alpha_num|required', + 'servicio' => 'alpha_num|required', + 'origen' => 'alpha_num|required', + ]; + } +} diff --git a/app/Http/Requests/TokenFirebaseRequest.php b/app/Http/Requests/TokenFirebaseRequest.php new file mode 100644 index 0000000..4953d9d --- /dev/null +++ b/app/Http/Requests/TokenFirebaseRequest.php @@ -0,0 +1,30 @@ + 'string|required', + ]; + } +} diff --git a/app/Mail/ResetPassword.php b/app/Mail/ResetPassword.php new file mode 100644 index 0000000..56f5b04 --- /dev/null +++ b/app/Mail/ResetPassword.php @@ -0,0 +1,34 @@ +user = $user; + } + + /** + * Build the message. + * + * @return $this + */ + public function build() + { + return $this->view('email.emailRecuperar',array('user'=>$this->user))->subject('Recuperar Contraseña'); + } +} diff --git a/app/Mail/RespuestasOperador.php b/app/Mail/RespuestasOperador.php new file mode 100644 index 0000000..76368e1 --- /dev/null +++ b/app/Mail/RespuestasOperador.php @@ -0,0 +1,67 @@ +respuesta_operador_enc_id = $respuestas_operador_enc_id; + } + + /** + * Build the message. + * + * @return $this + */ + public function build() + { + $id = $this->respuesta_operador_enc_id; + + $re = RespuestaOperadorDet::where('respuestas_operador_enc_id',$id) + ->where('tipo', 'REVISION') + ->get(); + + $material = RespuestaOperadorDet::where('respuestas_operador_enc_id',$id) + ->where('tipo', 'MATERIAL') + ->get(); + + $herramienta = RespuestaOperadorDet::where('respuestas_operador_enc_id',$id) + ->where('tipo', 'HERRAMIENTA') + ->get(); + + $revision = []; + $num_economico = ""; + foreach ($re as $r){ + if(!$r->tipo_checkbox && !$r->tipo_text && !$r->tipo_radio_btn){ + $num_economico = $r->respuesta_text; + }else{ + array_push($revision,$r); + } + } + $usuario = RespuestaOperadorEnc::select('users.nombre', 'users.apellido_paterno') + ->join('users', 'respuestas_operador_enc.user_id', '=', 'users.id') + ->where('respuestas_operador_enc.id',$id) + ->first(); + + $nombre_usuario = $usuario->nombre." ".$usuario->apellido_paterno; + + $subject = "Check-list Asesor $nombre_usuario - Vehículo $num_economico"; + + return $this->view('email.emailRespuestasOperador', compact('revision', 'material', 'herramienta'))->subject($subject); + } +} diff --git a/app/Mail/SolicitudServicio.php b/app/Mail/SolicitudServicio.php new file mode 100644 index 0000000..3a79f61 --- /dev/null +++ b/app/Mail/SolicitudServicio.php @@ -0,0 +1,121 @@ +servicio_det_id = $servicio_det_id; + } + + /** + * Build the message. + * + * @return $this + */ + public function build() + { + $campos = [ + 'fecha_solicitud', + 'nombre_responsable_sucursal as responsable', + 'calle', + 'num_ext', + 'num_int', + 'colonia', + 'ciudad', + 'cp', + 'servicio_enc_id', + 'cat_servicios.nombre as servicio_nombre', + 'cat_tipos_servicios.id as tipo_servicio', + DB::raw("CONCAT(asesor.nombre,' ',asesor.apellido_paterno,' ',asesor.apellido_materno) as asesor_nombre"), + 'asesor.telefono as asesor_telefono', + 'cat_tipos_vehiculos.nombre as tipo_vehiculo', + 'cat_vehiculos.num_economico as vehiculo_num_economico', + DB::raw("CONCAT(atencion_cliente.nombre,' ',atencion_cliente.apellido_paterno,' ',atencion_cliente.apellido_materno) as atencion_cliente_nombre") + ]; + + $solicitud = ServicioDet::select($campos) + ->join('servicios_enc', 'servicios_det.servicio_enc_id', '=', 'servicios_enc.id') + ->join('clientes_domicilios', 'servicios_enc.cliente_domicilio_id', '=', 'clientes_domicilios.id') + ->join('cat_servicios', 'servicios_det.servicio_id', '=', 'cat_servicios.id') + ->join('users as asesor', 'servicios_det.operador_id', '=', 'asesor.id') + ->join('users as atencion_cliente', 'servicios_enc.usuario_agenda_id', '=', 'atencion_cliente.id') + ->join('cat_vehiculos', 'servicios_det.vehiculo_id', '=', 'cat_vehiculos.id') + ->join('cat_tipos_vehiculos', 'cat_vehiculos.tipo_vehiculo_id', '=', 'cat_tipos_vehiculos.id') + ->join('cat_tipos_servicios', 'servicios_det.tipo_servicio_id', '=', 'cat_tipos_servicios.id') + ->where('servicios_det.id', $this->servicio_det_id) + ->first(); + + $solicitud->domicilio = $solicitud->calle.' Int. '.$solicitud->num_int.(($solicitud->num_ext)? ' Ext. '.$solicitud->num_ext : '').', '.$solicitud->colonia.', '.$solicitud->ciudad; + + $dias = array("Domingo","Lunes","Martes","Miercoles","Jueves","Viernes","Sábado"); + $meses = array("Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"); + + list($f, $h) = explode(" ", $solicitud->fecha_solicitud); + list($y,$m,$d) = explode("-", $f); + + $date = Carbon::createFromDate($y,$m,$d, null); + + $solicitud->fecha_solicitud = $dias[$date->format('w')]." ".$date->format('d')." de ".$meses[$date->format('n')-1]. " del ".$date->format('Y')." a las $h hrs"; + $solicitud->asesor_telefono = $this->phone_number_format($solicitud->asesor_telefono); + + if($solicitud->tipo_servicio == DOMESTICO){ + $solicitud->mensaje = array( + "- Será necesario entrar al domicilio y revisar las instalaciones antes y durante la operación del servicio.", + "- Evitar estar cerca de los registros durante la operación del servicio, ya que esto puede provocar un accidente.", + "- Si cuenta con mascotas, evitar que estén cerca de la operación.", + "- Evitar cruzar por pisos mojados, caminar por encima de la manguera y cruzar por registros.", + "- No se realizará ningún servicio sin la supervisión de un adulto.", + "- Se entregará un recibo de servicio por cada servicio que realicemos, mismo que será firmado con nombre y firma por supervisor.", + "- Si el servicio es negativo se cobrará un costo por visita de $350.00.", + "- El tiempo de maniobra de un servicio negativo es de hasta 30 minutos (De autorizar más tiempo de maniobra por parte del cliente, el costo se genera por hora de servicio).", + "- Los costos de los servicios se confirmarán antes de iniciar la operación del servicio." + ); + }else{ + $solicitud->mensaje = array( + "- Todos los servicios que realizamos deberán ser supervisados por las áreas correspondientes de la empresa y ésta misma persona tenga el conocimiento de los servicios a realizar.", + "- Evitar estar cerca de los registros durante la operación del servicio, ya que esto puede provocar un accidente.", + "- Evitar cruzar por pisos mojados, caminar por encima de la manguera y cruzar por registros.", + "- Se entregará un recibo de servicio por cada servicio que realicemos, mismo que será firmado con nombre y firma por supervisor.", + "- Si el servicio es negativo se cobrará un costo por visita de $350.00.", + "- El tiempo de maniobra de un servicio negativo es de hasta 30 minutos (De autorizar más tiempo de maniobra por parte del cliente, el costo se genera por hora de servicio).", + "- Los costos de los servicios se confirmaran antes de iniciar la operación del servicio." + ); + }; + + return $this->view('email.emailSolicitudServicio', compact('solicitud'))->subject('Servicio agendado.'); + } + + function phone_number_format($number) { + // Allow only Digits, remove all other characters. + $number = preg_replace("/[^\d]/","",$number); + + // get number length. + $length = strlen($number); + + // if number = 10 + if($length == 10) { + $number = preg_replace("/^1?(\d{3})(\d{3})(\d{4})$/", "($1) $2 $3", $number); + } + + return $number; + + } +} diff --git a/app/Mail/SolicitudServicioTerminado.php b/app/Mail/SolicitudServicioTerminado.php new file mode 100644 index 0000000..c489166 --- /dev/null +++ b/app/Mail/SolicitudServicioTerminado.php @@ -0,0 +1,203 @@ +servicio_enc_id = $servicio_enc_id; + $this->servicio_det_id = $servicio_det_id; + } + + /** + * Build the message. + * + * @return $this + */ + public function build() + { + $pdf = $this->generarPDF($this->servicio_enc_id,$this->servicio_det_id); + $info = [ + 'contacto' => $pdf['contacto'], + 'folio' => $pdf['folio'], + 'servicio' => $pdf['servicio'] + ]; + + return $this->view('email.emailSolicitudServicioTerminado', compact('info'))->subject('Servicio terminado.')->attachData($pdf['pdf'], $pdf['nombre'], [ + 'mime' => 'application/pdf', + ]); + + return $this->view('email.emailSolicitudServicioTerminado')->subject('Servicio terminado.'); + } + + function generarPDF($servicio_enc_id, $servicio_det_id){ + + setlocale(LC_MONETARY, 'en_US'); + + $det = ServicioDet::where('id', $servicio_det_id)->first(); + + if($det->estatus_servicio_id != REALIZADO && $det->estatus_servicio_id != NEGATIVO){ + return response()->unprocessable('Error', ['El servicio no está terminado.']); + } + + $campos = [ + 'servicios_enc.id as folio', + 'clientes.denominacion as nombre_cliente', + DB::raw("DATE_FORMAT(`servicios_det`.`fecha_solicitud`, '%d/%m/%Y') as 'fecha_solicitud'"), + 'clientes_domicilios.ciudad', + 'clientes_domicilios.celular_responsable as telefono', + 'clientes_domicilios.nombre_responsable_sucursal as contacto', + 'cat_servicios.nombre as servicio', + 'servicios_progreso.comentarios as observaciones', + 'servicios_det.costo_servicio', + DB::raw("TIME_FORMAT(`servicios_progreso`.`fecha_ini_celular`, '%H:%i:%s') as 'fecha_inicio'"), + 'servicios_progreso.duracion', + DB::raw("TIME_FORMAT(`servicios_progreso`.`fecha_fin_celular`, '%H:%i:%s') as 'fecha_final'"), + DB::raw("CONCAT(asesor.nombre,' ',asesor.apellido_paterno,' ',asesor.apellido_materno) as asesor"), + 'sucursales.nombre as sucursal', + DB::raw("CONCAT(auxiliar.nombre,' ',auxiliar.apellido_paterno,' ',auxiliar.apellido_materno) as auxiliar"), + 'cat_vehiculos.num_economico as vehiculo', + 'servicios_progreso.firma', + 'estatus_servicio_id', + 'clientes_domicilios.calle', + 'clientes_domicilios.num_ext', + 'clientes_domicilios.num_int', + 'clientes_domicilios.colonia', + 'clientes_domicilios.cp', + 'servicios_progreso.aplica_garantia' + ]; + + $servicios = ServicioDet::select($campos) + ->join('servicios_enc', 'servicios_det.servicio_enc_id', '=', 'servicios_enc.id') + ->join('clientes', 'servicios_enc.cliente_id', '=', 'clientes.id') + ->join('clientes_domicilios', 'servicios_enc.cliente_domicilio_id','=','clientes_domicilios.id') + ->join('cat_servicios', 'servicios_det.servicio_id', '=', 'cat_servicios.id') + ->leftJoin('servicios_progreso', 'servicios_det.id', '=', 'servicios_progreso.servicio_det_id') + ->join('users as asesor', 'servicios_det.operador_id', '=', 'asesor.id') + ->leftJoin('users as auxiliar', 'servicios_det.auxiliar_1', '=', 'auxiliar.id') + ->join('sucursales', 'servicios_enc.sucursal_id', '=', 'sucursales.id') + ->join('cat_vehiculos', 'servicios_det.vehiculo_id', '=', 'cat_vehiculos.id') + ->where('servicios_det.id', $servicio_det_id) + ->where('servicios_det.servicio_enc_id', $servicio_enc_id) + ->firstOrFail(); + + $num_int = ($servicios->num_int)? ' INT. '.$servicios->num_int :''; + $cp = ($servicios->cp)? ' C.P. '.$servicios->cp : ''; + $servicios['domicilio'] = 'CALLE '.$servicios->calle.' '.$servicios->num_ext.$num_int.', COL. '.$servicios->colonia.$cp; + + //$servicios['folio'] = str_pad($servicios->folio, 5, "0", STR_PAD_LEFT); + $servicios['telefono'] = $this->phone_number_format($servicios->telefono); + + if($servicios->estatus_servicio_id == NEGATIVO){ + $costo_negativo = $servicios->costo_servicio; + $costo = 0.00; + }else{ + $costo_negativo = 0.00; + $costo = $servicios->costo_servicio; + } + + $servicios['costo_servicio'] = money_format('%(#10n', $costo); + $servicios['costo_negativo'] = money_format('%(#10n', $costo_negativo); + + if($servicios->duracion){ + list($h, $m, $s) = explode(":", $servicios->duracion); + $servicios['duracion'] = (int)$h.'hr '.$m.'m '.$s.'s'; + }else{ + $servicios['duracion'] = "00hr 00m 00s"; + } + + $servicio_progreso_id = ServicioProgreso::where('servicio_enc_id', $servicio_enc_id) + ->where('servicio_det_id', $servicio_det_id) + ->first(); + + if($servicio_progreso_id){ + + $evidencias_inicio = ServicioEvidencia::where('servicio_progreso_id', $servicio_progreso_id->id) + ->where('etapa', 'Inicio') + ->get(); + + $evidencias_proceso = ServicioEvidencia::where('servicio_progreso_id', $servicio_progreso_id->id) + ->where('etapa', 'Proceso') + ->get(); + + $evidencias_terminado = ServicioEvidencia::where('servicio_progreso_id', $servicio_progreso_id->id) + ->where('etapa', 'Final') + ->get(); + + $inicio = 0; + $proceso = 0; + $terminado = 0; + foreach ($evidencias_inicio as $e_i){ + $inicio ++; + $servicios["evidencia_inicio_$inicio"] = $e_i->imagen; + } + + foreach ($evidencias_proceso as $e_p){ + $proceso ++; + $servicios["evidencia_proceso_$proceso"] = $e_p->imagen; + } + + foreach ($evidencias_terminado as $e_t){ + $terminado ++; + $servicios["evidencia_terminado_$terminado"] = $e_t->imagen; + } + } + + try { + + $pdf = App::make('dompdf.wrapper'); + $pdf->loadHTML(view('recibos/servicios', compact('servicios'))); + + $nombre_pdf = 'solicitud_' . $servicio_enc_id . '_servicio_' . $servicio_det_id . '.pdf'; + + /*Storage::disk('public')->put('servicios/recibos_pdf/' . $nombre_pdf, $pdf->output()); + + ServicioProgreso::where('id', $servicio_progreso_id) + ->first() + ->update(['pdf' => $nombre_pdf]);*/ + return ['pdf' => $pdf->stream($nombre_pdf), 'nombre' => $nombre_pdf, 'contacto' => $servicios->contacto, 'folio' => $servicios->folio, 'servicio' => $servicios->servicio]; + + } catch (\Exception $e) { + Log::info($e); + return response()->unprocessable('Error', ['Error al generar PDF.']); + } + } + + function phone_number_format($number) { + // Allow only Digits, remove all other characters. + $number = preg_replace("/[^\d]/","",$number); + + // get number length. + $length = strlen($number); + + // if number = 10 + if($length == 10) { + $number = preg_replace("/^1?(\d{3})(\d{3})(\d{4})$/", "($1) $2 $3", $number); + } + + return $number; + + } +} diff --git a/app/Mail/SolicitudServicioTerminadoNew.php b/app/Mail/SolicitudServicioTerminadoNew.php new file mode 100644 index 0000000..370911c --- /dev/null +++ b/app/Mail/SolicitudServicioTerminadoNew.php @@ -0,0 +1,60 @@ +servicio_enc_id = $servicio_enc_id; + $this->servicio_det_id = $servicio_det_id; + $this->pdf_nombre = $pdf_nombre; + } + + /** + * Build the message. + * + * @return $this + */ + public function build() + { + $campos = [ + 'servicios_enc.id as folio', + 'clientes_domicilios.nombre_responsable_sucursal as contacto', + 'cat_servicios.nombre as servicio', + ]; + + $servicio = ServicioDet::select($campos) + ->join('servicios_enc', 'servicios_det.servicio_enc_id', '=', 'servicios_enc.id') + ->join('clientes', 'servicios_enc.cliente_id', '=', 'clientes.id') + ->join('clientes_domicilios', 'servicios_enc.cliente_domicilio_id', '=', 'clientes_domicilios.id') + ->join('cat_servicios', 'servicios_det.servicio_id', '=', 'cat_servicios.id') + ->where('servicios_det.id', $this->servicio_det_id) + ->where('servicios_det.servicio_enc_id', $this->servicio_enc_id) + ->firstOrFail(); + + $info = [ + 'contacto' => $servicio->contacto, + 'folio' => $servicio->folio, + 'servicio' => $servicio->servicio + ]; + + return $this->view('email.emailSolicitudServicioTerminado', compact('info')) + ->subject('Servicio terminado.') + ->attach(storage_path('app/public/servicios/recibos_pdf/' . $this->pdf_nombre)); + } +} diff --git a/app/Models/BitacoraLaboral.php b/app/Models/BitacoraLaboral.php new file mode 100644 index 0000000..299fa70 --- /dev/null +++ b/app/Models/BitacoraLaboral.php @@ -0,0 +1,71 @@ +hasMany('App\Models\ClienteDomicilio', 'cliente_id'); + + } + + public function registroDatosFiscales(){ + + return $this->hasMany('App\Models\ClienteDatoFiscal', 'cliente_id'); + + } +} diff --git a/app/Models/ClienteDatoFiscal.php b/app/Models/ClienteDatoFiscal.php new file mode 100644 index 0000000..c6075a2 --- /dev/null +++ b/app/Models/ClienteDatoFiscal.php @@ -0,0 +1,71 @@ +join('cat_servicios', 'cat_servicios.id', '=', 'servicios.servicio_id') + ->join('cat_estatus_servicios', 'cat_estatus_servicios.id', '=', 'servicios.estatus_servicio_id') + ->join('cat_formas_pagos', 'cat_formas_pagos.id', '=', 'servicios.forma_pago_id') + ->join('cat_tipos_servicios', 'cat_tipos_servicios.id', '=', 'servicios.tipo_servicio_id') + ->join('users', 'users.id', '=', 'servicios.usuario_agenda_id') + ->join('clientes', 'clientes.id', '=', 'servicios.cliente_id') + ->join('clientes_domicilios', 'clientes_domicilios.id', '=', 'servicios.cliente_domicilio_id') + ->leftJoin('users as operador', 'operador.id', '=', 'servicios.operador_id') + ->leftJoin('cat_vehiculos', 'cat_vehiculos.id', '=', 'servicios.vehiculo_id'); + } + + public function scopeJoinDetalleServicioDet($query) + { + return $query->join('cat_servicios', 'cat_servicios.id', '=', 'servicios_det.servicio_id') + ->join('cat_estatus_servicios', 'cat_estatus_servicios.id', '=', 'servicios_det.estatus_servicio_id') + ->join('cat_tipos_servicios', 'cat_tipos_servicios.id', '=', 'servicios_det.tipo_servicio_id') + ->leftJoin('users as operador', 'operador.id', '=', 'servicios_det.operador_id') + ->leftJoin('cat_vehiculos', 'cat_vehiculos.id', '=', 'servicios_det.vehiculo_id') + ->leftJoin('vehiculos_sucursales', 'vehiculos_sucursales.vehiculo_id', '=', 'servicios_det.vehiculo_id') + ->leftJoin('sucursales', 'sucursales.id', '=', 'vehiculos_sucursales.sucursal_id') + ->leftJoin('sucursales as sucursal_operador', 'sucursal_operador.id', '=', 'operador.sucursal_id') + ->leftJoin('users as auxiliares_1', 'auxiliares_1.id', '=', 'servicios_det.auxiliar_1') + ->leftJoin('sucursales as sucursal_auxiliares_1', 'sucursal_auxiliares_1.id', '=', 'auxiliares_1.sucursal_id') + ->leftJoin('users as auxiliares_2', 'auxiliares_2.id', '=', 'servicios_det.auxiliar_2') + ->leftJoin('sucursales as sucursal_auxiliares_2', 'sucursal_auxiliares_2.id', '=', 'auxiliares_2.sucursal_id'); + } + + public function scopeJoinDetalleServicioDetMovil($query) + { + return $query->join('servicios_enc', 'servicios_enc.id', '=', 'servicios_det.servicio_enc_id') + ->join('cat_formas_pagos', 'cat_formas_pagos.id', '=', 'servicios_enc.forma_pago_id') + ->join('users', 'users.id', '=', 'servicios_enc.usuario_agenda_id') + ->join('clientes', 'clientes.id', '=', 'servicios_enc.cliente_id') + ->join('clientes_domicilios', 'clientes_domicilios.id', '=', 'servicios_enc.cliente_domicilio_id'); + } +} diff --git a/app/Models/ServicioEnc.php b/app/Models/ServicioEnc.php new file mode 100644 index 0000000..ca2ffa1 --- /dev/null +++ b/app/Models/ServicioEnc.php @@ -0,0 +1,87 @@ +join('cat_formas_pagos', 'cat_formas_pagos.id', '=', 'servicios_enc.forma_pago_id') + ->join('users', 'users.id', '=', 'servicios_enc.usuario_agenda_id') + ->join('clientes', 'clientes.id', '=', 'servicios_enc.cliente_id') + ->join('clientes_domicilios', 'clientes_domicilios.id', '=', 'servicios_enc.cliente_domicilio_id'); + } + + public function servicios() + { + return $this->hasMany('App\Models\ServicioDet', 'servicio_enc_id'); + } +} diff --git a/app/Models/ServicioEncuestaDomestico.php b/app/Models/ServicioEncuestaDomestico.php new file mode 100644 index 0000000..b6487c8 --- /dev/null +++ b/app/Models/ServicioEncuestaDomestico.php @@ -0,0 +1,74 @@ +hasMany('App\Models\UsuarioDesplazamiento', 'usuario_id'); + } +} diff --git a/app/Models/UserLoginLog.php b/app/Models/UserLoginLog.php new file mode 100644 index 0000000..9d44589 --- /dev/null +++ b/app/Models/UserLoginLog.php @@ -0,0 +1,71 @@ + 'App\Policies\ModelPolicy', + ]; + + /** + * Register any authentication / authorization services. + * + * @return void + */ + public function boot() + { + $this->registerPolicies(); + + // + } +} diff --git a/app/Providers/BroadcastServiceProvider.php b/app/Providers/BroadcastServiceProvider.php new file mode 100644 index 0000000..352cce4 --- /dev/null +++ b/app/Providers/BroadcastServiceProvider.php @@ -0,0 +1,21 @@ + [ + 'App\Listeners\EventListener', + ], + ]; + + /** + * Register any events for your application. + * + * @return void + */ + public function boot() + { + parent::boot(); + + // + } +} diff --git a/app/Providers/FilesystemProvider.php b/app/Providers/FilesystemProvider.php new file mode 100644 index 0000000..5ed8693 --- /dev/null +++ b/app/Providers/FilesystemProvider.php @@ -0,0 +1,31 @@ +$message],400); + }); + + Response::macro('unauthorized', function ($reason) { + return Response::json(['error'=>$reason],401); + }); + + + Response::macro('forbidden', function ($reason) { + return Response::json(['error'=>$reason],403); + }); + + Response::macro('notFound', function ($reason) { + return Response::json(['error'=>$reason],404); + }); + + + Response::macro('unprocessable', function ($message, $errors=[]) { + + + if($errors instanceof MessageBag){ + + $err = []; + foreach ($errors->toArray() as $error) { + $err[] = $error[0]; + } + $errors = $err; + } + Log::info("Error - Mensaje: $message - Errors: ".json_encode($errors)); + + return Response::json(['message'=>$message,'errors'=>$errors],422); + }); + + Response::macro('tooManyAttempts', function ($reason) { + return Response::json(['error'=>$reason],423); + }); + } + + /** + * Register the application services. + * + * @return void + */ + public function register() + { + // + } +} diff --git a/app/Providers/RouteServiceProvider.php b/app/Providers/RouteServiceProvider.php new file mode 100644 index 0000000..5ea48d3 --- /dev/null +++ b/app/Providers/RouteServiceProvider.php @@ -0,0 +1,73 @@ +mapApiRoutes(); + + $this->mapWebRoutes(); + + // + } + + /** + * Define the "web" routes for the application. + * + * These routes all receive session state, CSRF protection, etc. + * + * @return void + */ + protected function mapWebRoutes() + { + Route::middleware('web') + ->namespace($this->namespace) + ->group(base_path('routes/web.php')); + } + + /** + * Define the "api" routes for the application. + * + * These routes are typically stateless. + * + * @return void + */ + protected function mapApiRoutes() + { + Route::prefix('api') + ->middleware('api') + ->namespace($this->namespace) + ->group(base_path('routes/api.php')); + } +} diff --git a/artisan b/artisan new file mode 100644 index 0000000..44dc07b --- /dev/null +++ b/artisan @@ -0,0 +1,51 @@ +#!/usr/bin/env php +make(Illuminate\Contracts\Console\Kernel::class); + +$status = $kernel->handle( + $input = new Symfony\Component\Console\Input\ArgvInput, + new Symfony\Component\Console\Output\ConsoleOutput +); + +/* +|-------------------------------------------------------------------------- +| Shutdown The Application +|-------------------------------------------------------------------------- +| +| Once Artisan has finished running, we will fire off the shutdown events +| so that any final work may be done by the application before we shut +| down the process. This is the last thing to happen to the request. +| +*/ + +$kernel->terminate($input, $status); + +exit($status); diff --git a/bootstrap/app.php b/bootstrap/app.php new file mode 100644 index 0000000..f2801ad --- /dev/null +++ b/bootstrap/app.php @@ -0,0 +1,55 @@ +singleton( + Illuminate\Contracts\Http\Kernel::class, + App\Http\Kernel::class +); + +$app->singleton( + Illuminate\Contracts\Console\Kernel::class, + App\Console\Kernel::class +); + +$app->singleton( + Illuminate\Contracts\Debug\ExceptionHandler::class, + App\Exceptions\Handler::class +); + +/* +|-------------------------------------------------------------------------- +| Return The Application +|-------------------------------------------------------------------------- +| +| This script returns the application instance. The instance is given to +| the calling script so we can separate the building of the instances +| from the actual running of the application and sending responses. +| +*/ + +return $app; diff --git a/bootstrap/autoload.php b/bootstrap/autoload.php new file mode 100644 index 0000000..c64e19f --- /dev/null +++ b/bootstrap/autoload.php @@ -0,0 +1,17 @@ +=5.6.4", + "barryvdh/laravel-cors": "^0.11.0", + "barryvdh/laravel-dompdf": "^0.8.0", + "cartalyst/sentinel": "2.0.*", + "doctrine/dbal": "^2.8", + "guzzlehttp/guzzle": "^6.3", + "laravel/framework": "5.4.*", + "laravel/tinker": "~1.0", + "maatwebsite/excel": "~2.1.0", + "setasign/fpdf": "^1.8", + "setasign/fpdi": "^2.3", + "tymon/jwt-auth": "^0.5.12" + }, + "require-dev": { + "fzaninotto/faker": "~1.4", + "mockery/mockery": "0.9.*", + "phpunit/phpunit": "~5.7" + }, + "autoload": { + "classmap": [ + "database" + ], + "psr-4": { + "App\\": "app/" + } + }, + "autoload-dev": { + "psr-4": { + "Tests\\": "tests/" + } + }, + "scripts": { + "post-root-package-install": [ + "php -r \"file_exists('.env') || copy('.env.example', '.env');\"" + ], + "post-create-project-cmd": [ + "php artisan key:generate" + ], + "post-install-cmd": [ + "Illuminate\\Foundation\\ComposerScripts::postInstall", + "php artisan optimize" + ], + "post-update-cmd": [ + "Illuminate\\Foundation\\ComposerScripts::postUpdate", + "php artisan optimize" + ] + }, + "config": { + "preferred-install": "dist", + "sort-packages": true, + "optimize-autoloader": true, + "allow-plugins": { + "kylekatarnls/update-helper": true + } + } +} diff --git a/composer.lock b/composer.lock new file mode 100644 index 0000000..3fca80b --- /dev/null +++ b/composer.lock @@ -0,0 +1,5022 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", + "This file is @generated automatically" + ], + "content-hash": "fee4365006c117789f3cce7aa156cdd9", + "packages": [ + { + "name": "asm89/stack-cors", + "version": "1.2.0", + "source": { + "type": "git", + "url": "https://github.com/asm89/stack-cors.git", + "reference": "c163e2b614550aedcf71165db2473d936abbced6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/asm89/stack-cors/zipball/c163e2b614550aedcf71165db2473d936abbced6", + "reference": "c163e2b614550aedcf71165db2473d936abbced6", + "shasum": "" + }, + "require": { + "php": ">=5.5.9", + "symfony/http-foundation": "~2.7|~3.0|~4.0", + "symfony/http-kernel": "~2.7|~3.0|~4.0" + }, + "require-dev": { + "phpunit/phpunit": "^5.0 || ^4.8.10", + "squizlabs/php_codesniffer": "^2.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2-dev" + } + }, + "autoload": { + "psr-4": { + "Asm89\\Stack\\": "src/Asm89/Stack/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Alexander", + "email": "iam.asm89@gmail.com" + } + ], + "description": "Cross-origin resource sharing library and stack middleware", + "homepage": "https://github.com/asm89/stack-cors", + "keywords": [ + "cors", + "stack" + ], + "time": "2017-12-20T14:37:45+00:00" + }, + { + "name": "barryvdh/laravel-cors", + "version": "v0.11.0", + "source": { + "type": "git", + "url": "https://github.com/fruitcake/laravel-cors.git", + "reference": "6ba64a654b4258a3ecc11aba6614c932b3442e30" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/fruitcake/laravel-cors/zipball/6ba64a654b4258a3ecc11aba6614c932b3442e30", + "reference": "6ba64a654b4258a3ecc11aba6614c932b3442e30", + "shasum": "" + }, + "require": { + "asm89/stack-cors": "^1.2", + "illuminate/support": "5.3.x|5.4.x|5.5.x|5.6.x", + "php": ">=5.5.9", + "symfony/http-foundation": "^3.1|^4", + "symfony/http-kernel": "^3.1|^4" + }, + "require-dev": { + "orchestra/testbench": "3.x", + "phpunit/phpunit": "^4.8|^5.2", + "squizlabs/php_codesniffer": "^2.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "0.11-dev" + }, + "laravel": { + "providers": [ + "Barryvdh\\Cors\\ServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "Barryvdh\\Cors\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Barry vd. Heuvel", + "email": "barryvdh@gmail.com" + } + ], + "description": "Adds CORS (Cross-Origin Resource Sharing) headers support in your Laravel application", + "keywords": [ + "api", + "cors", + "crossdomain", + "laravel" + ], + "time": "2018-01-04T06:59:27+00:00" + }, + { + "name": "barryvdh/laravel-dompdf", + "version": "v0.8.2", + "source": { + "type": "git", + "url": "https://github.com/barryvdh/laravel-dompdf.git", + "reference": "7dcdecfa125c174d0abe723603633dc2756ea3af" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/barryvdh/laravel-dompdf/zipball/7dcdecfa125c174d0abe723603633dc2756ea3af", + "reference": "7dcdecfa125c174d0abe723603633dc2756ea3af", + "shasum": "" + }, + "require": { + "dompdf/dompdf": "^0.8", + "illuminate/support": "5.1.x|5.2.x|5.3.x|5.4.x|5.5.x|5.6.x", + "php": ">=5.5.9" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "0.8-dev" + }, + "laravel": { + "providers": [ + "Barryvdh\\DomPDF\\ServiceProvider" + ], + "aliases": { + "PDF": "Barryvdh\\DomPDF\\Facade" + } + } + }, + "autoload": { + "psr-4": { + "Barryvdh\\DomPDF\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Barry vd. Heuvel", + "email": "barryvdh@gmail.com" + } + ], + "description": "A DOMPDF Wrapper for Laravel", + "keywords": [ + "dompdf", + "laravel", + "pdf" + ], + "time": "2018-02-07T17:43:25+00:00" + }, + { + "name": "cartalyst/sentinel", + "version": "v2.0.17", + "source": { + "type": "git", + "url": "https://github.com/cartalyst/sentinel.git", + "reference": "8ee7778f96ab6193f4be118a52d265c6861de0a5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/cartalyst/sentinel/zipball/8ee7778f96ab6193f4be118a52d265c6861de0a5", + "reference": "8ee7778f96ab6193f4be118a52d265c6861de0a5", + "shasum": "" + }, + "require": { + "cartalyst/support": "~1.0|~2.0", + "illuminate/support": "~5.0", + "php": ">=5.4.0" + }, + "require-dev": { + "illuminate/cookie": "~5.0", + "illuminate/database": "~5.0", + "illuminate/events": "~5.0", + "illuminate/http": "~5.0", + "illuminate/session": "~5.0", + "ircmaxell/password-compat": "~1.0", + "mockery/mockery": "~0.9", + "paragonie/random_compat": "^1.4|^2", + "phpunit/phpunit": "~4.0" + }, + "suggest": { + "illuminate/database": "By default, Sentinel utilizes the powerful Illuminate database layer.", + "illuminate/events": "To hook into various events across Sentinel, we recommend using Illuminate's event dispatcher.", + "ircmaxell/password-compat": "Default hashing uses PHP 5.5 password_* functions, with forward-compatible support.", + "symfony/http-foundation": "Required for native implementations." + }, + "type": "library", + "extra": { + "component": "package", + "branch-alias": { + "dev-master": "2.0.x-dev" + }, + "laravel": { + "providers": [ + "Cartalyst\\Sentinel\\Laravel\\SentinelServiceProvider" + ], + "aliases": { + "Activation": "Cartalyst\\Sentinel\\Laravel\\Facades\\Activation", + "Reminder": "Cartalyst\\Sentinel\\Laravel\\Facades\\Reminder", + "Sentinel": "Cartalyst\\Sentinel\\Laravel\\Facades\\Sentinel" + } + } + }, + "autoload": { + "psr-4": { + "Cartalyst\\Sentinel\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Cartalyst LLC", + "email": "help@cartalyst.com", + "homepage": "https://cartalyst.com" + } + ], + "description": "PHP 5.4+ Fully-featured Authentication & Authorization System", + "keywords": [ + "auth", + "cartalyst", + "codeigniter", + "fuelphp", + "laravel", + "php", + "security" + ], + "time": "2017-11-28T13:10:46+00:00" + }, + { + "name": "cartalyst/support", + "version": "v2.0.1", + "source": { + "type": "git", + "url": "https://github.com/cartalyst/support.git", + "reference": "c32a7ebcf8dc8ebd6926e0059b3b3e23360e5abb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/cartalyst/support/zipball/c32a7ebcf8dc8ebd6926e0059b3b3e23360e5abb", + "reference": "c32a7ebcf8dc8ebd6926e0059b3b3e23360e5abb", + "shasum": "" + }, + "require": { + "php": ">=5.6.4" + }, + "require-dev": { + "illuminate/mail": "~5.0", + "illuminate/validation": "~5.0", + "mockery/mockery": "~0.9", + "phpunit/phpunit": "^5.7", + "symfony/translation": "~3.2" + }, + "type": "library", + "extra": { + "component": "package", + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Cartalyst\\Support\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Cartalyst LLC", + "email": "help@cartalyst.com", + "homepage": "https://cartalyst.com" + } + ], + "description": "Support helpers.", + "keywords": [ + "cartalyst", + "helper", + "laravel", + "support" + ], + "time": "2017-02-23T12:05:30+00:00" + }, + { + "name": "dnoegel/php-xdg-base-dir", + "version": "0.1", + "source": { + "type": "git", + "url": "https://github.com/dnoegel/php-xdg-base-dir.git", + "reference": "265b8593498b997dc2d31e75b89f053b5cc9621a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/dnoegel/php-xdg-base-dir/zipball/265b8593498b997dc2d31e75b89f053b5cc9621a", + "reference": "265b8593498b997dc2d31e75b89f053b5cc9621a", + "shasum": "" + }, + "require": { + "php": ">=5.3.2" + }, + "require-dev": { + "phpunit/phpunit": "@stable" + }, + "type": "project", + "autoload": { + "psr-4": { + "XdgBaseDir\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "implementation of xdg base directory specification for php", + "time": "2014-10-24T07:27:01+00:00" + }, + { + "name": "doctrine/cache", + "version": "v1.8.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/cache.git", + "reference": "d768d58baee9a4862ca783840eca1b9add7a7f57" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/cache/zipball/d768d58baee9a4862ca783840eca1b9add7a7f57", + "reference": "d768d58baee9a4862ca783840eca1b9add7a7f57", + "shasum": "" + }, + "require": { + "php": "~7.1" + }, + "conflict": { + "doctrine/common": ">2.2,<2.4" + }, + "require-dev": { + "alcaeus/mongo-php-adapter": "^1.1", + "doctrine/coding-standard": "^4.0", + "mongodb/mongodb": "^1.1", + "phpunit/phpunit": "^7.0", + "predis/predis": "~1.0" + }, + "suggest": { + "alcaeus/mongo-php-adapter": "Required to use legacy MongoDB driver" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.8.x-dev" + } + }, + "autoload": { + "psr-4": { + "Doctrine\\Common\\Cache\\": "lib/Doctrine/Common/Cache" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "Caching library offering an object-oriented API for many cache backends", + "homepage": "https://www.doctrine-project.org", + "keywords": [ + "cache", + "caching" + ], + "time": "2018-08-21T18:01:43+00:00" + }, + { + "name": "doctrine/dbal", + "version": "v2.8.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/dbal.git", + "reference": "5140a64c08b4b607b9bedaae0cedd26f04a0e621" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/dbal/zipball/5140a64c08b4b607b9bedaae0cedd26f04a0e621", + "reference": "5140a64c08b4b607b9bedaae0cedd26f04a0e621", + "shasum": "" + }, + "require": { + "doctrine/cache": "^1.0", + "doctrine/event-manager": "^1.0", + "ext-pdo": "*", + "php": "^7.1" + }, + "require-dev": { + "doctrine/coding-standard": "^4.0", + "jetbrains/phpstorm-stubs": "^2018.1.2", + "phpstan/phpstan": "^0.10.1", + "phpunit/phpunit": "^7.1.2", + "phpunit/phpunit-mock-objects": "!=3.2.4,!=3.2.5", + "symfony/console": "^2.0.5|^3.0|^4.0", + "symfony/phpunit-bridge": "^3.4.5|^4.0.5" + }, + "suggest": { + "symfony/console": "For helpful console commands such as SQL execution and import of files." + }, + "bin": [ + "bin/doctrine-dbal" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.8.x-dev", + "dev-develop": "3.0.x-dev" + } + }, + "autoload": { + "psr-0": { + "Doctrine\\DBAL\\": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + } + ], + "description": "Database Abstraction Layer", + "homepage": "http://www.doctrine-project.org", + "keywords": [ + "database", + "dbal", + "persistence", + "queryobject" + ], + "time": "2018-07-13T03:16:35+00:00" + }, + { + "name": "doctrine/event-manager", + "version": "v1.0.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/event-manager.git", + "reference": "a520bc093a0170feeb6b14e9d83f3a14452e64b3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/event-manager/zipball/a520bc093a0170feeb6b14e9d83f3a14452e64b3", + "reference": "a520bc093a0170feeb6b14e9d83f3a14452e64b3", + "shasum": "" + }, + "require": { + "php": "^7.1" + }, + "conflict": { + "doctrine/common": "<2.9@dev" + }, + "require-dev": { + "doctrine/coding-standard": "^4.0", + "phpunit/phpunit": "^7.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Doctrine\\Common\\": "lib/Doctrine/Common" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + }, + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com" + } + ], + "description": "Doctrine Event Manager component", + "homepage": "https://www.doctrine-project.org/projects/event-manager.html", + "keywords": [ + "event", + "eventdispatcher", + "eventmanager" + ], + "time": "2018-06-11T11:59:03+00:00" + }, + { + "name": "doctrine/inflector", + "version": "v1.3.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/inflector.git", + "reference": "5527a48b7313d15261292c149e55e26eae771b0a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/inflector/zipball/5527a48b7313d15261292c149e55e26eae771b0a", + "reference": "5527a48b7313d15261292c149e55e26eae771b0a", + "shasum": "" + }, + "require": { + "php": "^7.1" + }, + "require-dev": { + "phpunit/phpunit": "^6.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Doctrine\\Common\\Inflector\\": "lib/Doctrine/Common/Inflector" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "Common String Manipulations with regard to casing and singular/plural rules.", + "homepage": "http://www.doctrine-project.org", + "keywords": [ + "inflection", + "pluralize", + "singularize", + "string" + ], + "time": "2018-01-09T20:05:19+00:00" + }, + { + "name": "dompdf/dompdf", + "version": "v0.8.2", + "source": { + "type": "git", + "url": "https://github.com/dompdf/dompdf.git", + "reference": "5113accd9ae5d466077cce5208dcf3fb871bf8f6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/dompdf/dompdf/zipball/5113accd9ae5d466077cce5208dcf3fb871bf8f6", + "reference": "5113accd9ae5d466077cce5208dcf3fb871bf8f6", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-gd": "*", + "ext-mbstring": "*", + "phenx/php-font-lib": "0.5.*", + "phenx/php-svg-lib": "0.3.*", + "php": ">=5.4.0" + }, + "require-dev": { + "phpunit/phpunit": "4.8.*", + "squizlabs/php_codesniffer": "2.*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-develop": "0.7-dev" + } + }, + "autoload": { + "psr-4": { + "Dompdf\\": "src/" + }, + "classmap": [ + "lib/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL-2.1" + ], + "authors": [ + { + "name": "Fabien Ménager", + "email": "fabien.menager@gmail.com" + }, + { + "name": "Brian Sweeney", + "email": "eclecticgeek@gmail.com" + }, + { + "name": "Gabriel Bull", + "email": "me@gabrielbull.com" + } + ], + "description": "DOMPDF is a CSS 2.1 compliant HTML to PDF converter", + "homepage": "https://github.com/dompdf/dompdf", + "time": "2017-11-26T14:49:08+00:00" + }, + { + "name": "erusev/parsedown", + "version": "1.7.1", + "source": { + "type": "git", + "url": "https://github.com/erusev/parsedown.git", + "reference": "92e9c27ba0e74b8b028b111d1b6f956a15c01fc1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/erusev/parsedown/zipball/92e9c27ba0e74b8b028b111d1b6f956a15c01fc1", + "reference": "92e9c27ba0e74b8b028b111d1b6f956a15c01fc1", + "shasum": "" + }, + "require": { + "ext-mbstring": "*", + "php": ">=5.3.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35" + }, + "type": "library", + "autoload": { + "psr-0": { + "Parsedown": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Emanuil Rusev", + "email": "hello@erusev.com", + "homepage": "http://erusev.com" + } + ], + "description": "Parser for Markdown.", + "homepage": "http://parsedown.org", + "keywords": [ + "markdown", + "parser" + ], + "time": "2018-03-08T01:11:30+00:00" + }, + { + "name": "guzzlehttp/guzzle", + "version": "6.3.3", + "source": { + "type": "git", + "url": "https://github.com/guzzle/guzzle.git", + "reference": "407b0cb880ace85c9b63c5f9551db498cb2d50ba" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/407b0cb880ace85c9b63c5f9551db498cb2d50ba", + "reference": "407b0cb880ace85c9b63c5f9551db498cb2d50ba", + "shasum": "" + }, + "require": { + "guzzlehttp/promises": "^1.0", + "guzzlehttp/psr7": "^1.4", + "php": ">=5.5" + }, + "require-dev": { + "ext-curl": "*", + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.4 || ^7.0", + "psr/log": "^1.0" + }, + "suggest": { + "psr/log": "Required for using the Log middleware" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "6.3-dev" + } + }, + "autoload": { + "files": [ + "src/functions_include.php" + ], + "psr-4": { + "GuzzleHttp\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + } + ], + "description": "Guzzle is a PHP HTTP client library", + "homepage": "http://guzzlephp.org/", + "keywords": [ + "client", + "curl", + "framework", + "http", + "http client", + "rest", + "web service" + ], + "time": "2018-04-22T15:46:56+00:00" + }, + { + "name": "guzzlehttp/promises", + "version": "v1.3.1", + "source": { + "type": "git", + "url": "https://github.com/guzzle/promises.git", + "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/promises/zipball/a59da6cf61d80060647ff4d3eb2c03a2bc694646", + "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646", + "shasum": "" + }, + "require": { + "php": ">=5.5.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4-dev" + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\Promise\\": "src/" + }, + "files": [ + "src/functions_include.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + } + ], + "description": "Guzzle promises library", + "keywords": [ + "promise" + ], + "time": "2016-12-20T10:07:11+00:00" + }, + { + "name": "guzzlehttp/psr7", + "version": "1.4.2", + "source": { + "type": "git", + "url": "https://github.com/guzzle/psr7.git", + "reference": "f5b8a8512e2b58b0071a7280e39f14f72e05d87c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/f5b8a8512e2b58b0071a7280e39f14f72e05d87c", + "reference": "f5b8a8512e2b58b0071a7280e39f14f72e05d87c", + "shasum": "" + }, + "require": { + "php": ">=5.4.0", + "psr/http-message": "~1.0" + }, + "provide": { + "psr/http-message-implementation": "1.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4-dev" + } + }, + "autoload": { + "files": [ + "src/functions_include.php" + ], + "psr-4": { + "GuzzleHttp\\Psr7\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "Tobias Schultze", + "homepage": "https://github.com/Tobion" + } + ], + "description": "PSR-7 message implementation that also provides common utility methods", + "keywords": [ + "http", + "message", + "request", + "response", + "stream", + "uri", + "url" + ], + "time": "2017-03-20T17:10:46+00:00" + }, + { + "name": "jakub-onderka/php-console-color", + "version": "v0.2", + "source": { + "type": "git", + "url": "https://github.com/JakubOnderka/PHP-Console-Color.git", + "reference": "d5deaecff52a0d61ccb613bb3804088da0307191" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/JakubOnderka/PHP-Console-Color/zipball/d5deaecff52a0d61ccb613bb3804088da0307191", + "reference": "d5deaecff52a0d61ccb613bb3804088da0307191", + "shasum": "" + }, + "require": { + "php": ">=5.4.0" + }, + "require-dev": { + "jakub-onderka/php-code-style": "1.0", + "jakub-onderka/php-parallel-lint": "1.0", + "jakub-onderka/php-var-dump-check": "0.*", + "phpunit/phpunit": "~4.3", + "squizlabs/php_codesniffer": "1.*" + }, + "type": "library", + "autoload": { + "psr-4": { + "JakubOnderka\\PhpConsoleColor\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-2-Clause" + ], + "authors": [ + { + "name": "Jakub Onderka", + "email": "jakub.onderka@gmail.com" + } + ], + "abandoned": "php-parallel-lint/php-console-color", + "time": "2018-09-29T17:23:10+00:00" + }, + { + "name": "jakub-onderka/php-console-highlighter", + "version": "v0.4", + "source": { + "type": "git", + "url": "https://github.com/JakubOnderka/PHP-Console-Highlighter.git", + "reference": "9f7a229a69d52506914b4bc61bfdb199d90c5547" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/JakubOnderka/PHP-Console-Highlighter/zipball/9f7a229a69d52506914b4bc61bfdb199d90c5547", + "reference": "9f7a229a69d52506914b4bc61bfdb199d90c5547", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "jakub-onderka/php-console-color": "~0.2", + "php": ">=5.4.0" + }, + "require-dev": { + "jakub-onderka/php-code-style": "~1.0", + "jakub-onderka/php-parallel-lint": "~1.0", + "jakub-onderka/php-var-dump-check": "~0.1", + "phpunit/phpunit": "~4.0", + "squizlabs/php_codesniffer": "~1.5" + }, + "type": "library", + "autoload": { + "psr-4": { + "JakubOnderka\\PhpConsoleHighlighter\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jakub Onderka", + "email": "acci@acci.cz", + "homepage": "http://www.acci.cz/" + } + ], + "description": "Highlight PHP code in terminal", + "abandoned": "php-parallel-lint/php-console-highlighter", + "time": "2018-09-29T18:48:56+00:00" + }, + { + "name": "jeremeamia/SuperClosure", + "version": "2.4.0", + "source": { + "type": "git", + "url": "https://github.com/jeremeamia/super_closure.git", + "reference": "5707d5821b30b9a07acfb4d76949784aaa0e9ce9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/jeremeamia/super_closure/zipball/5707d5821b30b9a07acfb4d76949784aaa0e9ce9", + "reference": "5707d5821b30b9a07acfb4d76949784aaa0e9ce9", + "shasum": "" + }, + "require": { + "nikic/php-parser": "^1.2|^2.0|^3.0|^4.0", + "php": ">=5.4", + "symfony/polyfill-php56": "^1.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.0|^5.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.4-dev" + } + }, + "autoload": { + "psr-4": { + "SuperClosure\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jeremy Lindblom", + "email": "jeremeamia@gmail.com", + "homepage": "https://github.com/jeremeamia", + "role": "Developer" + } + ], + "description": "Serialize Closure objects, including their context and binding", + "homepage": "https://github.com/jeremeamia/super_closure", + "keywords": [ + "closure", + "function", + "lambda", + "parser", + "serializable", + "serialize", + "tokenizer" + ], + "abandoned": "opis/closure", + "time": "2018-03-21T22:21:57+00:00" + }, + { + "name": "laravel/framework", + "version": "v5.4.36", + "source": { + "type": "git", + "url": "https://github.com/laravel/framework.git", + "reference": "1062a22232071c3e8636487c86ec1ae75681bbf9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laravel/framework/zipball/1062a22232071c3e8636487c86ec1ae75681bbf9", + "reference": "1062a22232071c3e8636487c86ec1ae75681bbf9", + "shasum": "" + }, + "require": { + "doctrine/inflector": "~1.1", + "erusev/parsedown": "~1.6", + "ext-mbstring": "*", + "ext-openssl": "*", + "league/flysystem": "~1.0", + "monolog/monolog": "~1.11", + "mtdowling/cron-expression": "~1.0", + "nesbot/carbon": "~1.20", + "paragonie/random_compat": "~1.4|~2.0", + "php": ">=5.6.4", + "ramsey/uuid": "~3.0", + "swiftmailer/swiftmailer": "~5.4", + "symfony/console": "~3.2", + "symfony/debug": "~3.2", + "symfony/finder": "~3.2", + "symfony/http-foundation": "~3.2", + "symfony/http-kernel": "~3.2", + "symfony/process": "~3.2", + "symfony/routing": "~3.2", + "symfony/var-dumper": "~3.2", + "tijsverkoyen/css-to-inline-styles": "~2.2", + "vlucas/phpdotenv": "~2.2" + }, + "replace": { + "illuminate/auth": "self.version", + "illuminate/broadcasting": "self.version", + "illuminate/bus": "self.version", + "illuminate/cache": "self.version", + "illuminate/config": "self.version", + "illuminate/console": "self.version", + "illuminate/container": "self.version", + "illuminate/contracts": "self.version", + "illuminate/cookie": "self.version", + "illuminate/database": "self.version", + "illuminate/encryption": "self.version", + "illuminate/events": "self.version", + "illuminate/exception": "self.version", + "illuminate/filesystem": "self.version", + "illuminate/hashing": "self.version", + "illuminate/http": "self.version", + "illuminate/log": "self.version", + "illuminate/mail": "self.version", + "illuminate/notifications": "self.version", + "illuminate/pagination": "self.version", + "illuminate/pipeline": "self.version", + "illuminate/queue": "self.version", + "illuminate/redis": "self.version", + "illuminate/routing": "self.version", + "illuminate/session": "self.version", + "illuminate/support": "self.version", + "illuminate/translation": "self.version", + "illuminate/validation": "self.version", + "illuminate/view": "self.version", + "tightenco/collect": "self.version" + }, + "require-dev": { + "aws/aws-sdk-php": "~3.0", + "doctrine/dbal": "~2.5", + "mockery/mockery": "~0.9.4", + "pda/pheanstalk": "~3.0", + "phpunit/phpunit": "~5.7", + "predis/predis": "~1.0", + "symfony/css-selector": "~3.2", + "symfony/dom-crawler": "~3.2" + }, + "suggest": { + "aws/aws-sdk-php": "Required to use the SQS queue driver and SES mail driver (~3.0).", + "doctrine/dbal": "Required to rename columns and drop SQLite columns (~2.5).", + "fzaninotto/faker": "Required to use the eloquent factory builder (~1.4).", + "guzzlehttp/guzzle": "Required to use the Mailgun and Mandrill mail drivers and the ping methods on schedules (~6.0).", + "laravel/tinker": "Required to use the tinker console command (~1.0).", + "league/flysystem-aws-s3-v3": "Required to use the Flysystem S3 driver (~1.0).", + "league/flysystem-rackspace": "Required to use the Flysystem Rackspace driver (~1.0).", + "nexmo/client": "Required to use the Nexmo transport (~1.0).", + "pda/pheanstalk": "Required to use the beanstalk queue driver (~3.0).", + "predis/predis": "Required to use the redis cache and queue drivers (~1.0).", + "pusher/pusher-php-server": "Required to use the Pusher broadcast driver (~2.0).", + "symfony/css-selector": "Required to use some of the crawler integration testing tools (~3.2).", + "symfony/dom-crawler": "Required to use most of the crawler integration testing tools (~3.2).", + "symfony/psr-http-message-bridge": "Required to psr7 bridging features (0.2.*)." + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.4-dev" + } + }, + "autoload": { + "files": [ + "src/Illuminate/Foundation/helpers.php", + "src/Illuminate/Support/helpers.php" + ], + "psr-4": { + "Illuminate\\": "src/Illuminate/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "description": "The Laravel Framework.", + "homepage": "https://laravel.com", + "keywords": [ + "framework", + "laravel" + ], + "time": "2017-08-30T09:26:16+00:00" + }, + { + "name": "laravel/tinker", + "version": "v1.0.8", + "source": { + "type": "git", + "url": "https://github.com/laravel/tinker.git", + "reference": "cafbf598a90acde68985660e79b2b03c5609a405" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laravel/tinker/zipball/cafbf598a90acde68985660e79b2b03c5609a405", + "reference": "cafbf598a90acde68985660e79b2b03c5609a405", + "shasum": "" + }, + "require": { + "illuminate/console": "~5.1", + "illuminate/contracts": "~5.1", + "illuminate/support": "~5.1", + "php": ">=5.5.9", + "psy/psysh": "0.7.*|0.8.*|0.9.*", + "symfony/var-dumper": "~3.0|~4.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.0|~5.0" + }, + "suggest": { + "illuminate/database": "The Illuminate Database package (~5.1)." + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + }, + "laravel": { + "providers": [ + "Laravel\\Tinker\\TinkerServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "Laravel\\Tinker\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "description": "Powerful REPL for the Laravel framework.", + "keywords": [ + "REPL", + "Tinker", + "laravel", + "psysh" + ], + "time": "2018-10-12T19:39:35+00:00" + }, + { + "name": "league/flysystem", + "version": "1.0.48", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/flysystem.git", + "reference": "a6ded5b2f6055e2db97b4b859fdfca2b952b78aa" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/a6ded5b2f6055e2db97b4b859fdfca2b952b78aa", + "reference": "a6ded5b2f6055e2db97b4b859fdfca2b952b78aa", + "shasum": "" + }, + "require": { + "ext-fileinfo": "*", + "php": ">=5.5.9" + }, + "conflict": { + "league/flysystem-sftp": "<1.0.6" + }, + "require-dev": { + "phpspec/phpspec": "^3.4", + "phpunit/phpunit": "^5.7.10" + }, + "suggest": { + "ext-fileinfo": "Required for MimeType", + "ext-ftp": "Allows you to use FTP server storage", + "ext-openssl": "Allows you to use FTPS server storage", + "league/flysystem-aws-s3-v2": "Allows you to use S3 storage with AWS SDK v2", + "league/flysystem-aws-s3-v3": "Allows you to use S3 storage with AWS SDK v3", + "league/flysystem-azure": "Allows you to use Windows Azure Blob storage", + "league/flysystem-cached-adapter": "Flysystem adapter decorator for metadata caching", + "league/flysystem-eventable-filesystem": "Allows you to use EventableFilesystem", + "league/flysystem-rackspace": "Allows you to use Rackspace Cloud Files", + "league/flysystem-sftp": "Allows you to use SFTP server storage via phpseclib", + "league/flysystem-webdav": "Allows you to use WebDAV storage", + "league/flysystem-ziparchive": "Allows you to use ZipArchive adapter", + "spatie/flysystem-dropbox": "Allows you to use Dropbox storage", + "srmklive/flysystem-dropbox-v2": "Allows you to use Dropbox storage for PHP 5 applications" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + }, + "autoload": { + "psr-4": { + "League\\Flysystem\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Frank de Jonge", + "email": "info@frenky.net" + } + ], + "description": "Filesystem abstraction: Many filesystems, one API.", + "keywords": [ + "Cloud Files", + "WebDAV", + "abstraction", + "aws", + "cloud", + "copy.com", + "dropbox", + "file systems", + "files", + "filesystem", + "filesystems", + "ftp", + "rackspace", + "remote", + "s3", + "sftp", + "storage" + ], + "time": "2018-10-15T13:53:10+00:00" + }, + { + "name": "maatwebsite/excel", + "version": "2.1.30", + "source": { + "type": "git", + "url": "https://github.com/Maatwebsite/Laravel-Excel.git", + "reference": "f5540c4ba3ac50cebd98b09ca42e61f926ef299f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Maatwebsite/Laravel-Excel/zipball/f5540c4ba3ac50cebd98b09ca42e61f926ef299f", + "reference": "f5540c4ba3ac50cebd98b09ca42e61f926ef299f", + "shasum": "" + }, + "require": { + "illuminate/cache": "^5.0", + "illuminate/config": "^5.0", + "illuminate/filesystem": "^5.0", + "illuminate/support": "^5.0", + "jeremeamia/superclosure": "^2.3", + "nesbot/carbon": "~1.0", + "php": ">=5.5", + "phpoffice/phpexcel": "^1.8.1", + "tijsverkoyen/css-to-inline-styles": "~2.0" + }, + "require-dev": { + "mockery/mockery": "~1.0", + "orchestra/testbench": "3.1.*|3.2.*|3.3.*|3.4.*|3.5.*|3.6.*", + "phpseclib/phpseclib": "~1.0", + "phpunit/phpunit": "~4.0" + }, + "suggest": { + "illuminate/http": "^5.0", + "illuminate/queue": "^5.0", + "illuminate/routing": "^5.0", + "illuminate/view": "^5.0" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Maatwebsite\\Excel\\ExcelServiceProvider" + ], + "aliases": { + "Excel": "Maatwebsite\\Excel\\Facades\\Excel" + } + } + }, + "autoload": { + "classmap": [ + "src/Maatwebsite/Excel" + ], + "psr-0": { + "Maatwebsite\\Excel\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Maatwebsite.nl", + "email": "patrick@maatwebsite.nl" + } + ], + "description": "Supercharged Excel exports in Laravel", + "keywords": [ + "PHPExcel", + "batch", + "csv", + "excel", + "export", + "import", + "laravel" + ], + "time": "2018-09-04T19:00:09+00:00" + }, + { + "name": "monolog/monolog", + "version": "1.24.0", + "source": { + "type": "git", + "url": "https://github.com/Seldaek/monolog.git", + "reference": "bfc9ebb28f97e7a24c45bdc3f0ff482e47bb0266" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/bfc9ebb28f97e7a24c45bdc3f0ff482e47bb0266", + "reference": "bfc9ebb28f97e7a24c45bdc3f0ff482e47bb0266", + "shasum": "" + }, + "require": { + "php": ">=5.3.0", + "psr/log": "~1.0" + }, + "provide": { + "psr/log-implementation": "1.0.0" + }, + "require-dev": { + "aws/aws-sdk-php": "^2.4.9 || ^3.0", + "doctrine/couchdb": "~1.0@dev", + "graylog2/gelf-php": "~1.0", + "jakub-onderka/php-parallel-lint": "0.9", + "php-amqplib/php-amqplib": "~2.4", + "php-console/php-console": "^3.1.3", + "phpunit/phpunit": "~4.5", + "phpunit/phpunit-mock-objects": "2.3.0", + "ruflin/elastica": ">=0.90 <3.0", + "sentry/sentry": "^0.13", + "swiftmailer/swiftmailer": "^5.3|^6.0" + }, + "suggest": { + "aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB", + "doctrine/couchdb": "Allow sending log messages to a CouchDB server", + "ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)", + "ext-mongo": "Allow sending log messages to a MongoDB server", + "graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server", + "mongodb/mongodb": "Allow sending log messages to a MongoDB server via PHP Driver", + "php-amqplib/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib", + "php-console/php-console": "Allow sending log messages to Google Chrome", + "rollbar/rollbar": "Allow sending log messages to Rollbar", + "ruflin/elastica": "Allow sending log messages to an Elastic Search server", + "sentry/sentry": "Allow sending log messages to a Sentry server" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Monolog\\": "src/Monolog" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + } + ], + "description": "Sends your logs to files, sockets, inboxes, databases and various web services", + "homepage": "http://github.com/Seldaek/monolog", + "keywords": [ + "log", + "logging", + "psr-3" + ], + "time": "2018-11-05T09:00:11+00:00" + }, + { + "name": "mtdowling/cron-expression", + "version": "v1.2.1", + "source": { + "type": "git", + "url": "https://github.com/mtdowling/cron-expression.git", + "reference": "9504fa9ea681b586028adaaa0877db4aecf32bad" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/mtdowling/cron-expression/zipball/9504fa9ea681b586028adaaa0877db4aecf32bad", + "reference": "9504fa9ea681b586028adaaa0877db4aecf32bad", + "shasum": "" + }, + "require": { + "php": ">=5.3.2" + }, + "require-dev": { + "phpunit/phpunit": "~4.0|~5.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Cron\\": "src/Cron/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + } + ], + "description": "CRON for PHP: Calculate the next or previous run date and determine if a CRON expression is due", + "keywords": [ + "cron", + "schedule" + ], + "abandoned": "dragonmantank/cron-expression", + "time": "2017-01-23T04:29:33+00:00" + }, + { + "name": "namshi/jose", + "version": "7.2.3", + "source": { + "type": "git", + "url": "https://github.com/namshi/jose.git", + "reference": "89a24d7eb3040e285dd5925fcad992378b82bcff" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/namshi/jose/zipball/89a24d7eb3040e285dd5925fcad992378b82bcff", + "reference": "89a24d7eb3040e285dd5925fcad992378b82bcff", + "shasum": "" + }, + "require": { + "ext-date": "*", + "ext-hash": "*", + "ext-json": "*", + "ext-pcre": "*", + "ext-spl": "*", + "php": ">=5.5", + "symfony/polyfill-php56": "^1.0" + }, + "require-dev": { + "phpseclib/phpseclib": "^2.0", + "phpunit/phpunit": "^4.5|^5.0", + "satooshi/php-coveralls": "^1.0" + }, + "suggest": { + "ext-openssl": "Allows to use OpenSSL as crypto engine.", + "phpseclib/phpseclib": "Allows to use Phpseclib as crypto engine, use version ^2.0." + }, + "type": "library", + "autoload": { + "psr-4": { + "Namshi\\JOSE\\": "src/Namshi/JOSE/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Alessandro Nadalin", + "email": "alessandro.nadalin@gmail.com" + }, + { + "name": "Alessandro Cinelli (cirpo)", + "email": "alessandro.cinelli@gmail.com" + } + ], + "description": "JSON Object Signing and Encryption library for PHP.", + "keywords": [ + "JSON Web Signature", + "JSON Web Token", + "JWS", + "json", + "jwt", + "token" + ], + "time": "2016-12-05T07:27:31+00:00" + }, + { + "name": "nesbot/carbon", + "version": "1.36.1", + "source": { + "type": "git", + "url": "https://github.com/briannesbitt/Carbon.git", + "reference": "63da8cdf89d7a5efe43aabc794365f6e7b7b8983" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/63da8cdf89d7a5efe43aabc794365f6e7b7b8983", + "reference": "63da8cdf89d7a5efe43aabc794365f6e7b7b8983", + "shasum": "" + }, + "require": { + "php": ">=5.3.9", + "symfony/translation": "~2.6 || ~3.0 || ~4.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35 || ^5.7" + }, + "suggest": { + "friendsofphp/php-cs-fixer": "Needed for the `composer phpcs` command. Allow to automatically fix code style.", + "phpstan/phpstan": "Needed for the `composer phpstan` command. Allow to detect potential errors." + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Carbon\\Laravel\\ServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Brian Nesbitt", + "email": "brian@nesbot.com", + "homepage": "http://nesbot.com" + } + ], + "description": "A simple API extension for DateTime.", + "homepage": "http://carbon.nesbot.com", + "keywords": [ + "date", + "datetime", + "time" + ], + "time": "2018-11-22T18:23:02+00:00" + }, + { + "name": "nikic/php-parser", + "version": "v4.1.0", + "source": { + "type": "git", + "url": "https://github.com/nikic/PHP-Parser.git", + "reference": "d0230c5c77a7e3cfa69446febf340978540958c0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/d0230c5c77a7e3cfa69446febf340978540958c0", + "reference": "d0230c5c77a7e3cfa69446febf340978540958c0", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": ">=7.0" + }, + "require-dev": { + "phpunit/phpunit": "^6.5 || ^7.0" + }, + "bin": [ + "bin/php-parse" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.1-dev" + } + }, + "autoload": { + "psr-4": { + "PhpParser\\": "lib/PhpParser" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Nikita Popov" + } + ], + "description": "A PHP parser written in PHP", + "keywords": [ + "parser", + "php" + ], + "time": "2018-10-10T09:24:14+00:00" + }, + { + "name": "paragonie/random_compat", + "version": "v2.0.17", + "source": { + "type": "git", + "url": "https://github.com/paragonie/random_compat.git", + "reference": "29af24f25bab834fcbb38ad2a69fa93b867e070d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/paragonie/random_compat/zipball/29af24f25bab834fcbb38ad2a69fa93b867e070d", + "reference": "29af24f25bab834fcbb38ad2a69fa93b867e070d", + "shasum": "" + }, + "require": { + "php": ">=5.2.0" + }, + "require-dev": { + "phpunit/phpunit": "4.*|5.*" + }, + "suggest": { + "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes." + }, + "type": "library", + "autoload": { + "files": [ + "lib/random.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Paragon Initiative Enterprises", + "email": "security@paragonie.com", + "homepage": "https://paragonie.com" + } + ], + "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7", + "keywords": [ + "csprng", + "polyfill", + "pseudorandom", + "random" + ], + "time": "2018-07-04T16:31:37+00:00" + }, + { + "name": "phenx/php-font-lib", + "version": "0.5.1", + "source": { + "type": "git", + "url": "https://github.com/PhenX/php-font-lib.git", + "reference": "760148820110a1ae0936e5cc35851e25a938bc97" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PhenX/php-font-lib/zipball/760148820110a1ae0936e5cc35851e25a938bc97", + "reference": "760148820110a1ae0936e5cc35851e25a938bc97", + "shasum": "" + }, + "require-dev": { + "phpunit/phpunit": "^4.8" + }, + "type": "library", + "autoload": { + "psr-4": { + "FontLib\\": "src/FontLib" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL-3.0" + ], + "authors": [ + { + "name": "Fabien Ménager", + "email": "fabien.menager@gmail.com" + } + ], + "description": "A library to read, parse, export and make subsets of different types of font files.", + "homepage": "https://github.com/PhenX/php-font-lib", + "time": "2017-09-13T16:14:37+00:00" + }, + { + "name": "phenx/php-svg-lib", + "version": "v0.3.2", + "source": { + "type": "git", + "url": "https://github.com/PhenX/php-svg-lib.git", + "reference": "ccc46ef6340d4b8a4a68047e68d8501ea961442c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PhenX/php-svg-lib/zipball/ccc46ef6340d4b8a4a68047e68d8501ea961442c", + "reference": "ccc46ef6340d4b8a4a68047e68d8501ea961442c", + "shasum": "" + }, + "require": { + "sabberworm/php-css-parser": "8.1.*" + }, + "require-dev": { + "phpunit/phpunit": "~5.0" + }, + "type": "library", + "autoload": { + "psr-0": { + "Svg\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL-3.0" + ], + "authors": [ + { + "name": "Fabien Ménager", + "email": "fabien.menager@gmail.com" + } + ], + "description": "A library to read, parse and export to PDF SVG files.", + "homepage": "https://github.com/PhenX/php-svg-lib", + "time": "2018-06-03T10:10:03+00:00" + }, + { + "name": "phpoffice/phpexcel", + "version": "1.8.2", + "source": { + "type": "git", + "url": "https://github.com/PHPOffice/PHPExcel.git", + "reference": "1441011fb7ecdd8cc689878f54f8b58a6805f870" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHPOffice/PHPExcel/zipball/1441011fb7ecdd8cc689878f54f8b58a6805f870", + "reference": "1441011fb7ecdd8cc689878f54f8b58a6805f870", + "shasum": "" + }, + "require": { + "ext-mbstring": "*", + "ext-xml": "*", + "ext-xmlwriter": "*", + "php": "^5.2|^7.0" + }, + "require-dev": { + "squizlabs/php_codesniffer": "2.*" + }, + "type": "library", + "autoload": { + "psr-0": { + "PHPExcel": "Classes/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL-2.1" + ], + "authors": [ + { + "name": "Maarten Balliauw", + "homepage": "http://blog.maartenballiauw.be" + }, + { + "name": "Erik Tilt" + }, + { + "name": "Franck Lefevre", + "homepage": "http://rootslabs.net" + }, + { + "name": "Mark Baker", + "homepage": "http://markbakeruk.net" + } + ], + "description": "PHPExcel - OpenXML - Read, Create and Write Spreadsheet documents in PHP - Spreadsheet engine", + "homepage": "https://github.com/PHPOffice/PHPExcel", + "keywords": [ + "OpenXML", + "excel", + "php", + "spreadsheet", + "xls", + "xlsx" + ], + "abandoned": "phpoffice/phpspreadsheet", + "time": "2018-11-22T23:07:24+00:00" + }, + { + "name": "psr/http-message", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-message.git", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP messages", + "homepage": "https://github.com/php-fig/http-message", + "keywords": [ + "http", + "http-message", + "psr", + "psr-7", + "request", + "response" + ], + "time": "2016-08-06T14:39:51+00:00" + }, + { + "name": "psr/log", + "version": "1.1.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/log.git", + "reference": "6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/log/zipball/6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd", + "reference": "6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Log\\": "Psr/Log/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for logging libraries", + "homepage": "https://github.com/php-fig/log", + "keywords": [ + "log", + "psr", + "psr-3" + ], + "time": "2018-11-20T15:27:04+00:00" + }, + { + "name": "psy/psysh", + "version": "v0.9.9", + "source": { + "type": "git", + "url": "https://github.com/bobthecow/psysh.git", + "reference": "9aaf29575bb8293206bb0420c1e1c87ff2ffa94e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/bobthecow/psysh/zipball/9aaf29575bb8293206bb0420c1e1c87ff2ffa94e", + "reference": "9aaf29575bb8293206bb0420c1e1c87ff2ffa94e", + "shasum": "" + }, + "require": { + "dnoegel/php-xdg-base-dir": "0.1", + "ext-json": "*", + "ext-tokenizer": "*", + "jakub-onderka/php-console-highlighter": "0.3.*|0.4.*", + "nikic/php-parser": "~1.3|~2.0|~3.0|~4.0", + "php": ">=5.4.0", + "symfony/console": "~2.3.10|^2.4.2|~3.0|~4.0", + "symfony/var-dumper": "~2.7|~3.0|~4.0" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.2", + "hoa/console": "~2.15|~3.16", + "phpunit/phpunit": "~4.8.35|~5.0|~6.0|~7.0" + }, + "suggest": { + "ext-pcntl": "Enabling the PCNTL extension makes PsySH a lot happier :)", + "ext-pdo-sqlite": "The doc command requires SQLite to work.", + "ext-posix": "If you have PCNTL, you'll want the POSIX extension as well.", + "ext-readline": "Enables support for arrow-key history navigation, and showing and manipulating command history.", + "hoa/console": "A pure PHP readline implementation. You'll want this if your PHP install doesn't already support readline or libedit." + }, + "bin": [ + "bin/psysh" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-develop": "0.9.x-dev" + } + }, + "autoload": { + "files": [ + "src/functions.php" + ], + "psr-4": { + "Psy\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Justin Hileman", + "email": "justin@justinhileman.info", + "homepage": "http://justinhileman.com" + } + ], + "description": "An interactive shell for modern PHP.", + "homepage": "http://psysh.org", + "keywords": [ + "REPL", + "console", + "interactive", + "shell" + ], + "time": "2018-10-13T15:16:03+00:00" + }, + { + "name": "ramsey/uuid", + "version": "3.8.0", + "source": { + "type": "git", + "url": "https://github.com/ramsey/uuid.git", + "reference": "d09ea80159c1929d75b3f9c60504d613aeb4a1e3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ramsey/uuid/zipball/d09ea80159c1929d75b3f9c60504d613aeb4a1e3", + "reference": "d09ea80159c1929d75b3f9c60504d613aeb4a1e3", + "shasum": "" + }, + "require": { + "paragonie/random_compat": "^1.0|^2.0|9.99.99", + "php": "^5.4 || ^7.0", + "symfony/polyfill-ctype": "^1.8" + }, + "replace": { + "rhumsaa/uuid": "self.version" + }, + "require-dev": { + "codeception/aspect-mock": "^1.0 | ~2.0.0", + "doctrine/annotations": "~1.2.0", + "goaop/framework": "1.0.0-alpha.2 | ^1.0 | ~2.1.0", + "ircmaxell/random-lib": "^1.1", + "jakub-onderka/php-parallel-lint": "^0.9.0", + "mockery/mockery": "^0.9.9", + "moontoast/math": "^1.1", + "php-mock/php-mock-phpunit": "^0.3|^1.1", + "phpunit/phpunit": "^4.7|^5.0|^6.5", + "squizlabs/php_codesniffer": "^2.3" + }, + "suggest": { + "ext-ctype": "Provides support for PHP Ctype functions", + "ext-libsodium": "Provides the PECL libsodium extension for use with the SodiumRandomGenerator", + "ext-uuid": "Provides the PECL UUID extension for use with the PeclUuidTimeGenerator and PeclUuidRandomGenerator", + "ircmaxell/random-lib": "Provides RandomLib for use with the RandomLibAdapter", + "moontoast/math": "Provides support for converting UUID to 128-bit integer (in string form).", + "ramsey/uuid-console": "A console application for generating UUIDs with ramsey/uuid", + "ramsey/uuid-doctrine": "Allows the use of Ramsey\\Uuid\\Uuid as Doctrine field type." + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Ramsey\\Uuid\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marijn Huizendveld", + "email": "marijn.huizendveld@gmail.com" + }, + { + "name": "Thibaud Fabre", + "email": "thibaud@aztech.io" + }, + { + "name": "Ben Ramsey", + "email": "ben@benramsey.com", + "homepage": "https://benramsey.com" + } + ], + "description": "Formerly rhumsaa/uuid. A PHP 5.4+ library for generating RFC 4122 version 1, 3, 4, and 5 universally unique identifiers (UUID).", + "homepage": "https://github.com/ramsey/uuid", + "keywords": [ + "guid", + "identifier", + "uuid" + ], + "time": "2018-07-19T23:38:55+00:00" + }, + { + "name": "sabberworm/php-css-parser", + "version": "8.1.0", + "source": { + "type": "git", + "url": "https://github.com/sabberworm/PHP-CSS-Parser.git", + "reference": "850cbbcbe7fbb155387a151ea562897a67e242ef" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sabberworm/PHP-CSS-Parser/zipball/850cbbcbe7fbb155387a151ea562897a67e242ef", + "reference": "850cbbcbe7fbb155387a151ea562897a67e242ef", + "shasum": "" + }, + "require": { + "php": ">=5.3.2" + }, + "require-dev": { + "phpunit/phpunit": "*" + }, + "type": "library", + "autoload": { + "psr-0": { + "Sabberworm\\CSS": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Raphael Schweikert" + } + ], + "description": "Parser for CSS Files written in PHP", + "homepage": "http://www.sabberworm.com/blog/2010/6/10/php-css-parser", + "keywords": [ + "css", + "parser", + "stylesheet" + ], + "time": "2016-07-19T19:14:21+00:00" + }, + { + "name": "setasign/fpdf", + "version": "1.8.5", + "source": { + "type": "git", + "url": "https://github.com/Setasign/FPDF.git", + "reference": "f4104a04c9a3f95c4c26a0a0531abebcc980987a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Setasign/FPDF/zipball/f4104a04c9a3f95c4c26a0a0531abebcc980987a", + "reference": "f4104a04c9a3f95c4c26a0a0531abebcc980987a", + "shasum": "" + }, + "require": { + "ext-gd": "*", + "ext-zlib": "*" + }, + "type": "library", + "autoload": { + "classmap": [ + "fpdf.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Olivier Plathey", + "email": "oliver@fpdf.org", + "homepage": "http://fpdf.org/" + } + ], + "description": "FPDF is a PHP class which allows to generate PDF files with pure PHP. F from FPDF stands for Free: you may use it for any kind of usage and modify it to suit your needs.", + "homepage": "http://www.fpdf.org", + "keywords": [ + "fpdf", + "pdf" + ], + "time": "2022-11-18T07:02:00+00:00" + }, + { + "name": "setasign/fpdi", + "version": "v2.3.7", + "source": { + "type": "git", + "url": "https://github.com/Setasign/FPDI.git", + "reference": "bccc892d5fa1f48c43f8ba7db5ed4ba6f30c8c05" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Setasign/FPDI/zipball/bccc892d5fa1f48c43f8ba7db5ed4ba6f30c8c05", + "reference": "bccc892d5fa1f48c43f8ba7db5ed4ba6f30c8c05", + "shasum": "" + }, + "require": { + "ext-zlib": "*", + "php": "^5.6 || ^7.0 || ^8.0" + }, + "conflict": { + "setasign/tfpdf": "<1.31" + }, + "require-dev": { + "phpunit/phpunit": "~5.7", + "setasign/fpdf": "~1.8", + "setasign/tfpdf": "1.31", + "squizlabs/php_codesniffer": "^3.5", + "tecnickcom/tcpdf": "~6.2" + }, + "suggest": { + "setasign/fpdf": "FPDI will extend this class but as it is also possible to use TCPDF or tFPDF as an alternative. There's no fixed dependency configured." + }, + "type": "library", + "autoload": { + "psr-4": { + "setasign\\Fpdi\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jan Slabon", + "email": "jan.slabon@setasign.com", + "homepage": "https://www.setasign.com" + }, + { + "name": "Maximilian Kresse", + "email": "maximilian.kresse@setasign.com", + "homepage": "https://www.setasign.com" + } + ], + "description": "FPDI is a collection of PHP classes facilitating developers to read pages from existing PDF documents and use them as templates in FPDF. Because it is also possible to use FPDI with TCPDF, there are no fixed dependencies defined. Please see suggestions for packages which evaluates the dependencies automatically.", + "homepage": "https://www.setasign.com/fpdi", + "keywords": [ + "fpdf", + "fpdi", + "pdf" + ], + "time": "2023-02-09T10:38:43+00:00" + }, + { + "name": "swiftmailer/swiftmailer", + "version": "v5.4.12", + "source": { + "type": "git", + "url": "https://github.com/swiftmailer/swiftmailer.git", + "reference": "181b89f18a90f8925ef805f950d47a7190e9b950" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/181b89f18a90f8925ef805f950d47a7190e9b950", + "reference": "181b89f18a90f8925ef805f950d47a7190e9b950", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "mockery/mockery": "~0.9.1", + "symfony/phpunit-bridge": "~3.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.4-dev" + } + }, + "autoload": { + "files": [ + "lib/swift_required.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Chris Corbyn" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "Swiftmailer, free feature-rich PHP mailer", + "homepage": "https://swiftmailer.symfony.com", + "keywords": [ + "email", + "mail", + "mailer" + ], + "abandoned": "symfony/mailer", + "time": "2018-07-31T09:26:32+00:00" + }, + { + "name": "symfony/console", + "version": "v3.4.18", + "source": { + "type": "git", + "url": "https://github.com/symfony/console.git", + "reference": "1d228fb4602047d7b26a0554e0d3efd567da5803" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/console/zipball/1d228fb4602047d7b26a0554e0d3efd567da5803", + "reference": "1d228fb4602047d7b26a0554e0d3efd567da5803", + "shasum": "" + }, + "require": { + "php": "^5.5.9|>=7.0.8", + "symfony/debug": "~2.8|~3.0|~4.0", + "symfony/polyfill-mbstring": "~1.0" + }, + "conflict": { + "symfony/dependency-injection": "<3.4", + "symfony/process": "<3.3" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/config": "~3.3|~4.0", + "symfony/dependency-injection": "~3.4|~4.0", + "symfony/event-dispatcher": "~2.8|~3.0|~4.0", + "symfony/lock": "~3.4|~4.0", + "symfony/process": "~3.3|~4.0" + }, + "suggest": { + "psr/log-implementation": "For using the console logger", + "symfony/event-dispatcher": "", + "symfony/lock": "", + "symfony/process": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.4-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Console\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Console Component", + "homepage": "https://symfony.com", + "time": "2018-10-30T16:50:50+00:00" + }, + { + "name": "symfony/css-selector", + "version": "v4.1.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/css-selector.git", + "reference": "d67de79a70a27d93c92c47f37ece958bf8de4d8a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/css-selector/zipball/d67de79a70a27d93c92c47f37ece958bf8de4d8a", + "reference": "d67de79a70a27d93c92c47f37ece958bf8de4d8a", + "shasum": "" + }, + "require": { + "php": "^7.1.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.1-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\CssSelector\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jean-François Simon", + "email": "jeanfrancois.simon@sensiolabs.com" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony CssSelector Component", + "homepage": "https://symfony.com", + "time": "2018-10-02T16:36:10+00:00" + }, + { + "name": "symfony/debug", + "version": "v3.4.18", + "source": { + "type": "git", + "url": "https://github.com/symfony/debug.git", + "reference": "fe9793af008b651c5441bdeab21ede8172dab097" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/debug/zipball/fe9793af008b651c5441bdeab21ede8172dab097", + "reference": "fe9793af008b651c5441bdeab21ede8172dab097", + "shasum": "" + }, + "require": { + "php": "^5.5.9|>=7.0.8", + "psr/log": "~1.0" + }, + "conflict": { + "symfony/http-kernel": ">=2.3,<2.3.24|~2.4.0|>=2.5,<2.5.9|>=2.6,<2.6.2" + }, + "require-dev": { + "symfony/http-kernel": "~2.8|~3.0|~4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.4-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Debug\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Debug Component", + "homepage": "https://symfony.com", + "abandoned": "symfony/error-handler", + "time": "2018-10-31T09:06:03+00:00" + }, + { + "name": "symfony/event-dispatcher", + "version": "v4.1.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/event-dispatcher.git", + "reference": "552541dad078c85d9414b09c041ede488b456cd5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/552541dad078c85d9414b09c041ede488b456cd5", + "reference": "552541dad078c85d9414b09c041ede488b456cd5", + "shasum": "" + }, + "require": { + "php": "^7.1.3" + }, + "conflict": { + "symfony/dependency-injection": "<3.4" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/config": "~3.4|~4.0", + "symfony/dependency-injection": "~3.4|~4.0", + "symfony/expression-language": "~3.4|~4.0", + "symfony/stopwatch": "~3.4|~4.0" + }, + "suggest": { + "symfony/dependency-injection": "", + "symfony/http-kernel": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.1-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\EventDispatcher\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony EventDispatcher Component", + "homepage": "https://symfony.com", + "time": "2018-10-10T13:52:42+00:00" + }, + { + "name": "symfony/finder", + "version": "v3.4.18", + "source": { + "type": "git", + "url": "https://github.com/symfony/finder.git", + "reference": "54ba444dddc5bd5708a34bd095ea67c6eb54644d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/finder/zipball/54ba444dddc5bd5708a34bd095ea67c6eb54644d", + "reference": "54ba444dddc5bd5708a34bd095ea67c6eb54644d", + "shasum": "" + }, + "require": { + "php": "^5.5.9|>=7.0.8" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.4-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Finder\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Finder Component", + "homepage": "https://symfony.com", + "time": "2018-10-03T08:46:40+00:00" + }, + { + "name": "symfony/http-foundation", + "version": "v3.4.18", + "source": { + "type": "git", + "url": "https://github.com/symfony/http-foundation.git", + "reference": "5aea7a86ca3203dd7a257e765b4b9c9cfd01c6c0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/5aea7a86ca3203dd7a257e765b4b9c9cfd01c6c0", + "reference": "5aea7a86ca3203dd7a257e765b4b9c9cfd01c6c0", + "shasum": "" + }, + "require": { + "php": "^5.5.9|>=7.0.8", + "symfony/polyfill-mbstring": "~1.1", + "symfony/polyfill-php70": "~1.6" + }, + "require-dev": { + "symfony/expression-language": "~2.8|~3.0|~4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.4-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\HttpFoundation\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony HttpFoundation Component", + "homepage": "https://symfony.com", + "time": "2018-10-31T08:57:11+00:00" + }, + { + "name": "symfony/http-kernel", + "version": "v3.4.18", + "source": { + "type": "git", + "url": "https://github.com/symfony/http-kernel.git", + "reference": "4bf0be7c7fe63eff6a5eae2f21c83e77e31a56fb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/4bf0be7c7fe63eff6a5eae2f21c83e77e31a56fb", + "reference": "4bf0be7c7fe63eff6a5eae2f21c83e77e31a56fb", + "shasum": "" + }, + "require": { + "php": "^5.5.9|>=7.0.8", + "psr/log": "~1.0", + "symfony/debug": "~2.8|~3.0|~4.0", + "symfony/event-dispatcher": "~2.8|~3.0|~4.0", + "symfony/http-foundation": "~3.4.12|~4.0.12|^4.1.1", + "symfony/polyfill-ctype": "~1.8" + }, + "conflict": { + "symfony/config": "<2.8", + "symfony/dependency-injection": "<3.4.10|<4.0.10,>=4", + "symfony/var-dumper": "<3.3", + "twig/twig": "<1.34|<2.4,>=2" + }, + "provide": { + "psr/log-implementation": "1.0" + }, + "require-dev": { + "psr/cache": "~1.0", + "symfony/browser-kit": "~2.8|~3.0|~4.0", + "symfony/class-loader": "~2.8|~3.0", + "symfony/config": "~2.8|~3.0|~4.0", + "symfony/console": "~2.8|~3.0|~4.0", + "symfony/css-selector": "~2.8|~3.0|~4.0", + "symfony/dependency-injection": "^3.4.10|^4.0.10", + "symfony/dom-crawler": "~2.8|~3.0|~4.0", + "symfony/expression-language": "~2.8|~3.0|~4.0", + "symfony/finder": "~2.8|~3.0|~4.0", + "symfony/process": "~2.8|~3.0|~4.0", + "symfony/routing": "~3.4|~4.0", + "symfony/stopwatch": "~2.8|~3.0|~4.0", + "symfony/templating": "~2.8|~3.0|~4.0", + "symfony/translation": "~2.8|~3.0|~4.0", + "symfony/var-dumper": "~3.3|~4.0" + }, + "suggest": { + "symfony/browser-kit": "", + "symfony/config": "", + "symfony/console": "", + "symfony/dependency-injection": "", + "symfony/finder": "", + "symfony/var-dumper": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.4-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\HttpKernel\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony HttpKernel Component", + "homepage": "https://symfony.com", + "time": "2018-11-03T10:03:02+00:00" + }, + { + "name": "symfony/polyfill-ctype", + "version": "v1.10.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "e3d826245268269cd66f8326bd8bc066687b4a19" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/e3d826245268269cd66f8326bd8bc066687b4a19", + "reference": "e3d826245268269cd66f8326bd8bc066687b4a19", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "suggest": { + "ext-ctype": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.9-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Ctype\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + }, + { + "name": "Gert de Pagter", + "email": "BackEndTea@gmail.com" + } + ], + "description": "Symfony polyfill for ctype functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "ctype", + "polyfill", + "portable" + ], + "time": "2018-08-06T14:22:27+00:00" + }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.10.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "c79c051f5b3a46be09205c73b80b346e4153e494" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/c79c051f5b3a46be09205c73b80b346e4153e494", + "reference": "c79c051f5b3a46be09205c73b80b346e4153e494", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.9-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for the Mbstring extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], + "time": "2018-09-21T13:07:52+00:00" + }, + { + "name": "symfony/polyfill-php56", + "version": "v1.10.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php56.git", + "reference": "ff208829fe1aa48ab9af356992bb7199fed551af" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php56/zipball/ff208829fe1aa48ab9af356992bb7199fed551af", + "reference": "ff208829fe1aa48ab9af356992bb7199fed551af", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "symfony/polyfill-util": "~1.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.9-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Php56\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 5.6+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "time": "2018-09-21T06:26:08+00:00" + }, + { + "name": "symfony/polyfill-php70", + "version": "v1.10.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php70.git", + "reference": "6b88000cdd431cd2e940caa2cb569201f3f84224" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/6b88000cdd431cd2e940caa2cb569201f3f84224", + "reference": "6b88000cdd431cd2e940caa2cb569201f3f84224", + "shasum": "" + }, + "require": { + "paragonie/random_compat": "~1.0|~2.0|~9.99", + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.9-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Php70\\": "" + }, + "files": [ + "bootstrap.php" + ], + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 7.0+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "time": "2018-09-21T06:26:08+00:00" + }, + { + "name": "symfony/polyfill-util", + "version": "v1.10.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-util.git", + "reference": "3b58903eae668d348a7126f999b0da0f2f93611c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-util/zipball/3b58903eae668d348a7126f999b0da0f2f93611c", + "reference": "3b58903eae668d348a7126f999b0da0f2f93611c", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.9-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Util\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony utilities for portability of PHP codes", + "homepage": "https://symfony.com", + "keywords": [ + "compat", + "compatibility", + "polyfill", + "shim" + ], + "time": "2018-09-30T16:36:12+00:00" + }, + { + "name": "symfony/process", + "version": "v3.4.18", + "source": { + "type": "git", + "url": "https://github.com/symfony/process.git", + "reference": "35c2914a9f50519bd207164c353ae4d59182c2cb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/process/zipball/35c2914a9f50519bd207164c353ae4d59182c2cb", + "reference": "35c2914a9f50519bd207164c353ae4d59182c2cb", + "shasum": "" + }, + "require": { + "php": "^5.5.9|>=7.0.8" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.4-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Process\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Process Component", + "homepage": "https://symfony.com", + "time": "2018-10-14T17:33:21+00:00" + }, + { + "name": "symfony/routing", + "version": "v3.4.18", + "source": { + "type": "git", + "url": "https://github.com/symfony/routing.git", + "reference": "585f6e2d740393d546978769dd56e496a6233e0b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/routing/zipball/585f6e2d740393d546978769dd56e496a6233e0b", + "reference": "585f6e2d740393d546978769dd56e496a6233e0b", + "shasum": "" + }, + "require": { + "php": "^5.5.9|>=7.0.8" + }, + "conflict": { + "symfony/config": "<3.3.1", + "symfony/dependency-injection": "<3.3", + "symfony/yaml": "<3.4" + }, + "require-dev": { + "doctrine/annotations": "~1.0", + "psr/log": "~1.0", + "symfony/config": "^3.3.1|~4.0", + "symfony/dependency-injection": "~3.3|~4.0", + "symfony/expression-language": "~2.8|~3.0|~4.0", + "symfony/http-foundation": "~2.8|~3.0|~4.0", + "symfony/yaml": "~3.4|~4.0" + }, + "suggest": { + "doctrine/annotations": "For using the annotation loader", + "symfony/config": "For using the all-in-one router or any loader", + "symfony/dependency-injection": "For loading routes from a service", + "symfony/expression-language": "For using expression matching", + "symfony/http-foundation": "For using a Symfony Request object", + "symfony/yaml": "For using the YAML loader" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.4-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Routing\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Routing Component", + "homepage": "https://symfony.com", + "keywords": [ + "router", + "routing", + "uri", + "url" + ], + "time": "2018-10-02T12:28:39+00:00" + }, + { + "name": "symfony/translation", + "version": "v4.1.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/translation.git", + "reference": "aa04dc1c75b7d3da7bd7003104cd0cfc5dff635c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/translation/zipball/aa04dc1c75b7d3da7bd7003104cd0cfc5dff635c", + "reference": "aa04dc1c75b7d3da7bd7003104cd0cfc5dff635c", + "shasum": "" + }, + "require": { + "php": "^7.1.3", + "symfony/polyfill-mbstring": "~1.0" + }, + "conflict": { + "symfony/config": "<3.4", + "symfony/dependency-injection": "<3.4", + "symfony/yaml": "<3.4" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/config": "~3.4|~4.0", + "symfony/console": "~3.4|~4.0", + "symfony/dependency-injection": "~3.4|~4.0", + "symfony/finder": "~2.8|~3.0|~4.0", + "symfony/intl": "~3.4|~4.0", + "symfony/yaml": "~3.4|~4.0" + }, + "suggest": { + "psr/log-implementation": "To use logging capability in translator", + "symfony/config": "", + "symfony/yaml": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.1-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Translation\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Translation Component", + "homepage": "https://symfony.com", + "time": "2018-10-28T18:38:52+00:00" + }, + { + "name": "symfony/var-dumper", + "version": "v3.4.18", + "source": { + "type": "git", + "url": "https://github.com/symfony/var-dumper.git", + "reference": "ff8ac19e97e5c7c3979236b584719a1190f84181" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/ff8ac19e97e5c7c3979236b584719a1190f84181", + "reference": "ff8ac19e97e5c7c3979236b584719a1190f84181", + "shasum": "" + }, + "require": { + "php": "^5.5.9|>=7.0.8", + "symfony/polyfill-mbstring": "~1.0" + }, + "conflict": { + "phpunit/phpunit": "<4.8.35|<5.4.3,>=5.0" + }, + "require-dev": { + "ext-iconv": "*", + "twig/twig": "~1.34|~2.4" + }, + "suggest": { + "ext-iconv": "To convert non-UTF-8 strings to UTF-8 (or symfony/polyfill-iconv in case ext-iconv cannot be used).", + "ext-intl": "To show region name in time zone dump", + "ext-symfony_debug": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.4-dev" + } + }, + "autoload": { + "files": [ + "Resources/functions/dump.php" + ], + "psr-4": { + "Symfony\\Component\\VarDumper\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony mechanism for exploring and dumping PHP variables", + "homepage": "https://symfony.com", + "keywords": [ + "debug", + "dump" + ], + "time": "2018-10-02T16:33:53+00:00" + }, + { + "name": "tijsverkoyen/css-to-inline-styles", + "version": "2.2.1", + "source": { + "type": "git", + "url": "https://github.com/tijsverkoyen/CssToInlineStyles.git", + "reference": "0ed4a2ea4e0902dac0489e6436ebcd5bbcae9757" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/tijsverkoyen/CssToInlineStyles/zipball/0ed4a2ea4e0902dac0489e6436ebcd5bbcae9757", + "reference": "0ed4a2ea4e0902dac0489e6436ebcd5bbcae9757", + "shasum": "" + }, + "require": { + "php": "^5.5 || ^7.0", + "symfony/css-selector": "^2.7 || ^3.0 || ^4.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.2.x-dev" + } + }, + "autoload": { + "psr-4": { + "TijsVerkoyen\\CssToInlineStyles\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Tijs Verkoyen", + "email": "css_to_inline_styles@verkoyen.eu", + "role": "Developer" + } + ], + "description": "CssToInlineStyles is a class that enables you to convert HTML-pages/files into HTML-pages/files with inline styles. This is very useful when you're sending emails.", + "homepage": "https://github.com/tijsverkoyen/CssToInlineStyles", + "time": "2017-11-27T11:13:29+00:00" + }, + { + "name": "tymon/jwt-auth", + "version": "0.5.12", + "source": { + "type": "git", + "url": "https://github.com/tymondesigns/jwt-auth.git", + "reference": "614ee3410a1cc18ef13c8d5ffd491b5608afabd8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/tymondesigns/jwt-auth/zipball/614ee3410a1cc18ef13c8d5ffd491b5608afabd8", + "reference": "614ee3410a1cc18ef13c8d5ffd491b5608afabd8", + "shasum": "" + }, + "require": { + "illuminate/http": "~5.0", + "illuminate/support": "~5.0", + "namshi/jose": "^5.0 || ^7.0", + "nesbot/carbon": "~1.0", + "php": ">=5.4.0" + }, + "require-dev": { + "illuminate/auth": "~5.0", + "illuminate/console": "~5.0", + "illuminate/database": "~5.0", + "mockery/mockery": "0.9.*", + "phpunit/phpunit": "4.*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-develop": "0.5-dev" + } + }, + "autoload": { + "psr-4": { + "Tymon\\JWTAuth\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Sean Tymon", + "email": "tymon148@gmail.com", + "homepage": "http://tymondesigns.com", + "role": "Developer" + } + ], + "description": "JSON Web Token Authentication for Laravel 4 and 5", + "homepage": "https://github.com/tymondesigns/jwt-auth", + "keywords": [ + "Authentication", + "JSON Web Token", + "auth", + "jwt", + "laravel", + "tymon" + ], + "time": "2017-06-07T21:32:02+00:00" + }, + { + "name": "vlucas/phpdotenv", + "version": "v2.5.1", + "source": { + "type": "git", + "url": "https://github.com/vlucas/phpdotenv.git", + "reference": "8abb4f9aa89ddea9d52112c65bbe8d0125e2fa8e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/8abb4f9aa89ddea9d52112c65bbe8d0125e2fa8e", + "reference": "8abb4f9aa89ddea9d52112c65bbe8d0125e2fa8e", + "shasum": "" + }, + "require": { + "php": ">=5.3.9" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35 || ^5.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.5-dev" + } + }, + "autoload": { + "psr-4": { + "Dotenv\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Vance Lucas", + "email": "vance@vancelucas.com", + "homepage": "http://www.vancelucas.com" + } + ], + "description": "Loads environment variables from `.env` to `getenv()`, `$_ENV` and `$_SERVER` automagically.", + "keywords": [ + "dotenv", + "env", + "environment" + ], + "time": "2018-07-29T20:33:41+00:00" + } + ], + "packages-dev": [ + { + "name": "doctrine/instantiator", + "version": "1.1.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/instantiator.git", + "reference": "185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda", + "reference": "185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda", + "shasum": "" + }, + "require": { + "php": "^7.1" + }, + "require-dev": { + "athletic/athletic": "~0.1.8", + "ext-pdo": "*", + "ext-phar": "*", + "phpunit/phpunit": "^6.2.3", + "squizlabs/php_codesniffer": "^3.0.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2.x-dev" + } + }, + "autoload": { + "psr-4": { + "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com", + "homepage": "http://ocramius.github.com/" + } + ], + "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", + "homepage": "https://github.com/doctrine/instantiator", + "keywords": [ + "constructor", + "instantiate" + ], + "time": "2017-07-22T11:58:36+00:00" + }, + { + "name": "fzaninotto/faker", + "version": "v1.8.0", + "source": { + "type": "git", + "url": "https://github.com/fzaninotto/Faker.git", + "reference": "f72816b43e74063c8b10357394b6bba8cb1c10de" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/fzaninotto/Faker/zipball/f72816b43e74063c8b10357394b6bba8cb1c10de", + "reference": "f72816b43e74063c8b10357394b6bba8cb1c10de", + "shasum": "" + }, + "require": { + "php": "^5.3.3 || ^7.0" + }, + "require-dev": { + "ext-intl": "*", + "phpunit/phpunit": "^4.8.35 || ^5.7", + "squizlabs/php_codesniffer": "^1.5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.8-dev" + } + }, + "autoload": { + "psr-4": { + "Faker\\": "src/Faker/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "François Zaninotto" + } + ], + "description": "Faker is a PHP library that generates fake data for you.", + "keywords": [ + "data", + "faker", + "fixtures" + ], + "abandoned": true, + "time": "2018-07-12T10:23:15+00:00" + }, + { + "name": "hamcrest/hamcrest-php", + "version": "v1.2.2", + "source": { + "type": "git", + "url": "https://github.com/hamcrest/hamcrest-php.git", + "reference": "b37020aa976fa52d3de9aa904aa2522dc518f79c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/hamcrest/hamcrest-php/zipball/b37020aa976fa52d3de9aa904aa2522dc518f79c", + "reference": "b37020aa976fa52d3de9aa904aa2522dc518f79c", + "shasum": "" + }, + "require": { + "php": ">=5.3.2" + }, + "replace": { + "cordoval/hamcrest-php": "*", + "davedevelopment/hamcrest-php": "*", + "kodova/hamcrest-php": "*" + }, + "require-dev": { + "phpunit/php-file-iterator": "1.3.3", + "satooshi/php-coveralls": "dev-master" + }, + "type": "library", + "autoload": { + "classmap": [ + "hamcrest" + ], + "files": [ + "hamcrest/Hamcrest.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD" + ], + "description": "This is the PHP port of Hamcrest Matchers", + "keywords": [ + "test" + ], + "time": "2015-05-11T14:41:42+00:00" + }, + { + "name": "mockery/mockery", + "version": "0.9.10", + "source": { + "type": "git", + "url": "https://github.com/mockery/mockery.git", + "reference": "4876fc0c7d9e5da49712554a35c94d84ed1e9ee5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/mockery/mockery/zipball/4876fc0c7d9e5da49712554a35c94d84ed1e9ee5", + "reference": "4876fc0c7d9e5da49712554a35c94d84ed1e9ee5", + "shasum": "" + }, + "require": { + "hamcrest/hamcrest-php": "~1.1", + "lib-pcre": ">=7.0", + "php": ">=5.3.2" + }, + "require-dev": { + "phpunit/phpunit": "~4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "0.9.x-dev" + } + }, + "autoload": { + "psr-0": { + "Mockery": "library/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Pádraic Brady", + "email": "padraic.brady@gmail.com", + "homepage": "http://blog.astrumfutura.com" + }, + { + "name": "Dave Marshall", + "email": "dave.marshall@atstsolutions.co.uk", + "homepage": "http://davedevelopment.co.uk" + } + ], + "description": "Mockery is a simple yet flexible PHP mock object framework for use in unit testing with PHPUnit, PHPSpec or any other testing framework. Its core goal is to offer a test double framework with a succinct API capable of clearly defining all possible object operations and interactions using a human readable Domain Specific Language (DSL). Designed as a drop in alternative to PHPUnit's phpunit-mock-objects library, Mockery is easy to integrate with PHPUnit and can operate alongside phpunit-mock-objects without the World ending.", + "homepage": "http://github.com/padraic/mockery", + "keywords": [ + "BDD", + "TDD", + "library", + "mock", + "mock objects", + "mockery", + "stub", + "test", + "test double", + "testing" + ], + "time": "2018-11-13T20:50:16+00:00" + }, + { + "name": "myclabs/deep-copy", + "version": "1.8.1", + "source": { + "type": "git", + "url": "https://github.com/myclabs/DeepCopy.git", + "reference": "3e01bdad3e18354c3dce54466b7fbe33a9f9f7f8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/3e01bdad3e18354c3dce54466b7fbe33a9f9f7f8", + "reference": "3e01bdad3e18354c3dce54466b7fbe33a9f9f7f8", + "shasum": "" + }, + "require": { + "php": "^7.1" + }, + "replace": { + "myclabs/deep-copy": "self.version" + }, + "require-dev": { + "doctrine/collections": "^1.0", + "doctrine/common": "^2.6", + "phpunit/phpunit": "^7.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "DeepCopy\\": "src/DeepCopy/" + }, + "files": [ + "src/DeepCopy/deep_copy.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Create deep copies (clones) of your objects", + "keywords": [ + "clone", + "copy", + "duplicate", + "object", + "object graph" + ], + "time": "2018-06-11T23:09:50+00:00" + }, + { + "name": "phpdocumentor/reflection-common", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionCommon.git", + "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6", + "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6", + "shasum": "" + }, + "require": { + "php": ">=5.5" + }, + "require-dev": { + "phpunit/phpunit": "^4.6" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": [ + "src" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jaap van Otterdijk", + "email": "opensource@ijaap.nl" + } + ], + "description": "Common reflection classes used by phpdocumentor to reflect the code structure", + "homepage": "http://www.phpdoc.org", + "keywords": [ + "FQSEN", + "phpDocumentor", + "phpdoc", + "reflection", + "static analysis" + ], + "time": "2017-09-11T18:02:19+00:00" + }, + { + "name": "phpdocumentor/reflection-docblock", + "version": "4.3.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", + "reference": "94fd0001232e47129dd3504189fa1c7225010d08" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/94fd0001232e47129dd3504189fa1c7225010d08", + "reference": "94fd0001232e47129dd3504189fa1c7225010d08", + "shasum": "" + }, + "require": { + "php": "^7.0", + "phpdocumentor/reflection-common": "^1.0.0", + "phpdocumentor/type-resolver": "^0.4.0", + "webmozart/assert": "^1.0" + }, + "require-dev": { + "doctrine/instantiator": "~1.0.5", + "mockery/mockery": "^1.0", + "phpunit/phpunit": "^6.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": [ + "src/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + } + ], + "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", + "time": "2017-11-30T07:14:17+00:00" + }, + { + "name": "phpdocumentor/type-resolver", + "version": "0.4.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/TypeResolver.git", + "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/9c977708995954784726e25d0cd1dddf4e65b0f7", + "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7", + "shasum": "" + }, + "require": { + "php": "^5.5 || ^7.0", + "phpdocumentor/reflection-common": "^1.0" + }, + "require-dev": { + "mockery/mockery": "^0.9.4", + "phpunit/phpunit": "^5.2||^4.8.24" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": [ + "src/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + } + ], + "time": "2017-07-14T14:27:02+00:00" + }, + { + "name": "phpspec/prophecy", + "version": "1.8.0", + "source": { + "type": "git", + "url": "https://github.com/phpspec/prophecy.git", + "reference": "4ba436b55987b4bf311cb7c6ba82aa528aac0a06" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/4ba436b55987b4bf311cb7c6ba82aa528aac0a06", + "reference": "4ba436b55987b4bf311cb7c6ba82aa528aac0a06", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.0.2", + "php": "^5.3|^7.0", + "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0", + "sebastian/comparator": "^1.1|^2.0|^3.0", + "sebastian/recursion-context": "^1.0|^2.0|^3.0" + }, + "require-dev": { + "phpspec/phpspec": "^2.5|^3.2", + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5 || ^7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.8.x-dev" + } + }, + "autoload": { + "psr-0": { + "Prophecy\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Konstantin Kudryashov", + "email": "ever.zet@gmail.com", + "homepage": "http://everzet.com" + }, + { + "name": "Marcello Duarte", + "email": "marcello.duarte@gmail.com" + } + ], + "description": "Highly opinionated mocking framework for PHP 5.3+", + "homepage": "https://github.com/phpspec/prophecy", + "keywords": [ + "Double", + "Dummy", + "fake", + "mock", + "spy", + "stub" + ], + "time": "2018-08-05T17:53:17+00:00" + }, + { + "name": "phpunit/php-code-coverage", + "version": "4.0.8", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-code-coverage.git", + "reference": "ef7b2f56815df854e66ceaee8ebe9393ae36a40d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/ef7b2f56815df854e66ceaee8ebe9393ae36a40d", + "reference": "ef7b2f56815df854e66ceaee8ebe9393ae36a40d", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-xmlwriter": "*", + "php": "^5.6 || ^7.0", + "phpunit/php-file-iterator": "^1.3", + "phpunit/php-text-template": "^1.2", + "phpunit/php-token-stream": "^1.4.2 || ^2.0", + "sebastian/code-unit-reverse-lookup": "^1.0", + "sebastian/environment": "^1.3.2 || ^2.0", + "sebastian/version": "^1.0 || ^2.0" + }, + "require-dev": { + "ext-xdebug": "^2.1.4", + "phpunit/phpunit": "^5.7" + }, + "suggest": { + "ext-xdebug": "^2.5.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", + "homepage": "https://github.com/sebastianbergmann/php-code-coverage", + "keywords": [ + "coverage", + "testing", + "xunit" + ], + "time": "2017-04-02T07:44:40+00:00" + }, + { + "name": "phpunit/php-file-iterator", + "version": "1.4.5", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-file-iterator.git", + "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/730b01bc3e867237eaac355e06a36b85dd93a8b4", + "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "FilterIterator implementation that filters files based on a list of suffixes.", + "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", + "keywords": [ + "filesystem", + "iterator" + ], + "time": "2017-11-27T13:52:08+00:00" + }, + { + "name": "phpunit/php-text-template", + "version": "1.2.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-text-template.git", + "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686", + "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Simple template engine.", + "homepage": "https://github.com/sebastianbergmann/php-text-template/", + "keywords": [ + "template" + ], + "time": "2015-06-21T13:50:34+00:00" + }, + { + "name": "phpunit/php-timer", + "version": "1.0.9", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-timer.git", + "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3dcf38ca72b158baf0bc245e9184d3fdffa9c46f", + "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f", + "shasum": "" + }, + "require": { + "php": "^5.3.3 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Utility class for timing", + "homepage": "https://github.com/sebastianbergmann/php-timer/", + "keywords": [ + "timer" + ], + "time": "2017-02-26T11:10:40+00:00" + }, + { + "name": "phpunit/php-token-stream", + "version": "2.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-token-stream.git", + "reference": "791198a2c6254db10131eecfe8c06670700904db" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/791198a2c6254db10131eecfe8c06670700904db", + "reference": "791198a2c6254db10131eecfe8c06670700904db", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": "^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^6.2.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Wrapper around PHP's tokenizer extension.", + "homepage": "https://github.com/sebastianbergmann/php-token-stream/", + "keywords": [ + "tokenizer" + ], + "abandoned": true, + "time": "2017-11-27T05:48:46+00:00" + }, + { + "name": "phpunit/phpunit", + "version": "5.7.27", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit.git", + "reference": "b7803aeca3ccb99ad0a506fa80b64cd6a56bbc0c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/b7803aeca3ccb99ad0a506fa80b64cd6a56bbc0c", + "reference": "b7803aeca3ccb99ad0a506fa80b64cd6a56bbc0c", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-json": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-xml": "*", + "myclabs/deep-copy": "~1.3", + "php": "^5.6 || ^7.0", + "phpspec/prophecy": "^1.6.2", + "phpunit/php-code-coverage": "^4.0.4", + "phpunit/php-file-iterator": "~1.4", + "phpunit/php-text-template": "~1.2", + "phpunit/php-timer": "^1.0.6", + "phpunit/phpunit-mock-objects": "^3.2", + "sebastian/comparator": "^1.2.4", + "sebastian/diff": "^1.4.3", + "sebastian/environment": "^1.3.4 || ^2.0", + "sebastian/exporter": "~2.0", + "sebastian/global-state": "^1.1", + "sebastian/object-enumerator": "~2.0", + "sebastian/resource-operations": "~1.0", + "sebastian/version": "^1.0.6|^2.0.1", + "symfony/yaml": "~2.1|~3.0|~4.0" + }, + "conflict": { + "phpdocumentor/reflection-docblock": "3.0.2" + }, + "require-dev": { + "ext-pdo": "*" + }, + "suggest": { + "ext-xdebug": "*", + "phpunit/php-invoker": "~1.1" + }, + "bin": [ + "phpunit" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.7.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "The PHP Unit Testing framework.", + "homepage": "https://phpunit.de/", + "keywords": [ + "phpunit", + "testing", + "xunit" + ], + "time": "2018-02-01T05:50:59+00:00" + }, + { + "name": "phpunit/phpunit-mock-objects", + "version": "3.4.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", + "reference": "a23b761686d50a560cc56233b9ecf49597cc9118" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/a23b761686d50a560cc56233b9ecf49597cc9118", + "reference": "a23b761686d50a560cc56233b9ecf49597cc9118", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.0.2", + "php": "^5.6 || ^7.0", + "phpunit/php-text-template": "^1.2", + "sebastian/exporter": "^1.2 || ^2.0" + }, + "conflict": { + "phpunit/phpunit": "<5.4.0" + }, + "require-dev": { + "phpunit/phpunit": "^5.4" + }, + "suggest": { + "ext-soap": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.2.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Mock Object library for PHPUnit", + "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/", + "keywords": [ + "mock", + "xunit" + ], + "abandoned": true, + "time": "2017-06-30T09:13:00+00:00" + }, + { + "name": "sebastian/code-unit-reverse-lookup", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", + "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", + "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", + "shasum": "" + }, + "require": { + "php": "^5.6 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^5.7 || ^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Looks up which function or method a line of code belongs to", + "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", + "time": "2017-03-04T06:30:41+00:00" + }, + { + "name": "sebastian/comparator", + "version": "1.2.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/comparator.git", + "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/2b7424b55f5047b47ac6e5ccb20b2aea4011d9be", + "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "sebastian/diff": "~1.2", + "sebastian/exporter": "~1.2 || ~2.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides the functionality to compare PHP values for equality", + "homepage": "http://www.github.com/sebastianbergmann/comparator", + "keywords": [ + "comparator", + "compare", + "equality" + ], + "time": "2017-01-29T09:50:25+00:00" + }, + { + "name": "sebastian/diff", + "version": "1.4.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/diff.git", + "reference": "7f066a26a962dbe58ddea9f72a4e82874a3975a4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/7f066a26a962dbe58ddea9f72a4e82874a3975a4", + "reference": "7f066a26a962dbe58ddea9f72a4e82874a3975a4", + "shasum": "" + }, + "require": { + "php": "^5.3.3 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Diff implementation", + "homepage": "https://github.com/sebastianbergmann/diff", + "keywords": [ + "diff" + ], + "time": "2017-05-22T07:24:03+00:00" + }, + { + "name": "sebastian/environment", + "version": "2.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/environment.git", + "reference": "5795ffe5dc5b02460c3e34222fee8cbe245d8fac" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/5795ffe5dc5b02460c3e34222fee8cbe245d8fac", + "reference": "5795ffe5dc5b02460c3e34222fee8cbe245d8fac", + "shasum": "" + }, + "require": { + "php": "^5.6 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^5.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides functionality to handle HHVM/PHP environments", + "homepage": "http://www.github.com/sebastianbergmann/environment", + "keywords": [ + "Xdebug", + "environment", + "hhvm" + ], + "time": "2016-11-26T07:53:53+00:00" + }, + { + "name": "sebastian/exporter", + "version": "2.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/exporter.git", + "reference": "ce474bdd1a34744d7ac5d6aad3a46d48d9bac4c4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/ce474bdd1a34744d7ac5d6aad3a46d48d9bac4c4", + "reference": "ce474bdd1a34744d7ac5d6aad3a46d48d9bac4c4", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "sebastian/recursion-context": "~2.0" + }, + "require-dev": { + "ext-mbstring": "*", + "phpunit/phpunit": "~4.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + } + ], + "description": "Provides the functionality to export PHP variables for visualization", + "homepage": "http://www.github.com/sebastianbergmann/exporter", + "keywords": [ + "export", + "exporter" + ], + "time": "2016-11-19T08:54:04+00:00" + }, + { + "name": "sebastian/global-state", + "version": "1.1.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/global-state.git", + "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bc37d50fea7d017d3d340f230811c9f1d7280af4", + "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.2" + }, + "suggest": { + "ext-uopz": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Snapshotting of global state", + "homepage": "http://www.github.com/sebastianbergmann/global-state", + "keywords": [ + "global state" + ], + "time": "2015-10-12T03:26:01+00:00" + }, + { + "name": "sebastian/object-enumerator", + "version": "2.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-enumerator.git", + "reference": "1311872ac850040a79c3c058bea3e22d0f09cbb7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/1311872ac850040a79c3c058bea3e22d0f09cbb7", + "reference": "1311872ac850040a79c3c058bea3e22d0f09cbb7", + "shasum": "" + }, + "require": { + "php": ">=5.6", + "sebastian/recursion-context": "~2.0" + }, + "require-dev": { + "phpunit/phpunit": "~5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Traverses array structures and object graphs to enumerate all referenced objects", + "homepage": "https://github.com/sebastianbergmann/object-enumerator/", + "time": "2017-02-18T15:18:39+00:00" + }, + { + "name": "sebastian/recursion-context", + "version": "2.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/recursion-context.git", + "reference": "2c3ba150cbec723aa057506e73a8d33bdb286c9a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/2c3ba150cbec723aa057506e73a8d33bdb286c9a", + "reference": "2c3ba150cbec723aa057506e73a8d33bdb286c9a", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + } + ], + "description": "Provides functionality to recursively process PHP variables", + "homepage": "http://www.github.com/sebastianbergmann/recursion-context", + "time": "2016-11-19T07:33:16+00:00" + }, + { + "name": "sebastian/resource-operations", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/resource-operations.git", + "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/ce990bb21759f94aeafd30209e8cfcdfa8bc3f52", + "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52", + "shasum": "" + }, + "require": { + "php": ">=5.6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides a list of PHP built-in functions that operate on resources", + "homepage": "https://www.github.com/sebastianbergmann/resource-operations", + "time": "2015-07-28T20:34:47+00:00" + }, + { + "name": "sebastian/version", + "version": "2.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/version.git", + "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/99732be0ddb3361e16ad77b68ba41efc8e979019", + "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019", + "shasum": "" + }, + "require": { + "php": ">=5.6" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that helps with managing the version number of Git-hosted PHP projects", + "homepage": "https://github.com/sebastianbergmann/version", + "time": "2016-10-03T07:35:21+00:00" + }, + { + "name": "symfony/yaml", + "version": "v4.1.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/yaml.git", + "reference": "367e689b2fdc19965be435337b50bc8adf2746c9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/yaml/zipball/367e689b2fdc19965be435337b50bc8adf2746c9", + "reference": "367e689b2fdc19965be435337b50bc8adf2746c9", + "shasum": "" + }, + "require": { + "php": "^7.1.3", + "symfony/polyfill-ctype": "~1.8" + }, + "conflict": { + "symfony/console": "<3.4" + }, + "require-dev": { + "symfony/console": "~3.4|~4.0" + }, + "suggest": { + "symfony/console": "For validating YAML files using the lint command" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.1-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Yaml\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Yaml Component", + "homepage": "https://symfony.com", + "time": "2018-10-02T16:36:10+00:00" + }, + { + "name": "webmozart/assert", + "version": "1.3.0", + "source": { + "type": "git", + "url": "https://github.com/webmozarts/assert.git", + "reference": "0df1908962e7a3071564e857d86874dad1ef204a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/webmozarts/assert/zipball/0df1908962e7a3071564e857d86874dad1ef204a", + "reference": "0df1908962e7a3071564e857d86874dad1ef204a", + "shasum": "" + }, + "require": { + "php": "^5.3.3 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.6", + "sebastian/version": "^1.0.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3-dev" + } + }, + "autoload": { + "psr-4": { + "Webmozart\\Assert\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Assertions to validate method input/output with nice error messages.", + "keywords": [ + "assert", + "check", + "validate" + ], + "time": "2018-01-29T19:49:41+00:00" + } + ], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": [], + "prefer-stable": false, + "prefer-lowest": false, + "platform": { + "php": ">=5.6.4" + }, + "platform-dev": [] +} \ No newline at end of file diff --git a/config/ambiente.php b/config/ambiente.php new file mode 100644 index 0000000..f42e50b --- /dev/null +++ b/config/ambiente.php @@ -0,0 +1,8 @@ + env('AMBIENTE', 'DEV'), + 'dev' => env('DEV', 'http://localhost/drenax/frontend/admin/form_solicitud_servicios.php'), + 'lab' => env('LAB', 'https://10.112.32.245/drenax/sistema/admin/form_solicitud_servicios.php'), + 'prod' => env('PROD', 'DEV'), +]; \ No newline at end of file diff --git a/config/app.php b/config/app.php new file mode 100644 index 0000000..7c60f1d --- /dev/null +++ b/config/app.php @@ -0,0 +1,241 @@ + env('APP_NAME', 'DRENAX'), + + /* + |-------------------------------------------------------------------------- + | Application Environment + |-------------------------------------------------------------------------- + | + | This value determines the "environment" your application is currently + | running in. This may determine how you prefer to configure various + | services your application utilizes. Set this in your ".env" file. + | + */ + + 'env' => env('APP_ENV', 'production'), + + /* + |-------------------------------------------------------------------------- + | Application Debug Mode + |-------------------------------------------------------------------------- + | + | When your application is in debug mode, detailed error messages with + | stack traces will be shown on every error that occurs within your + | application. If disabled, a simple generic error page is shown. + | + */ + + 'debug' => env('APP_DEBUG', false), + + /* + |-------------------------------------------------------------------------- + | Application URL + |-------------------------------------------------------------------------- + | + | This URL is used by the console to properly generate URLs when using + | the Artisan command line tool. You should set this to the root of + | your application so that it is used when running Artisan tasks. + | + */ + + 'url' => env('APP_URL', 'http://localhost'), + + /* + |-------------------------------------------------------------------------- + | Application Timezone + |-------------------------------------------------------------------------- + | + | Here you may specify the default timezone for your application, which + | will be used by the PHP date and date-time functions. We have gone + | ahead and set this to a sensible default for you out of the box. + | + */ + + 'timezone' => 'America/Mazatlan', + + /* + |-------------------------------------------------------------------------- + | Application Locale Configuration + |-------------------------------------------------------------------------- + | + | The application locale determines the default locale that will be used + | by the translation service provider. You are free to set this value + | to any of the locales which will be supported by the application. + | + */ + + 'locale' => 'es', + + /* + |-------------------------------------------------------------------------- + | Application Fallback Locale + |-------------------------------------------------------------------------- + | + | The fallback locale determines the locale to use when the current one + | is not available. You may change the value to correspond to any of + | the language folders that are provided through your application. + | + */ + + 'fallback_locale' => 'es', + + /* + |-------------------------------------------------------------------------- + | Encryption Key + |-------------------------------------------------------------------------- + | + | This key is used by the Illuminate encrypter service and should be set + | to a random, 32 character string, otherwise these encrypted strings + | will not be safe. Please do this before deploying an application! + | + */ + + 'key' => env('APP_KEY'), + + 'cipher' => 'AES-256-CBC', + + /* + |-------------------------------------------------------------------------- + | Logging Configuration + |-------------------------------------------------------------------------- + | + | Here you may configure the log settings for your application. Out of + | the box, Laravel uses the Monolog PHP logging library. This gives + | you a variety of powerful log handlers / formatters to utilize. + | + | Available Settings: "single", "daily", "syslog", "errorlog" + | + */ + + 'log' => env('APP_LOG', 'single'), + + 'log_level' => env('APP_LOG_LEVEL', 'debug'), + + /* + |-------------------------------------------------------------------------- + | Autoloaded Service Providers + |-------------------------------------------------------------------------- + | + | The service providers listed here will be automatically loaded on the + | request to your application. Feel free to add your own services to + | this array to grant expanded functionality to your applications. + | + */ + + 'providers' => [ + + /* + * Laravel Framework Service Providers... + */ + Illuminate\Auth\AuthServiceProvider::class, + Illuminate\Broadcasting\BroadcastServiceProvider::class, + Illuminate\Bus\BusServiceProvider::class, + Illuminate\Cache\CacheServiceProvider::class, + Illuminate\Foundation\Providers\ConsoleSupportServiceProvider::class, + Illuminate\Cookie\CookieServiceProvider::class, + Illuminate\Database\DatabaseServiceProvider::class, + Illuminate\Encryption\EncryptionServiceProvider::class, + Illuminate\Filesystem\FilesystemServiceProvider::class, + Illuminate\Foundation\Providers\FoundationServiceProvider::class, + Illuminate\Hashing\HashServiceProvider::class, + Illuminate\Mail\MailServiceProvider::class, + Illuminate\Notifications\NotificationServiceProvider::class, + Illuminate\Pagination\PaginationServiceProvider::class, + Illuminate\Pipeline\PipelineServiceProvider::class, + Illuminate\Queue\QueueServiceProvider::class, + Illuminate\Redis\RedisServiceProvider::class, + Illuminate\Auth\Passwords\PasswordResetServiceProvider::class, + Illuminate\Session\SessionServiceProvider::class, + Illuminate\Translation\TranslationServiceProvider::class, + Illuminate\Validation\ValidationServiceProvider::class, + Illuminate\View\ViewServiceProvider::class, + Tymon\JWTAuth\Providers\JWTAuthServiceProvider::class, + Maatwebsite\Excel\ExcelServiceProvider::class, + Barryvdh\DomPDF\ServiceProvider::class, + + /* + * Package Service Providers... + */ + Laravel\Tinker\TinkerServiceProvider::class, + + /* + * Application Service Providers... + */ + App\Providers\AppServiceProvider::class, + App\Providers\AuthServiceProvider::class, + // App\Providers\BroadcastServiceProvider::class, + App\Providers\EventServiceProvider::class, + App\Providers\RouteServiceProvider::class, + App\Providers\ResponseProvider::class, + Barryvdh\Cors\ServiceProvider::class, + Cartalyst\Sentinel\Laravel\SentinelServiceProvider::class, + \App\Providers\FilesystemProvider::class, + ], + + /* + |-------------------------------------------------------------------------- + | Class Aliases + |-------------------------------------------------------------------------- + | + | This array of class aliases will be registered when this application + | is started. However, feel free to register as many as you wish as + | the aliases are "lazy" loaded so they don't hinder performance. + | + */ + + 'aliases' => [ + + 'App' => Illuminate\Support\Facades\App::class, + 'Artisan' => Illuminate\Support\Facades\Artisan::class, + 'Auth' => Illuminate\Support\Facades\Auth::class, + 'Blade' => Illuminate\Support\Facades\Blade::class, + 'Broadcast' => Illuminate\Support\Facades\Broadcast::class, + 'Bus' => Illuminate\Support\Facades\Bus::class, + 'Cache' => Illuminate\Support\Facades\Cache::class, + 'Config' => Illuminate\Support\Facades\Config::class, + 'Cookie' => Illuminate\Support\Facades\Cookie::class, + 'Crypt' => Illuminate\Support\Facades\Crypt::class, + 'DB' => Illuminate\Support\Facades\DB::class, + 'Eloquent' => Illuminate\Database\Eloquent\Model::class, + 'Event' => Illuminate\Support\Facades\Event::class, + 'File' => Illuminate\Support\Facades\File::class, + 'Gate' => Illuminate\Support\Facades\Gate::class, + 'Hash' => Illuminate\Support\Facades\Hash::class, + 'Lang' => Illuminate\Support\Facades\Lang::class, + 'Log' => Illuminate\Support\Facades\Log::class, + 'Mail' => Illuminate\Support\Facades\Mail::class, + 'Notification' => Illuminate\Support\Facades\Notification::class, + 'Password' => Illuminate\Support\Facades\Password::class, + 'Queue' => Illuminate\Support\Facades\Queue::class, + 'Redirect' => Illuminate\Support\Facades\Redirect::class, + 'Redis' => Illuminate\Support\Facades\Redis::class, + 'Request' => Illuminate\Support\Facades\Request::class, + 'Response' => Illuminate\Support\Facades\Response::class, + 'Route' => Illuminate\Support\Facades\Route::class, + 'Schema' => Illuminate\Support\Facades\Schema::class, + 'Session' => Illuminate\Support\Facades\Session::class, + 'Storage' => Illuminate\Support\Facades\Storage::class, + 'URL' => Illuminate\Support\Facades\URL::class, + 'Validator' => Illuminate\Support\Facades\Validator::class, + 'View' => Illuminate\Support\Facades\View::class, + 'Activation' => Cartalyst\Sentinel\Laravel\Facades\Activation::class, + 'Reminder' => Cartalyst\Sentinel\Laravel\Facades\Reminder::class, + 'Sentinel' => Cartalyst\Sentinel\Laravel\Facades\Sentinel::class, + 'Excel' => Maatwebsite\Excel\Facades\Excel::class, + 'PDF' => Barryvdh\DomPDF\Facade::class, + ], + +]; diff --git a/config/auth.php b/config/auth.php new file mode 100644 index 0000000..087bbb3 --- /dev/null +++ b/config/auth.php @@ -0,0 +1,102 @@ + [ + 'guard' => 'web', + 'passwords' => 'users', + ], + + /* + |-------------------------------------------------------------------------- + | Authentication Guards + |-------------------------------------------------------------------------- + | + | Next, you may define every authentication guard for your application. + | Of course, a great default configuration has been defined for you + | here which uses session storage and the Eloquent user provider. + | + | All authentication drivers have a user provider. This defines how the + | users are actually retrieved out of your database or other storage + | mechanisms used by this application to persist your user's data. + | + | Supported: "session", "token" + | + */ + + 'guards' => [ + 'web' => [ + 'driver' => 'session', + 'provider' => 'users', + ], + + 'api' => [ + 'driver' => 'token', + 'provider' => 'users', + ], + ], + + /* + |-------------------------------------------------------------------------- + | User Providers + |-------------------------------------------------------------------------- + | + | All authentication drivers have a user provider. This defines how the + | users are actually retrieved out of your database or other storage + | mechanisms used by this application to persist your user's data. + | + | If you have multiple user tables or models you may configure multiple + | sources which represent each model / table. These sources may then + | be assigned to any extra authentication guards you have defined. + | + | Supported: "database", "eloquent" + | + */ + + 'providers' => [ + 'users' => [ + 'driver' => 'eloquent', + 'model' => App\Models\User::class, + ], + + // 'users' => [ + // 'driver' => 'database', + // 'table' => 'users', + // ], + ], + + /* + |-------------------------------------------------------------------------- + | Resetting Passwords + |-------------------------------------------------------------------------- + | + | You may specify multiple password reset configurations if you have more + | than one user table or model in the application and you want to have + | separate password reset settings based on the specific user types. + | + | The expire time is the number of minutes that the reset token should be + | considered valid. This security feature keeps tokens short-lived so + | they have less time to be guessed. You may change this as needed. + | + */ + + 'passwords' => [ + 'users' => [ + 'provider' => 'users', + 'table' => 'password_resets', + 'expire' => 60, + ], + ], + +]; diff --git a/config/broadcasting.php b/config/broadcasting.php new file mode 100644 index 0000000..5eecd2b --- /dev/null +++ b/config/broadcasting.php @@ -0,0 +1,58 @@ + env('BROADCAST_DRIVER', 'null'), + + /* + |-------------------------------------------------------------------------- + | Broadcast Connections + |-------------------------------------------------------------------------- + | + | Here you may define all of the broadcast connections that will be used + | to broadcast events to other systems or over websockets. Samples of + | each available type of connection are provided inside this array. + | + */ + + 'connections' => [ + + 'pusher' => [ + 'driver' => 'pusher', + 'key' => env('PUSHER_APP_KEY'), + 'secret' => env('PUSHER_APP_SECRET'), + 'app_id' => env('PUSHER_APP_ID'), + 'options' => [ + // + ], + ], + + 'redis' => [ + 'driver' => 'redis', + 'connection' => 'default', + ], + + 'log' => [ + 'driver' => 'log', + ], + + 'null' => [ + 'driver' => 'null', + ], + + ], + +]; diff --git a/config/cache.php b/config/cache.php new file mode 100644 index 0000000..e87f032 --- /dev/null +++ b/config/cache.php @@ -0,0 +1,91 @@ + env('CACHE_DRIVER', 'file'), + + /* + |-------------------------------------------------------------------------- + | Cache Stores + |-------------------------------------------------------------------------- + | + | Here you may define all of the cache "stores" for your application as + | well as their drivers. You may even define multiple stores for the + | same cache driver to group types of items stored in your caches. + | + */ + + 'stores' => [ + + 'apc' => [ + 'driver' => 'apc', + ], + + 'array' => [ + 'driver' => 'array', + ], + + 'database' => [ + 'driver' => 'database', + 'table' => 'cache', + 'connection' => null, + ], + + 'file' => [ + 'driver' => 'file', + 'path' => storage_path('framework/cache/data'), + ], + + 'memcached' => [ + 'driver' => 'memcached', + 'persistent_id' => env('MEMCACHED_PERSISTENT_ID'), + 'sasl' => [ + env('MEMCACHED_USERNAME'), + env('MEMCACHED_PASSWORD'), + ], + 'options' => [ + // Memcached::OPT_CONNECT_TIMEOUT => 2000, + ], + 'servers' => [ + [ + 'host' => env('MEMCACHED_HOST', '127.0.0.1'), + 'port' => env('MEMCACHED_PORT', 11211), + 'weight' => 100, + ], + ], + ], + + 'redis' => [ + 'driver' => 'redis', + 'connection' => 'default', + ], + + ], + + /* + |-------------------------------------------------------------------------- + | Cache Key Prefix + |-------------------------------------------------------------------------- + | + | When utilizing a RAM based store such as APC or Memcached, there might + | be other applications utilizing the same cache. So, we'll specify a + | value to get prefixed to all our keys so we can avoid collisions. + | + */ + + 'prefix' => 'laravel', + +]; diff --git a/config/cartalyst.sentinel.php b/config/cartalyst.sentinel.php new file mode 100644 index 0000000..296ac6f --- /dev/null +++ b/config/cartalyst.sentinel.php @@ -0,0 +1,264 @@ + 'cartalyst_sentinel', + + /* + |-------------------------------------------------------------------------- + | Cookie Key + |-------------------------------------------------------------------------- + | + | Please provide your cookie key for Sentinel. + | + */ + + 'cookie' => 'cartalyst_sentinel', + + /* + |-------------------------------------------------------------------------- + | Users + |-------------------------------------------------------------------------- + | + | Please provide the user model used in Sentinel. + | + */ + + 'users' => [ + + 'model' => 'Cartalyst\Sentinel\Users\EloquentUser', + + ], + + /* + |-------------------------------------------------------------------------- + | Roles + |-------------------------------------------------------------------------- + | + | Please provide the role model used in Sentinel. + | + */ + + 'roles' => [ + + 'model' => 'Cartalyst\Sentinel\Roles\EloquentRole', + + ], + + /* + |-------------------------------------------------------------------------- + | Permissions + |-------------------------------------------------------------------------- + | + | Here you may specify the permissions class. Sentinel ships with two + | permission types. + | + | 'Cartalyst\Sentinel\Permissions\StandardPermissions' + | 'Cartalyst\Sentinel\Permissions\StrictPermissions' + | + | "StandardPermissions" will assign a higher priority to the user + | permissions over role permissions, once a user is allowed or denied + | a specific permission, it will be used regardless of the + | permissions set on the role. + | + | "StrictPermissions" will deny any permission as soon as it finds it + | rejected on either the user or any of the assigned roles. + | + */ + + 'permissions' => [ + + 'class' => 'Cartalyst\Sentinel\Permissions\StandardPermissions', + + ], + + /* + |-------------------------------------------------------------------------- + | Persistences + |-------------------------------------------------------------------------- + | + | Here you may specify the persistences model used and weather to use the + | single persistence mode. + | + */ + + 'persistences' => [ + + 'model' => 'Cartalyst\Sentinel\Persistences\EloquentPersistence', + + 'single' => false, + + ], + + /* + |-------------------------------------------------------------------------- + | Checkpoints + |-------------------------------------------------------------------------- + | + | When logging in, checking for existing sessions and failed logins occur, + | you may configure an indefinite number of "checkpoints". These are + | classes which may respond to each event and handle accordingly. + | We ship with two, a throttling checkpoint and an activation + | checkpoint. Feel free to add, remove or re-order + | these. + | + */ + + 'checkpoints' => [ + + 'throttle', + 'activation', + + ], + + /* + |-------------------------------------------------------------------------- + | Activations + |-------------------------------------------------------------------------- + | + | Here you may specify the activations model used and the time (in seconds) + | which activation codes expire. By default, activation codes expire after + | three days. The lottery is used for garbage collection, expired + | codes will be cleared automatically based on the provided odds. + | + */ + + 'activations' => [ + + 'model' => 'Cartalyst\Sentinel\Activations\EloquentActivation', + + 'expires' => 259200, + + 'lottery' => [2, 100], + + ], + + /* + |-------------------------------------------------------------------------- + | Reminders + |-------------------------------------------------------------------------- + | + | Here you may specify the reminders model used and the time (in seconds) + | which reminder codes expire. By default, reminder codes expire + | after four hours. The lottery is used for garbage collection, expired + | codes will be cleared automatically based on the provided odds. + | + */ + + 'reminders' => [ + + 'model' => 'Cartalyst\Sentinel\Reminders\EloquentReminder', + + 'expires' => 14400, + + 'lottery' => [2, 100], + + ], + + /* + |-------------------------------------------------------------------------- + | Throttling + |-------------------------------------------------------------------------- + | + | Here, you may configure your site's throttling settings. There are three + | types of throttling. + | + | The first type is "global". Global throttling will monitor the overall + | failed login attempts across your site and can limit the effects of an + | attempted DDoS attack. + | + | The second type is "ip". This allows you to throttle the failed login + | attempts (across any account) of a given IP address. + | + | The third type is "user". This allows you to throttle the login attempts + | on an individual user account. + | + | Each type of throttling has the same options. The first is the interval. + | This is the time (in seconds) for which we check for failed logins. Any + | logins outside this time are no longer assessed when throttling. + | + | The second option is thresholds. This may be approached one of two ways. + | the first way, is by providing an key/value array. The key is the number + | of failed login attempts, and the value is the delay, in seconds, before + | the next attempt can occur. + | + | The second way is by providing an integer. If the number of failed login + | attempts outweigh the thresholds integer, that throttle is locked until + | there are no more failed login attempts within the specified interval. + | + | On this premise, we encourage you to use array thresholds for global + | throttling (and perhaps IP throttling as well), so as to not lock your + | whole site out for minutes on end because it's being DDoS'd. However, + | for user throttling, locking a single account out because somebody is + | attempting to breach it could be an appropriate response. + | + | You may use any type of throttling for any scenario, and the specific + | configurations are designed to be customized as your site grows. + | + */ + + 'throttling' => [ + + 'model' => 'Cartalyst\Sentinel\Throttling\EloquentThrottle', + + 'global' => [ + + 'interval' => 900, + + 'thresholds' => [ + 10 => 1, + 20 => 2, + 30 => 4, + 40 => 8, + 50 => 16, + 60 => 12 + ], + + ], + + 'ip' => [ + + 'interval' => 900, + + 'thresholds' => 5, + + ], + + 'user' => [ + + 'interval' => 900, + + 'thresholds' => 5, + + ], + + ], + +]; diff --git a/config/cors.php b/config/cors.php new file mode 100644 index 0000000..e9b90f8 --- /dev/null +++ b/config/cors.php @@ -0,0 +1,23 @@ + false, + 'allowedOrigins' => ['*'], + 'allowedOriginsPatterns' => [], + 'allowedHeaders' => ['*'], + 'allowedMethods' => ['*'], + 'exposedHeaders' => [], + 'maxAge' => 0, + +]; diff --git a/config/database.php b/config/database.php new file mode 100644 index 0000000..e939b89 --- /dev/null +++ b/config/database.php @@ -0,0 +1,120 @@ + env('DB_CONNECTION', 'mysql'), + + /* + |-------------------------------------------------------------------------- + | Database Connections + |-------------------------------------------------------------------------- + | + | Here are each of the database connections setup for your application. + | Of course, examples of configuring each database platform that is + | supported by Laravel is shown below to make development simple. + | + | + | All database work in Laravel is done through the PHP PDO facilities + | so make sure you have the driver for your particular database of + | choice installed on your machine before you begin development. + | + */ + + 'connections' => [ + + 'sqlite' => [ + 'driver' => 'sqlite', + 'database' => env('DB_DATABASE', database_path('database.sqlite')), + 'prefix' => '', + ], + + 'mysql' => [ + 'driver' => 'mysql', + 'host' => env('DB_HOST', '127.0.0.1'), + 'port' => env('DB_PORT', '3306'), + 'database' => env('DB_DATABASE', 'forge'), + 'username' => env('DB_USERNAME', 'forge'), + 'password' => env('DB_PASSWORD', ''), + 'unix_socket' => env('DB_SOCKET', ''), + 'charset' => 'utf8mb4', + 'collation' => 'utf8mb4_unicode_ci', + 'prefix' => '', + 'strict' => false, + 'engine' => null, + ], + + 'pgsql' => [ + 'driver' => 'pgsql', + 'host' => env('DB_HOST', '127.0.0.1'), + 'port' => env('DB_PORT', '5432'), + 'database' => env('DB_DATABASE', 'forge'), + 'username' => env('DB_USERNAME', 'forge'), + 'password' => env('DB_PASSWORD', ''), + 'charset' => 'utf8', + 'prefix' => '', + 'schema' => 'public', + 'sslmode' => 'prefer', + ], + + 'sqlsrv' => [ + 'driver' => 'sqlsrv', + 'host' => env('DB_HOST', 'localhost'), + 'port' => env('DB_PORT', '1433'), + 'database' => env('DB_DATABASE', 'forge'), + 'username' => env('DB_USERNAME', 'forge'), + 'password' => env('DB_PASSWORD', ''), + 'charset' => 'utf8', + 'prefix' => '', + ], + + ], + + /* + |-------------------------------------------------------------------------- + | Migration Repository Table + |-------------------------------------------------------------------------- + | + | This table keeps track of all the migrations that have already run for + | your application. Using this information, we can determine which of + | the migrations on disk haven't actually been run in the database. + | + */ + + 'migrations' => 'migrations', + + /* + |-------------------------------------------------------------------------- + | Redis Databases + |-------------------------------------------------------------------------- + | + | Redis is an open source, fast, and advanced key-value store that also + | provides a richer set of commands than a typical key-value systems + | such as APC or Memcached. Laravel makes it easy to dig right in. + | + */ + + 'redis' => [ + + 'client' => 'predis', + + 'default' => [ + 'host' => env('REDIS_HOST', '127.0.0.1'), + 'password' => env('REDIS_PASSWORD', null), + 'port' => env('REDIS_PORT', 6379), + 'database' => 0, + ], + + ], + +]; diff --git a/config/dompdf.php b/config/dompdf.php new file mode 100644 index 0000000..c2b0c7e --- /dev/null +++ b/config/dompdf.php @@ -0,0 +1,244 @@ + false, // Throw an Exception on warnings from dompdf + 'orientation' => 'portrait', + 'defines' => array( + /** + * The location of the DOMPDF font directory + * + * The location of the directory where DOMPDF will store fonts and font metrics + * Note: This directory must exist and be writable by the webserver process. + * *Please note the trailing slash.* + * + * Notes regarding fonts: + * Additional .afm font metrics can be added by executing load_font.php from command line. + * + * Only the original "Base 14 fonts" are present on all pdf viewers. Additional fonts must + * be embedded in the pdf file or the PDF may not display correctly. This can significantly + * increase file size unless font subsetting is enabled. Before embedding a font please + * review your rights under the font license. + * + * Any font specification in the source HTML is translated to the closest font available + * in the font directory. + * + * The pdf standard "Base 14 fonts" are: + * Courier, Courier-Bold, Courier-BoldOblique, Courier-Oblique, + * Helvetica, Helvetica-Bold, Helvetica-BoldOblique, Helvetica-Oblique, + * Times-Roman, Times-Bold, Times-BoldItalic, Times-Italic, + * Symbol, ZapfDingbats. + */ + "font_dir" => storage_path('fonts/'), // advised by dompdf (https://github.com/dompdf/dompdf/pull/782) + + /** + * The location of the DOMPDF font cache directory + * + * This directory contains the cached font metrics for the fonts used by DOMPDF. + * This directory can be the same as DOMPDF_FONT_DIR + * + * Note: This directory must exist and be writable by the webserver process. + */ + "font_cache" => storage_path('fonts/'), + + /** + * The location of a temporary directory. + * + * The directory specified must be writeable by the webserver process. + * The temporary directory is required to download remote images and when + * using the PFDLib back end. + */ + //"temp_dir" => sys_get_temp_dir(), + "temp_dir" => storage_path('app/public/temp/'), + /** + * ==== IMPORTANT ==== + * + * dompdf's "chroot": Prevents dompdf from accessing system files or other + * files on the webserver. All local files opened by dompdf must be in a + * subdirectory of this directory. DO NOT set it to '/' since this could + * allow an attacker to use dompdf to read any files on the server. This + * should be an absolute path. + * This is only checked on command line call by dompdf.php, but not by + * direct class use like: + * $dompdf = new DOMPDF(); $dompdf->load_html($htmldata); $dompdf->render(); $pdfdata = $dompdf->output(); + */ + "chroot" => realpath(base_path()), + + /** + * Whether to enable font subsetting or not. + */ + "enable_font_subsetting" => false, + + /** + * The PDF rendering backend to use + * + * Valid settings are 'PDFLib', 'CPDF' (the bundled R&OS PDF class), 'GD' and + * 'auto'. 'auto' will look for PDFLib and use it if found, or if not it will + * fall back on CPDF. 'GD' renders PDFs to graphic files. {@link + * Canvas_Factory} ultimately determines which rendering class to instantiate + * based on this setting. + * + * Both PDFLib & CPDF rendering backends provide sufficient rendering + * capabilities for dompdf, however additional features (e.g. object, + * image and font support, etc.) differ between backends. Please see + * {@link PDFLib_Adapter} for more information on the PDFLib backend + * and {@link CPDF_Adapter} and lib/class.pdf.php for more information + * on CPDF. Also see the documentation for each backend at the links + * below. + * + * The GD rendering backend is a little different than PDFLib and + * CPDF. Several features of CPDF and PDFLib are not supported or do + * not make any sense when creating image files. For example, + * multiple pages are not supported, nor are PDF 'objects'. Have a + * look at {@link GD_Adapter} for more information. GD support is + * experimental, so use it at your own risk. + * + * @link http://www.pdflib.com + * @link http://www.ros.co.nz/pdf + * @link http://www.php.net/image + */ + "pdf_backend" => "CPDF", + + /** + * PDFlib license key + * + * If you are using a licensed, commercial version of PDFlib, specify + * your license key here. If you are using PDFlib-Lite or are evaluating + * the commercial version of PDFlib, comment out this setting. + * + * @link http://www.pdflib.com + * + * If pdflib present in web server and auto or selected explicitely above, + * a real license code must exist! + */ + //"DOMPDF_PDFLIB_LICENSE" => "your license key here", + + /** + * html target media view which should be rendered into pdf. + * List of types and parsing rules for future extensions: + * http://www.w3.org/TR/REC-html40/types.html + * screen, tty, tv, projection, handheld, print, braille, aural, all + * Note: aural is deprecated in CSS 2.1 because it is replaced by speech in CSS 3. + * Note, even though the generated pdf file is intended for print output, + * the desired content might be different (e.g. screen or projection view of html file). + * Therefore allow specification of content here. + */ + "default_media_type" => "screen", + + /** + * The default paper size. + * + * North America standard is "letter"; other countries generally "a4" + * + * @see CPDF_Adapter::PAPER_SIZES for valid sizes ('letter', 'legal', 'A4', etc.) + */ + "default_paper_size" => "a4", + + /** + * The default font family + * + * Used if no suitable fonts can be found. This must exist in the font folder. + * @var string + */ + "default_font" => "Helvetica", + + /** + * Image DPI setting + * + * This setting determines the default DPI setting for images and fonts. The + * DPI may be overridden for inline images by explictly setting the + * image's width & height style attributes (i.e. if the image's native + * width is 600 pixels and you specify the image's width as 72 points, + * the image will have a DPI of 600 in the rendered PDF. The DPI of + * background images can not be overridden and is controlled entirely + * via this parameter. + * + * For the purposes of DOMPDF, pixels per inch (PPI) = dots per inch (DPI). + * If a size in html is given as px (or without unit as image size), + * this tells the corresponding size in pt. + * This adjusts the relative sizes to be similar to the rendering of the + * html page in a reference browser. + * + * In pdf, always 1 pt = 1/72 inch + * + * Rendering resolution of various browsers in px per inch: + * Windows Firefox and Internet Explorer: + * SystemControl->Display properties->FontResolution: Default:96, largefonts:120, custom:? + * Linux Firefox: + * about:config *resolution: Default:96 + * (xorg screen dimension in mm and Desktop font dpi settings are ignored) + * + * Take care about extra font/image zoom factor of browser. + * + * In images, size in pixel attribute, img css style, are overriding + * the real image dimension in px for rendering. + * + * @var int + */ + "dpi" => 96, + + /** + * Enable inline PHP + * + * If this setting is set to true then DOMPDF will automatically evaluate + * inline PHP contained within tags. + * + * Enabling this for documents you do not trust (e.g. arbitrary remote html + * pages) is a security risk. Set this option to false if you wish to process + * untrusted documents. + * + * @var bool + */ + "enable_php" => false, + + /** + * Enable inline Javascript + * + * If this setting is set to true then DOMPDF will automatically insert + * JavaScript code contained within tags. + * + * @var bool + */ + "enable_javascript" => true, + + /** + * Enable remote file access + * + * If this setting is set to true, DOMPDF will access remote sites for + * images and CSS files as required. + * This is required for part of test case www/test/image_variants.html through www/examples.php + * + * Attention! + * This can be a security risk, in particular in combination with DOMPDF_ENABLE_PHP and + * allowing remote access to dompdf.php or on allowing remote html code to be passed to + * $dompdf = new DOMPDF(, $dompdf->load_html(..., + * This allows anonymous users to download legally doubtful internet content which on + * tracing back appears to being downloaded by your server, or allows malicious php code + * in remote html pages to be executed by your server with your account privileges. + * + * @var bool + */ + "enable_remote" => true, + + /** + * A ratio applied to the fonts height to be more like browsers' line height + */ + "font_height_ratio" => 1.1, + + /** + * Use the more-than-experimental HTML5 Lib parser + */ + "enable_html5_parser" => true, + ), + + +); diff --git a/config/excel.php b/config/excel.php new file mode 100644 index 0000000..bf19051 --- /dev/null +++ b/config/excel.php @@ -0,0 +1,704 @@ + [ + + /* + |-------------------------------------------------------------------------- + | Enable/Disable cell caching + |-------------------------------------------------------------------------- + */ + 'enable' => true, + + /* + |-------------------------------------------------------------------------- + | Caching driver + |-------------------------------------------------------------------------- + | + | Set the caching driver + | + | Available methods: + | memory|gzip|serialized|igbinary|discISAM|apc|memcache|temp|wincache|sqlite|sqlite3 + | + */ + 'driver' => 'memory', + + /* + |-------------------------------------------------------------------------- + | Cache settings + |-------------------------------------------------------------------------- + */ + 'settings' => [ + + 'memoryCacheSize' => '32MB', + 'cacheTime' => 600 + + ], + + /* + |-------------------------------------------------------------------------- + | Memcache settings + |-------------------------------------------------------------------------- + */ + 'memcache' => [ + + 'host' => 'localhost', + 'port' => 11211, + + ], + + /* + |-------------------------------------------------------------------------- + | Cache dir (for discISAM) + |-------------------------------------------------------------------------- + */ + + 'dir' => storage_path('cache') + ], + + 'properties' => [ + 'creator' => 'Maatwebsite', + 'lastModifiedBy' => 'Maatwebsite', + 'title' => 'Spreadsheet', + 'description' => 'Default spreadsheet export', + 'subject' => 'Spreadsheet export', + 'keywords' => 'maatwebsite, excel, export', + 'category' => 'Excel', + 'manager' => 'Maatwebsite', + 'company' => 'Maatwebsite', + ], + + /* + |-------------------------------------------------------------------------- + | Sheets settings + |-------------------------------------------------------------------------- + */ + 'sheets' => [ + + /* + |-------------------------------------------------------------------------- + | Default page setup + |-------------------------------------------------------------------------- + */ + 'pageSetup' => [ + 'orientation' => 'portrait', + 'paperSize' => '9', + 'scale' => '100', + 'fitToPage' => false, + 'fitToHeight' => true, + 'fitToWidth' => true, + 'columnsToRepeatAtLeft' => ['', ''], + 'rowsToRepeatAtTop' => [0, 0], + 'horizontalCentered' => false, + 'verticalCentered' => false, + 'printArea' => null, + 'firstPageNumber' => null, + ], + ], + + /* + |-------------------------------------------------------------------------- + | Creator + |-------------------------------------------------------------------------- + | + | The default creator of a new Excel file + | + */ + + 'creator' => 'Maatwebsite', + + 'csv' => [ + /* + |-------------------------------------------------------------------------- + | Delimiter + |-------------------------------------------------------------------------- + | + | The default delimiter which will be used to read out a CSV file + | + */ + + 'delimiter' => ',', + + /* + |-------------------------------------------------------------------------- + | Enclosure + |-------------------------------------------------------------------------- + */ + + 'enclosure' => '"', + + /* + |-------------------------------------------------------------------------- + | Line endings + |-------------------------------------------------------------------------- + */ + + 'line_ending' => "\r\n", + + /* + |-------------------------------------------------------------------------- + | setUseBom + |-------------------------------------------------------------------------- + */ + + 'use_bom' => false + ], + + 'export' => [ + + /* + |-------------------------------------------------------------------------- + | Autosize columns + |-------------------------------------------------------------------------- + | + | Disable/enable column autosize or set the autosizing for + | an array of columns ( array('A', 'B') ) + | + */ + 'autosize' => true, + + /* + |-------------------------------------------------------------------------- + | Autosize method + |-------------------------------------------------------------------------- + | + | --> PHPExcel_Shared_Font::AUTOSIZE_METHOD_APPROX + | The default is based on an estimate, which does its calculation based + | on the number of characters in the cell value (applying any calculation + | and format mask, and allowing for wordwrap and rotation) and with an + | "arbitrary" adjustment based on the font (Arial, Calibri or Verdana, + | defaulting to Calibri if any other font is used) and a proportional + | adjustment for the font size. + | + | --> PHPExcel_Shared_Font::AUTOSIZE_METHOD_EXACT + | The second method is more accurate, based on actual style formatting as + | well (bold, italic, etc), and is calculated by generating a gd2 imagettf + | bounding box and using its dimensions to determine the size; but this + | method is significantly slower, and its accuracy is still dependent on + | having the appropriate fonts installed. + | + */ + 'autosize-method' => PHPExcel_Shared_Font::AUTOSIZE_METHOD_APPROX, + + /* + |-------------------------------------------------------------------------- + | Auto generate table heading + |-------------------------------------------------------------------------- + | + | If set to true, the array indices (or model attribute names) + | will automatically be used as first row (table heading) + | + */ + 'generate_heading_by_indices' => true, + + /* + |-------------------------------------------------------------------------- + | Auto set alignment on merged cells + |-------------------------------------------------------------------------- + */ + 'merged_cell_alignment' => 'left', + + /* + |-------------------------------------------------------------------------- + | Pre-calculate formulas during export + |-------------------------------------------------------------------------- + */ + 'calculate' => false, + + /* + |-------------------------------------------------------------------------- + | Include Charts during export + |-------------------------------------------------------------------------- + */ + 'includeCharts' => false, + + /* + |-------------------------------------------------------------------------- + | Default sheet settings + |-------------------------------------------------------------------------- + */ + 'sheets' => [ + + /* + |-------------------------------------------------------------------------- + | Default page margin + |-------------------------------------------------------------------------- + | + | 1) When set to false, default margins will be used + | 2) It's possible to enter a single margin which will + | be used for all margins. + | 3) Alternatively you can pass an array with 4 margins + | Default order: array(top, right, bottom, left) + | + */ + 'page_margin' => false, + + /* + |-------------------------------------------------------------------------- + | Value in source array that stands for blank cell + |-------------------------------------------------------------------------- + */ + 'nullValue' => null, + + /* + |-------------------------------------------------------------------------- + | Insert array starting from this cell address as the top left coordinate + |-------------------------------------------------------------------------- + */ + 'startCell' => 'A1', + + /* + |-------------------------------------------------------------------------- + | Apply strict comparison when testing for null values in the array + |-------------------------------------------------------------------------- + */ + 'strictNullComparison' => false + ], + + /* + |-------------------------------------------------------------------------- + | Store settings + |-------------------------------------------------------------------------- + */ + + 'store' => [ + + /* + |-------------------------------------------------------------------------- + | Path + |-------------------------------------------------------------------------- + | + | The path we want to save excel file to + | + */ + 'path' => storage_path('exports'), + + /* + |-------------------------------------------------------------------------- + | Return info + |-------------------------------------------------------------------------- + | + | Whether we want to return information about the stored file or not + | + */ + 'returnInfo' => false + + ], + + /* + |-------------------------------------------------------------------------- + | PDF Settings + |-------------------------------------------------------------------------- + */ + 'pdf' => [ + + /* + |-------------------------------------------------------------------------- + | PDF Drivers + |-------------------------------------------------------------------------- + | Supported: DomPDF, tcPDF, mPDF + */ + 'driver' => 'DomPDF', + + /* + |-------------------------------------------------------------------------- + | PDF Driver settings + |-------------------------------------------------------------------------- + */ + 'drivers' => [ + + /* + |-------------------------------------------------------------------------- + | DomPDF settings + |-------------------------------------------------------------------------- + */ + 'DomPDF' => [ + 'path' => base_path('vendor/dompdf/dompdf/') + ], + + /* + |-------------------------------------------------------------------------- + | tcPDF settings + |-------------------------------------------------------------------------- + */ + 'tcPDF' => [ + 'path' => base_path('vendor/tecnick.com/tcpdf/') + ], + + /* + |-------------------------------------------------------------------------- + | mPDF settings + |-------------------------------------------------------------------------- + */ + 'mPDF' => [ + 'path' => base_path('vendor/mpdf/mpdf/') + ], + ] + ] + ], + + 'filters' => [ + /* + |-------------------------------------------------------------------------- + | Register read filters + |-------------------------------------------------------------------------- + */ + + 'registered' => [ + 'chunk' => 'Maatwebsite\Excel\Filters\ChunkReadFilter' + ], + + /* + |-------------------------------------------------------------------------- + | Enable certain filters for every file read + |-------------------------------------------------------------------------- + */ + + 'enabled' => [] + ], + + 'import' => [ + + /* + |-------------------------------------------------------------------------- + | Has heading + |-------------------------------------------------------------------------- + | + | The sheet has a heading (first) row which we can use as attribute names + | + | Options: true|false|slugged|slugged_with_count|ascii|numeric|hashed|hashed_with_lower|trans|original + | + */ + + 'heading' => 'slugged', + + /* + |-------------------------------------------------------------------------- + | First Row with data or heading of data + |-------------------------------------------------------------------------- + | + | If the heading row is not the first row, or the data doesn't start + | on the first row, here you can change the start row. + | + */ + + 'startRow' => 1, + + /* + |-------------------------------------------------------------------------- + | Cell name word separator + |-------------------------------------------------------------------------- + | + | The default separator which is used for the cell names + | Note: only applies to 'heading' settings 'true' && 'slugged' + | + */ + + 'separator' => '_', + + /* + |-------------------------------------------------------------------------- + | Slug whitelisting + |-------------------------------------------------------------------------- + | + | Here you can whitelist certain characters in the slug. + | E.g. user.last_name will not remove . and _ + | Note: only applies to 'heading' settings 'true' && 'slugged' + | + */ + + 'slug_whitelist' => '._', + + /* + |-------------------------------------------------------------------------- + | Include Charts during import + |-------------------------------------------------------------------------- + */ + + 'includeCharts' => false, + + /* + |-------------------------------------------------------------------------- + | Sheet heading conversion + |-------------------------------------------------------------------------- + | + | Convert headings to ASCII + | Note: only applies to 'heading' settings 'true' && 'slugged' + | + */ + + 'to_ascii' => true, + + /* + |-------------------------------------------------------------------------- + | Import encoding + |-------------------------------------------------------------------------- + */ + + 'encoding' => [ + + 'input' => 'UTF-8', + 'output' => 'UTF-8' + + ], + + /* + |-------------------------------------------------------------------------- + | Calculate + |-------------------------------------------------------------------------- + | + | By default cells with formulas will be calculated. + | + */ + + 'calculate' => true, + + /* + |-------------------------------------------------------------------------- + | Ignore empty cells + |-------------------------------------------------------------------------- + | + | By default empty cells are not ignored + | + */ + + 'ignoreEmpty' => false, + + /* + |-------------------------------------------------------------------------- + | Force sheet collection + |-------------------------------------------------------------------------- + | + | For a sheet collection even when there is only 1 sheets. + | When set to false and only 1 sheet found, the parsed file will return + | a row collection instead of a sheet collection. + | When set to true, it will return a sheet collection instead. + | + */ + 'force_sheets_collection' => false, + + /* + |-------------------------------------------------------------------------- + | Date format + |-------------------------------------------------------------------------- + | + | The format dates will be parsed to + | + */ + + 'dates' => [ + + /* + |-------------------------------------------------------------------------- + | Enable/disable date formatting + |-------------------------------------------------------------------------- + */ + 'enabled' => true, + + /* + |-------------------------------------------------------------------------- + | Default date format + |-------------------------------------------------------------------------- + | + | If set to false, a carbon object will return + | + */ + 'format' => false, + + /* + |-------------------------------------------------------------------------- + | Date columns + |-------------------------------------------------------------------------- + */ + 'columns' => [] + ], + + /* + |-------------------------------------------------------------------------- + | Import sheets by config + |-------------------------------------------------------------------------- + */ + 'sheets' => [ + + /* + |-------------------------------------------------------------------------- + | Example sheet + |-------------------------------------------------------------------------- + | + | Example sheet "test" will grab the firstname at cell A2 + | + */ + + 'test' => [ + + 'firstname' => 'A2' + + ] + + ] + ], + + 'views' => [ + + /* + |-------------------------------------------------------------------------- + | Styles + |-------------------------------------------------------------------------- + | + | The default styles which will be used when parsing a view + | + */ + + 'styles' => [ + + /* + |-------------------------------------------------------------------------- + | Table headings + |-------------------------------------------------------------------------- + */ + 'th' => [ + 'font' => [ + 'bold' => true, + 'size' => 12, + ] + ], + + /* + |-------------------------------------------------------------------------- + | Strong tags + |-------------------------------------------------------------------------- + */ + 'strong' => [ + 'font' => [ + 'bold' => true, + 'size' => 12, + ] + ], + + /* + |-------------------------------------------------------------------------- + | Bold tags + |-------------------------------------------------------------------------- + */ + 'b' => [ + 'font' => [ + 'bold' => true, + 'size' => 12, + ] + ], + + /* + |-------------------------------------------------------------------------- + | Italic tags + |-------------------------------------------------------------------------- + */ + 'i' => [ + 'font' => [ + 'italic' => true, + 'size' => 12, + ] + ], + + /* + |-------------------------------------------------------------------------- + | Heading 1 + |-------------------------------------------------------------------------- + */ + 'h1' => [ + 'font' => [ + 'bold' => true, + 'size' => 24, + ] + ], + + /* + |-------------------------------------------------------------------------- + | Heading 2 + |-------------------------------------------------------------------------- + */ + 'h2' => [ + 'font' => [ + 'bold' => true, + 'size' => 18, + ] + ], + + /* + |-------------------------------------------------------------------------- + | Heading 3 + |-------------------------------------------------------------------------- + */ + 'h3' => [ + 'font' => [ + 'bold' => true, + 'size' => 13.5, + ] + ], + + /* + |-------------------------------------------------------------------------- + | Heading 4 + |-------------------------------------------------------------------------- + */ + 'h4' => [ + 'font' => [ + 'bold' => true, + 'size' => 12, + ] + ], + + /* + |-------------------------------------------------------------------------- + | Heading 5 + |-------------------------------------------------------------------------- + */ + 'h5' => [ + 'font' => [ + 'bold' => true, + 'size' => 10, + ] + ], + + /* + |-------------------------------------------------------------------------- + | Heading 6 + |-------------------------------------------------------------------------- + */ + 'h6' => [ + 'font' => [ + 'bold' => true, + 'size' => 7.5, + ] + ], + + /* + |-------------------------------------------------------------------------- + | Hyperlinks + |-------------------------------------------------------------------------- + */ + 'a' => [ + 'font' => [ + 'underline' => true, + 'color' => ['argb' => 'FF0000FF'], + ] + ], + + /* + |-------------------------------------------------------------------------- + | Horizontal rules + |-------------------------------------------------------------------------- + */ + 'hr' => [ + 'borders' => [ + 'bottom' => [ + 'style' => 'thin', + 'color' => ['FF000000'] + ], + ] + ] + ] + + ] + +); diff --git a/config/filesystems.php b/config/filesystems.php new file mode 100644 index 0000000..4544f60 --- /dev/null +++ b/config/filesystems.php @@ -0,0 +1,68 @@ + env('FILESYSTEM_DRIVER', 'local'), + + /* + |-------------------------------------------------------------------------- + | Default Cloud Filesystem Disk + |-------------------------------------------------------------------------- + | + | Many applications store files both locally and in the cloud. For this + | reason, you may specify a default "cloud" driver here. This driver + | will be bound as the Cloud disk implementation in the container. + | + */ + + 'cloud' => env('FILESYSTEM_CLOUD', 's3'), + + /* + |-------------------------------------------------------------------------- + | Filesystem Disks + |-------------------------------------------------------------------------- + | + | Here you may configure as many filesystem "disks" as you wish, and you + | may even configure multiple disks of the same driver. Defaults have + | been setup for each driver as an example of the required options. + | + | Supported Drivers: "local", "ftp", "s3", "rackspace" + | + */ + + 'disks' => [ + + 'local' => [ + 'driver' => 'local', + 'root' => storage_path('app'), + ], + + 'public' => [ + 'driver' => 'local', + 'root' => storage_path('app/public'), + 'url' => env('APP_URL').'/storage', + 'visibility' => 'public', + ], + + 's3' => [ + 'driver' => 's3', + 'key' => env('AWS_KEY'), + 'secret' => env('AWS_SECRET'), + 'region' => env('AWS_REGION'), + 'bucket' => env('AWS_BUCKET'), + ], + + ], + +]; diff --git a/config/firebase.php b/config/firebase.php new file mode 100644 index 0000000..b2d66f4 --- /dev/null +++ b/config/firebase.php @@ -0,0 +1,7 @@ + env('ENDPOINT', 'https://fcm.googleapis.com/fcm/send'), + 'authorization' => env('AUTHORIZATION','AAAAGS5o91E:APA91bGpO5JffnhkP69wy_PelJ4xmwVdK-4uypiGFG4NrE5QN0rurKxLxm4LTc9Ya_z1PKR6BNITYDE7awDHIh4jBS1I8RJ2fxIWuCZZg-uvbkX2bjtF7M1B77AB2cHCtMzPsK1vxCQ2'), + 'project_id' => env('PROJECT_ID','108152813393'), +]; diff --git a/config/jwt.php b/config/jwt.php new file mode 100644 index 0000000..01dc5d4 --- /dev/null +++ b/config/jwt.php @@ -0,0 +1,173 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return [ + + /* + |-------------------------------------------------------------------------- + | JWT Authentication Secret + |-------------------------------------------------------------------------- + | + | Don't forget to set this, as it will be used to sign your tokens. + | A helper command is provided for this: `php artisan jwt:generate` + | + */ + + 'secret' => env('JWT_SECRET', 'wDoIYDrnf8j0YiHGJcrHsYQ9k4hkZK76'), + + /* + |-------------------------------------------------------------------------- + | JWT time to live + |-------------------------------------------------------------------------- + | + | Specify the length of time (in minutes) that the token will be valid for. + | Defaults to 1 hour + | + */ + + 'ttl' => 10080, + + /* + |-------------------------------------------------------------------------- + | Refresh time to live + |-------------------------------------------------------------------------- + | + | Specify the length of time (in minutes) that the token can be refreshed + | within. I.E. The user can refresh their token within a 2 week window of + | the original token being created until they must re-authenticate. + | Defaults to 2 weeks + | + */ + + 'refresh_ttl' => 20160, + + /* + |-------------------------------------------------------------------------- + | JWT hashing algorithm + |-------------------------------------------------------------------------- + | + | Specify the hashing algorithm that will be used to sign the token. + | + | See here: https://github.com/namshi/jose/tree/2.2.0/src/Namshi/JOSE/Signer + | for possible values + | + */ + + 'algo' => 'HS256', + + /* + |-------------------------------------------------------------------------- + | User Model namespace + |-------------------------------------------------------------------------- + | + | Specify the full namespace to your User model. + | e.g. 'Acme\Entities\User' + | + */ + + 'user' => 'App\Models\User', + + /* + |-------------------------------------------------------------------------- + | User identifier + |-------------------------------------------------------------------------- + | + | Specify a unique property of the user that will be added as the 'sub' + | claim of the token payload. + | + */ + + 'identifier' => 'id', + + /* + |-------------------------------------------------------------------------- + | Required Claims + |-------------------------------------------------------------------------- + | + | Specify the required claims that must exist in any token. + | A TokenInvalidException will be thrown if any of these claims are not + | present in the payload. + | + */ + + 'required_claims' => ['iss', 'iat', 'exp', 'nbf', 'sub', 'jti'], + + /* + |-------------------------------------------------------------------------- + | Blacklist Enabled + |-------------------------------------------------------------------------- + | + | In order to invalidate tokens, you must have the blacklist enabled. + | If you do not want or need this functionality, then set this to false. + | + */ + + 'blacklist_enabled' => env('JWT_BLACKLIST_ENABLED', true), + + /* + |-------------------------------------------------------------------------- + | Providers + |-------------------------------------------------------------------------- + | + | Specify the various providers used throughout the package. + | + */ + + 'providers' => [ + + /* + |-------------------------------------------------------------------------- + | User Provider + |-------------------------------------------------------------------------- + | + | Specify the provider that is used to find the user based + | on the subject claim + | + */ + + 'user' => 'Tymon\JWTAuth\Providers\User\EloquentUserAdapter', + + /* + |-------------------------------------------------------------------------- + | JWT Provider + |-------------------------------------------------------------------------- + | + | Specify the provider that is used to create and decode the tokens. + | + */ + + 'jwt' => 'Tymon\JWTAuth\Providers\JWT\NamshiAdapter', + + /* + |-------------------------------------------------------------------------- + | Authentication Provider + |-------------------------------------------------------------------------- + | + | Specify the provider that is used to authenticate users. + | + */ + + 'auth' => 'Tymon\JWTAuth\Providers\Auth\IlluminateAuthAdapter', + + /* + |-------------------------------------------------------------------------- + | Storage Provider + |-------------------------------------------------------------------------- + | + | Specify the provider that is used to store tokens in the blacklist + | + */ + + 'storage' => 'Tymon\JWTAuth\Providers\Storage\IlluminateCacheAdapter', + + ], + +]; diff --git a/config/mail.php b/config/mail.php new file mode 100644 index 0000000..bb92224 --- /dev/null +++ b/config/mail.php @@ -0,0 +1,123 @@ + env('MAIL_DRIVER', 'smtp'), + + /* + |-------------------------------------------------------------------------- + | SMTP Host Address + |-------------------------------------------------------------------------- + | + | Here you may provide the host address of the SMTP server used by your + | applications. A default option is provided that is compatible with + | the Mailgun mail service which will provide reliable deliveries. + | + */ + + 'host' => env('MAIL_HOST', 'smtp.mailgun.org'), + + /* + |-------------------------------------------------------------------------- + | SMTP Host Port + |-------------------------------------------------------------------------- + | + | This is the SMTP port used by your application to deliver e-mails to + | users of the application. Like the host we have set this value to + | stay compatible with the Mailgun e-mail application by default. + | + */ + + 'port' => env('MAIL_PORT', 587), + + /* + |-------------------------------------------------------------------------- + | Global "From" Address + |-------------------------------------------------------------------------- + | + | You may wish for all e-mails sent by your application to be sent from + | the same address. Here, you may specify a name and address that is + | used globally for all e-mails that are sent by your application. + | + */ + + 'from' => [ + 'address' => env('MAIL_FROM_ADDRESS', 'hello@example.com'), + 'name' => env('MAIL_FROM_NAME', 'Example'), + ], + + /* + |-------------------------------------------------------------------------- + | E-Mail Encryption Protocol + |-------------------------------------------------------------------------- + | + | Here you may specify the encryption protocol that should be used when + | the application send e-mail messages. A sensible default using the + | transport layer security protocol should provide great security. + | + */ + + 'encryption' => env('MAIL_ENCRYPTION', 'tls'), + + /* + |-------------------------------------------------------------------------- + | SMTP Server Username + |-------------------------------------------------------------------------- + | + | If your SMTP server requires a username for authentication, you should + | set it here. This will get used to authenticate with your server on + | connection. You may also set the "password" value below this one. + | + */ + + 'username' => env('MAIL_USERNAME'), + + 'password' => env('MAIL_PASSWORD'), + + /* + |-------------------------------------------------------------------------- + | Sendmail System Path + |-------------------------------------------------------------------------- + | + | When using the "sendmail" driver to send e-mails, we will need to know + | the path to where Sendmail lives on this server. A default path has + | been provided here, which will work well on most of your systems. + | + */ + + 'sendmail' => '/usr/sbin/sendmail -bs', + + /* + |-------------------------------------------------------------------------- + | Markdown Mail Settings + |-------------------------------------------------------------------------- + | + | If you are using Markdown based email rendering, you may configure your + | theme and component paths here, allowing you to customize the design + | of the emails. Or, you may simply stick with the Laravel defaults! + | + */ + + 'markdown' => [ + 'theme' => 'default', + + 'paths' => [ + resource_path('views/vendor/mail'), + ], + ], + +]; diff --git a/config/queue.php b/config/queue.php new file mode 100644 index 0000000..4d83ebd --- /dev/null +++ b/config/queue.php @@ -0,0 +1,85 @@ + env('QUEUE_DRIVER', 'sync'), + + /* + |-------------------------------------------------------------------------- + | Queue Connections + |-------------------------------------------------------------------------- + | + | Here you may configure the connection information for each server that + | is used by your application. A default configuration has been added + | for each back-end shipped with Laravel. You are free to add more. + | + */ + + 'connections' => [ + + 'sync' => [ + 'driver' => 'sync', + ], + + 'database' => [ + 'driver' => 'database', + 'table' => 'jobs', + 'queue' => 'default', + 'retry_after' => 90, + ], + + 'beanstalkd' => [ + 'driver' => 'beanstalkd', + 'host' => 'localhost', + 'queue' => 'default', + 'retry_after' => 90, + ], + + 'sqs' => [ + 'driver' => 'sqs', + 'key' => 'your-public-key', + 'secret' => 'your-secret-key', + 'prefix' => 'https://sqs.us-east-1.amazonaws.com/your-account-id', + 'queue' => 'your-queue-name', + 'region' => 'us-east-1', + ], + + 'redis' => [ + 'driver' => 'redis', + 'connection' => 'default', + 'queue' => 'default', + 'retry_after' => 90, + ], + + ], + + /* + |-------------------------------------------------------------------------- + | Failed Queue Jobs + |-------------------------------------------------------------------------- + | + | These options configure the behavior of failed queue job logging so you + | can control which database and table are used to store the jobs that + | have failed. You may change them to any database / table you wish. + | + */ + + 'failed' => [ + 'database' => env('DB_CONNECTION', 'mysql'), + 'table' => 'failed_jobs', + ], + +]; diff --git a/config/services.php b/config/services.php new file mode 100644 index 0000000..4b5f049 --- /dev/null +++ b/config/services.php @@ -0,0 +1,38 @@ + [ + 'domain' => env('MAILGUN_DOMAIN'), + 'secret' => env('MAILGUN_SECRET'), + ], + + 'ses' => [ + 'key' => env('SES_KEY'), + 'secret' => env('SES_SECRET'), + 'region' => 'us-east-1', + ], + + 'sparkpost' => [ + 'secret' => env('SPARKPOST_SECRET'), + ], + + 'stripe' => [ + 'model' => App\Models\User::class, + 'key' => env('STRIPE_KEY'), + 'secret' => env('STRIPE_SECRET'), + ], + +]; diff --git a/config/session.php b/config/session.php new file mode 100644 index 0000000..e2779ad --- /dev/null +++ b/config/session.php @@ -0,0 +1,179 @@ + env('SESSION_DRIVER', 'file'), + + /* + |-------------------------------------------------------------------------- + | Session Lifetime + |-------------------------------------------------------------------------- + | + | Here you may specify the number of minutes that you wish the session + | to be allowed to remain idle before it expires. If you want them + | to immediately expire on the browser closing, set that option. + | + */ + + 'lifetime' => 120, + + 'expire_on_close' => false, + + /* + |-------------------------------------------------------------------------- + | Session Encryption + |-------------------------------------------------------------------------- + | + | This option allows you to easily specify that all of your session data + | should be encrypted before it is stored. All encryption will be run + | automatically by Laravel and you can use the Session like normal. + | + */ + + 'encrypt' => false, + + /* + |-------------------------------------------------------------------------- + | Session File Location + |-------------------------------------------------------------------------- + | + | When using the native session driver, we need a location where session + | files may be stored. A default has been set for you but a different + | location may be specified. This is only needed for file sessions. + | + */ + + 'files' => storage_path('framework/sessions'), + + /* + |-------------------------------------------------------------------------- + | Session Database Connection + |-------------------------------------------------------------------------- + | + | When using the "database" or "redis" session drivers, you may specify a + | connection that should be used to manage these sessions. This should + | correspond to a connection in your database configuration options. + | + */ + + 'connection' => null, + + /* + |-------------------------------------------------------------------------- + | Session Database Table + |-------------------------------------------------------------------------- + | + | When using the "database" session driver, you may specify the table we + | should use to manage the sessions. Of course, a sensible default is + | provided for you; however, you are free to change this as needed. + | + */ + + 'table' => 'sessions', + + /* + |-------------------------------------------------------------------------- + | Session Cache Store + |-------------------------------------------------------------------------- + | + | When using the "apc" or "memcached" session drivers, you may specify a + | cache store that should be used for these sessions. This value must + | correspond with one of the application's configured cache stores. + | + */ + + 'store' => null, + + /* + |-------------------------------------------------------------------------- + | Session Sweeping Lottery + |-------------------------------------------------------------------------- + | + | Some session drivers must manually sweep their storage location to get + | rid of old sessions from storage. Here are the chances that it will + | happen on a given request. By default, the odds are 2 out of 100. + | + */ + + 'lottery' => [2, 100], + + /* + |-------------------------------------------------------------------------- + | Session Cookie Name + |-------------------------------------------------------------------------- + | + | Here you may change the name of the cookie used to identify a session + | instance by ID. The name specified here will get used every time a + | new session cookie is created by the framework for every driver. + | + */ + + 'cookie' => 'laravel_session', + + /* + |-------------------------------------------------------------------------- + | Session Cookie Path + |-------------------------------------------------------------------------- + | + | The session cookie path determines the path for which the cookie will + | be regarded as available. Typically, this will be the root path of + | your application but you are free to change this when necessary. + | + */ + + 'path' => '/', + + /* + |-------------------------------------------------------------------------- + | Session Cookie Domain + |-------------------------------------------------------------------------- + | + | Here you may change the domain of the cookie used to identify a session + | in your application. This will determine which domains the cookie is + | available to in your application. A sensible default has been set. + | + */ + + 'domain' => env('SESSION_DOMAIN', null), + + /* + |-------------------------------------------------------------------------- + | HTTPS Only Cookies + |-------------------------------------------------------------------------- + | + | By setting this option to true, session cookies will only be sent back + | to the server if the browser has a HTTPS connection. This will keep + | the cookie from being sent to you if it can not be done securely. + | + */ + + 'secure' => env('SESSION_SECURE_COOKIE', false), + + /* + |-------------------------------------------------------------------------- + | HTTP Access Only + |-------------------------------------------------------------------------- + | + | Setting this value to true will prevent JavaScript from accessing the + | value of the cookie and the cookie will only be accessible through + | the HTTP protocol. You are free to modify this option if needed. + | + */ + + 'http_only' => true, + +]; diff --git a/config/tinker.php b/config/tinker.php new file mode 100644 index 0000000..1341c1b --- /dev/null +++ b/config/tinker.php @@ -0,0 +1,18 @@ + [], + +]; diff --git a/config/view.php b/config/view.php new file mode 100644 index 0000000..2acfd9c --- /dev/null +++ b/config/view.php @@ -0,0 +1,33 @@ + [ + resource_path('views'), + ], + + /* + |-------------------------------------------------------------------------- + | Compiled View Path + |-------------------------------------------------------------------------- + | + | This option determines where all the compiled Blade templates will be + | stored for your application. Typically, this is within the storage + | directory. However, as usual, you are free to change this value. + | + */ + + 'compiled' => realpath(storage_path('framework/views')), + +]; diff --git a/database/.gitignore b/database/.gitignore new file mode 100644 index 0000000..9b1dffd --- /dev/null +++ b/database/.gitignore @@ -0,0 +1 @@ +*.sqlite diff --git a/database/factories/ModelFactory.php b/database/factories/ModelFactory.php new file mode 100644 index 0000000..ee4edcb --- /dev/null +++ b/database/factories/ModelFactory.php @@ -0,0 +1,25 @@ +define(App\User::class, function (Faker\Generator $faker) { + static $password; + + return [ + 'name' => $faker->name, + 'email' => $faker->unique()->safeEmail, + 'password' => $password ?: $password = bcrypt('secret'), + 'remember_token' => str_random(10), + ]; +}); + diff --git a/database/migrations/2014_07_01_170548_create_table_tipos_empleados.php b/database/migrations/2014_07_01_170548_create_table_tipos_empleados.php new file mode 100644 index 0000000..f8ba8cf --- /dev/null +++ b/database/migrations/2014_07_01_170548_create_table_tipos_empleados.php @@ -0,0 +1,33 @@ +increments('id'); + $table->string('nombre'); + $table->boolean('login'); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::drop('tipos_empleados'); + } +} diff --git a/database/migrations/2014_07_01_234437_create_table_sucursales.php b/database/migrations/2014_07_01_234437_create_table_sucursales.php new file mode 100644 index 0000000..d4c8ca5 --- /dev/null +++ b/database/migrations/2014_07_01_234437_create_table_sucursales.php @@ -0,0 +1,41 @@ +increments('id'); + $table->string('nombre')->unique(); + $table->string('calle'); + $table->string('num_ext'); + $table->string('num_int')->nullable(); + $table->string('colonia'); + $table->string('cp'); + $table->string('telefono'); + $table->string('gerente'); + $table->string('encargado'); + $table->timestamps(); + $table->softDeletes(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::drop('sucursales'); + } +} diff --git a/database/migrations/2014_07_02_230147_migration_cartalyst_sentinel.php b/database/migrations/2014_07_02_230147_migration_cartalyst_sentinel.php new file mode 100644 index 0000000..4597863 --- /dev/null +++ b/database/migrations/2014_07_02_230147_migration_cartalyst_sentinel.php @@ -0,0 +1,140 @@ +increments('id'); + $table->integer('user_id')->unsigned(); + $table->string('code'); + $table->boolean('completed')->default(0); + $table->timestamp('completed_at')->nullable(); + $table->timestamps(); + + $table->engine = 'InnoDB'; + }); + + Schema::create('persistences', function (Blueprint $table) { + $table->increments('id'); + $table->integer('user_id')->unsigned(); + $table->string('code'); + $table->timestamps(); + + $table->engine = 'InnoDB'; + $table->unique('code'); + }); + + Schema::create('reminders', function (Blueprint $table) { + $table->increments('id'); + $table->integer('user_id')->unsigned(); + $table->string('code'); + $table->boolean('completed')->default(0); + $table->timestamp('completed_at')->nullable(); + $table->timestamps(); + + $table->engine = 'InnoDB'; + }); + + Schema::create('roles', function (Blueprint $table) { + $table->increments('id'); + $table->string('slug'); + $table->string('name'); + $table->text('permissions')->nullable(); + $table->timestamps(); + + $table->engine = 'InnoDB'; + $table->unique('slug'); + }); + + Schema::create('role_users', function (Blueprint $table) { + $table->integer('user_id')->unsigned(); + $table->integer('role_id')->unsigned(); + $table->nullableTimestamps(); + + $table->engine = 'InnoDB'; + $table->primary(['user_id', 'role_id']); + }); + + Schema::create('throttle', function (Blueprint $table) { + $table->increments('id'); + $table->integer('user_id')->unsigned()->nullable(); + $table->string('type'); + $table->string('ip')->nullable(); + $table->timestamps(); + + $table->engine = 'InnoDB'; + $table->index('user_id'); + }); + + Schema::create('users', function (Blueprint $table) { + $table->increments('id'); + $table->string('email'); + $table->string('password'); + $table->string('nombre'); + $table->string('apellido_paterno'); + $table->string('apellido_materno'); + $table->string('telefono')->nullable(); + $table->integer('sucursal_id')->unsigned(); + $table->boolean('solicitar')->default(0); + $table->integer('tipo_empleado_id')->unsigned(); + $table->text('permissions')->nullable(); + $table->timestamp('last_login')->nullable(); + $table->rememberToken(); + $table->timestamps(); + + $table->engine = 'InnoDB'; + $table->unique('email'); + + $table->foreign('tipo_empleado_id') + ->references('id') + ->on('tipos_empleados'); + + $table->foreign('sucursal_id') + ->references('id') + ->on('sucursales'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::drop('activations'); + Schema::drop('persistences'); + Schema::drop('reminders'); + Schema::drop('roles'); + Schema::drop('role_users'); + Schema::drop('throttle'); + Schema::drop('users'); + } +} diff --git a/database/migrations/2014_10_12_100000_create_password_resets_table.php b/database/migrations/2014_10_12_100000_create_password_resets_table.php new file mode 100644 index 0000000..0d5cb84 --- /dev/null +++ b/database/migrations/2014_10_12_100000_create_password_resets_table.php @@ -0,0 +1,32 @@ +string('email')->index(); + $table->string('token'); + $table->timestamp('created_at')->nullable(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('password_resets'); + } +} diff --git a/database/migrations/2018_08_01_232449_alter_table_users_add_softdeletes.php b/database/migrations/2018_08_01_232449_alter_table_users_add_softdeletes.php new file mode 100644 index 0000000..63d2b5b --- /dev/null +++ b/database/migrations/2018_08_01_232449_alter_table_users_add_softdeletes.php @@ -0,0 +1,32 @@ +softDeletes(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('users', function (Blueprint $table) { + $table->dropColumn('deleted_at'); + }); + } +} diff --git a/database/migrations/2018_08_02_182235_create_table_estatus_servicios.php b/database/migrations/2018_08_02_182235_create_table_estatus_servicios.php new file mode 100644 index 0000000..2f717d2 --- /dev/null +++ b/database/migrations/2018_08_02_182235_create_table_estatus_servicios.php @@ -0,0 +1,33 @@ +increments('id'); + $table->string('nombre'); + $table->timestamps(); + $table->softDeletes(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::drop('cat_estatus_servicios'); + } +} diff --git a/database/migrations/2018_08_02_182543_create_table_cat_servicios.php b/database/migrations/2018_08_02_182543_create_table_cat_servicios.php new file mode 100644 index 0000000..ad8f6ff --- /dev/null +++ b/database/migrations/2018_08_02_182543_create_table_cat_servicios.php @@ -0,0 +1,33 @@ +increments('id'); + $table->string('nombre'); + $table->timestamps(); + $table->softDeletes(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::drop('cat_servicios'); + } +} diff --git a/database/migrations/2018_08_02_182630_create_table_cat_forma_pago.php b/database/migrations/2018_08_02_182630_create_table_cat_forma_pago.php new file mode 100644 index 0000000..0d37253 --- /dev/null +++ b/database/migrations/2018_08_02_182630_create_table_cat_forma_pago.php @@ -0,0 +1,33 @@ +increments('id'); + $table->string('nombre'); + $table->timestamps(); + $table->softDeletes(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::drop('cat_formas_pagos'); + } +} diff --git a/database/migrations/2018_08_02_182719_create_table_cat_tipo_servicio.php b/database/migrations/2018_08_02_182719_create_table_cat_tipo_servicio.php new file mode 100644 index 0000000..3f64f2b --- /dev/null +++ b/database/migrations/2018_08_02_182719_create_table_cat_tipo_servicio.php @@ -0,0 +1,33 @@ +increments('id'); + $table->string('nombre'); + $table->timestamps(); + $table->softDeletes(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::drop('cat_tipos_servicios'); + } +} diff --git a/database/migrations/2018_08_02_225320_alter_table_roles_add_movil_web.php b/database/migrations/2018_08_02_225320_alter_table_roles_add_movil_web.php new file mode 100644 index 0000000..fb7eb15 --- /dev/null +++ b/database/migrations/2018_08_02_225320_alter_table_roles_add_movil_web.php @@ -0,0 +1,33 @@ +boolean('movil')->after('permissions')->default(0); + $table->boolean('web')->after('movil')->default(0); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('roles', function (Blueprint $table) { + $table->dropColumn(['movil','web']); + }); + } +} diff --git a/database/migrations/2018_08_07_155038_create_table_vehiculos.php b/database/migrations/2018_08_07_155038_create_table_vehiculos.php new file mode 100644 index 0000000..f860be6 --- /dev/null +++ b/database/migrations/2018_08_07_155038_create_table_vehiculos.php @@ -0,0 +1,33 @@ +increments('id'); + $table->string('num_economico')->unique(); + $table->timestamps(); + $table->softDeletes(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::drop('cat_vehiculos'); + } +} diff --git a/database/migrations/2018_08_08_210740_create_table_vehiculos_sucursales.php b/database/migrations/2018_08_08_210740_create_table_vehiculos_sucursales.php new file mode 100644 index 0000000..9b7a1f2 --- /dev/null +++ b/database/migrations/2018_08_08_210740_create_table_vehiculos_sucursales.php @@ -0,0 +1,41 @@ +integer('vehiculo_id')->unsigned(); + $table->integer('sucursal_id')->unsigned(); + + $table->unique(['vehiculo_id', 'sucursal_id']); + + $table->foreign('vehiculo_id') + ->references('id') + ->on('cat_vehiculos'); + + $table->foreign('sucursal_id') + ->references('id') + ->on('sucursales'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::drop('vehiculos_sucursales'); + } +} diff --git a/database/migrations/2018_08_09_181913_create_table_factura_uso_cfdi.php b/database/migrations/2018_08_09_181913_create_table_factura_uso_cfdi.php new file mode 100644 index 0000000..54b94f0 --- /dev/null +++ b/database/migrations/2018_08_09_181913_create_table_factura_uso_cfdi.php @@ -0,0 +1,32 @@ +increments('id'); + $table->char('clave', 9); + $table->string('descripcion', 765); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::drop('facturas_uso_cfdi'); + } +} diff --git a/database/migrations/2018_08_09_182302_create_table_factura_formas_pago.php b/database/migrations/2018_08_09_182302_create_table_factura_formas_pago.php new file mode 100644 index 0000000..029c47b --- /dev/null +++ b/database/migrations/2018_08_09_182302_create_table_factura_formas_pago.php @@ -0,0 +1,32 @@ +increments('id'); + $table->char('clave', 6); + $table->string('descripcion', 765); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::drop('facturas_formas_pago'); + } +} diff --git a/database/migrations/2018_08_09_182735_create_table_factura_metodos_pago.php b/database/migrations/2018_08_09_182735_create_table_factura_metodos_pago.php new file mode 100644 index 0000000..9b97e66 --- /dev/null +++ b/database/migrations/2018_08_09_182735_create_table_factura_metodos_pago.php @@ -0,0 +1,32 @@ +increments('id'); + $table->char('clave', 9); + $table->string('descripcion', 765); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::drop('facturas_metodos_pago'); + } +} diff --git a/database/migrations/2018_08_09_183000_create_table_factura_tipo_comprobante.php b/database/migrations/2018_08_09_183000_create_table_factura_tipo_comprobante.php new file mode 100644 index 0000000..a305115 --- /dev/null +++ b/database/migrations/2018_08_09_183000_create_table_factura_tipo_comprobante.php @@ -0,0 +1,32 @@ +increments('id'); + $table->char('clave', 3); + $table->string('descripcion', 765); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::drop('facturas_tipo_comprobante'); + } +} diff --git a/database/migrations/2018_08_09_184426_create_table_clientes.php b/database/migrations/2018_08_09_184426_create_table_clientes.php new file mode 100644 index 0000000..51b443d --- /dev/null +++ b/database/migrations/2018_08_09_184426_create_table_clientes.php @@ -0,0 +1,44 @@ +increments('id'); + $table->string('denominacion'); + $table->integer('asesor_id')->unsigned(); + $table->integer('sucursal_id')->unsigned(); + $table->boolean('requiere_factura'); + $table->timestamps(); + $table->softDeletes(); + + $table->foreign('asesor_id') + ->references('id') + ->on('users'); + + $table->foreign('sucursal_id') + ->references('id') + ->on('sucursales'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::drop('clientes'); + } +} diff --git a/database/migrations/2018_08_09_190133_create_table_clientes_domicilios.php b/database/migrations/2018_08_09_190133_create_table_clientes_domicilios.php new file mode 100644 index 0000000..4525271 --- /dev/null +++ b/database/migrations/2018_08_09_190133_create_table_clientes_domicilios.php @@ -0,0 +1,45 @@ +increments('id'); + $table->integer('cliente_id')->unsigned(); + $table->string('calle'); + $table->string('num_ext'); + $table->string('num_int')->nullable(); + $table->string('colonia'); + $table->string('cp'); + $table->string('telefono')->nullable(); + $table->double('lat')->nullable(); + $table->double('lng')->nullable(); + $table->timestamps(); + $table->softDeletes(); + + $table->foreign('cliente_id') + ->references('id') + ->on('clientes'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::drop('clientes_domicilios'); + } +} diff --git a/database/migrations/2018_08_09_190634_create_table_clientes_datos_fiscales.php b/database/migrations/2018_08_09_190634_create_table_clientes_datos_fiscales.php new file mode 100644 index 0000000..079da1b --- /dev/null +++ b/database/migrations/2018_08_09_190634_create_table_clientes_datos_fiscales.php @@ -0,0 +1,71 @@ +increments('id'); + $table->integer('cliente_id')->unsigned()->unique(); + $table->string('razon_social'); + $table->string('rfc'); + $table->string('email'); + $table->string('calle'); + $table->string('num_ext'); + $table->string('num_int')->nullable(); + $table->string('colonia'); + $table->string('localidad'); + $table->string('municipio'); + $table->string('estado'); + $table->string('pais'); + $table->string('cp'); + $table->integer('factura_uso_cfdi_id')->unsigned(); + $table->integer('factura_tipo_comprobante_id')->unsigned(); + $table->integer('factura_metodos_pago_id')->unsigned(); + $table->integer('factura_formas_pago_id')->unsigned(); + $table->string('condicion_pago'); + $table->boolean('retencion_iva'); + $table->string('observacion',250)->nullable(); + $table->timestamps(); + + $table->foreign('cliente_id') + ->references('id') + ->on('clientes'); + + $table->foreign('factura_uso_cfdi_id') + ->references('id') + ->on('facturas_uso_cfdi'); + + $table->foreign('factura_tipo_comprobante_id') + ->references('id') + ->on('facturas_tipo_comprobante'); + + $table->foreign('factura_metodos_pago_id') + ->references('id') + ->on('facturas_metodos_pago'); + + $table->foreign('factura_formas_pago_id') + ->references('id') + ->on('facturas_formas_pago'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::drop('clientes_datos_fiscales'); + } +} diff --git a/database/migrations/2018_08_10_172753_create_table_servicios.php b/database/migrations/2018_08_10_172753_create_table_servicios.php new file mode 100644 index 0000000..86e7180 --- /dev/null +++ b/database/migrations/2018_08_10_172753_create_table_servicios.php @@ -0,0 +1,81 @@ +increments('id'); + $table->integer('servicio_id')->unsigned(); + $table->integer('estatus_servicio_id')->unsigned(); + $table->integer('forma_pago_id')->unsigned(); + $table->integer('tipo_servicio_id')->unsigned(); + $table->dateTime('fecha_agenda'); + $table->dateTime('fecha_solicitud'); + $table->integer('usuario_agenda_id')->unsigned(); + $table->time('duracion'); + $table->boolean('definido_cliente'); + $table->integer('cliente_id')->unsigned(); + $table->integer('cliente_domicilio_id')->unsigned(); + $table->integer('operador_id')->unsigned(); + $table->integer('vehiculo_id')->unsigned(); + $table->timestamps(); + $table->softDeletes(); + + $table->foreign('servicio_id') + ->references('id') + ->on('cat_servicios'); + + $table->foreign('estatus_servicio_id') + ->references('id') + ->on('cat_estatus_servicios'); + + $table->foreign('forma_pago_id') + ->references('id') + ->on('cat_formas_pagos'); + + $table->foreign('tipo_servicio_id') + ->references('id') + ->on('cat_tipos_servicios'); + + $table->foreign('usuario_agenda_id') + ->references('id') + ->on('users'); + + $table->foreign('cliente_id') + ->references('id') + ->on('clientes'); + + $table->foreign('cliente_domicilio_id') + ->references('id') + ->on('clientes_domicilios'); + + $table->foreign('operador_id') + ->references('id') + ->on('users'); + + $table->foreign('vehiculo_id') + ->references('id') + ->on('cat_vehiculos'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::drop('servicios'); + } +} diff --git a/database/migrations/2018_08_13_173606_create_table_bitacora_laboral.php b/database/migrations/2018_08_13_173606_create_table_bitacora_laboral.php new file mode 100644 index 0000000..cb6131b --- /dev/null +++ b/database/migrations/2018_08_13_173606_create_table_bitacora_laboral.php @@ -0,0 +1,49 @@ +increments('id'); + $table->integer('usuario_id')->unsigned(); + $table->integer('vehiculo_id')->nullable()->unsigned(); + $table->dateTime('fecha_hora_ini'); + $table->dateTime('fecha_hora_fin')->nullable(); + $table->integer('kilometraje_inicial'); + $table->integer('kilometraje_final')->nullable(); + $table->double('lat_ini'); + $table->double('lng_ini'); + $table->double('lat_fin')->nullable(); + $table->double('lng_fin')->nullable(); + $table->timestamps(); + + $table->foreign('usuario_id') + ->references('id') + ->on('users'); + + $table->foreign('vehiculo_id') + ->references('id') + ->on('cat_vehiculos'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::drop('bitacora_laboral'); + } +} diff --git a/database/migrations/2018_08_14_082732_create_table_usuarios_desplazamientos.php b/database/migrations/2018_08_14_082732_create_table_usuarios_desplazamientos.php new file mode 100644 index 0000000..1581f50 --- /dev/null +++ b/database/migrations/2018_08_14_082732_create_table_usuarios_desplazamientos.php @@ -0,0 +1,46 @@ +bigIncrements('id'); + $table->integer('bitacora_laboral_id')->unsigned(); + $table->integer('usuario_id')->unsigned(); + $table->dateTime('fecha'); + $table->string('modelo_celular'); + $table->integer('bateria'); + $table->double('lat'); + $table->double('lng'); + $table->timestamps(); + + $table->foreign('usuario_id') + ->references('id') + ->on('users'); + + $table->foreign('bitacora_laboral_id') + ->references('id') + ->on('bitacora_laboral'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::drop('usuarios_desplazamientos'); + } +} diff --git a/database/migrations/2018_08_14_100454_create_table_parametros.php b/database/migrations/2018_08_14_100454_create_table_parametros.php new file mode 100644 index 0000000..07b00e4 --- /dev/null +++ b/database/migrations/2018_08_14_100454_create_table_parametros.php @@ -0,0 +1,31 @@ +string('llave'); + $table->string('valor'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::drop('parametros'); + } +} diff --git a/database/migrations/2018_08_14_130334_alter_table_users_add_token_firebase.php b/database/migrations/2018_08_14_130334_alter_table_users_add_token_firebase.php new file mode 100644 index 0000000..f05a88a --- /dev/null +++ b/database/migrations/2018_08_14_130334_alter_table_users_add_token_firebase.php @@ -0,0 +1,32 @@ +string('token_firebase',255)->nullable()->after('permissions'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('users', function (Blueprint $table) { + $table->dropColumn(['token_firebase']); + }); + } +} diff --git a/database/migrations/2018_08_17_082013_alter_table_clientes_domicilios_add_nombre_sucursal.php b/database/migrations/2018_08_17_082013_alter_table_clientes_domicilios_add_nombre_sucursal.php new file mode 100644 index 0000000..e8018c4 --- /dev/null +++ b/database/migrations/2018_08_17_082013_alter_table_clientes_domicilios_add_nombre_sucursal.php @@ -0,0 +1,37 @@ +string('nombre_sucursal')->after('cliente_id'); + $table->integer('numero_sucursal')->after('nombre_sucursal'); + $table->string('nombre_responsable_sucursal')->after('numero_sucursal'); + $table->string('entre_calles')->nullable()->after('calle'); + $table->string('ciudad')->after('colonia'); + $table->string('celular_responsable')->after('telefono'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('clientes_domicilios', function (Blueprint $table) { + $table->dropColumn(['nombre_sucursal', 'numero_sucursal', 'nombre_responsable_sucursal', 'entre_calles', 'ciudad', 'celular_responsable']); + }); + } +} diff --git a/database/migrations/2018_08_20_153121_create_table_cat_tipos_vehiculos.php b/database/migrations/2018_08_20_153121_create_table_cat_tipos_vehiculos.php new file mode 100644 index 0000000..dab0442 --- /dev/null +++ b/database/migrations/2018_08_20_153121_create_table_cat_tipos_vehiculos.php @@ -0,0 +1,33 @@ +increments('id'); + $table->string('nombre'); + $table->timestamps(); + $table->softDeletes(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::drop('cat_tipos_vehiculos'); + } +} diff --git a/database/migrations/2018_08_20_154206_alter_table_cat_vehiculos_add_tipo_vehiculo_id.php b/database/migrations/2018_08_20_154206_alter_table_cat_vehiculos_add_tipo_vehiculo_id.php new file mode 100644 index 0000000..f0b2fc8 --- /dev/null +++ b/database/migrations/2018_08_20_154206_alter_table_cat_vehiculos_add_tipo_vehiculo_id.php @@ -0,0 +1,38 @@ +integer('tipo_vehiculo_id')->after('num_economico')->unsigned(); + + $table->foreign('tipo_vehiculo_id') + ->references('id') + ->on('cat_tipos_vehiculos'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('cat_vehiculos', function (Blueprint $table) { + + $table->dropForeign(['tipo_vehiculo_id']); + $table->dropColumn(['tipo_vehiculo_id']); + }); + } +} diff --git a/database/migrations/2018_08_21_094439_alter_table_servicios_add_aux1_aux2.php b/database/migrations/2018_08_21_094439_alter_table_servicios_add_aux1_aux2.php new file mode 100644 index 0000000..37c1aa1 --- /dev/null +++ b/database/migrations/2018_08_21_094439_alter_table_servicios_add_aux1_aux2.php @@ -0,0 +1,42 @@ +integer('auxiliar_1')->nullable()->unsigned()->after('vehiculo_id'); + $table->integer('auxiliar_2')->nullable()->unsigned()->after('auxiliar_1'); + + $table->foreign('auxiliar_1') + ->references('id') + ->on('users'); + + $table->foreign('auxiliar_2') + ->references('id') + ->on('users'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('servicios', function (Blueprint $table) { + $table->dropForeign(['auxiliar_1', 'auxiliar_2']); + $table->dropColumn(['auxiliar_1', 'auxiliar_2']); + }); + } +} diff --git a/database/migrations/2018_08_21_130744_alter_table_cat_estatus_servicios_add_colores.php b/database/migrations/2018_08_21_130744_alter_table_cat_estatus_servicios_add_colores.php new file mode 100644 index 0000000..86fcd58 --- /dev/null +++ b/database/migrations/2018_08_21_130744_alter_table_cat_estatus_servicios_add_colores.php @@ -0,0 +1,33 @@ +string('color_1',10)->nullable()->after('nombre'); + $table->string('color_2',10)->nullable()->after('color_1'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('cat_estatus_servicios', function (Blueprint $table) { + $table->dropColumn(['color_1', 'color_2']); + }); + } +} diff --git a/database/migrations/2018_08_22_090710_create_table_servicios_enc.php b/database/migrations/2018_08_22_090710_create_table_servicios_enc.php new file mode 100644 index 0000000..277e4b4 --- /dev/null +++ b/database/migrations/2018_08_22_090710_create_table_servicios_enc.php @@ -0,0 +1,61 @@ +increments('id'); + $table->integer('forma_pago_id')->unsigned(); + $table->dateTime('fecha_agenda'); + $table->integer('usuario_agenda_id')->unsigned(); + $table->integer('cliente_id')->unsigned(); + $table->integer('cliente_domicilio_id')->unsigned(); + $table->integer('sucursal_id')->unsigned(); + $table->timestamps(); + $table->softDeletes(); + + $table->foreign('forma_pago_id') + ->references('id') + ->on('cat_formas_pagos'); + + $table->foreign('usuario_agenda_id') + ->references('id') + ->on('users'); + + $table->foreign('cliente_id') + ->references('id') + ->on('clientes'); + + $table->foreign('cliente_domicilio_id') + ->references('id') + ->on('clientes_domicilios'); + + $table->foreign('sucursal_id') + ->references('id') + ->on('sucursales'); + }); + + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('servicios_enc'); + } +} diff --git a/database/migrations/2018_08_22_091038_create_table_servicios_det.php b/database/migrations/2018_08_22_091038_create_table_servicios_det.php new file mode 100644 index 0000000..e18d1bd --- /dev/null +++ b/database/migrations/2018_08_22_091038_create_table_servicios_det.php @@ -0,0 +1,75 @@ +increments('id'); + $table->integer('servicio_enc_id')->unsigned(); + $table->integer('servicio_id')->unsigned(); + $table->integer('estatus_servicio_id')->unsigned(); + $table->integer('tipo_servicio_id')->unsigned(); + $table->dateTime('fecha_solicitud'); + $table->time('duracion'); + $table->boolean('definido_cliente'); + $table->decimal('costo_servicio',14,2); + $table->integer('operador_id')->nullable()->unsigned(); + $table->integer('vehiculo_id')->nullable()->unsigned(); + $table->integer('auxiliar_1')->nullable()->unsigned(); + $table->integer('auxiliar_2')->nullable()->unsigned(); + $table->timestamps(); + + $table->foreign('servicio_enc_id') + ->references('id') + ->on('servicios_enc'); + + $table->foreign('auxiliar_1') + ->references('id') + ->on('users'); + + $table->foreign('auxiliar_2') + ->references('id') + ->on('users'); + + $table->foreign('servicio_id') + ->references('id') + ->on('cat_servicios'); + + $table->foreign('estatus_servicio_id') + ->references('id') + ->on('cat_estatus_servicios'); + + $table->foreign('tipo_servicio_id') + ->references('id') + ->on('cat_tipos_servicios'); + + $table->foreign('operador_id') + ->references('id') + ->on('users'); + + $table->foreign('vehiculo_id') + ->references('id') + ->on('cat_vehiculos'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('servicios_det'); + } +} diff --git a/database/migrations/2018_08_28_114907_alter_table_servicios_det_add_aceptado.php b/database/migrations/2018_08_28_114907_alter_table_servicios_det_add_aceptado.php new file mode 100644 index 0000000..631e72a --- /dev/null +++ b/database/migrations/2018_08_28_114907_alter_table_servicios_det_add_aceptado.php @@ -0,0 +1,33 @@ +boolean('aceptado')->nullable()->after('auxiliar_2'); + $table->string('observacion',255)->nullable()->after('aceptado'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('servicios_det', function (Blueprint $table) { + $table->dropColumn(['aceptado', 'observacion']); + }); + } +} diff --git a/database/migrations/2018_09_12_090851_alter_table_servicios_det_add_observacion.php b/database/migrations/2018_09_12_090851_alter_table_servicios_det_add_observacion.php new file mode 100644 index 0000000..c54210e --- /dev/null +++ b/database/migrations/2018_09_12_090851_alter_table_servicios_det_add_observacion.php @@ -0,0 +1,32 @@ +string('observacion_atencion_cliente',255)->nullable()->after('observacion'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('servicios_det', function (Blueprint $table) { + $table->dropColumn(['observacion_atencion_cliente']); + }); + } +} diff --git a/database/migrations/2018_09_12_121203_create_table_servicios_progreso.php b/database/migrations/2018_09_12_121203_create_table_servicios_progreso.php new file mode 100644 index 0000000..b9f5a43 --- /dev/null +++ b/database/migrations/2018_09_12_121203_create_table_servicios_progreso.php @@ -0,0 +1,53 @@ +increments('id'); + $table->integer('servicio_enc_id')->unsigned(); + $table->integer('servicio_det_id')->unsigned(); + $table->dateTime('fecha_ini_servidor'); + $table->dateTime('fecha_fin_servidor')->nullable(); + $table->dateTime('fecha_ini_celular'); + $table->dateTime('fecha_fin_celular')->nullable(); + $table->time('duracion')->nullable(); + $table->double('lat_ini'); + $table->double('lng_ini'); + $table->double('lat_fin')->nullable(); + $table->double('lng_fin')->nullable(); + $table->string('comentarios', 255)->nullable(); + $table->timestamps(); + + $table->foreign('servicio_enc_id') + ->references('id') + ->on('servicios_enc'); + + $table->foreign('servicio_det_id') + ->references('id') + ->on('servicios_det'); + + $table->unique(['servicio_enc_id', 'servicio_det_id']); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('servicios_progreso'); + } +} diff --git a/database/migrations/2018_09_12_122329_create_table_servicios_evidencias.php b/database/migrations/2018_09_12_122329_create_table_servicios_evidencias.php new file mode 100644 index 0000000..030aba2 --- /dev/null +++ b/database/migrations/2018_09_12_122329_create_table_servicios_evidencias.php @@ -0,0 +1,41 @@ +increments('id'); + $table->integer('servicio_progreso_id')->unsigned(); + $table->string('imagen', 255)->nullable(); + $table->string('uuid', 255); + $table->enum('etapa', ['Inicio', 'Proceso', 'Final']); + $table->double('lat'); + $table->double('lng'); + $table->timestamps(); + + $table->foreign('servicio_progreso_id') + ->references('id') + ->on('servicios_progreso'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('servicios_evidencias'); + } +} diff --git a/database/migrations/2018_09_21_102131_alter_table_servicios_progreso_add_firma.php b/database/migrations/2018_09_21_102131_alter_table_servicios_progreso_add_firma.php new file mode 100644 index 0000000..f47997b --- /dev/null +++ b/database/migrations/2018_09_21_102131_alter_table_servicios_progreso_add_firma.php @@ -0,0 +1,33 @@ +string('firma',255)->nullable()->after('comentarios'); + $table->string('pdf',255)->nullable()->after('firma'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('servicios_progreso', function (Blueprint $table) { + $table->dropColumn(['firma', 'pdf']); + }); + } +} diff --git a/database/migrations/2018_10_09_153725_create_table_cat_origenes.php b/database/migrations/2018_10_09_153725_create_table_cat_origenes.php new file mode 100644 index 0000000..a1e2e47 --- /dev/null +++ b/database/migrations/2018_10_09_153725_create_table_cat_origenes.php @@ -0,0 +1,33 @@ +increments('id'); + $table->string('nombre'); + $table->timestamps(); + $table->softDeletes(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::drop('cat_origenes'); + } +} diff --git a/database/migrations/2018_10_09_160724_alter_table_servicios_enc_add_origen_id.php b/database/migrations/2018_10_09_160724_alter_table_servicios_enc_add_origen_id.php new file mode 100644 index 0000000..a112253 --- /dev/null +++ b/database/migrations/2018_10_09_160724_alter_table_servicios_enc_add_origen_id.php @@ -0,0 +1,37 @@ +integer('origen_id')->unsigned()->after('sucursal_id'); + + $table->foreign('origen_id') + ->references('id') + ->on('cat_origenes'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('servicios_enc', function (Blueprint $table) { + $table->dropForeign(['origen_id']); + $table->dropColumn(['origen_id']); + }); + } +} diff --git a/database/migrations/2018_10_10_114830_create_table_preguntas_empresarial.php b/database/migrations/2018_10_10_114830_create_table_preguntas_empresarial.php new file mode 100644 index 0000000..b312dfe --- /dev/null +++ b/database/migrations/2018_10_10_114830_create_table_preguntas_empresarial.php @@ -0,0 +1,35 @@ +increments('id'); + $table->string('nombre'); + $table->integer('orden'); + $table->boolean('mostrar_numero'); + $table->timestamps(); + $table->softDeletes(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::drop('preguntas_empresarial'); + } +} diff --git a/database/migrations/2018_10_10_115619_create_table_respuestas_empresarial.php b/database/migrations/2018_10_10_115619_create_table_respuestas_empresarial.php new file mode 100644 index 0000000..4968c89 --- /dev/null +++ b/database/migrations/2018_10_10_115619_create_table_respuestas_empresarial.php @@ -0,0 +1,40 @@ +increments('id'); + $table->integer('pregunta_id')->unsigned(); + $table->string('nombre'); + $table->integer('orden'); + $table->enum('tipo_campo', ['Texto', 'Email', 'Fecha', 'Checkbox']); + $table->timestamps(); + $table->softDeletes(); + + $table->foreign('pregunta_id') + ->references('id') + ->on('preguntas_empresarial'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::drop('respuestas_empresarial'); + } +} diff --git a/database/migrations/2018_10_10_120433_create_table_preguntas_domestico.php b/database/migrations/2018_10_10_120433_create_table_preguntas_domestico.php new file mode 100644 index 0000000..5c8b7dd --- /dev/null +++ b/database/migrations/2018_10_10_120433_create_table_preguntas_domestico.php @@ -0,0 +1,35 @@ +increments('id'); + $table->string('nombre'); + $table->integer('orden'); + $table->boolean('mostrar_numero'); + $table->timestamps(); + $table->softDeletes(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::drop('preguntas_domestico'); + } +} diff --git a/database/migrations/2018_10_10_120444_create_table_respuestas_domestico.php b/database/migrations/2018_10_10_120444_create_table_respuestas_domestico.php new file mode 100644 index 0000000..7198ebf --- /dev/null +++ b/database/migrations/2018_10_10_120444_create_table_respuestas_domestico.php @@ -0,0 +1,40 @@ +increments('id'); + $table->integer('pregunta_id')->unsigned(); + $table->string('nombre'); + $table->integer('orden'); + $table->enum('tipo_campo', ['Texto', 'Email', 'Fecha', 'Checkbox']); + $table->timestamps(); + $table->softDeletes(); + + $table->foreign('pregunta_id') + ->references('id') + ->on('preguntas_domestico'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::drop('respuestas_domestico'); + } +} diff --git a/database/migrations/2018_10_10_164553_create_table_servicios_encuestas_domestico.php b/database/migrations/2018_10_10_164553_create_table_servicios_encuestas_domestico.php new file mode 100644 index 0000000..63f45af --- /dev/null +++ b/database/migrations/2018_10_10_164553_create_table_servicios_encuestas_domestico.php @@ -0,0 +1,48 @@ +increments('id'); + $table->integer('servicio_det_id')->unsigned(); + $table->integer('pregunta_id')->unsigned(); + $table->integer('respuesta_id')->nullable()->unsigned(); + $table->string('respuesta')->nullable(); + $table->timestamps(); + $table->softDeletes(); + + $table->foreign('servicio_det_id') + ->references('id') + ->on('servicios_det'); + + $table->foreign('pregunta_id') + ->references('id') + ->on('preguntas_domestico'); + + $table->foreign('respuesta_id') + ->references('id') + ->on('respuestas_domestico'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::drop('servicios_encuestas_domestico'); + } +} diff --git a/database/migrations/2018_10_10_164601_create_table_servicios_encuestas_empresarial.php b/database/migrations/2018_10_10_164601_create_table_servicios_encuestas_empresarial.php new file mode 100644 index 0000000..241a5fc --- /dev/null +++ b/database/migrations/2018_10_10_164601_create_table_servicios_encuestas_empresarial.php @@ -0,0 +1,48 @@ +increments('id'); + $table->integer('servicio_det_id')->unsigned(); + $table->integer('pregunta_id')->unsigned(); + $table->integer('respuesta_id')->nullable()->unsigned(); + $table->string('respuesta')->nullable(); + $table->timestamps(); + $table->softDeletes(); + + $table->foreign('servicio_det_id') + ->references('id') + ->on('servicios_det'); + + $table->foreign('pregunta_id') + ->references('id') + ->on('preguntas_empresarial'); + + $table->foreign('respuesta_id') + ->references('id') + ->on('respuestas_empresarial'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::drop('servicios_encuestas_empresarial'); + } +} diff --git a/database/migrations/2018_10_11_091119_alter_table_servicios_det_add_requiere_encuesta.php b/database/migrations/2018_10_11_091119_alter_table_servicios_det_add_requiere_encuesta.php new file mode 100644 index 0000000..3e3ffe9 --- /dev/null +++ b/database/migrations/2018_10_11_091119_alter_table_servicios_det_add_requiere_encuesta.php @@ -0,0 +1,32 @@ +boolean('requiere_encuesta')->after('observacion_atencion_cliente'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('servicios_det', function (Blueprint $table) { + $table->dropColumn(['requiere_encuesta']); + }); + } +} diff --git a/database/migrations/2018_10_11_150903_alter_table_bitacora_laboral_nullable.php b/database/migrations/2018_10_11_150903_alter_table_bitacora_laboral_nullable.php new file mode 100644 index 0000000..4c2e4b7 --- /dev/null +++ b/database/migrations/2018_10_11_150903_alter_table_bitacora_laboral_nullable.php @@ -0,0 +1,42 @@ +dropColumn('fecha_hora_ini'); + $table->dropColumn('kilometraje_inicial'); + $table->dropColumn('lat_ini'); + $table->dropColumn('lng_ini'); + }); + + Schema::table('bitacora_laboral', function (Blueprint $table) { + $table->dateTime('fecha_hora_ini')->nullable()->after('vehiculo_id'); + $table->integer('kilometraje_inicial')->nullable()->after('fecha_hora_fin'); + $table->double('lat_ini')->nullable()->after('kilometraje_final'); + $table->double('lng_ini')->nullable()->after('lat_ini'); + }); + + + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + // + } +} diff --git a/database/migrations/2018_10_12_150934_alter_table_respuestas_domestico_add_enum.php b/database/migrations/2018_10_12_150934_alter_table_respuestas_domestico_add_enum.php new file mode 100644 index 0000000..89640fe --- /dev/null +++ b/database/migrations/2018_10_12_150934_alter_table_respuestas_domestico_add_enum.php @@ -0,0 +1,42 @@ +dropColumn('tipo_campo'); + }); + + Schema::table('respuestas_empresarial', function (Blueprint $table) { + $table->dropColumn('tipo_campo'); + }); + + Schema::table('respuestas_domestico', function (Blueprint $table) { + $table->enum('tipo_campo', ['Texto', 'Email', 'Fecha', 'Checkbox', 'Numero', 'Moneda'])->after('orden'); + }); + + Schema::table('respuestas_empresarial', function (Blueprint $table) { + $table->enum('tipo_campo', ['Texto', 'Email', 'Fecha', 'Checkbox', 'Numero', 'Moneda'])->after('orden'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + // + } +} diff --git a/database/migrations/2018_10_15_162514_alter_table_respuestas_domestico_respuestas_empresarial_add_puntuacion.php b/database/migrations/2018_10_15_162514_alter_table_respuestas_domestico_respuestas_empresarial_add_puntuacion.php new file mode 100644 index 0000000..31ca906 --- /dev/null +++ b/database/migrations/2018_10_15_162514_alter_table_respuestas_domestico_respuestas_empresarial_add_puntuacion.php @@ -0,0 +1,40 @@ +integer('puntuacion')->nullable()->after('tipo_campo'); + }); + + Schema::table('respuestas_empresarial', function (Blueprint $table) { + $table->integer('puntuacion')->nullable()->after('tipo_campo'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('respuestas_domestico', function (Blueprint $table) { + $table->dropColumn('puntuacion'); + }); + + Schema::table('respuestas_empresarial', function (Blueprint $table) { + $table->dropColumn('puntuacion'); + }); + } +} diff --git a/database/migrations/2018_11_23_131906_alter_table_clientes_domicilios_change_cp_null.php b/database/migrations/2018_11_23_131906_alter_table_clientes_domicilios_change_cp_null.php new file mode 100644 index 0000000..4dd7c53 --- /dev/null +++ b/database/migrations/2018_11_23_131906_alter_table_clientes_domicilios_change_cp_null.php @@ -0,0 +1,30 @@ +string('cp')->nullable()->change(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + + } +} diff --git a/database/migrations/2018_11_27_152155_alter_table_clientes_clientes_domicilios_add_email.php b/database/migrations/2018_11_27_152155_alter_table_clientes_clientes_domicilios_add_email.php new file mode 100644 index 0000000..763cfc8 --- /dev/null +++ b/database/migrations/2018_11_27_152155_alter_table_clientes_clientes_domicilios_add_email.php @@ -0,0 +1,40 @@ +string('email')->nullable()->after('requiere_factura'); + }); + + Schema::table('clientes_domicilios', function (Blueprint $table) { + $table->string('email')->nullable()->after('lng'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('clientes', function (Blueprint $table) { + $table->dropColumn(['email']); + }); + + Schema::table('clientes_domicilios', function (Blueprint $table) { + $table->dropColumn(['email']); + }); + } +} diff --git a/database/migrations/2019_03_04_153533_alter_table_preguntas_empresarial_preguntas_domestico_add_obligatorio.php b/database/migrations/2019_03_04_153533_alter_table_preguntas_empresarial_preguntas_domestico_add_obligatorio.php new file mode 100644 index 0000000..fbba766 --- /dev/null +++ b/database/migrations/2019_03_04_153533_alter_table_preguntas_empresarial_preguntas_domestico_add_obligatorio.php @@ -0,0 +1,40 @@ +boolean('obligatorio')->default(1)->after('mostrar_numero'); + }); + + Schema::table('preguntas_empresarial', function (Blueprint $table) { + $table->boolean('obligatorio')->default(1)->after('mostrar_numero'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('preguntas_domestico', function (Blueprint $table) { + $table->dropColumn('obligatorio'); + }); + + Schema::table('preguntas_empresarial', function (Blueprint $table) { + $table->dropColumn('obligatorio'); + }); + } +} diff --git a/database/migrations/2019_04_11_165513_alter_table_servicios_progreso_add_aplica_garantia.php b/database/migrations/2019_04_11_165513_alter_table_servicios_progreso_add_aplica_garantia.php new file mode 100644 index 0000000..67fa4af --- /dev/null +++ b/database/migrations/2019_04_11_165513_alter_table_servicios_progreso_add_aplica_garantia.php @@ -0,0 +1,32 @@ +boolean('aplica_garantia')->default(false)->after('pdf'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('servicios_progreso', function (Blueprint $table) { + $table->dropColumn(['aplica_garantia']); + }); + } +} diff --git a/database/migrations/2019_04_24_130937_alter_table_cat_tipos_vehiculos_add_objetivo_mensual.php b/database/migrations/2019_04_24_130937_alter_table_cat_tipos_vehiculos_add_objetivo_mensual.php new file mode 100644 index 0000000..e022326 --- /dev/null +++ b/database/migrations/2019_04_24_130937_alter_table_cat_tipos_vehiculos_add_objetivo_mensual.php @@ -0,0 +1,32 @@ +integer('objetivo_mensual')->default(0)->after('nombre'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('cat_tipos_vehiculos', function (Blueprint $table) { + $table->dropColumn(['objetivo_mensual']); + }); + } +} diff --git a/database/migrations/2019_04_29_170113_alter_table_cat_vehiculos_add_descripcion.php b/database/migrations/2019_04_29_170113_alter_table_cat_vehiculos_add_descripcion.php new file mode 100644 index 0000000..84e37ff --- /dev/null +++ b/database/migrations/2019_04_29_170113_alter_table_cat_vehiculos_add_descripcion.php @@ -0,0 +1,32 @@ +string('descripcion', 100)->nullable()->after('num_economico'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('cat_vehiculos', function (Blueprint $table) { + $table->dropColumn(['descripcion']); + }); + } +} diff --git a/database/migrations/2019_04_29_170242_alter_table_cat_formas_pagos_add_permitezero.php b/database/migrations/2019_04_29_170242_alter_table_cat_formas_pagos_add_permitezero.php new file mode 100644 index 0000000..c43470f --- /dev/null +++ b/database/migrations/2019_04_29_170242_alter_table_cat_formas_pagos_add_permitezero.php @@ -0,0 +1,32 @@ +char('zeros', 1)->default('0')->nullable()->after('nombre'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('cat_formas_pagos', function (Blueprint $table) { + $table->dropColumn(['zeros']); + }); + } +} diff --git a/database/migrations/2019_06_07_150455_create_table_respuestas_operador.php b/database/migrations/2019_06_07_150455_create_table_respuestas_operador.php new file mode 100644 index 0000000..088e615 --- /dev/null +++ b/database/migrations/2019_06_07_150455_create_table_respuestas_operador.php @@ -0,0 +1,47 @@ +increments('id'); + $table->integer('user_id')->unsigned(); + $table->string('nombre'); + $table->enum('tipo', ['REVISION', 'MATERIAL','HERRAMIENTAS']); + $table->boolean('tipo_checkbox'); + $table->boolean('tipo_text'); + $table->boolean('tipo_radio_btn'); + $table->boolean('respuesta_checkbox'); + $table->string('respuesta_text'); + $table->string('respuesta_radio_btn'); + $table->date('fecha'); + $table->timestamps(); + + $table->foreign('user_id') + ->references('id') + ->on('users'); + }); + + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::drop('respuestas_operador'); + } +} diff --git a/database/migrations/2019_06_10_113955_alter_table_respuestas_operador_reestructuracion.php b/database/migrations/2019_06_10_113955_alter_table_respuestas_operador_reestructuracion.php new file mode 100644 index 0000000..d1945a0 --- /dev/null +++ b/database/migrations/2019_06_10_113955_alter_table_respuestas_operador_reestructuracion.php @@ -0,0 +1,61 @@ +increments('id'); + $table->integer('user_id')->unsigned(); + $table->date('fecha'); + $table->timestamps(); + + $table->foreign('user_id') + ->references('id') + ->on('users'); + }); + + Schema::create('respuestas_operador_det', function (Blueprint $table) + { + $table->increments('id'); + $table->integer('respuestas_operador_enc_id')->unsigned(); + $table->string('nombre'); + $table->enum('tipo', ['REVISION', 'MATERIAL','HERRAMIENTA']); + $table->boolean('tipo_checkbox'); + $table->boolean('tipo_text'); + $table->boolean('tipo_radio_btn'); + $table->boolean('respuesta_checkbox')->nullable(); + $table->string('respuesta_text')->nullable(); + $table->string('respuesta_radio_btn')->nullable(); + $table->timestamps(); + + $table->foreign('respuestas_operador_enc_id') + ->references('id') + ->on('respuestas_operador_enc'); + }); + + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('respuestas_operador_det'); + Schema::dropIfExists('respuestas_operador_enc'); + } +} diff --git a/database/migrations/2019_10_01_150527_alter_table_servicios_encuestas_domestico_servicios_encuestas_empresarial_change_lenght.php b/database/migrations/2019_10_01_150527_alter_table_servicios_encuestas_domestico_servicios_encuestas_empresarial_change_lenght.php new file mode 100644 index 0000000..d9ec598 --- /dev/null +++ b/database/migrations/2019_10_01_150527_alter_table_servicios_encuestas_domestico_servicios_encuestas_empresarial_change_lenght.php @@ -0,0 +1,40 @@ +string('respuesta', 255)->nullable()->change(); + }); + + Schema::table('servicios_encuestas_empresarial', function (Blueprint $table) { + $table->string('respuesta', 255)->nullable()->change(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('servicios_encuestas_domestico', function (Blueprint $table) { + $table->string('respuesta', 255)->nullable()->change(); + }); + + Schema::table('servicios_encuestas_empresarial', function (Blueprint $table) { + $table->string('respuesta', 255)->nullable()->change(); + }); + } +} diff --git a/database/migrations/2019_10_01_163413_alter_table_users_add_permisos_especiales.php b/database/migrations/2019_10_01_163413_alter_table_users_add_permisos_especiales.php new file mode 100644 index 0000000..4d9c941 --- /dev/null +++ b/database/migrations/2019_10_01_163413_alter_table_users_add_permisos_especiales.php @@ -0,0 +1,32 @@ +boolean('permiso_especial')->default(0)->after('permissions'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('users', function (Blueprint $table) { + $table->dropColumn(['permiso_especial']); + }); + } +} diff --git a/database/migrations/2019_10_08_163334_alter_table_servicios_progreso_add_litraje.php b/database/migrations/2019_10_08_163334_alter_table_servicios_progreso_add_litraje.php new file mode 100644 index 0000000..70c63b4 --- /dev/null +++ b/database/migrations/2019_10_08_163334_alter_table_servicios_progreso_add_litraje.php @@ -0,0 +1,32 @@ +integer('litraje')->nullable()->after('aplica_garantia'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('servicios_progreso', function (Blueprint $table) { + $table->dropColumn(['litraje']); + }); + } +} diff --git a/database/migrations/2020_02_11_150947_alter_table_servicios_det_add_facturado.php b/database/migrations/2020_02_11_150947_alter_table_servicios_det_add_facturado.php new file mode 100644 index 0000000..d71ae90 --- /dev/null +++ b/database/migrations/2020_02_11_150947_alter_table_servicios_det_add_facturado.php @@ -0,0 +1,32 @@ +boolean('facturado')->default(0)->after('requiere_encuesta'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('servicios_det', function (Blueprint $table) { + $table->dropColumn(['facturado']); + }); + } +} diff --git a/database/migrations/2020_06_15_133421_create_table_cat_motivos_estatus_negativo.php b/database/migrations/2020_06_15_133421_create_table_cat_motivos_estatus_negativo.php new file mode 100644 index 0000000..30ada37 --- /dev/null +++ b/database/migrations/2020_06_15_133421_create_table_cat_motivos_estatus_negativo.php @@ -0,0 +1,33 @@ +increments('id'); + $table->string('nombre'); + $table->timestamps(); + $table->softDeletes(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('cat_motivos_estatus'); + } +} diff --git a/database/migrations/2020_06_15_140718_alter_table_servicios_det_add_id_cat_motivos_estatus.php b/database/migrations/2020_06_15_140718_alter_table_servicios_det_add_id_cat_motivos_estatus.php new file mode 100644 index 0000000..023eb01 --- /dev/null +++ b/database/migrations/2020_06_15_140718_alter_table_servicios_det_add_id_cat_motivos_estatus.php @@ -0,0 +1,37 @@ +integer('cat_motivos_estatus_id')->unsigned()->nullable()->after('estatus_servicio_id'); + + $table->foreign('cat_motivos_estatus_id') + ->references('id') + ->on('cat_motivos_estatus'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('servicios_det', function (Blueprint $table) { + $table->dropForeign(['cat_motivos_estatus_id']); + $table->dropColumn(['cat_motivos_estatus_id']); + }); + } +} diff --git a/database/migrations/2020_08_12_094226_alter_table_servicios_progreso_add_type_text.php b/database/migrations/2020_08_12_094226_alter_table_servicios_progreso_add_type_text.php new file mode 100644 index 0000000..f5e07e4 --- /dev/null +++ b/database/migrations/2020_08_12_094226_alter_table_servicios_progreso_add_type_text.php @@ -0,0 +1,32 @@ +text('comentarios')->nullable()->change(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('servicios_progreso', function (Blueprint $table) { + $table->text('comentarios')->nullable()->change(); + }); + } +} diff --git a/database/migrations/2020_08_19_101257_add_dispositivo_id_to_users_table.php b/database/migrations/2020_08_19_101257_add_dispositivo_id_to_users_table.php new file mode 100644 index 0000000..3f4dc38 --- /dev/null +++ b/database/migrations/2020_08_19_101257_add_dispositivo_id_to_users_table.php @@ -0,0 +1,33 @@ +text('dispositivo_id')->nullable()->after('token_firebase'); + + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('users', function (Blueprint $table) { + $table->dropColumn(['dispositivo_id']); + }); + } +} diff --git a/database/migrations/2020_08_21_092157_create_table_vehiculos_incidencias.php b/database/migrations/2020_08_21_092157_create_table_vehiculos_incidencias.php new file mode 100644 index 0000000..3753eb9 --- /dev/null +++ b/database/migrations/2020_08_21_092157_create_table_vehiculos_incidencias.php @@ -0,0 +1,44 @@ +increments('id'); + $table->integer('vehiculo_id')->unsigned(); + $table->integer('user_id')->unsigned(); + $table->string('descripcion'); + $table->boolean('resuelta')->default(false); + $table->timestamps(); + $table->softDeletes(); + + $table->foreign('vehiculo_id') + ->references('id') + ->on('cat_vehiculos'); + + $table->foreign('user_id') + ->references('id') + ->on('users'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('vehiculos_incidencias'); + } +} diff --git a/database/migrations/2021_09_02_124753_alter_table_servicios_progreso_add_encuesta_contestada.php b/database/migrations/2021_09_02_124753_alter_table_servicios_progreso_add_encuesta_contestada.php new file mode 100644 index 0000000..898f2ba --- /dev/null +++ b/database/migrations/2021_09_02_124753_alter_table_servicios_progreso_add_encuesta_contestada.php @@ -0,0 +1,33 @@ +boolean('encuesta_contestada')->default(false)->after('servicio_negativo'); + + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('servicios_progreso', function (Blueprint $table) { + $table->dropColumn(['encuesta_contestada']); + }); + } +} diff --git a/database/migrations/2022_03_22_183731_alter_table_servicios_det_change_observacion_atencion_cliente.php b/database/migrations/2022_03_22_183731_alter_table_servicios_det_change_observacion_atencion_cliente.php new file mode 100644 index 0000000..6890b1c --- /dev/null +++ b/database/migrations/2022_03_22_183731_alter_table_servicios_det_change_observacion_atencion_cliente.php @@ -0,0 +1,32 @@ +text('observacion_atencion_cliente')->change(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('servicios_det', function (Blueprint $table) { + $table->string('observacion_atencion_cliente')->change(); + }); + } +} diff --git a/database/migrations/2023_03_03_103418_create_users_logins_logs_table.php b/database/migrations/2023_03_03_103418_create_users_logins_logs_table.php new file mode 100644 index 0000000..47f6052 --- /dev/null +++ b/database/migrations/2023_03_03_103418_create_users_logins_logs_table.php @@ -0,0 +1,40 @@ +bigIncrements('id'); + $table->unsignedInteger('user_id'); + $table->string('device_info')->nullable(); + $table->string('browser_info')->nullable(); + $table->string('ip')->nullable(); + $table->string('request_uri')->nullable(); + $table->timestamps(); + + $table->foreign('user_id') + ->references('id') + ->on('users'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('users_logins_logs'); + } +} diff --git a/database/migrations/2023_04_12_093420_create_table_correos_sucursales.php b/database/migrations/2023_04_12_093420_create_table_correos_sucursales.php new file mode 100644 index 0000000..48c957f --- /dev/null +++ b/database/migrations/2023_04_12_093420_create_table_correos_sucursales.php @@ -0,0 +1,37 @@ +bigIncrements('id'); + $table->string('email'); + $table->unsignedInteger('sucursal_id'); + $table->timestamps(); + + $table->foreign('sucursal_id') + ->references('id') + ->on('sucursales'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('correos_sucursales'); + } +} diff --git a/database/migrations/2023_04_12_120819_alter_table_sucursales_add_costo_negativo.php b/database/migrations/2023_04_12_120819_alter_table_sucursales_add_costo_negativo.php new file mode 100644 index 0000000..3acdbff --- /dev/null +++ b/database/migrations/2023_04_12_120819_alter_table_sucursales_add_costo_negativo.php @@ -0,0 +1,32 @@ +decimal('costo_negativo', 14,2)->after('encargado')->default('350'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('sucursales', function (Blueprint $table) { + $table->dropColumn('costo_negativo'); + }); + } +} diff --git a/database/migrations/2023_04_17_164646_alter_table_clientes_domicilios_add_nombre_croquis.php b/database/migrations/2023_04_17_164646_alter_table_clientes_domicilios_add_nombre_croquis.php new file mode 100644 index 0000000..21b1577 --- /dev/null +++ b/database/migrations/2023_04_17_164646_alter_table_clientes_domicilios_add_nombre_croquis.php @@ -0,0 +1,32 @@ +string('nombre_croquis')->after('email')->nullable(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('clientes_domicilios', function (Blueprint $table) { + $table->dropColumn('nombre_croquis'); + }); + } +} diff --git a/database/migrations/2023_05_04_164350_alter_table_cat_estatus_servicios_add_color_web.php b/database/migrations/2023_05_04_164350_alter_table_cat_estatus_servicios_add_color_web.php new file mode 100644 index 0000000..f52caa9 --- /dev/null +++ b/database/migrations/2023_05_04_164350_alter_table_cat_estatus_servicios_add_color_web.php @@ -0,0 +1,32 @@ +string('color_web', 10)->after('color_2')->default("#D1E8FF"); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('cat_estatus_servicios', function (Blueprint $table) { + $table->dropColumn('color_web'); + }); + } +} \ No newline at end of file diff --git a/database/seeds/CatFacturacion.php b/database/seeds/CatFacturacion.php new file mode 100644 index 0000000..2126353 --- /dev/null +++ b/database/seeds/CatFacturacion.php @@ -0,0 +1,82 @@ +insert([ + [ + 'clave' => '01', + 'descripcion' => 'Efectivo', + ], + [ + 'clave' => '02', + 'descripcion' => 'Cheque nominativo', + ], + [ + 'clave' => '03', + 'descripcion' => 'Transferencia electrónica de fondos', + ], + [ + 'clave' => '04', + 'descripcion' => 'Tarjeta de crédito', + ], + [ + 'clave' => '14', + 'descripcion' => 'Pago por consignación', + ], + [ + 'clave' => '28', + 'descripcion' => 'Tarjeta de débito', + ], + [ + 'clave' => '30', + 'descripcion' => 'Aplicación de anticipos', + ], + [ + 'clave' => '99', + 'descripcion' => 'Por definir', + ], + ]); + + DB::table('facturas_metodos_pago')->insert([ + [ + 'clave' => 'PUE', + 'descripcion' => 'Pago en una sola exhibición', + ], + [ + 'clave' => 'PPD', + 'descripcion' => 'Pago en parcialidades o diferido', + ], + ]); + + DB::table('facturas_tipo_comprobante')->insert([ + [ + 'clave' => 'I', + 'descripcion' => 'Ingreso', + ], + ]); + + DB::table('facturas_uso_cfdi')->insert([ + [ + 'clave' => 'G01', + 'descripcion' => 'Adquisición de mercancias', + ], + [ + 'clave' => 'G03', + 'descripcion' => 'Gastos en general', + ], + [ + 'clave' => 'P01', + 'descripcion' => 'Por definir', + ], + ]); + } +} diff --git a/database/seeds/CatMotivosEstatusSeeder.php b/database/seeds/CatMotivosEstatusSeeder.php new file mode 100644 index 0000000..a68759b --- /dev/null +++ b/database/seeds/CatMotivosEstatusSeeder.php @@ -0,0 +1,38 @@ +insert([ + [ + 'nombre' => 'Nivel en calle / Pozos de visita llenos', + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString() + ], + [ + 'nombre' => 'Tubería dañada', + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString() + ], + [ + 'nombre' => 'Registros ocultos', + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString() + ], + [ + 'nombre' => 'Registro sellado', + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString() + ] + ]); + } +} diff --git a/database/seeds/CatMotivosEstatusUpdateSeeder.php b/database/seeds/CatMotivosEstatusUpdateSeeder.php new file mode 100644 index 0000000..d62e1bd --- /dev/null +++ b/database/seeds/CatMotivosEstatusUpdateSeeder.php @@ -0,0 +1,58 @@ +insert([ + [ + 'nombre' => 'Cliente canceló', + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString() + ], + [ + 'nombre' => 'Cliente no se encuentra', + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString() + ], + [ + 'nombre' => 'Cliente resolvió', + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString() + ], + [ + 'nombre' => 'Negocio cerrado', + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString() + ], + [ + 'nombre' => 'Cliente reprogramó', + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString() + ], + [ + 'nombre' => 'Tubería con raíces', + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString() + ], + [ + 'nombre' => 'Requiere succión', + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString() + ], + [ + 'nombre' => 'Domicilio no localizado', + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString() + ] + ]); + } +} diff --git a/database/seeds/CatOrigenesTableSeeder.php b/database/seeds/CatOrigenesTableSeeder.php new file mode 100644 index 0000000..e9376bf --- /dev/null +++ b/database/seeds/CatOrigenesTableSeeder.php @@ -0,0 +1,69 @@ +insert([ + + [ + 'nombre' => 'Llamada Telefónica', + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => 'Correo electrónico', + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => 'Punto de venta', + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => 'Recomendación', + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => 'Internet', + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => 'Sección amarilla', + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => 'Publicidad visual', + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => 'Plomero', + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => 'Sitio web', + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => 'JAPAC', + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ] + ]); + } +} \ No newline at end of file diff --git a/database/seeds/ClientesTableSeeder.php b/database/seeds/ClientesTableSeeder.php new file mode 100644 index 0000000..eb2c1df --- /dev/null +++ b/database/seeds/ClientesTableSeeder.php @@ -0,0 +1,73 @@ + $faker->company, + 'asesor_id' => $faker->numberBetween(4,5), + 'requiere_factura' => 1, + 'sucursal_id' => $faker->numberBetween(1,2) + ]; + + $cliente = \App\Models\Cliente::create($data_cliente); + + $data_cliente_domicilio = [ + 'cliente_id' => $cliente->id, + 'nombre_sucursal' => $faker->company, + 'numero_sucursal' => $faker->numberBetween(1,100), + 'nombre_responsable_sucursal' => $faker->firstNameFemale.' '.$faker->lastName, + 'calle' => $faker->streetName, + 'entre_calles' => $faker->streetName.' and '.$faker->streetName, + 'num_ext' => $faker->numberBetween(1000,5000), + 'num_int' => $faker->numberBetween(1000,5000), + 'colonia' => $faker->cityPrefix, + 'ciudad' => $faker->city, + 'cp' => $faker->postcode, + 'telefono' => $faker->bothify('667#######'), + 'celular_responsable' => $faker->bothify('667#######'), + 'lat' => $faker->latitude($min = 21, $max = 26), + 'lng' => $faker->longitude($min = -101, $max = -106) + ]; + + \App\Models\ClienteDomicilio::create($data_cliente_domicilio); + + $data_cliente_datos_fiscales = [ + 'cliente_id' => $cliente->id, + 'razon_social' => $faker->catchPhrase, + 'rfc' => $faker->isbn13, + 'email' => $faker->freeEmail, + 'calle' => $faker->streetName, + 'num_ext' => $faker->numberBetween(1000,5000), + 'num_int' => $faker->numberBetween(1000,5000), + 'colonia' => $faker->cityPrefix, + 'localidad' => $faker->cityPrefix, + 'municipio' => $faker->country, + 'estado' => $faker->state, + 'pais' => $faker->city, + 'cp' => $faker->postcode, + 'factura_uso_cfdi_id' => $faker->numberBetween(1,3), + 'factura_tipo_comprobante_id' => 1, + 'factura_metodos_pago_id' => $faker->numberBetween(1,2), + 'factura_formas_pago_id' => $faker->numberBetween(1,8), + 'condicion_pago' => $faker->sentence($nbWords = 2, $variableNbWords = true), + 'retencion_iva' => $faker->numberBetween(0,1), + 'observacion' => $faker->sentence($nbWords = 10, $variableNbWords = true), + ]; + + \App\Models\ClienteDatoFiscal::create($data_cliente_datos_fiscales); + } + + } +} diff --git a/database/seeds/ColoresWebEstatusServicio.php b/database/seeds/ColoresWebEstatusServicio.php new file mode 100644 index 0000000..2dbb397 --- /dev/null +++ b/database/seeds/ColoresWebEstatusServicio.php @@ -0,0 +1,31 @@ +id)->update(['color_web' => $this->colores()[$e->id]]); + } + } + + function colores(){ + return [ + 1 => "#5BB55B", + 2 => "#FFBF80", + 3 => "#B55B5B", + 4 => "#FDF1BA", + 5 => "#FC7E7E", + 6 => "#8080FF", + 7 => "#A3A3A3", + ]; + } +} diff --git a/database/seeds/CorreosSucursalesTableSeeder.php b/database/seeds/CorreosSucursalesTableSeeder.php new file mode 100644 index 0000000..02790b6 --- /dev/null +++ b/database/seeds/CorreosSucursalesTableSeeder.php @@ -0,0 +1,54 @@ +insert([ + [ + 'email' => 'guillermo@drenax.com.mx', + 'sucursal_id' => 1, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'email' => 'bladimir@drenax.com.mx', + 'sucursal_id' => 1, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'email' => 'supervisorcln@drenax.com.mx', + 'sucursal_id' => 1, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'email' => 'sergio@drenax.com.mx', + 'sucursal_id' => 2, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'email' => 'gerencialosmochis@drenax.com.mx', + 'sucursal_id' => 2, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'email' => 'marcela@drenax.com.mx', + 'sucursal_id' => 3, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ] + ]); + } +} diff --git a/database/seeds/DatabaseSeeder.php b/database/seeds/DatabaseSeeder.php new file mode 100644 index 0000000..1302e39 --- /dev/null +++ b/database/seeds/DatabaseSeeder.php @@ -0,0 +1,40 @@ +call(TiposServiciosTableSeeder::class); + $this->call(ServiciosTableSeeder::class); + $this->call(FormasPagosTableSeeder::class); + $this->call(EstatusServiciosTableSeeder::class); + $this->call(TiposVehiculosTableSeeder::class); + $this->call(VehiculosTableSeeder::class); + $this->call(TiposEmpleadosTableSeeder::class); + $this->call(SucursalesTableSeeder::class); + $this->call(RolesTableSeeder::class); + $this->call(UsersTableSeeder::class); + $this->call(CatFacturacion::class); + //$this->call(ClientesTableSeeder::class); + //$this->call(SolicitudesServicioTableSeeder::class); + $this->call(ParametrosTableSeeder::class); + $this->call(VehiculosSucursalesTableSeeder::class); + $this->call(CatOrigenesTableSeeder::class); + + $this->call(PreguntasEmpresarialTableSeeder::class); + $this->call(RespuestasEmpresarialTableSeeder::class); + + $this->call(PreguntasDomesticoTableSeeder::class); + $this->call(RespuestasDomesticoTableSeeder::class); + + $this->call(PreguntasRespuestasNuevasTableSeeder::class); + $this->call(ColoresWebEstatusServicio::class); + } +} \ No newline at end of file diff --git a/database/seeds/EstatusServiciosTableSeeder.php b/database/seeds/EstatusServiciosTableSeeder.php new file mode 100644 index 0000000..ee07e2e --- /dev/null +++ b/database/seeds/EstatusServiciosTableSeeder.php @@ -0,0 +1,68 @@ +insert([ + + [ + 'nombre' => 'Realizado', + 'color_1' => '#04B404', + 'color_2' => NULL, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => 'Reprogramado', + 'color_1' => '#FF8000', + 'color_2' => NULL, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => 'Cancelado', + 'color_1' => '#B40404', + 'color_2' => NULL, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => 'Pendiente', + 'color_1' => '#FFFF00', + 'color_2' => '#000000', + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => 'Negativo', + 'color_1' => '#FE2E2E', + 'color_2' => '#FFFFFF', + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => 'Pagado', + 'color_1' => '#0000FF', + 'color_2' => NULL, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => 'Visita/asesoría', + 'color_1' => '#A4A4A4', + 'color_2' => NULL, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + ]); + } +} diff --git a/database/seeds/FormasPagosTableSeeder.php b/database/seeds/FormasPagosTableSeeder.php new file mode 100644 index 0000000..fab7218 --- /dev/null +++ b/database/seeds/FormasPagosTableSeeder.php @@ -0,0 +1,49 @@ +insert([ + + [ + 'nombre' => 'Efectivo', + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => 'Garantía', + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => 'Terminal', + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => 'Cotización', + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => 'Transferencia', + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => 'Cheque', + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + ]); + } +} diff --git a/database/seeds/ParametrosTableSeeder.php b/database/seeds/ParametrosTableSeeder.php new file mode 100644 index 0000000..c424a35 --- /dev/null +++ b/database/seeds/ParametrosTableSeeder.php @@ -0,0 +1,29 @@ +insert([ + [ + 'llave' => 'INTERVALO_GEOLOCALIZACION_OPERADOR_MINUTOS', + 'valor' => '3', + ], + [ + 'llave' => 'ANCLAJE_SERVICIO_HORAS', + 'valor' => '3', + ], + [ + 'llave' => 'CURRENT_VERSION_APPLICATION', + 'valor' => '0.40', + ] + ]); + } +} diff --git a/database/seeds/PreguntasDomesticoTableSeeder.php b/database/seeds/PreguntasDomesticoTableSeeder.php new file mode 100644 index 0000000..47d1fe8 --- /dev/null +++ b/database/seeds/PreguntasDomesticoTableSeeder.php @@ -0,0 +1,95 @@ +insert([ + [ + 'nombre' => '¿El personal se presentó y mostró la orden de trabajo previo a la realización de su servicio?', + 'orden' => 1, + 'mostrar_numero' => 1, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => '¿Cómo califica la puntualidad de nuestro personal?', + 'orden' => 2, + 'mostrar_numero' => 1, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => '¿Cómo califica la imagen de nuestro personal?', + 'orden' => 3, + 'mostrar_numero' => 1, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => '¿El asesor usó los instrumentos de seguridad e higiene para la correcta ejecución del servicio?', + 'orden' => 4, + 'mostrar_numero' => 1, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => '¿Cómo califica la atención y asesoría brindada por los asesores?', + 'orden' => 5, + 'mostrar_numero' => 1, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => '¿El servicio fue efectivo quedando conforme con lo que contrató?', + 'orden' => 6, + 'mostrar_numero' => 1, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => '¿Cómo califica la atención y asesoría telefónica?', + 'orden' => 7, + 'mostrar_numero' => 1, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => 'De acuerdo al servicio recibido, ¿usted nos recomendaría?', + 'orden' => 8, + 'mostrar_numero' => 1, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => '¿Cuánto pagó por su servicio?', + 'orden' => 9, + 'mostrar_numero' => 1, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => 'Correo:', + 'orden' => 10, + 'mostrar_numero' => 0, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => 'Fecha de nacimiento:', + 'orden' => 11, + 'mostrar_numero' => 0, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + ]); + } +} diff --git a/database/seeds/PreguntasEmpresarialTableSeeder.php b/database/seeds/PreguntasEmpresarialTableSeeder.php new file mode 100644 index 0000000..aff45d8 --- /dev/null +++ b/database/seeds/PreguntasEmpresarialTableSeeder.php @@ -0,0 +1,102 @@ +insert([ + [ + 'nombre' => '¿Su servicio fue programado en tiempo y forma?', + 'orden' => 1, + 'mostrar_numero' => 1, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => '¿El asesor de operaciones realiza recibo de servicio, y es llenado correctamente hora de inicio y hora final?', + 'orden' => 2, + 'mostrar_numero' => 1, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => '¿Cómo califica la imagen del personal?', + 'orden' => 3, + 'mostrar_numero' => 1, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => '¿El asesor usó los instrumentos de seguridad e higiene para la correcta ejecución del servicio?', + 'orden' => 4, + 'mostrar_numero' => 1, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => '¿Cómo califica la atención y asesoría brindada por los asesores de operaciones?', + 'orden' => 5, + 'mostrar_numero' => 1, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => '¿Cómo califica la calidad del servicio contratado?', + 'orden' => 6, + 'mostrar_numero' => 1, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => '¿Cómo califica la atención y asesoría telefónica?', + 'orden' => 7, + 'mostrar_numero' => 1, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => '¿Recibió su factura del mes en tiempo y forma?', + 'orden' => 8, + 'mostrar_numero' => 1, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => '¿Cómo califica nuestra área de cobranza?', + 'orden' => 9, + 'mostrar_numero' => 1, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => '¿Cómo califica en general a la empresa DRENAX?', + 'orden' => 10, + 'mostrar_numero' => 1, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => 'Correo:', + 'orden' => 11, + 'mostrar_numero' => 0, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => 'Fecha de nacimiento:', + 'orden' => 12, + 'mostrar_numero' => 0, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + ]); + } +} diff --git a/database/seeds/PreguntasRespuestasNuevasTableSeeder.php b/database/seeds/PreguntasRespuestasNuevasTableSeeder.php new file mode 100644 index 0000000..ece8200 --- /dev/null +++ b/database/seeds/PreguntasRespuestasNuevasTableSeeder.php @@ -0,0 +1,69 @@ +insert([ + [ + 'nombre' => 'Comentarios:', + 'orden' => 12, + 'mostrar_numero' => 0, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ] + ]); + + DB::table('preguntas_empresarial')->insert([ + [ + 'nombre' => 'Comentarios:', + 'orden' => 13, + 'mostrar_numero' => 0, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ] + ]); + + DB::table('respuestas_domestico')->insert([ + + //Respuesta 12 + [ + 'nombre' => '', + 'pregunta_id' => 12, + 'orden' => 1, + 'tipo_campo' => 'Texto', + 'puntuacion' => null, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + ]); + + DB::table('respuestas_empresarial')->insert([ + + //Respuesta 13 + [ + 'nombre' => '', + 'pregunta_id' => 13, + 'orden' => 1, + 'tipo_campo' => 'Texto', + 'puntuacion' => null, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + ]); + + \App\Models\RespuestaDomestico::where('pregunta_id',1)->delete(); + \App\Models\PreguntaDomestico::where('id',1)->delete(); + + \App\Models\RespuestaEmpresarial::where('pregunta_id',2)->delete(); + \App\Models\PreguntaEmpresarial::where('id',2)->delete(); + } +} diff --git a/database/seeds/RespuestasDomesticoTableSeeder.php b/database/seeds/RespuestasDomesticoTableSeeder.php new file mode 100644 index 0000000..d6df01d --- /dev/null +++ b/database/seeds/RespuestasDomesticoTableSeeder.php @@ -0,0 +1,319 @@ +insert([ + + //Respuesta 1 + [ + 'nombre' => 'Si', + 'pregunta_id' => 1, + 'orden' => 1, + 'tipo_campo' => 'Checkbox', + 'puntuacion' => 100, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => 'No', + 'pregunta_id' => 1, + 'orden' => 2, + 'tipo_campo' => 'Checkbox', + 'puntuacion' => 50, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + + //Respuesta 2 + [ + 'nombre' => 'Excelente', + 'pregunta_id' => 2, + 'orden' => 1, + 'tipo_campo' => 'Checkbox', + 'puntuacion' => 100, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => 'Bueno', + 'pregunta_id' => 2, + 'orden' => 2, + 'tipo_campo' => 'Checkbox', + 'puntuacion' => 80, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => 'Regular', + 'pregunta_id' => 2, + 'orden' => 3, + 'tipo_campo' => 'Checkbox', + 'puntuacion' => 60, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => 'Malo', + 'pregunta_id' => 2, + 'orden' => 4, + 'tipo_campo' => 'Checkbox', + 'puntuacion' => 40, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => 'Pésimo', + 'pregunta_id' => 2, + 'orden' => 5, + 'tipo_campo' => 'Checkbox', + 'puntuacion' => 20, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + + //Respuesta 3 + [ + 'nombre' => 'Excelente', + 'pregunta_id' => 3, + 'orden' => 1, + 'tipo_campo' => 'Checkbox', + 'puntuacion' => 100, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => 'Bueno', + 'pregunta_id' => 3, + 'orden' => 2, + 'tipo_campo' => 'Checkbox', + 'puntuacion' => 80, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => 'Regular', + 'pregunta_id' => 3, + 'orden' => 3, + 'tipo_campo' => 'Checkbox', + 'puntuacion' => 60, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => 'Malo', + 'pregunta_id' => 3, + 'orden' => 4, + 'tipo_campo' => 'Checkbox', + 'puntuacion' => 40, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => 'Pésimo', + 'pregunta_id' => 3, + 'orden' => 5, + 'tipo_campo' => 'Checkbox', + 'puntuacion' => 20, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + + //Respuesta 4 + [ + 'nombre' => 'Si', + 'pregunta_id' => 4, + 'orden' => 1, + 'tipo_campo' => 'Checkbox', + 'puntuacion' => 100, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => 'No', + 'pregunta_id' => 4, + 'orden' => 2, + 'tipo_campo' => 'Checkbox', + 'puntuacion' => 50, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + + //Respuesta 5 + [ + 'nombre' => 'Excelente', + 'pregunta_id' => 5, + 'orden' => 1, + 'tipo_campo' => 'Checkbox', + 'puntuacion' => 100, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => 'Bueno', + 'pregunta_id' => 5, + 'orden' => 2, + 'tipo_campo' => 'Checkbox', + 'puntuacion' => 80, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => 'Regular', + 'pregunta_id' => 5, + 'orden' => 3, + 'tipo_campo' => 'Checkbox', + 'puntuacion' => 60, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => 'Malo', + 'pregunta_id' => 5, + 'orden' => 4, + 'tipo_campo' => 'Checkbox', + 'puntuacion' => 40, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => 'Pésimo', + 'pregunta_id' => 5, + 'orden' => 5, + 'tipo_campo' => 'Checkbox', + 'puntuacion' => 20, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + + //Respuesta 6 + [ + 'nombre' => 'Si', + 'pregunta_id' => 6, + 'orden' => 1, + 'tipo_campo' => 'Checkbox', + 'puntuacion' => 100, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => 'No', + 'pregunta_id' => 6, + 'orden' => 2, + 'tipo_campo' => 'Checkbox', + 'puntuacion' => 50, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + + //Respuesta 7 + [ + 'nombre' => 'Excelente', + 'pregunta_id' => 7, + 'orden' => 1, + 'tipo_campo' => 'Checkbox', + 'puntuacion' => 100, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => 'Bueno', + 'pregunta_id' => 7, + 'orden' => 2, + 'tipo_campo' => 'Checkbox', + 'puntuacion' => 80, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => 'Regular', + 'pregunta_id' => 7, + 'orden' => 3, + 'tipo_campo' => 'Checkbox', + 'puntuacion' => 60, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => 'Malo', + 'pregunta_id' => 7, + 'orden' => 4, + 'tipo_campo' => 'Checkbox', + 'puntuacion' => 40, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => 'Pésimo', + 'pregunta_id' => 7, + 'orden' => 5, + 'tipo_campo' => 'Checkbox', + 'puntuacion' => 20, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + + //Respuesta 8 + [ + 'nombre' => 'Si', + 'pregunta_id' => 8, + 'orden' => 1, + 'tipo_campo' => 'Checkbox', + 'puntuacion' => 100, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => 'No', + 'pregunta_id' => 8, + 'orden' => 2, + 'tipo_campo' => 'Checkbox', + 'puntuacion' => 50, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + + //Respuesta 9 + [ + 'nombre' => '', + 'pregunta_id' => 9, + 'orden' => 1, + 'tipo_campo' => 'Moneda', + 'puntuacion' => null, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + + //Respuesta 10 + [ + 'nombre' => '', + 'pregunta_id' => 10, + 'orden' => 1, + 'tipo_campo' => 'Email', + 'puntuacion' => null, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + + //Respuesta 11 + [ + 'nombre' => '', + 'pregunta_id' => 11, + 'orden' => 1, + 'tipo_campo' => 'Fecha', + 'puntuacion' => null, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + ]); + } +} diff --git a/database/seeds/RespuestasEmpresarialTableSeeder.php b/database/seeds/RespuestasEmpresarialTableSeeder.php new file mode 100644 index 0000000..a636ecd --- /dev/null +++ b/database/seeds/RespuestasEmpresarialTableSeeder.php @@ -0,0 +1,402 @@ +insert([ + + //Respuesta 1 + [ + 'nombre' => 'Si', + 'pregunta_id' => 1, + 'orden' => 1, + 'tipo_campo' => 'Checkbox', + 'puntuacion' => 100, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => 'No', + 'pregunta_id' => 1, + 'orden' => 2, + 'tipo_campo' => 'Checkbox', + 'puntuacion' => 50, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + + //Respuesta 2 + [ + 'nombre' => 'Si', + 'pregunta_id' => 2, + 'orden' => 1, + 'tipo_campo' => 'Checkbox', + 'puntuacion' => 100, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => 'No', + 'pregunta_id' => 2, + 'orden' => 2, + 'tipo_campo' => 'Checkbox', + 'puntuacion' => 50, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + + //Respuesta 3 + [ + 'nombre' => 'Excelente', + 'pregunta_id' => 3, + 'orden' => 1, + 'tipo_campo' => 'Checkbox', + 'puntuacion' => 100, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => 'Bueno', + 'pregunta_id' => 3, + 'orden' => 2, + 'tipo_campo' => 'Checkbox', + 'puntuacion' => 80, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => 'Regular', + 'pregunta_id' => 3, + 'orden' => 3, + 'tipo_campo' => 'Checkbox', + 'puntuacion' => 60, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => 'Malo', + 'pregunta_id' => 3, + 'orden' => 4, + 'tipo_campo' => 'Checkbox', + 'puntuacion' => 40, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => 'Pésimo', + 'pregunta_id' => 3, + 'orden' => 5, + 'tipo_campo' => 'Checkbox', + 'puntuacion' => 20, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + + //Respuesta 4 + [ + 'nombre' => 'Si', + 'pregunta_id' => 4, + 'orden' => 1, + 'tipo_campo' => 'Checkbox', + 'puntuacion' => 100, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => 'No', + 'pregunta_id' => 4, + 'orden' => 2, + 'tipo_campo' => 'Checkbox', + 'puntuacion' => 50, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + + //Respuesta 5 + [ + 'nombre' => 'Excelente', + 'pregunta_id' => 5, + 'orden' => 1, + 'tipo_campo' => 'Checkbox', + 'puntuacion' => 100, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => 'Bueno', + 'pregunta_id' => 5, + 'orden' => 2, + 'tipo_campo' => 'Checkbox', + 'puntuacion' => 80, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => 'Regular', + 'pregunta_id' => 5, + 'orden' => 3, + 'tipo_campo' => 'Checkbox', + 'puntuacion' => 60, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => 'Malo', + 'pregunta_id' => 5, + 'orden' => 4, + 'tipo_campo' => 'Checkbox', + 'puntuacion' => 40, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => 'Pésimo', + 'pregunta_id' => 5, + 'orden' => 5, + 'tipo_campo' => 'Checkbox', + 'puntuacion' => 20, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + + //Respuesta 6 + [ + 'nombre' => 'Excelente', + 'pregunta_id' => 6, + 'orden' => 1, + 'tipo_campo' => 'Checkbox', + 'puntuacion' => 100, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => 'Bueno', + 'pregunta_id' => 6, + 'orden' => 2, + 'tipo_campo' => 'Checkbox', + 'puntuacion' => 80, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => 'Regular', + 'pregunta_id' => 6, + 'orden' => 3, + 'tipo_campo' => 'Checkbox', + 'puntuacion' => 60, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => 'Malo', + 'pregunta_id' => 6, + 'orden' => 4, + 'tipo_campo' => 'Checkbox', + 'puntuacion' => 40, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => 'Pésimo', + 'pregunta_id' => 6, + 'orden' => 5, + 'tipo_campo' => 'Checkbox', + 'puntuacion' => 20, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + + //Respuesta 7 + [ + 'nombre' => 'Excelente', + 'pregunta_id' => 7, + 'orden' => 1, + 'tipo_campo' => 'Checkbox', + 'puntuacion' => 100, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => 'Bueno', + 'pregunta_id' => 7, + 'orden' => 2, + 'tipo_campo' => 'Checkbox', + 'puntuacion' => 80, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => 'Regular', + 'pregunta_id' => 7, + 'orden' => 3, + 'tipo_campo' => 'Checkbox', + 'puntuacion' => 60, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => 'Malo', + 'pregunta_id' => 7, + 'orden' => 4, + 'tipo_campo' => 'Checkbox', + 'puntuacion' => 40, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => 'Pésimo', + 'pregunta_id' => 7, + 'orden' => 5, + 'tipo_campo' => 'Checkbox', + 'puntuacion' => 20, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + + //Respuesta 8 + [ + 'nombre' => 'Si', + 'pregunta_id' => 8, + 'orden' => 1, + 'tipo_campo' => 'Checkbox', + 'puntuacion' => 100, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => 'No', + 'pregunta_id' => 8, + 'orden' => 2, + 'tipo_campo' => 'Checkbox', + 'puntuacion' => 50, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + + //Respuesta 9 + [ + 'nombre' => 'Excelente', + 'pregunta_id' => 9, + 'orden' => 1, + 'tipo_campo' => 'Checkbox', + 'puntuacion' => 100, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => 'Bueno', + 'pregunta_id' => 9, + 'orden' => 2, + 'tipo_campo' => 'Checkbox', + 'puntuacion' => 80, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => 'Regular', + 'pregunta_id' => 9, + 'orden' => 3, + 'tipo_campo' => 'Checkbox', + 'puntuacion' => 60, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => 'Malo', + 'pregunta_id' => 9, + 'orden' => 4, + 'tipo_campo' => 'Checkbox', + 'puntuacion' => 40, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => 'Pésimo', + 'pregunta_id' => 9, + 'orden' => 5, + 'tipo_campo' => 'Checkbox', + 'puntuacion' => 20, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + + //Respuesta 10 + [ + 'nombre' => '10-9', + 'pregunta_id' => 10, + 'orden' => 1, + 'tipo_campo' => 'Checkbox', + 'puntuacion' => 100, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => '8-7', + 'pregunta_id' => 10, + 'orden' => 2, + 'tipo_campo' => 'Checkbox', + 'puntuacion' => 80, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => '6-5', + 'pregunta_id' => 10, + 'orden' => 3, + 'tipo_campo' => 'Checkbox', + 'puntuacion' => 60, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => '4-3', + 'pregunta_id' => 10, + 'orden' => 4, + 'tipo_campo' => 'Checkbox', + 'puntuacion' => 40, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => '2-1', + 'pregunta_id' => 10, + 'orden' => 5, + 'tipo_campo' => 'Checkbox', + 'puntuacion' => 20, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + + //Respuesta 11 + [ + 'nombre' => '', + 'pregunta_id' => 11, + 'orden' => 1, + 'tipo_campo' => 'Email', + 'puntuacion' => null, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + + //Respuesta 12 + [ + 'nombre' => '', + 'pregunta_id' => 12, + 'orden' => 1, + 'tipo_campo' => 'Fecha', + 'puntuacion' => null, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + ]); + } +} diff --git a/database/seeds/RolesTableSeeder.php b/database/seeds/RolesTableSeeder.php new file mode 100644 index 0000000..69d4449 --- /dev/null +++ b/database/seeds/RolesTableSeeder.php @@ -0,0 +1,76 @@ +insert([ + + [ + 'slug' => 'Atención a cliente', + 'name' => 'Atención a cliente', + 'movil' => 0, + 'web' => 1, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'slug' => 'Administradores', + 'name' => 'Administradores', + 'movil' => 0, + 'web' => 1, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'slug' => 'Supervisor de operadores', + 'name' => 'Supervisor de operadores', + 'movil' => 1, + 'web' => 1, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'slug' => 'Asesor de operaciones', + 'name' => 'Asesor de operaciones', + 'movil' => 1, + 'web' => 0, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'slug' => 'Gerencial', + 'name' => 'Gerencial', + 'movil' => 0, + 'web' => 1, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'slug' => 'Auxiliar de operaciones', + 'name' => 'Auxiliar de operaciones', + 'movil' => 0, + 'web' => 0, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + ]); + } +} + + + + + + + + + diff --git a/database/seeds/ServiciosTableSeeder.php b/database/seeds/ServiciosTableSeeder.php new file mode 100644 index 0000000..2a03cd5 --- /dev/null +++ b/database/seeds/ServiciosTableSeeder.php @@ -0,0 +1,158 @@ +insert([ + [ + 'nombre' => 'Barrido Mecanizado', + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => 'Desazolve De Fosa Séptica', + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => 'Destape', + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => 'Detección De Fuga De Agua', + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => 'Des-Incrustación De Chicle', + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => 'Lavado A Presión De Agua', + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => 'Lavado A Vapor', + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => 'Limpieza De Aljibe', + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => 'Limpieza De Biodigestor', + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => 'Limpieza De Cárcamo', + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => 'Limpieza De Drenaje', + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => 'Limpieza De Drenaje Sanitaria Y Pluvial', + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => 'Limpieza De Drenaje Pluvial', + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => 'Limpieza De Drenaje Y Trampas De Grasa', + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => 'Limpieza De Drenaje Y Trampa De Lodo', + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => 'Limpieza De Drenaje Y Video Inspección', + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => 'Limpieza Y Desazolve De Noria', + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => 'Limpieza De Drenaje Y Pozos De Visita', + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => 'Limpieza De Tanque De Grasa', + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => 'Limpieza De Trampa De Grasa', + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => 'Limpieza De Trampa De Lodo', + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => 'Limpieza De Pozo Tormenta', + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => 'Localización De Registros', + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => 'Retiro De Líquidos Lixiviados', + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => 'Restregado De Pisos', + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => 'Succión', + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => 'Sanitización', + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => 'Video Inspección De Tubería De Drenaje', + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + ]); + } +} diff --git a/database/seeds/SolicitudesServicioTableSeeder.php b/database/seeds/SolicitudesServicioTableSeeder.php new file mode 100644 index 0000000..35c05a3 --- /dev/null +++ b/database/seeds/SolicitudesServicioTableSeeder.php @@ -0,0 +1,111 @@ +numberBetween(1,50); + + $domicilio = \App\Models\ClienteDomicilio::where('cliente_id', $cliente_id)->first(); + + $operador = \App\Models\User::where('tipo_empleado_id', 2)->inRandomOrder()->first(); + + $fecha_actual = Carbon::now(); + $y = $fecha_actual->format('Y'); + $m = $fecha_actual->format('m'); + $d = $faker->numberBetween(1,30); + $hora = $faker->time($format = 'H:i:s'); + $fecha = "$y-$m-$d $hora"; + + $data_solicitud_enc = [ + 'forma_pago_id' => $faker->numberBetween(1,6), + 'fecha_agenda' => $fecha, + 'usuario_agenda_id' => 1, + 'cliente_id' => $cliente_id, + 'cliente_domicilio_id' => $domicilio->id, + 'sucursal_id' => $operador->sucursal_id + ]; + + $solicitud = \App\Models\ServicioEnc::create($data_solicitud_enc); + + + $data_solicitud_det = [ + 'servicio_enc_id' => $solicitud->id, + 'servicio_id' => $faker->numberBetween(1,28), + 'estatus_servicio_id' => $faker->numberBetween(1,7), + 'tipo_servicio_id' => $faker->numberBetween(1,2), + 'fecha_solicitud' => $fecha, + 'duracion' => '02:30:00', + 'definido_cliente' => $faker->numberBetween(0,1), + 'costo_servicio' => $faker->numberBetween(1000,5000).'.'.$faker->numberBetween(10,99), + 'operador_id' => $operador->id, + 'vehiculo_id' => 1, + 'auxiliar_1' => $faker->numberBetween(6,7), + 'auxiliar_2' => $faker->numberBetween(8,9) + ]; + + $solicitud_det = \App\Models\ServicioDet::create($data_solicitud_det); + + $now = Carbon::now()->toDateTimeString(); + + $data_solicitud_progreso = [ + 'servicio_enc_id' => $solicitud->id, + 'servicio_det_id' => $solicitud_det->id, + 'fecha_ini_servidor' => $now, + 'fecha_fin_servidor' => $now, + 'fecha_ini_celular' => $now, + 'fecha_fin_celular' => $now, + 'duracion' => '02:30:00', + 'lat_ini' => $faker->latitude($min = 21, $max = 26), + 'lng_ini' => $faker->longitude($min = -101, $max = -106), + 'lat_fin' => $faker->latitude($min = 21, $max = 26), + 'lng_fin' => $faker->longitude($min = -101, $max = -106), + 'comentarios' => 'Todo bien.' + ]; + + $solicitud_progreso = \App\Models\ServicioProgreso::create($data_solicitud_progreso); + + for($j=1; $j<=3; $j++){ + + if($j == 1){ + $etapa = 'Inicio'; + } + + if($j == 2){ + $etapa = 'Proceso'; + } + + if($j == 2){ + $etapa = 'Final'; + } + + $soli = $solicitud->id; + $servi = $solicitud_det->id; + + $data_solicitud_evidencia = [ + 'servicio_progreso_id' => $solicitud_progreso->id, + 'uuid' => $faker->sha256, + 'etapa' => $etapa, + 'lat' => $faker->latitude($min = 21, $max = 26), + 'lng' => $faker->longitude($min = -101, $max = -106) + ]; + + $evidencia = \App\Models\ServicioEvidencia::create($data_solicitud_evidencia); + + $evi = $evidencia->id; + $evidencia->update(['imagen' => "solicitud_".$soli."_servicio_".$servi."_evidencia_id_".$evi.".jpeg"]); + + } + } + } +} diff --git a/database/seeds/SucursalesTableSeeder.php b/database/seeds/SucursalesTableSeeder.php new file mode 100644 index 0000000..bb07e67 --- /dev/null +++ b/database/seeds/SucursalesTableSeeder.php @@ -0,0 +1,30 @@ +insert([ + [ + 'nombre' => 'Culiacán', + 'calle' => 'Pascual Orozco', + 'num_ext' => '1949', + 'colonia' => 'Nuevo Culiacán', + 'cp' => '80170', + 'telefono' => '6677139250', + 'gerente' => 'Gabriel Salazar', + 'encargado' => 'Brenda Tamayo', + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ] + ]); + } +} diff --git a/database/seeds/TiposEmpleadosTableSeeder.php b/database/seeds/TiposEmpleadosTableSeeder.php new file mode 100644 index 0000000..46250f5 --- /dev/null +++ b/database/seeds/TiposEmpleadosTableSeeder.php @@ -0,0 +1,60 @@ +insert([ + [ + 'nombre' => 'Administradores', + 'login' => 1, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => 'Asesor de Operaciones', + 'login' => 1, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => 'Auxiliar de Operaciones 1', + 'login' => 0, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => 'Auxiliar de Operaciones 2', + 'login' => 0, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => 'Atención a cliente', + 'login' => 1, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => 'Supervisor de operadores', + 'login' => 1, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => 'Gerencial', + 'login' => 1, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + ]); + } +} diff --git a/database/seeds/TiposServiciosTableSeeder.php b/database/seeds/TiposServiciosTableSeeder.php new file mode 100644 index 0000000..daf62c1 --- /dev/null +++ b/database/seeds/TiposServiciosTableSeeder.php @@ -0,0 +1,29 @@ +insert([ + + [ + 'nombre' => 'Domestico', + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => 'Empresarial', + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + ]); + } +} diff --git a/database/seeds/TiposVehiculosTableSeeder.php b/database/seeds/TiposVehiculosTableSeeder.php new file mode 100644 index 0000000..96c89a4 --- /dev/null +++ b/database/seeds/TiposVehiculosTableSeeder.php @@ -0,0 +1,87 @@ +insert([ + [ + 'nombre' => 'EDUCTOR', + 'objetivo_mensual' => 840, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => 'VACTOR', + 'objetivo_mensual' => 360, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => 'BARREDORA TENNAT', + 'objetivo_mensual' => 0, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => 'HIDROLAVADORA', + 'objetivo_mensual' => 0, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => 'RESTREGADORA TENNAN M.T20 ', + 'objetivo_mensual' => 0, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => 'CAMIÓN HINO', + 'objetivo_mensual' => 360, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ],[ + 'nombre' => 'CALDERA', + 'objetivo_mensual' => 0, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ],[ + 'nombre' => 'QUITA-CHICLES', + 'objetivo_mensual' => 0, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ],[ + 'nombre' => 'BARREDORA ELGIN', + 'objetivo_mensual' => 0, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => 'BARREDORA TENNAN M.6400-5696 ', + 'objetivo_mensual' => 0, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => 'CAMIÓN VACTOR', + 'objetivo_mensual' => 0, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ], + [ + 'nombre' => 'BARREDORA TENNAN 6540 ', + 'objetivo_mensual' => 0, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ] + ]); + } +} diff --git a/database/seeds/UsersTableSeeder.php b/database/seeds/UsersTableSeeder.php new file mode 100644 index 0000000..11bf9ad --- /dev/null +++ b/database/seeds/UsersTableSeeder.php @@ -0,0 +1,247 @@ + 'atencionclientes@mail.com', + 'password' => bcrypt('secret'), + 'nombre' => 'Atención', + 'apellido_materno' => 'Clientes', + 'apellido_paterno'=> 'Clientes', + 'telefono' => '6677889900', + 'tipo_empleado_id' => 5, + 'sucursal_id' => 1, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ]; + + $user_atencion = \App\Models\User::create($atencion); + + \App\Models\RolUser::create([ + 'user_id' => $user_atencion->id, + 'role_id' => 1, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ]);*/ + + $admin = + [ + 'email' => 'administrador@mail.com', + 'password' => bcrypt('secret'), + 'nombre' => 'Administrador', + 'apellido_materno' => 'Administrador', + 'apellido_paterno'=> 'Administrador', + 'telefono' => '6677889900', + 'tipo_empleado_id' => 1, + 'sucursal_id' => 1, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ]; + + $user_admin = \App\Models\User::create($admin); + + \App\Models\RolUser::create([ + 'user_id' => $user_admin->id, + 'role_id' => 2, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ]); + + /*$supervisor = + [ + 'email' => 'supervisor@mail.com', + 'password' => bcrypt('secret'), + 'nombre' => 'Supervisor', + 'apellido_materno' => 'Operadores', + 'apellido_paterno'=> 'Operadores', + 'telefono' => '6677889900', + 'tipo_empleado_id' => 1, + 'sucursal_id' => 1, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ]; + + $user_super = \App\Models\User::create($supervisor); + + \App\Models\RolUser::create([ + 'user_id' => $user_super->id, + 'role_id' => 3, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ]); + + $operador = + [ + 'email' => 'operador@mail.com', + 'password' => bcrypt('secret'), + 'nombre' => 'Operador', + 'apellido_materno' => 'Operador', + 'apellido_paterno'=> 'Operador', + 'telefono' => '6677889900', + 'tipo_empleado_id' => 2, + 'sucursal_id' => 1, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ]; + + $user_operador = \App\Models\User::create($operador); + + \App\Models\RolUser::create([ + 'user_id' => $user_operador->id, + 'role_id' => 4, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ]); + + $gerente = + [ + 'email' => 'gerente@mail.com', + 'password' => bcrypt('secret'), + 'nombre' => 'Gerente', + 'apellido_materno' => 'Gerente', + 'apellido_paterno'=> 'Gerente', + 'telefono' => '6677889900', + 'tipo_empleado_id' => 1, + 'sucursal_id' => 1, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ]; + + $user_gerente = \App\Models\User::create($gerente); + + \App\Models\RolUser::create([ + 'user_id' => $user_gerente->id, + 'role_id' => 5, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ]); + + $auxiliar1 = + [ + 'email' => 'auxiliar1@mail.com', + 'password' => bcrypt('secret'), + 'nombre' => 'Auxiliar 1', + 'apellido_materno' => 'Auxiliar', + 'apellido_paterno'=> 'Auxiliar', + 'telefono' => '6677889900', + 'tipo_empleado_id' => 3, + 'sucursal_id' => 1, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ]; + + $user_auxiliar_1 = \App\Models\User::create($auxiliar1); + + \App\Models\RolUser::create([ + 'user_id' => $user_auxiliar_1->id, + 'role_id' => 6, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ]); + + $auxiliar2 = + [ + 'email' => 'auxiliar2@mail.com', + 'password' => bcrypt('secret'), + 'nombre' => 'Auxiliar 2', + 'apellido_materno' => 'Auxiliar', + 'apellido_paterno'=> 'Auxiliar', + 'telefono' => '6677889900', + 'tipo_empleado_id' => 4, + 'sucursal_id' => 1, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ]; + + $user_auxiliar_2 = \App\Models\User::create($auxiliar2); + + \App\Models\RolUser::create([ + 'user_id' => $user_auxiliar_2->id, + 'role_id' => 6, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ]); + + $auxiliar3 = + [ + 'email' => 'auxiliar3@mail.com', + 'password' => bcrypt('secret'), + 'nombre' => 'Auxiliar 3', + 'apellido_materno' => 'Auxiliar', + 'apellido_paterno'=> 'Auxiliar', + 'telefono' => '6677889900', + 'tipo_empleado_id' => 3, + 'sucursal_id' => 1, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ]; + + $user_auxiliar_3 = \App\Models\User::create($auxiliar3); + + \App\Models\RolUser::create([ + 'user_id' => $user_auxiliar_3->id, + 'role_id' => 6, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ]); + + $auxiliar4 = + [ + 'email' => 'auxiliar4@mail.com', + 'password' => bcrypt('secret'), + 'nombre' => 'Auxiliar 4', + 'apellido_materno' => 'Auxiliar', + 'apellido_paterno'=> 'Auxiliar', + 'telefono' => '6677889900', + 'tipo_empleado_id' => 4, + 'sucursal_id' => 1, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ]; + + $user_auxiliar_4 = \App\Models\User::create($auxiliar4); + + \App\Models\RolUser::create([ + 'user_id' => $user_auxiliar_4->id, + 'role_id' => 6, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ]); + + $operador = + [ + 'email' => 'operador2@mail.com', + 'password' => bcrypt('secret'), + 'nombre' => 'Operador2', + 'apellido_materno' => 'Operador2', + 'apellido_paterno'=> 'Operador2', + 'telefono' => '6677889900', + 'tipo_empleado_id' => 2, + 'sucursal_id' => 2, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ]; + + $user_operador = \App\Models\User::create($operador); + + \App\Models\RolUser::create([ + 'user_id' => $user_operador->id, + 'role_id' => 4, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ]);*/ + } +} diff --git a/database/seeds/VehiculosSucursalesTableSeeder.php b/database/seeds/VehiculosSucursalesTableSeeder.php new file mode 100644 index 0000000..4044116 --- /dev/null +++ b/database/seeds/VehiculosSucursalesTableSeeder.php @@ -0,0 +1,20 @@ + $v->id, 'sucursal_id' => 1]); + } + } +} diff --git a/database/seeds/VehiculosTableSeeder.php b/database/seeds/VehiculosTableSeeder.php new file mode 100644 index 0000000..b74a8e5 --- /dev/null +++ b/database/seeds/VehiculosTableSeeder.php @@ -0,0 +1,90 @@ + "M$i", + 'tipo_vehiculo_id' => $tipo_vehiculo_id, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + 'deleted_at' => Carbon::now()->toDateTimeString(), + ]; + }else{ + $data = [ + 'num_economico' => "M$i", + 'tipo_vehiculo_id' => $tipo_vehiculo_id, + 'created_at' => Carbon::now()->toDateTimeString(), + 'updated_at' => Carbon::now()->toDateTimeString(), + ]; + } + + DB::table('cat_vehiculos')->insert($data); + } + } +} diff --git a/docker/entrypoint-production.sh b/docker/entrypoint-production.sh new file mode 100644 index 0000000..2262539 --- /dev/null +++ b/docker/entrypoint-production.sh @@ -0,0 +1,10 @@ +#!/bin/sh +# This script checks if the container is started for the first time. + +composer install --no-interaction --no-plugins --no-scripts + +chown -R www-data:www-data storage/ bootstrap/ +chmod -R 755 storage/ bootstrap/ + +# run the command sent as arguments to this script +exec "$@" diff --git a/docker/nginx-default.conf b/docker/nginx-default.conf new file mode 100644 index 0000000..0cc0626 --- /dev/null +++ b/docker/nginx-default.conf @@ -0,0 +1,63 @@ +user www-data; +worker_processes auto; +pid /run/nginx.pid; +error_log /var/log/nginx/error.log; +include /etc/nginx/modules-enabled/*.conf; + +events { + worker_connections 5000; + use epoll; + multi_accept on; +} + +http { + + ## + # Basic Settings + ## + + sendfile on; + tcp_nopush on; + types_hash_max_size 2048; + client_max_body_size 10M; + # server_tokens off; + + # server_names_hash_bucket_size 64; + # server_name_in_redirect off; + + include /etc/nginx/mime.types; + default_type application/octet-stream; + + ## + # SSL Settings + ## + + ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3; # Dropping SSLv3, ref: POODLE + ssl_prefer_server_ciphers on; + + ## + # Logging Settings + ## + + access_log /var/log/nginx/access.log; + + ## + # Gzip Settings + ## + + gzip on; + + # gzip_vary on; + # gzip_proxied any; + # gzip_comp_level 6; + # gzip_buffers 16 8k; + # gzip_http_version 1.1; + # gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript; + + ## + # Virtual Host Configs + ## + + include /etc/nginx/conf.d/*.conf; + include /etc/nginx/sites-enabled/*; +} \ No newline at end of file diff --git a/docker/nginx.conf b/docker/nginx.conf new file mode 100644 index 0000000..a78c9c5 --- /dev/null +++ b/docker/nginx.conf @@ -0,0 +1,33 @@ +server { + listen 80; + root /var/www/laravel/public; + + index index.php index.html; + charset utf-8; + client_max_body_size 10M; + + location = /favicon.ico { access_log off; log_not_found off; } + location = /robots.txt { access_log off; log_not_found off; } + + error_page 404 /index.php; + + location ~ \.php$ { + try_files $uri =404; + fastcgi_split_path_info ^(.+\.php)(/.+)$; + fastcgi_pass 127.0.0.1:9000; + fastcgi_index index.php; + include fastcgi_params; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + fastcgi_param PATH_INFO $fastcgi_path_info; + fastcgi_buffering off; + } + + location / { + try_files $uri $uri/ /index.php?$query_string; + gzip_static on; + } + + location ~ /\.(?!well-known).* { + deny all; + } +} diff --git a/docker/php-fpm.conf b/docker/php-fpm.conf new file mode 100644 index 0000000..6287b0d --- /dev/null +++ b/docker/php-fpm.conf @@ -0,0 +1,11 @@ + +[www] +user = www-data +group = www-data +listen = 127.0.0.1:9000 + +pm = dynamic +pm.max_children = 5000 +pm.start_servers = 3 +pm.min_spare_servers = 3 +pm.max_spare_servers = 5 \ No newline at end of file diff --git a/docker/php.ini b/docker/php.ini new file mode 100644 index 0000000..cbaaebc --- /dev/null +++ b/docker/php.ini @@ -0,0 +1,6 @@ +log_errors=1 +display_errors=1 +post_max_size=40M +upload_max_filesize=40M +display_startup_errors=1 +error_log=/var/log/php/errors.log \ No newline at end of file diff --git a/docker/storage.conf b/docker/storage.conf new file mode 100644 index 0000000..51a3a66 --- /dev/null +++ b/docker/storage.conf @@ -0,0 +1,25 @@ +server { + listen 8080; + sendfile on; + default_type application/octet-stream; + + autoindex on; + autoindex_exact_size off; + autoindex_format html; + autoindex_localtime on; + + gzip on; + gzip_http_version 1.1; + gzip_disable "MSIE [1-6]\."; + gzip_min_length 256; + gzip_vary on; + gzip_proxied expired no-cache no-store private auth; + gzip_types text/plain text/css application/json application/javascript application/x-javascript text/xml application/xml application/xml+rss text/javascript; + gzip_comp_level 9; + + root /var/www/laravel/storage/app/public; + + location / { + try_files $uri $uri/ /index.html =404; + } +} diff --git a/docker/supervisor.conf b/docker/supervisor.conf new file mode 100644 index 0000000..8bc1897 --- /dev/null +++ b/docker/supervisor.conf @@ -0,0 +1,40 @@ +[supervisord] +nodaemon=true +loglevel = info +logfile=/var/log/supervisord.log +pidfile=/var/run/supervisord.pid + +[group:laravel-worker] +priority=999 +programs=nginx,php8-fpm,laravel-queue + +[program:nginx] +priority=10 +autostart=true +autorestart=true +stderr_logfile_maxbytes=0 +stdout_logfile_maxbytes=0 +stdout_events_enabled=true +stderr_events_enabled=true +command=/usr/sbin/nginx -g 'daemon off;' +stderr_logfile=/var/log/nginx/error.log +stdout_logfile=/var/log/nginx/access.log + +[program:php8-fpm] +priority=5 +autostart=true +autorestart=true +stderr_logfile_maxbytes=0 +stdout_logfile_maxbytes=0 +command=/usr/local/sbin/php-fpm -R +stderr_logfile=/var/log/nginx/php-error.log +stdout_logfile=/var/log/nginx/php-access.log + +[program:laravel-queue] +numprocs=10 +autostart=true +autorestart=true +redirect_stderr=true +process_name=%(program_name)s_%(process_num)02d +stdout_logfile=/var/log/nginx/worker.log +command=php /var/www/laravel/artisan queue:work --queue=queue,high,medium,low --timeout=3600 diff --git a/package.json b/package.json new file mode 100644 index 0000000..630a244 --- /dev/null +++ b/package.json @@ -0,0 +1,21 @@ +{ + "private": true, + "scripts": { + "dev": "npm run development", + "development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js", + "watch": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js", + "watch-poll": "npm run watch -- --watch-poll", + "hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js", + "prod": "npm run production", + "production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js" + }, + "devDependencies": { + "axios": "^0.16.2", + "bootstrap-sass": "^3.3.7", + "cross-env": "^5.0.1", + "jquery": "^3.1.1", + "laravel-mix": "^1.0", + "lodash": "^4.17.4", + "vue": "^2.1.10" + } +} diff --git a/phpunit.xml b/phpunit.xml new file mode 100644 index 0000000..9ecda83 --- /dev/null +++ b/phpunit.xml @@ -0,0 +1,31 @@ + + + + + ./tests/Feature + + + + ./tests/Unit + + + + + ./app + + + + + + + + + diff --git a/public/.htaccess b/public/.htaccess new file mode 100644 index 0000000..903f639 --- /dev/null +++ b/public/.htaccess @@ -0,0 +1,20 @@ + + + Options -MultiViews + + + RewriteEngine On + + # Redirect Trailing Slashes If Not A Folder... + RewriteCond %{REQUEST_FILENAME} !-d + RewriteRule ^(.*)/$ /$1 [L,R=301] + + # Handle Front Controller... + RewriteCond %{REQUEST_FILENAME} !-d + RewriteCond %{REQUEST_FILENAME} !-f + RewriteRule ^ index.php [L] + + # Handle Authorization Header + RewriteCond %{HTTP:Authorization} . + RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] + diff --git a/public/css/app.css b/public/css/app.css new file mode 100644 index 0000000..792058e --- /dev/null +++ b/public/css/app.css @@ -0,0 +1,5 @@ +@import url(https://fonts.googleapis.com/css?family=Raleway:300,400,600);@charset "UTF-8";/*! + * Bootstrap v3.3.7 (http://getbootstrap.com) + * Copyright 2011-2016 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + *//*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */.label,sub,sup{vertical-align:baseline}hr,img{border:0}body,figure{margin:0}.btn-group>.btn-group,.btn-toolbar .btn,.btn-toolbar .btn-group,.btn-toolbar .input-group,.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9,.dropdown-menu{float:left}.img-responsive,.img-thumbnail,.table,label{max-width:100%}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse,.pre-scrollable{max-height:340px}html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}b,optgroup,strong{font-weight:700}dfn{font-style:italic}h1{margin:.67em 0}mark{background:#ff0;color:#000}sub,sup{font-size:75%;line-height:0;position:relative}sup{top:-.5em}sub{bottom:-.25em}img{vertical-align:middle}svg:not(:root){overflow:hidden}hr{box-sizing:content-box;height:0}pre,textarea{overflow:auto}code,kbd,pre,samp{font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */@media print{blockquote,img,pre,tr{page-break-inside:avoid}*,:after,:before{background:0 0!important;color:#000!important;box-shadow:none!important;text-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}a[href^="#"]:after,a[href^="javascript:"]:after{content:""}blockquote,pre{border:1px solid #999}thead{display:table-header-group}img{max-width:100%!important}h2,h3,p{orphans:3;widows:3}h2,h3{page-break-after:avoid}.navbar{display:none}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000!important}.label{border:1px solid #000}.table{border-collapse:collapse!important}.table td,.table th{background-color:#fff!important}.table-bordered td,.table-bordered th{border:1px solid #ddd!important}}.btn,.btn-danger.active,.btn-danger:active,.btn-default.active,.btn-default:active,.btn-info.active,.btn-info:active,.btn-primary.active,.btn-primary:active,.btn-warning.active,.btn-warning:active,.btn.active,.btn:active,.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover,.form-control,.navbar-toggle,.open>.btn-danger.dropdown-toggle,.open>.btn-default.dropdown-toggle,.open>.btn-info.dropdown-toggle,.open>.btn-primary.dropdown-toggle,.open>.btn-warning.dropdown-toggle{background-image:none}.img-thumbnail,body{background-color:#f5f8fa}@font-face{font-family:'Glyphicons Halflings';src:url(/fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.eot?f4769f9bdb7466be65088239c12046d1);src:url(/fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.eot?f4769f9bdb7466be65088239c12046d1?#iefix) format("embedded-opentype"),url(/fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.woff2?448c34a56d699c29117adc64c43affeb) format("woff2"),url(/fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.woff?fa2772327f55d8198301fdb8bcfc8158) format("woff"),url(/fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.ttf?e18bbf611f2a2e43afc071aa2f4e1512) format("truetype"),url(/fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.svg?89889688147bd7575d6327160d64e760#glyphicons_halflingsregular) format("svg")}.glyphicon{position:relative;top:1px;display:inline-block;font-family:'Glyphicons Halflings';font-style:normal;font-weight:400;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.glyphicon-asterisk:before{content:"\002a"}.glyphicon-plus:before{content:"\002b"}.glyphicon-eur:before,.glyphicon-euro:before{content:"\20ac"}.glyphicon-minus:before{content:"\2212"}.glyphicon-cloud:before{content:"\2601"}.glyphicon-envelope:before{content:"\2709"}.glyphicon-pencil:before{content:"\270f"}.glyphicon-glass:before{content:"\e001"}.glyphicon-music:before{content:"\e002"}.glyphicon-search:before{content:"\e003"}.glyphicon-heart:before{content:"\e005"}.glyphicon-star:before{content:"\e006"}.glyphicon-star-empty:before{content:"\e007"}.glyphicon-user:before{content:"\e008"}.glyphicon-film:before{content:"\e009"}.glyphicon-th-large:before{content:"\e010"}.glyphicon-th:before{content:"\e011"}.glyphicon-th-list:before{content:"\e012"}.glyphicon-ok:before{content:"\e013"}.glyphicon-remove:before{content:"\e014"}.glyphicon-zoom-in:before{content:"\e015"}.glyphicon-zoom-out:before{content:"\e016"}.glyphicon-off:before{content:"\e017"}.glyphicon-signal:before{content:"\e018"}.glyphicon-cog:before{content:"\e019"}.glyphicon-trash:before{content:"\e020"}.glyphicon-home:before{content:"\e021"}.glyphicon-file:before{content:"\e022"}.glyphicon-time:before{content:"\e023"}.glyphicon-road:before{content:"\e024"}.glyphicon-download-alt:before{content:"\e025"}.glyphicon-download:before{content:"\e026"}.glyphicon-upload:before{content:"\e027"}.glyphicon-inbox:before{content:"\e028"}.glyphicon-play-circle:before{content:"\e029"}.glyphicon-repeat:before{content:"\e030"}.glyphicon-refresh:before{content:"\e031"}.glyphicon-list-alt:before{content:"\e032"}.glyphicon-lock:before{content:"\e033"}.glyphicon-flag:before{content:"\e034"}.glyphicon-headphones:before{content:"\e035"}.glyphicon-volume-off:before{content:"\e036"}.glyphicon-volume-down:before{content:"\e037"}.glyphicon-volume-up:before{content:"\e038"}.glyphicon-qrcode:before{content:"\e039"}.glyphicon-barcode:before{content:"\e040"}.glyphicon-tag:before{content:"\e041"}.glyphicon-tags:before{content:"\e042"}.glyphicon-book:before{content:"\e043"}.glyphicon-bookmark:before{content:"\e044"}.glyphicon-print:before{content:"\e045"}.glyphicon-camera:before{content:"\e046"}.glyphicon-font:before{content:"\e047"}.glyphicon-bold:before{content:"\e048"}.glyphicon-italic:before{content:"\e049"}.glyphicon-text-height:before{content:"\e050"}.glyphicon-text-width:before{content:"\e051"}.glyphicon-align-left:before{content:"\e052"}.glyphicon-align-center:before{content:"\e053"}.glyphicon-align-right:before{content:"\e054"}.glyphicon-align-justify:before{content:"\e055"}.glyphicon-list:before{content:"\e056"}.glyphicon-indent-left:before{content:"\e057"}.glyphicon-indent-right:before{content:"\e058"}.glyphicon-facetime-video:before{content:"\e059"}.glyphicon-picture:before{content:"\e060"}.glyphicon-map-marker:before{content:"\e062"}.glyphicon-adjust:before{content:"\e063"}.glyphicon-tint:before{content:"\e064"}.glyphicon-edit:before{content:"\e065"}.glyphicon-share:before{content:"\e066"}.glyphicon-check:before{content:"\e067"}.glyphicon-move:before{content:"\e068"}.glyphicon-step-backward:before{content:"\e069"}.glyphicon-fast-backward:before{content:"\e070"}.glyphicon-backward:before{content:"\e071"}.glyphicon-play:before{content:"\e072"}.glyphicon-pause:before{content:"\e073"}.glyphicon-stop:before{content:"\e074"}.glyphicon-forward:before{content:"\e075"}.glyphicon-fast-forward:before{content:"\e076"}.glyphicon-step-forward:before{content:"\e077"}.glyphicon-eject:before{content:"\e078"}.glyphicon-chevron-left:before{content:"\e079"}.glyphicon-chevron-right:before{content:"\e080"}.glyphicon-plus-sign:before{content:"\e081"}.glyphicon-minus-sign:before{content:"\e082"}.glyphicon-remove-sign:before{content:"\e083"}.glyphicon-ok-sign:before{content:"\e084"}.glyphicon-question-sign:before{content:"\e085"}.glyphicon-info-sign:before{content:"\e086"}.glyphicon-screenshot:before{content:"\e087"}.glyphicon-remove-circle:before{content:"\e088"}.glyphicon-ok-circle:before{content:"\e089"}.glyphicon-ban-circle:before{content:"\e090"}.glyphicon-arrow-left:before{content:"\e091"}.glyphicon-arrow-right:before{content:"\e092"}.glyphicon-arrow-up:before{content:"\e093"}.glyphicon-arrow-down:before{content:"\e094"}.glyphicon-share-alt:before{content:"\e095"}.glyphicon-resize-full:before{content:"\e096"}.glyphicon-resize-small:before{content:"\e097"}.glyphicon-exclamation-sign:before{content:"\e101"}.glyphicon-gift:before{content:"\e102"}.glyphicon-leaf:before{content:"\e103"}.glyphicon-fire:before{content:"\e104"}.glyphicon-eye-open:before{content:"\e105"}.glyphicon-eye-close:before{content:"\e106"}.glyphicon-warning-sign:before{content:"\e107"}.glyphicon-plane:before{content:"\e108"}.glyphicon-calendar:before{content:"\e109"}.glyphicon-random:before{content:"\e110"}.glyphicon-comment:before{content:"\e111"}.glyphicon-magnet:before{content:"\e112"}.glyphicon-chevron-up:before{content:"\e113"}.glyphicon-chevron-down:before{content:"\e114"}.glyphicon-retweet:before{content:"\e115"}.glyphicon-shopping-cart:before{content:"\e116"}.glyphicon-folder-close:before{content:"\e117"}.glyphicon-folder-open:before{content:"\e118"}.glyphicon-resize-vertical:before{content:"\e119"}.glyphicon-resize-horizontal:before{content:"\e120"}.glyphicon-hdd:before{content:"\e121"}.glyphicon-bullhorn:before{content:"\e122"}.glyphicon-bell:before{content:"\e123"}.glyphicon-certificate:before{content:"\e124"}.glyphicon-thumbs-up:before{content:"\e125"}.glyphicon-thumbs-down:before{content:"\e126"}.glyphicon-hand-right:before{content:"\e127"}.glyphicon-hand-left:before{content:"\e128"}.glyphicon-hand-up:before{content:"\e129"}.glyphicon-hand-down:before{content:"\e130"}.glyphicon-circle-arrow-right:before{content:"\e131"}.glyphicon-circle-arrow-left:before{content:"\e132"}.glyphicon-circle-arrow-up:before{content:"\e133"}.glyphicon-circle-arrow-down:before{content:"\e134"}.glyphicon-globe:before{content:"\e135"}.glyphicon-wrench:before{content:"\e136"}.glyphicon-tasks:before{content:"\e137"}.glyphicon-filter:before{content:"\e138"}.glyphicon-briefcase:before{content:"\e139"}.glyphicon-fullscreen:before{content:"\e140"}.glyphicon-dashboard:before{content:"\e141"}.glyphicon-paperclip:before{content:"\e142"}.glyphicon-heart-empty:before{content:"\e143"}.glyphicon-link:before{content:"\e144"}.glyphicon-phone:before{content:"\e145"}.glyphicon-pushpin:before{content:"\e146"}.glyphicon-usd:before{content:"\e148"}.glyphicon-gbp:before{content:"\e149"}.glyphicon-sort:before{content:"\e150"}.glyphicon-sort-by-alphabet:before{content:"\e151"}.glyphicon-sort-by-alphabet-alt:before{content:"\e152"}.glyphicon-sort-by-order:before{content:"\e153"}.glyphicon-sort-by-order-alt:before{content:"\e154"}.glyphicon-sort-by-attributes:before{content:"\e155"}.glyphicon-sort-by-attributes-alt:before{content:"\e156"}.glyphicon-unchecked:before{content:"\e157"}.glyphicon-expand:before{content:"\e158"}.glyphicon-collapse-down:before{content:"\e159"}.glyphicon-collapse-up:before{content:"\e160"}.glyphicon-log-in:before{content:"\e161"}.glyphicon-flash:before{content:"\e162"}.glyphicon-log-out:before{content:"\e163"}.glyphicon-new-window:before{content:"\e164"}.glyphicon-record:before{content:"\e165"}.glyphicon-save:before{content:"\e166"}.glyphicon-open:before{content:"\e167"}.glyphicon-saved:before{content:"\e168"}.glyphicon-import:before{content:"\e169"}.glyphicon-export:before{content:"\e170"}.glyphicon-send:before{content:"\e171"}.glyphicon-floppy-disk:before{content:"\e172"}.glyphicon-floppy-saved:before{content:"\e173"}.glyphicon-floppy-remove:before{content:"\e174"}.glyphicon-floppy-save:before{content:"\e175"}.glyphicon-floppy-open:before{content:"\e176"}.glyphicon-credit-card:before{content:"\e177"}.glyphicon-transfer:before{content:"\e178"}.glyphicon-cutlery:before{content:"\e179"}.glyphicon-header:before{content:"\e180"}.glyphicon-compressed:before{content:"\e181"}.glyphicon-earphone:before{content:"\e182"}.glyphicon-phone-alt:before{content:"\e183"}.glyphicon-tower:before{content:"\e184"}.glyphicon-stats:before{content:"\e185"}.glyphicon-sd-video:before{content:"\e186"}.glyphicon-hd-video:before{content:"\e187"}.glyphicon-subtitles:before{content:"\e188"}.glyphicon-sound-stereo:before{content:"\e189"}.glyphicon-sound-dolby:before{content:"\e190"}.glyphicon-sound-5-1:before{content:"\e191"}.glyphicon-sound-6-1:before{content:"\e192"}.glyphicon-sound-7-1:before{content:"\e193"}.glyphicon-copyright-mark:before{content:"\e194"}.glyphicon-registration-mark:before{content:"\e195"}.glyphicon-cloud-download:before{content:"\e197"}.glyphicon-cloud-upload:before{content:"\e198"}.glyphicon-tree-conifer:before{content:"\e199"}.glyphicon-tree-deciduous:before{content:"\e200"}.glyphicon-cd:before{content:"\e201"}.glyphicon-save-file:before{content:"\e202"}.glyphicon-open-file:before{content:"\e203"}.glyphicon-level-up:before{content:"\e204"}.glyphicon-copy:before{content:"\e205"}.glyphicon-paste:before{content:"\e206"}.glyphicon-alert:before{content:"\e209"}.glyphicon-equalizer:before{content:"\e210"}.glyphicon-king:before{content:"\e211"}.glyphicon-queen:before{content:"\e212"}.glyphicon-pawn:before{content:"\e213"}.glyphicon-bishop:before{content:"\e214"}.glyphicon-knight:before{content:"\e215"}.glyphicon-baby-formula:before{content:"\e216"}.glyphicon-tent:before{content:"\26fa"}.glyphicon-blackboard:before{content:"\e218"}.glyphicon-bed:before{content:"\e219"}.glyphicon-apple:before{content:"\f8ff"}.glyphicon-erase:before{content:"\e221"}.glyphicon-hourglass:before{content:"\231b"}.glyphicon-lamp:before{content:"\e223"}.glyphicon-duplicate:before{content:"\e224"}.glyphicon-piggy-bank:before{content:"\e225"}.glyphicon-scissors:before{content:"\e226"}.glyphicon-bitcoin:before,.glyphicon-btc:before,.glyphicon-xbt:before{content:"\e227"}.glyphicon-jpy:before,.glyphicon-yen:before{content:"\00a5"}.glyphicon-rub:before,.glyphicon-ruble:before{content:"\20bd"}.glyphicon-scale:before{content:"\e230"}.glyphicon-ice-lolly:before{content:"\e231"}.glyphicon-ice-lolly-tasted:before{content:"\e232"}.glyphicon-education:before{content:"\e233"}.glyphicon-option-horizontal:before{content:"\e234"}.glyphicon-option-vertical:before{content:"\e235"}.glyphicon-menu-hamburger:before{content:"\e236"}.glyphicon-modal-window:before{content:"\e237"}.glyphicon-oil:before{content:"\e238"}.glyphicon-grain:before{content:"\e239"}.glyphicon-sunglasses:before{content:"\e240"}.glyphicon-text-size:before{content:"\e241"}.glyphicon-text-color:before{content:"\e242"}.glyphicon-text-background:before{content:"\e243"}.glyphicon-object-align-top:before{content:"\e244"}.glyphicon-object-align-bottom:before{content:"\e245"}.glyphicon-object-align-horizontal:before{content:"\e246"}.glyphicon-object-align-left:before{content:"\e247"}.glyphicon-object-align-vertical:before{content:"\e248"}.glyphicon-object-align-right:before{content:"\e249"}.glyphicon-triangle-right:before{content:"\e250"}.glyphicon-triangle-left:before{content:"\e251"}.glyphicon-triangle-bottom:before{content:"\e252"}.glyphicon-triangle-top:before{content:"\e253"}.glyphicon-console:before{content:"\e254"}.glyphicon-superscript:before{content:"\e255"}.glyphicon-subscript:before{content:"\e256"}.glyphicon-menu-left:before{content:"\e257"}.glyphicon-menu-right:before{content:"\e258"}.glyphicon-menu-down:before{content:"\e259"}.glyphicon-menu-up:before{content:"\e260"}*,:after,:before{box-sizing:border-box}html{font-size:10px;-webkit-tap-highlight-color:transparent}body{font-family:Raleway,sans-serif;font-size:14px;line-height:1.6;color:#636b6f}button,input,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#3097D1;text-decoration:none}a:focus,a:hover{color:#216a94;text-decoration:underline}a:focus{outline:-webkit-focus-ring-color auto 5px;outline-offset:-2px}.img-responsive{display:block;height:auto}.img-rounded{border-radius:6px}.img-thumbnail{padding:4px;line-height:1.6;border:1px solid #ddd;border-radius:4px;transition:all .2s ease-in-out;display:inline-block;height:auto}.img-circle{border-radius:50%}hr{margin-top:22px;margin-bottom:22px;border-top:1px solid #eee}.sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}[role=button]{cursor:pointer}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{font-family:inherit;font-weight:500;line-height:1.1;color:inherit}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-weight:400;line-height:1;color:#777}.h1,.h2,.h3,h1,h2,h3{margin-top:22px;margin-bottom:11px}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small{font-size:65%}.h4,.h5,.h6,h4,h5,h6{margin-top:11px;margin-bottom:11px}.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-size:75%}.h1,h1{font-size:36px}.h2,h2{font-size:30px}.h3,h3{font-size:24px}.h4,h4{font-size:18px}.h5,h5{font-size:14px}.h6,h6{font-size:12px}p{margin:0 0 11px}.lead{margin-bottom:22px;font-size:16px;font-weight:300;line-height:1.4}dt,kbd kbd,label{font-weight:700}@media (min-width:768px){.lead{font-size:21px}}.small,small{font-size:85%}.mark,mark{background-color:#fcf8e3;padding:.2em}.list-inline,.list-unstyled{padding-left:0;list-style:none}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}.text-justify{text-align:justify}.text-nowrap{white-space:nowrap}.text-lowercase{text-transform:lowercase}.initialism,.text-uppercase{text-transform:uppercase}.text-capitalize{text-transform:capitalize}.text-muted{color:#777}.text-primary{color:#3097D1}a.text-primary:focus,a.text-primary:hover{color:#2579a9}.text-success{color:#3c763d}a.text-success:focus,a.text-success:hover{color:#2b542c}.text-info{color:#31708f}a.text-info:focus,a.text-info:hover{color:#245269}.text-warning{color:#8a6d3b}a.text-warning:focus,a.text-warning:hover{color:#66512c}.text-danger{color:#a94442}a.text-danger:focus,a.text-danger:hover{color:#843534}.bg-primary{color:#fff;background-color:#3097D1}a.bg-primary:focus,a.bg-primary:hover{background-color:#2579a9}.bg-success{background-color:#dff0d8}a.bg-success:focus,a.bg-success:hover{background-color:#c1e2b3}.bg-info{background-color:#d9edf7}a.bg-info:focus,a.bg-info:hover{background-color:#afd9ee}.bg-warning{background-color:#fcf8e3}a.bg-warning:focus,a.bg-warning:hover{background-color:#f7ecb5}.bg-danger{background-color:#f2dede}a.bg-danger:focus,a.bg-danger:hover{background-color:#e4b9b9}pre code,table{background-color:transparent}.page-header{padding-bottom:10px;margin:44px 0 22px;border-bottom:1px solid #eee}dl,ol,ul{margin-top:0}blockquote ol:last-child,blockquote p:last-child,blockquote ul:last-child,ol ol,ol ul,ul ol,ul ul{margin-bottom:0}address,dl{margin-bottom:22px}ol,ul{margin-bottom:11px}.list-inline{margin-left:-5px}.list-inline>li{display:inline-block;padding-left:5px;padding-right:5px}dd,dt{line-height:1.6}dd{margin-left:0}.dl-horizontal dd:after,.dl-horizontal dd:before{content:" ";display:table}.dl-horizontal dd:after{clear:both}@media (min-width:768px){.dl-horizontal dt{float:left;width:160px;clear:left;text-align:right;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}.container{width:750px}}.btn-group-vertical>.btn-group:after,.btn-toolbar:after,.clearfix:after,.container-fluid:after,.container:after,.dropdown-menu>li>a,.form-horizontal .form-group:after,.modal-footer:after,.modal-header:after,.navbar-collapse:after,.navbar-header:after,.navbar:after,.pager:after,.panel-body:after,.row:after{clear:both}abbr[data-original-title],abbr[title]{cursor:help;border-bottom:1px dotted #777}.initialism{font-size:90%}blockquote{padding:11px 22px;margin:0 0 22px;font-size:17.5px;border-left:5px solid #eee}blockquote .small,blockquote footer,blockquote small{display:block;font-size:80%;line-height:1.6;color:#777}legend,pre{color:#333}blockquote .small:before,blockquote footer:before,blockquote small:before{content:'\2014 \00A0'}.blockquote-reverse,blockquote.pull-right{padding-right:15px;padding-left:0;border-right:5px solid #eee;border-left:0;text-align:right}code,kbd{padding:2px 4px;font-size:90%}caption,th{text-align:left}.blockquote-reverse .small:before,.blockquote-reverse footer:before,.blockquote-reverse small:before,blockquote.pull-right .small:before,blockquote.pull-right footer:before,blockquote.pull-right small:before{content:''}.blockquote-reverse .small:after,.blockquote-reverse footer:after,.blockquote-reverse small:after,blockquote.pull-right .small:after,blockquote.pull-right footer:after,blockquote.pull-right small:after{content:'\00A0 \2014'}address{font-style:normal;line-height:1.6}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,"Courier New",monospace}code{color:#c7254e;background-color:#f9f2f4;border-radius:4px}kbd{color:#fff;background-color:#333;border-radius:3px;box-shadow:inset 0 -1px 0 rgba(0,0,0,.25)}kbd kbd{padding:0;font-size:100%;box-shadow:none}pre{display:block;padding:10.5px;margin:0 0 11px;font-size:13px;line-height:1.6;word-break:break-all;word-wrap:break-word;background-color:#f5f5f5;border:1px solid #ccc;border-radius:4px}.container-fluid:after,.container-fluid:before,.container:after,.container:before,.row:after,.row:before{display:table;content:" "}.container,.container-fluid{margin-right:auto;margin-left:auto}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;border-radius:0}.container,.container-fluid{padding-left:15px;padding-right:15px}.pre-scrollable{overflow-y:scroll}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.row{margin-left:-15px;margin-right:-15px}.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{position:relative;min-height:1px;padding-left:15px;padding-right:15px}.col-xs-1{width:8.33333333%}.col-xs-2{width:16.66666667%}.col-xs-3{width:25%}.col-xs-4{width:33.33333333%}.col-xs-5{width:41.66666667%}.col-xs-6{width:50%}.col-xs-7{width:58.33333333%}.col-xs-8{width:66.66666667%}.col-xs-9{width:75%}.col-xs-10{width:83.33333333%}.col-xs-11{width:91.66666667%}.col-xs-12{width:100%}.col-xs-pull-0{right:auto}.col-xs-pull-1{right:8.33333333%}.col-xs-pull-2{right:16.66666667%}.col-xs-pull-3{right:25%}.col-xs-pull-4{right:33.33333333%}.col-xs-pull-5{right:41.66666667%}.col-xs-pull-6{right:50%}.col-xs-pull-7{right:58.33333333%}.col-xs-pull-8{right:66.66666667%}.col-xs-pull-9{right:75%}.col-xs-pull-10{right:83.33333333%}.col-xs-pull-11{right:91.66666667%}.col-xs-pull-12{right:100%}.col-xs-push-0{left:auto}.col-xs-push-1{left:8.33333333%}.col-xs-push-2{left:16.66666667%}.col-xs-push-3{left:25%}.col-xs-push-4{left:33.33333333%}.col-xs-push-5{left:41.66666667%}.col-xs-push-6{left:50%}.col-xs-push-7{left:58.33333333%}.col-xs-push-8{left:66.66666667%}.col-xs-push-9{left:75%}.col-xs-push-10{left:83.33333333%}.col-xs-push-11{left:91.66666667%}.col-xs-push-12{left:100%}.col-xs-offset-0{margin-left:0}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-11{margin-left:91.66666667%}.col-xs-offset-12{margin-left:100%}@media (min-width:768px){.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9{float:left}.col-sm-1{width:8.33333333%}.col-sm-2{width:16.66666667%}.col-sm-3{width:25%}.col-sm-4{width:33.33333333%}.col-sm-5{width:41.66666667%}.col-sm-6{width:50%}.col-sm-7{width:58.33333333%}.col-sm-8{width:66.66666667%}.col-sm-9{width:75%}.col-sm-10{width:83.33333333%}.col-sm-11{width:91.66666667%}.col-sm-12{width:100%}.col-sm-pull-0{right:auto}.col-sm-pull-1{right:8.33333333%}.col-sm-pull-2{right:16.66666667%}.col-sm-pull-3{right:25%}.col-sm-pull-4{right:33.33333333%}.col-sm-pull-5{right:41.66666667%}.col-sm-pull-6{right:50%}.col-sm-pull-7{right:58.33333333%}.col-sm-pull-8{right:66.66666667%}.col-sm-pull-9{right:75%}.col-sm-pull-10{right:83.33333333%}.col-sm-pull-11{right:91.66666667%}.col-sm-pull-12{right:100%}.col-sm-push-0{left:auto}.col-sm-push-1{left:8.33333333%}.col-sm-push-2{left:16.66666667%}.col-sm-push-3{left:25%}.col-sm-push-4{left:33.33333333%}.col-sm-push-5{left:41.66666667%}.col-sm-push-6{left:50%}.col-sm-push-7{left:58.33333333%}.col-sm-push-8{left:66.66666667%}.col-sm-push-9{left:75%}.col-sm-push-10{left:83.33333333%}.col-sm-push-11{left:91.66666667%}.col-sm-push-12{left:100%}.col-sm-offset-0{margin-left:0}.col-sm-offset-1{margin-left:8.33333333%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-7{margin-left:58.33333333%}.col-sm-offset-8{margin-left:66.66666667%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-10{margin-left:83.33333333%}.col-sm-offset-11{margin-left:91.66666667%}.col-sm-offset-12{margin-left:100%}}@media (min-width:992px){.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9{float:left}.col-md-1{width:8.33333333%}.col-md-2{width:16.66666667%}.col-md-3{width:25%}.col-md-4{width:33.33333333%}.col-md-5{width:41.66666667%}.col-md-6{width:50%}.col-md-7{width:58.33333333%}.col-md-8{width:66.66666667%}.col-md-9{width:75%}.col-md-10{width:83.33333333%}.col-md-11{width:91.66666667%}.col-md-12{width:100%}.col-md-pull-0{right:auto}.col-md-pull-1{right:8.33333333%}.col-md-pull-2{right:16.66666667%}.col-md-pull-3{right:25%}.col-md-pull-4{right:33.33333333%}.col-md-pull-5{right:41.66666667%}.col-md-pull-6{right:50%}.col-md-pull-7{right:58.33333333%}.col-md-pull-8{right:66.66666667%}.col-md-pull-9{right:75%}.col-md-pull-10{right:83.33333333%}.col-md-pull-11{right:91.66666667%}.col-md-pull-12{right:100%}.col-md-push-0{left:auto}.col-md-push-1{left:8.33333333%}.col-md-push-2{left:16.66666667%}.col-md-push-3{left:25%}.col-md-push-4{left:33.33333333%}.col-md-push-5{left:41.66666667%}.col-md-push-6{left:50%}.col-md-push-7{left:58.33333333%}.col-md-push-8{left:66.66666667%}.col-md-push-9{left:75%}.col-md-push-10{left:83.33333333%}.col-md-push-11{left:91.66666667%}.col-md-push-12{left:100%}.col-md-offset-0{margin-left:0}.col-md-offset-1{margin-left:8.33333333%}.col-md-offset-2{margin-left:16.66666667%}.col-md-offset-3{margin-left:25%}.col-md-offset-4{margin-left:33.33333333%}.col-md-offset-5{margin-left:41.66666667%}.col-md-offset-6{margin-left:50%}.col-md-offset-7{margin-left:58.33333333%}.col-md-offset-8{margin-left:66.66666667%}.col-md-offset-9{margin-left:75%}.col-md-offset-10{margin-left:83.33333333%}.col-md-offset-11{margin-left:91.66666667%}.col-md-offset-12{margin-left:100%}}@media (min-width:1200px){.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9{float:left}.col-lg-1{width:8.33333333%}.col-lg-2{width:16.66666667%}.col-lg-3{width:25%}.col-lg-4{width:33.33333333%}.col-lg-5{width:41.66666667%}.col-lg-6{width:50%}.col-lg-7{width:58.33333333%}.col-lg-8{width:66.66666667%}.col-lg-9{width:75%}.col-lg-10{width:83.33333333%}.col-lg-11{width:91.66666667%}.col-lg-12{width:100%}.col-lg-pull-0{right:auto}.col-lg-pull-1{right:8.33333333%}.col-lg-pull-2{right:16.66666667%}.col-lg-pull-3{right:25%}.col-lg-pull-4{right:33.33333333%}.col-lg-pull-5{right:41.66666667%}.col-lg-pull-6{right:50%}.col-lg-pull-7{right:58.33333333%}.col-lg-pull-8{right:66.66666667%}.col-lg-pull-9{right:75%}.col-lg-pull-10{right:83.33333333%}.col-lg-pull-11{right:91.66666667%}.col-lg-pull-12{right:100%}.col-lg-push-0{left:auto}.col-lg-push-1{left:8.33333333%}.col-lg-push-2{left:16.66666667%}.col-lg-push-3{left:25%}.col-lg-push-4{left:33.33333333%}.col-lg-push-5{left:41.66666667%}.col-lg-push-6{left:50%}.col-lg-push-7{left:58.33333333%}.col-lg-push-8{left:66.66666667%}.col-lg-push-9{left:75%}.col-lg-push-10{left:83.33333333%}.col-lg-push-11{left:91.66666667%}.col-lg-push-12{left:100%}.col-lg-offset-0{margin-left:0}.col-lg-offset-1{margin-left:8.33333333%}.col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-5{margin-left:41.66666667%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-7{margin-left:58.33333333%}.col-lg-offset-8{margin-left:66.66666667%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-10{margin-left:83.33333333%}.col-lg-offset-11{margin-left:91.66666667%}.col-lg-offset-12{margin-left:100%}}caption{padding-top:8px;padding-bottom:8px;color:#777}.table{width:100%;margin-bottom:22px}.table>tbody>tr>td,.table>tbody>tr>th,.table>tfoot>tr>td,.table>tfoot>tr>th,.table>thead>tr>td,.table>thead>tr>th{padding:8px;line-height:1.6;vertical-align:top;border-top:1px solid #ddd}.table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.table>caption+thead>tr:first-child>td,.table>caption+thead>tr:first-child>th,.table>colgroup+thead>tr:first-child>td,.table>colgroup+thead>tr:first-child>th,.table>thead:first-child>tr:first-child>td,.table>thead:first-child>tr:first-child>th{border-top:0}.table>tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#f5f8fa}.table-condensed>tbody>tr>td,.table-condensed>tbody>tr>th,.table-condensed>tfoot>tr>td,.table-condensed>tfoot>tr>th,.table-condensed>thead>tr>td,.table-condensed>thead>tr>th{padding:5px}.table-bordered,.table-bordered>tbody>tr>td,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>td,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border:1px solid #ddd}.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border-bottom-width:2px}.table-striped>tbody>tr:nth-of-type(odd){background-color:#f9f9f9}.table-hover>tbody>tr:hover,.table>tbody>tr.active>td,.table>tbody>tr.active>th,.table>tbody>tr>td.active,.table>tbody>tr>th.active,.table>tfoot>tr.active>td,.table>tfoot>tr.active>th,.table>tfoot>tr>td.active,.table>tfoot>tr>th.active,.table>thead>tr.active>td,.table>thead>tr.active>th,.table>thead>tr>td.active,.table>thead>tr>th.active{background-color:#f5f5f5}table col[class*=col-]{position:static;float:none;display:table-column}table td[class*=col-],table th[class*=col-]{position:static;float:none;display:table-cell}.table-hover>tbody>tr.active:hover>td,.table-hover>tbody>tr.active:hover>th,.table-hover>tbody>tr:hover>.active,.table-hover>tbody>tr>td.active:hover,.table-hover>tbody>tr>th.active:hover{background-color:#e8e8e8}.table>tbody>tr.success>td,.table>tbody>tr.success>th,.table>tbody>tr>td.success,.table>tbody>tr>th.success,.table>tfoot>tr.success>td,.table>tfoot>tr.success>th,.table>tfoot>tr>td.success,.table>tfoot>tr>th.success,.table>thead>tr.success>td,.table>thead>tr.success>th,.table>thead>tr>td.success,.table>thead>tr>th.success{background-color:#dff0d8}.table-hover>tbody>tr.success:hover>td,.table-hover>tbody>tr.success:hover>th,.table-hover>tbody>tr:hover>.success,.table-hover>tbody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover{background-color:#d0e9c6}.table>tbody>tr.info>td,.table>tbody>tr.info>th,.table>tbody>tr>td.info,.table>tbody>tr>th.info,.table>tfoot>tr.info>td,.table>tfoot>tr.info>th,.table>tfoot>tr>td.info,.table>tfoot>tr>th.info,.table>thead>tr.info>td,.table>thead>tr.info>th,.table>thead>tr>td.info,.table>thead>tr>th.info{background-color:#d9edf7}.table-hover>tbody>tr.info:hover>td,.table-hover>tbody>tr.info:hover>th,.table-hover>tbody>tr:hover>.info,.table-hover>tbody>tr>td.info:hover,.table-hover>tbody>tr>th.info:hover{background-color:#c4e3f3}.table>tbody>tr.warning>td,.table>tbody>tr.warning>th,.table>tbody>tr>td.warning,.table>tbody>tr>th.warning,.table>tfoot>tr.warning>td,.table>tfoot>tr.warning>th,.table>tfoot>tr>td.warning,.table>tfoot>tr>th.warning,.table>thead>tr.warning>td,.table>thead>tr.warning>th,.table>thead>tr>td.warning,.table>thead>tr>th.warning{background-color:#fcf8e3}.table-hover>tbody>tr.warning:hover>td,.table-hover>tbody>tr.warning:hover>th,.table-hover>tbody>tr:hover>.warning,.table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover{background-color:#faf2cc}.table>tbody>tr.danger>td,.table>tbody>tr.danger>th,.table>tbody>tr>td.danger,.table>tbody>tr>th.danger,.table>tfoot>tr.danger>td,.table>tfoot>tr.danger>th,.table>tfoot>tr>td.danger,.table>tfoot>tr>th.danger,.table>thead>tr.danger>td,.table>thead>tr.danger>th,.table>thead>tr>td.danger,.table>thead>tr>th.danger{background-color:#f2dede}.table-hover>tbody>tr.danger:hover>td,.table-hover>tbody>tr.danger:hover>th,.table-hover>tbody>tr:hover>.danger,.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover{background-color:#ebcccc}.table-responsive{overflow-x:auto;min-height:.01%}@media screen and (max-width:767px){.table-responsive{width:100%;margin-bottom:16.5px;overflow-y:hidden;-ms-overflow-style:-ms-autohiding-scrollbar;border:1px solid #ddd}.table-responsive>.table{margin-bottom:0}.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>td,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>thead>tr>th{white-space:nowrap}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}}fieldset,legend{padding:0;border:0}fieldset{margin:0;min-width:0}legend{display:block;width:100%;margin-bottom:22px;font-size:21px;line-height:inherit;border-bottom:1px solid #e5e5e5}label{display:inline-block;margin-bottom:5px}input[type=search]{box-sizing:border-box;-webkit-appearance:none}input[type=checkbox],input[type=radio]{margin:4px 0 0;margin-top:1px\9;line-height:normal}.form-control,output{font-size:14px;line-height:1.6;color:#555;display:block}input[type=file]{display:block}input[type=range]{display:block;width:100%}select[multiple],select[size]{height:auto}input[type=file]:focus,input[type=checkbox]:focus,input[type=radio]:focus{outline:-webkit-focus-ring-color auto 5px;outline-offset:-2px}output{padding-top:7px}.form-control{width:100%;height:36px;padding:6px 12px;background-color:#fff;border:1px solid #ccd0d2;border-radius:4px;box-shadow:inset 0 1px 1px rgba(0,0,0,.075);transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.form-control:focus{border-color:#98cbe8;outline:0;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(152,203,232,.6)}.form-control::-moz-placeholder{color:#b1b7ba;opacity:1}.form-control:-ms-input-placeholder{color:#b1b7ba}.form-control::-webkit-input-placeholder{color:#b1b7ba}.has-success .checkbox,.has-success .checkbox-inline,.has-success .control-label,.has-success .form-control-feedback,.has-success .help-block,.has-success .radio,.has-success .radio-inline,.has-success.checkbox label,.has-success.checkbox-inline label,.has-success.radio label,.has-success.radio-inline label{color:#3c763d}.form-control::-ms-expand{border:0;background-color:transparent}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{background-color:#eee;opacity:1}.form-control[disabled],fieldset[disabled] .form-control{cursor:not-allowed}textarea.form-control{height:auto}@media screen and (-webkit-min-device-pixel-ratio:0){input[type=date].form-control,input[type=time].form-control,input[type=datetime-local].form-control,input[type=month].form-control{line-height:36px}.input-group-sm input[type=date],.input-group-sm input[type=time],.input-group-sm input[type=datetime-local],.input-group-sm input[type=month],.input-group-sm>.input-group-btn>input[type=date].btn,.input-group-sm>.input-group-btn>input[type=time].btn,.input-group-sm>.input-group-btn>input[type=datetime-local].btn,.input-group-sm>.input-group-btn>input[type=month].btn,.input-group-sm>input[type=date].form-control,.input-group-sm>input[type=date].input-group-addon,.input-group-sm>input[type=time].form-control,.input-group-sm>input[type=time].input-group-addon,.input-group-sm>input[type=datetime-local].form-control,.input-group-sm>input[type=datetime-local].input-group-addon,.input-group-sm>input[type=month].form-control,.input-group-sm>input[type=month].input-group-addon,input[type=date].input-sm,input[type=time].input-sm,input[type=datetime-local].input-sm,input[type=month].input-sm{line-height:30px}.input-group-lg input[type=date],.input-group-lg input[type=time],.input-group-lg input[type=datetime-local],.input-group-lg input[type=month],.input-group-lg>.input-group-btn>input[type=date].btn,.input-group-lg>.input-group-btn>input[type=time].btn,.input-group-lg>.input-group-btn>input[type=datetime-local].btn,.input-group-lg>.input-group-btn>input[type=month].btn,.input-group-lg>input[type=date].form-control,.input-group-lg>input[type=date].input-group-addon,.input-group-lg>input[type=time].form-control,.input-group-lg>input[type=time].input-group-addon,.input-group-lg>input[type=datetime-local].form-control,.input-group-lg>input[type=datetime-local].input-group-addon,.input-group-lg>input[type=month].form-control,.input-group-lg>input[type=month].input-group-addon,input[type=date].input-lg,input[type=time].input-lg,input[type=datetime-local].input-lg,input[type=month].input-lg{line-height:46px}}.form-group{margin-bottom:15px}.checkbox,.radio{position:relative;display:block;margin-top:10px;margin-bottom:10px}.checkbox label,.radio label{min-height:22px;padding-left:20px;margin-bottom:0;font-weight:400;cursor:pointer}.checkbox input[type=checkbox],.checkbox-inline input[type=checkbox],.radio input[type=radio],.radio-inline input[type=radio]{position:absolute;margin-left:-20px;margin-top:4px\9}.checkbox+.checkbox,.radio+.radio{margin-top:-5px}.checkbox-inline,.radio-inline{position:relative;display:inline-block;padding-left:20px;margin-bottom:0;vertical-align:middle;font-weight:400;cursor:pointer}.checkbox-inline+.checkbox-inline,.radio-inline+.radio-inline{margin-top:0;margin-left:10px}.checkbox-inline.disabled,.checkbox.disabled label,.radio-inline.disabled,.radio.disabled label,fieldset[disabled] .checkbox label,fieldset[disabled] .checkbox-inline,fieldset[disabled] .radio label,fieldset[disabled] .radio-inline,fieldset[disabled] input[type=checkbox],fieldset[disabled] input[type=radio],input[type=checkbox].disabled,input[type=checkbox][disabled],input[type=radio].disabled,input[type=radio][disabled]{cursor:not-allowed}.form-control-static{padding-top:7px;padding-bottom:7px;margin-bottom:0;min-height:36px}.form-control-static.input-lg,.form-control-static.input-sm,.input-group-lg>.form-control-static.form-control,.input-group-lg>.form-control-static.input-group-addon,.input-group-lg>.input-group-btn>.form-control-static.btn,.input-group-sm>.form-control-static.form-control,.input-group-sm>.form-control-static.input-group-addon,.input-group-sm>.input-group-btn>.form-control-static.btn{padding-left:0;padding-right:0}.input-group-sm>.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.btn,.input-sm{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.input-group-sm>.input-group-btn>select.btn,.input-group-sm>select.form-control,.input-group-sm>select.input-group-addon,select.input-sm{height:30px;line-height:30px}.input-group-sm>.input-group-btn>select[multiple].btn,.input-group-sm>.input-group-btn>textarea.btn,.input-group-sm>select[multiple].form-control,.input-group-sm>select[multiple].input-group-addon,.input-group-sm>textarea.form-control,.input-group-sm>textarea.input-group-addon,select[multiple].input-sm,textarea.input-sm{height:auto}.form-group-sm .form-control{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.form-group-sm select.form-control{height:30px;line-height:30px}.form-group-sm select[multiple].form-control,.form-group-sm textarea.form-control{height:auto}.form-group-sm .form-control-static{height:30px;min-height:34px;padding:6px 10px;font-size:12px;line-height:1.5}.input-group-lg>.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.btn,.input-lg{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.input-group-lg>.input-group-btn>select.btn,.input-group-lg>select.form-control,.input-group-lg>select.input-group-addon,select.input-lg{height:46px;line-height:46px}.input-group-lg>.input-group-btn>select[multiple].btn,.input-group-lg>.input-group-btn>textarea.btn,.input-group-lg>select[multiple].form-control,.input-group-lg>select[multiple].input-group-addon,.input-group-lg>textarea.form-control,.input-group-lg>textarea.input-group-addon,select[multiple].input-lg,textarea.input-lg{height:auto}.form-group-lg .form-control{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.form-group-lg select.form-control{height:46px;line-height:46px}.form-group-lg select[multiple].form-control,.form-group-lg textarea.form-control{height:auto}.form-group-lg .form-control-static{height:46px;min-height:40px;padding:11px 16px;font-size:18px;line-height:1.3333333}.has-feedback{position:relative}.has-feedback .form-control{padding-right:45px}.form-control-feedback{position:absolute;top:0;right:0;z-index:2;display:block;width:36px;height:36px;line-height:36px;text-align:center;pointer-events:none}.collapsing,.dropdown,.dropup{position:relative}.form-group-lg .form-control+.form-control-feedback,.input-group-lg+.form-control-feedback,.input-group-lg>.form-control+.form-control-feedback,.input-group-lg>.input-group-addon+.form-control-feedback,.input-group-lg>.input-group-btn>.btn+.form-control-feedback,.input-lg+.form-control-feedback{width:46px;height:46px;line-height:46px}.form-group-sm .form-control+.form-control-feedback,.input-group-sm+.form-control-feedback,.input-group-sm>.form-control+.form-control-feedback,.input-group-sm>.input-group-addon+.form-control-feedback,.input-group-sm>.input-group-btn>.btn+.form-control-feedback,.input-sm+.form-control-feedback{width:30px;height:30px;line-height:30px}.has-success .form-control{border-color:#3c763d;box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-success .form-control:focus{border-color:#2b542c;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168}.has-success .input-group-addon{color:#3c763d;border-color:#3c763d;background-color:#dff0d8}.has-warning .checkbox,.has-warning .checkbox-inline,.has-warning .control-label,.has-warning .form-control-feedback,.has-warning .help-block,.has-warning .radio,.has-warning .radio-inline,.has-warning.checkbox label,.has-warning.checkbox-inline label,.has-warning.radio label,.has-warning.radio-inline label{color:#8a6d3b}.has-warning .form-control{border-color:#8a6d3b;box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-warning .form-control:focus{border-color:#66512c;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b}.has-warning .input-group-addon{color:#8a6d3b;border-color:#8a6d3b;background-color:#fcf8e3}.has-error .checkbox,.has-error .checkbox-inline,.has-error .control-label,.has-error .form-control-feedback,.has-error .help-block,.has-error .radio,.has-error .radio-inline,.has-error.checkbox label,.has-error.checkbox-inline label,.has-error.radio label,.has-error.radio-inline label{color:#a94442}.has-error .form-control{border-color:#a94442;box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-error .form-control:focus{border-color:#843534;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483}.has-error .input-group-addon{color:#a94442;border-color:#a94442;background-color:#f2dede}.has-feedback label~.form-control-feedback{top:27px}.has-feedback label.sr-only~.form-control-feedback{top:0}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#a4aaae}@media (min-width:768px){.form-inline .form-control-static,.form-inline .form-group{display:inline-block}.form-inline .control-label,.form-inline .form-group{margin-bottom:0;vertical-align:middle}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .input-group{display:inline-table;vertical-align:middle}.form-inline .input-group .form-control,.form-inline .input-group .input-group-addon,.form-inline .input-group .input-group-btn{width:auto}.form-inline .input-group>.form-control{width:100%}.form-inline .checkbox,.form-inline .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.form-inline .checkbox label,.form-inline .radio label{padding-left:0}.form-inline .checkbox input[type=checkbox],.form-inline .radio input[type=radio]{position:relative;margin-left:0}.form-inline .has-feedback .form-control-feedback{top:0}.form-horizontal .control-label{text-align:right;margin-bottom:0;padding-top:7px}}.form-horizontal .checkbox,.form-horizontal .checkbox-inline,.form-horizontal .radio,.form-horizontal .radio-inline{margin-top:0;margin-bottom:0;padding-top:7px}.form-horizontal .checkbox,.form-horizontal .radio{min-height:29px}.form-horizontal .form-group{margin-left:-15px;margin-right:-15px}.form-horizontal .form-group:after,.form-horizontal .form-group:before{content:" ";display:table}.form-horizontal .has-feedback .form-control-feedback{right:15px}@media (min-width:768px){.form-horizontal .form-group-lg .control-label{padding-top:11px;font-size:18px}.form-horizontal .form-group-sm .control-label{padding-top:6px;font-size:12px}}.btn{display:inline-block;margin-bottom:0;font-weight:400;text-align:center;vertical-align:middle;-ms-touch-action:manipulation;touch-action:manipulation;cursor:pointer;border:1px solid transparent;white-space:nowrap;padding:6px 12px;font-size:14px;line-height:1.6;border-radius:4px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.btn.active.focus,.btn.active:focus,.btn.focus,.btn:active.focus,.btn:active:focus,.btn:focus{outline:-webkit-focus-ring-color auto 5px;outline-offset:-2px}.btn.focus,.btn:focus,.btn:hover{color:#636b6f;text-decoration:none}.btn.active,.btn:active{outline:0;box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{cursor:not-allowed;opacity:.65;filter:alpha(opacity=65);box-shadow:none}a.btn.disabled,fieldset[disabled] a.btn{pointer-events:none}.btn-default{color:#636b6f;background-color:#fff;border-color:#ccc}.btn-default.focus,.btn-default:focus{color:#636b6f;background-color:#e6e5e5;border-color:#8c8c8c}.btn-default.active,.btn-default:active,.btn-default:hover,.open>.btn-default.dropdown-toggle{color:#636b6f;background-color:#e6e5e5;border-color:#adadad}.btn-default.active.focus,.btn-default.active:focus,.btn-default.active:hover,.btn-default:active.focus,.btn-default:active:focus,.btn-default:active:hover,.open>.btn-default.dropdown-toggle.focus,.open>.btn-default.dropdown-toggle:focus,.open>.btn-default.dropdown-toggle:hover{color:#636b6f;background-color:#d4d4d4;border-color:#8c8c8c}.btn-default.disabled.focus,.btn-default.disabled:focus,.btn-default.disabled:hover,.btn-default[disabled].focus,.btn-default[disabled]:focus,.btn-default[disabled]:hover,fieldset[disabled] .btn-default.focus,fieldset[disabled] .btn-default:focus,fieldset[disabled] .btn-default:hover{background-color:#fff;border-color:#ccc}.btn-default .badge{color:#fff;background-color:#636b6f}.btn-primary{color:#fff;background-color:#3097D1;border-color:#2a88bd}.btn-primary.focus,.btn-primary:focus{color:#fff;background-color:#2579a9;border-color:#133d55}.btn-primary.active,.btn-primary:active,.btn-primary:hover,.open>.btn-primary.dropdown-toggle{color:#fff;background-color:#2579a9;border-color:#1f648b}.btn-primary.active.focus,.btn-primary.active:focus,.btn-primary.active:hover,.btn-primary:active.focus,.btn-primary:active:focus,.btn-primary:active:hover,.open>.btn-primary.dropdown-toggle.focus,.open>.btn-primary.dropdown-toggle:focus,.open>.btn-primary.dropdown-toggle:hover{color:#fff;background-color:#1f648b;border-color:#133d55}.btn-primary.disabled.focus,.btn-primary.disabled:focus,.btn-primary.disabled:hover,.btn-primary[disabled].focus,.btn-primary[disabled]:focus,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary.focus,fieldset[disabled] .btn-primary:focus,fieldset[disabled] .btn-primary:hover{background-color:#3097D1;border-color:#2a88bd}.btn-primary .badge{color:#3097D1;background-color:#fff}.btn-success{color:#fff;background-color:#2ab27b;border-color:#259d6d}.btn-success.focus,.btn-success:focus{color:#fff;background-color:#20895e;border-color:#0d3625}.btn-success.active,.btn-success:active,.btn-success:hover,.open>.btn-success.dropdown-toggle{color:#fff;background-color:#20895e;border-color:#196c4b}.btn-success.active.focus,.btn-success.active:focus,.btn-success.active:hover,.btn-success:active.focus,.btn-success:active:focus,.btn-success:active:hover,.open>.btn-success.dropdown-toggle.focus,.open>.btn-success.dropdown-toggle:focus,.open>.btn-success.dropdown-toggle:hover{color:#fff;background-color:#196c4b;border-color:#0d3625}.btn-success.active,.btn-success:active,.open>.btn-success.dropdown-toggle{background-image:none}.btn-success.disabled.focus,.btn-success.disabled:focus,.btn-success.disabled:hover,.btn-success[disabled].focus,.btn-success[disabled]:focus,.btn-success[disabled]:hover,fieldset[disabled] .btn-success.focus,fieldset[disabled] .btn-success:focus,fieldset[disabled] .btn-success:hover{background-color:#2ab27b;border-color:#259d6d}.btn-success .badge{color:#2ab27b;background-color:#fff}.btn-info{color:#fff;background-color:#8eb4cb;border-color:#7da8c3}.btn-info.focus,.btn-info:focus{color:#fff;background-color:#6b9dbb;border-color:#3d6983}.btn-info.active,.btn-info:active,.btn-info:hover,.open>.btn-info.dropdown-toggle{color:#fff;background-color:#6b9dbb;border-color:#538db0}.btn-info.active.focus,.btn-info.active:focus,.btn-info.active:hover,.btn-info:active.focus,.btn-info:active:focus,.btn-info:active:hover,.open>.btn-info.dropdown-toggle.focus,.open>.btn-info.dropdown-toggle:focus,.open>.btn-info.dropdown-toggle:hover{color:#fff;background-color:#538db0;border-color:#3d6983}.btn-info.disabled.focus,.btn-info.disabled:focus,.btn-info.disabled:hover,.btn-info[disabled].focus,.btn-info[disabled]:focus,.btn-info[disabled]:hover,fieldset[disabled] .btn-info.focus,fieldset[disabled] .btn-info:focus,fieldset[disabled] .btn-info:hover{background-color:#8eb4cb;border-color:#7da8c3}.btn-info .badge{color:#8eb4cb;background-color:#fff}.btn-warning{color:#fff;background-color:#cbb956;border-color:#c5b143}.btn-warning.focus,.btn-warning:focus{color:#fff;background-color:#b6a338;border-color:#685d20}.btn-warning.active,.btn-warning:active,.btn-warning:hover,.open>.btn-warning.dropdown-toggle{color:#fff;background-color:#b6a338;border-color:#9b8a30}.btn-warning.active.focus,.btn-warning.active:focus,.btn-warning.active:hover,.btn-warning:active.focus,.btn-warning:active:focus,.btn-warning:active:hover,.open>.btn-warning.dropdown-toggle.focus,.open>.btn-warning.dropdown-toggle:focus,.open>.btn-warning.dropdown-toggle:hover{color:#fff;background-color:#9b8a30;border-color:#685d20}.btn-warning.disabled.focus,.btn-warning.disabled:focus,.btn-warning.disabled:hover,.btn-warning[disabled].focus,.btn-warning[disabled]:focus,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning.focus,fieldset[disabled] .btn-warning:focus,fieldset[disabled] .btn-warning:hover{background-color:#cbb956;border-color:#c5b143}.btn-warning .badge{color:#cbb956;background-color:#fff}.btn-danger{color:#fff;background-color:#bf5329;border-color:#aa4a24}.btn-danger.focus,.btn-danger:focus{color:#fff;background-color:#954120;border-color:#411c0e}.btn-danger.active,.btn-danger:active,.btn-danger:hover,.open>.btn-danger.dropdown-toggle{color:#fff;background-color:#954120;border-color:#78341a}.btn-danger.active.focus,.btn-danger.active:focus,.btn-danger.active:hover,.btn-danger:active.focus,.btn-danger:active:focus,.btn-danger:active:hover,.open>.btn-danger.dropdown-toggle.focus,.open>.btn-danger.dropdown-toggle:focus,.open>.btn-danger.dropdown-toggle:hover{color:#fff;background-color:#78341a;border-color:#411c0e}.btn-danger.disabled.focus,.btn-danger.disabled:focus,.btn-danger.disabled:hover,.btn-danger[disabled].focus,.btn-danger[disabled]:focus,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger.focus,fieldset[disabled] .btn-danger:focus,fieldset[disabled] .btn-danger:hover{background-color:#bf5329;border-color:#aa4a24}.btn-danger .badge{color:#bf5329;background-color:#fff}.btn-link{color:#3097D1;font-weight:400;border-radius:0}.btn-link,.btn-link.active,.btn-link:active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;box-shadow:none}.btn-link,.btn-link:active,.btn-link:focus,.btn-link:hover{border-color:transparent}.btn-link:focus,.btn-link:hover{color:#216a94;text-decoration:underline;background-color:transparent}.btn-link[disabled]:focus,.btn-link[disabled]:hover,fieldset[disabled] .btn-link:focus,fieldset[disabled] .btn-link:hover{color:#777;text-decoration:none}.btn-group-lg>.btn,.btn-lg{padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.btn-group-sm>.btn,.btn-sm{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-group-xs>.btn,.btn-xs{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:5px}input[type=button].btn-block,input[type=reset].btn-block,input[type=submit].btn-block{width:100%}.fade{opacity:0;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{display:none}.collapse.in{display:block}tr.collapse.in{display:table-row}tbody.collapse.in{display:table-row-group}.collapsing{height:0;overflow:hidden;transition-property:height,visibility;transition-duration:.35s;transition-timing-function:ease}.caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px dashed;border-top:4px solid\9;border-right:4px solid transparent;border-left:4px solid transparent}.dropdown-toggle:focus{outline:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;min-width:160px;padding:5px 0;margin:2px 0 0;list-style:none;font-size:14px;text-align:left;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);border-radius:4px;box-shadow:0 6px 12px rgba(0,0,0,.175);background-clip:padding-box}.dropdown-menu-right,.dropdown-menu.pull-right{left:auto;right:0}.dropdown-header,.dropdown-menu>li>a{display:block;padding:3px 20px;line-height:1.6;white-space:nowrap}.btn-group>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group>.btn-group:first-child:not(:last-child)>.dropdown-toggle,.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-bottom-right-radius:0;border-top-right-radius:0}.btn-group>.btn-group:last-child:not(:first-child)>.btn:first-child,.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.btn-group-vertical>.btn:not(:first-child):not(:last-child),.btn-group>.btn-group:not(:first-child):not(:last-child)>.btn,.btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.dropdown-menu .divider{height:1px;margin:10px 0;overflow:hidden;background-color:#e5e5e5}.dropdown-menu>li>a{font-weight:400;color:#333}.dropdown-menu>li>a:focus,.dropdown-menu>li>a:hover{text-decoration:none;color:#262626;background-color:#f5f5f5}.dropdown-menu>.active>a,.dropdown-menu>.active>a:focus,.dropdown-menu>.active>a:hover{color:#fff;text-decoration:none;outline:0;background-color:#3097D1}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{color:#777}.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{text-decoration:none;background-color:transparent;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);cursor:not-allowed}.open>.dropdown-menu{display:block}.open>a{outline:0}.dropdown-menu-left{left:0;right:auto}.dropdown-header{font-size:12px;color:#777}.dropdown-backdrop{position:fixed;left:0;right:0;bottom:0;top:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{border-top:0;border-bottom:4px dashed;border-bottom:4px solid\9;content:""}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:2px}@media (min-width:768px){.navbar-right .dropdown-menu{right:0;left:auto}.navbar-right .dropdown-menu-left{left:0;right:auto}}.btn-group,.btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.btn-group-vertical>.btn,.btn-group>.btn{position:relative;float:left}.btn-group-vertical>.btn.active,.btn-group-vertical>.btn:active,.btn-group-vertical>.btn:focus,.btn-group-vertical>.btn:hover,.btn-group>.btn.active,.btn-group>.btn:active,.btn-group>.btn:focus,.btn-group>.btn:hover{z-index:2}.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-left:-1px}.btn-toolbar{margin-left:-5px}.btn-toolbar:after,.btn-toolbar:before{content:" ";display:table}.btn-toolbar>.btn,.btn-toolbar>.btn-group,.btn-toolbar>.input-group{margin-left:5px}.btn .caret,.btn-group>.btn:first-child{margin-left:0}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{padding-left:8px;padding-right:8px}.btn-group-lg.btn-group>.btn+.dropdown-toggle,.btn-group>.btn-lg+.dropdown-toggle{padding-left:12px;padding-right:12px}.btn-group.open .dropdown-toggle{box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-group.open .dropdown-toggle.btn-link{box-shadow:none}.btn-group-lg>.btn .caret,.btn-lg .caret{border-width:5px 5px 0}.dropup .btn-group-lg>.btn .caret,.dropup .btn-lg .caret{border-width:0 5px 5px}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group,.btn-group-vertical>.btn-group>.btn{display:block;float:none;width:100%;max-width:100%}.btn-group-vertical>.btn-group:after,.btn-group-vertical>.btn-group:before{content:" ";display:table}.btn-group-vertical>.btn-group>.btn{float:none}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:first-child:not(:last-child){border-radius:4px 4px 0 0}.btn-group-vertical>.btn:last-child:not(:first-child){border-radius:0 0 4px 4px}.btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn,.input-group .form-control:not(:first-child):not(:last-child),.input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child){border-radius:0}.btn-group-vertical>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group-vertical>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-right-radius:0;border-top-left-radius:0}.btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.btn-group-justified>.btn,.btn-group-justified>.btn-group{float:none;display:table-cell;width:1%}.btn-group-justified>.btn-group .btn{width:100%}.btn-group-justified>.btn-group .dropdown-menu{left:auto}[data-toggle=buttons]>.btn input[type=checkbox],[data-toggle=buttons]>.btn input[type=radio],[data-toggle=buttons]>.btn-group>.btn input[type=checkbox],[data-toggle=buttons]>.btn-group>.btn input[type=radio]{position:absolute;clip:rect(0,0,0,0);pointer-events:none}.input-group,.input-group-btn,.input-group-btn>.btn{position:relative}.input-group{display:table;border-collapse:separate}.input-group[class*=col-]{float:none;padding-left:0;padding-right:0}.input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.input-group .form-control:focus{z-index:3}.input-group .form-control,.input-group-addon,.input-group-btn{display:table-cell}.input-group-addon,.input-group-btn{width:1%;white-space:nowrap;vertical-align:middle}.input-group-addon{padding:6px 12px;font-size:14px;font-weight:400;line-height:1;color:#555;text-align:center;background-color:#eee;border:1px solid #ccd0d2;border-radius:4px}.input-group-addon.input-sm,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.input-group-addon.btn{padding:5px 10px;font-size:12px;border-radius:3px}.input-group-addon.input-lg,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.input-group-addon.btn{padding:10px 16px;font-size:18px;border-radius:6px}.input-group-addon input[type=checkbox],.input-group-addon input[type=radio]{margin-top:0}.input-group .form-control:first-child,.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn-group:not(:last-child)>.btn,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle){border-bottom-right-radius:0;border-top-right-radius:0}.input-group-addon:first-child{border-right:0}.input-group .form-control:last-child,.input-group-addon:last-child,.input-group-btn:first-child>.btn-group:not(:first-child)>.btn,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group>.btn,.input-group-btn:last-child>.dropdown-toggle{border-bottom-left-radius:0;border-top-left-radius:0}.input-group-addon:last-child{border-left:0}.input-group-btn{font-size:0;white-space:nowrap}.input-group-btn>.btn+.btn{margin-left:-1px}.input-group-btn>.btn:active,.input-group-btn>.btn:focus,.input-group-btn>.btn:hover{z-index:2}.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group{margin-right:-1px}.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group{z-index:2;margin-left:-1px}.nav{margin-bottom:0;padding-left:0;list-style:none}.nav:after,.nav:before{content:" ";display:table}.nav>li,.nav>li>a{display:block;position:relative}.nav:after{clear:both}.nav>li>a{padding:10px 15px}.nav>li>a:focus,.nav>li>a:hover{text-decoration:none;background-color:#eee}.nav>li.disabled>a{color:#777}.nav>li.disabled>a:focus,.nav>li.disabled>a:hover{color:#777;text-decoration:none;background-color:transparent;cursor:not-allowed}.nav .open>a,.nav .open>a:focus,.nav .open>a:hover{background-color:#eee;border-color:#3097D1}.nav .nav-divider{height:1px;margin:10px 0;overflow:hidden;background-color:#e5e5e5}.nav>li>a>img{max-width:none}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{float:left;margin-bottom:-1px}.nav-tabs>li>a{margin-right:2px;line-height:1.6;border:1px solid transparent;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.nav-tabs>li.active>a,.nav-tabs>li.active>a:focus,.nav-tabs>li.active>a:hover{color:#555;background-color:#f5f8fa;border:1px solid #ddd;border-bottom-color:transparent;cursor:default}.nav-pills>li{float:left}.nav-justified>li,.nav-stacked>li,.nav-tabs.nav-justified>li{float:none}.nav-pills>li>a{border-radius:4px}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a,.nav-pills>li.active>a:focus,.nav-pills>li.active>a:hover{color:#fff;background-color:#3097D1}.nav-stacked>li+li{margin-top:2px;margin-left:0}.nav-justified,.nav-tabs.nav-justified{width:100%}.nav-justified>li>a,.nav-tabs.nav-justified>li>a{text-align:center;margin-bottom:5px}.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}.nav-tabs-justified,.nav-tabs.nav-justified{border-bottom:0}.nav-tabs-justified>li>a,.nav-tabs.nav-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover,.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-justified>li,.nav-tabs.nav-justified>li{display:table-cell;width:1%}.nav-justified>li>a,.nav-tabs.nav-justified>li>a{margin-bottom:0}.nav-tabs-justified>li>a,.nav-tabs.nav-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover,.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border-bottom-color:#f5f8fa}}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-right-radius:0;border-top-left-radius:0}.navbar{position:relative;min-height:50px;margin-bottom:22px;border:1px solid transparent}.navbar:after,.navbar:before{content:" ";display:table}.navbar-header:after,.navbar-header:before{content:" ";display:table}.navbar-collapse{overflow-x:visible;padding-right:15px;padding-left:15px;border-top:1px solid transparent;box-shadow:inset 0 1px 0 rgba(255,255,255,.1);-webkit-overflow-scrolling:touch}.navbar-collapse:after,.navbar-collapse:before{content:" ";display:table}.navbar-collapse.in{overflow-y:auto}@media (min-width:768px){.navbar{border-radius:4px}.navbar-header{float:left}.navbar-collapse{width:auto;border-top:0;box-shadow:none}.navbar-collapse.collapse{display:block!important;height:auto!important;padding-bottom:0;overflow:visible!important}.navbar-collapse.in{overflow-y:visible}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse,.navbar-static-top .navbar-collapse{padding-left:0;padding-right:0}}.embed-responsive,.modal,.modal-open,.progress{overflow:hidden}@media (max-device-width:480px) and (orientation:landscape){.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:200px}}.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:-15px;margin-left:-15px}.navbar-static-top{z-index:1000;border-width:0 0 1px}.navbar-fixed-bottom,.navbar-fixed-top{position:fixed;right:0;left:0;z-index:1030}.navbar-fixed-top{top:0;border-width:0 0 1px}.navbar-fixed-bottom{bottom:0;margin-bottom:0;border-width:1px 0 0}.navbar-brand{float:left;padding:14px 15px;font-size:18px;line-height:22px;height:50px}.navbar-brand:focus,.navbar-brand:hover{text-decoration:none}.navbar-brand>img{display:block}@media (min-width:768px){.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:0;margin-left:0}.navbar-fixed-bottom,.navbar-fixed-top,.navbar-static-top{border-radius:0}.navbar>.container .navbar-brand,.navbar>.container-fluid .navbar-brand{margin-left:-15px}}.navbar-toggle{position:relative;float:right;margin-right:15px;padding:9px 10px;margin-top:8px;margin-bottom:8px;background-color:transparent;border:1px solid transparent;border-radius:4px}.navbar-toggle:focus{outline:0}.navbar-toggle .icon-bar{display:block;width:22px;height:2px;border-radius:1px}.navbar-toggle .icon-bar+.icon-bar{margin-top:4px}.navbar-nav{margin:7px -15px}.navbar-nav>li>a{padding-top:10px;padding-bottom:10px;line-height:22px}@media (max-width:767px){.navbar-nav .open .dropdown-menu{position:static;float:none;width:auto;margin-top:0;background-color:transparent;border:0;box-shadow:none}.navbar-nav .open .dropdown-menu .dropdown-header,.navbar-nav .open .dropdown-menu>li>a{padding:5px 15px 5px 25px}.navbar-nav .open .dropdown-menu>li>a{line-height:22px}.navbar-nav .open .dropdown-menu>li>a:focus,.navbar-nav .open .dropdown-menu>li>a:hover{background-image:none}}.progress-bar-striped,.progress-striped .progress-bar,.progress-striped .progress-bar-danger,.progress-striped .progress-bar-info,.progress-striped .progress-bar-success,.progress-striped .progress-bar-warning{background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}@media (min-width:768px){.navbar-toggle{display:none}.navbar-nav{float:left;margin:0}.navbar-nav>li{float:left}.navbar-nav>li>a{padding-top:14px;padding-bottom:14px}}.navbar-form{padding:10px 15px;border-top:1px solid transparent;border-bottom:1px solid transparent;box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1);margin:7px -15px}@media (min-width:768px){.navbar-form .form-control-static,.navbar-form .form-group{display:inline-block}.navbar-form .control-label,.navbar-form .form-group{margin-bottom:0;vertical-align:middle}.navbar-form .form-control{display:inline-block;width:auto;vertical-align:middle}.navbar-form .input-group{display:inline-table;vertical-align:middle}.navbar-form .input-group .form-control,.navbar-form .input-group .input-group-addon,.navbar-form .input-group .input-group-btn{width:auto}.navbar-form .input-group>.form-control{width:100%}.navbar-form .checkbox,.navbar-form .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.navbar-form .checkbox label,.navbar-form .radio label{padding-left:0}.navbar-form .checkbox input[type=checkbox],.navbar-form .radio input[type=radio]{position:relative;margin-left:0}.navbar-form .has-feedback .form-control-feedback{top:0}.navbar-form{width:auto;border:0;margin-left:0;margin-right:0;padding-top:0;padding-bottom:0;box-shadow:none}}.breadcrumb>li,.pagination{display:inline-block}.btn .badge,.btn .label{top:-1px;position:relative}@media (max-width:767px){.navbar-form .form-group{margin-bottom:5px}.navbar-form .form-group:last-child{margin-bottom:0}}.navbar-nav>li>.dropdown-menu{margin-top:0;border-top-right-radius:0;border-top-left-radius:0}.navbar-fixed-bottom .navbar-nav>li>.dropdown-menu{margin-bottom:0;border-radius:4px 4px 0 0}.navbar-btn{margin-top:7px;margin-bottom:7px}.btn-group-sm>.navbar-btn.btn,.navbar-btn.btn-sm{margin-top:10px;margin-bottom:10px}.btn-group-xs>.navbar-btn.btn,.navbar-btn.btn-xs,.navbar-text{margin-top:14px;margin-bottom:14px}@media (min-width:768px){.navbar-text{float:left;margin-left:15px;margin-right:15px}.navbar-left{float:left!important}.navbar-right{float:right!important;margin-right:-15px}.navbar-right~.navbar-right{margin-right:0}}.navbar-default{background-color:#fff;border-color:#d3e0e9}.navbar-default .navbar-brand{color:#777}.navbar-default .navbar-brand:focus,.navbar-default .navbar-brand:hover{color:#5e5d5d;background-color:transparent}.navbar-default .navbar-nav>li>a,.navbar-default .navbar-text{color:#777}.navbar-default .navbar-nav>li>a:focus,.navbar-default .navbar-nav>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:focus,.navbar-default .navbar-nav>.active>a:hover{color:#555;background-color:#eee}.navbar-default .navbar-nav>.disabled>a,.navbar-default .navbar-nav>.disabled>a:focus,.navbar-default .navbar-nav>.disabled>a:hover{color:#ccc;background-color:transparent}.navbar-default .navbar-toggle{border-color:#ddd}.navbar-default .navbar-toggle:focus,.navbar-default .navbar-toggle:hover{background-color:#ddd}.navbar-default .navbar-toggle .icon-bar{background-color:#888}.navbar-default .navbar-collapse,.navbar-default .navbar-form{border-color:#d3e0e9}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:focus,.navbar-default .navbar-nav>.open>a:hover{background-color:#eee;color:#555}@media (max-width:767px){.navbar-default .navbar-nav .open .dropdown-menu>li>a{color:#777}.navbar-default .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav .open .dropdown-menu>.active>a,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover{color:#555;background-color:#eee}.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#ccc;background-color:transparent}}.navbar-default .navbar-link{color:#777}.navbar-default .navbar-link:hover{color:#333}.navbar-default .btn-link{color:#777}.navbar-default .btn-link:focus,.navbar-default .btn-link:hover{color:#333}.navbar-default .btn-link[disabled]:focus,.navbar-default .btn-link[disabled]:hover,fieldset[disabled] .navbar-default .btn-link:focus,fieldset[disabled] .navbar-default .btn-link:hover{color:#ccc}.navbar-inverse{background-color:#222;border-color:#090909}.navbar-inverse .navbar-brand{color:#9d9d9d}.navbar-inverse .navbar-brand:focus,.navbar-inverse .navbar-brand:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>li>a,.navbar-inverse .navbar-text{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a:focus,.navbar-inverse .navbar-nav>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:focus,.navbar-inverse .navbar-nav>.active>a:hover{color:#fff;background-color:#090909}.navbar-inverse .navbar-nav>.disabled>a,.navbar-inverse .navbar-nav>.disabled>a:focus,.navbar-inverse .navbar-nav>.disabled>a:hover{color:#444;background-color:transparent}.navbar-inverse .navbar-toggle{border-color:#333}.navbar-inverse .navbar-toggle:focus,.navbar-inverse .navbar-toggle:hover{background-color:#333}.navbar-inverse .navbar-toggle .icon-bar{background-color:#fff}.navbar-inverse .navbar-collapse,.navbar-inverse .navbar-form{border-color:#101010}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:focus,.navbar-inverse .navbar-nav>.open>a:hover{background-color:#090909;color:#fff}@media (max-width:767px){.navbar-inverse .navbar-nav .open .dropdown-menu>.dropdown-header{border-color:#090909}.navbar-inverse .navbar-nav .open .dropdown-menu .divider{background-color:#090909}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:hover{color:#fff;background-color:#090909}.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#444;background-color:transparent}}.navbar-inverse .navbar-link{color:#9d9d9d}.navbar-inverse .navbar-link:hover{color:#fff}.navbar-inverse .btn-link{color:#9d9d9d}.navbar-inverse .btn-link:focus,.navbar-inverse .btn-link:hover{color:#fff}.navbar-inverse .btn-link[disabled]:focus,.navbar-inverse .btn-link[disabled]:hover,fieldset[disabled] .navbar-inverse .btn-link:focus,fieldset[disabled] .navbar-inverse .btn-link:hover{color:#444}.breadcrumb{padding:8px 15px;margin-bottom:22px;list-style:none;background-color:#f5f5f5;border-radius:4px}.breadcrumb>li+li:before{content:"/ ";padding:0 5px;color:#ccc}.breadcrumb>.active{color:#777}.pagination{padding-left:0;margin:22px 0;border-radius:4px}.pagination>li{display:inline}.pagination>li>a,.pagination>li>span{position:relative;float:left;padding:6px 12px;line-height:1.6;text-decoration:none;color:#3097D1;background-color:#fff;border:1px solid #ddd;margin-left:-1px}.pagination>li:first-child>a,.pagination>li:first-child>span{margin-left:0;border-bottom-left-radius:4px;border-top-left-radius:4px}.pagination>li:last-child>a,.pagination>li:last-child>span{border-bottom-right-radius:4px;border-top-right-radius:4px}.pagination>li>a:focus,.pagination>li>a:hover,.pagination>li>span:focus,.pagination>li>span:hover{z-index:2;color:#216a94;background-color:#eee;border-color:#ddd}.pagination>.active>a,.pagination>.active>a:focus,.pagination>.active>a:hover,.pagination>.active>span,.pagination>.active>span:focus,.pagination>.active>span:hover{z-index:3;color:#fff;background-color:#3097D1;border-color:#3097D1;cursor:default}.pagination>.disabled>a,.pagination>.disabled>a:focus,.pagination>.disabled>a:hover,.pagination>.disabled>span,.pagination>.disabled>span:focus,.pagination>.disabled>span:hover{color:#777;background-color:#fff;border-color:#ddd;cursor:not-allowed}.pagination-lg>li>a,.pagination-lg>li>span{padding:10px 16px;font-size:18px;line-height:1.3333333}.pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span{border-bottom-left-radius:6px;border-top-left-radius:6px}.pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span{border-bottom-right-radius:6px;border-top-right-radius:6px}.pagination-sm>li>a,.pagination-sm>li>span{padding:5px 10px;font-size:12px;line-height:1.5}.badge,.label{font-weight:700;line-height:1;white-space:nowrap;text-align:center}.pagination-sm>li:first-child>a,.pagination-sm>li:first-child>span{border-bottom-left-radius:3px;border-top-left-radius:3px}.pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span{border-bottom-right-radius:3px;border-top-right-radius:3px}.pager{padding-left:0;margin:22px 0;list-style:none;text-align:center}.pager:after,.pager:before{content:" ";display:table}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;border-radius:15px}.pager li>a:focus,.pager li>a:hover{text-decoration:none;background-color:#eee}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:focus,.pager .disabled>a:hover,.pager .disabled>span{color:#777;background-color:#fff;cursor:not-allowed}.label{display:inline;padding:.2em .6em .3em;font-size:75%;color:#fff;border-radius:.25em}.label:empty{display:none}a.label:focus,a.label:hover{color:#fff;text-decoration:none;cursor:pointer}.label-default{background-color:#777}.label-default[href]:focus,.label-default[href]:hover{background-color:#5e5e5e}.label-primary{background-color:#3097D1}.label-primary[href]:focus,.label-primary[href]:hover{background-color:#2579a9}.label-success{background-color:#2ab27b}.label-success[href]:focus,.label-success[href]:hover{background-color:#20895e}.label-info{background-color:#8eb4cb}.label-info[href]:focus,.label-info[href]:hover{background-color:#6b9dbb}.label-warning{background-color:#cbb956}.label-warning[href]:focus,.label-warning[href]:hover{background-color:#b6a338}.label-danger{background-color:#bf5329}.label-danger[href]:focus,.label-danger[href]:hover{background-color:#954120}.badge{display:inline-block;min-width:10px;padding:3px 7px;font-size:12px;color:#fff;vertical-align:middle;background-color:#777;border-radius:10px}.badge:empty{display:none}.media-object,.thumbnail{display:block}.btn-group-xs>.btn .badge,.btn-xs .badge{top:0;padding:1px 5px}.list-group-item.active>.badge,.nav-pills>.active>a>.badge{color:#3097D1;background-color:#fff}.list-group-item>.badge{float:right}.list-group-item>.badge+.badge{margin-right:5px}.nav-pills>li>a>.badge{margin-left:3px}a.badge:focus,a.badge:hover{color:#fff;text-decoration:none;cursor:pointer}.jumbotron,.jumbotron .h1,.jumbotron h1{color:inherit}.jumbotron{padding-top:30px;padding-bottom:30px;margin-bottom:30px;background-color:#eee}.jumbotron p{margin-bottom:15px;font-size:21px;font-weight:200}.alert,.thumbnail{margin-bottom:22px}.alert .alert-link,.close{font-weight:700}.jumbotron>hr{border-top-color:#d5d5d5}.container .jumbotron,.container-fluid .jumbotron{border-radius:6px;padding-left:15px;padding-right:15px}.jumbotron .container{max-width:100%}@media screen and (min-width:768px){.jumbotron{padding-top:48px;padding-bottom:48px}.container .jumbotron,.container-fluid .jumbotron{padding-left:60px;padding-right:60px}.jumbotron .h1,.jumbotron h1{font-size:63px}}.thumbnail{padding:4px;line-height:1.6;background-color:#f5f8fa;border:1px solid #ddd;border-radius:4px;transition:border .2s ease-in-out}.thumbnail a>img,.thumbnail>img{display:block;max-width:100%;height:auto;margin-left:auto;margin-right:auto}.thumbnail .caption{padding:9px;color:#636b6f}a.thumbnail.active,a.thumbnail:focus,a.thumbnail:hover{border-color:#3097D1}.alert{padding:15px;border:1px solid transparent;border-radius:4px}.alert h4{margin-top:0;color:inherit}.alert>p,.alert>ul{margin-bottom:0}.alert>p+p{margin-top:5px}.alert-dismissable,.alert-dismissible{padding-right:35px}.alert-dismissable .close,.alert-dismissible .close{position:relative;top:-2px;right:-21px;color:inherit}.modal,.modal-backdrop{top:0;right:0;bottom:0;left:0}.alert-success{background-color:#dff0d8;border-color:#d6e9c6;color:#3c763d}.alert-success hr{border-top-color:#c9e2b3}.alert-success .alert-link{color:#2b542c}.alert-info{background-color:#d9edf7;border-color:#bce8f1;color:#31708f}.alert-info hr{border-top-color:#a6e1ec}.alert-info .alert-link{color:#245269}.alert-warning{background-color:#fcf8e3;border-color:#faebcc;color:#8a6d3b}.alert-warning hr{border-top-color:#f7e1b5}.alert-warning .alert-link{color:#66512c}.alert-danger{background-color:#f2dede;border-color:#ebccd1;color:#a94442}.alert-danger hr{border-top-color:#e4b9c0}.alert-danger .alert-link{color:#843534}@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}.progress{height:22px;margin-bottom:22px;background-color:#f5f5f5;border-radius:4px;box-shadow:inset 0 1px 2px rgba(0,0,0,.1)}.progress-bar{float:left;width:0;height:100%;font-size:12px;line-height:22px;color:#fff;text-align:center;background-color:#3097D1;box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);transition:width .6s ease}.progress-bar-striped,.progress-striped .progress-bar{background-size:40px 40px}.progress-bar.active,.progress.active .progress-bar{-webkit-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-bar-success{background-color:#2ab27b}.progress-bar-info{background-color:#8eb4cb}.progress-bar-warning{background-color:#cbb956}.progress-bar-danger{background-color:#bf5329}.media{margin-top:15px}.media:first-child{margin-top:0}.media,.media-body{zoom:1;overflow:hidden}.media-body{width:10000px}.media-object.img-thumbnail{max-width:none}.media-right,.media>.pull-right{padding-left:10px}.media-left,.media>.pull-left{padding-right:10px}.media-body,.media-left,.media-right{display:table-cell;vertical-align:top}.media-middle{vertical-align:middle}.media-bottom{vertical-align:bottom}.media-heading{margin-top:0;margin-bottom:5px}.media-list{padding-left:0;list-style:none}.list-group{margin-bottom:20px;padding-left:0}.list-group-item{position:relative;display:block;padding:10px 15px;margin-bottom:-1px;background-color:#fff;border:1px solid #d3e0e9}.list-group-item:first-child{border-top-right-radius:4px;border-top-left-radius:4px}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}a.list-group-item,button.list-group-item{color:#555}a.list-group-item .list-group-item-heading,button.list-group-item .list-group-item-heading{color:#333}a.list-group-item:focus,a.list-group-item:hover,button.list-group-item:focus,button.list-group-item:hover{text-decoration:none;color:#555;background-color:#f5f5f5}button.list-group-item{width:100%;text-align:left}.list-group-item.disabled,.list-group-item.disabled:focus,.list-group-item.disabled:hover{background-color:#eee;color:#777;cursor:not-allowed}.list-group-item.disabled .list-group-item-heading,.list-group-item.disabled:focus .list-group-item-heading,.list-group-item.disabled:hover .list-group-item-heading{color:inherit}.list-group-item.disabled .list-group-item-text,.list-group-item.disabled:focus .list-group-item-text,.list-group-item.disabled:hover .list-group-item-text{color:#777}.list-group-item.active,.list-group-item.active:focus,.list-group-item.active:hover{z-index:2;color:#fff;background-color:#3097D1;border-color:#3097D1}.list-group-item.active .list-group-item-heading,.list-group-item.active .list-group-item-heading>.small,.list-group-item.active .list-group-item-heading>small,.list-group-item.active:focus .list-group-item-heading,.list-group-item.active:focus .list-group-item-heading>.small,.list-group-item.active:focus .list-group-item-heading>small,.list-group-item.active:hover .list-group-item-heading,.list-group-item.active:hover .list-group-item-heading>.small,.list-group-item.active:hover .list-group-item-heading>small{color:inherit}.list-group-item.active .list-group-item-text,.list-group-item.active:focus .list-group-item-text,.list-group-item.active:hover .list-group-item-text{color:#d7ebf6}.list-group-item-success{color:#3c763d;background-color:#dff0d8}a.list-group-item-success,button.list-group-item-success{color:#3c763d}a.list-group-item-success .list-group-item-heading,button.list-group-item-success .list-group-item-heading{color:inherit}a.list-group-item-success:focus,a.list-group-item-success:hover,button.list-group-item-success:focus,button.list-group-item-success:hover{color:#3c763d;background-color:#d0e9c6}a.list-group-item-success.active,a.list-group-item-success.active:focus,a.list-group-item-success.active:hover,button.list-group-item-success.active,button.list-group-item-success.active:focus,button.list-group-item-success.active:hover{color:#fff;background-color:#3c763d;border-color:#3c763d}.list-group-item-info{color:#31708f;background-color:#d9edf7}a.list-group-item-info,button.list-group-item-info{color:#31708f}a.list-group-item-info .list-group-item-heading,button.list-group-item-info .list-group-item-heading{color:inherit}a.list-group-item-info:focus,a.list-group-item-info:hover,button.list-group-item-info:focus,button.list-group-item-info:hover{color:#31708f;background-color:#c4e3f3}a.list-group-item-info.active,a.list-group-item-info.active:focus,a.list-group-item-info.active:hover,button.list-group-item-info.active,button.list-group-item-info.active:focus,button.list-group-item-info.active:hover{color:#fff;background-color:#31708f;border-color:#31708f}.list-group-item-warning{color:#8a6d3b;background-color:#fcf8e3}a.list-group-item-warning,button.list-group-item-warning{color:#8a6d3b}a.list-group-item-warning .list-group-item-heading,button.list-group-item-warning .list-group-item-heading{color:inherit}a.list-group-item-warning:focus,a.list-group-item-warning:hover,button.list-group-item-warning:focus,button.list-group-item-warning:hover{color:#8a6d3b;background-color:#faf2cc}a.list-group-item-warning.active,a.list-group-item-warning.active:focus,a.list-group-item-warning.active:hover,button.list-group-item-warning.active,button.list-group-item-warning.active:focus,button.list-group-item-warning.active:hover{color:#fff;background-color:#8a6d3b;border-color:#8a6d3b}.list-group-item-danger{color:#a94442;background-color:#f2dede}a.list-group-item-danger,button.list-group-item-danger{color:#a94442}a.list-group-item-danger .list-group-item-heading,button.list-group-item-danger .list-group-item-heading{color:inherit}a.list-group-item-danger:focus,a.list-group-item-danger:hover,button.list-group-item-danger:focus,button.list-group-item-danger:hover{color:#a94442;background-color:#ebcccc}a.list-group-item-danger.active,a.list-group-item-danger.active:focus,a.list-group-item-danger.active:hover,button.list-group-item-danger.active,button.list-group-item-danger.active:focus,button.list-group-item-danger.active:hover{color:#fff;background-color:#a94442;border-color:#a94442}.panel-heading>.dropdown .dropdown-toggle,.panel-title,.panel-title>.small,.panel-title>.small>a,.panel-title>a,.panel-title>small,.panel-title>small>a{color:inherit}.list-group-item-heading{margin-top:0;margin-bottom:5px}.list-group-item-text{margin-bottom:0;line-height:1.3}.panel{margin-bottom:22px;background-color:#fff;border:1px solid transparent;border-radius:4px;box-shadow:0 1px 1px rgba(0,0,0,.05)}.panel-title,.panel>.list-group,.panel>.panel-collapse>.list-group,.panel>.panel-collapse>.table,.panel>.table,.panel>.table-responsive>.table{margin-bottom:0}.panel-body{padding:15px}.panel-body:after,.panel-body:before{content:" ";display:table}.panel-heading{padding:10px 15px;border-bottom:1px solid transparent;border-top-right-radius:3px;border-top-left-radius:3px}.panel-title{margin-top:0;font-size:16px}.panel-footer{padding:10px 15px;background-color:#f5f5f5;border-top:1px solid #d3e0e9;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.list-group .list-group-item,.panel>.panel-collapse>.list-group .list-group-item{border-width:1px 0;border-radius:0}.panel-group .panel-heading,.panel>.table-bordered>tbody>tr:first-child>td,.panel>.table-bordered>tbody>tr:first-child>th,.panel>.table-bordered>tbody>tr:last-child>td,.panel>.table-bordered>tbody>tr:last-child>th,.panel>.table-bordered>tfoot>tr:last-child>td,.panel>.table-bordered>tfoot>tr:last-child>th,.panel>.table-bordered>thead>tr:first-child>td,.panel>.table-bordered>thead>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>th,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>td,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>th,.panel>.table-responsive>.table-bordered>thead>tr:first-child>td,.panel>.table-responsive>.table-bordered>thead>tr:first-child>th{border-bottom:0}.panel>.table-responsive:last-child>.table:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child,.panel>.table:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child{border-bottom-left-radius:3px;border-bottom-right-radius:3px}.panel>.list-group:first-child .list-group-item:first-child,.panel>.panel-collapse>.list-group:first-child .list-group-item:first-child{border-top:0;border-top-right-radius:3px;border-top-left-radius:3px}.panel>.list-group:last-child .list-group-item:last-child,.panel>.panel-collapse>.list-group:last-child .list-group-item:last-child{border-bottom:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.panel-heading+.panel-collapse>.list-group .list-group-item:first-child{border-top-right-radius:0;border-top-left-radius:0}.panel>.table-responsive:first-child>.table:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child,.panel>.table:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child,.panel>.table:first-child>thead:first-child>tr:first-child{border-top-right-radius:3px;border-top-left-radius:3px}.list-group+.panel-footer,.panel-heading+.list-group .list-group-item:first-child{border-top-width:0}.panel>.panel-collapse>.table caption,.panel>.table caption,.panel>.table-responsive>.table caption{padding-left:15px;padding-right:15px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table:first-child>thead:first-child>tr:first-child th:first-child{border-top-left-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table:first-child>thead:first-child>tr:first-child th:last-child{border-top-right-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:first-child{border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:last-child{border-bottom-right-radius:3px}.panel>.panel-body+.table,.panel>.panel-body+.table-responsive,.panel>.table+.panel-body,.panel>.table-responsive+.panel-body{border-top:1px solid #ddd}.panel>.table>tbody:first-child>tr:first-child td,.panel>.table>tbody:first-child>tr:first-child th{border-top:0}.panel>.table-bordered,.panel>.table-responsive>.table-bordered{border:0}.panel>.table-bordered>tbody>tr>td:first-child,.panel>.table-bordered>tbody>tr>th:first-child,.panel>.table-bordered>tfoot>tr>td:first-child,.panel>.table-bordered>tfoot>tr>th:first-child,.panel>.table-bordered>thead>tr>td:first-child,.panel>.table-bordered>thead>tr>th:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:first-child,.panel>.table-responsive>.table-bordered>thead>tr>td:first-child,.panel>.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.panel>.table-bordered>tbody>tr>td:last-child,.panel>.table-bordered>tbody>tr>th:last-child,.panel>.table-bordered>tfoot>tr>td:last-child,.panel>.table-bordered>tfoot>tr>th:last-child,.panel>.table-bordered>thead>tr>td:last-child,.panel>.table-bordered>thead>tr>th:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:last-child,.panel>.table-responsive>.table-bordered>thead>tr>td:last-child,.panel>.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.panel>.table-responsive{border:0;margin-bottom:0}.panel-group{margin-bottom:22px}.panel-group .panel{margin-bottom:0;border-radius:4px}.panel-group .panel+.panel{margin-top:5px}.panel-group .panel-heading+.panel-collapse>.list-group,.panel-group .panel-heading+.panel-collapse>.panel-body{border-top:1px solid #d3e0e9}.panel-group .panel-footer{border-top:0}.panel-group .panel-footer+.panel-collapse .panel-body{border-bottom:1px solid #d3e0e9}.panel-default{border-color:#d3e0e9}.panel-default>.panel-heading{color:#333;background-color:#fff;border-color:#d3e0e9}.panel-default>.panel-heading+.panel-collapse>.panel-body{border-top-color:#d3e0e9}.panel-default>.panel-heading .badge{color:#fff;background-color:#333}.panel-default>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#d3e0e9}.panel-primary{border-color:#3097D1}.panel-primary>.panel-heading{color:#fff;background-color:#3097D1;border-color:#3097D1}.panel-primary>.panel-heading+.panel-collapse>.panel-body{border-top-color:#3097D1}.panel-primary>.panel-heading .badge{color:#3097D1;background-color:#fff}.panel-primary>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#3097D1}.panel-success{border-color:#d6e9c6}.panel-success>.panel-heading{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.panel-success>.panel-heading+.panel-collapse>.panel-body{border-top-color:#d6e9c6}.panel-success>.panel-heading .badge{color:#dff0d8;background-color:#3c763d}.panel-success>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#d6e9c6}.panel-info{border-color:#bce8f1}.panel-info>.panel-heading{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.panel-info>.panel-heading+.panel-collapse>.panel-body{border-top-color:#bce8f1}.panel-info>.panel-heading .badge{color:#d9edf7;background-color:#31708f}.panel-info>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#bce8f1}.panel-warning{border-color:#faebcc}.panel-warning>.panel-heading{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.panel-warning>.panel-heading+.panel-collapse>.panel-body{border-top-color:#faebcc}.panel-warning>.panel-heading .badge{color:#fcf8e3;background-color:#8a6d3b}.panel-warning>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#faebcc}.panel-danger{border-color:#ebccd1}.panel-danger>.panel-heading{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.panel-danger>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ebccd1}.panel-danger>.panel-heading .badge{color:#f2dede;background-color:#a94442}.panel-danger>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ebccd1}.embed-responsive{position:relative;display:block;height:0;padding:0}.embed-responsive .embed-responsive-item,.embed-responsive embed,.embed-responsive iframe,.embed-responsive object,.embed-responsive video{position:absolute;top:0;left:0;bottom:0;height:100%;width:100%;border:0}.embed-responsive-16by9{padding-bottom:56.25%}.embed-responsive-4by3{padding-bottom:75%}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;border-radius:4px;box-shadow:inset 0 1px 1px rgba(0,0,0,.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,.15)}.well-lg{padding:24px;border-radius:6px}.well-sm{padding:9px;border-radius:3px}.close{float:right;font-size:21px;line-height:1;color:#000;text-shadow:0 1px 0 #fff;opacity:.2;filter:alpha(opacity=20)}.popover,.tooltip{font-family:Raleway,sans-serif;font-style:normal;font-weight:400;letter-spacing:normal;line-break:auto;line-height:1.6;text-shadow:none;text-transform:none;white-space:normal;word-break:normal;word-spacing:normal;word-wrap:normal;text-decoration:none}.close:focus,.close:hover{color:#000;text-decoration:none;cursor:pointer;opacity:.5;filter:alpha(opacity=50)}button.close{padding:0;cursor:pointer;background:0 0;border:0;-webkit-appearance:none}.modal-content,.popover{background-clip:padding-box}.modal{display:none;position:fixed;z-index:1050;-webkit-overflow-scrolling:touch;outline:0}.modal-footer:after,.modal-footer:before,.modal-header:after,.modal-header:before{display:table;content:" "}.modal.fade .modal-dialog{-webkit-transform:translate(0,-25%);transform:translate(0,-25%);transition:-webkit-transform .3s ease-out;transition:transform .3s ease-out;transition:transform .3s ease-out,-webkit-transform .3s ease-out}.modal.in .modal-dialog{-webkit-transform:translate(0,0);transform:translate(0,0)}.modal-open .modal{overflow-x:hidden;overflow-y:auto}.modal-dialog{position:relative;width:auto;margin:10px}.modal-content{position:relative;background-color:#fff;border:1px solid #999;border:1px solid rgba(0,0,0,.2);border-radius:6px;box-shadow:0 3px 9px rgba(0,0,0,.5);outline:0}.modal-backdrop{position:fixed;z-index:1040;background-color:#000}.modal-backdrop.fade{opacity:0;filter:alpha(opacity=0)}.modal-backdrop.in{opacity:.5;filter:alpha(opacity=50)}.modal-header{padding:15px;border-bottom:1px solid #e5e5e5}.modal-header .close{margin-top:-2px}.modal-title{margin:0;line-height:1.6}.modal-body{position:relative;padding:15px}.modal-footer{padding:15px;text-align:right;border-top:1px solid #e5e5e5}.modal-footer .btn+.btn{margin-left:5px;margin-bottom:0}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}.modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}@media (min-width:768px){.modal-dialog{width:600px;margin:30px auto}.modal-content{box-shadow:0 5px 15px rgba(0,0,0,.5)}.modal-sm{width:300px}}@media (min-width:992px){.modal-lg{width:900px}}.tooltip{position:absolute;z-index:1070;display:block;text-align:left;text-align:start;font-size:12px;opacity:0;filter:alpha(opacity=0)}.tooltip.in{opacity:.9;filter:alpha(opacity=90)}.tooltip.top{margin-top:-3px;padding:5px 0}.tooltip.right{margin-left:3px;padding:0 5px}.tooltip.bottom{margin-top:3px;padding:5px 0}.tooltip.left{margin-left:-3px;padding:0 5px}.tooltip-inner{max-width:200px;padding:3px 8px;color:#fff;text-align:center;background-color:#000;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow,.tooltip.top-left .tooltip-arrow,.tooltip.top-right .tooltip-arrow{bottom:0;border-width:5px 5px 0;border-top-color:#000}.tooltip.top .tooltip-arrow{left:50%;margin-left:-5px}.tooltip.top-left .tooltip-arrow{right:5px;margin-bottom:-5px}.tooltip.top-right .tooltip-arrow{left:5px;margin-bottom:-5px}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-width:5px 5px 5px 0;border-right-color:#000}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-width:5px 0 5px 5px;border-left-color:#000}.tooltip.bottom .tooltip-arrow,.tooltip.bottom-left .tooltip-arrow,.tooltip.bottom-right .tooltip-arrow{border-width:0 5px 5px;border-bottom-color:#000;top:0}.tooltip.bottom .tooltip-arrow{left:50%;margin-left:-5px}.tooltip.bottom-left .tooltip-arrow{right:5px;margin-top:-5px}.tooltip.bottom-right .tooltip-arrow{left:5px;margin-top:-5px}.popover{position:absolute;top:0;left:0;z-index:1060;display:none;max-width:276px;padding:1px;text-align:left;text-align:start;font-size:14px;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);border-radius:6px;box-shadow:0 5px 10px rgba(0,0,0,.2)}.carousel-caption,.carousel-control{color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6)}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{margin:0;padding:8px 14px;font-size:14px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-radius:5px 5px 0 0}.popover-content{padding:9px 14px}.popover>.arrow,.popover>.arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.carousel,.carousel-inner{position:relative}.popover>.arrow{border-width:11px}.popover>.arrow:after{border-width:10px;content:""}.popover.top>.arrow{left:50%;margin-left:-11px;border-bottom-width:0;border-top-color:#999;border-top-color:rgba(0,0,0,.25);bottom:-11px}.popover.top>.arrow:after{content:" ";bottom:1px;margin-left:-10px;border-bottom-width:0;border-top-color:#fff}.popover.left>.arrow:after,.popover.right>.arrow:after{content:" ";bottom:-10px}.popover.right>.arrow{top:50%;left:-11px;margin-top:-11px;border-left-width:0;border-right-color:#999;border-right-color:rgba(0,0,0,.25)}.popover.right>.arrow:after{left:1px;border-left-width:0;border-right-color:#fff}.popover.bottom>.arrow{left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,.25);top:-11px}.popover.bottom>.arrow:after{content:" ";top:1px;margin-left:-10px;border-top-width:0;border-bottom-color:#fff}.popover.left>.arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#999;border-left-color:rgba(0,0,0,.25)}.popover.left>.arrow:after{right:1px;border-right-width:0;border-left-color:#fff}.carousel-inner{overflow:hidden;width:100%}.carousel-inner>.item{display:none;position:relative;transition:.6s ease-in-out left}.carousel-inner>.item>a>img,.carousel-inner>.item>img{display:block;max-width:100%;height:auto;line-height:1}@media all and (transform-3d),(-webkit-transform-3d){.carousel-inner>.item{transition:-webkit-transform .6s ease-in-out;transition:transform .6s ease-in-out;transition:transform .6s ease-in-out,-webkit-transform .6s ease-in-out;-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-perspective:1000px;perspective:1000px}.carousel-inner>.item.active.right,.carousel-inner>.item.next{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0);left:0}.carousel-inner>.item.active.left,.carousel-inner>.item.prev{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0);left:0}.carousel-inner>.item.active,.carousel-inner>.item.next.left,.carousel-inner>.item.prev.right{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);left:0}}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:0;left:0;bottom:0;width:15%;opacity:.5;filter:alpha(opacity=50);font-size:20px;background-color:transparent}.carousel-control.left{background-image:linear-gradient(to right,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1)}.carousel-control.right{left:auto;right:0;background-image:linear-gradient(to right,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1)}.carousel-control:focus,.carousel-control:hover{outline:0;color:#fff;text-decoration:none;opacity:.9;filter:alpha(opacity=90)}.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{position:absolute;top:50%;margin-top:-10px;z-index:5;display:inline-block}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{left:50%;margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{right:50%;margin-right:-10px}.carousel-control .icon-next,.carousel-control .icon-prev{width:20px;height:20px;line-height:1;font-family:serif}.carousel-control .icon-prev:before{content:'\2039'}.carousel-control .icon-next:before{content:'\203a'}.carousel-indicators{position:absolute;bottom:10px;left:50%;z-index:15;width:60%;margin-left:-30%;padding-left:0;list-style:none;text-align:center}.carousel-indicators li{display:inline-block;width:10px;height:10px;margin:1px;text-indent:-999px;border:1px solid #fff;border-radius:10px;cursor:pointer;background-color:#000\9;background-color:transparent}.carousel-indicators .active{margin:0;width:12px;height:12px;background-color:#fff}.carousel-caption{position:absolute;left:15%;right:15%;bottom:20px;z-index:10;padding-top:20px;padding-bottom:20px}.carousel-caption .btn,.text-hide{text-shadow:none}@media screen and (min-width:768px){.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{width:30px;height:30px;margin-top:-10px;font-size:30px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{margin-right:-10px}.carousel-caption{left:20%;right:20%;padding-bottom:30px}.carousel-indicators{bottom:20px}}.clearfix:after,.clearfix:before{content:" ";display:table}.center-block{display:block;margin-left:auto;margin-right:auto}.pull-right{float:right!important}.pull-left{float:left!important}.hide{display:none!important}.show{display:block!important}.hidden,.visible-lg,.visible-lg-block,.visible-lg-inline,.visible-lg-inline-block,.visible-md,.visible-md-block,.visible-md-inline,.visible-md-inline-block,.visible-sm,.visible-sm-block,.visible-sm-inline,.visible-sm-inline-block,.visible-xs,.visible-xs-block,.visible-xs-inline,.visible-xs-inline-block{display:none!important}.invisible{visibility:hidden}.text-hide{font:0/0 a;color:transparent;background-color:transparent;border:0}.affix{position:fixed}@-ms-viewport{width:device-width}@media (max-width:767px){.visible-xs{display:block!important}table.visible-xs{display:table!important}tr.visible-xs{display:table-row!important}td.visible-xs,th.visible-xs{display:table-cell!important}.visible-xs-block{display:block!important}.visible-xs-inline{display:inline!important}.visible-xs-inline-block{display:inline-block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm{display:block!important}table.visible-sm{display:table!important}tr.visible-sm{display:table-row!important}td.visible-sm,th.visible-sm{display:table-cell!important}.visible-sm-block{display:block!important}.visible-sm-inline{display:inline!important}.visible-sm-inline-block{display:inline-block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md{display:block!important}table.visible-md{display:table!important}tr.visible-md{display:table-row!important}td.visible-md,th.visible-md{display:table-cell!important}.visible-md-block{display:block!important}.visible-md-inline{display:inline!important}.visible-md-inline-block{display:inline-block!important}}@media (min-width:1200px){.visible-lg{display:block!important}table.visible-lg{display:table!important}tr.visible-lg{display:table-row!important}td.visible-lg,th.visible-lg{display:table-cell!important}.visible-lg-block{display:block!important}.visible-lg-inline{display:inline!important}.visible-lg-inline-block{display:inline-block!important}.hidden-lg{display:none!important}}@media (max-width:767px){.hidden-xs{display:none!important}}@media (min-width:768px) and (max-width:991px){.hidden-sm{display:none!important}}@media (min-width:992px) and (max-width:1199px){.hidden-md{display:none!important}}.visible-print{display:none!important}@media print{.visible-print{display:block!important}table.visible-print{display:table!important}tr.visible-print{display:table-row!important}td.visible-print,th.visible-print{display:table-cell!important}}.visible-print-block{display:none!important}@media print{.visible-print-block{display:block!important}}.visible-print-inline{display:none!important}@media print{.visible-print-inline{display:inline!important}}.visible-print-inline-block{display:none!important}@media print{.visible-print-inline-block{display:inline-block!important}.hidden-print{display:none!important}} \ No newline at end of file diff --git a/public/css/bootstrap.css b/public/css/bootstrap.css new file mode 100644 index 0000000..943532d --- /dev/null +++ b/public/css/bootstrap.css @@ -0,0 +1,9030 @@ +/*! + * Bootstrap v4.1.3 (https://getbootstrap.com/) + * Copyright 2011-2018 The Bootstrap Authors + * Copyright 2011-2018 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + */ +:root { + --blue: #007bff; + --indigo: #6610f2; + --purple: #6f42c1; + --pink: #e83e8c; + --red: #dc3545; + --orange: #fd7e14; + --yellow: #ffc107; + --green: #28a745; + --teal: #20c997; + --cyan: #17a2b8; + --white: #fff; + --gray: #6c757d; + --gray-dark: #343a40; + --primary: #007bff; + --secondary: #6c757d; + --success: #28a745; + --info: #17a2b8; + --warning: #ffc107; + --danger: #dc3545; + --light: #f8f9fa; + --dark: #343a40; + --breakpoint-xs: 0; + --breakpoint-sm: 576px; + --breakpoint-md: 768px; + --breakpoint-lg: 992px; + --breakpoint-xl: 1200px; + --font-family-sans-serif: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; + --font-family-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; +} + +*, +*::before, +*::after { + box-sizing: border-box; +} + +html { + font-family: sans-serif; + line-height: 1.15; + -webkit-text-size-adjust: 100%; + -ms-text-size-adjust: 100%; + -ms-overflow-style: scrollbar; + -webkit-tap-highlight-color: rgba(0, 0, 0, 0); +} + +@-ms-viewport { + width: device-width; +} + +article, aside, figcaption, figure, footer, header, hgroup, main, nav, section { + display: block; +} + +body { + margin: 0; + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; + font-size: 1rem; + font-weight: 400; + line-height: 1.5; + color: #212529; + text-align: left; + background-color: #fff; +} + +[tabindex="-1"]:focus { + outline: 0 !important; +} + +hr { + box-sizing: content-box; + height: 0; + overflow: visible; +} + +h1, h2, h3, h4, h5, h6 { + margin-top: 0; + margin-bottom: 0.5rem; +} + +p { + margin-top: 0; + margin-bottom: 1rem; +} + +abbr[title], +abbr[data-original-title] { + text-decoration: underline; + -webkit-text-decoration: underline dotted; + text-decoration: underline dotted; + cursor: help; + border-bottom: 0; +} + +address { + margin-bottom: 1rem; + font-style: normal; + line-height: inherit; +} + +ol, +ul, +dl { + margin-top: 0; + margin-bottom: 1rem; +} + +ol ol, +ul ul, +ol ul, +ul ol { + margin-bottom: 0; +} + +dt { + font-weight: 700; +} + +dd { + margin-bottom: .5rem; + margin-left: 0; +} + +blockquote { + margin: 0 0 1rem; +} + +dfn { + font-style: italic; +} + +b, +strong { + font-weight: bolder; +} + +small { + font-size: 80%; +} + +sub, +sup { + position: relative; + font-size: 75%; + line-height: 0; + vertical-align: baseline; +} + +sub { + bottom: -.25em; +} + +sup { + top: -.5em; +} + +a { + color: #007bff; + text-decoration: none; + background-color: transparent; + -webkit-text-decoration-skip: objects; +} + +a:hover { + color: #0056b3; + text-decoration: underline; +} + +a:not([href]):not([tabindex]) { + color: inherit; + text-decoration: none; +} + +a:not([href]):not([tabindex]):hover, a:not([href]):not([tabindex]):focus { + color: inherit; + text-decoration: none; +} + +a:not([href]):not([tabindex]):focus { + outline: 0; +} + +pre, +code, +kbd, +samp { + font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; + font-size: 1em; +} + +pre { + margin-top: 0; + margin-bottom: 1rem; + overflow: auto; + -ms-overflow-style: scrollbar; +} + +figure { + margin: 0 0 1rem; +} + +img { + vertical-align: middle; + border-style: none; +} + +svg { + overflow: hidden; + vertical-align: middle; +} + +table { + border-collapse: collapse; +} + +caption { + padding-top: 0.75rem; + padding-bottom: 0.75rem; + color: #6c757d; + text-align: left; + caption-side: bottom; +} + +th { + text-align: inherit; +} + +label { + display: inline-block; + margin-bottom: 0.5rem; +} + +button { + border-radius: 0; +} + +button:focus { + outline: 1px dotted; + outline: 5px auto -webkit-focus-ring-color; +} + +input, +button, +select, +optgroup, +textarea { + margin: 0; + font-family: inherit; + font-size: inherit; + line-height: inherit; +} + +button, +input { + overflow: visible; +} + +button, +select { + text-transform: none; +} + +button, +html [type="button"], +[type="reset"], +[type="submit"] { + -webkit-appearance: button; +} + +button::-moz-focus-inner, +[type="button"]::-moz-focus-inner, +[type="reset"]::-moz-focus-inner, +[type="submit"]::-moz-focus-inner { + padding: 0; + border-style: none; +} + +input[type="radio"], +input[type="checkbox"] { + box-sizing: border-box; + padding: 0; +} + +input[type="date"], +input[type="time"], +input[type="datetime-local"], +input[type="month"] { + -webkit-appearance: listbox; +} + +textarea { + overflow: auto; + resize: vertical; +} + +fieldset { + min-width: 0; + padding: 0; + margin: 0; + border: 0; +} + +legend { + display: block; + width: 100%; + max-width: 100%; + padding: 0; + margin-bottom: .5rem; + font-size: 1.5rem; + line-height: inherit; + color: inherit; + white-space: normal; +} + +progress { + vertical-align: baseline; +} + +[type="number"]::-webkit-inner-spin-button, +[type="number"]::-webkit-outer-spin-button { + height: auto; +} + +[type="search"] { + outline-offset: -2px; + -webkit-appearance: none; +} + +[type="search"]::-webkit-search-cancel-button, +[type="search"]::-webkit-search-decoration { + -webkit-appearance: none; +} + +::-webkit-file-upload-button { + font: inherit; + -webkit-appearance: button; +} + +output { + display: inline-block; +} + +summary { + display: list-item; + cursor: pointer; +} + +template { + display: none; +} + +[hidden] { + display: none !important; +} + +h1, h2, h3, h4, h5, h6, +.h1, .h2, .h3, .h4, .h5, .h6 { + margin-bottom: 0.5rem; + font-family: inherit; + font-weight: 500; + line-height: 1.2; + color: inherit; +} + +h1, .h1 { + font-size: 2.5rem; +} + +h2, .h2 { + font-size: 2rem; +} + +h3, .h3 { + font-size: 1.75rem; +} + +h4, .h4 { + font-size: 1.5rem; +} + +h5, .h5 { + font-size: 1.25rem; +} + +h6, .h6 { + font-size: 1rem; +} + +.lead { + font-size: 1.25rem; + font-weight: 300; +} + +.display-1 { + font-size: 6rem; + font-weight: 300; + line-height: 1.2; +} + +.display-2 { + font-size: 5.5rem; + font-weight: 300; + line-height: 1.2; +} + +.display-3 { + font-size: 4.5rem; + font-weight: 300; + line-height: 1.2; +} + +.display-4 { + font-size: 3.5rem; + font-weight: 300; + line-height: 1.2; +} + +hr { + margin-top: 1rem; + margin-bottom: 1rem; + border: 0; + border-top: 1px solid rgba(0, 0, 0, 0.1); +} + +small, +.small { + font-size: 80%; + font-weight: 400; +} + +mark, +.mark { + padding: 0.2em; + background-color: #fcf8e3; +} + +.list-unstyled { + padding-left: 0; + list-style: none; +} + +.list-inline { + padding-left: 0; + list-style: none; +} + +.list-inline-item { + display: inline-block; +} + +.list-inline-item:not(:last-child) { + margin-right: 0.5rem; +} + +.initialism { + font-size: 90%; + text-transform: uppercase; +} + +.blockquote { + margin-bottom: 1rem; + font-size: 1.25rem; +} + +.blockquote-footer { + display: block; + font-size: 80%; + color: #6c757d; +} + +.blockquote-footer::before { + content: "\2014 \00A0"; +} + +.img-fluid { + max-width: 100%; + height: auto; +} + +.img-thumbnail { + padding: 0.25rem; + background-color: #fff; + border: 1px solid #dee2e6; + border-radius: 0.25rem; + max-width: 100%; + height: auto; +} + +.figure { + display: inline-block; +} + +.figure-img { + margin-bottom: 0.5rem; + line-height: 1; +} + +.figure-caption { + font-size: 90%; + color: #6c757d; +} + +code { + font-size: 87.5%; + color: #e83e8c; + word-break: break-word; +} + +a > code { + color: inherit; +} + +kbd { + padding: 0.2rem 0.4rem; + font-size: 87.5%; + color: #fff; + background-color: #212529; + border-radius: 0.2rem; +} + +kbd kbd { + padding: 0; + font-size: 100%; + font-weight: 700; +} + +pre { + display: block; + font-size: 87.5%; + color: #212529; +} + +pre code { + font-size: inherit; + color: inherit; + word-break: normal; +} + +.pre-scrollable { + max-height: 340px; + overflow-y: scroll; +} + +.container { + width: 100%; + padding-right: 15px; + padding-left: 15px; + margin-right: auto; + margin-left: auto; +} + +@media (min-width: 576px) { + .container { + max-width: 540px; + } +} + +@media (min-width: 768px) { + .container { + max-width: 720px; + } +} + +@media (min-width: 992px) { + .container { + max-width: 960px; + } +} + +@media (min-width: 1200px) { + .container { + max-width: 1140px; + } +} + +.container-fluid { + width: 100%; + padding-right: 15px; + padding-left: 15px; + margin-right: auto; + margin-left: auto; +} + +.row { + display: -ms-flexbox; + display: flex; + -ms-flex-wrap: wrap; + flex-wrap: wrap; + margin-right: -15px; + margin-left: -15px; +} + +.no-gutters { + margin-right: 0; + margin-left: 0; +} + +.no-gutters > .col, +.no-gutters > [class*="col-"] { + padding-right: 0; + padding-left: 0; +} + +.col-1, .col-2, .col-3, .col-4, .col-5, .col-6, .col-7, .col-8, .col-9, .col-10, .col-11, .col-12, .col, +.col-auto, .col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12, .col-sm, +.col-sm-auto, .col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12, .col-md, +.col-md-auto, .col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12, .col-lg, +.col-lg-auto, .col-xl-1, .col-xl-2, .col-xl-3, .col-xl-4, .col-xl-5, .col-xl-6, .col-xl-7, .col-xl-8, .col-xl-9, .col-xl-10, .col-xl-11, .col-xl-12, .col-xl, +.col-xl-auto { + position: relative; + width: 100%; + min-height: 1px; + padding-right: 15px; + padding-left: 15px; +} + +.col { + -ms-flex-preferred-size: 0; + flex-basis: 0; + -ms-flex-positive: 1; + flex-grow: 1; + max-width: 100%; +} + +.col-auto { + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: auto; + max-width: none; +} + +.col-1 { + -ms-flex: 0 0 8.333333%; + flex: 0 0 8.333333%; + max-width: 8.333333%; +} + +.col-2 { + -ms-flex: 0 0 16.666667%; + flex: 0 0 16.666667%; + max-width: 16.666667%; +} + +.col-3 { + -ms-flex: 0 0 25%; + flex: 0 0 25%; + max-width: 25%; +} + +.col-4 { + -ms-flex: 0 0 33.333333%; + flex: 0 0 33.333333%; + max-width: 33.333333%; +} + +.col-5 { + -ms-flex: 0 0 41.666667%; + flex: 0 0 41.666667%; + max-width: 41.666667%; +} + +.col-6 { + -ms-flex: 0 0 50%; + flex: 0 0 50%; + max-width: 50%; +} + +.col-7 { + -ms-flex: 0 0 58.333333%; + flex: 0 0 58.333333%; + max-width: 58.333333%; +} + +.col-8 { + -ms-flex: 0 0 66.666667%; + flex: 0 0 66.666667%; + max-width: 66.666667%; +} + +.col-9 { + -ms-flex: 0 0 75%; + flex: 0 0 75%; + max-width: 75%; +} + +.col-10 { + -ms-flex: 0 0 83.333333%; + flex: 0 0 83.333333%; + max-width: 83.333333%; +} + +.col-11 { + -ms-flex: 0 0 91.666667%; + flex: 0 0 91.666667%; + max-width: 91.666667%; +} + +.col-12 { + -ms-flex: 0 0 100%; + flex: 0 0 100%; + max-width: 100%; +} + +.order-first { + -ms-flex-order: -1; + order: -1; +} + +.order-last { + -ms-flex-order: 13; + order: 13; +} + +.order-0 { + -ms-flex-order: 0; + order: 0; +} + +.order-1 { + -ms-flex-order: 1; + order: 1; +} + +.order-2 { + -ms-flex-order: 2; + order: 2; +} + +.order-3 { + -ms-flex-order: 3; + order: 3; +} + +.order-4 { + -ms-flex-order: 4; + order: 4; +} + +.order-5 { + -ms-flex-order: 5; + order: 5; +} + +.order-6 { + -ms-flex-order: 6; + order: 6; +} + +.order-7 { + -ms-flex-order: 7; + order: 7; +} + +.order-8 { + -ms-flex-order: 8; + order: 8; +} + +.order-9 { + -ms-flex-order: 9; + order: 9; +} + +.order-10 { + -ms-flex-order: 10; + order: 10; +} + +.order-11 { + -ms-flex-order: 11; + order: 11; +} + +.order-12 { + -ms-flex-order: 12; + order: 12; +} + +.offset-1 { + margin-left: 8.333333%; +} + +.offset-2 { + margin-left: 16.666667%; +} + +.offset-3 { + margin-left: 25%; +} + +.offset-4 { + margin-left: 33.333333%; +} + +.offset-5 { + margin-left: 41.666667%; +} + +.offset-6 { + margin-left: 50%; +} + +.offset-7 { + margin-left: 58.333333%; +} + +.offset-8 { + margin-left: 66.666667%; +} + +.offset-9 { + margin-left: 75%; +} + +.offset-10 { + margin-left: 83.333333%; +} + +.offset-11 { + margin-left: 91.666667%; +} + +@media (min-width: 576px) { + .col-sm { + -ms-flex-preferred-size: 0; + flex-basis: 0; + -ms-flex-positive: 1; + flex-grow: 1; + max-width: 100%; + } + .col-sm-auto { + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: auto; + max-width: none; + } + .col-sm-1 { + -ms-flex: 0 0 8.333333%; + flex: 0 0 8.333333%; + max-width: 8.333333%; + } + .col-sm-2 { + -ms-flex: 0 0 16.666667%; + flex: 0 0 16.666667%; + max-width: 16.666667%; + } + .col-sm-3 { + -ms-flex: 0 0 25%; + flex: 0 0 25%; + max-width: 25%; + } + .col-sm-4 { + -ms-flex: 0 0 33.333333%; + flex: 0 0 33.333333%; + max-width: 33.333333%; + } + .col-sm-5 { + -ms-flex: 0 0 41.666667%; + flex: 0 0 41.666667%; + max-width: 41.666667%; + } + .col-sm-6 { + -ms-flex: 0 0 50%; + flex: 0 0 50%; + max-width: 50%; + } + .col-sm-7 { + -ms-flex: 0 0 58.333333%; + flex: 0 0 58.333333%; + max-width: 58.333333%; + } + .col-sm-8 { + -ms-flex: 0 0 66.666667%; + flex: 0 0 66.666667%; + max-width: 66.666667%; + } + .col-sm-9 { + -ms-flex: 0 0 75%; + flex: 0 0 75%; + max-width: 75%; + } + .col-sm-10 { + -ms-flex: 0 0 83.333333%; + flex: 0 0 83.333333%; + max-width: 83.333333%; + } + .col-sm-11 { + -ms-flex: 0 0 91.666667%; + flex: 0 0 91.666667%; + max-width: 91.666667%; + } + .col-sm-12 { + -ms-flex: 0 0 100%; + flex: 0 0 100%; + max-width: 100%; + } + .order-sm-first { + -ms-flex-order: -1; + order: -1; + } + .order-sm-last { + -ms-flex-order: 13; + order: 13; + } + .order-sm-0 { + -ms-flex-order: 0; + order: 0; + } + .order-sm-1 { + -ms-flex-order: 1; + order: 1; + } + .order-sm-2 { + -ms-flex-order: 2; + order: 2; + } + .order-sm-3 { + -ms-flex-order: 3; + order: 3; + } + .order-sm-4 { + -ms-flex-order: 4; + order: 4; + } + .order-sm-5 { + -ms-flex-order: 5; + order: 5; + } + .order-sm-6 { + -ms-flex-order: 6; + order: 6; + } + .order-sm-7 { + -ms-flex-order: 7; + order: 7; + } + .order-sm-8 { + -ms-flex-order: 8; + order: 8; + } + .order-sm-9 { + -ms-flex-order: 9; + order: 9; + } + .order-sm-10 { + -ms-flex-order: 10; + order: 10; + } + .order-sm-11 { + -ms-flex-order: 11; + order: 11; + } + .order-sm-12 { + -ms-flex-order: 12; + order: 12; + } + .offset-sm-0 { + margin-left: 0; + } + .offset-sm-1 { + margin-left: 8.333333%; + } + .offset-sm-2 { + margin-left: 16.666667%; + } + .offset-sm-3 { + margin-left: 25%; + } + .offset-sm-4 { + margin-left: 33.333333%; + } + .offset-sm-5 { + margin-left: 41.666667%; + } + .offset-sm-6 { + margin-left: 50%; + } + .offset-sm-7 { + margin-left: 58.333333%; + } + .offset-sm-8 { + margin-left: 66.666667%; + } + .offset-sm-9 { + margin-left: 75%; + } + .offset-sm-10 { + margin-left: 83.333333%; + } + .offset-sm-11 { + margin-left: 91.666667%; + } +} + +@media (min-width: 768px) { + .col-md { + -ms-flex-preferred-size: 0; + flex-basis: 0; + -ms-flex-positive: 1; + flex-grow: 1; + max-width: 100%; + } + .col-md-auto { + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: auto; + max-width: none; + } + .col-md-1 { + -ms-flex: 0 0 8.333333%; + flex: 0 0 8.333333%; + max-width: 8.333333%; + } + .col-md-2 { + -ms-flex: 0 0 16.666667%; + flex: 0 0 16.666667%; + max-width: 16.666667%; + } + .col-md-3 { + -ms-flex: 0 0 25%; + flex: 0 0 25%; + max-width: 25%; + } + .col-md-4 { + -ms-flex: 0 0 33.333333%; + flex: 0 0 33.333333%; + max-width: 33.333333%; + } + .col-md-5 { + -ms-flex: 0 0 41.666667%; + flex: 0 0 41.666667%; + max-width: 41.666667%; + } + .col-md-6 { + -ms-flex: 0 0 50%; + flex: 0 0 50%; + max-width: 50%; + } + .col-md-7 { + -ms-flex: 0 0 58.333333%; + flex: 0 0 58.333333%; + max-width: 58.333333%; + } + .col-md-8 { + -ms-flex: 0 0 66.666667%; + flex: 0 0 66.666667%; + max-width: 66.666667%; + } + .col-md-9 { + -ms-flex: 0 0 75%; + flex: 0 0 75%; + max-width: 75%; + } + .col-md-10 { + -ms-flex: 0 0 83.333333%; + flex: 0 0 83.333333%; + max-width: 83.333333%; + } + .col-md-11 { + -ms-flex: 0 0 91.666667%; + flex: 0 0 91.666667%; + max-width: 91.666667%; + } + .col-md-12 { + -ms-flex: 0 0 100%; + flex: 0 0 100%; + max-width: 100%; + } + .order-md-first { + -ms-flex-order: -1; + order: -1; + } + .order-md-last { + -ms-flex-order: 13; + order: 13; + } + .order-md-0 { + -ms-flex-order: 0; + order: 0; + } + .order-md-1 { + -ms-flex-order: 1; + order: 1; + } + .order-md-2 { + -ms-flex-order: 2; + order: 2; + } + .order-md-3 { + -ms-flex-order: 3; + order: 3; + } + .order-md-4 { + -ms-flex-order: 4; + order: 4; + } + .order-md-5 { + -ms-flex-order: 5; + order: 5; + } + .order-md-6 { + -ms-flex-order: 6; + order: 6; + } + .order-md-7 { + -ms-flex-order: 7; + order: 7; + } + .order-md-8 { + -ms-flex-order: 8; + order: 8; + } + .order-md-9 { + -ms-flex-order: 9; + order: 9; + } + .order-md-10 { + -ms-flex-order: 10; + order: 10; + } + .order-md-11 { + -ms-flex-order: 11; + order: 11; + } + .order-md-12 { + -ms-flex-order: 12; + order: 12; + } + .offset-md-0 { + margin-left: 0; + } + .offset-md-1 { + margin-left: 8.333333%; + } + .offset-md-2 { + margin-left: 16.666667%; + } + .offset-md-3 { + margin-left: 25%; + } + .offset-md-4 { + margin-left: 33.333333%; + } + .offset-md-5 { + margin-left: 41.666667%; + } + .offset-md-6 { + margin-left: 50%; + } + .offset-md-7 { + margin-left: 58.333333%; + } + .offset-md-8 { + margin-left: 66.666667%; + } + .offset-md-9 { + margin-left: 75%; + } + .offset-md-10 { + margin-left: 83.333333%; + } + .offset-md-11 { + margin-left: 91.666667%; + } +} + +@media (min-width: 992px) { + .col-lg { + -ms-flex-preferred-size: 0; + flex-basis: 0; + -ms-flex-positive: 1; + flex-grow: 1; + max-width: 100%; + } + .col-lg-auto { + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: auto; + max-width: none; + } + .col-lg-1 { + -ms-flex: 0 0 8.333333%; + flex: 0 0 8.333333%; + max-width: 8.333333%; + } + .col-lg-2 { + -ms-flex: 0 0 16.666667%; + flex: 0 0 16.666667%; + max-width: 16.666667%; + } + .col-lg-3 { + -ms-flex: 0 0 25%; + flex: 0 0 25%; + max-width: 25%; + } + .col-lg-4 { + -ms-flex: 0 0 33.333333%; + flex: 0 0 33.333333%; + max-width: 33.333333%; + } + .col-lg-5 { + -ms-flex: 0 0 41.666667%; + flex: 0 0 41.666667%; + max-width: 41.666667%; + } + .col-lg-6 { + -ms-flex: 0 0 50%; + flex: 0 0 50%; + max-width: 50%; + } + .col-lg-7 { + -ms-flex: 0 0 58.333333%; + flex: 0 0 58.333333%; + max-width: 58.333333%; + } + .col-lg-8 { + -ms-flex: 0 0 66.666667%; + flex: 0 0 66.666667%; + max-width: 66.666667%; + } + .col-lg-9 { + -ms-flex: 0 0 75%; + flex: 0 0 75%; + max-width: 75%; + } + .col-lg-10 { + -ms-flex: 0 0 83.333333%; + flex: 0 0 83.333333%; + max-width: 83.333333%; + } + .col-lg-11 { + -ms-flex: 0 0 91.666667%; + flex: 0 0 91.666667%; + max-width: 91.666667%; + } + .col-lg-12 { + -ms-flex: 0 0 100%; + flex: 0 0 100%; + max-width: 100%; + } + .order-lg-first { + -ms-flex-order: -1; + order: -1; + } + .order-lg-last { + -ms-flex-order: 13; + order: 13; + } + .order-lg-0 { + -ms-flex-order: 0; + order: 0; + } + .order-lg-1 { + -ms-flex-order: 1; + order: 1; + } + .order-lg-2 { + -ms-flex-order: 2; + order: 2; + } + .order-lg-3 { + -ms-flex-order: 3; + order: 3; + } + .order-lg-4 { + -ms-flex-order: 4; + order: 4; + } + .order-lg-5 { + -ms-flex-order: 5; + order: 5; + } + .order-lg-6 { + -ms-flex-order: 6; + order: 6; + } + .order-lg-7 { + -ms-flex-order: 7; + order: 7; + } + .order-lg-8 { + -ms-flex-order: 8; + order: 8; + } + .order-lg-9 { + -ms-flex-order: 9; + order: 9; + } + .order-lg-10 { + -ms-flex-order: 10; + order: 10; + } + .order-lg-11 { + -ms-flex-order: 11; + order: 11; + } + .order-lg-12 { + -ms-flex-order: 12; + order: 12; + } + .offset-lg-0 { + margin-left: 0; + } + .offset-lg-1 { + margin-left: 8.333333%; + } + .offset-lg-2 { + margin-left: 16.666667%; + } + .offset-lg-3 { + margin-left: 25%; + } + .offset-lg-4 { + margin-left: 33.333333%; + } + .offset-lg-5 { + margin-left: 41.666667%; + } + .offset-lg-6 { + margin-left: 50%; + } + .offset-lg-7 { + margin-left: 58.333333%; + } + .offset-lg-8 { + margin-left: 66.666667%; + } + .offset-lg-9 { + margin-left: 75%; + } + .offset-lg-10 { + margin-left: 83.333333%; + } + .offset-lg-11 { + margin-left: 91.666667%; + } +} + +@media (min-width: 1200px) { + .col-xl { + -ms-flex-preferred-size: 0; + flex-basis: 0; + -ms-flex-positive: 1; + flex-grow: 1; + max-width: 100%; + } + .col-xl-auto { + -ms-flex: 0 0 auto; + flex: 0 0 auto; + width: auto; + max-width: none; + } + .col-xl-1 { + -ms-flex: 0 0 8.333333%; + flex: 0 0 8.333333%; + max-width: 8.333333%; + } + .col-xl-2 { + -ms-flex: 0 0 16.666667%; + flex: 0 0 16.666667%; + max-width: 16.666667%; + } + .col-xl-3 { + -ms-flex: 0 0 25%; + flex: 0 0 25%; + max-width: 25%; + } + .col-xl-4 { + -ms-flex: 0 0 33.333333%; + flex: 0 0 33.333333%; + max-width: 33.333333%; + } + .col-xl-5 { + -ms-flex: 0 0 41.666667%; + flex: 0 0 41.666667%; + max-width: 41.666667%; + } + .col-xl-6 { + -ms-flex: 0 0 50%; + flex: 0 0 50%; + max-width: 50%; + } + .col-xl-7 { + -ms-flex: 0 0 58.333333%; + flex: 0 0 58.333333%; + max-width: 58.333333%; + } + .col-xl-8 { + -ms-flex: 0 0 66.666667%; + flex: 0 0 66.666667%; + max-width: 66.666667%; + } + .col-xl-9 { + -ms-flex: 0 0 75%; + flex: 0 0 75%; + max-width: 75%; + } + .col-xl-10 { + -ms-flex: 0 0 83.333333%; + flex: 0 0 83.333333%; + max-width: 83.333333%; + } + .col-xl-11 { + -ms-flex: 0 0 91.666667%; + flex: 0 0 91.666667%; + max-width: 91.666667%; + } + .col-xl-12 { + -ms-flex: 0 0 100%; + flex: 0 0 100%; + max-width: 100%; + } + .order-xl-first { + -ms-flex-order: -1; + order: -1; + } + .order-xl-last { + -ms-flex-order: 13; + order: 13; + } + .order-xl-0 { + -ms-flex-order: 0; + order: 0; + } + .order-xl-1 { + -ms-flex-order: 1; + order: 1; + } + .order-xl-2 { + -ms-flex-order: 2; + order: 2; + } + .order-xl-3 { + -ms-flex-order: 3; + order: 3; + } + .order-xl-4 { + -ms-flex-order: 4; + order: 4; + } + .order-xl-5 { + -ms-flex-order: 5; + order: 5; + } + .order-xl-6 { + -ms-flex-order: 6; + order: 6; + } + .order-xl-7 { + -ms-flex-order: 7; + order: 7; + } + .order-xl-8 { + -ms-flex-order: 8; + order: 8; + } + .order-xl-9 { + -ms-flex-order: 9; + order: 9; + } + .order-xl-10 { + -ms-flex-order: 10; + order: 10; + } + .order-xl-11 { + -ms-flex-order: 11; + order: 11; + } + .order-xl-12 { + -ms-flex-order: 12; + order: 12; + } + .offset-xl-0 { + margin-left: 0; + } + .offset-xl-1 { + margin-left: 8.333333%; + } + .offset-xl-2 { + margin-left: 16.666667%; + } + .offset-xl-3 { + margin-left: 25%; + } + .offset-xl-4 { + margin-left: 33.333333%; + } + .offset-xl-5 { + margin-left: 41.666667%; + } + .offset-xl-6 { + margin-left: 50%; + } + .offset-xl-7 { + margin-left: 58.333333%; + } + .offset-xl-8 { + margin-left: 66.666667%; + } + .offset-xl-9 { + margin-left: 75%; + } + .offset-xl-10 { + margin-left: 83.333333%; + } + .offset-xl-11 { + margin-left: 91.666667%; + } +} + +.table { + width: 100%; + margin-bottom: 1rem; + background-color: transparent; +} + +.table th, +.table td { + padding: 0.75rem; + vertical-align: top; + border-top: 1px solid #dee2e6; +} + +.table thead th { + vertical-align: bottom; + border-bottom: 2px solid #dee2e6; +} + +.table tbody + tbody { + border-top: 2px solid #dee2e6; +} + +.table .table { + background-color: #fff; +} + +.table-sm th, +.table-sm td { + padding: 0.3rem; +} + +.table-bordered { + border: 1px solid #dee2e6; +} + +.table-bordered th, +.table-bordered td { + border: 1px solid #dee2e6; +} + +.table-bordered thead th, +.table-bordered thead td { + border-bottom-width: 2px; +} + +.table-borderless th, +.table-borderless td, +.table-borderless thead th, +.table-borderless tbody + tbody { + border: 0; +} + +.table-striped tbody tr:nth-of-type(odd) { + background-color: rgba(0, 0, 0, 0.05); +} + +.table-hover tbody tr:hover { + background-color: rgba(0, 0, 0, 0.075); +} + +.table-primary, +.table-primary > th, +.table-primary > td { + background-color: #b8daff; +} + +.table-hover .table-primary:hover { + background-color: #9fcdff; +} + +.table-hover .table-primary:hover > td, +.table-hover .table-primary:hover > th { + background-color: #9fcdff; +} + +.table-secondary, +.table-secondary > th, +.table-secondary > td { + background-color: #d6d8db; +} + +.table-hover .table-secondary:hover { + background-color: #c8cbcf; +} + +.table-hover .table-secondary:hover > td, +.table-hover .table-secondary:hover > th { + background-color: #c8cbcf; +} + +.table-success, +.table-success > th, +.table-success > td { + background-color: #c3e6cb; +} + +.table-hover .table-success:hover { + background-color: #b1dfbb; +} + +.table-hover .table-success:hover > td, +.table-hover .table-success:hover > th { + background-color: #b1dfbb; +} + +.table-info, +.table-info > th, +.table-info > td { + background-color: #bee5eb; +} + +.table-hover .table-info:hover { + background-color: #abdde5; +} + +.table-hover .table-info:hover > td, +.table-hover .table-info:hover > th { + background-color: #abdde5; +} + +.table-warning, +.table-warning > th, +.table-warning > td { + background-color: #ffeeba; +} + +.table-hover .table-warning:hover { + background-color: #ffe8a1; +} + +.table-hover .table-warning:hover > td, +.table-hover .table-warning:hover > th { + background-color: #ffe8a1; +} + +.table-danger, +.table-danger > th, +.table-danger > td { + background-color: #f5c6cb; +} + +.table-hover .table-danger:hover { + background-color: #f1b0b7; +} + +.table-hover .table-danger:hover > td, +.table-hover .table-danger:hover > th { + background-color: #f1b0b7; +} + +.table-light, +.table-light > th, +.table-light > td { + background-color: #fdfdfe; +} + +.table-hover .table-light:hover { + background-color: #ececf6; +} + +.table-hover .table-light:hover > td, +.table-hover .table-light:hover > th { + background-color: #ececf6; +} + +.table-dark, +.table-dark > th, +.table-dark > td { + background-color: #c6c8ca; +} + +.table-hover .table-dark:hover { + background-color: #b9bbbe; +} + +.table-hover .table-dark:hover > td, +.table-hover .table-dark:hover > th { + background-color: #b9bbbe; +} + +.table-active, +.table-active > th, +.table-active > td { + background-color: rgba(0, 0, 0, 0.075); +} + +.table-hover .table-active:hover { + background-color: rgba(0, 0, 0, 0.075); +} + +.table-hover .table-active:hover > td, +.table-hover .table-active:hover > th { + background-color: rgba(0, 0, 0, 0.075); +} + +.table .thead-dark th { + color: #fff; + background-color: #212529; + border-color: #32383e; +} + +.table .thead-light th { + color: #495057; + background-color: #e9ecef; + border-color: #dee2e6; +} + +.table-dark { + color: #fff; + background-color: #212529; +} + +.table-dark th, +.table-dark td, +.table-dark thead th { + border-color: #32383e; +} + +.table-dark.table-bordered { + border: 0; +} + +.table-dark.table-striped tbody tr:nth-of-type(odd) { + background-color: rgba(255, 255, 255, 0.05); +} + +.table-dark.table-hover tbody tr:hover { + background-color: rgba(255, 255, 255, 0.075); +} + +@media (max-width: 575.98px) { + .table-responsive-sm { + display: block; + width: 100%; + overflow-x: auto; + -webkit-overflow-scrolling: touch; + -ms-overflow-style: -ms-autohiding-scrollbar; + } + .table-responsive-sm > .table-bordered { + border: 0; + } +} + +@media (max-width: 767.98px) { + .table-responsive-md { + display: block; + width: 100%; + overflow-x: auto; + -webkit-overflow-scrolling: touch; + -ms-overflow-style: -ms-autohiding-scrollbar; + } + .table-responsive-md > .table-bordered { + border: 0; + } +} + +@media (max-width: 991.98px) { + .table-responsive-lg { + display: block; + width: 100%; + overflow-x: auto; + -webkit-overflow-scrolling: touch; + -ms-overflow-style: -ms-autohiding-scrollbar; + } + .table-responsive-lg > .table-bordered { + border: 0; + } +} + +@media (max-width: 1199.98px) { + .table-responsive-xl { + display: block; + width: 100%; + overflow-x: auto; + -webkit-overflow-scrolling: touch; + -ms-overflow-style: -ms-autohiding-scrollbar; + } + .table-responsive-xl > .table-bordered { + border: 0; + } +} + +.table-responsive { + display: block; + width: 100%; + overflow-x: auto; + -webkit-overflow-scrolling: touch; + -ms-overflow-style: -ms-autohiding-scrollbar; +} + +.table-responsive > .table-bordered { + border: 0; +} + +.form-control { + display: block; + width: 100%; + height: calc(2.25rem + 2px); + padding: 0.375rem 0.75rem; + font-size: 1rem; + line-height: 1.5; + color: #495057; + background-color: #fff; + background-clip: padding-box; + border: 1px solid #ced4da; + border-radius: 0.25rem; + transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; +} + +@media screen and (prefers-reduced-motion: reduce) { + .form-control { + transition: none; + } +} + +.form-control::-ms-expand { + background-color: transparent; + border: 0; +} + +.form-control:focus { + color: #495057; + background-color: #fff; + border-color: #80bdff; + outline: 0; + box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25); +} + +.form-control::-webkit-input-placeholder { + color: #6c757d; + opacity: 1; +} + +.form-control::-moz-placeholder { + color: #6c757d; + opacity: 1; +} + +.form-control:-ms-input-placeholder { + color: #6c757d; + opacity: 1; +} + +.form-control::-ms-input-placeholder { + color: #6c757d; + opacity: 1; +} + +.form-control::placeholder { + color: #6c757d; + opacity: 1; +} + +.form-control:disabled, .form-control[readonly] { + background-color: #e9ecef; + opacity: 1; +} + +select.form-control:focus::-ms-value { + color: #495057; + background-color: #fff; +} + +.form-control-file, +.form-control-range { + display: block; + width: 100%; +} + +.col-form-label { + padding-top: calc(0.375rem + 1px); + padding-bottom: calc(0.375rem + 1px); + margin-bottom: 0; + font-size: inherit; + line-height: 1.5; +} + +.col-form-label-lg { + padding-top: calc(0.5rem + 1px); + padding-bottom: calc(0.5rem + 1px); + font-size: 1.25rem; + line-height: 1.5; +} + +.col-form-label-sm { + padding-top: calc(0.25rem + 1px); + padding-bottom: calc(0.25rem + 1px); + font-size: 0.875rem; + line-height: 1.5; +} + +.form-control-plaintext { + display: block; + width: 100%; + padding-top: 0.375rem; + padding-bottom: 0.375rem; + margin-bottom: 0; + line-height: 1.5; + color: #212529; + background-color: transparent; + border: solid transparent; + border-width: 1px 0; +} + +.form-control-plaintext.form-control-sm, .form-control-plaintext.form-control-lg { + padding-right: 0; + padding-left: 0; +} + +.form-control-sm { + height: calc(1.8125rem + 2px); + padding: 0.25rem 0.5rem; + font-size: 0.875rem; + line-height: 1.5; + border-radius: 0.2rem; +} + +.form-control-lg { + height: calc(2.875rem + 2px); + padding: 0.5rem 1rem; + font-size: 1.25rem; + line-height: 1.5; + border-radius: 0.3rem; +} + +select.form-control[size], select.form-control[multiple] { + height: auto; +} + +textarea.form-control { + height: auto; +} + +.form-group { + margin-bottom: 1rem; +} + +.form-text { + display: block; + margin-top: 0.25rem; +} + +.form-row { + display: -ms-flexbox; + display: flex; + -ms-flex-wrap: wrap; + flex-wrap: wrap; + margin-right: -5px; + margin-left: -5px; +} + +.form-row > .col, +.form-row > [class*="col-"] { + padding-right: 5px; + padding-left: 5px; +} + +.form-check { + position: relative; + display: block; + padding-left: 1.25rem; +} + +.form-check-input { + position: absolute; + margin-top: 0.3rem; + margin-left: -1.25rem; +} + +.form-check-input:disabled ~ .form-check-label { + color: #6c757d; +} + +.form-check-label { + margin-bottom: 0; +} + +.form-check-inline { + display: -ms-inline-flexbox; + display: inline-flex; + -ms-flex-align: center; + align-items: center; + padding-left: 0; + margin-right: 0.75rem; +} + +.form-check-inline .form-check-input { + position: static; + margin-top: 0; + margin-right: 0.3125rem; + margin-left: 0; +} + +.valid-feedback { + display: none; + width: 100%; + margin-top: 0.25rem; + font-size: 80%; + color: #28a745; +} + +.valid-tooltip { + position: absolute; + top: 100%; + z-index: 5; + display: none; + max-width: 100%; + padding: 0.25rem 0.5rem; + margin-top: .1rem; + font-size: 0.875rem; + line-height: 1.5; + color: #fff; + background-color: rgba(40, 167, 69, 0.9); + border-radius: 0.25rem; +} + +.was-validated .form-control:valid, .form-control.is-valid, .was-validated +.custom-select:valid, +.custom-select.is-valid { + border-color: #28a745; +} + +.was-validated .form-control:valid:focus, .form-control.is-valid:focus, .was-validated +.custom-select:valid:focus, +.custom-select.is-valid:focus { + border-color: #28a745; + box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25); +} + +.was-validated .form-control:valid ~ .valid-feedback, +.was-validated .form-control:valid ~ .valid-tooltip, .form-control.is-valid ~ .valid-feedback, +.form-control.is-valid ~ .valid-tooltip, .was-validated +.custom-select:valid ~ .valid-feedback, +.was-validated +.custom-select:valid ~ .valid-tooltip, +.custom-select.is-valid ~ .valid-feedback, +.custom-select.is-valid ~ .valid-tooltip { + display: block; +} + +.was-validated .form-control-file:valid ~ .valid-feedback, +.was-validated .form-control-file:valid ~ .valid-tooltip, .form-control-file.is-valid ~ .valid-feedback, +.form-control-file.is-valid ~ .valid-tooltip { + display: block; +} + +.was-validated .form-check-input:valid ~ .form-check-label, .form-check-input.is-valid ~ .form-check-label { + color: #28a745; +} + +.was-validated .form-check-input:valid ~ .valid-feedback, +.was-validated .form-check-input:valid ~ .valid-tooltip, .form-check-input.is-valid ~ .valid-feedback, +.form-check-input.is-valid ~ .valid-tooltip { + display: block; +} + +.was-validated .custom-control-input:valid ~ .custom-control-label, .custom-control-input.is-valid ~ .custom-control-label { + color: #28a745; +} + +.was-validated .custom-control-input:valid ~ .custom-control-label::before, .custom-control-input.is-valid ~ .custom-control-label::before { + background-color: #71dd8a; +} + +.was-validated .custom-control-input:valid ~ .valid-feedback, +.was-validated .custom-control-input:valid ~ .valid-tooltip, .custom-control-input.is-valid ~ .valid-feedback, +.custom-control-input.is-valid ~ .valid-tooltip { + display: block; +} + +.was-validated .custom-control-input:valid:checked ~ .custom-control-label::before, .custom-control-input.is-valid:checked ~ .custom-control-label::before { + background-color: #34ce57; +} + +.was-validated .custom-control-input:valid:focus ~ .custom-control-label::before, .custom-control-input.is-valid:focus ~ .custom-control-label::before { + box-shadow: 0 0 0 1px #fff, 0 0 0 0.2rem rgba(40, 167, 69, 0.25); +} + +.was-validated .custom-file-input:valid ~ .custom-file-label, .custom-file-input.is-valid ~ .custom-file-label { + border-color: #28a745; +} + +.was-validated .custom-file-input:valid ~ .custom-file-label::after, .custom-file-input.is-valid ~ .custom-file-label::after { + border-color: inherit; +} + +.was-validated .custom-file-input:valid ~ .valid-feedback, +.was-validated .custom-file-input:valid ~ .valid-tooltip, .custom-file-input.is-valid ~ .valid-feedback, +.custom-file-input.is-valid ~ .valid-tooltip { + display: block; +} + +.was-validated .custom-file-input:valid:focus ~ .custom-file-label, .custom-file-input.is-valid:focus ~ .custom-file-label { + box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25); +} + +.invalid-feedback { + display: none; + width: 100%; + margin-top: 0.25rem; + font-size: 80%; + color: #dc3545; +} + +.invalid-tooltip { + position: absolute; + top: 100%; + z-index: 5; + display: none; + max-width: 100%; + padding: 0.25rem 0.5rem; + margin-top: .1rem; + font-size: 0.875rem; + line-height: 1.5; + color: #fff; + background-color: rgba(220, 53, 69, 0.9); + border-radius: 0.25rem; +} + +.was-validated .form-control:invalid, .form-control.is-invalid, .was-validated +.custom-select:invalid, +.custom-select.is-invalid { + border-color: #dc3545; +} + +.was-validated .form-control:invalid:focus, .form-control.is-invalid:focus, .was-validated +.custom-select:invalid:focus, +.custom-select.is-invalid:focus { + border-color: #dc3545; + box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25); +} + +.was-validated .form-control:invalid ~ .invalid-feedback, +.was-validated .form-control:invalid ~ .invalid-tooltip, .form-control.is-invalid ~ .invalid-feedback, +.form-control.is-invalid ~ .invalid-tooltip, .was-validated +.custom-select:invalid ~ .invalid-feedback, +.was-validated +.custom-select:invalid ~ .invalid-tooltip, +.custom-select.is-invalid ~ .invalid-feedback, +.custom-select.is-invalid ~ .invalid-tooltip { + display: block; +} + +.was-validated .form-control-file:invalid ~ .invalid-feedback, +.was-validated .form-control-file:invalid ~ .invalid-tooltip, .form-control-file.is-invalid ~ .invalid-feedback, +.form-control-file.is-invalid ~ .invalid-tooltip { + display: block; +} + +.was-validated .form-check-input:invalid ~ .form-check-label, .form-check-input.is-invalid ~ .form-check-label { + color: #dc3545; +} + +.was-validated .form-check-input:invalid ~ .invalid-feedback, +.was-validated .form-check-input:invalid ~ .invalid-tooltip, .form-check-input.is-invalid ~ .invalid-feedback, +.form-check-input.is-invalid ~ .invalid-tooltip { + display: block; +} + +.was-validated .custom-control-input:invalid ~ .custom-control-label, .custom-control-input.is-invalid ~ .custom-control-label { + color: #dc3545; +} + +.was-validated .custom-control-input:invalid ~ .custom-control-label::before, .custom-control-input.is-invalid ~ .custom-control-label::before { + background-color: #efa2a9; +} + +.was-validated .custom-control-input:invalid ~ .invalid-feedback, +.was-validated .custom-control-input:invalid ~ .invalid-tooltip, .custom-control-input.is-invalid ~ .invalid-feedback, +.custom-control-input.is-invalid ~ .invalid-tooltip { + display: block; +} + +.was-validated .custom-control-input:invalid:checked ~ .custom-control-label::before, .custom-control-input.is-invalid:checked ~ .custom-control-label::before { + background-color: #e4606d; +} + +.was-validated .custom-control-input:invalid:focus ~ .custom-control-label::before, .custom-control-input.is-invalid:focus ~ .custom-control-label::before { + box-shadow: 0 0 0 1px #fff, 0 0 0 0.2rem rgba(220, 53, 69, 0.25); +} + +.was-validated .custom-file-input:invalid ~ .custom-file-label, .custom-file-input.is-invalid ~ .custom-file-label { + border-color: #dc3545; +} + +.was-validated .custom-file-input:invalid ~ .custom-file-label::after, .custom-file-input.is-invalid ~ .custom-file-label::after { + border-color: inherit; +} + +.was-validated .custom-file-input:invalid ~ .invalid-feedback, +.was-validated .custom-file-input:invalid ~ .invalid-tooltip, .custom-file-input.is-invalid ~ .invalid-feedback, +.custom-file-input.is-invalid ~ .invalid-tooltip { + display: block; +} + +.was-validated .custom-file-input:invalid:focus ~ .custom-file-label, .custom-file-input.is-invalid:focus ~ .custom-file-label { + box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25); +} + +.form-inline { + display: -ms-flexbox; + display: flex; + -ms-flex-flow: row wrap; + flex-flow: row wrap; + -ms-flex-align: center; + align-items: center; +} + +.form-inline .form-check { + width: 100%; +} + +@media (min-width: 576px) { + .form-inline label { + display: -ms-flexbox; + display: flex; + -ms-flex-align: center; + align-items: center; + -ms-flex-pack: center; + justify-content: center; + margin-bottom: 0; + } + .form-inline .form-group { + display: -ms-flexbox; + display: flex; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + -ms-flex-flow: row wrap; + flex-flow: row wrap; + -ms-flex-align: center; + align-items: center; + margin-bottom: 0; + } + .form-inline .form-control { + display: inline-block; + width: auto; + vertical-align: middle; + } + .form-inline .form-control-plaintext { + display: inline-block; + } + .form-inline .input-group, + .form-inline .custom-select { + width: auto; + } + .form-inline .form-check { + display: -ms-flexbox; + display: flex; + -ms-flex-align: center; + align-items: center; + -ms-flex-pack: center; + justify-content: center; + width: auto; + padding-left: 0; + } + .form-inline .form-check-input { + position: relative; + margin-top: 0; + margin-right: 0.25rem; + margin-left: 0; + } + .form-inline .custom-control { + -ms-flex-align: center; + align-items: center; + -ms-flex-pack: center; + justify-content: center; + } + .form-inline .custom-control-label { + margin-bottom: 0; + } +} + +.btn { + display: inline-block; + font-weight: 400; + text-align: center; + white-space: nowrap; + vertical-align: middle; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + border: 1px solid transparent; + padding: 0.375rem 0.75rem; + font-size: 1rem; + line-height: 1.5; + border-radius: 0.25rem; + transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; +} + +@media screen and (prefers-reduced-motion: reduce) { + .btn { + transition: none; + } +} + +.btn:hover, .btn:focus { + text-decoration: none; +} + +.btn:focus, .btn.focus { + outline: 0; + box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25); +} + +.btn.disabled, .btn:disabled { + opacity: 0.65; +} + +.btn:not(:disabled):not(.disabled) { + cursor: pointer; +} + +a.btn.disabled, +fieldset:disabled a.btn { + pointer-events: none; +} + +.btn-primary { + color: #fff; + background-color: #007bff; + border-color: #007bff; +} + +.btn-primary:hover { + color: #fff; + background-color: #0069d9; + border-color: #0062cc; +} + +.btn-primary:focus, .btn-primary.focus { + box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.5); +} + +.btn-primary.disabled, .btn-primary:disabled { + color: #fff; + background-color: #007bff; + border-color: #007bff; +} + +.btn-primary:not(:disabled):not(.disabled):active, .btn-primary:not(:disabled):not(.disabled).active, +.show > .btn-primary.dropdown-toggle { + color: #fff; + background-color: #0062cc; + border-color: #005cbf; +} + +.btn-primary:not(:disabled):not(.disabled):active:focus, .btn-primary:not(:disabled):not(.disabled).active:focus, +.show > .btn-primary.dropdown-toggle:focus { + box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.5); +} + +.btn-secondary { + color: #fff; + background-color: #6c757d; + border-color: #6c757d; +} + +.btn-secondary:hover { + color: #fff; + background-color: #5a6268; + border-color: #545b62; +} + +.btn-secondary:focus, .btn-secondary.focus { + box-shadow: 0 0 0 0.2rem rgba(108, 117, 125, 0.5); +} + +.btn-secondary.disabled, .btn-secondary:disabled { + color: #fff; + background-color: #6c757d; + border-color: #6c757d; +} + +.btn-secondary:not(:disabled):not(.disabled):active, .btn-secondary:not(:disabled):not(.disabled).active, +.show > .btn-secondary.dropdown-toggle { + color: #fff; + background-color: #545b62; + border-color: #4e555b; +} + +.btn-secondary:not(:disabled):not(.disabled):active:focus, .btn-secondary:not(:disabled):not(.disabled).active:focus, +.show > .btn-secondary.dropdown-toggle:focus { + box-shadow: 0 0 0 0.2rem rgba(108, 117, 125, 0.5); +} + +.btn-success { + color: #fff; + background-color: #28a745; + border-color: #28a745; +} + +.btn-success:hover { + color: #fff; + background-color: #218838; + border-color: #1e7e34; +} + +.btn-success:focus, .btn-success.focus { + box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.5); +} + +.btn-success.disabled, .btn-success:disabled { + color: #fff; + background-color: #28a745; + border-color: #28a745; +} + +.btn-success:not(:disabled):not(.disabled):active, .btn-success:not(:disabled):not(.disabled).active, +.show > .btn-success.dropdown-toggle { + color: #fff; + background-color: #1e7e34; + border-color: #1c7430; +} + +.btn-success:not(:disabled):not(.disabled):active:focus, .btn-success:not(:disabled):not(.disabled).active:focus, +.show > .btn-success.dropdown-toggle:focus { + box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.5); +} + +.btn-info { + color: #fff; + background-color: #17a2b8; + border-color: #17a2b8; +} + +.btn-info:hover { + color: #fff; + background-color: #138496; + border-color: #117a8b; +} + +.btn-info:focus, .btn-info.focus { + box-shadow: 0 0 0 0.2rem rgba(23, 162, 184, 0.5); +} + +.btn-info.disabled, .btn-info:disabled { + color: #fff; + background-color: #17a2b8; + border-color: #17a2b8; +} + +.btn-info:not(:disabled):not(.disabled):active, .btn-info:not(:disabled):not(.disabled).active, +.show > .btn-info.dropdown-toggle { + color: #fff; + background-color: #117a8b; + border-color: #10707f; +} + +.btn-info:not(:disabled):not(.disabled):active:focus, .btn-info:not(:disabled):not(.disabled).active:focus, +.show > .btn-info.dropdown-toggle:focus { + box-shadow: 0 0 0 0.2rem rgba(23, 162, 184, 0.5); +} + +.btn-warning { + color: #212529; + background-color: #ffc107; + border-color: #ffc107; +} + +.btn-warning:hover { + color: #212529; + background-color: #e0a800; + border-color: #d39e00; +} + +.btn-warning:focus, .btn-warning.focus { + box-shadow: 0 0 0 0.2rem rgba(255, 193, 7, 0.5); +} + +.btn-warning.disabled, .btn-warning:disabled { + color: #212529; + background-color: #ffc107; + border-color: #ffc107; +} + +.btn-warning:not(:disabled):not(.disabled):active, .btn-warning:not(:disabled):not(.disabled).active, +.show > .btn-warning.dropdown-toggle { + color: #212529; + background-color: #d39e00; + border-color: #c69500; +} + +.btn-warning:not(:disabled):not(.disabled):active:focus, .btn-warning:not(:disabled):not(.disabled).active:focus, +.show > .btn-warning.dropdown-toggle:focus { + box-shadow: 0 0 0 0.2rem rgba(255, 193, 7, 0.5); +} + +.btn-danger { + color: #fff; + background-color: #dc3545; + border-color: #dc3545; +} + +.btn-danger:hover { + color: #fff; + background-color: #c82333; + border-color: #bd2130; +} + +.btn-danger:focus, .btn-danger.focus { + box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.5); +} + +.btn-danger.disabled, .btn-danger:disabled { + color: #fff; + background-color: #dc3545; + border-color: #dc3545; +} + +.btn-danger:not(:disabled):not(.disabled):active, .btn-danger:not(:disabled):not(.disabled).active, +.show > .btn-danger.dropdown-toggle { + color: #fff; + background-color: #bd2130; + border-color: #b21f2d; +} + +.btn-danger:not(:disabled):not(.disabled):active:focus, .btn-danger:not(:disabled):not(.disabled).active:focus, +.show > .btn-danger.dropdown-toggle:focus { + box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.5); +} + +.btn-light { + color: #212529; + background-color: #f8f9fa; + border-color: #f8f9fa; +} + +.btn-light:hover { + color: #212529; + background-color: #e2e6ea; + border-color: #dae0e5; +} + +.btn-light:focus, .btn-light.focus { + box-shadow: 0 0 0 0.2rem rgba(248, 249, 250, 0.5); +} + +.btn-light.disabled, .btn-light:disabled { + color: #212529; + background-color: #f8f9fa; + border-color: #f8f9fa; +} + +.btn-light:not(:disabled):not(.disabled):active, .btn-light:not(:disabled):not(.disabled).active, +.show > .btn-light.dropdown-toggle { + color: #212529; + background-color: #dae0e5; + border-color: #d3d9df; +} + +.btn-light:not(:disabled):not(.disabled):active:focus, .btn-light:not(:disabled):not(.disabled).active:focus, +.show > .btn-light.dropdown-toggle:focus { + box-shadow: 0 0 0 0.2rem rgba(248, 249, 250, 0.5); +} + +.btn-dark { + color: #fff; + background-color: #343a40; + border-color: #343a40; +} + +.btn-dark:hover { + color: #fff; + background-color: #23272b; + border-color: #1d2124; +} + +.btn-dark:focus, .btn-dark.focus { + box-shadow: 0 0 0 0.2rem rgba(52, 58, 64, 0.5); +} + +.btn-dark.disabled, .btn-dark:disabled { + color: #fff; + background-color: #343a40; + border-color: #343a40; +} + +.btn-dark:not(:disabled):not(.disabled):active, .btn-dark:not(:disabled):not(.disabled).active, +.show > .btn-dark.dropdown-toggle { + color: #fff; + background-color: #1d2124; + border-color: #171a1d; +} + +.btn-dark:not(:disabled):not(.disabled):active:focus, .btn-dark:not(:disabled):not(.disabled).active:focus, +.show > .btn-dark.dropdown-toggle:focus { + box-shadow: 0 0 0 0.2rem rgba(52, 58, 64, 0.5); +} + +.btn-outline-primary { + color: #007bff; + background-color: transparent; + background-image: none; + border-color: #007bff; +} + +.btn-outline-primary:hover { + color: #fff; + background-color: #007bff; + border-color: #007bff; +} + +.btn-outline-primary:focus, .btn-outline-primary.focus { + box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.5); +} + +.btn-outline-primary.disabled, .btn-outline-primary:disabled { + color: #007bff; + background-color: transparent; +} + +.btn-outline-primary:not(:disabled):not(.disabled):active, .btn-outline-primary:not(:disabled):not(.disabled).active, +.show > .btn-outline-primary.dropdown-toggle { + color: #fff; + background-color: #007bff; + border-color: #007bff; +} + +.btn-outline-primary:not(:disabled):not(.disabled):active:focus, .btn-outline-primary:not(:disabled):not(.disabled).active:focus, +.show > .btn-outline-primary.dropdown-toggle:focus { + box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.5); +} + +.btn-outline-secondary { + color: #6c757d; + background-color: transparent; + background-image: none; + border-color: #6c757d; +} + +.btn-outline-secondary:hover { + color: #fff; + background-color: #6c757d; + border-color: #6c757d; +} + +.btn-outline-secondary:focus, .btn-outline-secondary.focus { + box-shadow: 0 0 0 0.2rem rgba(108, 117, 125, 0.5); +} + +.btn-outline-secondary.disabled, .btn-outline-secondary:disabled { + color: #6c757d; + background-color: transparent; +} + +.btn-outline-secondary:not(:disabled):not(.disabled):active, .btn-outline-secondary:not(:disabled):not(.disabled).active, +.show > .btn-outline-secondary.dropdown-toggle { + color: #fff; + background-color: #6c757d; + border-color: #6c757d; +} + +.btn-outline-secondary:not(:disabled):not(.disabled):active:focus, .btn-outline-secondary:not(:disabled):not(.disabled).active:focus, +.show > .btn-outline-secondary.dropdown-toggle:focus { + box-shadow: 0 0 0 0.2rem rgba(108, 117, 125, 0.5); +} + +.btn-outline-success { + color: #28a745; + background-color: transparent; + background-image: none; + border-color: #28a745; +} + +.btn-outline-success:hover { + color: #fff; + background-color: #28a745; + border-color: #28a745; +} + +.btn-outline-success:focus, .btn-outline-success.focus { + box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.5); +} + +.btn-outline-success.disabled, .btn-outline-success:disabled { + color: #28a745; + background-color: transparent; +} + +.btn-outline-success:not(:disabled):not(.disabled):active, .btn-outline-success:not(:disabled):not(.disabled).active, +.show > .btn-outline-success.dropdown-toggle { + color: #fff; + background-color: #28a745; + border-color: #28a745; +} + +.btn-outline-success:not(:disabled):not(.disabled):active:focus, .btn-outline-success:not(:disabled):not(.disabled).active:focus, +.show > .btn-outline-success.dropdown-toggle:focus { + box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.5); +} + +.btn-outline-info { + color: #17a2b8; + background-color: transparent; + background-image: none; + border-color: #17a2b8; +} + +.btn-outline-info:hover { + color: #fff; + background-color: #17a2b8; + border-color: #17a2b8; +} + +.btn-outline-info:focus, .btn-outline-info.focus { + box-shadow: 0 0 0 0.2rem rgba(23, 162, 184, 0.5); +} + +.btn-outline-info.disabled, .btn-outline-info:disabled { + color: #17a2b8; + background-color: transparent; +} + +.btn-outline-info:not(:disabled):not(.disabled):active, .btn-outline-info:not(:disabled):not(.disabled).active, +.show > .btn-outline-info.dropdown-toggle { + color: #fff; + background-color: #17a2b8; + border-color: #17a2b8; +} + +.btn-outline-info:not(:disabled):not(.disabled):active:focus, .btn-outline-info:not(:disabled):not(.disabled).active:focus, +.show > .btn-outline-info.dropdown-toggle:focus { + box-shadow: 0 0 0 0.2rem rgba(23, 162, 184, 0.5); +} + +.btn-outline-warning { + color: #ffc107; + background-color: transparent; + background-image: none; + border-color: #ffc107; +} + +.btn-outline-warning:hover { + color: #212529; + background-color: #ffc107; + border-color: #ffc107; +} + +.btn-outline-warning:focus, .btn-outline-warning.focus { + box-shadow: 0 0 0 0.2rem rgba(255, 193, 7, 0.5); +} + +.btn-outline-warning.disabled, .btn-outline-warning:disabled { + color: #ffc107; + background-color: transparent; +} + +.btn-outline-warning:not(:disabled):not(.disabled):active, .btn-outline-warning:not(:disabled):not(.disabled).active, +.show > .btn-outline-warning.dropdown-toggle { + color: #212529; + background-color: #ffc107; + border-color: #ffc107; +} + +.btn-outline-warning:not(:disabled):not(.disabled):active:focus, .btn-outline-warning:not(:disabled):not(.disabled).active:focus, +.show > .btn-outline-warning.dropdown-toggle:focus { + box-shadow: 0 0 0 0.2rem rgba(255, 193, 7, 0.5); +} + +.btn-outline-danger { + color: #dc3545; + background-color: transparent; + background-image: none; + border-color: #dc3545; +} + +.btn-outline-danger:hover { + color: #fff; + background-color: #dc3545; + border-color: #dc3545; +} + +.btn-outline-danger:focus, .btn-outline-danger.focus { + box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.5); +} + +.btn-outline-danger.disabled, .btn-outline-danger:disabled { + color: #dc3545; + background-color: transparent; +} + +.btn-outline-danger:not(:disabled):not(.disabled):active, .btn-outline-danger:not(:disabled):not(.disabled).active, +.show > .btn-outline-danger.dropdown-toggle { + color: #fff; + background-color: #dc3545; + border-color: #dc3545; +} + +.btn-outline-danger:not(:disabled):not(.disabled):active:focus, .btn-outline-danger:not(:disabled):not(.disabled).active:focus, +.show > .btn-outline-danger.dropdown-toggle:focus { + box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.5); +} + +.btn-outline-light { + color: #f8f9fa; + background-color: transparent; + background-image: none; + border-color: #f8f9fa; +} + +.btn-outline-light:hover { + color: #212529; + background-color: #f8f9fa; + border-color: #f8f9fa; +} + +.btn-outline-light:focus, .btn-outline-light.focus { + box-shadow: 0 0 0 0.2rem rgba(248, 249, 250, 0.5); +} + +.btn-outline-light.disabled, .btn-outline-light:disabled { + color: #f8f9fa; + background-color: transparent; +} + +.btn-outline-light:not(:disabled):not(.disabled):active, .btn-outline-light:not(:disabled):not(.disabled).active, +.show > .btn-outline-light.dropdown-toggle { + color: #212529; + background-color: #f8f9fa; + border-color: #f8f9fa; +} + +.btn-outline-light:not(:disabled):not(.disabled):active:focus, .btn-outline-light:not(:disabled):not(.disabled).active:focus, +.show > .btn-outline-light.dropdown-toggle:focus { + box-shadow: 0 0 0 0.2rem rgba(248, 249, 250, 0.5); +} + +.btn-outline-dark { + color: #343a40; + background-color: transparent; + background-image: none; + border-color: #343a40; +} + +.btn-outline-dark:hover { + color: #fff; + background-color: #343a40; + border-color: #343a40; +} + +.btn-outline-dark:focus, .btn-outline-dark.focus { + box-shadow: 0 0 0 0.2rem rgba(52, 58, 64, 0.5); +} + +.btn-outline-dark.disabled, .btn-outline-dark:disabled { + color: #343a40; + background-color: transparent; +} + +.btn-outline-dark:not(:disabled):not(.disabled):active, .btn-outline-dark:not(:disabled):not(.disabled).active, +.show > .btn-outline-dark.dropdown-toggle { + color: #fff; + background-color: #343a40; + border-color: #343a40; +} + +.btn-outline-dark:not(:disabled):not(.disabled):active:focus, .btn-outline-dark:not(:disabled):not(.disabled).active:focus, +.show > .btn-outline-dark.dropdown-toggle:focus { + box-shadow: 0 0 0 0.2rem rgba(52, 58, 64, 0.5); +} + +.btn-link { + font-weight: 400; + color: #007bff; + background-color: transparent; +} + +.btn-link:hover { + color: #0056b3; + text-decoration: underline; + background-color: transparent; + border-color: transparent; +} + +.btn-link:focus, .btn-link.focus { + text-decoration: underline; + border-color: transparent; + box-shadow: none; +} + +.btn-link:disabled, .btn-link.disabled { + color: #6c757d; + pointer-events: none; +} + +.btn-lg, .btn-group-lg > .btn { + padding: 0.5rem 1rem; + font-size: 1.25rem; + line-height: 1.5; + border-radius: 0.3rem; +} + +.btn-sm, .btn-group-sm > .btn { + padding: 0.25rem 0.5rem; + font-size: 0.875rem; + line-height: 1.5; + border-radius: 0.2rem; +} + +.btn-block { + display: block; + width: 100%; +} + +.btn-block + .btn-block { + margin-top: 0.5rem; +} + +input[type="submit"].btn-block, +input[type="reset"].btn-block, +input[type="button"].btn-block { + width: 100%; +} + +.fade { + transition: opacity 0.15s linear; +} + +@media screen and (prefers-reduced-motion: reduce) { + .fade { + transition: none; + } +} + +.fade:not(.show) { + opacity: 0; +} + +.collapse:not(.show) { + display: none; +} + +.collapsing { + position: relative; + height: 0; + overflow: hidden; + transition: height 0.35s ease; +} + +@media screen and (prefers-reduced-motion: reduce) { + .collapsing { + transition: none; + } +} + +.dropup, +.dropright, +.dropdown, +.dropleft { + position: relative; +} + +.dropdown-toggle::after { + display: inline-block; + width: 0; + height: 0; + margin-left: 0.255em; + vertical-align: 0.255em; + content: ""; + border-top: 0.3em solid; + border-right: 0.3em solid transparent; + border-bottom: 0; + border-left: 0.3em solid transparent; +} + +.dropdown-toggle:empty::after { + margin-left: 0; +} + +.dropdown-menu { + position: absolute; + top: 100%; + left: 0; + z-index: 1000; + display: none; + float: left; + min-width: 10rem; + padding: 0.5rem 0; + margin: 0.125rem 0 0; + font-size: 1rem; + color: #212529; + text-align: left; + list-style: none; + background-color: #fff; + background-clip: padding-box; + border: 1px solid rgba(0, 0, 0, 0.15); + border-radius: 0.25rem; +} + +.dropdown-menu-right { + right: 0; + left: auto; +} + +.dropup .dropdown-menu { + top: auto; + bottom: 100%; + margin-top: 0; + margin-bottom: 0.125rem; +} + +.dropup .dropdown-toggle::after { + display: inline-block; + width: 0; + height: 0; + margin-left: 0.255em; + vertical-align: 0.255em; + content: ""; + border-top: 0; + border-right: 0.3em solid transparent; + border-bottom: 0.3em solid; + border-left: 0.3em solid transparent; +} + +.dropup .dropdown-toggle:empty::after { + margin-left: 0; +} + +.dropright .dropdown-menu { + top: 0; + right: auto; + left: 100%; + margin-top: 0; + margin-left: 0.125rem; +} + +.dropright .dropdown-toggle::after { + display: inline-block; + width: 0; + height: 0; + margin-left: 0.255em; + vertical-align: 0.255em; + content: ""; + border-top: 0.3em solid transparent; + border-right: 0; + border-bottom: 0.3em solid transparent; + border-left: 0.3em solid; +} + +.dropright .dropdown-toggle:empty::after { + margin-left: 0; +} + +.dropright .dropdown-toggle::after { + vertical-align: 0; +} + +.dropleft .dropdown-menu { + top: 0; + right: 100%; + left: auto; + margin-top: 0; + margin-right: 0.125rem; +} + +.dropleft .dropdown-toggle::after { + display: inline-block; + width: 0; + height: 0; + margin-left: 0.255em; + vertical-align: 0.255em; + content: ""; +} + +.dropleft .dropdown-toggle::after { + display: none; +} + +.dropleft .dropdown-toggle::before { + display: inline-block; + width: 0; + height: 0; + margin-right: 0.255em; + vertical-align: 0.255em; + content: ""; + border-top: 0.3em solid transparent; + border-right: 0.3em solid; + border-bottom: 0.3em solid transparent; +} + +.dropleft .dropdown-toggle:empty::after { + margin-left: 0; +} + +.dropleft .dropdown-toggle::before { + vertical-align: 0; +} + +.dropdown-menu[x-placement^="top"], .dropdown-menu[x-placement^="right"], .dropdown-menu[x-placement^="bottom"], .dropdown-menu[x-placement^="left"] { + right: auto; + bottom: auto; +} + +.dropdown-divider { + height: 0; + margin: 0.5rem 0; + overflow: hidden; + border-top: 1px solid #e9ecef; +} + +.dropdown-item { + display: block; + width: 100%; + padding: 0.25rem 1.5rem; + clear: both; + font-weight: 400; + color: #212529; + text-align: inherit; + white-space: nowrap; + background-color: transparent; + border: 0; +} + +.dropdown-item:hover, .dropdown-item:focus { + color: #16181b; + text-decoration: none; + background-color: #f8f9fa; +} + +.dropdown-item.active, .dropdown-item:active { + color: #fff; + text-decoration: none; + background-color: #007bff; +} + +.dropdown-item.disabled, .dropdown-item:disabled { + color: #6c757d; + background-color: transparent; +} + +.dropdown-menu.show { + display: block; +} + +.dropdown-header { + display: block; + padding: 0.5rem 1.5rem; + margin-bottom: 0; + font-size: 0.875rem; + color: #6c757d; + white-space: nowrap; +} + +.dropdown-item-text { + display: block; + padding: 0.25rem 1.5rem; + color: #212529; +} + +.btn-group, +.btn-group-vertical { + position: relative; + display: -ms-inline-flexbox; + display: inline-flex; + vertical-align: middle; +} + +.btn-group > .btn, +.btn-group-vertical > .btn { + position: relative; + -ms-flex: 0 1 auto; + flex: 0 1 auto; +} + +.btn-group > .btn:hover, +.btn-group-vertical > .btn:hover { + z-index: 1; +} + +.btn-group > .btn:focus, .btn-group > .btn:active, .btn-group > .btn.active, +.btn-group-vertical > .btn:focus, +.btn-group-vertical > .btn:active, +.btn-group-vertical > .btn.active { + z-index: 1; +} + +.btn-group .btn + .btn, +.btn-group .btn + .btn-group, +.btn-group .btn-group + .btn, +.btn-group .btn-group + .btn-group, +.btn-group-vertical .btn + .btn, +.btn-group-vertical .btn + .btn-group, +.btn-group-vertical .btn-group + .btn, +.btn-group-vertical .btn-group + .btn-group { + margin-left: -1px; +} + +.btn-toolbar { + display: -ms-flexbox; + display: flex; + -ms-flex-wrap: wrap; + flex-wrap: wrap; + -ms-flex-pack: start; + justify-content: flex-start; +} + +.btn-toolbar .input-group { + width: auto; +} + +.btn-group > .btn:first-child { + margin-left: 0; +} + +.btn-group > .btn:not(:last-child):not(.dropdown-toggle), +.btn-group > .btn-group:not(:last-child) > .btn { + border-top-right-radius: 0; + border-bottom-right-radius: 0; +} + +.btn-group > .btn:not(:first-child), +.btn-group > .btn-group:not(:first-child) > .btn { + border-top-left-radius: 0; + border-bottom-left-radius: 0; +} + +.dropdown-toggle-split { + padding-right: 0.5625rem; + padding-left: 0.5625rem; +} + +.dropdown-toggle-split::after, +.dropup .dropdown-toggle-split::after, +.dropright .dropdown-toggle-split::after { + margin-left: 0; +} + +.dropleft .dropdown-toggle-split::before { + margin-right: 0; +} + +.btn-sm + .dropdown-toggle-split, .btn-group-sm > .btn + .dropdown-toggle-split { + padding-right: 0.375rem; + padding-left: 0.375rem; +} + +.btn-lg + .dropdown-toggle-split, .btn-group-lg > .btn + .dropdown-toggle-split { + padding-right: 0.75rem; + padding-left: 0.75rem; +} + +.btn-group-vertical { + -ms-flex-direction: column; + flex-direction: column; + -ms-flex-align: start; + align-items: flex-start; + -ms-flex-pack: center; + justify-content: center; +} + +.btn-group-vertical .btn, +.btn-group-vertical .btn-group { + width: 100%; +} + +.btn-group-vertical > .btn + .btn, +.btn-group-vertical > .btn + .btn-group, +.btn-group-vertical > .btn-group + .btn, +.btn-group-vertical > .btn-group + .btn-group { + margin-top: -1px; + margin-left: 0; +} + +.btn-group-vertical > .btn:not(:last-child):not(.dropdown-toggle), +.btn-group-vertical > .btn-group:not(:last-child) > .btn { + border-bottom-right-radius: 0; + border-bottom-left-radius: 0; +} + +.btn-group-vertical > .btn:not(:first-child), +.btn-group-vertical > .btn-group:not(:first-child) > .btn { + border-top-left-radius: 0; + border-top-right-radius: 0; +} + +.btn-group-toggle > .btn, +.btn-group-toggle > .btn-group > .btn { + margin-bottom: 0; +} + +.btn-group-toggle > .btn input[type="radio"], +.btn-group-toggle > .btn input[type="checkbox"], +.btn-group-toggle > .btn-group > .btn input[type="radio"], +.btn-group-toggle > .btn-group > .btn input[type="checkbox"] { + position: absolute; + clip: rect(0, 0, 0, 0); + pointer-events: none; +} + +.input-group { + position: relative; + display: -ms-flexbox; + display: flex; + -ms-flex-wrap: wrap; + flex-wrap: wrap; + -ms-flex-align: stretch; + align-items: stretch; + width: 100%; +} + +.input-group > .form-control, +.input-group > .custom-select, +.input-group > .custom-file { + position: relative; + -ms-flex: 1 1 auto; + flex: 1 1 auto; + width: 1%; + margin-bottom: 0; +} + +.input-group > .form-control + .form-control, +.input-group > .form-control + .custom-select, +.input-group > .form-control + .custom-file, +.input-group > .custom-select + .form-control, +.input-group > .custom-select + .custom-select, +.input-group > .custom-select + .custom-file, +.input-group > .custom-file + .form-control, +.input-group > .custom-file + .custom-select, +.input-group > .custom-file + .custom-file { + margin-left: -1px; +} + +.input-group > .form-control:focus, +.input-group > .custom-select:focus, +.input-group > .custom-file .custom-file-input:focus ~ .custom-file-label { + z-index: 3; +} + +.input-group > .custom-file .custom-file-input:focus { + z-index: 4; +} + +.input-group > .form-control:not(:last-child), +.input-group > .custom-select:not(:last-child) { + border-top-right-radius: 0; + border-bottom-right-radius: 0; +} + +.input-group > .form-control:not(:first-child), +.input-group > .custom-select:not(:first-child) { + border-top-left-radius: 0; + border-bottom-left-radius: 0; +} + +.input-group > .custom-file { + display: -ms-flexbox; + display: flex; + -ms-flex-align: center; + align-items: center; +} + +.input-group > .custom-file:not(:last-child) .custom-file-label, +.input-group > .custom-file:not(:last-child) .custom-file-label::after { + border-top-right-radius: 0; + border-bottom-right-radius: 0; +} + +.input-group > .custom-file:not(:first-child) .custom-file-label { + border-top-left-radius: 0; + border-bottom-left-radius: 0; +} + +.input-group-prepend, +.input-group-append { + display: -ms-flexbox; + display: flex; +} + +.input-group-prepend .btn, +.input-group-append .btn { + position: relative; + z-index: 2; +} + +.input-group-prepend .btn + .btn, +.input-group-prepend .btn + .input-group-text, +.input-group-prepend .input-group-text + .input-group-text, +.input-group-prepend .input-group-text + .btn, +.input-group-append .btn + .btn, +.input-group-append .btn + .input-group-text, +.input-group-append .input-group-text + .input-group-text, +.input-group-append .input-group-text + .btn { + margin-left: -1px; +} + +.input-group-prepend { + margin-right: -1px; +} + +.input-group-append { + margin-left: -1px; +} + +.input-group-text { + display: -ms-flexbox; + display: flex; + -ms-flex-align: center; + align-items: center; + padding: 0.375rem 0.75rem; + margin-bottom: 0; + font-size: 1rem; + font-weight: 400; + line-height: 1.5; + color: #495057; + text-align: center; + white-space: nowrap; + background-color: #e9ecef; + border: 1px solid #ced4da; + border-radius: 0.25rem; +} + +.input-group-text input[type="radio"], +.input-group-text input[type="checkbox"] { + margin-top: 0; +} + +.input-group-lg > .form-control, +.input-group-lg > .input-group-prepend > .input-group-text, +.input-group-lg > .input-group-append > .input-group-text, +.input-group-lg > .input-group-prepend > .btn, +.input-group-lg > .input-group-append > .btn { + height: calc(2.875rem + 2px); + padding: 0.5rem 1rem; + font-size: 1.25rem; + line-height: 1.5; + border-radius: 0.3rem; +} + +.input-group-sm > .form-control, +.input-group-sm > .input-group-prepend > .input-group-text, +.input-group-sm > .input-group-append > .input-group-text, +.input-group-sm > .input-group-prepend > .btn, +.input-group-sm > .input-group-append > .btn { + height: calc(1.8125rem + 2px); + padding: 0.25rem 0.5rem; + font-size: 0.875rem; + line-height: 1.5; + border-radius: 0.2rem; +} + +.input-group > .input-group-prepend > .btn, +.input-group > .input-group-prepend > .input-group-text, +.input-group > .input-group-append:not(:last-child) > .btn, +.input-group > .input-group-append:not(:last-child) > .input-group-text, +.input-group > .input-group-append:last-child > .btn:not(:last-child):not(.dropdown-toggle), +.input-group > .input-group-append:last-child > .input-group-text:not(:last-child) { + border-top-right-radius: 0; + border-bottom-right-radius: 0; +} + +.input-group > .input-group-append > .btn, +.input-group > .input-group-append > .input-group-text, +.input-group > .input-group-prepend:not(:first-child) > .btn, +.input-group > .input-group-prepend:not(:first-child) > .input-group-text, +.input-group > .input-group-prepend:first-child > .btn:not(:first-child), +.input-group > .input-group-prepend:first-child > .input-group-text:not(:first-child) { + border-top-left-radius: 0; + border-bottom-left-radius: 0; +} + +.custom-control { + position: relative; + display: block; + min-height: 1.5rem; + padding-left: 1.5rem; +} + +.custom-control-inline { + display: -ms-inline-flexbox; + display: inline-flex; + margin-right: 1rem; +} + +.custom-control-input { + position: absolute; + z-index: -1; + opacity: 0; +} + +.custom-control-input:checked ~ .custom-control-label::before { + color: #fff; + background-color: #007bff; +} + +.custom-control-input:focus ~ .custom-control-label::before { + box-shadow: 0 0 0 1px #fff, 0 0 0 0.2rem rgba(0, 123, 255, 0.25); +} + +.custom-control-input:active ~ .custom-control-label::before { + color: #fff; + background-color: #b3d7ff; +} + +.custom-control-input:disabled ~ .custom-control-label { + color: #6c757d; +} + +.custom-control-input:disabled ~ .custom-control-label::before { + background-color: #e9ecef; +} + +.custom-control-label { + position: relative; + margin-bottom: 0; +} + +.custom-control-label::before { + position: absolute; + top: 0.25rem; + left: -1.5rem; + display: block; + width: 1rem; + height: 1rem; + pointer-events: none; + content: ""; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + background-color: #dee2e6; +} + +.custom-control-label::after { + position: absolute; + top: 0.25rem; + left: -1.5rem; + display: block; + width: 1rem; + height: 1rem; + content: ""; + background-repeat: no-repeat; + background-position: center center; + background-size: 50% 50%; +} + +.custom-checkbox .custom-control-label::before { + border-radius: 0.25rem; +} + +.custom-checkbox .custom-control-input:checked ~ .custom-control-label::before { + background-color: #007bff; +} + +.custom-checkbox .custom-control-input:checked ~ .custom-control-label::after { + background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Cpath fill='%23fff' d='M6.564.75l-3.59 3.612-1.538-1.55L0 4.26 2.974 7.25 8 2.193z'/%3E%3C/svg%3E"); +} + +.custom-checkbox .custom-control-input:indeterminate ~ .custom-control-label::before { + background-color: #007bff; +} + +.custom-checkbox .custom-control-input:indeterminate ~ .custom-control-label::after { + background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 4'%3E%3Cpath stroke='%23fff' d='M0 2h4'/%3E%3C/svg%3E"); +} + +.custom-checkbox .custom-control-input:disabled:checked ~ .custom-control-label::before { + background-color: rgba(0, 123, 255, 0.5); +} + +.custom-checkbox .custom-control-input:disabled:indeterminate ~ .custom-control-label::before { + background-color: rgba(0, 123, 255, 0.5); +} + +.custom-radio .custom-control-label::before { + border-radius: 50%; +} + +.custom-radio .custom-control-input:checked ~ .custom-control-label::before { + background-color: #007bff; +} + +.custom-radio .custom-control-input:checked ~ .custom-control-label::after { + background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3E%3Ccircle r='3' fill='%23fff'/%3E%3C/svg%3E"); +} + +.custom-radio .custom-control-input:disabled:checked ~ .custom-control-label::before { + background-color: rgba(0, 123, 255, 0.5); +} + +.custom-select { + display: inline-block; + width: 100%; + height: calc(2.25rem + 2px); + padding: 0.375rem 1.75rem 0.375rem 0.75rem; + line-height: 1.5; + color: #495057; + vertical-align: middle; + background: #fff url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'%3E%3Cpath fill='%23343a40' d='M2 0L0 2h4zm0 5L0 3h4z'/%3E%3C/svg%3E") no-repeat right 0.75rem center; + background-size: 8px 10px; + border: 1px solid #ced4da; + border-radius: 0.25rem; + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; +} + +.custom-select:focus { + border-color: #80bdff; + outline: 0; + box-shadow: 0 0 0 0.2rem rgba(128, 189, 255, 0.5); +} + +.custom-select:focus::-ms-value { + color: #495057; + background-color: #fff; +} + +.custom-select[multiple], .custom-select[size]:not([size="1"]) { + height: auto; + padding-right: 0.75rem; + background-image: none; +} + +.custom-select:disabled { + color: #6c757d; + background-color: #e9ecef; +} + +.custom-select::-ms-expand { + opacity: 0; +} + +.custom-select-sm { + height: calc(1.8125rem + 2px); + padding-top: 0.375rem; + padding-bottom: 0.375rem; + font-size: 75%; +} + +.custom-select-lg { + height: calc(2.875rem + 2px); + padding-top: 0.375rem; + padding-bottom: 0.375rem; + font-size: 125%; +} + +.custom-file { + position: relative; + display: inline-block; + width: 100%; + height: calc(2.25rem + 2px); + margin-bottom: 0; +} + +.custom-file-input { + position: relative; + z-index: 2; + width: 100%; + height: calc(2.25rem + 2px); + margin: 0; + opacity: 0; +} + +.custom-file-input:focus ~ .custom-file-label { + border-color: #80bdff; + box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25); +} + +.custom-file-input:focus ~ .custom-file-label::after { + border-color: #80bdff; +} + +.custom-file-input:disabled ~ .custom-file-label { + background-color: #e9ecef; +} + +.custom-file-input:lang(en) ~ .custom-file-label::after { + content: "Browse"; +} + +.custom-file-label { + position: absolute; + top: 0; + right: 0; + left: 0; + z-index: 1; + height: calc(2.25rem + 2px); + padding: 0.375rem 0.75rem; + line-height: 1.5; + color: #495057; + background-color: #fff; + border: 1px solid #ced4da; + border-radius: 0.25rem; +} + +.custom-file-label::after { + position: absolute; + top: 0; + right: 0; + bottom: 0; + z-index: 3; + display: block; + height: 2.25rem; + padding: 0.375rem 0.75rem; + line-height: 1.5; + color: #495057; + content: "Browse"; + background-color: #e9ecef; + border-left: 1px solid #ced4da; + border-radius: 0 0.25rem 0.25rem 0; +} + +.custom-range { + width: 100%; + padding-left: 0; + background-color: transparent; + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; +} + +.custom-range:focus { + outline: none; +} + +.custom-range:focus::-webkit-slider-thumb { + box-shadow: 0 0 0 1px #fff, 0 0 0 0.2rem rgba(0, 123, 255, 0.25); +} + +.custom-range:focus::-moz-range-thumb { + box-shadow: 0 0 0 1px #fff, 0 0 0 0.2rem rgba(0, 123, 255, 0.25); +} + +.custom-range:focus::-ms-thumb { + box-shadow: 0 0 0 1px #fff, 0 0 0 0.2rem rgba(0, 123, 255, 0.25); +} + +.custom-range::-moz-focus-outer { + border: 0; +} + +.custom-range::-webkit-slider-thumb { + width: 1rem; + height: 1rem; + margin-top: -0.25rem; + background-color: #007bff; + border: 0; + border-radius: 1rem; + transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; + -webkit-appearance: none; + appearance: none; +} + +@media screen and (prefers-reduced-motion: reduce) { + .custom-range::-webkit-slider-thumb { + transition: none; + } +} + +.custom-range::-webkit-slider-thumb:active { + background-color: #b3d7ff; +} + +.custom-range::-webkit-slider-runnable-track { + width: 100%; + height: 0.5rem; + color: transparent; + cursor: pointer; + background-color: #dee2e6; + border-color: transparent; + border-radius: 1rem; +} + +.custom-range::-moz-range-thumb { + width: 1rem; + height: 1rem; + background-color: #007bff; + border: 0; + border-radius: 1rem; + transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; + -moz-appearance: none; + appearance: none; +} + +@media screen and (prefers-reduced-motion: reduce) { + .custom-range::-moz-range-thumb { + transition: none; + } +} + +.custom-range::-moz-range-thumb:active { + background-color: #b3d7ff; +} + +.custom-range::-moz-range-track { + width: 100%; + height: 0.5rem; + color: transparent; + cursor: pointer; + background-color: #dee2e6; + border-color: transparent; + border-radius: 1rem; +} + +.custom-range::-ms-thumb { + width: 1rem; + height: 1rem; + margin-top: 0; + margin-right: 0.2rem; + margin-left: 0.2rem; + background-color: #007bff; + border: 0; + border-radius: 1rem; + transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; + appearance: none; +} + +@media screen and (prefers-reduced-motion: reduce) { + .custom-range::-ms-thumb { + transition: none; + } +} + +.custom-range::-ms-thumb:active { + background-color: #b3d7ff; +} + +.custom-range::-ms-track { + width: 100%; + height: 0.5rem; + color: transparent; + cursor: pointer; + background-color: transparent; + border-color: transparent; + border-width: 0.5rem; +} + +.custom-range::-ms-fill-lower { + background-color: #dee2e6; + border-radius: 1rem; +} + +.custom-range::-ms-fill-upper { + margin-right: 15px; + background-color: #dee2e6; + border-radius: 1rem; +} + +.custom-control-label::before, +.custom-file-label, +.custom-select { + transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; +} + +@media screen and (prefers-reduced-motion: reduce) { + .custom-control-label::before, + .custom-file-label, + .custom-select { + transition: none; + } +} + +.nav { + display: -ms-flexbox; + display: flex; + -ms-flex-wrap: wrap; + flex-wrap: wrap; + padding-left: 0; + margin-bottom: 0; + list-style: none; +} + +.nav-link { + display: block; + padding: 0.5rem 1rem; +} + +.nav-link:hover, .nav-link:focus { + text-decoration: none; +} + +.nav-link.disabled { + color: #6c757d; +} + +.nav-tabs { + border-bottom: 1px solid #dee2e6; +} + +.nav-tabs .nav-item { + margin-bottom: -1px; +} + +.nav-tabs .nav-link { + border: 1px solid transparent; + border-top-left-radius: 0.25rem; + border-top-right-radius: 0.25rem; +} + +.nav-tabs .nav-link:hover, .nav-tabs .nav-link:focus { + border-color: #e9ecef #e9ecef #dee2e6; +} + +.nav-tabs .nav-link.disabled { + color: #6c757d; + background-color: transparent; + border-color: transparent; +} + +.nav-tabs .nav-link.active, +.nav-tabs .nav-item.show .nav-link { + color: #495057; + background-color: #fff; + border-color: #dee2e6 #dee2e6 #fff; +} + +.nav-tabs .dropdown-menu { + margin-top: -1px; + border-top-left-radius: 0; + border-top-right-radius: 0; +} + +.nav-pills .nav-link { + border-radius: 0.25rem; +} + +.nav-pills .nav-link.active, +.nav-pills .show > .nav-link { + color: #fff; + background-color: #007bff; +} + +.nav-fill .nav-item { + -ms-flex: 1 1 auto; + flex: 1 1 auto; + text-align: center; +} + +.nav-justified .nav-item { + -ms-flex-preferred-size: 0; + flex-basis: 0; + -ms-flex-positive: 1; + flex-grow: 1; + text-align: center; +} + +.tab-content > .tab-pane { + display: none; +} + +.tab-content > .active { + display: block; +} + +.navbar { + position: relative; + display: -ms-flexbox; + display: flex; + -ms-flex-wrap: wrap; + flex-wrap: wrap; + -ms-flex-align: center; + align-items: center; + -ms-flex-pack: justify; + justify-content: space-between; + padding: 0.5rem 1rem; +} + +.navbar > .container, +.navbar > .container-fluid { + display: -ms-flexbox; + display: flex; + -ms-flex-wrap: wrap; + flex-wrap: wrap; + -ms-flex-align: center; + align-items: center; + -ms-flex-pack: justify; + justify-content: space-between; +} + +.navbar-brand { + display: inline-block; + padding-top: 0.3125rem; + padding-bottom: 0.3125rem; + margin-right: 1rem; + font-size: 1.25rem; + line-height: inherit; + white-space: nowrap; +} + +.navbar-brand:hover, .navbar-brand:focus { + text-decoration: none; +} + +.navbar-nav { + display: -ms-flexbox; + display: flex; + -ms-flex-direction: column; + flex-direction: column; + padding-left: 0; + margin-bottom: 0; + list-style: none; +} + +.navbar-nav .nav-link { + padding-right: 0; + padding-left: 0; +} + +.navbar-nav .dropdown-menu { + position: static; + float: none; +} + +.navbar-text { + display: inline-block; + padding-top: 0.5rem; + padding-bottom: 0.5rem; +} + +.navbar-collapse { + -ms-flex-preferred-size: 100%; + flex-basis: 100%; + -ms-flex-positive: 1; + flex-grow: 1; + -ms-flex-align: center; + align-items: center; +} + +.navbar-toggler { + padding: 0.25rem 0.75rem; + font-size: 1.25rem; + line-height: 1; + background-color: transparent; + border: 1px solid transparent; + border-radius: 0.25rem; +} + +.navbar-toggler:hover, .navbar-toggler:focus { + text-decoration: none; +} + +.navbar-toggler:not(:disabled):not(.disabled) { + cursor: pointer; +} + +.navbar-toggler-icon { + display: inline-block; + width: 1.5em; + height: 1.5em; + vertical-align: middle; + content: ""; + background: no-repeat center center; + background-size: 100% 100%; +} + +@media (max-width: 575.98px) { + .navbar-expand-sm > .container, + .navbar-expand-sm > .container-fluid { + padding-right: 0; + padding-left: 0; + } +} + +@media (min-width: 576px) { + .navbar-expand-sm { + -ms-flex-flow: row nowrap; + flex-flow: row nowrap; + -ms-flex-pack: start; + justify-content: flex-start; + } + .navbar-expand-sm .navbar-nav { + -ms-flex-direction: row; + flex-direction: row; + } + .navbar-expand-sm .navbar-nav .dropdown-menu { + position: absolute; + } + .navbar-expand-sm .navbar-nav .nav-link { + padding-right: 0.5rem; + padding-left: 0.5rem; + } + .navbar-expand-sm > .container, + .navbar-expand-sm > .container-fluid { + -ms-flex-wrap: nowrap; + flex-wrap: nowrap; + } + .navbar-expand-sm .navbar-collapse { + display: -ms-flexbox !important; + display: flex !important; + -ms-flex-preferred-size: auto; + flex-basis: auto; + } + .navbar-expand-sm .navbar-toggler { + display: none; + } +} + +@media (max-width: 767.98px) { + .navbar-expand-md > .container, + .navbar-expand-md > .container-fluid { + padding-right: 0; + padding-left: 0; + } +} + +@media (min-width: 768px) { + .navbar-expand-md { + -ms-flex-flow: row nowrap; + flex-flow: row nowrap; + -ms-flex-pack: start; + justify-content: flex-start; + } + .navbar-expand-md .navbar-nav { + -ms-flex-direction: row; + flex-direction: row; + } + .navbar-expand-md .navbar-nav .dropdown-menu { + position: absolute; + } + .navbar-expand-md .navbar-nav .nav-link { + padding-right: 0.5rem; + padding-left: 0.5rem; + } + .navbar-expand-md > .container, + .navbar-expand-md > .container-fluid { + -ms-flex-wrap: nowrap; + flex-wrap: nowrap; + } + .navbar-expand-md .navbar-collapse { + display: -ms-flexbox !important; + display: flex !important; + -ms-flex-preferred-size: auto; + flex-basis: auto; + } + .navbar-expand-md .navbar-toggler { + display: none; + } +} + +@media (max-width: 991.98px) { + .navbar-expand-lg > .container, + .navbar-expand-lg > .container-fluid { + padding-right: 0; + padding-left: 0; + } +} + +@media (min-width: 992px) { + .navbar-expand-lg { + -ms-flex-flow: row nowrap; + flex-flow: row nowrap; + -ms-flex-pack: start; + justify-content: flex-start; + } + .navbar-expand-lg .navbar-nav { + -ms-flex-direction: row; + flex-direction: row; + } + .navbar-expand-lg .navbar-nav .dropdown-menu { + position: absolute; + } + .navbar-expand-lg .navbar-nav .nav-link { + padding-right: 0.5rem; + padding-left: 0.5rem; + } + .navbar-expand-lg > .container, + .navbar-expand-lg > .container-fluid { + -ms-flex-wrap: nowrap; + flex-wrap: nowrap; + } + .navbar-expand-lg .navbar-collapse { + display: -ms-flexbox !important; + display: flex !important; + -ms-flex-preferred-size: auto; + flex-basis: auto; + } + .navbar-expand-lg .navbar-toggler { + display: none; + } +} + +@media (max-width: 1199.98px) { + .navbar-expand-xl > .container, + .navbar-expand-xl > .container-fluid { + padding-right: 0; + padding-left: 0; + } +} + +@media (min-width: 1200px) { + .navbar-expand-xl { + -ms-flex-flow: row nowrap; + flex-flow: row nowrap; + -ms-flex-pack: start; + justify-content: flex-start; + } + .navbar-expand-xl .navbar-nav { + -ms-flex-direction: row; + flex-direction: row; + } + .navbar-expand-xl .navbar-nav .dropdown-menu { + position: absolute; + } + .navbar-expand-xl .navbar-nav .nav-link { + padding-right: 0.5rem; + padding-left: 0.5rem; + } + .navbar-expand-xl > .container, + .navbar-expand-xl > .container-fluid { + -ms-flex-wrap: nowrap; + flex-wrap: nowrap; + } + .navbar-expand-xl .navbar-collapse { + display: -ms-flexbox !important; + display: flex !important; + -ms-flex-preferred-size: auto; + flex-basis: auto; + } + .navbar-expand-xl .navbar-toggler { + display: none; + } +} + +.navbar-expand { + -ms-flex-flow: row nowrap; + flex-flow: row nowrap; + -ms-flex-pack: start; + justify-content: flex-start; +} + +.navbar-expand > .container, +.navbar-expand > .container-fluid { + padding-right: 0; + padding-left: 0; +} + +.navbar-expand .navbar-nav { + -ms-flex-direction: row; + flex-direction: row; +} + +.navbar-expand .navbar-nav .dropdown-menu { + position: absolute; +} + +.navbar-expand .navbar-nav .nav-link { + padding-right: 0.5rem; + padding-left: 0.5rem; +} + +.navbar-expand > .container, +.navbar-expand > .container-fluid { + -ms-flex-wrap: nowrap; + flex-wrap: nowrap; +} + +.navbar-expand .navbar-collapse { + display: -ms-flexbox !important; + display: flex !important; + -ms-flex-preferred-size: auto; + flex-basis: auto; +} + +.navbar-expand .navbar-toggler { + display: none; +} + +.navbar-light .navbar-brand { + color: rgba(0, 0, 0, 0.9); +} + +.navbar-light .navbar-brand:hover, .navbar-light .navbar-brand:focus { + color: rgba(0, 0, 0, 0.9); +} + +.navbar-light .navbar-nav .nav-link { + color: rgba(0, 0, 0, 0.5); +} + +.navbar-light .navbar-nav .nav-link:hover, .navbar-light .navbar-nav .nav-link:focus { + color: rgba(0, 0, 0, 0.7); +} + +.navbar-light .navbar-nav .nav-link.disabled { + color: rgba(0, 0, 0, 0.3); +} + +.navbar-light .navbar-nav .show > .nav-link, +.navbar-light .navbar-nav .active > .nav-link, +.navbar-light .navbar-nav .nav-link.show, +.navbar-light .navbar-nav .nav-link.active { + color: rgba(0, 0, 0, 0.9); +} + +.navbar-light .navbar-toggler { + color: rgba(0, 0, 0, 0.5); + border-color: rgba(0, 0, 0, 0.1); +} + +.navbar-light .navbar-toggler-icon { + background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='rgba(0, 0, 0, 0.5)' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E"); +} + +.navbar-light .navbar-text { + color: rgba(0, 0, 0, 0.5); +} + +.navbar-light .navbar-text a { + color: rgba(0, 0, 0, 0.9); +} + +.navbar-light .navbar-text a:hover, .navbar-light .navbar-text a:focus { + color: rgba(0, 0, 0, 0.9); +} + +.navbar-dark .navbar-brand { + color: #fff; +} + +.navbar-dark .navbar-brand:hover, .navbar-dark .navbar-brand:focus { + color: #fff; +} + +.navbar-dark .navbar-nav .nav-link { + color: rgba(255, 255, 255, 0.5); +} + +.navbar-dark .navbar-nav .nav-link:hover, .navbar-dark .navbar-nav .nav-link:focus { + color: rgba(255, 255, 255, 0.75); +} + +.navbar-dark .navbar-nav .nav-link.disabled { + color: rgba(255, 255, 255, 0.25); +} + +.navbar-dark .navbar-nav .show > .nav-link, +.navbar-dark .navbar-nav .active > .nav-link, +.navbar-dark .navbar-nav .nav-link.show, +.navbar-dark .navbar-nav .nav-link.active { + color: #fff; +} + +.navbar-dark .navbar-toggler { + color: rgba(255, 255, 255, 0.5); + border-color: rgba(255, 255, 255, 0.1); +} + +.navbar-dark .navbar-toggler-icon { + background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='rgba(255, 255, 255, 0.5)' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E"); +} + +.navbar-dark .navbar-text { + color: rgba(255, 255, 255, 0.5); +} + +.navbar-dark .navbar-text a { + color: #fff; +} + +.navbar-dark .navbar-text a:hover, .navbar-dark .navbar-text a:focus { + color: #fff; +} + +.card { + position: relative; + display: -ms-flexbox; + display: flex; + -ms-flex-direction: column; + flex-direction: column; + min-width: 0; + word-wrap: break-word; + background-color: #fff; + background-clip: border-box; + border: 1px solid rgba(0, 0, 0, 0.125); + border-radius: 0.25rem; +} + +.card > hr { + margin-right: 0; + margin-left: 0; +} + +.card > .list-group:first-child .list-group-item:first-child { + border-top-left-radius: 0.25rem; + border-top-right-radius: 0.25rem; +} + +.card > .list-group:last-child .list-group-item:last-child { + border-bottom-right-radius: 0.25rem; + border-bottom-left-radius: 0.25rem; +} + +.card-body { + -ms-flex: 1 1 auto; + flex: 1 1 auto; + padding: 1.25rem; +} + +.card-title { + margin-bottom: 0.75rem; +} + +.card-subtitle { + margin-top: -0.375rem; + margin-bottom: 0; +} + +.card-text:last-child { + margin-bottom: 0; +} + +.card-link:hover { + text-decoration: none; +} + +.card-link + .card-link { + margin-left: 1.25rem; +} + +.card-header { + padding: 0.75rem 1.25rem; + margin-bottom: 0; + background-color: rgba(0, 0, 0, 0.03); + border-bottom: 1px solid rgba(0, 0, 0, 0.125); +} + +.card-header:first-child { + border-radius: calc(0.25rem - 1px) calc(0.25rem - 1px) 0 0; +} + +.card-header + .list-group .list-group-item:first-child { + border-top: 0; +} + +.card-footer { + padding: 0.75rem 1.25rem; + background-color: rgba(0, 0, 0, 0.03); + border-top: 1px solid rgba(0, 0, 0, 0.125); +} + +.card-footer:last-child { + border-radius: 0 0 calc(0.25rem - 1px) calc(0.25rem - 1px); +} + +.card-header-tabs { + margin-right: -0.625rem; + margin-bottom: -0.75rem; + margin-left: -0.625rem; + border-bottom: 0; +} + +.card-header-pills { + margin-right: -0.625rem; + margin-left: -0.625rem; +} + +.card-img-overlay { + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + padding: 1.25rem; +} + +.card-img { + width: 100%; + border-radius: calc(0.25rem - 1px); +} + +.card-img-top { + width: 100%; + border-top-left-radius: calc(0.25rem - 1px); + border-top-right-radius: calc(0.25rem - 1px); +} + +.card-img-bottom { + width: 100%; + border-bottom-right-radius: calc(0.25rem - 1px); + border-bottom-left-radius: calc(0.25rem - 1px); +} + +.card-deck { + display: -ms-flexbox; + display: flex; + -ms-flex-direction: column; + flex-direction: column; +} + +.card-deck .card { + margin-bottom: 15px; +} + +@media (min-width: 576px) { + .card-deck { + -ms-flex-flow: row wrap; + flex-flow: row wrap; + margin-right: -15px; + margin-left: -15px; + } + .card-deck .card { + display: -ms-flexbox; + display: flex; + -ms-flex: 1 0 0%; + flex: 1 0 0%; + -ms-flex-direction: column; + flex-direction: column; + margin-right: 15px; + margin-bottom: 0; + margin-left: 15px; + } +} + +.card-group { + display: -ms-flexbox; + display: flex; + -ms-flex-direction: column; + flex-direction: column; +} + +.card-group > .card { + margin-bottom: 15px; +} + +@media (min-width: 576px) { + .card-group { + -ms-flex-flow: row wrap; + flex-flow: row wrap; + } + .card-group > .card { + -ms-flex: 1 0 0%; + flex: 1 0 0%; + margin-bottom: 0; + } + .card-group > .card + .card { + margin-left: 0; + border-left: 0; + } + .card-group > .card:first-child { + border-top-right-radius: 0; + border-bottom-right-radius: 0; + } + .card-group > .card:first-child .card-img-top, + .card-group > .card:first-child .card-header { + border-top-right-radius: 0; + } + .card-group > .card:first-child .card-img-bottom, + .card-group > .card:first-child .card-footer { + border-bottom-right-radius: 0; + } + .card-group > .card:last-child { + border-top-left-radius: 0; + border-bottom-left-radius: 0; + } + .card-group > .card:last-child .card-img-top, + .card-group > .card:last-child .card-header { + border-top-left-radius: 0; + } + .card-group > .card:last-child .card-img-bottom, + .card-group > .card:last-child .card-footer { + border-bottom-left-radius: 0; + } + .card-group > .card:only-child { + border-radius: 0.25rem; + } + .card-group > .card:only-child .card-img-top, + .card-group > .card:only-child .card-header { + border-top-left-radius: 0.25rem; + border-top-right-radius: 0.25rem; + } + .card-group > .card:only-child .card-img-bottom, + .card-group > .card:only-child .card-footer { + border-bottom-right-radius: 0.25rem; + border-bottom-left-radius: 0.25rem; + } + .card-group > .card:not(:first-child):not(:last-child):not(:only-child) { + border-radius: 0; + } + .card-group > .card:not(:first-child):not(:last-child):not(:only-child) .card-img-top, + .card-group > .card:not(:first-child):not(:last-child):not(:only-child) .card-img-bottom, + .card-group > .card:not(:first-child):not(:last-child):not(:only-child) .card-header, + .card-group > .card:not(:first-child):not(:last-child):not(:only-child) .card-footer { + border-radius: 0; + } +} + +.card-columns .card { + margin-bottom: 0.75rem; +} + +@media (min-width: 576px) { + .card-columns { + -webkit-column-count: 3; + -moz-column-count: 3; + column-count: 3; + -webkit-column-gap: 1.25rem; + -moz-column-gap: 1.25rem; + column-gap: 1.25rem; + orphans: 1; + widows: 1; + } + .card-columns .card { + display: inline-block; + width: 100%; + } +} + +.accordion .card:not(:first-of-type):not(:last-of-type) { + border-bottom: 0; + border-radius: 0; +} + +.accordion .card:not(:first-of-type) .card-header:first-child { + border-radius: 0; +} + +.accordion .card:first-of-type { + border-bottom: 0; + border-bottom-right-radius: 0; + border-bottom-left-radius: 0; +} + +.accordion .card:last-of-type { + border-top-left-radius: 0; + border-top-right-radius: 0; +} + +.breadcrumb { + display: -ms-flexbox; + display: flex; + -ms-flex-wrap: wrap; + flex-wrap: wrap; + padding: 0.75rem 1rem; + margin-bottom: 1rem; + list-style: none; + background-color: #e9ecef; + border-radius: 0.25rem; +} + +.breadcrumb-item + .breadcrumb-item { + padding-left: 0.5rem; +} + +.breadcrumb-item + .breadcrumb-item::before { + display: inline-block; + padding-right: 0.5rem; + color: #6c757d; + content: "/"; +} + +.breadcrumb-item + .breadcrumb-item:hover::before { + text-decoration: underline; +} + +.breadcrumb-item + .breadcrumb-item:hover::before { + text-decoration: none; +} + +.breadcrumb-item.active { + color: #6c757d; +} + +.pagination { + display: -ms-flexbox; + display: flex; + padding-left: 0; + list-style: none; + border-radius: 0.25rem; +} + +.page-link { + position: relative; + display: block; + padding: 0.5rem 0.75rem; + margin-left: -1px; + line-height: 1.25; + color: #007bff; + background-color: #fff; + border: 1px solid #dee2e6; +} + +.page-link:hover { + z-index: 2; + color: #0056b3; + text-decoration: none; + background-color: #e9ecef; + border-color: #dee2e6; +} + +.page-link:focus { + z-index: 2; + outline: 0; + box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25); +} + +.page-link:not(:disabled):not(.disabled) { + cursor: pointer; +} + +.page-item:first-child .page-link { + margin-left: 0; + border-top-left-radius: 0.25rem; + border-bottom-left-radius: 0.25rem; +} + +.page-item:last-child .page-link { + border-top-right-radius: 0.25rem; + border-bottom-right-radius: 0.25rem; +} + +.page-item.active .page-link { + z-index: 1; + color: #fff; + background-color: #007bff; + border-color: #007bff; +} + +.page-item.disabled .page-link { + color: #6c757d; + pointer-events: none; + cursor: auto; + background-color: #fff; + border-color: #dee2e6; +} + +.pagination-lg .page-link { + padding: 0.75rem 1.5rem; + font-size: 1.25rem; + line-height: 1.5; +} + +.pagination-lg .page-item:first-child .page-link { + border-top-left-radius: 0.3rem; + border-bottom-left-radius: 0.3rem; +} + +.pagination-lg .page-item:last-child .page-link { + border-top-right-radius: 0.3rem; + border-bottom-right-radius: 0.3rem; +} + +.pagination-sm .page-link { + padding: 0.25rem 0.5rem; + font-size: 0.875rem; + line-height: 1.5; +} + +.pagination-sm .page-item:first-child .page-link { + border-top-left-radius: 0.2rem; + border-bottom-left-radius: 0.2rem; +} + +.pagination-sm .page-item:last-child .page-link { + border-top-right-radius: 0.2rem; + border-bottom-right-radius: 0.2rem; +} + +.badge { + display: inline-block; + padding: 0.25em 0.4em; + font-size: 75%; + font-weight: 700; + line-height: 1; + text-align: center; + white-space: nowrap; + vertical-align: baseline; + border-radius: 0.25rem; +} + +.badge:empty { + display: none; +} + +.btn .badge { + position: relative; + top: -1px; +} + +.badge-pill { + padding-right: 0.6em; + padding-left: 0.6em; + border-radius: 10rem; +} + +.badge-primary { + color: #fff; + background-color: #007bff; +} + +.badge-primary[href]:hover, .badge-primary[href]:focus { + color: #fff; + text-decoration: none; + background-color: #0062cc; +} + +.badge-secondary { + color: #fff; + background-color: #6c757d; +} + +.badge-secondary[href]:hover, .badge-secondary[href]:focus { + color: #fff; + text-decoration: none; + background-color: #545b62; +} + +.badge-success { + color: #fff; + background-color: #28a745; +} + +.badge-success[href]:hover, .badge-success[href]:focus { + color: #fff; + text-decoration: none; + background-color: #1e7e34; +} + +.badge-info { + color: #fff; + background-color: #17a2b8; +} + +.badge-info[href]:hover, .badge-info[href]:focus { + color: #fff; + text-decoration: none; + background-color: #117a8b; +} + +.badge-warning { + color: #212529; + background-color: #ffc107; +} + +.badge-warning[href]:hover, .badge-warning[href]:focus { + color: #212529; + text-decoration: none; + background-color: #d39e00; +} + +.badge-danger { + color: #fff; + background-color: #dc3545; +} + +.badge-danger[href]:hover, .badge-danger[href]:focus { + color: #fff; + text-decoration: none; + background-color: #bd2130; +} + +.badge-light { + color: #212529; + background-color: #f8f9fa; +} + +.badge-light[href]:hover, .badge-light[href]:focus { + color: #212529; + text-decoration: none; + background-color: #dae0e5; +} + +.badge-dark { + color: #fff; + background-color: #343a40; +} + +.badge-dark[href]:hover, .badge-dark[href]:focus { + color: #fff; + text-decoration: none; + background-color: #1d2124; +} + +.jumbotron { + padding: 2rem 1rem; + margin-bottom: 2rem; + background-color: #e9ecef; + border-radius: 0.3rem; +} + +@media (min-width: 576px) { + .jumbotron { + padding: 4rem 2rem; + } +} + +.jumbotron-fluid { + padding-right: 0; + padding-left: 0; + border-radius: 0; +} + +.alert { + position: relative; + padding: 0.75rem 1.25rem; + margin-bottom: 1rem; + border: 1px solid transparent; + border-radius: 0.25rem; +} + +.alert-heading { + color: inherit; +} + +.alert-link { + font-weight: 700; +} + +.alert-dismissible { + padding-right: 4rem; +} + +.alert-dismissible .close { + position: absolute; + top: 0; + right: 0; + padding: 0.75rem 1.25rem; + color: inherit; +} + +.alert-primary { + color: #004085; + background-color: #cce5ff; + border-color: #b8daff; +} + +.alert-primary hr { + border-top-color: #9fcdff; +} + +.alert-primary .alert-link { + color: #002752; +} + +.alert-secondary { + color: #383d41; + background-color: #e2e3e5; + border-color: #d6d8db; +} + +.alert-secondary hr { + border-top-color: #c8cbcf; +} + +.alert-secondary .alert-link { + color: #202326; +} + +.alert-success { + color: #155724; + background-color: #d4edda; + border-color: #c3e6cb; +} + +.alert-success hr { + border-top-color: #b1dfbb; +} + +.alert-success .alert-link { + color: #0b2e13; +} + +.alert-info { + color: #0c5460; + background-color: #d1ecf1; + border-color: #bee5eb; +} + +.alert-info hr { + border-top-color: #abdde5; +} + +.alert-info .alert-link { + color: #062c33; +} + +.alert-warning { + color: #856404; + background-color: #fff3cd; + border-color: #ffeeba; +} + +.alert-warning hr { + border-top-color: #ffe8a1; +} + +.alert-warning .alert-link { + color: #533f03; +} + +.alert-danger { + color: #721c24; + background-color: #f8d7da; + border-color: #f5c6cb; +} + +.alert-danger hr { + border-top-color: #f1b0b7; +} + +.alert-danger .alert-link { + color: #491217; +} + +.alert-light { + color: #818182; + background-color: #fefefe; + border-color: #fdfdfe; +} + +.alert-light hr { + border-top-color: #ececf6; +} + +.alert-light .alert-link { + color: #686868; +} + +.alert-dark { + color: #1b1e21; + background-color: #d6d8d9; + border-color: #c6c8ca; +} + +.alert-dark hr { + border-top-color: #b9bbbe; +} + +.alert-dark .alert-link { + color: #040505; +} + +@-webkit-keyframes progress-bar-stripes { + from { + background-position: 1rem 0; + } + to { + background-position: 0 0; + } +} + +@keyframes progress-bar-stripes { + from { + background-position: 1rem 0; + } + to { + background-position: 0 0; + } +} + +.progress { + display: -ms-flexbox; + display: flex; + height: 1rem; + overflow: hidden; + font-size: 0.75rem; + background-color: #e9ecef; + border-radius: 0.25rem; +} + +.progress-bar { + display: -ms-flexbox; + display: flex; + -ms-flex-direction: column; + flex-direction: column; + -ms-flex-pack: center; + justify-content: center; + color: #fff; + text-align: center; + white-space: nowrap; + background-color: #007bff; + transition: width 0.6s ease; +} + +@media screen and (prefers-reduced-motion: reduce) { + .progress-bar { + transition: none; + } +} + +.progress-bar-striped { + background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-size: 1rem 1rem; +} + +.progress-bar-animated { + -webkit-animation: progress-bar-stripes 1s linear infinite; + animation: progress-bar-stripes 1s linear infinite; +} + +.media { + display: -ms-flexbox; + display: flex; + -ms-flex-align: start; + align-items: flex-start; +} + +.media-body { + -ms-flex: 1; + flex: 1; +} + +.list-group { + display: -ms-flexbox; + display: flex; + -ms-flex-direction: column; + flex-direction: column; + padding-left: 0; + margin-bottom: 0; +} + +.list-group-item-action { + width: 100%; + color: #495057; + text-align: inherit; +} + +.list-group-item-action:hover, .list-group-item-action:focus { + color: #495057; + text-decoration: none; + background-color: #f8f9fa; +} + +.list-group-item-action:active { + color: #212529; + background-color: #e9ecef; +} + +.list-group-item { + position: relative; + display: block; + padding: 0.75rem 1.25rem; + margin-bottom: -1px; + background-color: #fff; + border: 1px solid rgba(0, 0, 0, 0.125); +} + +.list-group-item:first-child { + border-top-left-radius: 0.25rem; + border-top-right-radius: 0.25rem; +} + +.list-group-item:last-child { + margin-bottom: 0; + border-bottom-right-radius: 0.25rem; + border-bottom-left-radius: 0.25rem; +} + +.list-group-item:hover, .list-group-item:focus { + z-index: 1; + text-decoration: none; +} + +.list-group-item.disabled, .list-group-item:disabled { + color: #6c757d; + background-color: #fff; +} + +.list-group-item.active { + z-index: 2; + color: #fff; + background-color: #007bff; + border-color: #007bff; +} + +.list-group-flush .list-group-item { + border-right: 0; + border-left: 0; + border-radius: 0; +} + +.list-group-flush:first-child .list-group-item:first-child { + border-top: 0; +} + +.list-group-flush:last-child .list-group-item:last-child { + border-bottom: 0; +} + +.list-group-item-primary { + color: #004085; + background-color: #b8daff; +} + +.list-group-item-primary.list-group-item-action:hover, .list-group-item-primary.list-group-item-action:focus { + color: #004085; + background-color: #9fcdff; +} + +.list-group-item-primary.list-group-item-action.active { + color: #fff; + background-color: #004085; + border-color: #004085; +} + +.list-group-item-secondary { + color: #383d41; + background-color: #d6d8db; +} + +.list-group-item-secondary.list-group-item-action:hover, .list-group-item-secondary.list-group-item-action:focus { + color: #383d41; + background-color: #c8cbcf; +} + +.list-group-item-secondary.list-group-item-action.active { + color: #fff; + background-color: #383d41; + border-color: #383d41; +} + +.list-group-item-success { + color: #155724; + background-color: #c3e6cb; +} + +.list-group-item-success.list-group-item-action:hover, .list-group-item-success.list-group-item-action:focus { + color: #155724; + background-color: #b1dfbb; +} + +.list-group-item-success.list-group-item-action.active { + color: #fff; + background-color: #155724; + border-color: #155724; +} + +.list-group-item-info { + color: #0c5460; + background-color: #bee5eb; +} + +.list-group-item-info.list-group-item-action:hover, .list-group-item-info.list-group-item-action:focus { + color: #0c5460; + background-color: #abdde5; +} + +.list-group-item-info.list-group-item-action.active { + color: #fff; + background-color: #0c5460; + border-color: #0c5460; +} + +.list-group-item-warning { + color: #856404; + background-color: #ffeeba; +} + +.list-group-item-warning.list-group-item-action:hover, .list-group-item-warning.list-group-item-action:focus { + color: #856404; + background-color: #ffe8a1; +} + +.list-group-item-warning.list-group-item-action.active { + color: #fff; + background-color: #856404; + border-color: #856404; +} + +.list-group-item-danger { + color: #721c24; + background-color: #f5c6cb; +} + +.list-group-item-danger.list-group-item-action:hover, .list-group-item-danger.list-group-item-action:focus { + color: #721c24; + background-color: #f1b0b7; +} + +.list-group-item-danger.list-group-item-action.active { + color: #fff; + background-color: #721c24; + border-color: #721c24; +} + +.list-group-item-light { + color: #818182; + background-color: #fdfdfe; +} + +.list-group-item-light.list-group-item-action:hover, .list-group-item-light.list-group-item-action:focus { + color: #818182; + background-color: #ececf6; +} + +.list-group-item-light.list-group-item-action.active { + color: #fff; + background-color: #818182; + border-color: #818182; +} + +.list-group-item-dark { + color: #1b1e21; + background-color: #c6c8ca; +} + +.list-group-item-dark.list-group-item-action:hover, .list-group-item-dark.list-group-item-action:focus { + color: #1b1e21; + background-color: #b9bbbe; +} + +.list-group-item-dark.list-group-item-action.active { + color: #fff; + background-color: #1b1e21; + border-color: #1b1e21; +} + +.close { + float: right; + font-size: 1.5rem; + font-weight: 700; + line-height: 1; + color: #000; + text-shadow: 0 1px 0 #fff; + opacity: .5; +} + +.close:not(:disabled):not(.disabled) { + cursor: pointer; +} + +.close:not(:disabled):not(.disabled):hover, .close:not(:disabled):not(.disabled):focus { + color: #000; + text-decoration: none; + opacity: .75; +} + +button.close { + padding: 0; + background-color: transparent; + border: 0; + -webkit-appearance: none; +} + +.modal-open { + overflow: hidden; +} + +.modal-open .modal { + overflow-x: hidden; + overflow-y: auto; +} + +.modal { + position: fixed; + top: 0; + right: 0; + bottom: 0; + left: 0; + z-index: 1050; + display: none; + overflow: hidden; + outline: 0; +} + +.modal-dialog { + position: relative; + width: auto; + margin: 0.5rem; + pointer-events: none; +} + +.modal.fade .modal-dialog { + transition: -webkit-transform 0.3s ease-out; + transition: transform 0.3s ease-out; + transition: transform 0.3s ease-out, -webkit-transform 0.3s ease-out; + -webkit-transform: translate(0, -25%); + transform: translate(0, -25%); +} + +@media screen and (prefers-reduced-motion: reduce) { + .modal.fade .modal-dialog { + transition: none; + } +} + +.modal.show .modal-dialog { + -webkit-transform: translate(0, 0); + transform: translate(0, 0); +} + +.modal-dialog-centered { + display: -ms-flexbox; + display: flex; + -ms-flex-align: center; + align-items: center; + min-height: calc(100% - (0.5rem * 2)); +} + +.modal-dialog-centered::before { + display: block; + height: calc(100vh - (0.5rem * 2)); + content: ""; +} + +.modal-content { + position: relative; + display: -ms-flexbox; + display: flex; + -ms-flex-direction: column; + flex-direction: column; + width: 100%; + pointer-events: auto; + background-color: #fff; + background-clip: padding-box; + border: 1px solid rgba(0, 0, 0, 0.2); + border-radius: 0.3rem; + outline: 0; +} + +.modal-backdrop { + position: fixed; + top: 0; + right: 0; + bottom: 0; + left: 0; + z-index: 1040; + background-color: #000; +} + +.modal-backdrop.fade { + opacity: 0; +} + +.modal-backdrop.show { + opacity: 0.5; +} + +.modal-header { + display: -ms-flexbox; + display: flex; + -ms-flex-align: start; + align-items: flex-start; + -ms-flex-pack: justify; + justify-content: space-between; + padding: 1rem; + border-bottom: 1px solid #e9ecef; + border-top-left-radius: 0.3rem; + border-top-right-radius: 0.3rem; +} + +.modal-header .close { + padding: 1rem; + margin: -1rem -1rem -1rem auto; +} + +.modal-title { + margin-bottom: 0; + line-height: 1.5; +} + +.modal-body { + position: relative; + -ms-flex: 1 1 auto; + flex: 1 1 auto; + padding: 1rem; +} + +.modal-footer { + display: -ms-flexbox; + display: flex; + -ms-flex-align: center; + align-items: center; + -ms-flex-pack: end; + justify-content: flex-end; + padding: 1rem; + border-top: 1px solid #e9ecef; +} + +.modal-footer > :not(:first-child) { + margin-left: .25rem; +} + +.modal-footer > :not(:last-child) { + margin-right: .25rem; +} + +.modal-scrollbar-measure { + position: absolute; + top: -9999px; + width: 50px; + height: 50px; + overflow: scroll; +} + +@media (min-width: 576px) { + .modal-dialog { + max-width: 500px; + margin: 1.75rem auto; + } + .modal-dialog-centered { + min-height: calc(100% - (1.75rem * 2)); + } + .modal-dialog-centered::before { + height: calc(100vh - (1.75rem * 2)); + } + .modal-sm { + max-width: 300px; + } +} + +@media (min-width: 992px) { + .modal-lg { + max-width: 800px; + } +} + +.tooltip { + position: absolute; + z-index: 1070; + display: block; + margin: 0; + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; + font-style: normal; + font-weight: 400; + line-height: 1.5; + text-align: left; + text-align: start; + text-decoration: none; + text-shadow: none; + text-transform: none; + letter-spacing: normal; + word-break: normal; + word-spacing: normal; + white-space: normal; + line-break: auto; + font-size: 0.875rem; + word-wrap: break-word; + opacity: 0; +} + +.tooltip.show { + opacity: 0.9; +} + +.tooltip .arrow { + position: absolute; + display: block; + width: 0.8rem; + height: 0.4rem; +} + +.tooltip .arrow::before { + position: absolute; + content: ""; + border-color: transparent; + border-style: solid; +} + +.bs-tooltip-top, .bs-tooltip-auto[x-placement^="top"] { + padding: 0.4rem 0; +} + +.bs-tooltip-top .arrow, .bs-tooltip-auto[x-placement^="top"] .arrow { + bottom: 0; +} + +.bs-tooltip-top .arrow::before, .bs-tooltip-auto[x-placement^="top"] .arrow::before { + top: 0; + border-width: 0.4rem 0.4rem 0; + border-top-color: #000; +} + +.bs-tooltip-right, .bs-tooltip-auto[x-placement^="right"] { + padding: 0 0.4rem; +} + +.bs-tooltip-right .arrow, .bs-tooltip-auto[x-placement^="right"] .arrow { + left: 0; + width: 0.4rem; + height: 0.8rem; +} + +.bs-tooltip-right .arrow::before, .bs-tooltip-auto[x-placement^="right"] .arrow::before { + right: 0; + border-width: 0.4rem 0.4rem 0.4rem 0; + border-right-color: #000; +} + +.bs-tooltip-bottom, .bs-tooltip-auto[x-placement^="bottom"] { + padding: 0.4rem 0; +} + +.bs-tooltip-bottom .arrow, .bs-tooltip-auto[x-placement^="bottom"] .arrow { + top: 0; +} + +.bs-tooltip-bottom .arrow::before, .bs-tooltip-auto[x-placement^="bottom"] .arrow::before { + bottom: 0; + border-width: 0 0.4rem 0.4rem; + border-bottom-color: #000; +} + +.bs-tooltip-left, .bs-tooltip-auto[x-placement^="left"] { + padding: 0 0.4rem; +} + +.bs-tooltip-left .arrow, .bs-tooltip-auto[x-placement^="left"] .arrow { + right: 0; + width: 0.4rem; + height: 0.8rem; +} + +.bs-tooltip-left .arrow::before, .bs-tooltip-auto[x-placement^="left"] .arrow::before { + left: 0; + border-width: 0.4rem 0 0.4rem 0.4rem; + border-left-color: #000; +} + +.tooltip-inner { + max-width: 200px; + padding: 0.25rem 0.5rem; + color: #fff; + text-align: center; + background-color: #000; + border-radius: 0.25rem; +} + +.popover { + position: absolute; + top: 0; + left: 0; + z-index: 1060; + display: block; + max-width: 276px; + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; + font-style: normal; + font-weight: 400; + line-height: 1.5; + text-align: left; + text-align: start; + text-decoration: none; + text-shadow: none; + text-transform: none; + letter-spacing: normal; + word-break: normal; + word-spacing: normal; + white-space: normal; + line-break: auto; + font-size: 0.875rem; + word-wrap: break-word; + background-color: #fff; + background-clip: padding-box; + border: 1px solid rgba(0, 0, 0, 0.2); + border-radius: 0.3rem; +} + +.popover .arrow { + position: absolute; + display: block; + width: 1rem; + height: 0.5rem; + margin: 0 0.3rem; +} + +.popover .arrow::before, .popover .arrow::after { + position: absolute; + display: block; + content: ""; + border-color: transparent; + border-style: solid; +} + +.bs-popover-top, .bs-popover-auto[x-placement^="top"] { + margin-bottom: 0.5rem; +} + +.bs-popover-top .arrow, .bs-popover-auto[x-placement^="top"] .arrow { + bottom: calc((0.5rem + 1px) * -1); +} + +.bs-popover-top .arrow::before, .bs-popover-auto[x-placement^="top"] .arrow::before, +.bs-popover-top .arrow::after, +.bs-popover-auto[x-placement^="top"] .arrow::after { + border-width: 0.5rem 0.5rem 0; +} + +.bs-popover-top .arrow::before, .bs-popover-auto[x-placement^="top"] .arrow::before { + bottom: 0; + border-top-color: rgba(0, 0, 0, 0.25); +} + + +.bs-popover-top .arrow::after, +.bs-popover-auto[x-placement^="top"] .arrow::after { + bottom: 1px; + border-top-color: #fff; +} + +.bs-popover-right, .bs-popover-auto[x-placement^="right"] { + margin-left: 0.5rem; +} + +.bs-popover-right .arrow, .bs-popover-auto[x-placement^="right"] .arrow { + left: calc((0.5rem + 1px) * -1); + width: 0.5rem; + height: 1rem; + margin: 0.3rem 0; +} + +.bs-popover-right .arrow::before, .bs-popover-auto[x-placement^="right"] .arrow::before, +.bs-popover-right .arrow::after, +.bs-popover-auto[x-placement^="right"] .arrow::after { + border-width: 0.5rem 0.5rem 0.5rem 0; +} + +.bs-popover-right .arrow::before, .bs-popover-auto[x-placement^="right"] .arrow::before { + left: 0; + border-right-color: rgba(0, 0, 0, 0.25); +} + + +.bs-popover-right .arrow::after, +.bs-popover-auto[x-placement^="right"] .arrow::after { + left: 1px; + border-right-color: #fff; +} + +.bs-popover-bottom, .bs-popover-auto[x-placement^="bottom"] { + margin-top: 0.5rem; +} + +.bs-popover-bottom .arrow, .bs-popover-auto[x-placement^="bottom"] .arrow { + top: calc((0.5rem + 1px) * -1); +} + +.bs-popover-bottom .arrow::before, .bs-popover-auto[x-placement^="bottom"] .arrow::before, +.bs-popover-bottom .arrow::after, +.bs-popover-auto[x-placement^="bottom"] .arrow::after { + border-width: 0 0.5rem 0.5rem 0.5rem; +} + +.bs-popover-bottom .arrow::before, .bs-popover-auto[x-placement^="bottom"] .arrow::before { + top: 0; + border-bottom-color: rgba(0, 0, 0, 0.25); +} + + +.bs-popover-bottom .arrow::after, +.bs-popover-auto[x-placement^="bottom"] .arrow::after { + top: 1px; + border-bottom-color: #fff; +} + +.bs-popover-bottom .popover-header::before, .bs-popover-auto[x-placement^="bottom"] .popover-header::before { + position: absolute; + top: 0; + left: 50%; + display: block; + width: 1rem; + margin-left: -0.5rem; + content: ""; + border-bottom: 1px solid #f7f7f7; +} + +.bs-popover-left, .bs-popover-auto[x-placement^="left"] { + margin-right: 0.5rem; +} + +.bs-popover-left .arrow, .bs-popover-auto[x-placement^="left"] .arrow { + right: calc((0.5rem + 1px) * -1); + width: 0.5rem; + height: 1rem; + margin: 0.3rem 0; +} + +.bs-popover-left .arrow::before, .bs-popover-auto[x-placement^="left"] .arrow::before, +.bs-popover-left .arrow::after, +.bs-popover-auto[x-placement^="left"] .arrow::after { + border-width: 0.5rem 0 0.5rem 0.5rem; +} + +.bs-popover-left .arrow::before, .bs-popover-auto[x-placement^="left"] .arrow::before { + right: 0; + border-left-color: rgba(0, 0, 0, 0.25); +} + + +.bs-popover-left .arrow::after, +.bs-popover-auto[x-placement^="left"] .arrow::after { + right: 1px; + border-left-color: #fff; +} + +.popover-header { + padding: 0.5rem 0.75rem; + margin-bottom: 0; + font-size: 1rem; + color: inherit; + background-color: #f7f7f7; + border-bottom: 1px solid #ebebeb; + border-top-left-radius: calc(0.3rem - 1px); + border-top-right-radius: calc(0.3rem - 1px); +} + +.popover-header:empty { + display: none; +} + +.popover-body { + padding: 0.5rem 0.75rem; + color: #212529; +} + +.carousel { + position: relative; +} + +.carousel-inner { + position: relative; + width: 100%; + overflow: hidden; +} + +.carousel-item { + position: relative; + display: none; + -ms-flex-align: center; + align-items: center; + width: 100%; + -webkit-backface-visibility: hidden; + backface-visibility: hidden; + -webkit-perspective: 1000px; + perspective: 1000px; +} + +.carousel-item.active, +.carousel-item-next, +.carousel-item-prev { + display: block; + transition: -webkit-transform 0.6s ease; + transition: transform 0.6s ease; + transition: transform 0.6s ease, -webkit-transform 0.6s ease; +} + +@media screen and (prefers-reduced-motion: reduce) { + .carousel-item.active, + .carousel-item-next, + .carousel-item-prev { + transition: none; + } +} + +.carousel-item-next, +.carousel-item-prev { + position: absolute; + top: 0; +} + +.carousel-item-next.carousel-item-left, +.carousel-item-prev.carousel-item-right { + -webkit-transform: translateX(0); + transform: translateX(0); +} + +@supports ((-webkit-transform-style: preserve-3d) or (transform-style: preserve-3d)) { + .carousel-item-next.carousel-item-left, + .carousel-item-prev.carousel-item-right { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + } +} + +.carousel-item-next, +.active.carousel-item-right { + -webkit-transform: translateX(100%); + transform: translateX(100%); +} + +@supports ((-webkit-transform-style: preserve-3d) or (transform-style: preserve-3d)) { + .carousel-item-next, + .active.carousel-item-right { + -webkit-transform: translate3d(100%, 0, 0); + transform: translate3d(100%, 0, 0); + } +} + +.carousel-item-prev, +.active.carousel-item-left { + -webkit-transform: translateX(-100%); + transform: translateX(-100%); +} + +@supports ((-webkit-transform-style: preserve-3d) or (transform-style: preserve-3d)) { + .carousel-item-prev, + .active.carousel-item-left { + -webkit-transform: translate3d(-100%, 0, 0); + transform: translate3d(-100%, 0, 0); + } +} + +.carousel-fade .carousel-item { + opacity: 0; + transition-duration: .6s; + transition-property: opacity; +} + +.carousel-fade .carousel-item.active, +.carousel-fade .carousel-item-next.carousel-item-left, +.carousel-fade .carousel-item-prev.carousel-item-right { + opacity: 1; +} + +.carousel-fade .active.carousel-item-left, +.carousel-fade .active.carousel-item-right { + opacity: 0; +} + +.carousel-fade .carousel-item-next, +.carousel-fade .carousel-item-prev, +.carousel-fade .carousel-item.active, +.carousel-fade .active.carousel-item-left, +.carousel-fade .active.carousel-item-prev { + -webkit-transform: translateX(0); + transform: translateX(0); +} + +@supports ((-webkit-transform-style: preserve-3d) or (transform-style: preserve-3d)) { + .carousel-fade .carousel-item-next, + .carousel-fade .carousel-item-prev, + .carousel-fade .carousel-item.active, + .carousel-fade .active.carousel-item-left, + .carousel-fade .active.carousel-item-prev { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + } +} + +.carousel-control-prev, +.carousel-control-next { + position: absolute; + top: 0; + bottom: 0; + display: -ms-flexbox; + display: flex; + -ms-flex-align: center; + align-items: center; + -ms-flex-pack: center; + justify-content: center; + width: 15%; + color: #fff; + text-align: center; + opacity: 0.5; +} + +.carousel-control-prev:hover, .carousel-control-prev:focus, +.carousel-control-next:hover, +.carousel-control-next:focus { + color: #fff; + text-decoration: none; + outline: 0; + opacity: .9; +} + +.carousel-control-prev { + left: 0; +} + +.carousel-control-next { + right: 0; +} + +.carousel-control-prev-icon, +.carousel-control-next-icon { + display: inline-block; + width: 20px; + height: 20px; + background: transparent no-repeat center center; + background-size: 100% 100%; +} + +.carousel-control-prev-icon { + background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' viewBox='0 0 8 8'%3E%3Cpath d='M5.25 0l-4 4 4 4 1.5-1.5-2.5-2.5 2.5-2.5-1.5-1.5z'/%3E%3C/svg%3E"); +} + +.carousel-control-next-icon { + background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' viewBox='0 0 8 8'%3E%3Cpath d='M2.75 0l-1.5 1.5 2.5 2.5-2.5 2.5 1.5 1.5 4-4-4-4z'/%3E%3C/svg%3E"); +} + +.carousel-indicators { + position: absolute; + right: 0; + bottom: 10px; + left: 0; + z-index: 15; + display: -ms-flexbox; + display: flex; + -ms-flex-pack: center; + justify-content: center; + padding-left: 0; + margin-right: 15%; + margin-left: 15%; + list-style: none; +} + +.carousel-indicators li { + position: relative; + -ms-flex: 0 1 auto; + flex: 0 1 auto; + width: 30px; + height: 3px; + margin-right: 3px; + margin-left: 3px; + text-indent: -999px; + cursor: pointer; + background-color: rgba(255, 255, 255, 0.5); +} + +.carousel-indicators li::before { + position: absolute; + top: -10px; + left: 0; + display: inline-block; + width: 100%; + height: 10px; + content: ""; +} + +.carousel-indicators li::after { + position: absolute; + bottom: -10px; + left: 0; + display: inline-block; + width: 100%; + height: 10px; + content: ""; +} + +.carousel-indicators .active { + background-color: #fff; +} + +.carousel-caption { + position: absolute; + right: 15%; + bottom: 20px; + left: 15%; + z-index: 10; + padding-top: 20px; + padding-bottom: 20px; + color: #fff; + text-align: center; +} + +.align-baseline { + vertical-align: baseline !important; +} + +.align-top { + vertical-align: top !important; +} + +.align-middle { + vertical-align: middle !important; +} + +.align-bottom { + vertical-align: bottom !important; +} + +.align-text-bottom { + vertical-align: text-bottom !important; +} + +.align-text-top { + vertical-align: text-top !important; +} + +.bg-primary { + background-color: #007bff !important; +} + +a.bg-primary:hover, a.bg-primary:focus, +button.bg-primary:hover, +button.bg-primary:focus { + background-color: #0062cc !important; +} + +.bg-secondary { + background-color: #6c757d !important; +} + +a.bg-secondary:hover, a.bg-secondary:focus, +button.bg-secondary:hover, +button.bg-secondary:focus { + background-color: #545b62 !important; +} + +.bg-success { + background-color: #28a745 !important; +} + +a.bg-success:hover, a.bg-success:focus, +button.bg-success:hover, +button.bg-success:focus { + background-color: #1e7e34 !important; +} + +.bg-info { + background-color: #17a2b8 !important; +} + +a.bg-info:hover, a.bg-info:focus, +button.bg-info:hover, +button.bg-info:focus { + background-color: #117a8b !important; +} + +.bg-warning { + background-color: #ffc107 !important; +} + +a.bg-warning:hover, a.bg-warning:focus, +button.bg-warning:hover, +button.bg-warning:focus { + background-color: #d39e00 !important; +} + +.bg-danger { + background-color: #dc3545 !important; +} + +a.bg-danger:hover, a.bg-danger:focus, +button.bg-danger:hover, +button.bg-danger:focus { + background-color: #bd2130 !important; +} + +.bg-light { + background-color: #f8f9fa !important; +} + +a.bg-light:hover, a.bg-light:focus, +button.bg-light:hover, +button.bg-light:focus { + background-color: #dae0e5 !important; +} + +.bg-dark { + background-color: #343a40 !important; +} + +a.bg-dark:hover, a.bg-dark:focus, +button.bg-dark:hover, +button.bg-dark:focus { + background-color: #1d2124 !important; +} + +.bg-white { + background-color: #fff !important; +} + +.bg-transparent { + background-color: transparent !important; +} + +.border { + border: 1px solid #dee2e6 !important; +} + +.border-top { + border-top: 1px solid #dee2e6 !important; +} + +.border-right { + border-right: 1px solid #dee2e6 !important; +} + +.border-bottom { + border-bottom: 1px solid #dee2e6 !important; +} + +.border-left { + border-left: 1px solid #dee2e6 !important; +} + +.border-0 { + border: 0 !important; +} + +.border-top-0 { + border-top: 0 !important; +} + +.border-right-0 { + border-right: 0 !important; +} + +.border-bottom-0 { + border-bottom: 0 !important; +} + +.border-left-0 { + border-left: 0 !important; +} + +.border-primary { + border-color: #007bff !important; +} + +.border-secondary { + border-color: #6c757d !important; +} + +.border-success { + border-color: #28a745 !important; +} + +.border-info { + border-color: #17a2b8 !important; +} + +.border-warning { + border-color: #ffc107 !important; +} + +.border-danger { + border-color: #dc3545 !important; +} + +.border-light { + border-color: #f8f9fa !important; +} + +.border-dark { + border-color: #343a40 !important; +} + +.border-white { + border-color: #fff !important; +} + +.rounded { + border-radius: 0.25rem !important; +} + +.rounded-top { + border-top-left-radius: 0.25rem !important; + border-top-right-radius: 0.25rem !important; +} + +.rounded-right { + border-top-right-radius: 0.25rem !important; + border-bottom-right-radius: 0.25rem !important; +} + +.rounded-bottom { + border-bottom-right-radius: 0.25rem !important; + border-bottom-left-radius: 0.25rem !important; +} + +.rounded-left { + border-top-left-radius: 0.25rem !important; + border-bottom-left-radius: 0.25rem !important; +} + +.rounded-circle { + border-radius: 50% !important; +} + +.rounded-0 { + border-radius: 0 !important; +} + +.clearfix::after { + display: block; + clear: both; + content: ""; +} + +.d-none { + display: none !important; +} + +.d-inline { + display: inline !important; +} + +.d-inline-block { + display: inline-block !important; +} + +.d-block { + display: block !important; +} + +.d-table { + display: table !important; +} + +.d-table-row { + display: table-row !important; +} + +.d-table-cell { + display: table-cell !important; +} + +.d-flex { + display: -ms-flexbox !important; + display: flex !important; +} + +.d-inline-flex { + display: -ms-inline-flexbox !important; + display: inline-flex !important; +} + +@media (min-width: 576px) { + .d-sm-none { + display: none !important; + } + .d-sm-inline { + display: inline !important; + } + .d-sm-inline-block { + display: inline-block !important; + } + .d-sm-block { + display: block !important; + } + .d-sm-table { + display: table !important; + } + .d-sm-table-row { + display: table-row !important; + } + .d-sm-table-cell { + display: table-cell !important; + } + .d-sm-flex { + display: -ms-flexbox !important; + display: flex !important; + } + .d-sm-inline-flex { + display: -ms-inline-flexbox !important; + display: inline-flex !important; + } +} + +@media (min-width: 768px) { + .d-md-none { + display: none !important; + } + .d-md-inline { + display: inline !important; + } + .d-md-inline-block { + display: inline-block !important; + } + .d-md-block { + display: block !important; + } + .d-md-table { + display: table !important; + } + .d-md-table-row { + display: table-row !important; + } + .d-md-table-cell { + display: table-cell !important; + } + .d-md-flex { + display: -ms-flexbox !important; + display: flex !important; + } + .d-md-inline-flex { + display: -ms-inline-flexbox !important; + display: inline-flex !important; + } +} + +@media (min-width: 992px) { + .d-lg-none { + display: none !important; + } + .d-lg-inline { + display: inline !important; + } + .d-lg-inline-block { + display: inline-block !important; + } + .d-lg-block { + display: block !important; + } + .d-lg-table { + display: table !important; + } + .d-lg-table-row { + display: table-row !important; + } + .d-lg-table-cell { + display: table-cell !important; + } + .d-lg-flex { + display: -ms-flexbox !important; + display: flex !important; + } + .d-lg-inline-flex { + display: -ms-inline-flexbox !important; + display: inline-flex !important; + } +} + +@media (min-width: 1200px) { + .d-xl-none { + display: none !important; + } + .d-xl-inline { + display: inline !important; + } + .d-xl-inline-block { + display: inline-block !important; + } + .d-xl-block { + display: block !important; + } + .d-xl-table { + display: table !important; + } + .d-xl-table-row { + display: table-row !important; + } + .d-xl-table-cell { + display: table-cell !important; + } + .d-xl-flex { + display: -ms-flexbox !important; + display: flex !important; + } + .d-xl-inline-flex { + display: -ms-inline-flexbox !important; + display: inline-flex !important; + } +} + +@media print { + .d-print-none { + display: none !important; + } + .d-print-inline { + display: inline !important; + } + .d-print-inline-block { + display: inline-block !important; + } + .d-print-block { + display: block !important; + } + .d-print-table { + display: table !important; + } + .d-print-table-row { + display: table-row !important; + } + .d-print-table-cell { + display: table-cell !important; + } + .d-print-flex { + display: -ms-flexbox !important; + display: flex !important; + } + .d-print-inline-flex { + display: -ms-inline-flexbox !important; + display: inline-flex !important; + } +} + +.embed-responsive { + position: relative; + display: block; + width: 100%; + padding: 0; + overflow: hidden; +} + +.embed-responsive::before { + display: block; + content: ""; +} + +.embed-responsive .embed-responsive-item, +.embed-responsive iframe, +.embed-responsive embed, +.embed-responsive object, +.embed-responsive video { + position: absolute; + top: 0; + bottom: 0; + left: 0; + width: 100%; + height: 100%; + border: 0; +} + +.embed-responsive-21by9::before { + padding-top: 42.857143%; +} + +.embed-responsive-16by9::before { + padding-top: 56.25%; +} + +.embed-responsive-4by3::before { + padding-top: 75%; +} + +.embed-responsive-1by1::before { + padding-top: 100%; +} + +.flex-row { + -ms-flex-direction: row !important; + flex-direction: row !important; +} + +.flex-column { + -ms-flex-direction: column !important; + flex-direction: column !important; +} + +.flex-row-reverse { + -ms-flex-direction: row-reverse !important; + flex-direction: row-reverse !important; +} + +.flex-column-reverse { + -ms-flex-direction: column-reverse !important; + flex-direction: column-reverse !important; +} + +.flex-wrap { + -ms-flex-wrap: wrap !important; + flex-wrap: wrap !important; +} + +.flex-nowrap { + -ms-flex-wrap: nowrap !important; + flex-wrap: nowrap !important; +} + +.flex-wrap-reverse { + -ms-flex-wrap: wrap-reverse !important; + flex-wrap: wrap-reverse !important; +} + +.flex-fill { + -ms-flex: 1 1 auto !important; + flex: 1 1 auto !important; +} + +.flex-grow-0 { + -ms-flex-positive: 0 !important; + flex-grow: 0 !important; +} + +.flex-grow-1 { + -ms-flex-positive: 1 !important; + flex-grow: 1 !important; +} + +.flex-shrink-0 { + -ms-flex-negative: 0 !important; + flex-shrink: 0 !important; +} + +.flex-shrink-1 { + -ms-flex-negative: 1 !important; + flex-shrink: 1 !important; +} + +.justify-content-start { + -ms-flex-pack: start !important; + justify-content: flex-start !important; +} + +.justify-content-end { + -ms-flex-pack: end !important; + justify-content: flex-end !important; +} + +.justify-content-center { + -ms-flex-pack: center !important; + justify-content: center !important; +} + +.justify-content-between { + -ms-flex-pack: justify !important; + justify-content: space-between !important; +} + +.justify-content-around { + -ms-flex-pack: distribute !important; + justify-content: space-around !important; +} + +.align-items-start { + -ms-flex-align: start !important; + align-items: flex-start !important; +} + +.align-items-end { + -ms-flex-align: end !important; + align-items: flex-end !important; +} + +.align-items-center { + -ms-flex-align: center !important; + align-items: center !important; +} + +.align-items-baseline { + -ms-flex-align: baseline !important; + align-items: baseline !important; +} + +.align-items-stretch { + -ms-flex-align: stretch !important; + align-items: stretch !important; +} + +.align-content-start { + -ms-flex-line-pack: start !important; + align-content: flex-start !important; +} + +.align-content-end { + -ms-flex-line-pack: end !important; + align-content: flex-end !important; +} + +.align-content-center { + -ms-flex-line-pack: center !important; + align-content: center !important; +} + +.align-content-between { + -ms-flex-line-pack: justify !important; + align-content: space-between !important; +} + +.align-content-around { + -ms-flex-line-pack: distribute !important; + align-content: space-around !important; +} + +.align-content-stretch { + -ms-flex-line-pack: stretch !important; + align-content: stretch !important; +} + +.align-self-auto { + -ms-flex-item-align: auto !important; + align-self: auto !important; +} + +.align-self-start { + -ms-flex-item-align: start !important; + align-self: flex-start !important; +} + +.align-self-end { + -ms-flex-item-align: end !important; + align-self: flex-end !important; +} + +.align-self-center { + -ms-flex-item-align: center !important; + align-self: center !important; +} + +.align-self-baseline { + -ms-flex-item-align: baseline !important; + align-self: baseline !important; +} + +.align-self-stretch { + -ms-flex-item-align: stretch !important; + align-self: stretch !important; +} + +@media (min-width: 576px) { + .flex-sm-row { + -ms-flex-direction: row !important; + flex-direction: row !important; + } + .flex-sm-column { + -ms-flex-direction: column !important; + flex-direction: column !important; + } + .flex-sm-row-reverse { + -ms-flex-direction: row-reverse !important; + flex-direction: row-reverse !important; + } + .flex-sm-column-reverse { + -ms-flex-direction: column-reverse !important; + flex-direction: column-reverse !important; + } + .flex-sm-wrap { + -ms-flex-wrap: wrap !important; + flex-wrap: wrap !important; + } + .flex-sm-nowrap { + -ms-flex-wrap: nowrap !important; + flex-wrap: nowrap !important; + } + .flex-sm-wrap-reverse { + -ms-flex-wrap: wrap-reverse !important; + flex-wrap: wrap-reverse !important; + } + .flex-sm-fill { + -ms-flex: 1 1 auto !important; + flex: 1 1 auto !important; + } + .flex-sm-grow-0 { + -ms-flex-positive: 0 !important; + flex-grow: 0 !important; + } + .flex-sm-grow-1 { + -ms-flex-positive: 1 !important; + flex-grow: 1 !important; + } + .flex-sm-shrink-0 { + -ms-flex-negative: 0 !important; + flex-shrink: 0 !important; + } + .flex-sm-shrink-1 { + -ms-flex-negative: 1 !important; + flex-shrink: 1 !important; + } + .justify-content-sm-start { + -ms-flex-pack: start !important; + justify-content: flex-start !important; + } + .justify-content-sm-end { + -ms-flex-pack: end !important; + justify-content: flex-end !important; + } + .justify-content-sm-center { + -ms-flex-pack: center !important; + justify-content: center !important; + } + .justify-content-sm-between { + -ms-flex-pack: justify !important; + justify-content: space-between !important; + } + .justify-content-sm-around { + -ms-flex-pack: distribute !important; + justify-content: space-around !important; + } + .align-items-sm-start { + -ms-flex-align: start !important; + align-items: flex-start !important; + } + .align-items-sm-end { + -ms-flex-align: end !important; + align-items: flex-end !important; + } + .align-items-sm-center { + -ms-flex-align: center !important; + align-items: center !important; + } + .align-items-sm-baseline { + -ms-flex-align: baseline !important; + align-items: baseline !important; + } + .align-items-sm-stretch { + -ms-flex-align: stretch !important; + align-items: stretch !important; + } + .align-content-sm-start { + -ms-flex-line-pack: start !important; + align-content: flex-start !important; + } + .align-content-sm-end { + -ms-flex-line-pack: end !important; + align-content: flex-end !important; + } + .align-content-sm-center { + -ms-flex-line-pack: center !important; + align-content: center !important; + } + .align-content-sm-between { + -ms-flex-line-pack: justify !important; + align-content: space-between !important; + } + .align-content-sm-around { + -ms-flex-line-pack: distribute !important; + align-content: space-around !important; + } + .align-content-sm-stretch { + -ms-flex-line-pack: stretch !important; + align-content: stretch !important; + } + .align-self-sm-auto { + -ms-flex-item-align: auto !important; + align-self: auto !important; + } + .align-self-sm-start { + -ms-flex-item-align: start !important; + align-self: flex-start !important; + } + .align-self-sm-end { + -ms-flex-item-align: end !important; + align-self: flex-end !important; + } + .align-self-sm-center { + -ms-flex-item-align: center !important; + align-self: center !important; + } + .align-self-sm-baseline { + -ms-flex-item-align: baseline !important; + align-self: baseline !important; + } + .align-self-sm-stretch { + -ms-flex-item-align: stretch !important; + align-self: stretch !important; + } +} + +@media (min-width: 768px) { + .flex-md-row { + -ms-flex-direction: row !important; + flex-direction: row !important; + } + .flex-md-column { + -ms-flex-direction: column !important; + flex-direction: column !important; + } + .flex-md-row-reverse { + -ms-flex-direction: row-reverse !important; + flex-direction: row-reverse !important; + } + .flex-md-column-reverse { + -ms-flex-direction: column-reverse !important; + flex-direction: column-reverse !important; + } + .flex-md-wrap { + -ms-flex-wrap: wrap !important; + flex-wrap: wrap !important; + } + .flex-md-nowrap { + -ms-flex-wrap: nowrap !important; + flex-wrap: nowrap !important; + } + .flex-md-wrap-reverse { + -ms-flex-wrap: wrap-reverse !important; + flex-wrap: wrap-reverse !important; + } + .flex-md-fill { + -ms-flex: 1 1 auto !important; + flex: 1 1 auto !important; + } + .flex-md-grow-0 { + -ms-flex-positive: 0 !important; + flex-grow: 0 !important; + } + .flex-md-grow-1 { + -ms-flex-positive: 1 !important; + flex-grow: 1 !important; + } + .flex-md-shrink-0 { + -ms-flex-negative: 0 !important; + flex-shrink: 0 !important; + } + .flex-md-shrink-1 { + -ms-flex-negative: 1 !important; + flex-shrink: 1 !important; + } + .justify-content-md-start { + -ms-flex-pack: start !important; + justify-content: flex-start !important; + } + .justify-content-md-end { + -ms-flex-pack: end !important; + justify-content: flex-end !important; + } + .justify-content-md-center { + -ms-flex-pack: center !important; + justify-content: center !important; + } + .justify-content-md-between { + -ms-flex-pack: justify !important; + justify-content: space-between !important; + } + .justify-content-md-around { + -ms-flex-pack: distribute !important; + justify-content: space-around !important; + } + .align-items-md-start { + -ms-flex-align: start !important; + align-items: flex-start !important; + } + .align-items-md-end { + -ms-flex-align: end !important; + align-items: flex-end !important; + } + .align-items-md-center { + -ms-flex-align: center !important; + align-items: center !important; + } + .align-items-md-baseline { + -ms-flex-align: baseline !important; + align-items: baseline !important; + } + .align-items-md-stretch { + -ms-flex-align: stretch !important; + align-items: stretch !important; + } + .align-content-md-start { + -ms-flex-line-pack: start !important; + align-content: flex-start !important; + } + .align-content-md-end { + -ms-flex-line-pack: end !important; + align-content: flex-end !important; + } + .align-content-md-center { + -ms-flex-line-pack: center !important; + align-content: center !important; + } + .align-content-md-between { + -ms-flex-line-pack: justify !important; + align-content: space-between !important; + } + .align-content-md-around { + -ms-flex-line-pack: distribute !important; + align-content: space-around !important; + } + .align-content-md-stretch { + -ms-flex-line-pack: stretch !important; + align-content: stretch !important; + } + .align-self-md-auto { + -ms-flex-item-align: auto !important; + align-self: auto !important; + } + .align-self-md-start { + -ms-flex-item-align: start !important; + align-self: flex-start !important; + } + .align-self-md-end { + -ms-flex-item-align: end !important; + align-self: flex-end !important; + } + .align-self-md-center { + -ms-flex-item-align: center !important; + align-self: center !important; + } + .align-self-md-baseline { + -ms-flex-item-align: baseline !important; + align-self: baseline !important; + } + .align-self-md-stretch { + -ms-flex-item-align: stretch !important; + align-self: stretch !important; + } +} + +@media (min-width: 992px) { + .flex-lg-row { + -ms-flex-direction: row !important; + flex-direction: row !important; + } + .flex-lg-column { + -ms-flex-direction: column !important; + flex-direction: column !important; + } + .flex-lg-row-reverse { + -ms-flex-direction: row-reverse !important; + flex-direction: row-reverse !important; + } + .flex-lg-column-reverse { + -ms-flex-direction: column-reverse !important; + flex-direction: column-reverse !important; + } + .flex-lg-wrap { + -ms-flex-wrap: wrap !important; + flex-wrap: wrap !important; + } + .flex-lg-nowrap { + -ms-flex-wrap: nowrap !important; + flex-wrap: nowrap !important; + } + .flex-lg-wrap-reverse { + -ms-flex-wrap: wrap-reverse !important; + flex-wrap: wrap-reverse !important; + } + .flex-lg-fill { + -ms-flex: 1 1 auto !important; + flex: 1 1 auto !important; + } + .flex-lg-grow-0 { + -ms-flex-positive: 0 !important; + flex-grow: 0 !important; + } + .flex-lg-grow-1 { + -ms-flex-positive: 1 !important; + flex-grow: 1 !important; + } + .flex-lg-shrink-0 { + -ms-flex-negative: 0 !important; + flex-shrink: 0 !important; + } + .flex-lg-shrink-1 { + -ms-flex-negative: 1 !important; + flex-shrink: 1 !important; + } + .justify-content-lg-start { + -ms-flex-pack: start !important; + justify-content: flex-start !important; + } + .justify-content-lg-end { + -ms-flex-pack: end !important; + justify-content: flex-end !important; + } + .justify-content-lg-center { + -ms-flex-pack: center !important; + justify-content: center !important; + } + .justify-content-lg-between { + -ms-flex-pack: justify !important; + justify-content: space-between !important; + } + .justify-content-lg-around { + -ms-flex-pack: distribute !important; + justify-content: space-around !important; + } + .align-items-lg-start { + -ms-flex-align: start !important; + align-items: flex-start !important; + } + .align-items-lg-end { + -ms-flex-align: end !important; + align-items: flex-end !important; + } + .align-items-lg-center { + -ms-flex-align: center !important; + align-items: center !important; + } + .align-items-lg-baseline { + -ms-flex-align: baseline !important; + align-items: baseline !important; + } + .align-items-lg-stretch { + -ms-flex-align: stretch !important; + align-items: stretch !important; + } + .align-content-lg-start { + -ms-flex-line-pack: start !important; + align-content: flex-start !important; + } + .align-content-lg-end { + -ms-flex-line-pack: end !important; + align-content: flex-end !important; + } + .align-content-lg-center { + -ms-flex-line-pack: center !important; + align-content: center !important; + } + .align-content-lg-between { + -ms-flex-line-pack: justify !important; + align-content: space-between !important; + } + .align-content-lg-around { + -ms-flex-line-pack: distribute !important; + align-content: space-around !important; + } + .align-content-lg-stretch { + -ms-flex-line-pack: stretch !important; + align-content: stretch !important; + } + .align-self-lg-auto { + -ms-flex-item-align: auto !important; + align-self: auto !important; + } + .align-self-lg-start { + -ms-flex-item-align: start !important; + align-self: flex-start !important; + } + .align-self-lg-end { + -ms-flex-item-align: end !important; + align-self: flex-end !important; + } + .align-self-lg-center { + -ms-flex-item-align: center !important; + align-self: center !important; + } + .align-self-lg-baseline { + -ms-flex-item-align: baseline !important; + align-self: baseline !important; + } + .align-self-lg-stretch { + -ms-flex-item-align: stretch !important; + align-self: stretch !important; + } +} + +@media (min-width: 1200px) { + .flex-xl-row { + -ms-flex-direction: row !important; + flex-direction: row !important; + } + .flex-xl-column { + -ms-flex-direction: column !important; + flex-direction: column !important; + } + .flex-xl-row-reverse { + -ms-flex-direction: row-reverse !important; + flex-direction: row-reverse !important; + } + .flex-xl-column-reverse { + -ms-flex-direction: column-reverse !important; + flex-direction: column-reverse !important; + } + .flex-xl-wrap { + -ms-flex-wrap: wrap !important; + flex-wrap: wrap !important; + } + .flex-xl-nowrap { + -ms-flex-wrap: nowrap !important; + flex-wrap: nowrap !important; + } + .flex-xl-wrap-reverse { + -ms-flex-wrap: wrap-reverse !important; + flex-wrap: wrap-reverse !important; + } + .flex-xl-fill { + -ms-flex: 1 1 auto !important; + flex: 1 1 auto !important; + } + .flex-xl-grow-0 { + -ms-flex-positive: 0 !important; + flex-grow: 0 !important; + } + .flex-xl-grow-1 { + -ms-flex-positive: 1 !important; + flex-grow: 1 !important; + } + .flex-xl-shrink-0 { + -ms-flex-negative: 0 !important; + flex-shrink: 0 !important; + } + .flex-xl-shrink-1 { + -ms-flex-negative: 1 !important; + flex-shrink: 1 !important; + } + .justify-content-xl-start { + -ms-flex-pack: start !important; + justify-content: flex-start !important; + } + .justify-content-xl-end { + -ms-flex-pack: end !important; + justify-content: flex-end !important; + } + .justify-content-xl-center { + -ms-flex-pack: center !important; + justify-content: center !important; + } + .justify-content-xl-between { + -ms-flex-pack: justify !important; + justify-content: space-between !important; + } + .justify-content-xl-around { + -ms-flex-pack: distribute !important; + justify-content: space-around !important; + } + .align-items-xl-start { + -ms-flex-align: start !important; + align-items: flex-start !important; + } + .align-items-xl-end { + -ms-flex-align: end !important; + align-items: flex-end !important; + } + .align-items-xl-center { + -ms-flex-align: center !important; + align-items: center !important; + } + .align-items-xl-baseline { + -ms-flex-align: baseline !important; + align-items: baseline !important; + } + .align-items-xl-stretch { + -ms-flex-align: stretch !important; + align-items: stretch !important; + } + .align-content-xl-start { + -ms-flex-line-pack: start !important; + align-content: flex-start !important; + } + .align-content-xl-end { + -ms-flex-line-pack: end !important; + align-content: flex-end !important; + } + .align-content-xl-center { + -ms-flex-line-pack: center !important; + align-content: center !important; + } + .align-content-xl-between { + -ms-flex-line-pack: justify !important; + align-content: space-between !important; + } + .align-content-xl-around { + -ms-flex-line-pack: distribute !important; + align-content: space-around !important; + } + .align-content-xl-stretch { + -ms-flex-line-pack: stretch !important; + align-content: stretch !important; + } + .align-self-xl-auto { + -ms-flex-item-align: auto !important; + align-self: auto !important; + } + .align-self-xl-start { + -ms-flex-item-align: start !important; + align-self: flex-start !important; + } + .align-self-xl-end { + -ms-flex-item-align: end !important; + align-self: flex-end !important; + } + .align-self-xl-center { + -ms-flex-item-align: center !important; + align-self: center !important; + } + .align-self-xl-baseline { + -ms-flex-item-align: baseline !important; + align-self: baseline !important; + } + .align-self-xl-stretch { + -ms-flex-item-align: stretch !important; + align-self: stretch !important; + } +} + +.float-left { + float: left !important; +} + +.float-right { + float: right !important; +} + +.float-none { + float: none !important; +} + +@media (min-width: 576px) { + .float-sm-left { + float: left !important; + } + .float-sm-right { + float: right !important; + } + .float-sm-none { + float: none !important; + } +} + +@media (min-width: 768px) { + .float-md-left { + float: left !important; + } + .float-md-right { + float: right !important; + } + .float-md-none { + float: none !important; + } +} + +@media (min-width: 992px) { + .float-lg-left { + float: left !important; + } + .float-lg-right { + float: right !important; + } + .float-lg-none { + float: none !important; + } +} + +@media (min-width: 1200px) { + .float-xl-left { + float: left !important; + } + .float-xl-right { + float: right !important; + } + .float-xl-none { + float: none !important; + } +} + +.position-static { + position: static !important; +} + +.position-relative { + position: relative !important; +} + +.position-absolute { + position: absolute !important; +} + +.position-fixed { + position: fixed !important; +} + +.position-sticky { + position: -webkit-sticky !important; + position: sticky !important; +} + +.fixed-top { + position: fixed; + top: 0; + right: 0; + left: 0; + z-index: 1030; +} + +.fixed-bottom { + position: fixed; + right: 0; + bottom: 0; + left: 0; + z-index: 1030; +} + +@supports ((position: -webkit-sticky) or (position: sticky)) { + .sticky-top { + position: -webkit-sticky; + position: sticky; + top: 0; + z-index: 1020; + } +} + +.sr-only { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + overflow: hidden; + clip: rect(0, 0, 0, 0); + white-space: nowrap; + border: 0; +} + +.sr-only-focusable:active, .sr-only-focusable:focus { + position: static; + width: auto; + height: auto; + overflow: visible; + clip: auto; + white-space: normal; +} + +.shadow-sm { + box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important; +} + +.shadow { + box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important; +} + +.shadow-lg { + box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175) !important; +} + +.shadow-none { + box-shadow: none !important; +} + +.w-25 { + width: 25% !important; +} + +.w-50 { + width: 50% !important; +} + +.w-75 { + width: 75% !important; +} + +.w-100 { + width: 100% !important; +} + +.w-auto { + width: auto !important; +} + +.h-25 { + height: 25% !important; +} + +.h-50 { + height: 50% !important; +} + +.h-75 { + height: 75% !important; +} + +.h-100 { + height: 100% !important; +} + +.h-auto { + height: auto !important; +} + +.mw-100 { + max-width: 100% !important; +} + +.mh-100 { + max-height: 100% !important; +} + +.m-0 { + margin: 0 !important; +} + +.mt-0, +.my-0 { + margin-top: 0 !important; +} + +.mr-0, +.mx-0 { + margin-right: 0 !important; +} + +.mb-0, +.my-0 { + margin-bottom: 0 !important; +} + +.ml-0, +.mx-0 { + margin-left: 0 !important; +} + +.m-1 { + margin: 0.25rem !important; +} + +.mt-1, +.my-1 { + margin-top: 0.25rem !important; +} + +.mr-1, +.mx-1 { + margin-right: 0.25rem !important; +} + +.mb-1, +.my-1 { + margin-bottom: 0.25rem !important; +} + +.ml-1, +.mx-1 { + margin-left: 0.25rem !important; +} + +.m-2 { + margin: 0.5rem !important; +} + +.mt-2, +.my-2 { + margin-top: 0.5rem !important; +} + +.mr-2, +.mx-2 { + margin-right: 0.5rem !important; +} + +.mb-2, +.my-2 { + margin-bottom: 0.5rem !important; +} + +.ml-2, +.mx-2 { + margin-left: 0.5rem !important; +} + +.m-3 { + margin: 1rem !important; +} + +.mt-3, +.my-3 { + margin-top: 1rem !important; +} + +.mr-3, +.mx-3 { + margin-right: 1rem !important; +} + +.mb-3, +.my-3 { + margin-bottom: 1rem !important; +} + +.ml-3, +.mx-3 { + margin-left: 1rem !important; +} + +.m-4 { + margin: 1.5rem !important; +} + +.mt-4, +.my-4 { + margin-top: 1.5rem !important; +} + +.mr-4, +.mx-4 { + margin-right: 1.5rem !important; +} + +.mb-4, +.my-4 { + margin-bottom: 1.5rem !important; +} + +.ml-4, +.mx-4 { + margin-left: 1.5rem !important; +} + +.m-5 { + margin: 3rem !important; +} + +.mt-5, +.my-5 { + margin-top: 3rem !important; +} + +.mr-5, +.mx-5 { + margin-right: 3rem !important; +} + +.mb-5, +.my-5 { + margin-bottom: 3rem !important; +} + +.ml-5, +.mx-5 { + margin-left: 3rem !important; +} + +.p-0 { + padding: 0 !important; +} + +.pt-0, +.py-0 { + padding-top: 0 !important; +} + +.pr-0, +.px-0 { + padding-right: 0 !important; +} + +.pb-0, +.py-0 { + padding-bottom: 0 !important; +} + +.pl-0, +.px-0 { + padding-left: 0 !important; +} + +.p-1 { + padding: 0.25rem !important; +} + +.pt-1, +.py-1 { + padding-top: 0.25rem !important; +} + +.pr-1, +.px-1 { + padding-right: 0.25rem !important; +} + +.pb-1, +.py-1 { + padding-bottom: 0.25rem !important; +} + +.pl-1, +.px-1 { + padding-left: 0.25rem !important; +} + +.p-2 { + padding: 0.5rem !important; +} + +.pt-2, +.py-2 { + padding-top: 0.5rem !important; +} + +.pr-2, +.px-2 { + padding-right: 0.5rem !important; +} + +.pb-2, +.py-2 { + padding-bottom: 0.5rem !important; +} + +.pl-2, +.px-2 { + padding-left: 0.5rem !important; +} + +.p-3 { + padding: 1rem !important; +} + +.pt-3, +.py-3 { + padding-top: 1rem !important; +} + +.pr-3, +.px-3 { + padding-right: 1rem !important; +} + +.pb-3, +.py-3 { + padding-bottom: 1rem !important; +} + +.pl-3, +.px-3 { + padding-left: 1rem !important; +} + +.p-4 { + padding: 1.5rem !important; +} + +.pt-4, +.py-4 { + padding-top: 1.5rem !important; +} + +.pr-4, +.px-4 { + padding-right: 1.5rem !important; +} + +.pb-4, +.py-4 { + padding-bottom: 1.5rem !important; +} + +.pl-4, +.px-4 { + padding-left: 1.5rem !important; +} + +.p-5 { + padding: 3rem !important; +} + +.pt-5, +.py-5 { + padding-top: 3rem !important; +} + +.pr-5, +.px-5 { + padding-right: 3rem !important; +} + +.pb-5, +.py-5 { + padding-bottom: 3rem !important; +} + +.pl-5, +.px-5 { + padding-left: 3rem !important; +} + +.m-auto { + margin: auto !important; +} + +.mt-auto, +.my-auto { + margin-top: auto !important; +} + +.mr-auto, +.mx-auto { + margin-right: auto !important; +} + +.mb-auto, +.my-auto { + margin-bottom: auto !important; +} + +.ml-auto, +.mx-auto { + margin-left: auto !important; +} + +@media (min-width: 576px) { + .m-sm-0 { + margin: 0 !important; + } + .mt-sm-0, + .my-sm-0 { + margin-top: 0 !important; + } + .mr-sm-0, + .mx-sm-0 { + margin-right: 0 !important; + } + .mb-sm-0, + .my-sm-0 { + margin-bottom: 0 !important; + } + .ml-sm-0, + .mx-sm-0 { + margin-left: 0 !important; + } + .m-sm-1 { + margin: 0.25rem !important; + } + .mt-sm-1, + .my-sm-1 { + margin-top: 0.25rem !important; + } + .mr-sm-1, + .mx-sm-1 { + margin-right: 0.25rem !important; + } + .mb-sm-1, + .my-sm-1 { + margin-bottom: 0.25rem !important; + } + .ml-sm-1, + .mx-sm-1 { + margin-left: 0.25rem !important; + } + .m-sm-2 { + margin: 0.5rem !important; + } + .mt-sm-2, + .my-sm-2 { + margin-top: 0.5rem !important; + } + .mr-sm-2, + .mx-sm-2 { + margin-right: 0.5rem !important; + } + .mb-sm-2, + .my-sm-2 { + margin-bottom: 0.5rem !important; + } + .ml-sm-2, + .mx-sm-2 { + margin-left: 0.5rem !important; + } + .m-sm-3 { + margin: 1rem !important; + } + .mt-sm-3, + .my-sm-3 { + margin-top: 1rem !important; + } + .mr-sm-3, + .mx-sm-3 { + margin-right: 1rem !important; + } + .mb-sm-3, + .my-sm-3 { + margin-bottom: 1rem !important; + } + .ml-sm-3, + .mx-sm-3 { + margin-left: 1rem !important; + } + .m-sm-4 { + margin: 1.5rem !important; + } + .mt-sm-4, + .my-sm-4 { + margin-top: 1.5rem !important; + } + .mr-sm-4, + .mx-sm-4 { + margin-right: 1.5rem !important; + } + .mb-sm-4, + .my-sm-4 { + margin-bottom: 1.5rem !important; + } + .ml-sm-4, + .mx-sm-4 { + margin-left: 1.5rem !important; + } + .m-sm-5 { + margin: 3rem !important; + } + .mt-sm-5, + .my-sm-5 { + margin-top: 3rem !important; + } + .mr-sm-5, + .mx-sm-5 { + margin-right: 3rem !important; + } + .mb-sm-5, + .my-sm-5 { + margin-bottom: 3rem !important; + } + .ml-sm-5, + .mx-sm-5 { + margin-left: 3rem !important; + } + .p-sm-0 { + padding: 0 !important; + } + .pt-sm-0, + .py-sm-0 { + padding-top: 0 !important; + } + .pr-sm-0, + .px-sm-0 { + padding-right: 0 !important; + } + .pb-sm-0, + .py-sm-0 { + padding-bottom: 0 !important; + } + .pl-sm-0, + .px-sm-0 { + padding-left: 0 !important; + } + .p-sm-1 { + padding: 0.25rem !important; + } + .pt-sm-1, + .py-sm-1 { + padding-top: 0.25rem !important; + } + .pr-sm-1, + .px-sm-1 { + padding-right: 0.25rem !important; + } + .pb-sm-1, + .py-sm-1 { + padding-bottom: 0.25rem !important; + } + .pl-sm-1, + .px-sm-1 { + padding-left: 0.25rem !important; + } + .p-sm-2 { + padding: 0.5rem !important; + } + .pt-sm-2, + .py-sm-2 { + padding-top: 0.5rem !important; + } + .pr-sm-2, + .px-sm-2 { + padding-right: 0.5rem !important; + } + .pb-sm-2, + .py-sm-2 { + padding-bottom: 0.5rem !important; + } + .pl-sm-2, + .px-sm-2 { + padding-left: 0.5rem !important; + } + .p-sm-3 { + padding: 1rem !important; + } + .pt-sm-3, + .py-sm-3 { + padding-top: 1rem !important; + } + .pr-sm-3, + .px-sm-3 { + padding-right: 1rem !important; + } + .pb-sm-3, + .py-sm-3 { + padding-bottom: 1rem !important; + } + .pl-sm-3, + .px-sm-3 { + padding-left: 1rem !important; + } + .p-sm-4 { + padding: 1.5rem !important; + } + .pt-sm-4, + .py-sm-4 { + padding-top: 1.5rem !important; + } + .pr-sm-4, + .px-sm-4 { + padding-right: 1.5rem !important; + } + .pb-sm-4, + .py-sm-4 { + padding-bottom: 1.5rem !important; + } + .pl-sm-4, + .px-sm-4 { + padding-left: 1.5rem !important; + } + .p-sm-5 { + padding: 3rem !important; + } + .pt-sm-5, + .py-sm-5 { + padding-top: 3rem !important; + } + .pr-sm-5, + .px-sm-5 { + padding-right: 3rem !important; + } + .pb-sm-5, + .py-sm-5 { + padding-bottom: 3rem !important; + } + .pl-sm-5, + .px-sm-5 { + padding-left: 3rem !important; + } + .m-sm-auto { + margin: auto !important; + } + .mt-sm-auto, + .my-sm-auto { + margin-top: auto !important; + } + .mr-sm-auto, + .mx-sm-auto { + margin-right: auto !important; + } + .mb-sm-auto, + .my-sm-auto { + margin-bottom: auto !important; + } + .ml-sm-auto, + .mx-sm-auto { + margin-left: auto !important; + } +} + +@media (min-width: 768px) { + .m-md-0 { + margin: 0 !important; + } + .mt-md-0, + .my-md-0 { + margin-top: 0 !important; + } + .mr-md-0, + .mx-md-0 { + margin-right: 0 !important; + } + .mb-md-0, + .my-md-0 { + margin-bottom: 0 !important; + } + .ml-md-0, + .mx-md-0 { + margin-left: 0 !important; + } + .m-md-1 { + margin: 0.25rem !important; + } + .mt-md-1, + .my-md-1 { + margin-top: 0.25rem !important; + } + .mr-md-1, + .mx-md-1 { + margin-right: 0.25rem !important; + } + .mb-md-1, + .my-md-1 { + margin-bottom: 0.25rem !important; + } + .ml-md-1, + .mx-md-1 { + margin-left: 0.25rem !important; + } + .m-md-2 { + margin: 0.5rem !important; + } + .mt-md-2, + .my-md-2 { + margin-top: 0.5rem !important; + } + .mr-md-2, + .mx-md-2 { + margin-right: 0.5rem !important; + } + .mb-md-2, + .my-md-2 { + margin-bottom: 0.5rem !important; + } + .ml-md-2, + .mx-md-2 { + margin-left: 0.5rem !important; + } + .m-md-3 { + margin: 1rem !important; + } + .mt-md-3, + .my-md-3 { + margin-top: 1rem !important; + } + .mr-md-3, + .mx-md-3 { + margin-right: 1rem !important; + } + .mb-md-3, + .my-md-3 { + margin-bottom: 1rem !important; + } + .ml-md-3, + .mx-md-3 { + margin-left: 1rem !important; + } + .m-md-4 { + margin: 1.5rem !important; + } + .mt-md-4, + .my-md-4 { + margin-top: 1.5rem !important; + } + .mr-md-4, + .mx-md-4 { + margin-right: 1.5rem !important; + } + .mb-md-4, + .my-md-4 { + margin-bottom: 1.5rem !important; + } + .ml-md-4, + .mx-md-4 { + margin-left: 1.5rem !important; + } + .m-md-5 { + margin: 3rem !important; + } + .mt-md-5, + .my-md-5 { + margin-top: 3rem !important; + } + .mr-md-5, + .mx-md-5 { + margin-right: 3rem !important; + } + .mb-md-5, + .my-md-5 { + margin-bottom: 3rem !important; + } + .ml-md-5, + .mx-md-5 { + margin-left: 3rem !important; + } + .p-md-0 { + padding: 0 !important; + } + .pt-md-0, + .py-md-0 { + padding-top: 0 !important; + } + .pr-md-0, + .px-md-0 { + padding-right: 0 !important; + } + .pb-md-0, + .py-md-0 { + padding-bottom: 0 !important; + } + .pl-md-0, + .px-md-0 { + padding-left: 0 !important; + } + .p-md-1 { + padding: 0.25rem !important; + } + .pt-md-1, + .py-md-1 { + padding-top: 0.25rem !important; + } + .pr-md-1, + .px-md-1 { + padding-right: 0.25rem !important; + } + .pb-md-1, + .py-md-1 { + padding-bottom: 0.25rem !important; + } + .pl-md-1, + .px-md-1 { + padding-left: 0.25rem !important; + } + .p-md-2 { + padding: 0.5rem !important; + } + .pt-md-2, + .py-md-2 { + padding-top: 0.5rem !important; + } + .pr-md-2, + .px-md-2 { + padding-right: 0.5rem !important; + } + .pb-md-2, + .py-md-2 { + padding-bottom: 0.5rem !important; + } + .pl-md-2, + .px-md-2 { + padding-left: 0.5rem !important; + } + .p-md-3 { + padding: 1rem !important; + } + .pt-md-3, + .py-md-3 { + padding-top: 1rem !important; + } + .pr-md-3, + .px-md-3 { + padding-right: 1rem !important; + } + .pb-md-3, + .py-md-3 { + padding-bottom: 1rem !important; + } + .pl-md-3, + .px-md-3 { + padding-left: 1rem !important; + } + .p-md-4 { + padding: 1.5rem !important; + } + .pt-md-4, + .py-md-4 { + padding-top: 1.5rem !important; + } + .pr-md-4, + .px-md-4 { + padding-right: 1.5rem !important; + } + .pb-md-4, + .py-md-4 { + padding-bottom: 1.5rem !important; + } + .pl-md-4, + .px-md-4 { + padding-left: 1.5rem !important; + } + .p-md-5 { + padding: 3rem !important; + } + .pt-md-5, + .py-md-5 { + padding-top: 3rem !important; + } + .pr-md-5, + .px-md-5 { + padding-right: 3rem !important; + } + .pb-md-5, + .py-md-5 { + padding-bottom: 3rem !important; + } + .pl-md-5, + .px-md-5 { + padding-left: 3rem !important; + } + .m-md-auto { + margin: auto !important; + } + .mt-md-auto, + .my-md-auto { + margin-top: auto !important; + } + .mr-md-auto, + .mx-md-auto { + margin-right: auto !important; + } + .mb-md-auto, + .my-md-auto { + margin-bottom: auto !important; + } + .ml-md-auto, + .mx-md-auto { + margin-left: auto !important; + } +} + +@media (min-width: 992px) { + .m-lg-0 { + margin: 0 !important; + } + .mt-lg-0, + .my-lg-0 { + margin-top: 0 !important; + } + .mr-lg-0, + .mx-lg-0 { + margin-right: 0 !important; + } + .mb-lg-0, + .my-lg-0 { + margin-bottom: 0 !important; + } + .ml-lg-0, + .mx-lg-0 { + margin-left: 0 !important; + } + .m-lg-1 { + margin: 0.25rem !important; + } + .mt-lg-1, + .my-lg-1 { + margin-top: 0.25rem !important; + } + .mr-lg-1, + .mx-lg-1 { + margin-right: 0.25rem !important; + } + .mb-lg-1, + .my-lg-1 { + margin-bottom: 0.25rem !important; + } + .ml-lg-1, + .mx-lg-1 { + margin-left: 0.25rem !important; + } + .m-lg-2 { + margin: 0.5rem !important; + } + .mt-lg-2, + .my-lg-2 { + margin-top: 0.5rem !important; + } + .mr-lg-2, + .mx-lg-2 { + margin-right: 0.5rem !important; + } + .mb-lg-2, + .my-lg-2 { + margin-bottom: 0.5rem !important; + } + .ml-lg-2, + .mx-lg-2 { + margin-left: 0.5rem !important; + } + .m-lg-3 { + margin: 1rem !important; + } + .mt-lg-3, + .my-lg-3 { + margin-top: 1rem !important; + } + .mr-lg-3, + .mx-lg-3 { + margin-right: 1rem !important; + } + .mb-lg-3, + .my-lg-3 { + margin-bottom: 1rem !important; + } + .ml-lg-3, + .mx-lg-3 { + margin-left: 1rem !important; + } + .m-lg-4 { + margin: 1.5rem !important; + } + .mt-lg-4, + .my-lg-4 { + margin-top: 1.5rem !important; + } + .mr-lg-4, + .mx-lg-4 { + margin-right: 1.5rem !important; + } + .mb-lg-4, + .my-lg-4 { + margin-bottom: 1.5rem !important; + } + .ml-lg-4, + .mx-lg-4 { + margin-left: 1.5rem !important; + } + .m-lg-5 { + margin: 3rem !important; + } + .mt-lg-5, + .my-lg-5 { + margin-top: 3rem !important; + } + .mr-lg-5, + .mx-lg-5 { + margin-right: 3rem !important; + } + .mb-lg-5, + .my-lg-5 { + margin-bottom: 3rem !important; + } + .ml-lg-5, + .mx-lg-5 { + margin-left: 3rem !important; + } + .p-lg-0 { + padding: 0 !important; + } + .pt-lg-0, + .py-lg-0 { + padding-top: 0 !important; + } + .pr-lg-0, + .px-lg-0 { + padding-right: 0 !important; + } + .pb-lg-0, + .py-lg-0 { + padding-bottom: 0 !important; + } + .pl-lg-0, + .px-lg-0 { + padding-left: 0 !important; + } + .p-lg-1 { + padding: 0.25rem !important; + } + .pt-lg-1, + .py-lg-1 { + padding-top: 0.25rem !important; + } + .pr-lg-1, + .px-lg-1 { + padding-right: 0.25rem !important; + } + .pb-lg-1, + .py-lg-1 { + padding-bottom: 0.25rem !important; + } + .pl-lg-1, + .px-lg-1 { + padding-left: 0.25rem !important; + } + .p-lg-2 { + padding: 0.5rem !important; + } + .pt-lg-2, + .py-lg-2 { + padding-top: 0.5rem !important; + } + .pr-lg-2, + .px-lg-2 { + padding-right: 0.5rem !important; + } + .pb-lg-2, + .py-lg-2 { + padding-bottom: 0.5rem !important; + } + .pl-lg-2, + .px-lg-2 { + padding-left: 0.5rem !important; + } + .p-lg-3 { + padding: 1rem !important; + } + .pt-lg-3, + .py-lg-3 { + padding-top: 1rem !important; + } + .pr-lg-3, + .px-lg-3 { + padding-right: 1rem !important; + } + .pb-lg-3, + .py-lg-3 { + padding-bottom: 1rem !important; + } + .pl-lg-3, + .px-lg-3 { + padding-left: 1rem !important; + } + .p-lg-4 { + padding: 1.5rem !important; + } + .pt-lg-4, + .py-lg-4 { + padding-top: 1.5rem !important; + } + .pr-lg-4, + .px-lg-4 { + padding-right: 1.5rem !important; + } + .pb-lg-4, + .py-lg-4 { + padding-bottom: 1.5rem !important; + } + .pl-lg-4, + .px-lg-4 { + padding-left: 1.5rem !important; + } + .p-lg-5 { + padding: 3rem !important; + } + .pt-lg-5, + .py-lg-5 { + padding-top: 3rem !important; + } + .pr-lg-5, + .px-lg-5 { + padding-right: 3rem !important; + } + .pb-lg-5, + .py-lg-5 { + padding-bottom: 3rem !important; + } + .pl-lg-5, + .px-lg-5 { + padding-left: 3rem !important; + } + .m-lg-auto { + margin: auto !important; + } + .mt-lg-auto, + .my-lg-auto { + margin-top: auto !important; + } + .mr-lg-auto, + .mx-lg-auto { + margin-right: auto !important; + } + .mb-lg-auto, + .my-lg-auto { + margin-bottom: auto !important; + } + .ml-lg-auto, + .mx-lg-auto { + margin-left: auto !important; + } +} + +@media (min-width: 1200px) { + .m-xl-0 { + margin: 0 !important; + } + .mt-xl-0, + .my-xl-0 { + margin-top: 0 !important; + } + .mr-xl-0, + .mx-xl-0 { + margin-right: 0 !important; + } + .mb-xl-0, + .my-xl-0 { + margin-bottom: 0 !important; + } + .ml-xl-0, + .mx-xl-0 { + margin-left: 0 !important; + } + .m-xl-1 { + margin: 0.25rem !important; + } + .mt-xl-1, + .my-xl-1 { + margin-top: 0.25rem !important; + } + .mr-xl-1, + .mx-xl-1 { + margin-right: 0.25rem !important; + } + .mb-xl-1, + .my-xl-1 { + margin-bottom: 0.25rem !important; + } + .ml-xl-1, + .mx-xl-1 { + margin-left: 0.25rem !important; + } + .m-xl-2 { + margin: 0.5rem !important; + } + .mt-xl-2, + .my-xl-2 { + margin-top: 0.5rem !important; + } + .mr-xl-2, + .mx-xl-2 { + margin-right: 0.5rem !important; + } + .mb-xl-2, + .my-xl-2 { + margin-bottom: 0.5rem !important; + } + .ml-xl-2, + .mx-xl-2 { + margin-left: 0.5rem !important; + } + .m-xl-3 { + margin: 1rem !important; + } + .mt-xl-3, + .my-xl-3 { + margin-top: 1rem !important; + } + .mr-xl-3, + .mx-xl-3 { + margin-right: 1rem !important; + } + .mb-xl-3, + .my-xl-3 { + margin-bottom: 1rem !important; + } + .ml-xl-3, + .mx-xl-3 { + margin-left: 1rem !important; + } + .m-xl-4 { + margin: 1.5rem !important; + } + .mt-xl-4, + .my-xl-4 { + margin-top: 1.5rem !important; + } + .mr-xl-4, + .mx-xl-4 { + margin-right: 1.5rem !important; + } + .mb-xl-4, + .my-xl-4 { + margin-bottom: 1.5rem !important; + } + .ml-xl-4, + .mx-xl-4 { + margin-left: 1.5rem !important; + } + .m-xl-5 { + margin: 3rem !important; + } + .mt-xl-5, + .my-xl-5 { + margin-top: 3rem !important; + } + .mr-xl-5, + .mx-xl-5 { + margin-right: 3rem !important; + } + .mb-xl-5, + .my-xl-5 { + margin-bottom: 3rem !important; + } + .ml-xl-5, + .mx-xl-5 { + margin-left: 3rem !important; + } + .p-xl-0 { + padding: 0 !important; + } + .pt-xl-0, + .py-xl-0 { + padding-top: 0 !important; + } + .pr-xl-0, + .px-xl-0 { + padding-right: 0 !important; + } + .pb-xl-0, + .py-xl-0 { + padding-bottom: 0 !important; + } + .pl-xl-0, + .px-xl-0 { + padding-left: 0 !important; + } + .p-xl-1 { + padding: 0.25rem !important; + } + .pt-xl-1, + .py-xl-1 { + padding-top: 0.25rem !important; + } + .pr-xl-1, + .px-xl-1 { + padding-right: 0.25rem !important; + } + .pb-xl-1, + .py-xl-1 { + padding-bottom: 0.25rem !important; + } + .pl-xl-1, + .px-xl-1 { + padding-left: 0.25rem !important; + } + .p-xl-2 { + padding: 0.5rem !important; + } + .pt-xl-2, + .py-xl-2 { + padding-top: 0.5rem !important; + } + .pr-xl-2, + .px-xl-2 { + padding-right: 0.5rem !important; + } + .pb-xl-2, + .py-xl-2 { + padding-bottom: 0.5rem !important; + } + .pl-xl-2, + .px-xl-2 { + padding-left: 0.5rem !important; + } + .p-xl-3 { + padding: 1rem !important; + } + .pt-xl-3, + .py-xl-3 { + padding-top: 1rem !important; + } + .pr-xl-3, + .px-xl-3 { + padding-right: 1rem !important; + } + .pb-xl-3, + .py-xl-3 { + padding-bottom: 1rem !important; + } + .pl-xl-3, + .px-xl-3 { + padding-left: 1rem !important; + } + .p-xl-4 { + padding: 1.5rem !important; + } + .pt-xl-4, + .py-xl-4 { + padding-top: 1.5rem !important; + } + .pr-xl-4, + .px-xl-4 { + padding-right: 1.5rem !important; + } + .pb-xl-4, + .py-xl-4 { + padding-bottom: 1.5rem !important; + } + .pl-xl-4, + .px-xl-4 { + padding-left: 1.5rem !important; + } + .p-xl-5 { + padding: 3rem !important; + } + .pt-xl-5, + .py-xl-5 { + padding-top: 3rem !important; + } + .pr-xl-5, + .px-xl-5 { + padding-right: 3rem !important; + } + .pb-xl-5, + .py-xl-5 { + padding-bottom: 3rem !important; + } + .pl-xl-5, + .px-xl-5 { + padding-left: 3rem !important; + } + .m-xl-auto { + margin: auto !important; + } + .mt-xl-auto, + .my-xl-auto { + margin-top: auto !important; + } + .mr-xl-auto, + .mx-xl-auto { + margin-right: auto !important; + } + .mb-xl-auto, + .my-xl-auto { + margin-bottom: auto !important; + } + .ml-xl-auto, + .mx-xl-auto { + margin-left: auto !important; + } +} + +.text-monospace { + font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; +} + +.text-justify { + text-align: justify !important; +} + +.text-nowrap { + white-space: nowrap !important; +} + +.text-truncate { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.text-left { + text-align: left !important; +} + +.text-right { + text-align: right !important; +} + +.text-center { + text-align: center !important; +} + +@media (min-width: 576px) { + .text-sm-left { + text-align: left !important; + } + .text-sm-right { + text-align: right !important; + } + .text-sm-center { + text-align: center !important; + } +} + +@media (min-width: 768px) { + .text-md-left { + text-align: left !important; + } + .text-md-right { + text-align: right !important; + } + .text-md-center { + text-align: center !important; + } +} + +@media (min-width: 992px) { + .text-lg-left { + text-align: left !important; + } + .text-lg-right { + text-align: right !important; + } + .text-lg-center { + text-align: center !important; + } +} + +@media (min-width: 1200px) { + .text-xl-left { + text-align: left !important; + } + .text-xl-right { + text-align: right !important; + } + .text-xl-center { + text-align: center !important; + } +} + +.text-lowercase { + text-transform: lowercase !important; +} + +.text-uppercase { + text-transform: uppercase !important; +} + +.text-capitalize { + text-transform: capitalize !important; +} + +.font-weight-light { + font-weight: 300 !important; +} + +.font-weight-normal { + font-weight: 400 !important; +} + +.font-weight-bold { + font-weight: 700 !important; +} + +.font-italic { + font-style: italic !important; +} + +.text-white { + color: #fff !important; +} + +.text-primary { + color: #007bff !important; +} + +a.text-primary:hover, a.text-primary:focus { + color: #0062cc !important; +} + +.text-secondary { + color: #6c757d !important; +} + +a.text-secondary:hover, a.text-secondary:focus { + color: #545b62 !important; +} + +.text-success { + color: #28a745 !important; +} + +a.text-success:hover, a.text-success:focus { + color: #1e7e34 !important; +} + +.text-info { + color: #17a2b8 !important; +} + +a.text-info:hover, a.text-info:focus { + color: #117a8b !important; +} + +.text-warning { + color: #ffc107 !important; +} + +a.text-warning:hover, a.text-warning:focus { + color: #d39e00 !important; +} + +.text-danger { + color: #dc3545 !important; +} + +a.text-danger:hover, a.text-danger:focus { + color: #bd2130 !important; +} + +.text-light { + color: #f8f9fa !important; +} + +a.text-light:hover, a.text-light:focus { + color: #dae0e5 !important; +} + +.text-dark { + color: #343a40 !important; +} + +a.text-dark:hover, a.text-dark:focus { + color: #1d2124 !important; +} + +.text-body { + color: #212529 !important; +} + +.text-muted { + color: #6c757d !important; +} + +.text-black-50 { + color: rgba(0, 0, 0, 0.5) !important; +} + +.text-white-50 { + color: rgba(255, 255, 255, 0.5) !important; +} + +.text-hide { + font: 0/0 a; + color: transparent; + text-shadow: none; + background-color: transparent; + border: 0; +} + +.visible { + visibility: visible !important; +} + +.invisible { + visibility: hidden !important; +} + +@media print { + *, + *::before, + *::after { + text-shadow: none !important; + box-shadow: none !important; + } + a:not(.btn) { + text-decoration: underline; + } + abbr[title]::after { + content: " (" attr(title) ")"; + } + pre { + white-space: pre-wrap !important; + } + pre, + blockquote { + border: 1px solid #adb5bd; + page-break-inside: avoid; + } + thead { + display: table-header-group; + } + tr, + img { + page-break-inside: avoid; + } + p, + h2, + h3 { + orphans: 3; + widows: 3; + } + h2, + h3 { + page-break-after: avoid; + } + @page { + size: a3; + } + body { + min-width: 992px !important; + } + .container { + min-width: 992px !important; + } + .navbar { + display: none; + } + .badge { + border: 1px solid #000; + } + .table { + border-collapse: collapse !important; + } + .table td, + .table th { + background-color: #fff !important; + } + .table-bordered th, + .table-bordered td { + border: 1px solid #dee2e6 !important; + } + .table-dark { + color: inherit; + } + .table-dark th, + .table-dark td, + .table-dark thead th, + .table-dark tbody + tbody { + border-color: #dee2e6; + } + .table .thead-dark th { + color: inherit; + border-color: #dee2e6; + } +} +/*# sourceMappingURL=bootstrap.css.map */ \ No newline at end of file diff --git a/public/favicon.ico b/public/favicon.ico new file mode 100644 index 0000000..e69de29 diff --git a/public/index.php b/public/index.php new file mode 100644 index 0000000..1e1d775 --- /dev/null +++ b/public/index.php @@ -0,0 +1,58 @@ + + */ + +/* +|-------------------------------------------------------------------------- +| Register The Auto Loader +|-------------------------------------------------------------------------- +| +| Composer provides a convenient, automatically generated class loader for +| our application. We just need to utilize it! We'll simply require it +| into the script here so that we don't have to worry about manual +| loading any of our classes later on. It feels great to relax. +| +*/ + +require __DIR__.'/../bootstrap/autoload.php'; + +/* +|-------------------------------------------------------------------------- +| Turn On The Lights +|-------------------------------------------------------------------------- +| +| We need to illuminate PHP development, so let us turn on the lights. +| This bootstraps the framework and gets it ready for use, then it +| will load up this application so that we can run it and send +| the responses back to the browser and delight our users. +| +*/ + +$app = require_once __DIR__.'/../bootstrap/app.php'; + +/* +|-------------------------------------------------------------------------- +| Run The Application +|-------------------------------------------------------------------------- +| +| Once we have the application, we can handle the incoming request +| through the kernel, and send the associated response back to +| the client's browser allowing them to enjoy the creative +| and wonderful application we have prepared for them. +| +*/ + +$kernel = $app->make(Illuminate\Contracts\Http\Kernel::class); + +$response = $kernel->handle( + $request = Illuminate\Http\Request::capture() +); + +$response->send(); + +$kernel->terminate($request, $response); diff --git a/public/js/app.js b/public/js/app.js new file mode 100644 index 0000000..af41976 --- /dev/null +++ b/public/js/app.js @@ -0,0 +1,34 @@ +!function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var n={};e.m=t,e.c=n,e.i=function(t){return t},e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=39)}([function(t,e,n){"use strict";function r(t){return"[object Array]"===C.call(t)}function i(t){return"[object ArrayBuffer]"===C.call(t)}function o(t){return"undefined"!=typeof FormData&&t instanceof FormData}function a(t){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&t.buffer instanceof ArrayBuffer}function s(t){return"string"==typeof t}function u(t){return"number"==typeof t}function c(t){return void 0===t}function l(t){return null!==t&&"object"==typeof t}function f(t){return"[object Date]"===C.call(t)}function p(t){return"[object File]"===C.call(t)}function d(t){return"[object Blob]"===C.call(t)}function h(t){return"[object Function]"===C.call(t)}function v(t){return l(t)&&h(t.pipe)}function g(t){return"undefined"!=typeof URLSearchParams&&t instanceof URLSearchParams}function m(t){return t.replace(/^\s*/,"").replace(/\s*$/,"")}function y(){return"undefined"!=typeof window&&"undefined"!=typeof document&&"function"==typeof document.createElement}function b(t,e){if(null!==t&&void 0!==t)if("object"==typeof t||r(t)||(t=[t]),r(t))for(var n=0,i=t.length;n=200&&t<300}};s.headers={common:{Accept:"application/json, text/plain, */*"}},i.forEach(["delete","get","head"],function(t){s.headers[t]={}}),i.forEach(["post","put","patch"],function(t){s.headers[t]=i.merge(a)}),t.exports=s}).call(e,n(33))},function(t,e,n){"use strict";var r=n(0),i=n(17),o=n(20),a=n(26),s=n(24),u=n(5),c="undefined"!=typeof window&&window.btoa&&window.btoa.bind(window)||n(19);t.exports=function(t){return new Promise(function(e,l){var f=t.data,p=t.headers;r.isFormData(f)&&delete p["Content-Type"];var d=new XMLHttpRequest,h="onreadystatechange",v=!1;if("undefined"==typeof window||!window.XDomainRequest||"withCredentials"in d||s(t.url)||(d=new window.XDomainRequest,h="onload",v=!0,d.onprogress=function(){},d.ontimeout=function(){}),t.auth){var g=t.auth.username||"",m=t.auth.password||"";p.Authorization="Basic "+c(g+":"+m)}if(d.open(t.method.toUpperCase(),o(t.url,t.params,t.paramsSerializer),!0),d.timeout=t.timeout,d[h]=function(){if(d&&(4===d.readyState||v)&&(0!==d.status||d.responseURL&&0===d.responseURL.indexOf("file:"))){var n="getAllResponseHeaders"in d?a(d.getAllResponseHeaders()):null,r=t.responseType&&"text"!==t.responseType?d.response:d.responseText,o={data:r,status:1223===d.status?204:d.status,statusText:1223===d.status?"No Content":d.statusText,headers:n,config:t,request:d};i(e,l,o),d=null}},d.onerror=function(){l(u("Network Error",t)),d=null},d.ontimeout=function(){l(u("timeout of "+t.timeout+"ms exceeded",t,"ECONNABORTED")),d=null},r.isStandardBrowserEnv()){var y=n(22),b=(t.withCredentials||s(t.url))&&t.xsrfCookieName?y.read(t.xsrfCookieName):void 0;b&&(p[t.xsrfHeaderName]=b)}if("setRequestHeader"in d&&r.forEach(p,function(t,e){void 0===f&&"content-type"===e.toLowerCase()?delete p[e]:d.setRequestHeader(e,t)}),t.withCredentials&&(d.withCredentials=!0),t.responseType)try{d.responseType=t.responseType}catch(t){if("json"!==d.responseType)throw t}"function"==typeof t.onDownloadProgress&&d.addEventListener("progress",t.onDownloadProgress),"function"==typeof t.onUploadProgress&&d.upload&&d.upload.addEventListener("progress",t.onUploadProgress),t.cancelToken&&t.cancelToken.promise.then(function(t){d&&(d.abort(),l(t),d=null)}),void 0===f&&(f=null),d.send(f)})}},function(t,e,n){"use strict";function r(t){this.message=t}r.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},r.prototype.__CANCEL__=!0,t.exports=r},function(t,e,n){"use strict";t.exports=function(t){return!(!t||!t.__CANCEL__)}},function(t,e,n){"use strict";var r=n(16);t.exports=function(t,e,n,i){var o=new Error(t);return r(o,e,n,i)}},function(t,e,n){"use strict";t.exports=function(t,e){return function(){for(var n=new Array(arguments.length),r=0;r>8-s%1*8)){if((n=i.charCodeAt(s+=.75))>255)throw new r;e=e<<8|n}return a}var o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";r.prototype=new Error,r.prototype.code=5,r.prototype.name="InvalidCharacterError",t.exports=i},function(t,e,n){"use strict";function r(t){return encodeURIComponent(t).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var i=n(0);t.exports=function(t,e,n){if(!e)return t;var o;if(n)o=n(e);else if(i.isURLSearchParams(e))o=e.toString();else{var a=[];i.forEach(e,function(t,e){null!==t&&void 0!==t&&(i.isArray(t)&&(e+="[]"),i.isArray(t)||(t=[t]),i.forEach(t,function(t){i.isDate(t)?t=t.toISOString():i.isObject(t)&&(t=JSON.stringify(t)),a.push(r(e)+"="+r(t))}))}),o=a.join("&")}return o&&(t+=(-1===t.indexOf("?")?"?":"&")+o),t}},function(t,e,n){"use strict";t.exports=function(t,e){return t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,"")}},function(t,e,n){"use strict";var r=n(0);t.exports=r.isStandardBrowserEnv()?function(){return{write:function(t,e,n,i,o,a){var s=[];s.push(t+"="+encodeURIComponent(e)),r.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),r.isString(i)&&s.push("path="+i),r.isString(o)&&s.push("domain="+o),!0===a&&s.push("secure"),document.cookie=s.join("; ")},read:function(t){var e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}()},function(t,e,n){"use strict";t.exports=function(t){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(t)}},function(t,e,n){"use strict";var r=n(0);t.exports=r.isStandardBrowserEnv()?function(){function t(t){var e=t;return n&&(i.setAttribute("href",e),e=i.href),i.setAttribute("href",e),{href:i.href,protocol:i.protocol?i.protocol.replace(/:$/,""):"",host:i.host,search:i.search?i.search.replace(/^\?/,""):"",hash:i.hash?i.hash.replace(/^#/,""):"",hostname:i.hostname,port:i.port,pathname:"/"===i.pathname.charAt(0)?i.pathname:"/"+i.pathname}}var e,n=/(msie|trident)/i.test(navigator.userAgent),i=document.createElement("a");return e=t(window.location.href),function(n){var i=r.isString(n)?t(n):n;return i.protocol===e.protocol&&i.host===e.host}}():function(){return function(){return!0}}()},function(t,e,n){"use strict";var r=n(0);t.exports=function(t,e){r.forEach(t,function(n,r){r!==e&&r.toUpperCase()===e.toUpperCase()&&(t[e]=n,delete t[r])})}},function(t,e,n){"use strict";var r=n(0);t.exports=function(t){var e,n,i,o={};return t?(r.forEach(t.split("\n"),function(t){i=t.indexOf(":"),e=r.trim(t.substr(0,i)).toLowerCase(),n=r.trim(t.substr(i+1)),e&&(o[e]=o[e]?o[e]+", "+n:n)}),o):o}},function(t,e,n){"use strict";t.exports=function(t){return function(e){return t.apply(null,e)}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={mounted:function(){}}},function(t,e,n){window._=n(32);try{window.$=window.jQuery=n(31),n(30)}catch(t){}window.axios=n(10),window.axios.defaults.headers.common["X-Requested-With"]="XMLHttpRequest";var r=document.head.querySelector('meta[name="csrf-token"]');r&&(window.axios.defaults.headers.common["X-CSRF-TOKEN"]=r.content)},function(t,e){/*! + * Bootstrap v3.3.7 (http://getbootstrap.com) + * Copyright 2011-2016 Twitter, Inc. + * Licensed under the MIT license + */ +if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(t){"use strict";var e=t.fn.jquery.split(" ")[0].split(".");if(e[0]<2&&e[1]<9||1==e[0]&&9==e[1]&&e[2]<1||e[0]>3)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4")}(jQuery),function(t){"use strict";function e(){var t=document.createElement("bootstrap"),e={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var n in e)if(void 0!==t.style[n])return{end:e[n]};return!1}t.fn.emulateTransitionEnd=function(e){var n=!1,r=this;t(this).one("bsTransitionEnd",function(){n=!0});var i=function(){n||t(r).trigger(t.support.transition.end)};return setTimeout(i,e),this},t(function(){t.support.transition=e(),t.support.transition&&(t.event.special.bsTransitionEnd={bindType:t.support.transition.end,delegateType:t.support.transition.end,handle:function(e){if(t(e.target).is(this))return e.handleObj.handler.apply(this,arguments)}})})}(jQuery),function(t){"use strict";function e(e){return this.each(function(){var n=t(this),i=n.data("bs.alert");i||n.data("bs.alert",i=new r(this)),"string"==typeof e&&i[e].call(n)})}var n='[data-dismiss="alert"]',r=function(e){t(e).on("click",n,this.close)};r.VERSION="3.3.7",r.TRANSITION_DURATION=150,r.prototype.close=function(e){function n(){a.detach().trigger("closed.bs.alert").remove()}var i=t(this),o=i.attr("data-target");o||(o=i.attr("href"),o=o&&o.replace(/.*(?=#[^\s]*$)/,""));var a=t("#"===o?[]:o);e&&e.preventDefault(),a.length||(a=i.closest(".alert")),a.trigger(e=t.Event("close.bs.alert")),e.isDefaultPrevented()||(a.removeClass("in"),t.support.transition&&a.hasClass("fade")?a.one("bsTransitionEnd",n).emulateTransitionEnd(r.TRANSITION_DURATION):n())};var i=t.fn.alert;t.fn.alert=e,t.fn.alert.Constructor=r,t.fn.alert.noConflict=function(){return t.fn.alert=i,this},t(document).on("click.bs.alert.data-api",n,r.prototype.close)}(jQuery),function(t){"use strict";function e(e){return this.each(function(){var r=t(this),i=r.data("bs.button"),o="object"==typeof e&&e;i||r.data("bs.button",i=new n(this,o)),"toggle"==e?i.toggle():e&&i.setState(e)})}var n=function(e,r){this.$element=t(e),this.options=t.extend({},n.DEFAULTS,r),this.isLoading=!1};n.VERSION="3.3.7",n.DEFAULTS={loadingText:"loading..."},n.prototype.setState=function(e){var n="disabled",r=this.$element,i=r.is("input")?"val":"html",o=r.data();e+="Text",null==o.resetText&&r.data("resetText",r[i]()),setTimeout(t.proxy(function(){r[i](null==o[e]?this.options[e]:o[e]),"loadingText"==e?(this.isLoading=!0,r.addClass(n).attr(n,n).prop(n,!0)):this.isLoading&&(this.isLoading=!1,r.removeClass(n).removeAttr(n).prop(n,!1))},this),0)},n.prototype.toggle=function(){var t=!0,e=this.$element.closest('[data-toggle="buttons"]');if(e.length){var n=this.$element.find("input");"radio"==n.prop("type")?(n.prop("checked")&&(t=!1),e.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==n.prop("type")&&(n.prop("checked")!==this.$element.hasClass("active")&&(t=!1),this.$element.toggleClass("active")),n.prop("checked",this.$element.hasClass("active")),t&&n.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var r=t.fn.button;t.fn.button=e,t.fn.button.Constructor=n,t.fn.button.noConflict=function(){return t.fn.button=r,this},t(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(n){var r=t(n.target).closest(".btn");e.call(r,"toggle"),t(n.target).is('input[type="radio"], input[type="checkbox"]')||(n.preventDefault(),r.is("input,button")?r.trigger("focus"):r.find("input:visible,button:visible").first().trigger("focus"))}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(e){t(e.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(e.type))})}(jQuery),function(t){"use strict";function e(e){return this.each(function(){var r=t(this),i=r.data("bs.carousel"),o=t.extend({},n.DEFAULTS,r.data(),"object"==typeof e&&e),a="string"==typeof e?e:o.slide;i||r.data("bs.carousel",i=new n(this,o)),"number"==typeof e?i.to(e):a?i[a]():o.interval&&i.pause().cycle()})}var n=function(e,n){this.$element=t(e),this.$indicators=this.$element.find(".carousel-indicators"),this.options=n,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",t.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",t.proxy(this.pause,this)).on("mouseleave.bs.carousel",t.proxy(this.cycle,this))};n.VERSION="3.3.7",n.TRANSITION_DURATION=600,n.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},n.prototype.keydown=function(t){if(!/input|textarea/i.test(t.target.tagName)){switch(t.which){case 37:this.prev();break;case 39:this.next();break;default:return}t.preventDefault()}},n.prototype.cycle=function(e){return e||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(t.proxy(this.next,this),this.options.interval)),this},n.prototype.getItemIndex=function(t){return this.$items=t.parent().children(".item"),this.$items.index(t||this.$active)},n.prototype.getItemForDirection=function(t,e){var n=this.getItemIndex(e);if(("prev"==t&&0===n||"next"==t&&n==this.$items.length-1)&&!this.options.wrap)return e;var r="prev"==t?-1:1,i=(n+r)%this.$items.length;return this.$items.eq(i)},n.prototype.to=function(t){var e=this,n=this.getItemIndex(this.$active=this.$element.find(".item.active"));if(!(t>this.$items.length-1||t<0))return this.sliding?this.$element.one("slid.bs.carousel",function(){e.to(t)}):n==t?this.pause().cycle():this.slide(t>n?"next":"prev",this.$items.eq(t))},n.prototype.pause=function(e){return e||(this.paused=!0),this.$element.find(".next, .prev").length&&t.support.transition&&(this.$element.trigger(t.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},n.prototype.next=function(){if(!this.sliding)return this.slide("next")},n.prototype.prev=function(){if(!this.sliding)return this.slide("prev")},n.prototype.slide=function(e,r){var i=this.$element.find(".item.active"),o=r||this.getItemForDirection(e,i),a=this.interval,s="next"==e?"left":"right",u=this;if(o.hasClass("active"))return this.sliding=!1;var c=o[0],l=t.Event("slide.bs.carousel",{relatedTarget:c,direction:s});if(this.$element.trigger(l),!l.isDefaultPrevented()){if(this.sliding=!0,a&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var f=t(this.$indicators.children()[this.getItemIndex(o)]);f&&f.addClass("active")}var p=t.Event("slid.bs.carousel",{relatedTarget:c,direction:s});return t.support.transition&&this.$element.hasClass("slide")?(o.addClass(e),o[0].offsetWidth,i.addClass(s),o.addClass(s),i.one("bsTransitionEnd",function(){o.removeClass([e,s].join(" ")).addClass("active"),i.removeClass(["active",s].join(" ")),u.sliding=!1,setTimeout(function(){u.$element.trigger(p)},0)}).emulateTransitionEnd(n.TRANSITION_DURATION)):(i.removeClass("active"),o.addClass("active"),this.sliding=!1,this.$element.trigger(p)),a&&this.cycle(),this}};var r=t.fn.carousel;t.fn.carousel=e,t.fn.carousel.Constructor=n,t.fn.carousel.noConflict=function(){return t.fn.carousel=r,this};var i=function(n){var r,i=t(this),o=t(i.attr("data-target")||(r=i.attr("href"))&&r.replace(/.*(?=#[^\s]+$)/,""));if(o.hasClass("carousel")){var a=t.extend({},o.data(),i.data()),s=i.attr("data-slide-to");s&&(a.interval=!1),e.call(o,a),s&&o.data("bs.carousel").to(s),n.preventDefault()}};t(document).on("click.bs.carousel.data-api","[data-slide]",i).on("click.bs.carousel.data-api","[data-slide-to]",i),t(window).on("load",function(){t('[data-ride="carousel"]').each(function(){var n=t(this);e.call(n,n.data())})})}(jQuery),function(t){"use strict";function e(e){var n,r=e.attr("data-target")||(n=e.attr("href"))&&n.replace(/.*(?=#[^\s]+$)/,"");return t(r)}function n(e){return this.each(function(){var n=t(this),i=n.data("bs.collapse"),o=t.extend({},r.DEFAULTS,n.data(),"object"==typeof e&&e);!i&&o.toggle&&/show|hide/.test(e)&&(o.toggle=!1),i||n.data("bs.collapse",i=new r(this,o)),"string"==typeof e&&i[e]()})}var r=function(e,n){this.$element=t(e),this.options=t.extend({},r.DEFAULTS,n),this.$trigger=t('[data-toggle="collapse"][href="#'+e.id+'"],[data-toggle="collapse"][data-target="#'+e.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};r.VERSION="3.3.7",r.TRANSITION_DURATION=350,r.DEFAULTS={toggle:!0},r.prototype.dimension=function(){return this.$element.hasClass("width")?"width":"height"},r.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var e,i=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(i&&i.length&&(e=i.data("bs.collapse"))&&e.transitioning)){var o=t.Event("show.bs.collapse");if(this.$element.trigger(o),!o.isDefaultPrevented()){i&&i.length&&(n.call(i,"hide"),e||i.data("bs.collapse",null));var a=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[a](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var s=function(){this.$element.removeClass("collapsing").addClass("collapse in")[a](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!t.support.transition)return s.call(this);var u=t.camelCase(["scroll",a].join("-"));this.$element.one("bsTransitionEnd",t.proxy(s,this)).emulateTransitionEnd(r.TRANSITION_DURATION)[a](this.$element[0][u])}}}},r.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var e=t.Event("hide.bs.collapse");if(this.$element.trigger(e),!e.isDefaultPrevented()){var n=this.dimension();this.$element[n](this.$element[n]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var i=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};if(!t.support.transition)return i.call(this);this.$element[n](0).one("bsTransitionEnd",t.proxy(i,this)).emulateTransitionEnd(r.TRANSITION_DURATION)}}},r.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},r.prototype.getParent=function(){return t(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(t.proxy(function(n,r){var i=t(r);this.addAriaAndCollapsedClass(e(i),i)},this)).end()},r.prototype.addAriaAndCollapsedClass=function(t,e){var n=t.hasClass("in");t.attr("aria-expanded",n),e.toggleClass("collapsed",!n).attr("aria-expanded",n)};var i=t.fn.collapse;t.fn.collapse=n,t.fn.collapse.Constructor=r,t.fn.collapse.noConflict=function(){return t.fn.collapse=i,this},t(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(r){var i=t(this);i.attr("data-target")||r.preventDefault();var o=e(i),a=o.data("bs.collapse"),s=a?"toggle":i.data();n.call(o,s)})}(jQuery),function(t){"use strict";function e(e){var n=e.attr("data-target");n||(n=e.attr("href"),n=n&&/#[A-Za-z]/.test(n)&&n.replace(/.*(?=#[^\s]*$)/,""));var r=n&&t(n);return r&&r.length?r:e.parent()}function n(n){n&&3===n.which||(t(i).remove(),t(o).each(function(){var r=t(this),i=e(r),o={relatedTarget:this};i.hasClass("open")&&(n&&"click"==n.type&&/input|textarea/i.test(n.target.tagName)&&t.contains(i[0],n.target)||(i.trigger(n=t.Event("hide.bs.dropdown",o)),n.isDefaultPrevented()||(r.attr("aria-expanded","false"),i.removeClass("open").trigger(t.Event("hidden.bs.dropdown",o)))))}))}function r(e){return this.each(function(){var n=t(this),r=n.data("bs.dropdown");r||n.data("bs.dropdown",r=new a(this)),"string"==typeof e&&r[e].call(n)})}var i=".dropdown-backdrop",o='[data-toggle="dropdown"]',a=function(e){t(e).on("click.bs.dropdown",this.toggle)};a.VERSION="3.3.7",a.prototype.toggle=function(r){var i=t(this);if(!i.is(".disabled, :disabled")){var o=e(i),a=o.hasClass("open");if(n(),!a){"ontouchstart"in document.documentElement&&!o.closest(".navbar-nav").length&&t(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(t(this)).on("click",n);var s={relatedTarget:this};if(o.trigger(r=t.Event("show.bs.dropdown",s)),r.isDefaultPrevented())return;i.trigger("focus").attr("aria-expanded","true"),o.toggleClass("open").trigger(t.Event("shown.bs.dropdown",s))}return!1}},a.prototype.keydown=function(n){if(/(38|40|27|32)/.test(n.which)&&!/input|textarea/i.test(n.target.tagName)){var r=t(this);if(n.preventDefault(),n.stopPropagation(),!r.is(".disabled, :disabled")){var i=e(r),a=i.hasClass("open");if(!a&&27!=n.which||a&&27==n.which)return 27==n.which&&i.find(o).trigger("focus"),r.trigger("click");var s=i.find(".dropdown-menu li:not(.disabled):visible a");if(s.length){var u=s.index(n.target);38==n.which&&u>0&&u--,40==n.which&&udocument.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&t?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!t?this.scrollbarWidth:""})},n.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},n.prototype.checkScrollbar=function(){var t=window.innerWidth;if(!t){var e=document.documentElement.getBoundingClientRect();t=e.right-Math.abs(e.left)}this.bodyIsOverflowing=document.body.clientWidth
',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},n.prototype.init=function(e,n,r){if(this.enabled=!0,this.type=e,this.$element=t(n),this.options=this.getOptions(r),this.$viewport=this.options.viewport&&t(t.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var i=this.options.trigger.split(" "),o=i.length;o--;){var a=i[o];if("click"==a)this.$element.on("click."+this.type,this.options.selector,t.proxy(this.toggle,this));else if("manual"!=a){var s="hover"==a?"mouseenter":"focusin",u="hover"==a?"mouseleave":"focusout";this.$element.on(s+"."+this.type,this.options.selector,t.proxy(this.enter,this)),this.$element.on(u+"."+this.type,this.options.selector,t.proxy(this.leave,this))}}this.options.selector?this._options=t.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},n.prototype.getDefaults=function(){return n.DEFAULTS},n.prototype.getOptions=function(e){return e=t.extend({},this.getDefaults(),this.$element.data(),e),e.delay&&"number"==typeof e.delay&&(e.delay={show:e.delay,hide:e.delay}),e},n.prototype.getDelegateOptions=function(){var e={},n=this.getDefaults();return this._options&&t.each(this._options,function(t,r){n[t]!=r&&(e[t]=r)}),e},n.prototype.enter=function(e){var n=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);return n||(n=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,n)),e instanceof t.Event&&(n.inState["focusin"==e.type?"focus":"hover"]=!0),n.tip().hasClass("in")||"in"==n.hoverState?void(n.hoverState="in"):(clearTimeout(n.timeout),n.hoverState="in",n.options.delay&&n.options.delay.show?void(n.timeout=setTimeout(function(){"in"==n.hoverState&&n.show()},n.options.delay.show)):n.show())},n.prototype.isInStateTrue=function(){for(var t in this.inState)if(this.inState[t])return!0;return!1},n.prototype.leave=function(e){var n=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);if(n||(n=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,n)),e instanceof t.Event&&(n.inState["focusout"==e.type?"focus":"hover"]=!1),!n.isInStateTrue()){if(clearTimeout(n.timeout),n.hoverState="out",!n.options.delay||!n.options.delay.hide)return n.hide();n.timeout=setTimeout(function(){"out"==n.hoverState&&n.hide()},n.options.delay.hide)}},n.prototype.show=function(){var e=t.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(e);var r=t.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(e.isDefaultPrevented()||!r)return;var i=this,o=this.tip(),a=this.getUID(this.type);this.setContent(),o.attr("id",a),this.$element.attr("aria-describedby",a),this.options.animation&&o.addClass("fade");var s="function"==typeof this.options.placement?this.options.placement.call(this,o[0],this.$element[0]):this.options.placement,u=/\s?auto?\s?/i,c=u.test(s);c&&(s=s.replace(u,"")||"top"),o.detach().css({top:0,left:0,display:"block"}).addClass(s).data("bs."+this.type,this),this.options.container?o.appendTo(this.options.container):o.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var l=this.getPosition(),f=o[0].offsetWidth,p=o[0].offsetHeight;if(c){var d=s,h=this.getPosition(this.$viewport);s="bottom"==s&&l.bottom+p>h.bottom?"top":"top"==s&&l.top-ph.width?"left":"left"==s&&l.left-fa.top+a.height&&(i.top=a.top+a.height-u)}else{var c=e.left-o,l=e.left+o+n;ca.right&&(i.left=a.left+a.width-l)}return i},n.prototype.getTitle=function(){var t=this.$element,e=this.options;return t.attr("data-original-title")||("function"==typeof e.title?e.title.call(t[0]):e.title)},n.prototype.getUID=function(t){do{t+=~~(1e6*Math.random())}while(document.getElementById(t));return t},n.prototype.tip=function(){if(!this.$tip&&(this.$tip=t(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},n.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},n.prototype.enable=function(){this.enabled=!0},n.prototype.disable=function(){this.enabled=!1},n.prototype.toggleEnabled=function(){this.enabled=!this.enabled},n.prototype.toggle=function(e){var n=this;e&&((n=t(e.currentTarget).data("bs."+this.type))||(n=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,n))),e?(n.inState.click=!n.inState.click,n.isInStateTrue()?n.enter(n):n.leave(n)):n.tip().hasClass("in")?n.leave(n):n.enter(n)},n.prototype.destroy=function(){var t=this;clearTimeout(this.timeout),this.hide(function(){t.$element.off("."+t.type).removeData("bs."+t.type),t.$tip&&t.$tip.detach(),t.$tip=null,t.$arrow=null,t.$viewport=null,t.$element=null})};var r=t.fn.tooltip;t.fn.tooltip=e,t.fn.tooltip.Constructor=n,t.fn.tooltip.noConflict=function(){return t.fn.tooltip=r,this}}(jQuery),function(t){"use strict";function e(e){return this.each(function(){var r=t(this),i=r.data("bs.popover"),o="object"==typeof e&&e;!i&&/destroy|hide/.test(e)||(i||r.data("bs.popover",i=new n(this,o)),"string"==typeof e&&i[e]())})}var n=function(t,e){this.init("popover",t,e)};if(!t.fn.tooltip)throw new Error("Popover requires tooltip.js");n.VERSION="3.3.7",n.DEFAULTS=t.extend({},t.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:''}),n.prototype=t.extend({},t.fn.tooltip.Constructor.prototype),n.prototype.constructor=n,n.prototype.getDefaults=function(){return n.DEFAULTS},n.prototype.setContent=function(){var t=this.tip(),e=this.getTitle(),n=this.getContent();t.find(".popover-title")[this.options.html?"html":"text"](e),t.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof n?"html":"append":"text"](n),t.removeClass("fade top bottom left right in"),t.find(".popover-title").html()||t.find(".popover-title").hide()},n.prototype.hasContent=function(){return this.getTitle()||this.getContent()},n.prototype.getContent=function(){var t=this.$element,e=this.options;return t.attr("data-content")||("function"==typeof e.content?e.content.call(t[0]):e.content)},n.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var r=t.fn.popover;t.fn.popover=e,t.fn.popover.Constructor=n,t.fn.popover.noConflict=function(){return t.fn.popover=r,this}}(jQuery),function(t){"use strict";function e(n,r){this.$body=t(document.body),this.$scrollElement=t(t(n).is(document.body)?window:n),this.options=t.extend({},e.DEFAULTS,r),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",t.proxy(this.process,this)),this.refresh(),this.process()}function n(n){return this.each(function(){var r=t(this),i=r.data("bs.scrollspy"),o="object"==typeof n&&n;i||r.data("bs.scrollspy",i=new e(this,o)),"string"==typeof n&&i[n]()})}e.VERSION="3.3.7",e.DEFAULTS={offset:10},e.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},e.prototype.refresh=function(){var e=this,n="offset",r=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),t.isWindow(this.$scrollElement[0])||(n="position",r=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var e=t(this),i=e.data("target")||e.attr("href"),o=/^#./.test(i)&&t(i);return o&&o.length&&o.is(":visible")&&[[o[n]().top+r,i]]||null}).sort(function(t,e){return t[0]-e[0]}).each(function(){e.offsets.push(this[0]),e.targets.push(this[1])})},e.prototype.process=function(){var t,e=this.$scrollElement.scrollTop()+this.options.offset,n=this.getScrollHeight(),r=this.options.offset+n-this.$scrollElement.height(),i=this.offsets,o=this.targets,a=this.activeTarget;if(this.scrollHeight!=n&&this.refresh(),e>=r)return a!=(t=o[o.length-1])&&this.activate(t);if(a&&e=i[t]&&(void 0===i[t+1]||e .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),e.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),s?(e[0].offsetWidth,e.addClass("in")):e.removeClass("fade"),e.parent(".dropdown-menu").length&&e.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),i&&i()}var a=r.find("> .active"),s=i&&t.support.transition&&(a.length&&a.hasClass("fade")||!!r.find("> .fade").length);a.length&&s?a.one("bsTransitionEnd",o).emulateTransitionEnd(n.TRANSITION_DURATION):o(),a.removeClass("in")};var r=t.fn.tab;t.fn.tab=e,t.fn.tab.Constructor=n,t.fn.tab.noConflict=function(){return t.fn.tab=r,this};var i=function(n){n.preventDefault(),e.call(t(this),"show")};t(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',i).on("click.bs.tab.data-api",'[data-toggle="pill"]',i)}(jQuery),function(t){"use strict";function e(e){return this.each(function(){var r=t(this),i=r.data("bs.affix"),o="object"==typeof e&&e;i||r.data("bs.affix",i=new n(this,o)),"string"==typeof e&&i[e]()})}var n=function(e,r){this.options=t.extend({},n.DEFAULTS,r),this.$target=t(this.options.target).on("scroll.bs.affix.data-api",t.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",t.proxy(this.checkPositionWithEventLoop,this)),this.$element=t(e),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};n.VERSION="3.3.7",n.RESET="affix affix-top affix-bottom",n.DEFAULTS={offset:0,target:window},n.prototype.getState=function(t,e,n,r){var i=this.$target.scrollTop(),o=this.$element.offset(),a=this.$target.height();if(null!=n&&"top"==this.affixed)return i=t-r&&"bottom"},n.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(n.RESET).addClass("affix");var t=this.$target.scrollTop(),e=this.$element.offset();return this.pinnedOffset=e.top-t},n.prototype.checkPositionWithEventLoop=function(){setTimeout(t.proxy(this.checkPosition,this),1)},n.prototype.checkPosition=function(){if(this.$element.is(":visible")){var e=this.$element.height(),r=this.options.offset,i=r.top,o=r.bottom,a=Math.max(t(document).height(),t(document.body).height());"object"!=typeof r&&(o=i=r),"function"==typeof i&&(i=r.top(this.$element)),"function"==typeof o&&(o=r.bottom(this.$element));var s=this.getState(a,e,i,o);if(this.affixed!=s){null!=this.unpin&&this.$element.css("top","");var u="affix"+(s?"-"+s:""),c=t.Event(u+".bs.affix");if(this.$element.trigger(c),c.isDefaultPrevented())return;this.affixed=s,this.unpin="bottom"==s?this.getPinnedOffset():null,this.$element.removeClass(n.RESET).addClass(u).trigger(u.replace("affix","affixed")+".bs.affix")}"bottom"==s&&this.$element.offset({top:a-e-o})}};var r=t.fn.affix;t.fn.affix=e,t.fn.affix.Constructor=n,t.fn.affix.noConflict=function(){return t.fn.affix=r,this},t(window).on("load",function(){t('[data-spy="affix"]').each(function(){var n=t(this),r=n.data();r.offset=r.offset||{},null!=r.offsetBottom&&(r.offset.bottom=r.offsetBottom),null!=r.offsetTop&&(r.offset.top=r.offsetTop),e.call(n,r)})})}(jQuery)},function(t,e,n){var r,i;/*! + * jQuery JavaScript Library v3.2.1 + * https://jquery.com/ + * + * Includes Sizzle.js + * https://sizzlejs.com/ + * + * Copyright JS Foundation and other contributors + * Released under the MIT license + * https://jquery.org/license + * + * Date: 2017-03-20T18:59Z + */ +!function(e,n){"use strict";"object"==typeof t&&"object"==typeof t.exports?t.exports=e.document?n(e,!0):function(t){if(!t.document)throw new Error("jQuery requires a window with a document");return n(t)}:n(e)}("undefined"!=typeof window?window:this,function(n,o){"use strict";function a(t,e){e=e||at;var n=e.createElement("script");n.text=t,e.head.appendChild(n).parentNode.removeChild(n)}function s(t){var e=!!t&&"length"in t&&t.length,n=yt.type(t);return"function"!==n&&!yt.isWindow(t)&&("array"===n||0===e||"number"==typeof e&&e>0&&e-1 in t)}function u(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()}function c(t,e,n){return yt.isFunction(e)?yt.grep(t,function(t,r){return!!e.call(t,r,t)!==n}):e.nodeType?yt.grep(t,function(t){return t===e!==n}):"string"!=typeof e?yt.grep(t,function(t){return ft.call(e,t)>-1!==n}):$t.test(e)?yt.filter(e,t,n):(e=yt.filter(e,t),yt.grep(t,function(t){return ft.call(e,t)>-1!==n&&1===t.nodeType}))}function l(t,e){for(;(t=t[e])&&1!==t.nodeType;);return t}function f(t){var e={};return yt.each(t.match(Ot)||[],function(t,n){e[n]=!0}),e}function p(t){return t}function d(t){throw t}function h(t,e,n,r){var i;try{t&&yt.isFunction(i=t.promise)?i.call(t).done(e).fail(n):t&&yt.isFunction(i=t.then)?i.call(t,e,n):e.apply(void 0,[t].slice(r))}catch(t){n.apply(void 0,[t])}}function v(){at.removeEventListener("DOMContentLoaded",v),n.removeEventListener("load",v),yt.ready()}function g(){this.expando=yt.expando+g.uid++}function m(t){return"true"===t||"false"!==t&&("null"===t?null:t===+t+""?+t:Pt.test(t)?JSON.parse(t):t)}function y(t,e,n){var r;if(void 0===n&&1===t.nodeType)if(r="data-"+e.replace(Ft,"-$&").toLowerCase(),"string"==typeof(n=t.getAttribute(r))){try{n=m(n)}catch(t){}Rt.set(t,e,n)}else n=void 0;return n}function b(t,e,n,r){var i,o=1,a=20,s=r?function(){return r.cur()}:function(){return yt.css(t,e,"")},u=s(),c=n&&n[3]||(yt.cssNumber[e]?"":"px"),l=(yt.cssNumber[e]||"px"!==c&&+u)&&Mt.exec(yt.css(t,e));if(l&&l[3]!==c){c=c||l[3],n=n||[],l=+u||1;do{o=o||".5",l/=o,yt.style(t,e,l+c)}while(o!==(o=s()/u)&&1!==o&&--a)}return n&&(l=+l||+u||0,i=n[1]?l+(n[1]+1)*n[2]:+n[2],r&&(r.unit=c,r.start=l,r.end=i)),i}function _(t){var e,n=t.ownerDocument,r=t.nodeName,i=Wt[r];return i||(e=n.body.appendChild(n.createElement(r)),i=yt.css(e,"display"),e.parentNode.removeChild(e),"none"===i&&(i="block"),Wt[r]=i,i)}function w(t,e){for(var n,r,i=[],o=0,a=t.length;o-1)i&&i.push(o);else if(c=yt.contains(o.ownerDocument,o),a=x(f.appendChild(o),"script"),c&&C(a),n)for(l=0;o=a[l++];)Xt.test(o.type||"")&&n.push(o);return f}function $(){return!0}function k(){return!1}function A(){try{return at.activeElement}catch(t){}}function E(t,e,n,r,i,o){var a,s;if("object"==typeof e){"string"!=typeof n&&(r=r||n,n=void 0);for(s in e)E(t,s,n,r,e[s],o);return t}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=k;else if(!i)return t;return 1===o&&(a=i,i=function(t){return yt().off(t),a.apply(this,arguments)},i.guid=a.guid||(a.guid=yt.guid++)),t.each(function(){yt.event.add(this,e,i,r,n)})}function S(t,e){return u(t,"table")&&u(11!==e.nodeType?e:e.firstChild,"tr")?yt(">tbody",t)[0]||t:t}function O(t){return t.type=(null!==t.getAttribute("type"))+"/"+t.type,t}function j(t){var e=ne.exec(t.type);return e?t.type=e[1]:t.removeAttribute("type"),t}function N(t,e){var n,r,i,o,a,s,u,c;if(1===e.nodeType){if(Lt.hasData(t)&&(o=Lt.access(t),a=Lt.set(e,o),c=o.events)){delete a.handle,a.events={};for(i in c)for(n=0,r=c[i].length;n1&&"string"==typeof h&&!mt.checkClone&&ee.test(h))return t.each(function(i){var o=t.eq(i);v&&(e[0]=h.call(this,i,o.html())),I(o,e,n,r)});if(p&&(i=T(e,t[0].ownerDocument,!1,t,r),o=i.firstChild,1===i.childNodes.length&&(i=o),o||r)){for(s=yt.map(x(i,"script"),O),u=s.length;f=0&&nw.cacheLength&&delete t[e.shift()],t[n+" "]=r}var e=[];return t}function r(t){return t[F]=!0,t}function i(t){var e=j.createElement("fieldset");try{return!!t(e)}catch(t){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function o(t,e){for(var n=t.split("|"),r=n.length;r--;)w.attrHandle[n[r]]=e}function a(t,e){var n=e&&t,r=n&&1===t.nodeType&&1===e.nodeType&&t.sourceIndex-e.sourceIndex;if(r)return r;if(n)for(;n=n.nextSibling;)if(n===e)return-1;return t?1:-1}function s(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&xt(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function u(t){return r(function(e){return e=+e,r(function(n,r){for(var i,o=t([],n.length,e),a=o.length;a--;)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}function c(t){return t&&void 0!==t.getElementsByTagName&&t}function l(){}function f(t){for(var e=0,n=t.length,r="";e1?function(e,n,r){for(var i=t.length;i--;)if(!t[i](e,n,r))return!1;return!0}:t[0]}function h(t,n,r){for(var i=0,o=n.length;i-1&&(r[c]=!(a[c]=f))}}else b=v(b===a?b.splice(g,b.length):b),o?o(null,a,b,u):Q.apply(a,b)})}function m(t){for(var e,n,r,i=t.length,o=w.relative[t[0].type],a=o||w.relative[" "],s=o?1:0,u=p(function(t){return t===e},a,!0),c=p(function(t){return Z(e,t)>-1},a,!0),l=[function(t,n,r){var i=!o&&(r||n!==A)||((e=n).nodeType?u(t,n,r):c(t,n,r));return e=null,i}];s1&&d(l),s>1&&f(t.slice(0,s-1).concat({value:" "===t[s-2].type?"*":""})).replace(ot,"$1"),n,s0,o=t.length>0,a=function(r,a,s,u,c){var l,f,p,d=0,h="0",g=r&&[],m=[],y=A,b=r||o&&w.find.TAG("*",c),_=M+=null==y?1:Math.random()||.1,x=b.length;for(c&&(A=a===j||a||c);h!==x&&null!=(l=b[h]);h++){if(o&&l){for(f=0,a||l.ownerDocument===j||(O(l),s=!D);p=t[f++];)if(p(l,a||j,s)){u.push(l);break}c&&(M=_)}i&&((l=!p&&l)&&d--,r&&g.push(l))}if(d+=h,i&&h!==d){for(f=0;p=n[f++];)p(g,m,a,s);if(r){if(d>0)for(;h--;)g[h]||m[h]||(m[h]=K.call(u));m=v(m)}Q.apply(u,m),c&&!r&&m.length>0&&d+n.length>1&&e.uniqueSort(u)}return c&&(M=_,A=y),g};return i?r(a):a}var b,_,w,x,C,T,$,k,A,E,S,O,j,N,D,I,L,R,P,F="sizzle"+1*new Date,q=t.document,M=0,H=0,B=n(),U=n(),W=n(),z=function(t,e){return t===e&&(S=!0),0},V={}.hasOwnProperty,X=[],K=X.pop,J=X.push,Q=X.push,G=X.slice,Z=function(t,e){for(var n=0,r=t.length;n+~]|"+tt+")"+tt+"*"),ut=new RegExp("="+tt+"*([^\\]'\"]*?)"+tt+"*\\]","g"),ct=new RegExp(rt),lt=new RegExp("^"+et+"$"),ft={ID:new RegExp("^#("+et+")"),CLASS:new RegExp("^\\.("+et+")"),TAG:new RegExp("^("+et+"|[*])"),ATTR:new RegExp("^"+nt),PSEUDO:new RegExp("^"+rt),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+tt+"*(even|odd|(([+-]|)(\\d*)n|)"+tt+"*(?:([+-]|)"+tt+"*(\\d+)|))"+tt+"*\\)|)","i"),bool:new RegExp("^(?:"+Y+")$","i"),needsContext:new RegExp("^"+tt+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+tt+"*((?:-\\d)?\\d*)"+tt+"*\\)|)(?=[^-]|$)","i")},pt=/^(?:input|select|textarea|button)$/i,dt=/^h\d$/i,ht=/^[^{]+\{\s*\[native \w/,vt=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,gt=/[+~]/,mt=new RegExp("\\\\([\\da-f]{1,6}"+tt+"?|("+tt+")|.)","ig"),yt=function(t,e,n){var r="0x"+e-65536;return r!==r||n?e:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},bt=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,_t=function(t,e){return e?"\0"===t?"�":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t},wt=function(){O()},xt=p(function(t){return!0===t.disabled&&("form"in t||"label"in t)},{dir:"parentNode",next:"legend"});try{Q.apply(X=G.call(q.childNodes),q.childNodes),X[q.childNodes.length].nodeType}catch(t){Q={apply:X.length?function(t,e){J.apply(t,G.call(e))}:function(t,e){for(var n=t.length,r=0;t[n++]=e[r++];);t.length=n-1}}}_=e.support={},C=e.isXML=function(t){var e=t&&(t.ownerDocument||t).documentElement;return!!e&&"HTML"!==e.nodeName},O=e.setDocument=function(t){var e,n,r=t?t.ownerDocument||t:q;return r!==j&&9===r.nodeType&&r.documentElement?(j=r,N=j.documentElement,D=!C(j),q!==j&&(n=j.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",wt,!1):n.attachEvent&&n.attachEvent("onunload",wt)),_.attributes=i(function(t){return t.className="i",!t.getAttribute("className")}),_.getElementsByTagName=i(function(t){return t.appendChild(j.createComment("")),!t.getElementsByTagName("*").length}),_.getElementsByClassName=ht.test(j.getElementsByClassName),_.getById=i(function(t){return N.appendChild(t).id=F,!j.getElementsByName||!j.getElementsByName(F).length}),_.getById?(w.filter.ID=function(t){var e=t.replace(mt,yt);return function(t){return t.getAttribute("id")===e}},w.find.ID=function(t,e){if(void 0!==e.getElementById&&D){var n=e.getElementById(t);return n?[n]:[]}}):(w.filter.ID=function(t){var e=t.replace(mt,yt);return function(t){var n=void 0!==t.getAttributeNode&&t.getAttributeNode("id");return n&&n.value===e}},w.find.ID=function(t,e){if(void 0!==e.getElementById&&D){var n,r,i,o=e.getElementById(t);if(o){if((n=o.getAttributeNode("id"))&&n.value===t)return[o];for(i=e.getElementsByName(t),r=0;o=i[r++];)if((n=o.getAttributeNode("id"))&&n.value===t)return[o]}return[]}}),w.find.TAG=_.getElementsByTagName?function(t,e){return void 0!==e.getElementsByTagName?e.getElementsByTagName(t):_.qsa?e.querySelectorAll(t):void 0}:function(t,e){var n,r=[],i=0,o=e.getElementsByTagName(t);if("*"===t){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},w.find.CLASS=_.getElementsByClassName&&function(t,e){if(void 0!==e.getElementsByClassName&&D)return e.getElementsByClassName(t)},L=[],I=[],(_.qsa=ht.test(j.querySelectorAll))&&(i(function(t){N.appendChild(t).innerHTML="",t.querySelectorAll("[msallowcapture^='']").length&&I.push("[*^$]="+tt+"*(?:''|\"\")"),t.querySelectorAll("[selected]").length||I.push("\\["+tt+"*(?:value|"+Y+")"),t.querySelectorAll("[id~="+F+"-]").length||I.push("~="),t.querySelectorAll(":checked").length||I.push(":checked"),t.querySelectorAll("a#"+F+"+*").length||I.push(".#.+[+~]")}),i(function(t){t.innerHTML="";var e=j.createElement("input");e.setAttribute("type","hidden"),t.appendChild(e).setAttribute("name","D"),t.querySelectorAll("[name=d]").length&&I.push("name"+tt+"*[*^$|!~]?="),2!==t.querySelectorAll(":enabled").length&&I.push(":enabled",":disabled"),N.appendChild(t).disabled=!0,2!==t.querySelectorAll(":disabled").length&&I.push(":enabled",":disabled"),t.querySelectorAll("*,:x"),I.push(",.*:")})),(_.matchesSelector=ht.test(R=N.matches||N.webkitMatchesSelector||N.mozMatchesSelector||N.oMatchesSelector||N.msMatchesSelector))&&i(function(t){_.disconnectedMatch=R.call(t,"*"),R.call(t,"[s!='']:x"),L.push("!=",rt)}),I=I.length&&new RegExp(I.join("|")),L=L.length&&new RegExp(L.join("|")),e=ht.test(N.compareDocumentPosition),P=e||ht.test(N.contains)?function(t,e){var n=9===t.nodeType?t.documentElement:t,r=e&&e.parentNode;return t===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):t.compareDocumentPosition&&16&t.compareDocumentPosition(r)))}:function(t,e){if(e)for(;e=e.parentNode;)if(e===t)return!0;return!1},z=e?function(t,e){if(t===e)return S=!0,0;var n=!t.compareDocumentPosition-!e.compareDocumentPosition;return n||(n=(t.ownerDocument||t)===(e.ownerDocument||e)?t.compareDocumentPosition(e):1,1&n||!_.sortDetached&&e.compareDocumentPosition(t)===n?t===j||t.ownerDocument===q&&P(q,t)?-1:e===j||e.ownerDocument===q&&P(q,e)?1:E?Z(E,t)-Z(E,e):0:4&n?-1:1)}:function(t,e){if(t===e)return S=!0,0;var n,r=0,i=t.parentNode,o=e.parentNode,s=[t],u=[e];if(!i||!o)return t===j?-1:e===j?1:i?-1:o?1:E?Z(E,t)-Z(E,e):0;if(i===o)return a(t,e);for(n=t;n=n.parentNode;)s.unshift(n);for(n=e;n=n.parentNode;)u.unshift(n);for(;s[r]===u[r];)r++;return r?a(s[r],u[r]):s[r]===q?-1:u[r]===q?1:0},j):j},e.matches=function(t,n){return e(t,null,null,n)},e.matchesSelector=function(t,n){if((t.ownerDocument||t)!==j&&O(t),n=n.replace(ut,"='$1']"),_.matchesSelector&&D&&!W[n+" "]&&(!L||!L.test(n))&&(!I||!I.test(n)))try{var r=R.call(t,n);if(r||_.disconnectedMatch||t.document&&11!==t.document.nodeType)return r}catch(t){}return e(n,j,null,[t]).length>0},e.contains=function(t,e){return(t.ownerDocument||t)!==j&&O(t),P(t,e)},e.attr=function(t,e){(t.ownerDocument||t)!==j&&O(t);var n=w.attrHandle[e.toLowerCase()],r=n&&V.call(w.attrHandle,e.toLowerCase())?n(t,e,!D):void 0;return void 0!==r?r:_.attributes||!D?t.getAttribute(e):(r=t.getAttributeNode(e))&&r.specified?r.value:null},e.escape=function(t){return(t+"").replace(bt,_t)},e.error=function(t){throw new Error("Syntax error, unrecognized expression: "+t)},e.uniqueSort=function(t){var e,n=[],r=0,i=0;if(S=!_.detectDuplicates,E=!_.sortStable&&t.slice(0),t.sort(z),S){for(;e=t[i++];)e===t[i]&&(r=n.push(i));for(;r--;)t.splice(n[r],1)}return E=null,t},x=e.getText=function(t){var e,n="",r=0,i=t.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof t.textContent)return t.textContent;for(t=t.firstChild;t;t=t.nextSibling)n+=x(t)}else if(3===i||4===i)return t.nodeValue}else for(;e=t[r++];)n+=x(e);return n},w=e.selectors={cacheLength:50,createPseudo:r,match:ft,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(t){return t[1]=t[1].replace(mt,yt),t[3]=(t[3]||t[4]||t[5]||"").replace(mt,yt),"~="===t[2]&&(t[3]=" "+t[3]+" "),t.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||e.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&e.error(t[0]),t},PSEUDO:function(t){var e,n=!t[6]&&t[2];return ft.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":n&&ct.test(n)&&(e=T(n,!0))&&(e=n.indexOf(")",n.length-e)-n.length)&&(t[0]=t[0].slice(0,e),t[2]=n.slice(0,e)),t.slice(0,3))}},filter:{TAG:function(t){var e=t.replace(mt,yt).toLowerCase();return"*"===t?function(){return!0}:function(t){return t.nodeName&&t.nodeName.toLowerCase()===e}},CLASS:function(t){var e=B[t+" "];return e||(e=new RegExp("(^|"+tt+")"+t+"("+tt+"|$)"))&&B(t,function(t){return e.test("string"==typeof t.className&&t.className||void 0!==t.getAttribute&&t.getAttribute("class")||"")})},ATTR:function(t,n,r){return function(i){var o=e.attr(i,t);return null==o?"!="===n:!n||(o+="","="===n?o===r:"!="===n?o!==r:"^="===n?r&&0===o.indexOf(r):"*="===n?r&&o.indexOf(r)>-1:"$="===n?r&&o.slice(-r.length)===r:"~="===n?(" "+o.replace(it," ")+" ").indexOf(r)>-1:"|="===n&&(o===r||o.slice(0,r.length+1)===r+"-"))}},CHILD:function(t,e,n,r,i){var o="nth"!==t.slice(0,3),a="last"!==t.slice(-4),s="of-type"===e;return 1===r&&0===i?function(t){return!!t.parentNode}:function(e,n,u){var c,l,f,p,d,h,v=o!==a?"nextSibling":"previousSibling",g=e.parentNode,m=s&&e.nodeName.toLowerCase(),y=!u&&!s,b=!1;if(g){if(o){for(;v;){for(p=e;p=p[v];)if(s?p.nodeName.toLowerCase()===m:1===p.nodeType)return!1;h=v="only"===t&&!h&&"nextSibling"}return!0}if(h=[a?g.firstChild:g.lastChild],a&&y){for(p=g,f=p[F]||(p[F]={}),l=f[p.uniqueID]||(f[p.uniqueID]={}),c=l[t]||[],d=c[0]===M&&c[1],b=d&&c[2],p=d&&g.childNodes[d];p=++d&&p&&p[v]||(b=d=0)||h.pop();)if(1===p.nodeType&&++b&&p===e){l[t]=[M,d,b];break}}else if(y&&(p=e,f=p[F]||(p[F]={}),l=f[p.uniqueID]||(f[p.uniqueID]={}),c=l[t]||[],d=c[0]===M&&c[1],b=d),!1===b)for(;(p=++d&&p&&p[v]||(b=d=0)||h.pop())&&((s?p.nodeName.toLowerCase()!==m:1!==p.nodeType)||!++b||(y&&(f=p[F]||(p[F]={}),l=f[p.uniqueID]||(f[p.uniqueID]={}),l[t]=[M,b]),p!==e)););return(b-=i)===r||b%r==0&&b/r>=0}}},PSEUDO:function(t,n){var i,o=w.pseudos[t]||w.setFilters[t.toLowerCase()]||e.error("unsupported pseudo: "+t);return o[F]?o(n):o.length>1?(i=[t,t,"",n],w.setFilters.hasOwnProperty(t.toLowerCase())?r(function(t,e){for(var r,i=o(t,n),a=i.length;a--;)r=Z(t,i[a]),t[r]=!(e[r]=i[a])}):function(t){return o(t,0,i)}):o}},pseudos:{not:r(function(t){var e=[],n=[],i=$(t.replace(ot,"$1"));return i[F]?r(function(t,e,n,r){for(var o,a=i(t,null,r,[]),s=t.length;s--;)(o=a[s])&&(t[s]=!(e[s]=o))}):function(t,r,o){return e[0]=t,i(e,null,o,n),e[0]=null,!n.pop()}}),has:r(function(t){return function(n){return e(t,n).length>0}}),contains:r(function(t){return t=t.replace(mt,yt),function(e){return(e.textContent||e.innerText||x(e)).indexOf(t)>-1}}),lang:r(function(t){return lt.test(t||"")||e.error("unsupported lang: "+t),t=t.replace(mt,yt).toLowerCase(),function(e){var n;do{if(n=D?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(n=n.toLowerCase())===t||0===n.indexOf(t+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var n=t.location&&t.location.hash;return n&&n.slice(1)===e.id},root:function(t){return t===N},focus:function(t){return t===j.activeElement&&(!j.hasFocus||j.hasFocus())&&!!(t.type||t.href||~t.tabIndex)},enabled:s(!1),disabled:s(!0),checked:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&!!t.checked||"option"===e&&!!t.selected},selected:function(t){return t.parentNode&&t.parentNode.selectedIndex,!0===t.selected},empty:function(t){for(t=t.firstChild;t;t=t.nextSibling)if(t.nodeType<6)return!1;return!0},parent:function(t){return!w.pseudos.empty(t)},header:function(t){return dt.test(t.nodeName)},input:function(t){return pt.test(t.nodeName)},button:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&"button"===t.type||"button"===e},text:function(t){var e;return"input"===t.nodeName.toLowerCase()&&"text"===t.type&&(null==(e=t.getAttribute("type"))||"text"===e.toLowerCase())},first:u(function(){return[0]}),last:u(function(t,e){return[e-1]}),eq:u(function(t,e,n){return[n<0?n+e:n]}),even:u(function(t,e){for(var n=0;n=0;)t.push(r);return t}),gt:u(function(t,e,n){for(var r=n<0?n+e:n;++r2&&"ID"===(a=o[0]).type&&9===e.nodeType&&D&&w.relative[o[1].type]){if(!(e=(w.find.ID(a.matches[0].replace(mt,yt),e)||[])[0]))return n;l&&(e=e.parentNode),t=t.slice(o.shift().value.length)}for(i=ft.needsContext.test(t)?0:o.length;i--&&(a=o[i],!w.relative[s=a.type]);)if((u=w.find[s])&&(r=u(a.matches[0].replace(mt,yt),gt.test(o[0].type)&&c(e.parentNode)||e))){if(o.splice(i,1),!(t=r.length&&f(o)))return Q.apply(n,r),n;break}}return(l||$(t,p))(r,e,!D,n,!e||gt.test(t)&&c(e.parentNode)||e),n},_.sortStable=F.split("").sort(z).join("")===F,_.detectDuplicates=!!S,O(),_.sortDetached=i(function(t){return 1&t.compareDocumentPosition(j.createElement("fieldset"))}),i(function(t){return t.innerHTML="","#"===t.firstChild.getAttribute("href")})||o("type|href|height|width",function(t,e,n){if(!n)return t.getAttribute(e,"type"===e.toLowerCase()?1:2)}),_.attributes&&i(function(t){return t.innerHTML="",t.firstChild.setAttribute("value",""),""===t.firstChild.getAttribute("value")})||o("value",function(t,e,n){if(!n&&"input"===t.nodeName.toLowerCase())return t.defaultValue}),i(function(t){return null==t.getAttribute("disabled")})||o(Y,function(t,e,n){var r;if(!n)return!0===t[e]?e.toLowerCase():(r=t.getAttributeNode(e))&&r.specified?r.value:null}),e}(n);yt.find=_t,yt.expr=_t.selectors,yt.expr[":"]=yt.expr.pseudos,yt.uniqueSort=yt.unique=_t.uniqueSort,yt.text=_t.getText,yt.isXMLDoc=_t.isXML,yt.contains=_t.contains,yt.escapeSelector=_t.escape;var wt=function(t,e,n){for(var r=[],i=void 0!==n;(t=t[e])&&9!==t.nodeType;)if(1===t.nodeType){if(i&&yt(t).is(n))break;r.push(t)}return r},xt=function(t,e){for(var n=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&n.push(t);return n},Ct=yt.expr.match.needsContext,Tt=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i,$t=/^.[^:#\[\.,]*$/;yt.filter=function(t,e,n){var r=e[0];return n&&(t=":not("+t+")"),1===e.length&&1===r.nodeType?yt.find.matchesSelector(r,t)?[r]:[]:yt.find.matches(t,yt.grep(e,function(t){return 1===t.nodeType}))},yt.fn.extend({find:function(t){var e,n,r=this.length,i=this;if("string"!=typeof t)return this.pushStack(yt(t).filter(function(){for(e=0;e1?yt.uniqueSort(n):n},filter:function(t){return this.pushStack(c(this,t||[],!1))},not:function(t){return this.pushStack(c(this,t||[],!0))},is:function(t){return!!c(this,"string"==typeof t&&Ct.test(t)?yt(t):t||[],!1).length}});var kt,At=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(yt.fn.init=function(t,e,n){var r,i;if(!t)return this;if(n=n||kt,"string"==typeof t){if(!(r="<"===t[0]&&">"===t[t.length-1]&&t.length>=3?[null,t,null]:At.exec(t))||!r[1]&&e)return!e||e.jquery?(e||n).find(t):this.constructor(e).find(t);if(r[1]){if(e=e instanceof yt?e[0]:e,yt.merge(this,yt.parseHTML(r[1],e&&e.nodeType?e.ownerDocument||e:at,!0)),Tt.test(r[1])&&yt.isPlainObject(e))for(r in e)yt.isFunction(this[r])?this[r](e[r]):this.attr(r,e[r]);return this}return i=at.getElementById(r[2]),i&&(this[0]=i,this.length=1),this}return t.nodeType?(this[0]=t,this.length=1,this):yt.isFunction(t)?void 0!==n.ready?n.ready(t):t(yt):yt.makeArray(t,this)}).prototype=yt.fn,kt=yt(at);var Et=/^(?:parents|prev(?:Until|All))/,St={children:!0,contents:!0,next:!0,prev:!0};yt.fn.extend({has:function(t){var e=yt(t,this),n=e.length;return this.filter(function(){for(var t=0;t-1:1===n.nodeType&&yt.find.matchesSelector(n,t))){o.push(n);break}return this.pushStack(o.length>1?yt.uniqueSort(o):o)},index:function(t){return t?"string"==typeof t?ft.call(yt(t),this[0]):ft.call(this,t.jquery?t[0]:t):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(t,e){return this.pushStack(yt.uniqueSort(yt.merge(this.get(),yt(t,e))))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),yt.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return wt(t,"parentNode")},parentsUntil:function(t,e,n){return wt(t,"parentNode",n)},next:function(t){return l(t,"nextSibling")},prev:function(t){return l(t,"previousSibling")},nextAll:function(t){return wt(t,"nextSibling")},prevAll:function(t){return wt(t,"previousSibling")},nextUntil:function(t,e,n){return wt(t,"nextSibling",n)},prevUntil:function(t,e,n){return wt(t,"previousSibling",n)},siblings:function(t){return xt((t.parentNode||{}).firstChild,t)},children:function(t){return xt(t.firstChild)},contents:function(t){return u(t,"iframe")?t.contentDocument:(u(t,"template")&&(t=t.content||t),yt.merge([],t.childNodes))}},function(t,e){yt.fn[t]=function(n,r){var i=yt.map(this,e,n);return"Until"!==t.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=yt.filter(r,i)),this.length>1&&(St[t]||yt.uniqueSort(i),Et.test(t)&&i.reverse()),this.pushStack(i)}});var Ot=/[^\x20\t\r\n\f]+/g;yt.Callbacks=function(t){t="string"==typeof t?f(t):yt.extend({},t);var e,n,r,i,o=[],a=[],s=-1,u=function(){for(i=i||t.once,r=e=!0;a.length;s=-1)for(n=a.shift();++s-1;)o.splice(n,1),n<=s&&s--}),this},has:function(t){return t?yt.inArray(t,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return i=a=[],o=n="",this},disabled:function(){return!o},lock:function(){return i=a=[],n||e||(o=n=""),this},locked:function(){return!!i},fireWith:function(t,n){return i||(n=n||[],n=[t,n.slice?n.slice():n],a.push(n),e||u()),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!r}};return c},yt.extend({Deferred:function(t){var e=[["notify","progress",yt.Callbacks("memory"),yt.Callbacks("memory"),2],["resolve","done",yt.Callbacks("once memory"),yt.Callbacks("once memory"),0,"resolved"],["reject","fail",yt.Callbacks("once memory"),yt.Callbacks("once memory"),1,"rejected"]],r="pending",i={state:function(){return r},always:function(){return o.done(arguments).fail(arguments),this},catch:function(t){return i.then(null,t)},pipe:function(){var t=arguments;return yt.Deferred(function(n){yt.each(e,function(e,r){var i=yt.isFunction(t[r[4]])&&t[r[4]];o[r[1]](function(){var t=i&&i.apply(this,arguments);t&&yt.isFunction(t.promise)?t.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[r[0]+"With"](this,i?[t]:arguments)})}),t=null}).promise()},then:function(t,r,i){function o(t,e,r,i){return function(){var s=this,u=arguments,c=function(){var n,c;if(!(t=a&&(r!==d&&(s=void 0,u=[n]),e.rejectWith(s,u))}};t?l():(yt.Deferred.getStackHook&&(l.stackTrace=yt.Deferred.getStackHook()),n.setTimeout(l))}}var a=0;return yt.Deferred(function(n){e[0][3].add(o(0,n,yt.isFunction(i)?i:p,n.notifyWith)),e[1][3].add(o(0,n,yt.isFunction(t)?t:p)),e[2][3].add(o(0,n,yt.isFunction(r)?r:d))}).promise()},promise:function(t){return null!=t?yt.extend(t,i):i}},o={};return yt.each(e,function(t,n){var a=n[2],s=n[5];i[n[1]]=a.add,s&&a.add(function(){r=s},e[3-t][2].disable,e[0][2].lock),a.add(n[3].fire),o[n[0]]=function(){return o[n[0]+"With"](this===o?void 0:this,arguments),this},o[n[0]+"With"]=a.fireWith}),i.promise(o),t&&t.call(o,o),o},when:function(t){var e=arguments.length,n=e,r=Array(n),i=ut.call(arguments),o=yt.Deferred(),a=function(t){return function(n){r[t]=this,i[t]=arguments.length>1?ut.call(arguments):n,--e||o.resolveWith(r,i)}};if(e<=1&&(h(t,o.done(a(n)).resolve,o.reject,!e),"pending"===o.state()||yt.isFunction(i[n]&&i[n].then)))return o.then();for(;n--;)h(i[n],a(n),o.reject);return o.promise()}});var jt=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;yt.Deferred.exceptionHook=function(t,e){n.console&&n.console.warn&&t&&jt.test(t.name)&&n.console.warn("jQuery.Deferred exception: "+t.message,t.stack,e)},yt.readyException=function(t){n.setTimeout(function(){throw t})};var Nt=yt.Deferred();yt.fn.ready=function(t){return Nt.then(t).catch(function(t){yt.readyException(t)}),this},yt.extend({isReady:!1,readyWait:1,ready:function(t){(!0===t?--yt.readyWait:yt.isReady)||(yt.isReady=!0,!0!==t&&--yt.readyWait>0||Nt.resolveWith(at,[yt]))}}),yt.ready.then=Nt.then,"complete"===at.readyState||"loading"!==at.readyState&&!at.documentElement.doScroll?n.setTimeout(yt.ready):(at.addEventListener("DOMContentLoaded",v),n.addEventListener("load",v));var Dt=function(t,e,n,r,i,o,a){var s=0,u=t.length,c=null==n;if("object"===yt.type(n)){i=!0;for(s in n)Dt(t,e,s,n[s],!0,o,a)}else if(void 0!==r&&(i=!0,yt.isFunction(r)||(a=!0),c&&(a?(e.call(t,r),e=null):(c=e,e=function(t,e,n){return c.call(yt(t),n)})),e))for(;s1,null,!0)},removeData:function(t){return this.each(function(){Rt.remove(this,t)})}}),yt.extend({queue:function(t,e,n){var r;if(t)return e=(e||"fx")+"queue",r=Lt.get(t,e),n&&(!r||Array.isArray(n)?r=Lt.access(t,e,yt.makeArray(n)):r.push(n)),r||[]},dequeue:function(t,e){e=e||"fx";var n=yt.queue(t,e),r=n.length,i=n.shift(),o=yt._queueHooks(t,e),a=function(){yt.dequeue(t,e)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===e&&n.unshift("inprogress"),delete o.stop,i.call(t,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(t,e){var n=e+"queueHooks";return Lt.get(t,n)||Lt.access(t,n,{empty:yt.Callbacks("once memory").add(function(){Lt.remove(t,[e+"queue",n])})})}}),yt.fn.extend({queue:function(t,e){var n=2;return"string"!=typeof t&&(e=t,t="fx",n--),arguments.length\x20\t\r\n\f]+)/i,Xt=/^$|\/(?:java|ecma)script/i,Kt={option:[1,""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};Kt.optgroup=Kt.option,Kt.tbody=Kt.tfoot=Kt.colgroup=Kt.caption=Kt.thead,Kt.th=Kt.td;var Jt=/<|&#?\w+;/;!function(){var t=at.createDocumentFragment(),e=t.appendChild(at.createElement("div")),n=at.createElement("input");n.setAttribute("type","radio"),n.setAttribute("checked","checked"),n.setAttribute("name","t"),e.appendChild(n),mt.checkClone=e.cloneNode(!0).cloneNode(!0).lastChild.checked,e.innerHTML="",mt.noCloneChecked=!!e.cloneNode(!0).lastChild.defaultValue}();var Qt=at.documentElement,Gt=/^key/,Zt=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Yt=/^([^.]*)(?:\.(.+)|)/;yt.event={global:{},add:function(t,e,n,r,i){var o,a,s,u,c,l,f,p,d,h,v,g=Lt.get(t);if(g)for(n.handler&&(o=n,n=o.handler,i=o.selector),i&&yt.find.matchesSelector(Qt,i),n.guid||(n.guid=yt.guid++),(u=g.events)||(u=g.events={}),(a=g.handle)||(a=g.handle=function(e){return void 0!==yt&&yt.event.triggered!==e.type?yt.event.dispatch.apply(t,arguments):void 0}),e=(e||"").match(Ot)||[""],c=e.length;c--;)s=Yt.exec(e[c])||[],d=v=s[1],h=(s[2]||"").split(".").sort(),d&&(f=yt.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=yt.event.special[d]||{},l=yt.extend({type:d,origType:v,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&yt.expr.match.needsContext.test(i),namespace:h.join(".")},o),(p=u[d])||(p=u[d]=[],p.delegateCount=0,f.setup&&!1!==f.setup.call(t,r,h,a)||t.addEventListener&&t.addEventListener(d,a)),f.add&&(f.add.call(t,l),l.handler.guid||(l.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,l):p.push(l),yt.event.global[d]=!0)},remove:function(t,e,n,r,i){var o,a,s,u,c,l,f,p,d,h,v,g=Lt.hasData(t)&&Lt.get(t);if(g&&(u=g.events)){for(e=(e||"").match(Ot)||[""],c=e.length;c--;)if(s=Yt.exec(e[c])||[],d=v=s[1],h=(s[2]||"").split(".").sort(),d){for(f=yt.event.special[d]||{},d=(r?f.delegateType:f.bindType)||d,p=u[d]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;o--;)l=p[o],!i&&v!==l.origType||n&&n.guid!==l.guid||s&&!s.test(l.namespace)||r&&r!==l.selector&&("**"!==r||!l.selector)||(p.splice(o,1),l.selector&&p.delegateCount--,f.remove&&f.remove.call(t,l));a&&!p.length&&(f.teardown&&!1!==f.teardown.call(t,h,g.handle)||yt.removeEvent(t,d,g.handle),delete u[d])}else for(d in u)yt.event.remove(t,d+e[c],n,r,!0);yt.isEmptyObject(u)&&Lt.remove(t,"handle events")}},dispatch:function(t){var e,n,r,i,o,a,s=yt.event.fix(t),u=new Array(arguments.length),c=(Lt.get(this,"events")||{})[s.type]||[],l=yt.event.special[s.type]||{};for(u[0]=s,e=1;e=1))for(;c!==this;c=c.parentNode||this)if(1===c.nodeType&&("click"!==t.type||!0!==c.disabled)){for(o=[],a={},n=0;n-1:yt.find(i,this,null,[c]).length),a[i]&&o.push(r);o.length&&s.push({elem:c,handlers:o})}return c=this,u\s*$/g;yt.extend({htmlPrefilter:function(t){return t.replace(/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,"<$1>")},clone:function(t,e,n){var r,i,o,a,s=t.cloneNode(!0),u=yt.contains(t.ownerDocument,t);if(!(mt.noCloneChecked||1!==t.nodeType&&11!==t.nodeType||yt.isXMLDoc(t)))for(a=x(s),o=x(t),r=0,i=o.length;r0&&C(a,!u&&x(t,"script")),s},cleanData:function(t){for(var e,n,r,i=yt.event.special,o=0;void 0!==(n=t[o]);o++)if(It(n)){if(e=n[Lt.expando]){if(e.events)for(r in e.events)i[r]?yt.event.remove(n,r):yt.removeEvent(n,r,e.handle);n[Lt.expando]=void 0}n[Rt.expando]&&(n[Rt.expando]=void 0)}}}),yt.fn.extend({detach:function(t){return L(this,t,!0)},remove:function(t){return L(this,t)},text:function(t){return Dt(this,function(t){return void 0===t?yt.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=t)})},null,t,arguments.length)},append:function(){return I(this,arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){S(this,t).appendChild(t)}})},prepend:function(){return I(this,arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=S(this,t);e.insertBefore(t,e.firstChild)}})},before:function(){return I(this,arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this)})},after:function(){return I(this,arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this.nextSibling)})},empty:function(){for(var t,e=0;null!=(t=this[e]);e++)1===t.nodeType&&(yt.cleanData(x(t,!1)),t.textContent="");return this},clone:function(t,e){return t=null!=t&&t,e=null==e?t:e,this.map(function(){return yt.clone(this,t,e)})},html:function(t){return Dt(this,function(t){var e=this[0]||{},n=0,r=this.length;if(void 0===t&&1===e.nodeType)return e.innerHTML;if("string"==typeof t&&!te.test(t)&&!Kt[(Vt.exec(t)||["",""])[1].toLowerCase()]){t=yt.htmlPrefilter(t);try{for(;n1)}}),yt.Tween=U,U.prototype={constructor:U,init:function(t,e,n,r,i,o){this.elem=t,this.prop=n,this.easing=i||yt.easing._default,this.options=e,this.start=this.now=this.cur(),this.end=r,this.unit=o||(yt.cssNumber[n]?"":"px")},cur:function(){var t=U.propHooks[this.prop];return t&&t.get?t.get(this):U.propHooks._default.get(this)},run:function(t){var e,n=U.propHooks[this.prop];return this.options.duration?this.pos=e=yt.easing[this.easing](t,this.options.duration*t,0,1,this.options.duration):this.pos=e=t,this.now=(this.end-this.start)*e+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):U.propHooks._default.set(this),this}},U.prototype.init.prototype=U.prototype,U.propHooks={_default:{get:function(t){var e;return 1!==t.elem.nodeType||null!=t.elem[t.prop]&&null==t.elem.style[t.prop]?t.elem[t.prop]:(e=yt.css(t.elem,t.prop,""),e&&"auto"!==e?e:0)},set:function(t){yt.fx.step[t.prop]?yt.fx.step[t.prop](t):1!==t.elem.nodeType||null==t.elem.style[yt.cssProps[t.prop]]&&!yt.cssHooks[t.prop]?t.elem[t.prop]=t.now:yt.style(t.elem,t.prop,t.now+t.unit)}}},U.propHooks.scrollTop=U.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},yt.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2},_default:"swing"},yt.fx=U.prototype.init,yt.fx.step={};var de,he,ve=/^(?:toggle|show|hide)$/,ge=/queueHooks$/;yt.Animation=yt.extend(Q,{tweeners:{"*":[function(t,e){var n=this.createTween(t,e);return b(n.elem,t,Mt.exec(e),n),n}]},tweener:function(t,e){yt.isFunction(t)?(e=t,t=["*"]):t=t.match(Ot);for(var n,r=0,i=t.length;r1)},removeAttr:function(t){return this.each(function(){yt.removeAttr(this,t)})}}),yt.extend({attr:function(t,e,n){var r,i,o=t.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===t.getAttribute?yt.prop(t,e,n):(1===o&&yt.isXMLDoc(t)||(i=yt.attrHooks[e.toLowerCase()]||(yt.expr.match.bool.test(e)?me:void 0)),void 0!==n?null===n?void yt.removeAttr(t,e):i&&"set"in i&&void 0!==(r=i.set(t,n,e))?r:(t.setAttribute(e,n+""),n):i&&"get"in i&&null!==(r=i.get(t,e))?r:(r=yt.find.attr(t,e),null==r?void 0:r))},attrHooks:{type:{set:function(t,e){if(!mt.radioValue&&"radio"===e&&u(t,"input")){var n=t.value;return t.setAttribute("type",e),n&&(t.value=n),e}}}},removeAttr:function(t,e){var n,r=0,i=e&&e.match(Ot);if(i&&1===t.nodeType)for(;n=i[r++];)t.removeAttribute(n)}}),me={set:function(t,e,n){return!1===e?yt.removeAttr(t,n):t.setAttribute(n,n),n}},yt.each(yt.expr.match.bool.source.match(/\w+/g),function(t,e){var n=ye[e]||yt.find.attr;ye[e]=function(t,e,r){var i,o,a=e.toLowerCase();return r||(o=ye[a],ye[a]=i,i=null!=n(t,e,r)?a:null,ye[a]=o),i}});var be=/^(?:input|select|textarea|button)$/i,_e=/^(?:a|area)$/i;yt.fn.extend({prop:function(t,e){return Dt(this,yt.prop,t,e,arguments.length>1)},removeProp:function(t){return this.each(function(){delete this[yt.propFix[t]||t]})}}),yt.extend({prop:function(t,e,n){var r,i,o=t.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&yt.isXMLDoc(t)||(e=yt.propFix[e]||e,i=yt.propHooks[e]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(t,n,e))?r:t[e]=n:i&&"get"in i&&null!==(r=i.get(t,e))?r:t[e]},propHooks:{tabIndex:{get:function(t){var e=yt.find.attr(t,"tabindex");return e?parseInt(e,10):be.test(t.nodeName)||_e.test(t.nodeName)&&t.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),mt.optSelected||(yt.propHooks.selected={get:function(t){var e=t.parentNode;return e&&e.parentNode&&e.parentNode.selectedIndex,null},set:function(t){var e=t.parentNode;e&&(e.selectedIndex,e.parentNode&&e.parentNode.selectedIndex)}}),yt.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){yt.propFix[this.toLowerCase()]=this}),yt.fn.extend({addClass:function(t){var e,n,r,i,o,a,s,u=0;if(yt.isFunction(t))return this.each(function(e){yt(this).addClass(t.call(this,e,Z(this)))});if("string"==typeof t&&t)for(e=t.match(Ot)||[];n=this[u++];)if(i=Z(n),r=1===n.nodeType&&" "+G(i)+" "){for(a=0;o=e[a++];)r.indexOf(" "+o+" ")<0&&(r+=o+" ");s=G(r),i!==s&&n.setAttribute("class",s)}return this},removeClass:function(t){var e,n,r,i,o,a,s,u=0;if(yt.isFunction(t))return this.each(function(e){yt(this).removeClass(t.call(this,e,Z(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof t&&t)for(e=t.match(Ot)||[];n=this[u++];)if(i=Z(n),r=1===n.nodeType&&" "+G(i)+" "){for(a=0;o=e[a++];)for(;r.indexOf(" "+o+" ")>-1;)r=r.replace(" "+o+" "," ");s=G(r),i!==s&&n.setAttribute("class",s)}return this},toggleClass:function(t,e){var n=typeof t;return"boolean"==typeof e&&"string"===n?e?this.addClass(t):this.removeClass(t):yt.isFunction(t)?this.each(function(n){yt(this).toggleClass(t.call(this,n,Z(this),e),e)}):this.each(function(){var e,r,i,o;if("string"===n)for(r=0,i=yt(this),o=t.match(Ot)||[];e=o[r++];)i.hasClass(e)?i.removeClass(e):i.addClass(e);else void 0!==t&&"boolean"!==n||(e=Z(this),e&&Lt.set(this,"__className__",e),this.setAttribute&&this.setAttribute("class",e||!1===t?"":Lt.get(this,"__className__")||""))})},hasClass:function(t){var e,n,r=0;for(e=" "+t+" ";n=this[r++];)if(1===n.nodeType&&(" "+G(Z(n))+" ").indexOf(e)>-1)return!0;return!1}});yt.fn.extend({val:function(t){var e,n,r,i=this[0];{if(arguments.length)return r=yt.isFunction(t),this.each(function(n){var i;1===this.nodeType&&(i=r?t.call(this,n,yt(this).val()):t,null==i?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=yt.map(i,function(t){return null==t?"":t+""})),(e=yt.valHooks[this.type]||yt.valHooks[this.nodeName.toLowerCase()])&&"set"in e&&void 0!==e.set(this,i,"value")||(this.value=i))});if(i)return(e=yt.valHooks[i.type]||yt.valHooks[i.nodeName.toLowerCase()])&&"get"in e&&void 0!==(n=e.get(i,"value"))?n:(n=i.value,"string"==typeof n?n.replace(/\r/g,""):null==n?"":n)}}}),yt.extend({valHooks:{option:{get:function(t){var e=yt.find.attr(t,"value");return null!=e?e:G(yt.text(t))}},select:{get:function(t){var e,n,r,i=t.options,o=t.selectedIndex,a="select-one"===t.type,s=a?null:[],c=a?o+1:i.length;for(r=o<0?c:a?o:0;r-1)&&(n=!0);return n||(t.selectedIndex=-1),o}}}}),yt.each(["radio","checkbox"],function(){yt.valHooks[this]={set:function(t,e){if(Array.isArray(e))return t.checked=yt.inArray(yt(t).val(),e)>-1}},mt.checkOn||(yt.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})});var we=/^(?:focusinfocus|focusoutblur)$/;yt.extend(yt.event,{trigger:function(t,e,r,i){var o,a,s,u,c,l,f,p=[r||at],d=ht.call(t,"type")?t.type:t,h=ht.call(t,"namespace")?t.namespace.split("."):[];if(a=s=r=r||at,3!==r.nodeType&&8!==r.nodeType&&!we.test(d+yt.event.triggered)&&(d.indexOf(".")>-1&&(h=d.split("."),d=h.shift(),h.sort()),c=d.indexOf(":")<0&&"on"+d,t=t[yt.expando]?t:new yt.Event(d,"object"==typeof t&&t),t.isTrigger=i?2:3,t.namespace=h.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=r),e=null==e?[t]:yt.makeArray(e,[t]),f=yt.event.special[d]||{},i||!f.trigger||!1!==f.trigger.apply(r,e))){if(!i&&!f.noBubble&&!yt.isWindow(r)){for(u=f.delegateType||d,we.test(u+d)||(a=a.parentNode);a;a=a.parentNode)p.push(a),s=a;s===(r.ownerDocument||at)&&p.push(s.defaultView||s.parentWindow||n)}for(o=0;(a=p[o++])&&!t.isPropagationStopped();)t.type=o>1?u:f.bindType||d,l=(Lt.get(a,"events")||{})[t.type]&&Lt.get(a,"handle"),l&&l.apply(a,e),(l=c&&a[c])&&l.apply&&It(a)&&(t.result=l.apply(a,e),!1===t.result&&t.preventDefault());return t.type=d,i||t.isDefaultPrevented()||f._default&&!1!==f._default.apply(p.pop(),e)||!It(r)||c&&yt.isFunction(r[d])&&!yt.isWindow(r)&&(s=r[c],s&&(r[c]=null),yt.event.triggered=d,r[d](),yt.event.triggered=void 0,s&&(r[c]=s)),t.result}},simulate:function(t,e,n){var r=yt.extend(new yt.Event,n,{type:t,isSimulated:!0});yt.event.trigger(r,null,e)}}),yt.fn.extend({trigger:function(t,e){return this.each(function(){yt.event.trigger(t,e,this)})},triggerHandler:function(t,e){var n=this[0];if(n)return yt.event.trigger(t,e,n,!0)}}),yt.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(t,e){yt.fn[e]=function(t,n){return arguments.length>0?this.on(e,null,t,n):this.trigger(e)}}),yt.fn.extend({hover:function(t,e){return this.mouseenter(t).mouseleave(e||t)}}),mt.focusin="onfocusin"in n,mt.focusin||yt.each({focus:"focusin",blur:"focusout"},function(t,e){var n=function(t){yt.event.simulate(e,t.target,yt.event.fix(t))};yt.event.special[e]={setup:function(){var r=this.ownerDocument||this,i=Lt.access(r,e);i||r.addEventListener(t,n,!0),Lt.access(r,e,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this,i=Lt.access(r,e)-1;i?Lt.access(r,e,i):(r.removeEventListener(t,n,!0),Lt.remove(r,e))}}});var xe=n.location,Ce=yt.now(),Te=/\?/;yt.parseXML=function(t){var e;if(!t||"string"!=typeof t)return null;try{e=(new n.DOMParser).parseFromString(t,"text/xml")}catch(t){e=void 0}return e&&!e.getElementsByTagName("parsererror").length||yt.error("Invalid XML: "+t),e};var $e=/\[\]$/,ke=/^(?:submit|button|image|reset|file)$/i,Ae=/^(?:input|select|textarea|keygen)/i;yt.param=function(t,e){var n,r=[],i=function(t,e){var n=yt.isFunction(e)?e():e;r[r.length]=encodeURIComponent(t)+"="+encodeURIComponent(null==n?"":n)};if(Array.isArray(t)||t.jquery&&!yt.isPlainObject(t))yt.each(t,function(){i(this.name,this.value)});else for(n in t)Y(n,t[n],e,i);return r.join("&")},yt.fn.extend({serialize:function(){return yt.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var t=yt.prop(this,"elements");return t?yt.makeArray(t):this}).filter(function(){var t=this.type;return this.name&&!yt(this).is(":disabled")&&Ae.test(this.nodeName)&&!ke.test(t)&&(this.checked||!zt.test(t))}).map(function(t,e){var n=yt(this).val();return null==n?null:Array.isArray(n)?yt.map(n,function(t){return{name:e.name,value:t.replace(/\r?\n/g,"\r\n")}}):{name:e.name,value:n.replace(/\r?\n/g,"\r\n")}}).get()}});var Ee=/^(.*?):[ \t]*([^\r\n]*)$/gm,Se=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Oe=/^(?:GET|HEAD)$/,je={},Ne={},De="*/".concat("*"),Ie=at.createElement("a");Ie.href=xe.href,yt.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:xe.href,type:"GET",isLocal:Se.test(xe.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":De,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":yt.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?nt(nt(t,yt.ajaxSettings),e):nt(yt.ajaxSettings,t)},ajaxPrefilter:tt(je),ajaxTransport:tt(Ne),ajax:function(t,e){function r(t,e,r,s){var c,p,d,_,w,x=e;l||(l=!0,u&&n.clearTimeout(u),i=void 0,a=s||"",C.readyState=t>0?4:0,c=t>=200&&t<300||304===t,r&&(_=rt(h,C,r)),_=it(h,_,C,c),c?(h.ifModified&&(w=C.getResponseHeader("Last-Modified"),w&&(yt.lastModified[o]=w),(w=C.getResponseHeader("etag"))&&(yt.etag[o]=w)),204===t||"HEAD"===h.type?x="nocontent":304===t?x="notmodified":(x=_.state,p=_.data,d=_.error,c=!d)):(d=x,!t&&x||(x="error",t<0&&(t=0))),C.status=t,C.statusText=(e||x)+"",c?m.resolveWith(v,[p,x,C]):m.rejectWith(v,[C,x,d]),C.statusCode(b),b=void 0,f&&g.trigger(c?"ajaxSuccess":"ajaxError",[C,h,c?p:d]),y.fireWith(v,[C,x]),f&&(g.trigger("ajaxComplete",[C,h]),--yt.active||yt.event.trigger("ajaxStop")))}"object"==typeof t&&(e=t,t=void 0),e=e||{};var i,o,a,s,u,c,l,f,p,d,h=yt.ajaxSetup({},e),v=h.context||h,g=h.context&&(v.nodeType||v.jquery)?yt(v):yt.event,m=yt.Deferred(),y=yt.Callbacks("once memory"),b=h.statusCode||{},_={},w={},x="canceled",C={readyState:0,getResponseHeader:function(t){var e;if(l){if(!s)for(s={};e=Ee.exec(a);)s[e[1].toLowerCase()]=e[2];e=s[t.toLowerCase()]}return null==e?null:e},getAllResponseHeaders:function(){return l?a:null},setRequestHeader:function(t,e){return null==l&&(t=w[t.toLowerCase()]=w[t.toLowerCase()]||t,_[t]=e),this},overrideMimeType:function(t){return null==l&&(h.mimeType=t),this},statusCode:function(t){var e;if(t)if(l)C.always(t[C.status]);else for(e in t)b[e]=[b[e],t[e]];return this},abort:function(t){var e=t||x;return i&&i.abort(e),r(0,e),this}};if(m.promise(C),h.url=((t||h.url||xe.href)+"").replace(/^\/\//,xe.protocol+"//"),h.type=e.method||e.type||h.method||h.type,h.dataTypes=(h.dataType||"*").toLowerCase().match(Ot)||[""],null==h.crossDomain){c=at.createElement("a");try{c.href=h.url,c.href=c.href,h.crossDomain=Ie.protocol+"//"+Ie.host!=c.protocol+"//"+c.host}catch(t){h.crossDomain=!0}}if(h.data&&h.processData&&"string"!=typeof h.data&&(h.data=yt.param(h.data,h.traditional)),et(je,h,e,C),l)return C;f=yt.event&&h.global,f&&0==yt.active++&&yt.event.trigger("ajaxStart"),h.type=h.type.toUpperCase(),h.hasContent=!Oe.test(h.type),o=h.url.replace(/#.*$/,""),h.hasContent?h.data&&h.processData&&0===(h.contentType||"").indexOf("application/x-www-form-urlencoded")&&(h.data=h.data.replace(/%20/g,"+")):(d=h.url.slice(o.length),h.data&&(o+=(Te.test(o)?"&":"?")+h.data,delete h.data),!1===h.cache&&(o=o.replace(/([?&])_=[^&]*/,"$1"),d=(Te.test(o)?"&":"?")+"_="+Ce+++d),h.url=o+d),h.ifModified&&(yt.lastModified[o]&&C.setRequestHeader("If-Modified-Since",yt.lastModified[o]),yt.etag[o]&&C.setRequestHeader("If-None-Match",yt.etag[o])),(h.data&&h.hasContent&&!1!==h.contentType||e.contentType)&&C.setRequestHeader("Content-Type",h.contentType),C.setRequestHeader("Accept",h.dataTypes[0]&&h.accepts[h.dataTypes[0]]?h.accepts[h.dataTypes[0]]+("*"!==h.dataTypes[0]?", "+De+"; q=0.01":""):h.accepts["*"]);for(p in h.headers)C.setRequestHeader(p,h.headers[p]);if(h.beforeSend&&(!1===h.beforeSend.call(v,C,h)||l))return C.abort();if(x="abort",y.add(h.complete),C.done(h.success),C.fail(h.error),i=et(Ne,h,e,C)){if(C.readyState=1,f&&g.trigger("ajaxSend",[C,h]),l)return C;h.async&&h.timeout>0&&(u=n.setTimeout(function(){C.abort("timeout")},h.timeout));try{l=!1,i.send(_,r)}catch(t){if(l)throw t;r(-1,t)}}else r(-1,"No Transport");return C},getJSON:function(t,e,n){return yt.get(t,e,n,"json")},getScript:function(t,e){return yt.get(t,void 0,e,"script")}}),yt.each(["get","post"],function(t,e){yt[e]=function(t,n,r,i){return yt.isFunction(n)&&(i=i||r,r=n,n=void 0),yt.ajax(yt.extend({url:t,type:e,dataType:i,data:n,success:r},yt.isPlainObject(t)&&t))}}),yt._evalUrl=function(t){return yt.ajax({url:t,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,throws:!0})},yt.fn.extend({wrapAll:function(t){var e;return this[0]&&(yt.isFunction(t)&&(t=t.call(this[0])),e=yt(t,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&e.insertBefore(this[0]),e.map(function(){for(var t=this;t.firstElementChild;)t=t.firstElementChild;return t}).append(this)),this},wrapInner:function(t){return yt.isFunction(t)?this.each(function(e){yt(this).wrapInner(t.call(this,e))}):this.each(function(){var e=yt(this),n=e.contents();n.length?n.wrapAll(t):e.append(t)})},wrap:function(t){var e=yt.isFunction(t);return this.each(function(n){yt(this).wrapAll(e?t.call(this,n):t)})},unwrap:function(t){return this.parent(t).not("body").each(function(){yt(this).replaceWith(this.childNodes)}),this}}),yt.expr.pseudos.hidden=function(t){return!yt.expr.pseudos.visible(t)},yt.expr.pseudos.visible=function(t){return!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)},yt.ajaxSettings.xhr=function(){try{return new n.XMLHttpRequest}catch(t){}};var Le={0:200,1223:204},Re=yt.ajaxSettings.xhr();mt.cors=!!Re&&"withCredentials"in Re,mt.ajax=Re=!!Re,yt.ajaxTransport(function(t){var e,r;if(mt.cors||Re&&!t.crossDomain)return{send:function(i,o){var a,s=t.xhr();if(s.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(a in t.xhrFields)s[a]=t.xhrFields[a];t.mimeType&&s.overrideMimeType&&s.overrideMimeType(t.mimeType),t.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest");for(a in i)s.setRequestHeader(a,i[a]);e=function(t){return function(){e&&(e=r=s.onload=s.onerror=s.onabort=s.onreadystatechange=null,"abort"===t?s.abort():"error"===t?"number"!=typeof s.status?o(0,"error"):o(s.status,s.statusText):o(Le[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=e(),r=s.onerror=e("error"),void 0!==s.onabort?s.onabort=r:s.onreadystatechange=function(){4===s.readyState&&n.setTimeout(function(){e&&r()})},e=e("abort");try{s.send(t.hasContent&&t.data||null)}catch(t){if(e)throw t}},abort:function(){e&&e()}}}),yt.ajaxPrefilter(function(t){t.crossDomain&&(t.contents.script=!1)}),yt.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(t){return yt.globalEval(t),t}}}),yt.ajaxPrefilter("script",function(t){void 0===t.cache&&(t.cache=!1),t.crossDomain&&(t.type="GET")}),yt.ajaxTransport("script",function(t){if(t.crossDomain){var e,n;return{send:function(r,i){e=yt("