Carga inicial
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Administrador;
|
||||
|
||||
use App\Models\Cliente;
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
use Illuminate\Validation\Rule;
|
||||
|
||||
class ClientesDomiciliosRequest extends FormRequest
|
||||
{
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
'nombre_sucursal'=>'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'
|
||||
];
|
||||
}
|
||||
}
|
||||
84
app/Http/Requests/Administrador/ClientesRequest.php
Normal file
84
app/Http/Requests/Administrador/ClientesRequest.php
Normal file
@@ -0,0 +1,84 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Administrador;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class ClientesRequest extends FormRequest
|
||||
{
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
if($this->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'
|
||||
];
|
||||
}
|
||||
}
|
||||
}
|
||||
54
app/Http/Requests/Administrador/EstatusServiciosRequest.php
Normal file
54
app/Http/Requests/Administrador/EstatusServiciosRequest.php
Normal file
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Administrador;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class EstatusServiciosRequest extends FormRequest
|
||||
{
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
if($this->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;
|
||||
}
|
||||
}
|
||||
48
app/Http/Requests/Administrador/FormasPagosRequest.php
Normal file
48
app/Http/Requests/Administrador/FormasPagosRequest.php
Normal file
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
namespace App\Http\Requests\Administrador;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class FormasPagosRequest extends FormRequest
|
||||
{
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
if($this->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;
|
||||
}
|
||||
}
|
||||
61
app/Http/Requests/Administrador/RolesRequest.php
Normal file
61
app/Http/Requests/Administrador/RolesRequest.php
Normal file
@@ -0,0 +1,61 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Administrador;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class RolesRequest extends FormRequest
|
||||
{
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
if ($this->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;
|
||||
}
|
||||
}
|
||||
50
app/Http/Requests/Administrador/ServiciosRequest.php
Normal file
50
app/Http/Requests/Administrador/ServiciosRequest.php
Normal file
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Administrador;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class ServiciosRequest extends FormRequest
|
||||
{
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
if($this->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;
|
||||
}
|
||||
}
|
||||
66
app/Http/Requests/Administrador/SucursalesRequest.php
Normal file
66
app/Http/Requests/Administrador/SucursalesRequest.php
Normal file
@@ -0,0 +1,66 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Administrador;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class SucursalesRequest extends FormRequest
|
||||
{
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
if($this->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;
|
||||
}
|
||||
}
|
||||
50
app/Http/Requests/Administrador/TiposServiciosRequest.php
Normal file
50
app/Http/Requests/Administrador/TiposServiciosRequest.php
Normal file
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Administrador;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class TiposServiciosRequest extends FormRequest
|
||||
{
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
if($this->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;
|
||||
}
|
||||
}
|
||||
48
app/Http/Requests/Administrador/TiposVehiculosRequest.php
Normal file
48
app/Http/Requests/Administrador/TiposVehiculosRequest.php
Normal file
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
namespace App\Http\Requests\Administrador;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class TiposVehiculosRequest extends FormRequest
|
||||
{
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
if($this->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;
|
||||
}
|
||||
}
|
||||
64
app/Http/Requests/Administrador/UserRequest.php
Normal file
64
app/Http/Requests/Administrador/UserRequest.php
Normal file
@@ -0,0 +1,64 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Administrador;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class UserRequest extends FormRequest
|
||||
{
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
if($this->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;
|
||||
}
|
||||
}
|
||||
53
app/Http/Requests/Administrador/VehiculosRequest.php
Normal file
53
app/Http/Requests/Administrador/VehiculosRequest.php
Normal file
@@ -0,0 +1,53 @@
|
||||
<?php
|
||||
namespace App\Http\Requests\Administrador;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class VehiculosRequest extends FormRequest
|
||||
{
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
if($this->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;
|
||||
}
|
||||
}
|
||||
30
app/Http/Requests/AtencionCliente/LitrajeRequest.php
Normal file
30
app/Http/Requests/AtencionCliente/LitrajeRequest.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\AtencionCliente;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class LitrajeRequest extends FormRequest
|
||||
{
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
'litraje' => 'required|integer'
|
||||
];
|
||||
}
|
||||
}
|
||||
83
app/Http/Requests/AtencionCliente/ServiciosRequest.php
Normal file
83
app/Http/Requests/AtencionCliente/ServiciosRequest.php
Normal file
@@ -0,0 +1,83 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\AtencionCliente;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class ServiciosRequest extends FormRequest
|
||||
{
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
if($this->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;
|
||||
}
|
||||
}
|
||||
33
app/Http/Requests/LoginRequest.php
Normal file
33
app/Http/Requests/LoginRequest.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class LoginRequest extends FormRequest
|
||||
{
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
'email' => 'required',
|
||||
'password' => 'required',
|
||||
'dispositivo_id' => 'string|nullable',
|
||||
'version_apk' => 'string|nullable'
|
||||
];
|
||||
}
|
||||
}
|
||||
34
app/Http/Requests/Operador/DesplazamientoRequest.php
Normal file
34
app/Http/Requests/Operador/DesplazamientoRequest.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Operador;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class DesplazamientoRequest extends FormRequest
|
||||
{
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
'*.lat' => 'required|numeric',
|
||||
'*.lng' => 'required|numeric',
|
||||
'*.modelo_celular' => 'string|required',
|
||||
'*.bateria' => 'numeric|required|max:100',
|
||||
'*.fecha' => 'required|date_format:"Y-m-d H:i:s"'
|
||||
];
|
||||
}
|
||||
}
|
||||
34
app/Http/Requests/Operador/FinalizarJornadaRequest.php
Normal file
34
app/Http/Requests/Operador/FinalizarJornadaRequest.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Operador;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class FinalizarJornadaRequest extends FormRequest
|
||||
{
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
'kilometraje_final' => 'numeric|required',
|
||||
'lat_fin' => 'required|numeric',
|
||||
'lng_fin' => 'required|numeric',
|
||||
'modelo_celular' => 'string|required',
|
||||
'bateria' => 'numeric|required|max:100'
|
||||
];
|
||||
}
|
||||
}
|
||||
36
app/Http/Requests/Operador/FinalizarServicioRequest.php
Normal file
36
app/Http/Requests/Operador/FinalizarServicioRequest.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Operador;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class FinalizarServicioRequest extends FormRequest
|
||||
{
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
'servicio_enc_id' => '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'
|
||||
];
|
||||
}
|
||||
}
|
||||
34
app/Http/Requests/Operador/GuardarEvidenciaRequest.php
Normal file
34
app/Http/Requests/Operador/GuardarEvidenciaRequest.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Operador;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class GuardarEvidenciaRequest extends FormRequest
|
||||
{
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
'servicio_enc_id' => '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',
|
||||
];
|
||||
}
|
||||
}
|
||||
31
app/Http/Requests/Operador/GuardarFirmaRequest.php
Normal file
31
app/Http/Requests/Operador/GuardarFirmaRequest.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Operador;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class GuardarFirmaRequest extends FormRequest
|
||||
{
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
'servicio_enc_id' => 'alpha_num|required|exists:servicios_enc,id',
|
||||
'servicio_det_id' => 'alpha_num|required|exists:servicios_det,id',
|
||||
];
|
||||
}
|
||||
}
|
||||
34
app/Http/Requests/Operador/IniciarServicioRequest.php
Normal file
34
app/Http/Requests/Operador/IniciarServicioRequest.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Operador;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class IniciarServicioRequest extends FormRequest
|
||||
{
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
'servicio_enc_id' => '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',
|
||||
];
|
||||
}
|
||||
}
|
||||
35
app/Http/Requests/Operador/InicioJornadaRequest.php
Normal file
35
app/Http/Requests/Operador/InicioJornadaRequest.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Operador;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class InicioJornadaRequest extends FormRequest
|
||||
{
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
'kilometraje_inicial' => 'numeric|required',
|
||||
'lat_ini' => 'required|numeric',
|
||||
'lng_ini' => 'required|numeric',
|
||||
'modelo_celular' => 'string|required',
|
||||
'bateria' => 'numeric|required|max:100',
|
||||
'token_firebase' => 'string|required'
|
||||
];
|
||||
}
|
||||
}
|
||||
30
app/Http/Requests/Operador/RechazarSolicitudRequest.php
Normal file
30
app/Http/Requests/Operador/RechazarSolicitudRequest.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Operador;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class RechazarSolicitudRequest extends FormRequest
|
||||
{
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
'observacion' => 'string|required|max:255',
|
||||
];
|
||||
}
|
||||
}
|
||||
38
app/Http/Requests/Operador/RespuestasOperadorRequest.php
Normal file
38
app/Http/Requests/Operador/RespuestasOperadorRequest.php
Normal file
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Operador;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class RespuestasOperadorRequest extends FormRequest
|
||||
{
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
'*.nombre' => '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'
|
||||
];
|
||||
}
|
||||
}
|
||||
30
app/Http/Requests/Operador/UltimaIncidenciaRequest.php
Normal file
30
app/Http/Requests/Operador/UltimaIncidenciaRequest.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Operador;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class UltimaIncidenciaRequest extends FormRequest
|
||||
{
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
'vehiculo_id' => 'integer|required|exists:cat_vehiculos,id',
|
||||
];
|
||||
}
|
||||
}
|
||||
30
app/Http/Requests/Operador/VehiculosIncidenciasRequest.php
Normal file
30
app/Http/Requests/Operador/VehiculosIncidenciasRequest.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Operador;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class VehiculosIncidenciasRequest extends FormRequest
|
||||
{
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
'descripcion' => 'string|required|',
|
||||
];
|
||||
}
|
||||
}
|
||||
33
app/Http/Requests/Reportes/CapacidadAprovechadaRequest.php
Normal file
33
app/Http/Requests/Reportes/CapacidadAprovechadaRequest.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Reportes;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class CapacidadAprovechadaRequest extends FormRequest
|
||||
{
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
'sucursal' => 'alpha_num|required',
|
||||
'fecha_inicio' => 'required|date_format:"Y-m-d"',
|
||||
'fecha_final' => 'required|date_format:"Y-m-d"',
|
||||
'vehiculo_id' => 'alpha_num|required',
|
||||
];
|
||||
}
|
||||
}
|
||||
32
app/Http/Requests/Reportes/ConsultarAsesoresRequest.php
Normal file
32
app/Http/Requests/Reportes/ConsultarAsesoresRequest.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Reportes;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class ConsultarAsesoresRequest extends FormRequest
|
||||
{
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
'sucursal' => 'alpha_num|required',
|
||||
'fecha_inicio' => 'required|date_format:"Y-m-d"',
|
||||
'fecha_final' => 'required|date_format:"Y-m-d"'
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Reportes;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class ConsultarAtencionClientesRequest extends FormRequest
|
||||
{
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
'sucursal' => 'alpha_num|required',
|
||||
'fecha_inicio' => 'required|date_format:"Y-m-d"',
|
||||
'fecha_final' => 'required|date_format:"Y-m-d"',
|
||||
'definio' => 'alpha_num|required',
|
||||
];
|
||||
}
|
||||
}
|
||||
32
app/Http/Requests/Reportes/ConsultarClientesRequest.php
Normal file
32
app/Http/Requests/Reportes/ConsultarClientesRequest.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Reportes;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class ConsultarClientesRequest extends FormRequest
|
||||
{
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
'sucursal' => 'alpha_num|required',
|
||||
'fecha_inicio' => 'required|date_format:"Y-m-d"',
|
||||
'fecha_final' => 'required|date_format:"Y-m-d"'
|
||||
];
|
||||
}
|
||||
}
|
||||
32
app/Http/Requests/Reportes/ConsultarVehiculosRequest.php
Normal file
32
app/Http/Requests/Reportes/ConsultarVehiculosRequest.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Reportes;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class ConsultarVehiculosRequest extends FormRequest
|
||||
{
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
'sucursal' => 'alpha_num|required',
|
||||
'fecha_inicio' => 'required|date_format:"Y-m-d"',
|
||||
'fecha_final' => 'required|date_format:"Y-m-d"'
|
||||
];
|
||||
}
|
||||
}
|
||||
31
app/Http/Requests/Reportes/EncuestasGeneralRequest.php
Normal file
31
app/Http/Requests/Reportes/EncuestasGeneralRequest.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Reportes;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class EncuestasGeneralRequest extends FormRequest
|
||||
{
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
'sucursal' => 'alpha_num|required',
|
||||
'mes' => 'required'
|
||||
];
|
||||
}
|
||||
}
|
||||
31
app/Http/Requests/Reportes/FiltroAsesoresRequest.php
Normal file
31
app/Http/Requests/Reportes/FiltroAsesoresRequest.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Reportes;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class FiltroAsesoresRequest extends FormRequest
|
||||
{
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
'sucursal' => 'alpha_num|required',
|
||||
'mes' => 'required'
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Reportes;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class ProductividadAtencionClientesRequest extends FormRequest
|
||||
{
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
'sucursal' => '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',
|
||||
];
|
||||
}
|
||||
}
|
||||
33
app/Http/Requests/Reportes/ServiciosAsesoresRequest.php
Normal file
33
app/Http/Requests/Reportes/ServiciosAsesoresRequest.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Reportes;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class ServiciosAsesoresRequest extends FormRequest
|
||||
{
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
'sucursal' => 'alpha_num|required',
|
||||
'fecha_inicio' => 'required|date_format:"Y-m-d"',
|
||||
'fecha_final' => 'required|date_format:"Y-m-d"',
|
||||
'usuario_id' => 'alpha_num|required',
|
||||
];
|
||||
}
|
||||
}
|
||||
33
app/Http/Requests/Reportes/ServiciosClientesRequest.php
Normal file
33
app/Http/Requests/Reportes/ServiciosClientesRequest.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Reportes;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class ServiciosClientesRequest extends FormRequest
|
||||
{
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
'sucursal' => 'alpha_num|required',
|
||||
'fecha_inicio' => 'required|date_format:"Y-m-d"',
|
||||
'fecha_final' => 'required|date_format:"Y-m-d"',
|
||||
'cliente_id' => 'alpha_num|required',
|
||||
];
|
||||
}
|
||||
}
|
||||
36
app/Http/Requests/Reportes/ServiciosRequest.php
Normal file
36
app/Http/Requests/Reportes/ServiciosRequest.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Reportes;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class ServiciosRequest extends FormRequest
|
||||
{
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
'sucursal' => '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',
|
||||
];
|
||||
}
|
||||
}
|
||||
30
app/Http/Requests/TokenFirebaseRequest.php
Normal file
30
app/Http/Requests/TokenFirebaseRequest.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class TokenFirebaseRequest extends FormRequest
|
||||
{
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
'token_firebase' => 'string|required',
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user