Fix búsqueda en tiempo real, paginación, OneSignal, bancos/categorías y vistas auth
- ajaxcrud.js: fix race condition en búsqueda, abort de requests en vuelo
- Layout: mover @yield('js') después de app.js para corregir orden de carga
- Paginación: useBootstrapFour() + eliminar wrappers <ul> duplicados en 17 vistas
- OneSignal: migrar de UserTag iChamba_ID a ExternalId en controladores
- API: agregar endpoint GET /api/banks y campos rfc/bank/bank_account/fee en hero()
- Seeders: BanksSeeder (239 bancos) y CategoriesSeeder (100 categorías)
- Auth views: corregir padding/scroll en register, login, password reset
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -9,212 +9,154 @@ use Illuminate\Http\Request;
|
|||||||
use App\Http\Controllers\Controller;
|
use App\Http\Controllers\Controller;
|
||||||
use Illuminate\Support\Facades\Auth;
|
use Illuminate\Support\Facades\Auth;
|
||||||
use Illuminate\Support\Facades\Validator;
|
use Illuminate\Support\Facades\Validator;
|
||||||
use Illuminate\Support\Str;
|
use Kreait\Laravel\Firebase\Facades\Firebase;
|
||||||
use Socialite;
|
|
||||||
use Route;
|
|
||||||
use Config;
|
|
||||||
|
|
||||||
class AuthController extends Controller
|
class AuthController extends Controller
|
||||||
{
|
{
|
||||||
public function login(Request $request) {
|
public function login(Request $request)
|
||||||
|
{
|
||||||
$request->validate([
|
$request->validate([
|
||||||
'email' => 'required|string|email',
|
'email' => 'required|string|email',
|
||||||
'password' => 'required|string',
|
'password' => 'required|string',
|
||||||
//'remember_me' => 'boolean'
|
|
||||||
]);
|
]);
|
||||||
$credentials = request(['email', 'password']);
|
|
||||||
if(!Auth::attempt($credentials))
|
if (!Auth::attempt($request->only('email', 'password'))) {
|
||||||
return response()->json([
|
return response()->json(['message' => 'Unauthorized'], 401);
|
||||||
'message' => 'Unauthorized'
|
}
|
||||||
], 401);
|
|
||||||
$user = $request->user();
|
$user = $request->user();
|
||||||
$tokenResult = $user->createToken('Personal Access Token');
|
$tokenResult = $user->createToken('Personal Access Token');
|
||||||
$token = $tokenResult->token;
|
|
||||||
if ($request->remember_me)
|
if ($request->remember_me) {
|
||||||
$token->expires_at = Carbon::now()->addWeeks(1);
|
$tokenResult->token->expires_at = Carbon::now()->addWeeks(1);
|
||||||
$token->save();
|
$tokenResult->token->save();
|
||||||
|
}
|
||||||
|
|
||||||
return response()->json([
|
return response()->json([
|
||||||
'access_token' => $tokenResult->accessToken,
|
'access_token' => $tokenResult->accessToken,
|
||||||
'token_type' => 'Bearer',
|
'token_type' => 'Bearer',
|
||||||
'expires_at' => Carbon::parse(
|
'expires_at' => Carbon::parse($tokenResult->token->expires_at)->toDateTimeString(),
|
||||||
$tokenResult->token->expires_at
|
|
||||||
)->toDateTimeString(),
|
|
||||||
'userid' => $user->id,
|
'userid' => $user->id,
|
||||||
'role' => $user->role_id,
|
'role' => $user->role_id,
|
||||||
'verified' => $user->phone_verified_at,
|
'verified' => $user->phone_verified_at,
|
||||||
'reported' => $user->reported
|
'reported' => $user->reported,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function fb(Request $request)
|
public function firebase(Request $request)
|
||||||
{
|
{
|
||||||
$params = [
|
$request->validate(['firebase_token' => 'required|string']);
|
||||||
'grant_type' => 'social',
|
|
||||||
'client_id' => '2', // it should be password grant client
|
|
||||||
'client_secret' => config('app.secret'),
|
|
||||||
'provider' => 'facebook',
|
|
||||||
'access_token' => $request->access_token // access token from provider
|
|
||||||
];
|
|
||||||
|
|
||||||
$requestToken = Request::create("/oauth/token", "POST", $params);
|
try {
|
||||||
$response = app()->handle($requestToken);
|
$verifiedToken = Firebase::auth()->verifyIdToken($request->firebase_token);
|
||||||
$json = json_decode($response->content(), true);
|
} catch (\Throwable $e) {
|
||||||
$user = User::where('social_id', $request->social_id) -> first();
|
return response()->json(['message' => 'Token de Firebase inválido'], 401);
|
||||||
$frontend = json_encode([
|
}
|
||||||
'token_type' => $json['token_type'],
|
|
||||||
'expires_at' => $json['expires_in'],
|
$uid = $verifiedToken->claims()->get('sub');
|
||||||
'access_token' => $json['access_token'],
|
$email = $verifiedToken->claims()->get('email');
|
||||||
|
$name = $verifiedToken->claims()->get('name') ?? 'Usuario';
|
||||||
|
|
||||||
|
// Buscar por firebase uid primero, luego por email para hacer merge si ya existía cuenta
|
||||||
|
$user = User::where('social_id', 'firebase|' . $uid)->first();
|
||||||
|
|
||||||
|
if (!$user && $email) {
|
||||||
|
$user = User::where('email', $email)->first();
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($user) {
|
||||||
|
// Vincular uid de Firebase si aún no lo tiene (merge de cuenta existente)
|
||||||
|
if (!$user->social_id) {
|
||||||
|
$user->social_id = 'firebase|' . $uid;
|
||||||
|
$user->save();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$user = User::create([
|
||||||
|
'name' => $name,
|
||||||
|
'email' => $email,
|
||||||
|
'social_id'=> 'firebase|' . $uid,
|
||||||
|
'role_id' => 1,
|
||||||
|
'password' => null,
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
$tokenResult = $user->createToken('Firebase Token');
|
||||||
|
|
||||||
|
return response()->json([
|
||||||
|
'access_token' => $tokenResult->accessToken,
|
||||||
|
'token_type' => 'Bearer',
|
||||||
|
'expires_at' => Carbon::parse($tokenResult->token->expires_at)->toDateTimeString(),
|
||||||
'userid' => $user->id,
|
'userid' => $user->id,
|
||||||
'role' => $user->role_id,
|
'role' => $user->role_id,
|
||||||
'verified' => $user->phone_verified_at,
|
'verified' => $user->phone_verified_at,
|
||||||
'reported' => $user->reported
|
'reported' => $user->reported,
|
||||||
]);
|
]);
|
||||||
return $frontend;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function google(Request $request)
|
|
||||||
{
|
|
||||||
$params = [
|
|
||||||
'grant_type' => 'social',
|
|
||||||
'client_id' => '2', // it should be password grant client
|
|
||||||
'client_secret' => config('app.secret'),
|
|
||||||
'provider' => 'google',
|
|
||||||
'access_token' => $request->access_token // access token from provider
|
|
||||||
];
|
|
||||||
|
|
||||||
$requestToken = Request::create("/oauth/token", "POST", $params);
|
|
||||||
$response = app()->handle($requestToken);
|
|
||||||
$json = json_decode($response->content(), true);
|
|
||||||
$user = User::where('social_id', $request->social_id) -> first();
|
|
||||||
$frontend = json_encode([
|
|
||||||
'token_type' => $json['token_type'],
|
|
||||||
'expires_at' => $json['expires_in'],
|
|
||||||
'access_token' => $json['access_token'],
|
|
||||||
'userid' => $user->id,
|
|
||||||
'role' => $user->role_id,
|
|
||||||
'verified' => $user->phone_verified_at,
|
|
||||||
'reported' => $user->reported
|
|
||||||
]);
|
|
||||||
return $frontend;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function apple(Request $request)
|
|
||||||
{
|
|
||||||
$params = [
|
|
||||||
'grant_type' => 'social',
|
|
||||||
'client_id' => '2', // it should be password grant client
|
|
||||||
'client_secret' => config('app.secret'),
|
|
||||||
'provider' => 'apple',
|
|
||||||
'access_token' => $request->access_token // access token from provider
|
|
||||||
];
|
|
||||||
|
|
||||||
$requestToken = Request::create("/oauth/token", "POST", $params);
|
|
||||||
$response = app()->handle($requestToken);
|
|
||||||
$json = json_decode($response->content(), true);
|
|
||||||
$user = User::where('social_id', $request->social_id) -> first();
|
|
||||||
$frontend = json_encode([
|
|
||||||
'token_type' => $json['token_type'],
|
|
||||||
'expires_at' => $json['expires_in'],
|
|
||||||
'access_token' => $json['access_token'],
|
|
||||||
'userid' => $user->id,
|
|
||||||
'role' => $user->role_id,
|
|
||||||
'verified' => $user->phone_verified_at,
|
|
||||||
'reported' => $user->reported
|
|
||||||
]);
|
|
||||||
return $frontend;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public function register(Request $request)
|
public function register(Request $request)
|
||||||
{
|
{
|
||||||
$rules = [
|
$validator = Validator::make($request->all(), [
|
||||||
'name' => 'required|string|regex:/(^[a-zA-Z\s ÑñÁáÉéÍíÓóÚúÜü]+$)+/',
|
'name' => 'required|string|regex:/(^[a-zA-Z\s ÑñÁáÉéÍíÓóÚúÜü]+$)+/',
|
||||||
'email' => 'required|string|email|unique:users',
|
'email' => 'required|string|email|unique:users',
|
||||||
'phone' => 'required|numeric',
|
'phone' => 'required|numeric',
|
||||||
'password' => 'required|string',
|
'password' => 'required|string',
|
||||||
'secret' => 'required|string'
|
'secret' => 'required|string',
|
||||||
];
|
], [
|
||||||
|
'email.unique' => 'Correo electrónico ya registrado',
|
||||||
$messages = [
|
]);
|
||||||
'email.unique' => 'Correo electronico ya registrado',
|
|
||||||
];
|
|
||||||
|
|
||||||
$validator = Validator::make($request->all(), $rules, $messages);
|
|
||||||
|
|
||||||
if ($validator->fails()) {
|
if ($validator->fails()) {
|
||||||
return response()->json([
|
return response()->json(['message' => $validator->messages()->first()], 422);
|
||||||
'message' => $validator->messages()->first()
|
|
||||||
], 422);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($request->secret == config('app.pass')) {
|
if ($request->secret !== config('app.pass')) {
|
||||||
|
return response()->json(['message' => 'Unauthorized request'], 401);
|
||||||
/**$verify = new Verify_accounts;
|
|
||||||
$verify->name = $request->name;
|
|
||||||
$verify->email = $request->email;
|
|
||||||
$verify->password = bcrypt($request->password);
|
|
||||||
$verify->token = Str::random(70);
|
|
||||||
|
|
||||||
$verify->save(); */
|
|
||||||
|
|
||||||
$user = new User;
|
|
||||||
$user->name = $request->name;
|
|
||||||
$user->email = $request->email;
|
|
||||||
$user->phone = $request->phone;
|
|
||||||
$user->password = bcrypt($request->password);
|
|
||||||
$user->role_id = "1";
|
|
||||||
$user->save();
|
|
||||||
|
|
||||||
return response()->json([
|
|
||||||
'message' => 'Successfully created user!'
|
|
||||||
], 201);
|
|
||||||
} else {
|
|
||||||
return response()->json([
|
|
||||||
'message' => 'Unauthorized request'
|
|
||||||
], 401);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$user = User::create([
|
||||||
|
'name' => $request->name,
|
||||||
|
'email' => $request->email,
|
||||||
|
'phone' => $request->phone,
|
||||||
|
'password' => bcrypt($request->password),
|
||||||
|
'role_id' => 1,
|
||||||
|
]);
|
||||||
|
|
||||||
|
return response()->json(['message' => 'Successfully created user!'], 201);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function logout(Request $request)
|
public function logout(Request $request)
|
||||||
{
|
{
|
||||||
$request->user()->token()->revoke();
|
$request->user()->currentAccessToken()->revoke();
|
||||||
return response()->json([
|
|
||||||
'message' => 'Successfully logged out'
|
return response()->json(['message' => 'Successfully logged out']);
|
||||||
]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the authenticated User
|
|
||||||
*
|
|
||||||
* @return [json] user object
|
|
||||||
*/
|
|
||||||
public function user(Request $request)
|
public function user(Request $request)
|
||||||
{
|
{
|
||||||
return response()->json($request->user());
|
return response()->json($request->user());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function checkemail($token)
|
|
||||||
{
|
|
||||||
$verifyUser = Verify_accounts::where('token', $token)->first();
|
|
||||||
$user = new User;
|
|
||||||
$user->name = $verifyUser->name;
|
|
||||||
$user->email = $verifyUser->email;
|
|
||||||
$user->password = $verifyUser->password;
|
|
||||||
$user->role_id = "1";
|
|
||||||
$user->save();
|
|
||||||
Verify_accounts::destroy($verifyUser->id);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function verify(Request $request)
|
public function verify(Request $request)
|
||||||
{
|
{
|
||||||
$user = $request->user();
|
$user = $request->user();
|
||||||
|
|
||||||
$user->phone = $request->phone;
|
$user->phone = $request->phone;
|
||||||
$user->phone_verified_at = date("Y-m-d H:i:s");
|
$user->phone_verified_at = now();
|
||||||
|
|
||||||
$user->save();
|
$user->save();
|
||||||
|
|
||||||
return response()->json([
|
return response()->json(['message' => 'Successfully updated']);
|
||||||
'message' => 'Successfully updated'
|
}
|
||||||
|
|
||||||
|
public function checkemail($token)
|
||||||
|
{
|
||||||
|
$verifyUser = Verify_accounts::where('token', $token)->firstOrFail();
|
||||||
|
|
||||||
|
User::create([
|
||||||
|
'name' => $verifyUser->name,
|
||||||
|
'email' => $verifyUser->email,
|
||||||
|
'password' => $verifyUser->password,
|
||||||
|
'role_id' => 1,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
Verify_accounts::destroy($verifyUser->id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -357,16 +357,11 @@ class ContractController extends Controller
|
|||||||
Postulations::destroy($request->postulation_id);
|
Postulations::destroy($request->postulation_id);
|
||||||
|
|
||||||
//Notify the suppliers that they have been hired
|
//Notify the suppliers that they have been hired
|
||||||
OneSignal::sendNotificationUsingTags(
|
OneSignal::sendNotificationToExternalUser(
|
||||||
"Dirígete a la sección de postulaciones contratadas en la app para ver más detalles",
|
"Dirígete a la sección de postulaciones contratadas en la app para ver más detalles",
|
||||||
array(
|
(string) $supplier->user_id,
|
||||||
["field" => "tag", "key" => "iChamba_ID", "relation" => "=", "value" => $supplier->user_id]
|
null, null, null, null,
|
||||||
),
|
"Proveedor: has sido contratado"
|
||||||
$url = null,
|
|
||||||
$data = null,
|
|
||||||
$buttons = null,
|
|
||||||
$schedule = null,
|
|
||||||
$headings = "Proveedor: has sido contratado"
|
|
||||||
);
|
);
|
||||||
// TODO: Configurar WhatsApp cuando esté disponible
|
// TODO: Configurar WhatsApp cuando esté disponible
|
||||||
// Whatsapp::send($supplier->user->phone, Messages\TemplateMessage::create()
|
// Whatsapp::send($supplier->user->phone, Messages\TemplateMessage::create()
|
||||||
@@ -377,16 +372,12 @@ class ContractController extends Controller
|
|||||||
// ])));
|
// ])));
|
||||||
|
|
||||||
//Schedule a notification for the suppliers about their appointment
|
//Schedule a notification for the suppliers about their appointment
|
||||||
OneSignal::sendNotificationUsingTags(
|
OneSignal::sendNotificationToExternalUser(
|
||||||
"Tienes un servicio en " . $contract->address . " hoy en 30 minutos. Dirígete a la sección de postulaciones contratados para más detalles",
|
"Tienes un servicio en " . $contract->address . " hoy en 30 minutos. Dirígete a la sección de postulaciones contratados para más detalles",
|
||||||
array(
|
(string) $supplier->user_id,
|
||||||
["field" => "tag", "key" => "iChamba_ID", "relation" => "=", "value" => $supplier->user_id]
|
null, null, null,
|
||||||
),
|
$delay_UTC,
|
||||||
$url = null,
|
"Proveedor, no olvides tu cita de hoy"
|
||||||
$data = null,
|
|
||||||
$buttons = null,
|
|
||||||
$schedule = $delay_UTC,
|
|
||||||
$headings = "Proveedor, no olvides tu cita de hoy"
|
|
||||||
);
|
);
|
||||||
// TODO: Configurar WhatsApp cuando esté disponible
|
// TODO: Configurar WhatsApp cuando esté disponible
|
||||||
// Whatsapp::send($supplier->user->phone, Messages\TemplateMessage::create()
|
// Whatsapp::send($supplier->user->phone, Messages\TemplateMessage::create()
|
||||||
@@ -398,16 +389,12 @@ class ContractController extends Controller
|
|||||||
|
|
||||||
|
|
||||||
//Schedule a notification for the users about their appointment
|
//Schedule a notification for the users about their appointment
|
||||||
OneSignal::sendNotificationUsingTags(
|
OneSignal::sendNotificationToExternalUser(
|
||||||
"Tienes un servicio agendado hoy en " . $contract->address . " en 30 minutos. Dirígete a la sección de contratos confirmados para más detalles",
|
"Tienes un servicio agendado hoy en " . $contract->address . " en 30 minutos. Dirígete a la sección de contratos confirmados para más detalles",
|
||||||
array(
|
(string) $user->id,
|
||||||
["field" => "tag", "key" => "iChamba_ID", "relation" => "=", "value" => $user->id]
|
null, null, null,
|
||||||
),
|
$delay_UTC,
|
||||||
$url = null,
|
$user->name . ", no olvides tu cita de hoy"
|
||||||
$data = null,
|
|
||||||
$buttons = null,
|
|
||||||
$schedule = $delay_UTC,
|
|
||||||
$headings = $user->name . ", no olvides tu cita de hoy"
|
|
||||||
);
|
);
|
||||||
// TODO: Configurar WhatsApp cuando esté disponible
|
// TODO: Configurar WhatsApp cuando esté disponible
|
||||||
// Whatsapp::send($user->phone, Messages\TemplateMessage::create()
|
// Whatsapp::send($user->phone, Messages\TemplateMessage::create()
|
||||||
@@ -497,16 +484,11 @@ class ContractController extends Controller
|
|||||||
Postulations::destroy($request->postulation_id);
|
Postulations::destroy($request->postulation_id);
|
||||||
|
|
||||||
//Notify the suppliers that they have been hired
|
//Notify the suppliers that they have been hired
|
||||||
OneSignal::sendNotificationUsingTags(
|
OneSignal::sendNotificationToExternalUser(
|
||||||
"Dirígete a la sección de postulaciones contratadas en la app para ver más detalles",
|
"Dirígete a la sección de postulaciones contratadas en la app para ver más detalles",
|
||||||
array(
|
(string) $supplier->user_id,
|
||||||
["field" => "tag", "key" => "iChamba_ID", "relation" => "=", "value" => $supplier->user_id]
|
null, null, null, null,
|
||||||
),
|
"Proveedor: has sido contratado"
|
||||||
$url = null,
|
|
||||||
$data = null,
|
|
||||||
$buttons = null,
|
|
||||||
$schedule = null,
|
|
||||||
$headings = "Proveedor: has sido contratado"
|
|
||||||
);
|
);
|
||||||
// TODO: Configurar WhatsApp cuando esté disponible
|
// TODO: Configurar WhatsApp cuando esté disponible
|
||||||
// Whatsapp::send($supplier->user->phone, Messages\TemplateMessage::create()
|
// Whatsapp::send($supplier->user->phone, Messages\TemplateMessage::create()
|
||||||
@@ -517,16 +499,12 @@ class ContractController extends Controller
|
|||||||
// ])));
|
// ])));
|
||||||
|
|
||||||
//Schedule a notification for the suppliers about their appointment
|
//Schedule a notification for the suppliers about their appointment
|
||||||
OneSignal::sendNotificationUsingTags(
|
OneSignal::sendNotificationToExternalUser(
|
||||||
"Tienes un servicio en " . $contract->address . " hoy en 30 minutos. Dirígete a la sección de postulaciones contratados para más detalles",
|
"Tienes un servicio en " . $contract->address . " hoy en 30 minutos. Dirígete a la sección de postulaciones contratados para más detalles",
|
||||||
array(
|
(string) $supplier->user_id,
|
||||||
["field" => "tag", "key" => "iChamba_ID", "relation" => "=", "value" => $supplier->user_id]
|
null, null, null,
|
||||||
),
|
$delay_UTC,
|
||||||
$url = null,
|
"Proveedor, no olvides tu cita de hoy"
|
||||||
$data = null,
|
|
||||||
$buttons = null,
|
|
||||||
$schedule = $delay_UTC,
|
|
||||||
$headings = "Proveedor, no olvides tu cita de hoy"
|
|
||||||
);
|
);
|
||||||
// TODO: Configurar WhatsApp cuando esté disponible
|
// TODO: Configurar WhatsApp cuando esté disponible
|
||||||
// Whatsapp::send($supplier->user->phone, Messages\TemplateMessage::create()
|
// Whatsapp::send($supplier->user->phone, Messages\TemplateMessage::create()
|
||||||
@@ -538,16 +516,12 @@ class ContractController extends Controller
|
|||||||
|
|
||||||
|
|
||||||
//Schedule a notification for the users about their appointment
|
//Schedule a notification for the users about their appointment
|
||||||
OneSignal::sendNotificationUsingTags(
|
OneSignal::sendNotificationToExternalUser(
|
||||||
"Tienes un servicio agendado hoy en " . $contract->address . " en 30 minutos. Dirígete a la sección de contratos confirmados para más detalles",
|
"Tienes un servicio agendado hoy en " . $contract->address . " en 30 minutos. Dirígete a la sección de contratos confirmados para más detalles",
|
||||||
array(
|
(string) $user->id,
|
||||||
["field" => "tag", "key" => "iChamba_ID", "relation" => "=", "value" => $user->id]
|
null, null, null,
|
||||||
),
|
$delay_UTC,
|
||||||
$url = null,
|
$user->name . ", no olvides tu cita de hoy"
|
||||||
$data = null,
|
|
||||||
$buttons = null,
|
|
||||||
$schedule = $delay_UTC,
|
|
||||||
$headings = $user->name . ", no olvides tu cita de hoy"
|
|
||||||
);
|
);
|
||||||
// TODO: Configurar WhatsApp cuando esté disponible
|
// TODO: Configurar WhatsApp cuando esté disponible
|
||||||
// Whatsapp::send($user->phone, Messages\TemplateMessage::create()
|
// Whatsapp::send($user->phone, Messages\TemplateMessage::create()
|
||||||
@@ -786,16 +760,11 @@ class ContractController extends Controller
|
|||||||
|
|
||||||
CurrentContracts::destroy($request->contract_id);
|
CurrentContracts::destroy($request->contract_id);
|
||||||
|
|
||||||
OneSignal::sendNotificationUsingTags(
|
OneSignal::sendNotificationToExternalUser(
|
||||||
"El servicio en " . $fcontract->address . " el día " . substr($fcontract->appointment, 0, 10) . "ha sido cancelado. Dírigeta a la sección de servicios contratados para más detalles",
|
"El servicio en " . $fcontract->address . " el día " . substr($fcontract->appointment, 0, 10) . "ha sido cancelado. Dírigeta a la sección de servicios contratados para más detalles",
|
||||||
array(
|
(string) $supplier->user_id,
|
||||||
["field" => "tag", "key" => "iChamba_ID", "relation" => "=", "value" => $supplier->user_id]
|
null, null, null, null,
|
||||||
),
|
"Proveedor: un servicio ha sido cancelado"
|
||||||
$url = null,
|
|
||||||
$data = null,
|
|
||||||
$buttons = null,
|
|
||||||
$schedule = null,
|
|
||||||
$headings = "Proveedor: un servicio ha sido cancelado"
|
|
||||||
);
|
);
|
||||||
|
|
||||||
return response()->json([
|
return response()->json([
|
||||||
@@ -867,16 +836,11 @@ class ContractController extends Controller
|
|||||||
$payment->status_id = null;
|
$payment->status_id = null;
|
||||||
$payment->save();
|
$payment->save();
|
||||||
|
|
||||||
OneSignal::sendNotificationUsingTags(
|
OneSignal::sendNotificationToExternalUser(
|
||||||
"El servicio en " . $fcontract->address . " el día " . substr($fcontract->appointment, 0, 10) . " ha sido iniciado. Dírigeta a la sección de servicios contratados para más detalles",
|
"El servicio en " . $fcontract->address . " el día " . substr($fcontract->appointment, 0, 10) . " ha sido iniciado. Dírigeta a la sección de servicios contratados para más detalles",
|
||||||
array(
|
(string) $fcontract->user_id,
|
||||||
["field" => "tag", "key" => "iChamba_ID", "relation" => "=", "value" => $fcontract->user_id]
|
null, null, null, null,
|
||||||
),
|
"Usuario: el proveedor ha iniciado el servicio"
|
||||||
$url = null,
|
|
||||||
$data = null,
|
|
||||||
$buttons = null,
|
|
||||||
$schedule = null,
|
|
||||||
$headings = "Usuario: el proveedor ha iniciado el servicio"
|
|
||||||
);
|
);
|
||||||
|
|
||||||
return response()->json([
|
return response()->json([
|
||||||
|
|||||||
@@ -137,16 +137,11 @@ class NoHomeController extends Controller
|
|||||||
if (Carbon::now()->diffInMinutes($contract->appointment, false) < 10) {
|
if (Carbon::now()->diffInMinutes($contract->appointment, false) < 10) {
|
||||||
return response()->json($contract);
|
return response()->json($contract);
|
||||||
} else {
|
} else {
|
||||||
OneSignal::sendNotificationUsingTags(
|
OneSignal::sendNotificationToExternalUser(
|
||||||
"El proveedor para el servicio en " . $contract->address . " ha llegado. Dírigeta a la sección de contratos confirmados para más detalles",
|
"El proveedor para el servicio en " . $contract->address . " ha llegado. Dírigeta a la sección de contratos confirmados para más detalles",
|
||||||
array(
|
(string) $client->id,
|
||||||
["field" => "tag", "key" => "iChamba_ID", "relation" => "=", "value" => $client->id]
|
null, null, null, null,
|
||||||
),
|
$client->name . ", tu proveedor del servicio ha llegado"
|
||||||
$url = null,
|
|
||||||
$data = null,
|
|
||||||
$buttons = null,
|
|
||||||
$schedule = null,
|
|
||||||
$headings = $client->name . ", tu proveedor del servicio ha llegado"
|
|
||||||
);
|
);
|
||||||
return response()->json([
|
return response()->json([
|
||||||
//'message' => 'Por favor espere a los 10 minutos de tolerancia de la hora acordada'
|
//'message' => 'Por favor espere a los 10 minutos de tolerancia de la hora acordada'
|
||||||
@@ -232,16 +227,11 @@ class NoHomeController extends Controller
|
|||||||
'message' => 'Ausencia registrada con éxito, nos comunicaremos con usted por correo electrónico en caso de alguna circunstancia'
|
'message' => 'Ausencia registrada con éxito, nos comunicaremos con usted por correo electrónico en caso de alguna circunstancia'
|
||||||
]);
|
]);
|
||||||
} else {
|
} else {
|
||||||
OneSignal::sendNotificationUsingTags(
|
OneSignal::sendNotificationToExternalUser(
|
||||||
"El proveedor para el servicio en " . $ccontract->address . " ha llegado. Dírigeta a la sección de contratos confirmados para más detalles",
|
"El proveedor para el servicio en " . $ccontract->address . " ha llegado. Dírigeta a la sección de contratos confirmados para más detalles",
|
||||||
array(
|
(string) $client->id,
|
||||||
["field" => "tag", "key" => "iChamba_ID", "relation" => "=", "value" => $client->id]
|
null, null, null, null,
|
||||||
),
|
$client->name . ", tu proveedor del servicio ha llegado"
|
||||||
$url = null,
|
|
||||||
$data = null,
|
|
||||||
$buttons = null,
|
|
||||||
$schedule = null,
|
|
||||||
$headings = $client->name . ", tu proveedor del servicio ha llegado"
|
|
||||||
);
|
);
|
||||||
return response()->json([
|
return response()->json([
|
||||||
'order' => 'wait',
|
'order' => 'wait',
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ namespace App\Http\Controllers;
|
|||||||
|
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use Illuminate\Support\Facades\Validator;
|
use Illuminate\Support\Facades\Validator;
|
||||||
|
use Illuminate\Pagination\LengthAwarePaginator;
|
||||||
use Carbon\Carbon;
|
use Carbon\Carbon;
|
||||||
use App\Models\User;
|
use App\Models\User;
|
||||||
use App\Models\Suppliers;
|
use App\Models\Suppliers;
|
||||||
@@ -25,32 +26,71 @@ class PaymentController extends Controller
|
|||||||
|
|
||||||
public function index(Request $request)
|
public function index(Request $request)
|
||||||
{
|
{
|
||||||
//
|
$dateFrom = $request->has('date_from') ? strip_tags($request->get('date_from')) : $request->session()->get('pay_date_from', '');
|
||||||
$request->session()->put('search', $request
|
$dateTo = $request->has('date_to') ? strip_tags($request->get('date_to')) : $request->session()->get('pay_date_to', '');
|
||||||
->has('search') ? strip_tags($request->get('search')) : ($request->session()
|
|
||||||
->has('search') ? strip_tags($request->session()->get('search')) : ''));
|
|
||||||
|
|
||||||
$request->session()->put('field', $request
|
if ($request->has('date_from')) $request->session()->put('pay_date_from', $dateFrom);
|
||||||
->has('field') ? strip_tags($request->get('field')) : ($request->session()
|
if ($request->has('date_to')) $request->session()->put('pay_date_to', $dateTo);
|
||||||
->has('field') ? strip_tags($request->session()->get('field')) : 'id'));
|
|
||||||
|
|
||||||
$request->session()->put('sort', $request
|
$contracts = FinishedContracts::with(['suppliers.user', 'suppliers.banks'])
|
||||||
->has('sort') ? strip_tags($request->get('sort')) : ($request->session()
|
->where('status_id', 3)
|
||||||
->has('sort') ? strip_tags($request->session()->get('sort')) : 'asc'));
|
->where('paid', false)
|
||||||
|
->where('transaction_id', '!=', 'NO APPLY')
|
||||||
|
->when($dateFrom, fn($q) => $q->whereDate('appointment', '>=', $dateFrom))
|
||||||
|
->when($dateTo, fn($q) => $q->whereDate('appointment', '<=', $dateTo))
|
||||||
|
->get();
|
||||||
|
|
||||||
//$headers = $request->get('header') != '' ? $request->get('header') : -1;
|
$field = in_array($request->input('field'), ['company_name', 'email', 'rfc_curp', 'clabe', 'bank', 'contract_count', 'total_amount', 'total_revenue', 'total_iva', 'total_isr', 'total_fee'])
|
||||||
|
? $request->input('field')
|
||||||
|
: 'total_amount';
|
||||||
|
$sort = $request->input('sort', 'desc') === 'asc' ? 'asc' : 'desc';
|
||||||
|
|
||||||
$payments = new FinishedContracts();
|
$grouped = $contracts->groupBy('supplier_id')->map(function ($group) {
|
||||||
$payments = $payments->where('status_id', 3)->where('paid', false)->where('transaction_id', '!=', 'NO APPLY')
|
$first = $group->first();
|
||||||
->orderBy(strip_tags($request->session()->get('field')), strip_tags($request->session()->get('sort')))
|
return (object) [
|
||||||
->paginate(10);
|
'suppliers' => $first->suppliers,
|
||||||
|
'contract_count' => $group->count(),
|
||||||
|
'total_amount' => $group->sum('amount'),
|
||||||
|
'total_revenue' => $group->sum('revenue'),
|
||||||
|
'total_iva' => $group->sum('IVA'),
|
||||||
|
'total_isr' => $group->sum('ISR'),
|
||||||
|
'total_fee' => $group->sum('ichamba_fee'),
|
||||||
|
];
|
||||||
|
})->values();
|
||||||
|
|
||||||
|
$sortCallbacks = [
|
||||||
|
'company_name' => fn($r) => optional($r->suppliers)->company_name,
|
||||||
|
'email' => fn($r) => optional(optional($r->suppliers)->user)->email,
|
||||||
|
'rfc_curp' => fn($r) => optional($r->suppliers)->RFC ?: optional($r->suppliers)->CURP,
|
||||||
|
'clabe' => fn($r) => optional($r->suppliers)->clabe,
|
||||||
|
'bank' => fn($r) => optional(optional($r->suppliers)->banks)->name,
|
||||||
|
'contract_count' => fn($r) => $r->contract_count,
|
||||||
|
'total_amount' => fn($r) => $r->total_amount,
|
||||||
|
'total_revenue' => fn($r) => $r->total_revenue,
|
||||||
|
'total_iva' => fn($r) => $r->total_iva,
|
||||||
|
'total_isr' => fn($r) => $r->total_isr,
|
||||||
|
'total_fee' => fn($r) => $r->total_fee,
|
||||||
|
];
|
||||||
|
|
||||||
|
$grouped = $sort === 'asc'
|
||||||
|
? $grouped->sortBy($sortCallbacks[$field])->values()
|
||||||
|
: $grouped->sortByDesc($sortCallbacks[$field])->values();
|
||||||
|
|
||||||
|
$perPage = 15;
|
||||||
|
$page = $request->input('page', 1);
|
||||||
|
$payments = new LengthAwarePaginator(
|
||||||
|
$grouped->slice(($page - 1) * $perPage, $perPage)->values(),
|
||||||
|
$grouped->count(),
|
||||||
|
$perPage,
|
||||||
|
$page,
|
||||||
|
['path' => $request->url(), 'query' => $request->query()]
|
||||||
|
);
|
||||||
|
|
||||||
if ($request->ajax()) {
|
if ($request->ajax()) {
|
||||||
return view('payments.index', compact('payments'));
|
return view('payments.index', compact('payments', 'dateFrom', 'dateTo'));
|
||||||
} else {
|
} else {
|
||||||
return view('payments.ajax', compact('payments'));
|
return view('payments.ajax', compact('payments', 'dateFrom', 'dateTo'));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function cardsindex(Request $request)
|
public function cardsindex(Request $request)
|
||||||
|
|||||||
@@ -129,30 +129,20 @@ class PostulationController extends Controller
|
|||||||
$postulation->details = preg_replace('/\d+/', '', strip_tags($request->details));
|
$postulation->details = preg_replace('/\d+/', '', strip_tags($request->details));
|
||||||
$postulation->save();
|
$postulation->save();
|
||||||
|
|
||||||
OneSignal::sendNotificationUsingTags(
|
OneSignal::sendNotificationToExternalUser(
|
||||||
"Coméntele al Ing. que hay una postulación",
|
"Coméntele al Ing. que hay una postulación",
|
||||||
array(
|
"128",
|
||||||
["field" => "tag", "key" => "iChamba_ID", "relation" => "=", "value" => "128"]
|
null, null, null, null,
|
||||||
),
|
"Admin: hay nueva postulación"
|
||||||
$url = null,
|
|
||||||
$data = null,
|
|
||||||
$buttons = null,
|
|
||||||
$schedule = null,
|
|
||||||
$headings = "Admin: hay nueva postulación"
|
|
||||||
);
|
);
|
||||||
|
|
||||||
foreach ($suppliers as $supplier) {
|
foreach ($suppliers as $supplier) {
|
||||||
if (in_array($category->id, $supplier->categories->pluck('id')->toArray())) {
|
if (in_array($category->id, $supplier->categories->pluck('id')->toArray())) {
|
||||||
OneSignal::sendNotificationUsingTags(
|
OneSignal::sendNotificationToExternalUser(
|
||||||
"Dirígete a la sección de postulaciones en la app para ver más detalles",
|
"Dirígete a la sección de postulaciones en la app para ver más detalles",
|
||||||
array(
|
(string) $supplier->user_id,
|
||||||
["field" => "tag", "key" => "iChamba_ID", "relation" => "=", "value" => $supplier->user_id]
|
null, null, null, null,
|
||||||
),
|
"Proveedor: hay nueva postulación"
|
||||||
$url = null,
|
|
||||||
$data = null,
|
|
||||||
$buttons = null,
|
|
||||||
$schedule = null,
|
|
||||||
$headings = "Proveedor: hay nueva postulación"
|
|
||||||
);
|
);
|
||||||
|
|
||||||
// TODO: Configurar WhatsApp cuando esté disponible
|
// TODO: Configurar WhatsApp cuando esté disponible
|
||||||
@@ -181,16 +171,12 @@ class PostulationController extends Controller
|
|||||||
|
|
||||||
$delay_UTC = Carbon::now()->addMinutes(15)->toString();
|
$delay_UTC = Carbon::now()->addMinutes(15)->toString();
|
||||||
|
|
||||||
OneSignal::sendNotificationUsingTags(
|
OneSignal::sendNotificationToExternalUser(
|
||||||
"Dirígete a la sección de contratos en la app para ver más detalles",
|
"Dirígete a la sección de contratos en la app para ver más detalles",
|
||||||
array(
|
(string) $user->id,
|
||||||
["field" => "tag", "key" => "iChamba_ID", "relation" => "=", "value" => $user->id]
|
null, null, null,
|
||||||
),
|
$delay_UTC,
|
||||||
$url = null,
|
"Búsqueda Finalizada"
|
||||||
$data = null,
|
|
||||||
$buttons = null,
|
|
||||||
$schedule = $delay_UTC,
|
|
||||||
$headings = "Búsqueda Finalizada"
|
|
||||||
);
|
);
|
||||||
|
|
||||||
return response()->json([
|
return response()->json([
|
||||||
@@ -231,16 +217,11 @@ class PostulationController extends Controller
|
|||||||
if ($time_limit > 0) {
|
if ($time_limit > 0) {
|
||||||
if (in_array($postulation->category_id, $supplier->categories->pluck('id')->toArray())) {
|
if (in_array($postulation->category_id, $supplier->categories->pluck('id')->toArray())) {
|
||||||
if($supplier->membership == 1) {
|
if($supplier->membership == 1) {
|
||||||
OneSignal::sendNotificationUsingTags(
|
OneSignal::sendNotificationToExternalUser(
|
||||||
"Dirígete a la sección de contratos en la app para ver más detalles",
|
"Dirígete a la sección de contratos en la app para ver más detalles",
|
||||||
array(
|
(string) $postulation->user_id,
|
||||||
["field" => "tag", "key" => "iChamba_ID", "relation" => "=", "value" => $postulation->user_id]
|
null, null, null, null,
|
||||||
),
|
"Un proveedor certificado se ha postulado"
|
||||||
$url = null,
|
|
||||||
$data = null,
|
|
||||||
$buttons = null,
|
|
||||||
$schedule = null,
|
|
||||||
$headings = "Un proveedor certificado se ha postulado"
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
// TODO: Configurar WhatsApp cuando esté disponible
|
// TODO: Configurar WhatsApp cuando esté disponible
|
||||||
|
|||||||
@@ -367,8 +367,12 @@ class SupplierController extends Controller
|
|||||||
if ($supplier->location) {
|
if ($supplier->location) {
|
||||||
$rules = [
|
$rules = [
|
||||||
'name' => 'required|string',
|
'name' => 'required|string',
|
||||||
|
'rfc' => 'nullable|string',
|
||||||
'categories' => 'required|string',
|
'categories' => 'required|string',
|
||||||
'tags' => 'nullable|string',
|
'tags' => 'nullable|string',
|
||||||
|
'bank' => 'nullable|numeric',
|
||||||
|
'bank_account' => 'nullable|string',
|
||||||
|
'fee' => 'nullable|numeric',
|
||||||
'address' => 'string',
|
'address' => 'string',
|
||||||
'lat' => 'numeric|nullable',
|
'lat' => 'numeric|nullable',
|
||||||
'lng' => 'numeric|nullable',
|
'lng' => 'numeric|nullable',
|
||||||
@@ -411,8 +415,12 @@ class SupplierController extends Controller
|
|||||||
} else {
|
} else {
|
||||||
$rules = [
|
$rules = [
|
||||||
'name' => 'required|string',
|
'name' => 'required|string',
|
||||||
|
'rfc' => 'nullable|string',
|
||||||
'categories' => 'required|string',
|
'categories' => 'required|string',
|
||||||
'tags' => 'nullable|string',
|
'tags' => 'nullable|string',
|
||||||
|
'bank' => 'nullable|numeric',
|
||||||
|
'bank_account' => 'nullable|string',
|
||||||
|
'fee' => 'nullable|numeric',
|
||||||
'address' => 'required|string',
|
'address' => 'required|string',
|
||||||
'lat' => 'required|numeric',
|
'lat' => 'required|numeric',
|
||||||
'lng' => 'required|numeric',
|
'lng' => 'required|numeric',
|
||||||
@@ -423,8 +431,12 @@ class SupplierController extends Controller
|
|||||||
} else {
|
} else {
|
||||||
$rules = [
|
$rules = [
|
||||||
'name' => 'required|string',
|
'name' => 'required|string',
|
||||||
|
'rfc' => 'nullable|string',
|
||||||
'categories' => 'required|string',
|
'categories' => 'required|string',
|
||||||
'tags' => 'nullable|string',
|
'tags' => 'nullable|string',
|
||||||
|
'bank' => 'nullable|numeric',
|
||||||
|
'bank_account' => 'nullable|string',
|
||||||
|
'fee' => 'nullable|numeric',
|
||||||
'address' => 'required|string',
|
'address' => 'required|string',
|
||||||
'lat' => 'required|numeric',
|
'lat' => 'required|numeric',
|
||||||
'lng' => 'required|numeric',
|
'lng' => 'required|numeric',
|
||||||
@@ -537,7 +549,10 @@ class SupplierController extends Controller
|
|||||||
$supplier->regimen = $request->taxes_id;
|
$supplier->regimen = $request->taxes_id;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$supplier->minimun_fee = 150;
|
$supplier->RFC = strip_tags($request->rfc);
|
||||||
|
$supplier->clabe = strip_tags($request->bank_account);
|
||||||
|
$supplier->bank_id = $request->bank;
|
||||||
|
$supplier->minimun_fee = $request->fee ?? 150;
|
||||||
$supplier->address = strip_tags($request->address);
|
$supplier->address = strip_tags($request->address);
|
||||||
if($request->reference_options != 5) {
|
if($request->reference_options != 5) {
|
||||||
$supplier->references = strip_tags($request->reference_options);
|
$supplier->references = strip_tags($request->reference_options);
|
||||||
@@ -595,7 +610,10 @@ class SupplierController extends Controller
|
|||||||
$supplier->regimen = $request->taxes_id;
|
$supplier->regimen = $request->taxes_id;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$supplier->minimun_fee = 150;
|
$supplier->RFC = strip_tags($request->rfc);
|
||||||
|
$supplier->clabe = strip_tags($request->bank_account);
|
||||||
|
$supplier->bank_id = $request->bank;
|
||||||
|
$supplier->minimun_fee = $request->fee ?? 150;
|
||||||
$supplier->address = strip_tags($request->address);
|
$supplier->address = strip_tags($request->address);
|
||||||
if($request->reference_options != 5) {
|
if($request->reference_options != 5) {
|
||||||
$supplier->references = strip_tags($request->reference_options);
|
$supplier->references = strip_tags($request->reference_options);
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ class Kernel extends HttpKernel
|
|||||||
\Illuminate\View\Middleware\ShareErrorsFromSession::class,
|
\Illuminate\View\Middleware\ShareErrorsFromSession::class,
|
||||||
\App\Http\Middleware\VerifyCsrfToken::class,
|
\App\Http\Middleware\VerifyCsrfToken::class,
|
||||||
\Illuminate\Routing\Middleware\SubstituteBindings::class,
|
\Illuminate\Routing\Middleware\SubstituteBindings::class,
|
||||||
|
\App\Http\Middleware\ClearSearchOnSectionChange::class,
|
||||||
],
|
],
|
||||||
|
|
||||||
'api' => [
|
'api' => [
|
||||||
|
|||||||
23
app/Http/Middleware/ClearSearchOnSectionChange.php
Normal file
23
app/Http/Middleware/ClearSearchOnSectionChange.php
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Middleware;
|
||||||
|
|
||||||
|
use Closure;
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
|
||||||
|
class ClearSearchOnSectionChange
|
||||||
|
{
|
||||||
|
public function handle(Request $request, Closure $next)
|
||||||
|
{
|
||||||
|
$section = explode('/', trim($request->path(), '/'))[0];
|
||||||
|
$lastSection = $request->session()->get('_last_section');
|
||||||
|
|
||||||
|
if ($lastSection && $lastSection !== $section) {
|
||||||
|
$request->session()->forget(['search', 'field', 'sort']);
|
||||||
|
}
|
||||||
|
|
||||||
|
$request->session()->put('_last_section', $section);
|
||||||
|
|
||||||
|
return $next($request);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -19,7 +19,7 @@ class Cors
|
|||||||
'https://jobhero.consultoria-as.com',
|
'https://jobhero.consultoria-as.com',
|
||||||
'https://jobhero-api.consultoria-as.com',
|
'https://jobhero-api.consultoria-as.com',
|
||||||
'capacitor://localhost',
|
'capacitor://localhost',
|
||||||
'http://localhost:8100'
|
'http://localhost:4200'
|
||||||
];
|
];
|
||||||
|
|
||||||
$origin = $request->server('HTTP_ORIGIN');
|
$origin = $request->server('HTTP_ORIGIN');
|
||||||
|
|||||||
@@ -2,28 +2,13 @@
|
|||||||
|
|
||||||
namespace App\Providers;
|
namespace App\Providers;
|
||||||
|
|
||||||
use App\Services\SocialUserResolver;
|
|
||||||
use App\Support\FormBuilder;
|
use App\Support\FormBuilder;
|
||||||
use Coderello\SocialGrant\Resolvers\SocialUserResolverInterface;
|
|
||||||
use Illuminate\Support\ServiceProvider;
|
use Illuminate\Support\ServiceProvider;
|
||||||
use Illuminate\Support\Facades\Schema;
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
use Illuminate\Pagination\Paginator;
|
||||||
|
|
||||||
class AppServiceProvider extends ServiceProvider
|
class AppServiceProvider extends ServiceProvider
|
||||||
{
|
{
|
||||||
/**
|
|
||||||
* All of the container bindings that should be registered.
|
|
||||||
*
|
|
||||||
* @var array
|
|
||||||
*/
|
|
||||||
public $bindings = [
|
|
||||||
SocialUserResolverInterface::class => SocialUserResolver::class,
|
|
||||||
];
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Register any application services.
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function register()
|
public function register()
|
||||||
{
|
{
|
||||||
$this->app->singleton('form', function ($app) {
|
$this->app->singleton('form', function ($app) {
|
||||||
@@ -31,14 +16,9 @@ class AppServiceProvider extends ServiceProvider
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Bootstrap any application services.
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function boot()
|
public function boot()
|
||||||
{
|
{
|
||||||
Schema::defaultStringLength(191);
|
Schema::defaultStringLength(191);
|
||||||
//
|
Paginator::useBootstrapFour();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,33 +17,14 @@ class PushNotificationService
|
|||||||
*/
|
*/
|
||||||
public function sendToUser(int $userId, string $message, string $heading = 'JobHero', array $data = [])
|
public function sendToUser(int $userId, string $message, string $heading = 'JobHero', array $data = [])
|
||||||
{
|
{
|
||||||
return OneSignal::sendNotificationUsingTags(
|
return OneSignal::sendNotificationToExternalUser(
|
||||||
$message,
|
$message,
|
||||||
[
|
(string) $userId,
|
||||||
['field' => 'tag', 'key' => 'iChamba_ID', 'relation' => '=', 'value' => (string) $userId]
|
null,
|
||||||
],
|
$data ?: null,
|
||||||
null,
|
null,
|
||||||
null,
|
null,
|
||||||
null,
|
$heading
|
||||||
null,
|
|
||||||
$heading,
|
|
||||||
null,
|
|
||||||
null,
|
|
||||||
null,
|
|
||||||
null,
|
|
||||||
null,
|
|
||||||
null,
|
|
||||||
null,
|
|
||||||
null,
|
|
||||||
null,
|
|
||||||
null,
|
|
||||||
null,
|
|
||||||
null,
|
|
||||||
null,
|
|
||||||
null,
|
|
||||||
null,
|
|
||||||
null,
|
|
||||||
$data
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -77,33 +58,14 @@ class PushNotificationService
|
|||||||
*/
|
*/
|
||||||
public function sendScheduledToUser(int $userId, string $message, string $sendAt, string $heading = 'JobHero', array $data = [])
|
public function sendScheduledToUser(int $userId, string $message, string $sendAt, string $heading = 'JobHero', array $data = [])
|
||||||
{
|
{
|
||||||
return OneSignal::sendNotificationUsingTags(
|
return OneSignal::sendNotificationToExternalUser(
|
||||||
$message,
|
$message,
|
||||||
[
|
(string) $userId,
|
||||||
['field' => 'tag', 'key' => 'iChamba_ID', 'relation' => '=', 'value' => (string) $userId]
|
|
||||||
],
|
|
||||||
null,
|
|
||||||
null,
|
|
||||||
null,
|
|
||||||
null,
|
|
||||||
$heading,
|
|
||||||
null,
|
|
||||||
null,
|
|
||||||
null,
|
|
||||||
null,
|
|
||||||
null,
|
|
||||||
null,
|
null,
|
||||||
|
$data ?: null,
|
||||||
null,
|
null,
|
||||||
$sendAt,
|
$sendAt,
|
||||||
null,
|
$heading
|
||||||
null,
|
|
||||||
null,
|
|
||||||
null,
|
|
||||||
null,
|
|
||||||
null,
|
|
||||||
null,
|
|
||||||
null,
|
|
||||||
$data
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -8,6 +8,13 @@
|
|||||||
],
|
],
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"repositories": [
|
"repositories": [
|
||||||
|
{
|
||||||
|
"type": "path",
|
||||||
|
"url": "C:/Users/ThinPad/AppData/Local/Temp/gonoware-laravel-maps",
|
||||||
|
"options": {
|
||||||
|
"symlink": false
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "vcs",
|
"type": "vcs",
|
||||||
"url": "https://git.consultoria-as.com/consultoria-as/gonoware-laravel-maps"
|
"url": "https://git.consultoria-as.com/consultoria-as/gonoware-laravel-maps"
|
||||||
@@ -16,13 +23,12 @@
|
|||||||
"require": {
|
"require": {
|
||||||
"php": "^8.2",
|
"php": "^8.2",
|
||||||
"berkayk/onesignal-laravel": "^2.0",
|
"berkayk/onesignal-laravel": "^2.0",
|
||||||
"coderello/laravel-passport-social-grant": "^4.0",
|
|
||||||
"gonoware/laravel-maps": "dev-master",
|
"gonoware/laravel-maps": "dev-master",
|
||||||
"google/cloud-storage": "*",
|
"google/cloud-storage": "^1.0",
|
||||||
"guzzlehttp/guzzle": "^7.8",
|
"guzzlehttp/guzzle": "^7.8",
|
||||||
"illuminate/database": "^11.0",
|
|
||||||
"intervention/image": "^3.0",
|
"intervention/image": "^3.0",
|
||||||
"laravel/framework": "^11.0",
|
"kreait/laravel-firebase": "^7.2",
|
||||||
|
"laravel/framework": "^12.0",
|
||||||
"laravel/passport": "^13.0",
|
"laravel/passport": "^13.0",
|
||||||
"laravel/socialite": "^5.10",
|
"laravel/socialite": "^5.10",
|
||||||
"laravel/tinker": "^2.9",
|
"laravel/tinker": "^2.9",
|
||||||
@@ -30,17 +36,17 @@
|
|||||||
"larswiegers/laravel-maps": "^0.19.0",
|
"larswiegers/laravel-maps": "^0.19.0",
|
||||||
"lcobucci/jwt": "^5.0",
|
"lcobucci/jwt": "^5.0",
|
||||||
"mercadopago/dx-php": "^3.5",
|
"mercadopago/dx-php": "^3.5",
|
||||||
"missael-anda/laravel-whatsapp": "^0.8.6",
|
|
||||||
"openpay/sdk": "^2.0",
|
"openpay/sdk": "^2.0",
|
||||||
"spatie/laravel-google-cloud-storage": "^2.3",
|
"spatie/laravel-google-cloud-storage": "^2.3",
|
||||||
"spatie/laravel-html": "^3.0",
|
"spatie/laravel-html": "^3.0",
|
||||||
"tarfin-labs/laravel-spatial": "*",
|
"tarfin-labs/laravel-spatial": "^3.0",
|
||||||
"timehunter/laravel-google-recaptcha-v3": "^2.4"
|
"timehunter/laravel-google-recaptcha-v3": "^2.4"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"fakerphp/faker": "^1.23",
|
"fakerphp/faker": "^1.23",
|
||||||
"laravel/pint": "^1.13",
|
"laravel/pint": "^1.13",
|
||||||
"laravel/sail": "^1.26",
|
"laravel/sail": "^1.26",
|
||||||
|
"laravel/telescope": "^5.20",
|
||||||
"mockery/mockery": "^1.6",
|
"mockery/mockery": "^1.6",
|
||||||
"nunomaduro/collision": "^8.0",
|
"nunomaduro/collision": "^8.0",
|
||||||
"phpunit/phpunit": "^11.0"
|
"phpunit/phpunit": "^11.0"
|
||||||
|
|||||||
2776
composer.lock
generated
2776
composer.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -184,6 +184,7 @@ return [
|
|||||||
// App\Providers\BroadcastServiceProvider::class,
|
// App\Providers\BroadcastServiceProvider::class,
|
||||||
App\Providers\EventServiceProvider::class,
|
App\Providers\EventServiceProvider::class,
|
||||||
App\Providers\RouteServiceProvider::class,
|
App\Providers\RouteServiceProvider::class,
|
||||||
|
App\Providers\TelescopeServiceProvider::class,
|
||||||
|
|
||||||
],
|
],
|
||||||
|
|
||||||
|
|||||||
48
config/passport.php
Normal file
48
config/passport.php
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Passport Guard
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may specify which authentication guard Passport will use when
|
||||||
|
| authenticating users. This value should correspond with one of your
|
||||||
|
| guards that is already present in your "auth" configuration file.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'guard' => 'web',
|
||||||
|
|
||||||
|
'middleware' => [],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Encryption Keys
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Passport uses encryption keys while generating secure access tokens for
|
||||||
|
| your application. By default, the keys are stored as local files but
|
||||||
|
| can be set via environment variables when that is more convenient.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'private_key' => env('PASSPORT_PRIVATE_KEY'),
|
||||||
|
|
||||||
|
'public_key' => env('PASSPORT_PUBLIC_KEY'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Passport Database Connection
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| By default, Passport's models will utilize your application's default
|
||||||
|
| database connection. If you wish to use a different connection you
|
||||||
|
| may specify the configured name of the database connection here.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'connection' => env('PASSPORT_CONNECTION'),
|
||||||
|
|
||||||
|
];
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*/
|
||||||
|
public function up(): void
|
||||||
|
{
|
||||||
|
Schema::create('oauth_auth_codes', function (Blueprint $table) {
|
||||||
|
$table->char('id', 80)->primary();
|
||||||
|
$table->foreignId('user_id')->index();
|
||||||
|
$table->foreignUuid('client_id');
|
||||||
|
$table->text('scopes')->nullable();
|
||||||
|
$table->boolean('revoked');
|
||||||
|
$table->dateTime('expires_at')->nullable();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*/
|
||||||
|
public function down(): void
|
||||||
|
{
|
||||||
|
Schema::dropIfExists('oauth_auth_codes');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the migration connection name.
|
||||||
|
*/
|
||||||
|
public function getConnection(): ?string
|
||||||
|
{
|
||||||
|
return $this->connection ?? config('passport.connection');
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -0,0 +1,41 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*/
|
||||||
|
public function up(): void
|
||||||
|
{
|
||||||
|
Schema::create('oauth_access_tokens', function (Blueprint $table) {
|
||||||
|
$table->char('id', 80)->primary();
|
||||||
|
$table->foreignId('user_id')->nullable()->index();
|
||||||
|
$table->foreignUuid('client_id');
|
||||||
|
$table->string('name')->nullable();
|
||||||
|
$table->text('scopes')->nullable();
|
||||||
|
$table->boolean('revoked');
|
||||||
|
$table->timestamps();
|
||||||
|
$table->dateTime('expires_at')->nullable();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*/
|
||||||
|
public function down(): void
|
||||||
|
{
|
||||||
|
Schema::dropIfExists('oauth_access_tokens');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the migration connection name.
|
||||||
|
*/
|
||||||
|
public function getConnection(): ?string
|
||||||
|
{
|
||||||
|
return $this->connection ?? config('passport.connection');
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*/
|
||||||
|
public function up(): void
|
||||||
|
{
|
||||||
|
Schema::create('oauth_refresh_tokens', function (Blueprint $table) {
|
||||||
|
$table->char('id', 80)->primary();
|
||||||
|
$table->char('access_token_id', 80)->index();
|
||||||
|
$table->boolean('revoked');
|
||||||
|
$table->dateTime('expires_at')->nullable();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*/
|
||||||
|
public function down(): void
|
||||||
|
{
|
||||||
|
Schema::dropIfExists('oauth_refresh_tokens');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the migration connection name.
|
||||||
|
*/
|
||||||
|
public function getConnection(): ?string
|
||||||
|
{
|
||||||
|
return $this->connection ?? config('passport.connection');
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*/
|
||||||
|
public function up(): void
|
||||||
|
{
|
||||||
|
Schema::create('oauth_clients', function (Blueprint $table) {
|
||||||
|
$table->uuid('id')->primary();
|
||||||
|
$table->nullableMorphs('owner');
|
||||||
|
$table->string('name');
|
||||||
|
$table->string('secret')->nullable();
|
||||||
|
$table->string('provider')->nullable();
|
||||||
|
$table->text('redirect_uris');
|
||||||
|
$table->text('grant_types');
|
||||||
|
$table->boolean('revoked');
|
||||||
|
$table->timestamps();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*/
|
||||||
|
public function down(): void
|
||||||
|
{
|
||||||
|
Schema::dropIfExists('oauth_clients');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the migration connection name.
|
||||||
|
*/
|
||||||
|
public function getConnection(): ?string
|
||||||
|
{
|
||||||
|
return $this->connection ?? config('passport.connection');
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -0,0 +1,70 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Get the migration connection name.
|
||||||
|
*/
|
||||||
|
public function getConnection(): ?string
|
||||||
|
{
|
||||||
|
return config('telescope.storage.database.connection');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*/
|
||||||
|
public function up(): void
|
||||||
|
{
|
||||||
|
$schema = Schema::connection($this->getConnection());
|
||||||
|
|
||||||
|
$schema->create('telescope_entries', function (Blueprint $table) {
|
||||||
|
$table->bigIncrements('sequence');
|
||||||
|
$table->uuid('uuid');
|
||||||
|
$table->uuid('batch_id');
|
||||||
|
$table->string('family_hash')->nullable();
|
||||||
|
$table->boolean('should_display_on_index')->default(true);
|
||||||
|
$table->string('type', 20);
|
||||||
|
$table->longText('content');
|
||||||
|
$table->dateTime('created_at')->nullable();
|
||||||
|
|
||||||
|
$table->unique('uuid');
|
||||||
|
$table->index('batch_id');
|
||||||
|
$table->index('family_hash');
|
||||||
|
$table->index('created_at');
|
||||||
|
$table->index(['type', 'should_display_on_index']);
|
||||||
|
});
|
||||||
|
|
||||||
|
$schema->create('telescope_entries_tags', function (Blueprint $table) {
|
||||||
|
$table->uuid('entry_uuid');
|
||||||
|
$table->string('tag');
|
||||||
|
|
||||||
|
$table->primary(['entry_uuid', 'tag']);
|
||||||
|
$table->index('tag');
|
||||||
|
|
||||||
|
$table->foreign('entry_uuid')
|
||||||
|
->references('uuid')
|
||||||
|
->on('telescope_entries')
|
||||||
|
->cascadeOnDelete();
|
||||||
|
});
|
||||||
|
|
||||||
|
$schema->create('telescope_monitoring', function (Blueprint $table) {
|
||||||
|
$table->string('tag')->primary();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*/
|
||||||
|
public function down(): void
|
||||||
|
{
|
||||||
|
$schema = Schema::connection($this->getConnection());
|
||||||
|
|
||||||
|
$schema->dropIfExists('telescope_entries_tags');
|
||||||
|
$schema->dropIfExists('telescope_entries');
|
||||||
|
$schema->dropIfExists('telescope_monitoring');
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -32,7 +32,7 @@ class CreateSuppliersTable extends Migration
|
|||||||
$table->unsignedBigInteger('finished_jobs')->default(1);
|
$table->unsignedBigInteger('finished_jobs')->default(1);
|
||||||
$table->unsignedBigInteger('total_score')->default(3);
|
$table->unsignedBigInteger('total_score')->default(3);
|
||||||
$table->string('address')->nullable();
|
$table->string('address')->nullable();
|
||||||
$table->point('location')->nullable();
|
$table->geography('location', subtype: 'point')->nullable();
|
||||||
$table->boolean('en')->default(false);
|
$table->boolean('en')->default(false);
|
||||||
$table->timestamps();
|
$table->timestamps();
|
||||||
$table->foreign('user_id')->references('id')->on('users')->onDelete('set null');
|
$table->foreign('user_id')->references('id')->on('users')->onDelete('set null');
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ class CreatePostulationsTable extends Migration
|
|||||||
$table->string('address');
|
$table->string('address');
|
||||||
$table->string('int_number')->nullable();
|
$table->string('int_number')->nullable();
|
||||||
$table->text('references')->nullable();
|
$table->text('references')->nullable();
|
||||||
$table->point('location');
|
$table->geography('location', subtype: 'point');
|
||||||
$table->timestamp('appointment')->nullable();
|
$table->timestamp('appointment')->nullable();
|
||||||
$table->float('amount');
|
$table->float('amount');
|
||||||
$table->text('details')->nullable();
|
$table->text('details')->nullable();
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ class CreateFinishedcontractsTable extends Migration
|
|||||||
$table->string('address');
|
$table->string('address');
|
||||||
$table->string('int_number');
|
$table->string('int_number');
|
||||||
$table->text('references')->nullable();
|
$table->text('references')->nullable();
|
||||||
$table->point('location');
|
$table->geography('location', subtype: 'point');
|
||||||
$table->timestamp('appointment')->nullable();
|
$table->timestamp('appointment')->nullable();
|
||||||
$table->float('amount');
|
$table->float('amount');
|
||||||
$table->float('IVA');
|
$table->float('IVA');
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ class CreateCurrentContractsTable extends Migration
|
|||||||
$table->string('address');
|
$table->string('address');
|
||||||
$table->string('int_number');
|
$table->string('int_number');
|
||||||
$table->text('references')->nullable();
|
$table->text('references')->nullable();
|
||||||
$table->point('location');
|
$table->geography('location', subtype: 'point');
|
||||||
$table->timestamp('appointment')->nullable();
|
$table->timestamp('appointment')->nullable();
|
||||||
$table->float('amount');
|
$table->float('amount');
|
||||||
$table->float('IVA');
|
$table->float('IVA');
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ class CreateNoHomesTable extends Migration
|
|||||||
$table->unsignedBigInteger('contract_id');
|
$table->unsignedBigInteger('contract_id');
|
||||||
$table->string('house_photo')->nullable();
|
$table->string('house_photo')->nullable();
|
||||||
$table->string('house_description')->nullable();
|
$table->string('house_description')->nullable();
|
||||||
$table->point('location')->nullable();
|
$table->geography('location', subtype: 'point')->nullable();
|
||||||
$table->timestamp('confirmed_at')->nullable();
|
$table->timestamp('confirmed_at')->nullable();
|
||||||
$table->timestamps();
|
$table->timestamps();
|
||||||
$table->foreign('contract_id')->references('id')->on('finished_contracts')->onDelete('cascade');
|
$table->foreign('contract_id')->references('id')->on('finished_contracts')->onDelete('cascade');
|
||||||
|
|||||||
@@ -0,0 +1,42 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*/
|
||||||
|
public function up(): void
|
||||||
|
{
|
||||||
|
Schema::create('oauth_device_codes', function (Blueprint $table) {
|
||||||
|
$table->char('id', 80)->primary();
|
||||||
|
$table->foreignId('user_id')->nullable()->index();
|
||||||
|
$table->foreignUuid('client_id')->index();
|
||||||
|
$table->char('user_code', 8)->unique();
|
||||||
|
$table->text('scopes');
|
||||||
|
$table->boolean('revoked');
|
||||||
|
$table->dateTime('user_approved_at')->nullable();
|
||||||
|
$table->dateTime('last_polled_at')->nullable();
|
||||||
|
$table->dateTime('expires_at')->nullable();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*/
|
||||||
|
public function down(): void
|
||||||
|
{
|
||||||
|
Schema::dropIfExists('oauth_device_codes');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the migration connection name.
|
||||||
|
*/
|
||||||
|
public function getConnection(): ?string
|
||||||
|
{
|
||||||
|
return $this->connection ?? config('passport.connection');
|
||||||
|
}
|
||||||
|
};
|
||||||
258
database/seeders/BanksSeeder.php
Normal file
258
database/seeders/BanksSeeder.php
Normal file
@@ -0,0 +1,258 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Database\Seeders;
|
||||||
|
|
||||||
|
use Illuminate\Database\Seeder;
|
||||||
|
use Illuminate\Support\Facades\DB;
|
||||||
|
|
||||||
|
class BanksSeeder extends Seeder
|
||||||
|
{
|
||||||
|
public function run()
|
||||||
|
{
|
||||||
|
DB::statement('SET FOREIGN_KEY_CHECKS=0;');
|
||||||
|
DB::table('banks')->truncate();
|
||||||
|
DB::statement('SET FOREIGN_KEY_CHECKS=1;');
|
||||||
|
|
||||||
|
DB::table('banks')->insert([
|
||||||
|
['id' => 1, 'code' => 1, 'name' => 'BANCO DE MEXICO'],
|
||||||
|
['id' => 2, 'code' => 2, 'name' => 'BANCO NACIONAL DE MEXICO'],
|
||||||
|
['id' => 3, 'code' => 3, 'name' => 'BANCA SERFIN'],
|
||||||
|
['id' => 4, 'code' => 4, 'name' => 'BANCO DEL ATLANTICO'],
|
||||||
|
['id' => 5, 'code' => 6, 'name' => 'BANCO NACIONAL DE COMERCIO EXTERIOR'],
|
||||||
|
['id' => 6, 'code' => 7, 'name' => 'CITIBANK'],
|
||||||
|
['id' => 7, 'code' => 8, 'name' => 'BANCO UNION'],
|
||||||
|
['id' => 8, 'code' => 9, 'name' => 'BANCO NACIONAL DE OBRAS PUBLICAS'],
|
||||||
|
['id' => 9, 'code' => 11, 'name' => 'BANCA CONFIA'],
|
||||||
|
['id' => 10, 'code' => 12, 'name' => 'BBVA BANCOMER'],
|
||||||
|
['id' => 11, 'code' => 13, 'name' => 'BANCO INDUSTRIAL'],
|
||||||
|
['id' => 12, 'code' => 14, 'name' => 'SANTANDER'],
|
||||||
|
['id' => 13, 'code' => 16, 'name' => 'BANCO INTERESTATAL'],
|
||||||
|
['id' => 14, 'code' => 17, 'name' => 'BANCO BILBAO VIZCAYA MEXICO'],
|
||||||
|
['id' => 15, 'code' => 19, 'name' => 'BANJERCITO'],
|
||||||
|
['id' => 16, 'code' => 21, 'name' => 'HSBC'],
|
||||||
|
['id' => 17, 'code' => 22, 'name' => 'GE CAPITAL BANK'],
|
||||||
|
['id' => 18, 'code' => 25, 'name' => 'SURESTE'],
|
||||||
|
['id' => 19, 'code' => 26, 'name' => 'BANCO NACIONAL DE COMERCIO INTERIOR'],
|
||||||
|
['id' => 20, 'code' => 28, 'name' => 'CAPITAL'],
|
||||||
|
['id' => 21, 'code' => 30, 'name' => 'BANCO DEL BAJIO'],
|
||||||
|
['id' => 22, 'code' => 32, 'name' => 'IXE BANCO'],
|
||||||
|
['id' => 23, 'code' => 36, 'name' => 'BANCO INBURSA'],
|
||||||
|
['id' => 24, 'code' => 37, 'name' => 'BANCO INTERACCIONES'],
|
||||||
|
['id' => 25, 'code' => 42, 'name' => 'BANCA MIFEL'],
|
||||||
|
['id' => 26, 'code' => 44, 'name' => 'SCOTIABANK INVERLAT'],
|
||||||
|
['id' => 27, 'code' => 47, 'name' => 'BANCO PROMOTOR DEL NORTE'],
|
||||||
|
['id' => 28, 'code' => 56, 'name' => 'BANCA QUADRUMT'],
|
||||||
|
['id' => 29, 'code' => 58, 'name' => 'BANCO REGIONAL DE MONTERREY'],
|
||||||
|
['id' => 30, 'code' => 59, 'name' => 'BANCO INVEX'],
|
||||||
|
['id' => 31, 'code' => 60, 'name' => 'BANSI'],
|
||||||
|
['id' => 32, 'code' => 61, 'name' => 'BANCO DEL ATOYAC'],
|
||||||
|
['id' => 33, 'code' => 62, 'name' => 'BANCO AFIRME'],
|
||||||
|
['id' => 34, 'code' => 63, 'name' => 'BANCO SOFIMEX'],
|
||||||
|
['id' => 35, 'code' => 65, 'name' => 'BANCO ANAHUAC'],
|
||||||
|
['id' => 36, 'code' => 68, 'name' => 'BANCA PROMEX'],
|
||||||
|
['id' => 37, 'code' => 71, 'name' => 'BANPAIS'],
|
||||||
|
['id' => 38, 'code' => 72, 'name' => 'BANORTE'],
|
||||||
|
['id' => 39, 'code' => 83, 'name' => 'BANCO DE ORIENTE'],
|
||||||
|
['id' => 40, 'code' => 86, 'name' => 'BANCO DEL CENTRO'],
|
||||||
|
['id' => 41, 'code' => 90, 'name' => 'BANORO'],
|
||||||
|
['id' => 42, 'code' => 99, 'name' => 'DSAF'],
|
||||||
|
['id' => 43, 'code' => 101, 'name' => 'BANCA CREMI'],
|
||||||
|
['id' => 44, 'code' => 102, 'name' => 'THE ROYAL BANK OF SCOTLAND MEXICO'],
|
||||||
|
['id' => 45, 'code' => 103, 'name' => 'AMERICAN EXPRESS BANK LTD'],
|
||||||
|
['id' => 46, 'code' => 106, 'name' => 'BANK OF AMERICA MEXICO'],
|
||||||
|
['id' => 47, 'code' => 107, 'name' => 'BANK OF BOSTON'],
|
||||||
|
['id' => 48, 'code' => 108, 'name' => 'BANK OF TOKYO MEXICO'],
|
||||||
|
['id' => 49, 'code' => 110, 'name' => 'JPMORGAN CHASE BANK NA'],
|
||||||
|
['id' => 50, 'code' => 112, 'name' => 'BANCO MONEX, S.A.'],
|
||||||
|
['id' => 51, 'code' => 113, 'name' => 'BANCO VE POR MAS S.A. DE C.V.'],
|
||||||
|
['id' => 52, 'code' => 114, 'name' => 'FIRST NAT. BANK OF CHICAGO'],
|
||||||
|
['id' => 53, 'code' => 115, 'name' => 'FUJI BANK'],
|
||||||
|
['id' => 54, 'code' => 116, 'name' => 'ING BANK'],
|
||||||
|
['id' => 55, 'code' => 117, 'name' => 'J P MORGAN'],
|
||||||
|
['id' => 56, 'code' => 118, 'name' => 'NATIONS BANK N.A.'],
|
||||||
|
['id' => 57, 'code' => 123, 'name' => 'SOCIETE GENERALE'],
|
||||||
|
['id' => 58, 'code' => 124, 'name' => 'DEUTSCHE BANK AG NEW YORK'],
|
||||||
|
['id' => 59, 'code' => 128, 'name' => 'BANCO AUTOFIN MEXICO'],
|
||||||
|
['id' => 60, 'code' => 130, 'name' => 'COMPARTAMOS'],
|
||||||
|
['id' => 61, 'code' => 132, 'name' => 'BANCO MULTIVA SOCIEDAD ANONIMA'],
|
||||||
|
['id' => 62, 'code' => 135, 'name' => 'NACIONAL FINANCIERA'],
|
||||||
|
['id' => 63, 'code' => 139, 'name' => 'UBS BANK MEXICO S.A.'],
|
||||||
|
['id' => 64, 'code' => 149, 'name' => 'BANCO NACIONAL DE CREDITO RURAL'],
|
||||||
|
['id' => 65, 'code' => 161, 'name' => 'BANCRECER'],
|
||||||
|
['id' => 66, 'code' => 163, 'name' => 'BANCO OBRERO'],
|
||||||
|
['id' => 67, 'code' => 167, 'name' => 'TESORERIA DE LA FEDERACION'],
|
||||||
|
['id' => 68, 'code' => 168, 'name' => 'SOCIEDAD HIPOTECARIA FEDERAL'],
|
||||||
|
['id' => 69, 'code' => 402, 'name' => 'SCOTIABANK/NOSCATT'],
|
||||||
|
['id' => 70, 'code' => 404, 'name' => 'CREDIT SUISSE'],
|
||||||
|
['id' => 71, 'code' => 405, 'name' => 'LASALLE BANK'],
|
||||||
|
['id' => 72, 'code' => 406, 'name' => 'BANCO BNS (TORONTO)'],
|
||||||
|
['id' => 73, 'code' => 407, 'name' => 'BANKING DEUTSCHE BANK LONDON'],
|
||||||
|
['id' => 74, 'code' => 408, 'name' => 'JP MORGAN CHASE BANK LONDON SWIFT'],
|
||||||
|
['id' => 75, 'code' => 412, 'name' => 'UNIONE DI BANCHE ITALIANE SCPA'],
|
||||||
|
['id' => 76, 'code' => 413, 'name' => 'BANCA POPOLARE DI SONDRIO'],
|
||||||
|
['id' => 77, 'code' => 414, 'name' => 'BANCO FIDES'],
|
||||||
|
['id' => 78, 'code' => 415, 'name' => 'REGIONS BANK'],
|
||||||
|
['id' => 79, 'code' => 416, 'name' => 'BANCO ABN-AMRO BANK NV'],
|
||||||
|
['id' => 80, 'code' => 417, 'name' => 'RAIFFEISEN ZENTRALBANK OSTERREICH AG RZB'],
|
||||||
|
['id' => 81, 'code' => 418, 'name' => 'US BANK NATIONAL ASSOCIATTION'],
|
||||||
|
['id' => 82, 'code' => 501, 'name' => 'BANK OF NEW YORK'],
|
||||||
|
['id' => 83, 'code' => 502, 'name' => 'BANK OF AMERICA.'],
|
||||||
|
['id' => 84, 'code' => 503, 'name' => 'BANK ONE HOUSTON'],
|
||||||
|
['id' => 85, 'code' => 504, 'name' => 'JPMORGAN CHASE BANK NEW YORK'],
|
||||||
|
['id' => 86, 'code' => 506, 'name' => 'JPMORGAN CHASE BANK TEXAS'],
|
||||||
|
['id' => 87, 'code' => 507, 'name' => 'DEL RIO NATIONAL BANK.'],
|
||||||
|
['id' => 88, 'code' => 508, 'name' => 'COMERICA BANK'],
|
||||||
|
['id' => 89, 'code' => 509, 'name' => 'U.S BANK'],
|
||||||
|
['id' => 90, 'code' => 510, 'name' => 'THE LAREDO NATIONAL BANK.'],
|
||||||
|
['id' => 91, 'code' => 511, 'name' => 'NORWEST BANK INTERNATIONAL'],
|
||||||
|
['id' => 92, 'code' => 512, 'name' => 'WELLS FARGO BANK NA'],
|
||||||
|
['id' => 93, 'code' => 513, 'name' => 'NORDEA BANK DENMARK A/S'],
|
||||||
|
['id' => 94, 'code' => 515, 'name' => 'BANK OF SCOTLAND TREASURY'],
|
||||||
|
['id' => 95, 'code' => 516, 'name' => 'BANK ONE ARIZONA'],
|
||||||
|
['id' => 96, 'code' => 517, 'name' => 'BERLINER HANDLES'],
|
||||||
|
['id' => 97, 'code' => 518, 'name' => 'NORWEST BANK MINESOTA'],
|
||||||
|
['id' => 98, 'code' => 519, 'name' => 'SYDBSNK A S'],
|
||||||
|
['id' => 99, 'code' => 520, 'name' => 'FROST NATIONAL BANK.'],
|
||||||
|
['id' => 100, 'code' => 521, 'name' => 'TREASURY BANK'],
|
||||||
|
['id' => 101, 'code' => 524, 'name' => 'SWISS BANK SWITZERLAND'],
|
||||||
|
['id' => 102, 'code' => 525, 'name' => 'BANK OF NOVA SCOTIA GRAND CAIMAN'],
|
||||||
|
['id' => 103, 'code' => 526, 'name' => 'BANK OF NOVA SCOTIA LONDRES'],
|
||||||
|
['id' => 104, 'code' => 527, 'name' => 'BANK OF NOVA SCOTIA NEW YORK'],
|
||||||
|
['id' => 105, 'code' => 528, 'name' => 'BANCO DE CREDITO CENTRAMERICANO'],
|
||||||
|
['id' => 106, 'code' => 531, 'name' => 'UBS AG'],
|
||||||
|
['id' => 107, 'code' => 540, 'name' => 'IBC BANK'],
|
||||||
|
['id' => 108, 'code' => 548, 'name' => 'BANCO SANTANDER CENTRAL HISPANO S.A.'],
|
||||||
|
['id' => 109, 'code' => 551, 'name' => 'COMMERZBANK A.G.'],
|
||||||
|
['id' => 110, 'code' => 552, 'name' => 'DEUTSCHE BANK A.G.'],
|
||||||
|
['id' => 111, 'code' => 555, 'name' => 'BANCO BILBAO VIZCAYA ARGENTARIA S.A.'],
|
||||||
|
['id' => 112, 'code' => 559, 'name' => 'BANQUE NATIONALE DE PARIS.'],
|
||||||
|
['id' => 113, 'code' => 563, 'name' => 'BANK OF NOVA SCOTIA'],
|
||||||
|
['id' => 114, 'code' => 565, 'name' => 'UBS AG NEW YORK'],
|
||||||
|
['id' => 115, 'code' => 567, 'name' => 'BANCA COMERCIALE ITALIANA.'],
|
||||||
|
['id' => 116, 'code' => 568, 'name' => 'SKANDINAVISKA ESKILDEN BANKEN'],
|
||||||
|
['id' => 117, 'code' => 569, 'name' => 'DNB NOR BANK ASA'],
|
||||||
|
['id' => 118, 'code' => 570, 'name' => 'BANQUE DE BRUXELLES.'],
|
||||||
|
['id' => 119, 'code' => 572, 'name' => 'BARCLAYS BANK LTD.'],
|
||||||
|
['id' => 120, 'code' => 574, 'name' => 'SOUTH TEXAS NATIONAL BANK'],
|
||||||
|
['id' => 121, 'code' => 575, 'name' => 'CREDITANSTALT BANKVEREIN.'],
|
||||||
|
['id' => 122, 'code' => 582, 'name' => 'AMEGY BANK NATIONAL ASSOCIATION'],
|
||||||
|
['id' => 123, 'code' => 583, 'name' => 'BARCLAYS BANK PLC MIAMI'],
|
||||||
|
['id' => 124, 'code' => 584, 'name' => 'THE BANK OF NOVA SCOTIA/SCOTIA MOCATTA'],
|
||||||
|
['id' => 125, 'code' => 585, 'name' => 'BANK OF NOVA SCOTIA TOKYO'],
|
||||||
|
['id' => 126, 'code' => 589, 'name' => 'NORWEST BANK MINESOTA N.A.'],
|
||||||
|
['id' => 127, 'code' => 590, 'name' => 'CASA DE CAMBIO'],
|
||||||
|
['id' => 128, 'code' => 591, 'name' => 'FLEET BANK'],
|
||||||
|
['id' => 129, 'code' => 592, 'name' => 'NATIONAL WESTMINISTER BANK'],
|
||||||
|
['id' => 130, 'code' => 593, 'name' => 'BANCA MULTIPLE'],
|
||||||
|
['id' => 131, 'code' => 594, 'name' => 'BANCA DE DESARROLLO'],
|
||||||
|
['id' => 132, 'code' => 595, 'name' => 'CAROLINA FIRST BANK'],
|
||||||
|
['id' => 133, 'code' => 596, 'name' => 'CLEARSTREAM BANKING'],
|
||||||
|
['id' => 134, 'code' => 597, 'name' => 'BANCO POPOLARE DI VERONA E NOVARA'],
|
||||||
|
['id' => 135, 'code' => 598, 'name' => 'BANK ONE'],
|
||||||
|
['id' => 136, 'code' => 599, 'name' => 'DRESDNER BANK AG.'],
|
||||||
|
['id' => 137, 'code' => 600, 'name' => 'CASA DE BOLSA MONEX'],
|
||||||
|
['id' => 138, 'code' => 601, 'name' => 'CASA DE BOLSA GBM'],
|
||||||
|
['id' => 139, 'code' => 602, 'name' => 'MASARI CASA DE CAMBIO'],
|
||||||
|
['id' => 140, 'code' => 605, 'name' => 'VALUE CASA DE BOLSA'],
|
||||||
|
['id' => 141, 'code' => 607, 'name' => 'CASA DE CAMBIO TIBER'],
|
||||||
|
['id' => 142, 'code' => 608, 'name' => 'CASA DE BOLSA VECTOR'],
|
||||||
|
['id' => 143, 'code' => 610, 'name' => 'B Y B CASA DE CAMBIO'],
|
||||||
|
['id' => 144, 'code' => 611, 'name' => 'INTERCAM CASA DE CAMBIO'],
|
||||||
|
['id' => 145, 'code' => 612, 'name' => 'MAJAPARA CASA DE CAMBIO'],
|
||||||
|
['id' => 146, 'code' => 613, 'name' => 'MULTIVALORES CASA DE BOLSA'],
|
||||||
|
['id' => 147, 'code' => 614, 'name' => 'ACCIVAL CASA DE BOLSA'],
|
||||||
|
['id' => 148, 'code' => 615, 'name' => 'MERRIL LYNCH CASA DE BOLSA'],
|
||||||
|
['id' => 149, 'code' => 616, 'name' => 'CASA DE BOLSA FINAMEX'],
|
||||||
|
['id' => 150, 'code' => 617, 'name' => 'VALORES MEXICANO'],
|
||||||
|
['id' => 151, 'code' => 619, 'name' => 'MAPFRE TEPEYAC'],
|
||||||
|
['id' => 152, 'code' => 620, 'name' => 'PROFUTURO GNP AFORE'],
|
||||||
|
['id' => 153, 'code' => 621, 'name' => 'BANCO ACTINVER'],
|
||||||
|
['id' => 154, 'code' => 622, 'name' => 'ACTINVER SOCIEDAD OPERADORA'],
|
||||||
|
['id' => 155, 'code' => 624, 'name' => 'UNICREDITO ITALIANO SPA'],
|
||||||
|
['id' => 156, 'code' => 629, 'name' => 'HIPOTECARIA SU CASITA S.A. DE C.V.'],
|
||||||
|
['id' => 157, 'code' => 631, 'name' => 'VANGUARDIA CASA DE BOLSA'],
|
||||||
|
['id' => 158, 'code' => 633, 'name' => 'STERLING CASA DE CAMBIO S.A. DE C.V.'],
|
||||||
|
['id' => 159, 'code' => 647, 'name' => 'TELECOMM'],
|
||||||
|
['id' => 160, 'code' => 700, 'name' => 'SILICON VALLEY BANK'],
|
||||||
|
['id' => 161, 'code' => 852, 'name' => 'STANDARD CHARTERED BANK NEW YORK'],
|
||||||
|
['id' => 162, 'code' => 854, 'name' => 'BANK OF AMERICA NA'],
|
||||||
|
['id' => 163, 'code' => 855, 'name' => 'SANTANDER CENTRAL HISPANO NUEVA YORK'],
|
||||||
|
['id' => 164, 'code' => 856, 'name' => 'SYNOVUS BANK'],
|
||||||
|
['id' => 165, 'code' => 857, 'name' => 'BANCO POPOLARE SOC. COOP.'],
|
||||||
|
['id' => 166, 'code' => 858, 'name' => 'ALETTI & C. BANCA DI INVESTIMENTO MOBILI'],
|
||||||
|
['id' => 167, 'code' => 861, 'name' => 'FIFTH THIRD BANK'],
|
||||||
|
['id' => 168, 'code' => 862, 'name' => 'ITAU UNIBANCO SA GRAND CAYMAN BRANCH'],
|
||||||
|
['id' => 169, 'code' => 863, 'name' => 'CLS BANK INTERNATIONAL'],
|
||||||
|
['id' => 170, 'code' => 865, 'name' => 'COMMERCE BANK'],
|
||||||
|
['id' => 171, 'code' => 866, 'name' => 'ING BELGIUM NV'],
|
||||||
|
['id' => 172, 'code' => 867, 'name' => 'STANDARD CHARTERED BANK LONDRES'],
|
||||||
|
['id' => 173, 'code' => 869, 'name' => 'THE ROYAL BANK OF SCOTLAND LONDRES'],
|
||||||
|
['id' => 174, 'code' => 870, 'name' => 'BANKIA S.A'],
|
||||||
|
['id' => 175, 'code' => 871, 'name' => 'MB FINANCIAL BANK N.A'],
|
||||||
|
['id' => 176, 'code' => 872, 'name' => 'ITAU BANK LIMITED'],
|
||||||
|
['id' => 177, 'code' => 873, 'name' => 'POLSKI BANK PRZEDSICBIORCZOCI SPOLKA AKCYJNA'],
|
||||||
|
['id' => 178, 'code' => 874, 'name' => 'FIRSTMERIT BANK NA'],
|
||||||
|
['id' => 179, 'code' => 875, 'name' => 'SCOTIABANK CARIBBEAN TREASURY LIMITED'],
|
||||||
|
['id' => 180, 'code' => 876, 'name' => 'THE BANK OF NOVA SCOTIA LONDON'],
|
||||||
|
['id' => 181, 'code' => 878, 'name' => 'PACIFIC WESTERN BANK'],
|
||||||
|
['id' => 182, 'code' => 879, 'name' => 'BANCO ITAU (SUISSE) SA'],
|
||||||
|
['id' => 183, 'code' => 880, 'name' => 'ALLGEMEINE SPARKASSE OBEROESTERREICH BANK AG'],
|
||||||
|
['id' => 184, 'code' => 881, 'name' => 'SCOTIABANK CHILE'],
|
||||||
|
['id' => 185, 'code' => 882, 'name' => 'THE BANK OF NOVA SCOTIA ASIA LIMITED'],
|
||||||
|
['id' => 186, 'code' => 883, 'name' => 'HSBC BANK PLC'],
|
||||||
|
['id' => 187, 'code' => 902, 'name' => 'INDEVAL'],
|
||||||
|
['id' => 188, 'code' => 127, 'name' => 'BANCO AZTECA, S.A.'],
|
||||||
|
['id' => 189, 'code' => 131, 'name' => 'BANCO AHORRO FAMSA, S.A.'],
|
||||||
|
['id' => 190, 'code' => 133, 'name' => 'BANCO ACTIVER, S.A.'],
|
||||||
|
['id' => 191, 'code' => 134, 'name' => 'BANCO WALL-MART DE MEXICO ADELANTE, S.A.'],
|
||||||
|
['id' => 192, 'code' => 136, 'name' => 'INTER BANCO, S.A. DE C.V. INSTITUCION DE BANCA MULTIPLE'],
|
||||||
|
['id' => 193, 'code' => 137, 'name' => 'BANCOPPEL, S.A.'],
|
||||||
|
['id' => 194, 'code' => 138, 'name' => 'ABC CAPITAL, S.A. INSTITUCION DE BANCA MULITPLE'],
|
||||||
|
['id' => 195, 'code' => 140, 'name' => 'CONSUBANCO, S.A INSTITUCION DE BANCA MULTIPLE'],
|
||||||
|
['id' => 196, 'code' => 141, 'name' => 'VOLKSWAGEN BANK, S.A.'],
|
||||||
|
['id' => 197, 'code' => 143, 'name' => 'CI BANCO, S.A.'],
|
||||||
|
['id' => 198, 'code' => 145, 'name' => 'BANCO BASE, S.A., INSTITUCION DE BANCA MULTIPLE'],
|
||||||
|
['id' => 199, 'code' => 146, 'name' => 'BANCO BICENTENARIO, S.A., INSTITUCION DE BANCA MULTIPLE'],
|
||||||
|
['id' => 200, 'code' => 166, 'name' => 'BANCO DEL AHORRO NACIONAL Y SERVICIOS FINANCIEROS, S.A. DE C.V.'],
|
||||||
|
['id' => 201, 'code' => 401, 'name' => 'SOUTHWEST BANK OF TEXAS, NAV'],
|
||||||
|
['id' => 202, 'code' => 403, 'name' => 'CITIBANK, N.A.'],
|
||||||
|
['id' => 203, 'code' => 409, 'name' => 'DEUTSCHE BANK, FRANKFURT ALEMANIA'],
|
||||||
|
['id' => 204, 'code' => 410, 'name' => 'MAPLE BANK GBMH FRANKFURT, GERMANY'],
|
||||||
|
['id' => 205, 'code' => 411, 'name' => 'HSBC (BUFFALO, ESTADOS UNIDOS)'],
|
||||||
|
['id' => 206, 'code' => 577, 'name' => 'BANK OF TOKYO-MITSUBISHI UFJ, LTD'],
|
||||||
|
['id' => 207, 'code' => 606, 'name' => 'ESTRUCTURADORES DEL MERCADO DE VALORES CASA DE BOLSA, S.A. DE C.'],
|
||||||
|
['id' => 208, 'code' => 618, 'name' => 'UNICA CASA DE CAMBIO, S.A. DE C.V.'],
|
||||||
|
['id' => 209, 'code' => 623, 'name' => 'SKANDIA VIDA, S.A DE C.V'],
|
||||||
|
['id' => 210, 'code' => 625, 'name' => 'CASA DE CAMBIO TAMIBE, S.A. DE C.V.'],
|
||||||
|
['id' => 211, 'code' => 626, 'name' => 'DEUTSCHE SECURITIES, S.A. DE C.V'],
|
||||||
|
['id' => 212, 'code' => 627, 'name' => 'ZURICH COMPANIA DE SEGUROS, S.A.'],
|
||||||
|
['id' => 213, 'code' => 628, 'name' => 'ZURICH VIDA, COMPANIA DE SEGUROS, S.A.'],
|
||||||
|
['id' => 214, 'code' => 632, 'name' => 'BULLTICK CASA DE BOLSA, S.A. DE C.V.'],
|
||||||
|
['id' => 215, 'code' => 634, 'name' => 'FINCOMUN, SERVICIOS FINANCIEROS COMUNITARIOS, S.A. DE C.V.'],
|
||||||
|
['id' => 216, 'code' => 636, 'name' => 'GENWORTH SEGUROS MEXICO, S.A. DE C.V.'],
|
||||||
|
['id' => 217, 'code' => 637, 'name' => 'ORDER EXPRESS CASA DE CAMBIO, S.A. DE C.V'],
|
||||||
|
['id' => 218, 'code' => 639, 'name' => 'EUROFIMEX, CASA DE CAMBIO, S.A. DE C.V.'],
|
||||||
|
['id' => 219, 'code' => 640, 'name' => 'J.P. MORGAN CASA DE BOLSA, S.A. DE C.V'],
|
||||||
|
['id' => 220, 'code' => 642, 'name' => 'OPERADORA DE RECURSOS REFORMA, S.A. DE C'],
|
||||||
|
['id' => 221, 'code' => 643, 'name' => 'TIBER CAPITAL Y SOLUCIONES, S.A. DE C.V. SOFOM, E.N.R.'],
|
||||||
|
['id' => 222, 'code' => 646, 'name' => 'SISTEMA DE TRANSFERENCIAS Y PAGOS STP, S'],
|
||||||
|
['id' => 223, 'code' => 648, 'name' => 'EVERCORE CASA DE BOLSA, S.A. DE C.V.'],
|
||||||
|
['id' => 224, 'code' => 652, 'name' => 'SOLUCION ASEA, SA DE CV SFP'],
|
||||||
|
['id' => 225, 'code' => 653, 'name' => 'KUSPIT CASA DE BOLSA, S.A. DE C.V.'],
|
||||||
|
['id' => 226, 'code' => 655, 'name' => 'J.P. SOFIEXPRESS, S.A. DE C.V., S.F.P.'],
|
||||||
|
['id' => 227, 'code' => 656, 'name' => 'UNAGRA, S.A. DE C.V., S.F.P.'],
|
||||||
|
['id' => 228, 'code' => 659, 'name' => 'OPCIONES EMPRESARIALES DEL NORESTE, S.A. DE C.V., S.F.P.'],
|
||||||
|
['id' => 229, 'code' => 670, 'name' => 'LIBERTAD SERVICIOS FINANCIEROS, S.A. DE C.V., S.F.P.'],
|
||||||
|
['id' => 230, 'code' => 853, 'name' => 'BANCO ESPANOL DE CREDITOS, S.A.'],
|
||||||
|
['id' => 231, 'code' => 859, 'name' => 'BANCO ITAU BBA, S.A -NASSAU.BRANCH'],
|
||||||
|
['id' => 232, 'code' => 860, 'name' => 'BOKF, N.A.'],
|
||||||
|
['id' => 233, 'code' => 864, 'name' => 'BANCO POPULAR ESPANOL, S.A.'],
|
||||||
|
['id' => 234, 'code' => 877, 'name' => 'JPMORGAN CHASE BANK, LONDRES'],
|
||||||
|
['id' => 235, 'code' => 630, 'name' => 'INTERCAM CASA DE BOLSA, S.A. DE C.V.'],
|
||||||
|
['id' => 236, 'code' => 638, 'name' => 'AKALA, SA DE CV SOCIEDAD FINANCIERA POPULAR'],
|
||||||
|
['id' => 237, 'code' => 505, 'name' => 'BANK ONE, NA CHICAGO'],
|
||||||
|
['id' => 238, 'code' => 522, 'name' => 'HSBC BANK USA, NA'],
|
||||||
|
['id' => 239, 'code' => 523, 'name' => 'WACHOVIA BANK, NA'],
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
119
database/seeders/CategoriesSeeder.php
Normal file
119
database/seeders/CategoriesSeeder.php
Normal file
@@ -0,0 +1,119 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Database\Seeders;
|
||||||
|
|
||||||
|
use Illuminate\Database\Seeder;
|
||||||
|
use Illuminate\Support\Facades\DB;
|
||||||
|
|
||||||
|
class CategoriesSeeder extends Seeder
|
||||||
|
{
|
||||||
|
public function run()
|
||||||
|
{
|
||||||
|
DB::statement('SET FOREIGN_KEY_CHECKS=0;');
|
||||||
|
DB::table('categories')->truncate();
|
||||||
|
DB::statement('SET FOREIGN_KEY_CHECKS=1;');
|
||||||
|
|
||||||
|
DB::table('categories')->insert([
|
||||||
|
['id' => 1, 'name' => 'carpintero', 'en_name' => 'carpenter'],
|
||||||
|
['id' => 2, 'name' => 'jardinero', 'en_name' => 'gardener'],
|
||||||
|
['id' => 3, 'name' => 'abogado', 'en_name' => 'lawyer'],
|
||||||
|
['id' => 4, 'name' => 'administrador', 'en_name' => 'manager'],
|
||||||
|
['id' => 5, 'name' => 'agente inmobiliario', 'en_name' => 'real estate agent'],
|
||||||
|
['id' => 6, 'name' => 'agente de seguros', 'en_name' => 'insurance agent'],
|
||||||
|
['id' => 7, 'name' => 'albañil', 'en_name' => 'mason'],
|
||||||
|
['id' => 8, 'name' => 'arquitecto', 'en_name' => 'architect'],
|
||||||
|
['id' => 9, 'name' => 'asistente personal', 'en_name' => 'personal assistant'],
|
||||||
|
['id' => 10, 'name' => 'becario', 'en_name' => 'intership'],
|
||||||
|
['id' => 11, 'name' => 'cerrajero', 'en_name' => 'locksmith'],
|
||||||
|
['id' => 12, 'name' => 'chef', 'en_name' => 'chef'],
|
||||||
|
['id' => 13, 'name' => 'chofer', 'en_name' => 'driver'],
|
||||||
|
['id' => 14, 'name' => 'contratista', 'en_name' => 'contractor'],
|
||||||
|
['id' => 15, 'name' => 'contador', 'en_name' => 'accountant'],
|
||||||
|
['id' => 16, 'name' => 'diseñador de interiores', 'en_name' => 'interior designer'],
|
||||||
|
['id' => 17, 'name' => 'cantante', 'en_name' => 'singer'],
|
||||||
|
['id' => 18, 'name' => 'diseñador grafico', 'en_name' => 'graphic designer'],
|
||||||
|
['id' => 19, 'name' => 'edecan', 'en_name' => 'hostess'],
|
||||||
|
['id' => 20, 'name' => 'electricista', 'en_name' => 'electrician'],
|
||||||
|
['id' => 21, 'name' => 'estilista', 'en_name' => 'stylist'],
|
||||||
|
['id' => 22, 'name' => 'servicios financieros', 'en_name' => 'finance services'],
|
||||||
|
['id' => 23, 'name' => 'fontanero', 'en_name' => 'plumber'],
|
||||||
|
['id' => 24, 'name' => 'fotografo', 'en_name' => 'photographer'],
|
||||||
|
['id' => 25, 'name' => 'produccion de videos', 'en_name' => 'video production'],
|
||||||
|
['id' => 26, 'name' => 'hostess', 'en_name' => 'hostess'],
|
||||||
|
['id' => 27, 'name' => 'lavado de tapicerias', 'en_name' => 'upholstery washing'],
|
||||||
|
['id' => 28, 'name' => 'aire acondicionado', 'en_name' => 'air conditioning maintenance'],
|
||||||
|
['id' => 29, 'name' => 'almacenista', 'en_name' => 'storer'],
|
||||||
|
['id' => 30, 'name' => 'ayudante', 'en_name' => 'assistant'],
|
||||||
|
['id' => 31, 'name' => 'azulejero', 'en_name' => 'tile installer'],
|
||||||
|
['id' => 32, 'name' => 'cerrajero automotriz', 'en_name' => 'automotive locksmith'],
|
||||||
|
['id' => 33, 'name' => 'cortinas metalicas', 'en_name' => 'metal curtains maintenance'],
|
||||||
|
['id' => 34, 'name' => 'electrico automotriz', 'en_name' => 'automotive electrician'],
|
||||||
|
['id' => 35, 'name' => 'entretenimiento', 'en_name' => 'entertainment'],
|
||||||
|
['id' => 36, 'name' => 'fisioterapeuta', 'en_name' => 'physiotherapist'],
|
||||||
|
['id' => 37, 'name' => 'grua', 'en_name' => 'crane service'],
|
||||||
|
['id' => 38, 'name' => 'herrero', 'en_name' => 'blacksmith'],
|
||||||
|
['id' => 39, 'name' => 'ingeniero civil', 'en_name' => 'civil engineer'],
|
||||||
|
['id' => 40, 'name' => 'laminado automotriz', 'en_name' => 'automotive laminate'],
|
||||||
|
['id' => 41, 'name' => 'limpieza', 'en_name' => 'cleaning'],
|
||||||
|
['id' => 42, 'name' => 'limpieza del hogar', 'en_name' => 'house cleaning'],
|
||||||
|
['id' => 43, 'name' => 'mantenimiento', 'en_name' => 'handyman'],
|
||||||
|
['id' => 44, 'name' => 'mariachi', 'en_name' => 'mariachi'],
|
||||||
|
['id' => 45, 'name' => 'masajista', 'en_name' => 'massage therapist'],
|
||||||
|
['id' => 46, 'name' => 'marmolero', 'en_name' => 'marble maker'],
|
||||||
|
['id' => 47, 'name' => 'mecanico', 'en_name' => 'mechanical'],
|
||||||
|
['id' => 48, 'name' => 'mercadotecnia', 'en_name' => 'marketing'],
|
||||||
|
['id' => 49, 'name' => 'mesero', 'en_name' => 'waiter'],
|
||||||
|
['id' => 50, 'name' => 'modelo', 'en_name' => 'model'],
|
||||||
|
['id' => 51, 'name' => 'musico', 'en_name' => 'musician'],
|
||||||
|
['id' => 52, 'name' => 'niñera', 'en_name' => 'baby sister'],
|
||||||
|
['id' => 53, 'name' => 'pintor', 'en_name' => 'painter'],
|
||||||
|
['id' => 54, 'name' => 'pintura automotriz', 'en_name' => 'automotive paint'],
|
||||||
|
['id' => 55, 'name' => 'plomero', 'en_name' => 'plumber'],
|
||||||
|
['id' => 56, 'name' => 'programador', 'en_name' => 'programmer'],
|
||||||
|
['id' => 57, 'name' => 'publicista', 'en_name' => 'publicist'],
|
||||||
|
['id' => 58, 'name' => 'recepcionista', 'en_name' => 'receptionist'],
|
||||||
|
['id' => 59, 'name' => 'remodelacion', 'en_name' => 'remodeling'],
|
||||||
|
['id' => 60, 'name' => 'repartidor', 'en_name' => 'delivery man'],
|
||||||
|
['id' => 61, 'name' => 'reparacion de celulares', 'en_name' => 'mobile phones repair'],
|
||||||
|
['id' => 62, 'name' => 'reparacion de electronicos','en_name' => 'electronics repair'],
|
||||||
|
['id' => 63, 'name' => 'soldador', 'en_name' => 'welder'],
|
||||||
|
['id' => 64, 'name' => 'tabla roquero', 'en_name' => 'drywall installer'],
|
||||||
|
['id' => 65, 'name' => 'tapicero', 'en_name' => 'upholsterer'],
|
||||||
|
['id' => 66, 'name' => 'tecnico en gas', 'en_name' => 'gas technician'],
|
||||||
|
['id' => 67, 'name' => 'tuneame la nave', 'en_name' => 'tuning'],
|
||||||
|
['id' => 68, 'name' => 'traductor', 'en_name' => 'translator'],
|
||||||
|
['id' => 69, 'name' => 'tutor', 'en_name' => 'teacher'],
|
||||||
|
['id' => 70, 'name' => 'vendedor', 'en_name' => 'seller'],
|
||||||
|
['id' => 71, 'name' => 'veterinario', 'en_name' => 'veterinarian'],
|
||||||
|
['id' => 72, 'name' => 'vidrio y aluminio', 'en_name' => 'glass windows and doors'],
|
||||||
|
['id' => 73, 'name' => 'reparacion de computadoras','en_name' => 'computer repair'],
|
||||||
|
['id' => 74, 'name' => 'mantenimiento de camiones', 'en_name' => 'truck maintenance'],
|
||||||
|
['id' => 75, 'name' => 'consultor', 'en_name' => 'consultant'],
|
||||||
|
['id' => 76, 'name' => 'capacitacion', 'en_name' => 'training'],
|
||||||
|
['id' => 77, 'name' => 'maestro', 'en_name' => 'teacher'],
|
||||||
|
['id' => 78, 'name' => 'barbero', 'en_name' => 'barber'],
|
||||||
|
['id' => 79, 'name' => 'agencia de colocacion', 'en_name' => 'placement agency'],
|
||||||
|
['id' => 80, 'name' => 'agencia de viajes', 'en_name' => 'travel agency'],
|
||||||
|
['id' => 81, 'name' => 'paseador de perros', 'en_name' => 'dog walker'],
|
||||||
|
['id' => 82, 'name' => 'banquete', 'en_name' => 'catering'],
|
||||||
|
['id' => 83, 'name' => 'almacenaje', 'en_name' => 'storage'],
|
||||||
|
['id' => 84, 'name' => 'impermeabilizacion', 'en_name' => 'roofer'],
|
||||||
|
['id' => 85, 'name' => 'redes de internet', 'en_name' => 'internet networks'],
|
||||||
|
['id' => 86, 'name' => 'agente aduanal', 'en_name' => 'customs broker'],
|
||||||
|
['id' => 87, 'name' => 'enfermera', 'en_name' => 'nurse'],
|
||||||
|
['id' => 88, 'name' => 'doctor', 'en_name' => 'doctor'],
|
||||||
|
['id' => 89, 'name' => 'pediatra', 'en_name' => 'pediatrician'],
|
||||||
|
['id' => 90, 'name' => 'geriatra', 'en_name' => 'geriatrician'],
|
||||||
|
['id' => 91, 'name' => 'planes de celular', 'en_name' => 'cell phone plans'],
|
||||||
|
['id' => 92, 'name' => 'dentista', 'en_name' => 'dentist'],
|
||||||
|
['id' => 93, 'name' => 'fumigacion', 'en_name' => 'exterminator'],
|
||||||
|
['id' => 94, 'name' => 'mudanza', 'en_name' => 'moving'],
|
||||||
|
['id' => 95, 'name' => 'fletes', 'en_name' => 'moving'],
|
||||||
|
['id' => 96, 'name' => 'maquillista', 'en_name' => 'makeup artist'],
|
||||||
|
['id' => 97, 'name' => 'manicurista', 'en_name' => 'manicurist'],
|
||||||
|
['id' => 98, 'name' => 'medico', 'en_name' => 'doctor'],
|
||||||
|
['id' => 99, 'name' => 'limpieza de asador', 'en_name' => 'grill maintenance'],
|
||||||
|
['id' => 100, 'name' => 'Internet satelital', 'en_name' => 'Starlink'],
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -113,5 +113,10 @@ class DatabaseSeeder extends Seeder
|
|||||||
'name' => 'ausente',
|
'name' => 'ausente',
|
||||||
'en_name' => 'absent',
|
'en_name' => 'absent',
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
$this->call([
|
||||||
|
BanksSeeder::class,
|
||||||
|
CategoriesSeeder::class,
|
||||||
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -126,7 +126,7 @@
|
|||||||
height="55.717773"
|
height="55.717773"
|
||||||
width="209.07556"
|
width="209.07556"
|
||||||
id="rect863"
|
id="rect863"
|
||||||
style="fill:#0080ff;fill-opacity:1;stroke-width:5.09377;stroke-linecap:round;stroke-linejoin:round" />
|
style="fill:none;fill-opacity:0;stroke-width:5.09377;stroke-linecap:round;stroke-linejoin:round" />
|
||||||
<text
|
<text
|
||||||
style="font-style:normal;font-weight:normal;font-size:10.5833px;line-height:1.25;font-family:sans-serif;white-space:pre;shape-inside:url(#rect1190);fill:#000000;fill-opacity:1;stroke:none;"
|
style="font-style:normal;font-weight:normal;font-size:10.5833px;line-height:1.25;font-family:sans-serif;white-space:pre;shape-inside:url(#rect1190);fill:#000000;fill-opacity:1;stroke:none;"
|
||||||
id="text1188"
|
id="text1188"
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 26 KiB |
41
public/js/ajaxcrud.js
vendored
41
public/js/ajaxcrud.js
vendored
@@ -1,8 +1,26 @@
|
|||||||
$(document).on('click', 'pagination a', function (event) {
|
$(document).on('click', '.pagination a', function (event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
ajaxLoad($(this).attr('href'));
|
ajaxLoad($(this).attr('href'));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$(document).on('submit', 'form[method="GET"]', function (event) {
|
||||||
|
event.preventDefault();
|
||||||
|
ajaxLoad($(this).attr('action') + '?' + $(this).serialize());
|
||||||
|
});
|
||||||
|
|
||||||
|
var searchTimer;
|
||||||
|
$(document).on('keyup', 'input[name="search"]', function () {
|
||||||
|
var form = $(this).closest('form');
|
||||||
|
clearTimeout(searchTimer);
|
||||||
|
if (activeRequest) {
|
||||||
|
activeRequest.abort();
|
||||||
|
activeRequest = null;
|
||||||
|
}
|
||||||
|
searchTimer = setTimeout(function () {
|
||||||
|
ajaxLoad(form.attr('action') + '?' + form.serialize());
|
||||||
|
}, 400);
|
||||||
|
});
|
||||||
|
|
||||||
$(document).on('submit', 'form#frm', function (event) {
|
$(document).on('submit', 'form#frm', function (event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
var form = $(this);
|
var form = $(this);
|
||||||
@@ -33,20 +51,37 @@ $(document).on('submit', 'form#frm', function (event) {
|
|||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
var activeRequest = null;
|
||||||
|
|
||||||
function ajaxLoad(filename, content) {
|
function ajaxLoad(filename, content) {
|
||||||
content = typeof content !== 'undefined' ? content : 'content';
|
content = typeof content !== 'undefined' ? content : 'content';
|
||||||
|
var searchFocused = $('input[name="search"]').is(':focus');
|
||||||
|
|
||||||
|
if (activeRequest) {
|
||||||
|
activeRequest.abort();
|
||||||
|
}
|
||||||
|
|
||||||
$('.loading').show();
|
$('.loading').show();
|
||||||
$.ajax({
|
activeRequest = $.ajax({
|
||||||
type: "GET",
|
type: "GET",
|
||||||
url: filename,
|
url: filename,
|
||||||
contentType: false,
|
headers: {'X-Requested-With': 'XMLHttpRequest'},
|
||||||
success: function (data) {
|
success: function (data) {
|
||||||
|
activeRequest = null;
|
||||||
$("#" + content).html(data);
|
$("#" + content).html(data);
|
||||||
$('.loading').hide();
|
$('.loading').hide();
|
||||||
|
if (searchFocused) {
|
||||||
|
var input = $('input[name="search"]');
|
||||||
|
input.focus();
|
||||||
|
var len = input.val().length;
|
||||||
|
input[0].setSelectionRange(len, len);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
error: function (xhr, status, error) {
|
error: function (xhr, status, error) {
|
||||||
|
if (status !== 'abort') {
|
||||||
alert(xhr.responseText);
|
alert(xhr.responseText);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,13 @@
|
|||||||
@extends('layouts.app')
|
@extends('layouts.app')
|
||||||
|
|
||||||
|
@push('styles')
|
||||||
|
<style>
|
||||||
|
.main-content { padding: 0 !important; overflow: hidden !important; }
|
||||||
|
</style>
|
||||||
|
@endpush
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
<div class="container" style="display: block; width: 100%; height: calc(100% + 25px); background-image: url('../img/background_ic.jpg')">
|
<div class="container" style="display: block; width: 100%; height: 100%; background-image: url('../img/background_ic.jpg')">
|
||||||
<div class="row justify-content-center">
|
<div class="row justify-content-center">
|
||||||
<div class="col-md-8" style="padding-top: 3em">
|
<div class="col-md-8" style="padding-top: 3em">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
|
|||||||
@@ -1,7 +1,11 @@
|
|||||||
@extends('layouts.app')
|
@extends('layouts.app')
|
||||||
|
|
||||||
|
@push('styles')
|
||||||
|
<style>.main-content { padding: 0 !important; overflow: hidden !important; }</style>
|
||||||
|
@endpush
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
<div class="container" style="display: block; width: 100%; height: calc(100% + 25px); background-image: url('../img/background_ic.jpg')">
|
<div class="container" style="display: block; width: 100%; height: 100%; background-image: url('../img/background_ic.jpg')">
|
||||||
<div class="row justify-content-center">
|
<div class="row justify-content-center">
|
||||||
<div class="col-md-8" style="padding-top: 3em">
|
<div class="col-md-8" style="padding-top: 3em">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
|
|||||||
@@ -1,7 +1,11 @@
|
|||||||
@extends('layouts.app')
|
@extends('layouts.app')
|
||||||
|
|
||||||
|
@push('styles')
|
||||||
|
<style>.main-content { padding: 0 !important; overflow: hidden !important; }</style>
|
||||||
|
@endpush
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
<div class="container" style="display: block; width: 100%; height: calc(100% + 25px); background-image: url('../img/background_ic.jpg')">
|
<div class="container" style="display: block; width: 100%; height: 100%; background-image: url('../img/background_ic.jpg')">
|
||||||
<div class="row justify-content-center">
|
<div class="row justify-content-center">
|
||||||
<div class="col-md-8" style="padding-top: 3em">
|
<div class="col-md-8" style="padding-top: 3em">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
|
|||||||
@@ -1,7 +1,11 @@
|
|||||||
@extends('layouts.app')
|
@extends('layouts.app')
|
||||||
|
|
||||||
|
@push('styles')
|
||||||
|
<style>.main-content { padding: 0 !important; overflow: hidden !important; }</style>
|
||||||
|
@endpush
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
<div class="container" style="display: block; width: 100%; height: calc(100% + 25px); background-image: url('../img/background_ic.jpg')">
|
<div class="container" style="display: block; width: 100%; height: 100%; background-image: url('../img/background_ic.jpg')">
|
||||||
<div class="row justify-content-center">
|
<div class="row justify-content-center">
|
||||||
<div class="col-md-8" style="padding-top: 3em">
|
<div class="col-md-8" style="padding-top: 3em">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
|
|||||||
@@ -12,5 +12,5 @@
|
|||||||
@endsection
|
@endsection
|
||||||
|
|
||||||
@section('js')
|
@section('js')
|
||||||
<script src="{{ asset('js/ajaxcrud.js') }}"></script>
|
<script src="{{ asset('js/ajaxcrud.js') }}?v={{ filemtime(public_path('js/ajaxcrud.js')) }}"></script>
|
||||||
@endsection
|
@endsection
|
||||||
|
|||||||
@@ -1,10 +1,7 @@
|
|||||||
@extends('layouts.app')
|
|
||||||
|
|
||||||
@section('content')
|
|
||||||
@if (Auth::user()->role_id >= 5)
|
@if (Auth::user()->role_id >= 5)
|
||||||
<div class="container-fluid" style="height:100%">
|
<div class="container-fluid" style="height:100%">
|
||||||
@include('sidebar')
|
<div>
|
||||||
<div style="width:90%; float: left; margin:1em 0 0 1em">
|
|
||||||
@else
|
@else
|
||||||
<div class="container" style="margin:0 1em">
|
<div class="container" style="margin:0 1em">
|
||||||
@endif
|
@endif
|
||||||
@@ -76,8 +73,5 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<ul class="pagination">
|
|
||||||
{{ $banks->links() }}
|
{{ $banks->links() }}
|
||||||
</ul>
|
|
||||||
</div>
|
</div>
|
||||||
@endsection
|
|
||||||
|
|||||||
@@ -12,5 +12,5 @@
|
|||||||
@endsection
|
@endsection
|
||||||
|
|
||||||
@section('js')
|
@section('js')
|
||||||
<script src="{{ asset('js/ajaxcrud.js') }}"></script>
|
<script src="{{ asset('js/ajaxcrud.js') }}?v={{ filemtime(public_path('js/ajaxcrud.js')) }}"></script>
|
||||||
@endsection
|
@endsection
|
||||||
|
|||||||
@@ -1,10 +1,7 @@
|
|||||||
@extends('layouts.app')
|
|
||||||
|
|
||||||
@section('content')
|
|
||||||
@if (Auth::user()->role_id >= 5)
|
@if (Auth::user()->role_id >= 5)
|
||||||
<div class="container-fluid" style="height:100%">
|
<div class="container-fluid" style="height:100%">
|
||||||
@include('sidebar')
|
<div>
|
||||||
<div style="width:90%; float: left; margin:1em 0 0 1em">
|
|
||||||
@else
|
@else
|
||||||
<div class="container" style="margin:0 1em">
|
<div class="container" style="margin:0 1em">
|
||||||
@endif
|
@endif
|
||||||
@@ -71,8 +68,5 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<ul class="pagination">
|
|
||||||
{{ $cards->links() }}
|
{{ $cards->links() }}
|
||||||
</ul>
|
|
||||||
</div>
|
</div>
|
||||||
@endsection
|
|
||||||
|
|||||||
@@ -12,5 +12,5 @@
|
|||||||
@endsection
|
@endsection
|
||||||
|
|
||||||
@section('js')
|
@section('js')
|
||||||
<script src="{{ asset('js/ajaxcrud.js') }}"></script>
|
<script src="{{ asset('js/ajaxcrud.js') }}?v={{ filemtime(public_path('js/ajaxcrud.js')) }}"></script>
|
||||||
@endsection
|
@endsection
|
||||||
|
|||||||
@@ -1,10 +1,7 @@
|
|||||||
@extends('layouts.app')
|
|
||||||
|
|
||||||
@section('content')
|
|
||||||
@if (Auth::user()->role_id >= 5)
|
@if (Auth::user()->role_id >= 5)
|
||||||
<div class="container-fluid" style="height:100%">
|
<div class="container-fluid" style="height:100%">
|
||||||
@include('sidebar')
|
<div>
|
||||||
<div style="width:90%; float: left; margin:1em 0 0 1em">
|
|
||||||
@else
|
@else
|
||||||
<div class="container" style="margin:0 1em">
|
<div class="container" style="margin:0 1em">
|
||||||
@endif
|
@endif
|
||||||
@@ -76,8 +73,5 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<ul class="pagination">
|
|
||||||
{{ $categories->links() }}
|
{{ $categories->links() }}
|
||||||
</ul>
|
|
||||||
</div>
|
</div>
|
||||||
@endsection
|
|
||||||
|
|||||||
@@ -12,5 +12,5 @@
|
|||||||
@endsection
|
@endsection
|
||||||
|
|
||||||
@section('js')
|
@section('js')
|
||||||
<script src="{{ asset('js/ajaxcrud.js') }}"></script>
|
<script src="{{ asset('js/ajaxcrud.js') }}?v={{ filemtime(public_path('js/ajaxcrud.js')) }}"></script>
|
||||||
@endsection
|
@endsection
|
||||||
|
|||||||
@@ -1,10 +1,7 @@
|
|||||||
@extends('layouts.app')
|
|
||||||
|
|
||||||
@section('content')
|
|
||||||
@if (Auth::user()->role_id >= 5)
|
@if (Auth::user()->role_id >= 5)
|
||||||
<div class="container-fluid" style="height:100%">
|
<div class="container-fluid" style="height:100%">
|
||||||
@include('sidebar')
|
<div>
|
||||||
<div style="width:90%; float: left; margin:1em 0 0 1em">
|
|
||||||
@else
|
@else
|
||||||
<div class="container" style="margin:0 1em">
|
<div class="container" style="margin:0 1em">
|
||||||
@endif
|
@endif
|
||||||
@@ -84,8 +81,5 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<ul class="pagination">
|
|
||||||
{{ $coupons->links() }}
|
{{ $coupons->links() }}
|
||||||
</ul>
|
|
||||||
</div>
|
</div>
|
||||||
@endsection
|
|
||||||
|
|||||||
@@ -12,5 +12,5 @@
|
|||||||
@endsection
|
@endsection
|
||||||
|
|
||||||
@section('js')
|
@section('js')
|
||||||
<script src="{{ asset('js/ajaxcrud.js') }}"></script>
|
<script src="{{ asset('js/ajaxcrud.js') }}?v={{ filemtime(public_path('js/ajaxcrud.js')) }}"></script>
|
||||||
@endsection
|
@endsection
|
||||||
|
|||||||
@@ -1,10 +1,7 @@
|
|||||||
@extends('layouts.app')
|
|
||||||
|
|
||||||
@section('content')
|
|
||||||
@if (Auth::user()->role_id >= 5)
|
@if (Auth::user()->role_id >= 5)
|
||||||
<div class="container-fluid" style="height:100%">
|
<div class="container-fluid" style="height:100%">
|
||||||
@include('sidebar')
|
<div>
|
||||||
<div style="width:90%; float: left; margin:1em 0 0 1em">
|
|
||||||
@else
|
@else
|
||||||
<div class="container" style="margin:0 1em">
|
<div class="container" style="margin:0 1em">
|
||||||
@endif
|
@endif
|
||||||
@@ -116,8 +113,5 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<ul class="pagination">
|
|
||||||
{{ $currentcontracts->links() }}
|
{{ $currentcontracts->links() }}
|
||||||
</ul>
|
|
||||||
</div>
|
</div>
|
||||||
@endsection
|
|
||||||
|
|||||||
@@ -7,8 +7,7 @@
|
|||||||
@section('content')
|
@section('content')
|
||||||
@if (Auth::user()->role_id >= 5)
|
@if (Auth::user()->role_id >= 5)
|
||||||
<div class="container-fluid" style="height:100%">
|
<div class="container-fluid" style="height:100%">
|
||||||
@include('sidebar')
|
<div>
|
||||||
<div style="width:90%; float: left; margin:1em 0 0 1em">
|
|
||||||
@else
|
@else
|
||||||
<div class="container" style="margin:0 1em">
|
<div class="container" style="margin:0 1em">
|
||||||
@endif
|
@endif
|
||||||
@@ -60,8 +59,6 @@
|
|||||||
'markers' => $mapMarkers
|
'markers' => $mapMarkers
|
||||||
])
|
])
|
||||||
|
|
||||||
<ul class="pagination">
|
|
||||||
{{ $currentcontracts->links() }}
|
{{ $currentcontracts->links() }}
|
||||||
</ul>
|
|
||||||
</div>
|
</div>
|
||||||
@endsection
|
@endsection
|
||||||
|
|||||||
@@ -12,5 +12,5 @@
|
|||||||
@endsection
|
@endsection
|
||||||
|
|
||||||
@section('js')
|
@section('js')
|
||||||
<script src="{{ asset('js/ajaxcrud.js') }}"></script>
|
<script src="{{ asset('js/ajaxcrud.js') }}?v={{ filemtime(public_path('js/ajaxcrud.js')) }}"></script>
|
||||||
@endsection
|
@endsection
|
||||||
|
|||||||
@@ -1,10 +1,7 @@
|
|||||||
@extends('layouts.app')
|
|
||||||
|
|
||||||
@section('content')
|
|
||||||
@if (Auth::user()->role_id >= 5)
|
@if (Auth::user()->role_id >= 5)
|
||||||
<div class="container-fluid" style="height:100%">
|
<div class="container-fluid" style="height:100%">
|
||||||
@include('sidebar')
|
<div>
|
||||||
<div style="width:90%; float: left; margin:1em 0 0 1em">
|
|
||||||
@else
|
@else
|
||||||
<div class="container" style="margin:0 1em">
|
<div class="container" style="margin:0 1em">
|
||||||
@endif
|
@endif
|
||||||
@@ -124,8 +121,5 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<ul class="pagination">
|
|
||||||
{{ $finishedcontracts->links() }}
|
{{ $finishedcontracts->links() }}
|
||||||
</ul>
|
|
||||||
</div>
|
</div>
|
||||||
@endsection
|
|
||||||
|
|||||||
@@ -7,8 +7,7 @@
|
|||||||
@section('content')
|
@section('content')
|
||||||
@if (Auth::user()->role_id >= 5)
|
@if (Auth::user()->role_id >= 5)
|
||||||
<div class="container-fluid" style="height:100%">
|
<div class="container-fluid" style="height:100%">
|
||||||
@include('sidebar')
|
<div>
|
||||||
<div style="width:90%; float: left; margin:1em 0 0 1em">
|
|
||||||
@else
|
@else
|
||||||
<div class="container" style="margin:0 1em">
|
<div class="container" style="margin:0 1em">
|
||||||
@endif
|
@endif
|
||||||
@@ -60,8 +59,6 @@
|
|||||||
'markers' => $mapMarkers
|
'markers' => $mapMarkers
|
||||||
])
|
])
|
||||||
|
|
||||||
<ul class="pagination">
|
|
||||||
{{ $finishedcontracts->links() }}
|
{{ $finishedcontracts->links() }}
|
||||||
</ul>
|
|
||||||
</div>
|
</div>
|
||||||
@endsection
|
@endsection
|
||||||
|
|||||||
@@ -3,8 +3,7 @@
|
|||||||
@section('content')
|
@section('content')
|
||||||
@if (Auth::user()->role_id >= 5)
|
@if (Auth::user()->role_id >= 5)
|
||||||
<div class="container-fluid" style="height:100%">
|
<div class="container-fluid" style="height:100%">
|
||||||
@include('sidebar')
|
<div>
|
||||||
<div style="width:90%; margin-top: 1em; float: left">
|
|
||||||
@else
|
@else
|
||||||
<div class="container">
|
<div class="container">
|
||||||
@endif
|
@endif
|
||||||
|
|||||||
@@ -7,10 +7,7 @@
|
|||||||
<!-- CSRF Token -->
|
<!-- CSRF Token -->
|
||||||
<meta name="csrf-token" content="{{ csrf_token() }}">
|
<meta name="csrf-token" content="{{ csrf_token() }}">
|
||||||
|
|
||||||
<title>{{ config('app.name', 'iChamba') }}</title>
|
<title>{{ config('app.name', 'JobHero') }}</title>
|
||||||
|
|
||||||
<!-- Scripts -->
|
|
||||||
<script src="{{ asset('js/app.js') }}"></script>
|
|
||||||
|
|
||||||
<!-- Fonts -->
|
<!-- Fonts -->
|
||||||
<link rel="dns-prefetch" href="//fonts.gstatic.com">
|
<link rel="dns-prefetch" href="//fonts.gstatic.com">
|
||||||
@@ -22,29 +19,91 @@
|
|||||||
<link href="{{ asset('css/bootstrap-tagsinput.css') }}" rel="stylesheet">
|
<link href="{{ asset('css/bootstrap-tagsinput.css') }}" rel="stylesheet">
|
||||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
|
||||||
@stack('styles')
|
@stack('styles')
|
||||||
|
|
||||||
|
<style>
|
||||||
|
html, body {
|
||||||
|
height: 100%;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
.navbar-fixed {
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
z-index: 1030;
|
||||||
|
height: 56px;
|
||||||
|
}
|
||||||
|
.app-body {
|
||||||
|
position: fixed;
|
||||||
|
top: 56px;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
.sidebar-wrapper {
|
||||||
|
background-color: #1e3a5f;
|
||||||
|
flex-shrink: 0;
|
||||||
|
overflow-y: auto;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
.sidebar-nav {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
padding: 0.5rem 0;
|
||||||
|
}
|
||||||
|
.sidebar-link {
|
||||||
|
color: rgba(255,255,255,0.75);
|
||||||
|
padding: 0.65rem 1.25rem;
|
||||||
|
text-decoration: none;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 10px;
|
||||||
|
transition: background 0.15s, color 0.15s;
|
||||||
|
font-size: 0.875rem;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
.sidebar-link:hover {
|
||||||
|
background: rgba(255,255,255,0.08);
|
||||||
|
color: #fff;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
.sidebar-link.active {
|
||||||
|
background: rgba(255,255,255,0.15);
|
||||||
|
color: #fff;
|
||||||
|
border-left: 3px solid #5ba8ff;
|
||||||
|
padding-left: calc(1.25rem - 3px);
|
||||||
|
}
|
||||||
|
.sidebar-link i {
|
||||||
|
width: 18px;
|
||||||
|
text-align: center;
|
||||||
|
opacity: 0.85;
|
||||||
|
}
|
||||||
|
.main-content {
|
||||||
|
flex: 1;
|
||||||
|
min-width: 0;
|
||||||
|
overflow-y: auto;
|
||||||
|
height: 100%;
|
||||||
|
padding: 2rem 0.5rem 0.5rem 0.5rem;
|
||||||
|
}
|
||||||
|
.loading { display: none; }
|
||||||
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="app" style="height: 100%">
|
<nav class="navbar navbar-fixed navbar-expand-md navbar-dark bg-primary shadow-sm">
|
||||||
<nav class="navbar navbar-expand-md navbar-dark bg-primary shadow-sm">
|
<div class="container-fluid">
|
||||||
<div class="container" style="padding-top: 0px">
|
|
||||||
<!--
|
|
||||||
<a class="navbar-brand" href="{{ url('/home') }}">
|
<a class="navbar-brand" href="{{ url('/home') }}">
|
||||||
<img id='logo' src="{{asset('/img/ichamba.svg')}}">
|
<img id='logo' src="{{ asset('/img/jobhero.svg') }}" style="height:32px;">
|
||||||
</a>
|
</a>
|
||||||
-->
|
|
||||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="{{ __('Toggle navigation') }}">
|
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="{{ __('Toggle navigation') }}">
|
||||||
<span class="navbar-toggler-icon"></span>
|
<span class="navbar-toggler-icon"></span>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<div class="collapse navbar-collapse" id="navbarSupportedContent">
|
<div class="collapse navbar-collapse" id="navbarSupportedContent">
|
||||||
<!-- Left Side Of Navbar -->
|
<ul class="navbar-nav mr-auto"></ul>
|
||||||
<ul class="navbar-nav mr-auto">
|
|
||||||
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<!-- Right Side Of Navbar -->
|
|
||||||
<ul class="navbar-nav ml-auto">
|
<ul class="navbar-nav ml-auto">
|
||||||
<!-- Authentication Links -->
|
|
||||||
@guest
|
@guest
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link" href="{{ route('login') }}">{{ __('Iniciar sesión') }}</a>
|
<a class="nav-link" href="{{ route('login') }}">{{ __('Iniciar sesión') }}</a>
|
||||||
@@ -52,17 +111,15 @@
|
|||||||
@else
|
@else
|
||||||
<li class="nav-item dropdown">
|
<li class="nav-item dropdown">
|
||||||
<a id="navbarDropdown" class="nav-link dropdown-toggle" href="#" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" v-pre style="padding-left:55px;">
|
<a id="navbarDropdown" class="nav-link dropdown-toggle" href="#" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" v-pre style="padding-left:55px;">
|
||||||
<img src="{{ isset(Auth::user()->profile_photo) ? asset('img/users/' . Auth::user()->id . '/' . Auth::user()->profile_photo):asset('img/users/default.png') }}" style="width:48px; height:auto; position:absolute; top:-5px; left:-1px; border-radius:50%"/>
|
<img src="{{ isset(Auth::user()->profile_photo) ? asset('img/users/' . Auth::user()->id . '/' . Auth::user()->profile_photo) : asset('img/users/default.png') }}" style="width:48px; height:auto; position:absolute; top:-5px; left:-1px; border-radius:50%"/>
|
||||||
{{ Auth::user()->name }} <span class="caret"></span>
|
{{ Auth::user()->name }} <span class="caret"></span>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="navbarDropdown">
|
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="navbarDropdown">
|
||||||
<a class="dropdown-item" href="{{ route('logout') }}"
|
<a class="dropdown-item" href="{{ route('logout') }}"
|
||||||
onclick="event.preventDefault();
|
onclick="event.preventDefault(); document.getElementById('logout-form').submit();">
|
||||||
document.getElementById('logout-form').submit();">
|
|
||||||
{{ __('Cerrar sesión') }}
|
{{ __('Cerrar sesión') }}
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<form id="logout-form" action="{{ route('logout') }}" method="POST" style="display: none;">
|
<form id="logout-form" action="{{ route('logout') }}" method="POST" style="display: none;">
|
||||||
@csrf
|
@csrf
|
||||||
</form>
|
</form>
|
||||||
@@ -74,17 +131,24 @@
|
|||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
<main class="py-4">
|
<div class="app-body">
|
||||||
|
@auth
|
||||||
|
@if(Auth::user()->role_id >= 5)
|
||||||
|
@include('sidebar')
|
||||||
|
@endif
|
||||||
|
@endauth
|
||||||
|
|
||||||
|
<main class="main-content">
|
||||||
@yield('content')
|
@yield('content')
|
||||||
{!! GoogleReCaptchaV3::init() !!}
|
{!! GoogleReCaptchaV3::init() !!}
|
||||||
<script src="https://code.jquery.com/jquery-1.12.4.js"></script>
|
</main>
|
||||||
<script src="https://code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
|
</div>
|
||||||
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
|
|
||||||
|
@mapscripts
|
||||||
|
<script src="{{ asset('js/app.js') }}"></script>
|
||||||
|
<script src="https://code.jquery.com/ui/1.13.2/jquery-ui.min.js"></script>
|
||||||
<script src="https://twitter.github.io/typeahead.js/releases/latest/typeahead.bundle.js"></script>
|
<script src="https://twitter.github.io/typeahead.js/releases/latest/typeahead.bundle.js"></script>
|
||||||
<script src="{{ asset('js/bootstrap-tagsinput.min.js') }}"></script>
|
<script src="{{ asset('js/bootstrap-tagsinput.min.js') }}"></script>
|
||||||
@yield('js')
|
@yield('js')
|
||||||
</main>
|
|
||||||
</div>
|
|
||||||
@mapscripts
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -12,5 +12,5 @@
|
|||||||
@endsection
|
@endsection
|
||||||
|
|
||||||
@section('js')
|
@section('js')
|
||||||
<script src="{{ asset('js/ajaxcrud.js') }}"></script>
|
<script src="{{ asset('js/ajaxcrud.js') }}?v={{ filemtime(public_path('js/ajaxcrud.js')) }}"></script>
|
||||||
@endsection
|
@endsection
|
||||||
|
|||||||
@@ -1,10 +1,7 @@
|
|||||||
@extends('layouts.app')
|
|
||||||
|
|
||||||
@section('content')
|
|
||||||
@if (Auth::user()->role_id >= 5)
|
@if (Auth::user()->role_id >= 5)
|
||||||
<div class="container-fluid" style="height:100%">
|
<div class="container-fluid" style="height:100%">
|
||||||
@include('sidebar')
|
<div>
|
||||||
<div style="width:90%; float: left; margin:1em 0 0 1em">
|
|
||||||
@else
|
@else
|
||||||
<div class="container" style="margin:0 1em">
|
<div class="container" style="margin:0 1em">
|
||||||
@endif
|
@endif
|
||||||
@@ -80,8 +77,5 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<ul class="pagination">
|
|
||||||
{{ $ichambaparameters->links() }}
|
{{ $ichambaparameters->links() }}
|
||||||
</ul>
|
|
||||||
</div>
|
</div>
|
||||||
@endsection
|
|
||||||
|
|||||||
@@ -12,5 +12,5 @@
|
|||||||
@endsection
|
@endsection
|
||||||
|
|
||||||
@section('js')
|
@section('js')
|
||||||
<script src="{{ asset('js/ajaxcrud.js') }}"></script>
|
<script src="{{ asset('js/ajaxcrud.js') }}?v={{ filemtime(public_path('js/ajaxcrud.js')) }}"></script>
|
||||||
@endsection
|
@endsection
|
||||||
|
|||||||
@@ -1,103 +1,73 @@
|
|||||||
@extends('layouts.app')
|
|
||||||
|
|
||||||
@section('content')
|
|
||||||
@if (Auth::user()->role_id >= 5)
|
@if (Auth::user()->role_id >= 5)
|
||||||
<div class="container-fluid" style="height:100%">
|
<div class="container-fluid" style="height:100%">
|
||||||
@include('sidebar')
|
<div>
|
||||||
<div style="width:90%; float: left; margin:1em 0 0 1em">
|
|
||||||
@else
|
@else
|
||||||
<div class="container" style="margin:0 1em">
|
<div class="container" style="margin:0 1em">
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
|
@php
|
||||||
|
$currentField = request('field', 'total_amount');
|
||||||
|
$currentSort = request('sort', 'desc');
|
||||||
|
$nextSort = $currentSort === 'asc' ? 'desc' : 'asc';
|
||||||
|
$sortUrl = fn($f) => url('payments') . '?' . http_build_query(array_filter(['date_from' => $dateFrom, 'date_to' => $dateTo, 'field' => $f, 'sort' => $currentField === $f ? $nextSort : 'desc']));
|
||||||
|
@endphp
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-sm-7">
|
|
||||||
<h3>Pagos</h3>
|
|
||||||
</div>
|
|
||||||
<div class="col-sm-5">
|
<div class="col-sm-5">
|
||||||
|
<h3>Pagos a Proveedores</h3>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-7">
|
||||||
<div class="pull-right">
|
<div class="pull-right">
|
||||||
{!! Form::open(['method'=>'GET','url'=>'finishedcontracts','class'=>'navbar-form navbar-left','role'=>'search']) !!}
|
{!! Form::open(['method' => 'GET', 'url' => 'payments', 'class' => 'form-inline', 'role' => 'search']) !!}
|
||||||
<div class="input-group">
|
<label class="mr-2 mb-0">Filtrar</label>
|
||||||
<input class="form-control" id="search"
|
<input type="date" class="form-control mr-1" name="date_from" value="{{ $dateFrom }}">
|
||||||
value="{{ request()->session()->get('search') }}"
|
<input type="date" class="form-control mr-1" name="date_to" value="{{ $dateTo }}">
|
||||||
placeholder="Buscar" name="search"
|
<button type="submit" class="btn btn-primary mr-1">
|
||||||
type="text" id="search"/>
|
<i class="fa fa-filter" aria-hidden="true"></i>
|
||||||
<div class="input-group-btn">
|
|
||||||
<button type="submit" class="btn btn-primary">
|
|
||||||
<i class="fa fa-search" aria-hidden="true"></i>
|
|
||||||
</button>
|
</button>
|
||||||
</div>
|
<a href="{{ url('payments') }}" class="btn btn-default">
|
||||||
</div>
|
<i class="fa fa-times" aria-hidden="true"></i>
|
||||||
|
</a>
|
||||||
{!! Form::close() !!}
|
{!! Form::close() !!}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<table class="table">
|
<table class="table">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
|
<th style="vertical-align: middle"><a href="{{ $sortUrl('company_name') }}">Proveedor</a></th>
|
||||||
<th style="vertical-align: middle"><a href="{{url('payment?field=id&sort='.(request()->session()->get('sort')=='asc'?'desc':'asc'))}}">ID</a></th>
|
<th style="vertical-align: middle"><a href="{{ $sortUrl('email') }}">Email</a></th>
|
||||||
{{request()->session()->get('field')=='id'?(request()->session()->get('sort')=='asc'?'':''):''}}
|
<th style="vertical-align: middle"><a href="{{ $sortUrl('rfc_curp') }}">RFC / CURP</a></th>
|
||||||
|
<th style="vertical-align: middle"><a href="{{ $sortUrl('clabe') }}">CLABE</a></th>
|
||||||
<th style="vertical-align: middle"><a href="{{url('payment?field=user_id&sort='.(request()->session()->get('sort')=='asc'?'desc':'asc'))}}">Usuario</a></th>
|
<th style="vertical-align: middle"><a href="{{ $sortUrl('bank') }}">Banco</a></th>
|
||||||
{{request()->session()->get('field')=='user_id'?(request()->session()->get('sort')=='asc'?'':''):''}}
|
<th style="vertical-align: middle"><a href="{{ $sortUrl('contract_count') }}">Contratos</a></th>
|
||||||
|
<th style="vertical-align: middle"><a href="{{ $sortUrl('total_amount') }}">Monto Total</a></th>
|
||||||
<th style="vertical-align: middle"><a href="{{url('payment?field=membership&sort='.(request()->session()->get('sort')=='asc'?'desc':'asc'))}}">Email</a></th>
|
<th style="vertical-align: middle"><a href="{{ $sortUrl('total_revenue') }}">Utilidad</a></th>
|
||||||
{{request()->session()->get('field')=='membership'?(request()->session()->get('sort')=='asc'?'':''):''}}
|
<th style="vertical-align: middle"><a href="{{ $sortUrl('total_iva') }}">Ret. IVA</a></th>
|
||||||
|
<th style="vertical-align: middle"><a href="{{ $sortUrl('total_isr') }}">Ret. ISR</a></th>
|
||||||
<th style="vertical-align: middle"><a href="{{url('payment?field=RFC&sort='.(request()->session()->get('sort')=='asc'?'desc':'asc'))}}">RFC o CURP</a></th>
|
<th style="vertical-align: middle"><a href="{{ $sortUrl('total_fee') }}">Ret. JobHero</a></th>
|
||||||
{{request()->session()->get('field')=='RFC'?(request()->session()->get('sort')=='asc'?'':''):''}}
|
|
||||||
|
|
||||||
<th style="vertical-align: middle"><a href="{{url('payment?field=clabe&sort='.(request()->session()->get('sort')=='asc'?'desc':'asc'))}}">CLABE</a></th>
|
|
||||||
{{request()->session()->get('field')=='clabe'?(request()->session()->get('sort')=='asc'?'':''):''}}
|
|
||||||
|
|
||||||
<th style="vertical-align: middle"><a href="{{url('payment?field=bank_id&sort='.(request()->session()->get('sort')=='asc'?'desc':'asc'))}}">Banco</a></th>
|
|
||||||
{{request()->session()->get('field')=='bank_id'?(request()->session()->get('sort')=='asc'?'':''):''}}
|
|
||||||
|
|
||||||
<th style="vertical-align: middle"><a href="{{url('payment?field=bank_id&sort='.(request()->session()->get('sort')=='asc'?'desc':'asc'))}}">Código Banco</a></th>
|
|
||||||
{{request()->session()->get('field')=='bank_id'?(request()->session()->get('sort')=='asc'?'':''):''}}
|
|
||||||
|
|
||||||
<th style="vertical-align: middle"><a href="{{url('payment?field=amount&sort='.(request()->session()->get('sort')=='asc'?'desc':'asc'))}}">Monto</a></th>
|
|
||||||
{{request()->session()->get('field')=='amount'?(request()->session()->get('sort')=='asc'?'':''):''}}
|
|
||||||
|
|
||||||
<th style="vertical-align: middle"><a href="{{url('payment?field=revenue&sort='.(request()->session()->get('sort')=='asc'?'desc':'asc'))}}">Utilidad</a></th>
|
|
||||||
{{request()->session()->get('field')=='revenue'?(request()->session()->get('sort')=='asc'?'':''):''}}
|
|
||||||
|
|
||||||
<th style="vertical-align: middle"><a href="{{url('payment?field=IVA&sort='.(request()->session()->get('sort')=='asc'?'desc':'asc'))}}">Retención IVA</a></th>
|
|
||||||
{{request()->session()->get('field')=='IVA'?(request()->session()->get('sort')=='asc'?'':''):''}}
|
|
||||||
|
|
||||||
<th style="vertical-align: middle"><a href="{{url('payment?field=ISR&sort='.(request()->session()->get('sort')=='asc'?'desc':'asc'))}}">Retención ISR</a></th>
|
|
||||||
{{request()->session()->get('field')=='ISR'?(request()->session()->get('sort')=='asc'?'':''):''}}
|
|
||||||
|
|
||||||
<th style="vertical-align: middle"><a href="{{url('payment?field=ichamba_fee&sort='.(request()->session()->get('sort')=='asc'?'desc':'asc'))}}">Retención iChamba</a></th>
|
|
||||||
{{request()->session()->get('field')=='ichamba_fee'?(request()->session()->get('sort')=='asc'?'':''):''}}
|
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@php
|
@foreach ($payments as $row)
|
||||||
$i=1;
|
|
||||||
@endphp
|
|
||||||
@foreach ($payments as $payment)
|
|
||||||
<tr>
|
<tr>
|
||||||
<th>{{ $payment->id }}</th>
|
<th>{{ optional($row->suppliers)->company_name ?? '—' }}</th>
|
||||||
<td>{{ $payment->suppliers->company_name }}</td>
|
<td>{{ optional(optional($row->suppliers)->user)->email ?? '—' }}</td>
|
||||||
<td >{{ $payment->suppliers->user->email }}</td>
|
<td>{{ optional($row->suppliers)->RFC ?: optional($row->suppliers)->CURP ?? '—' }}</td>
|
||||||
<td >{{ (!$payment->suppliers->RFC) ? $payment->suppliers->CURP : $payment->suppliers->RFC }}</td>
|
<td>{{ optional($row->suppliers)->clabe ?? '—' }}</td>
|
||||||
<td >{{ $payment->suppliers->clabe }}</td>
|
<td>{{ optional(optional($row->suppliers)->banks)->name ?? '—' }}</td>
|
||||||
<td >{{ (isset($payment->suppliers->banks->name) ? $payment->suppliers->banks->name : null) }}</td>
|
<td>{{ $row->contract_count }}</td>
|
||||||
<td >{{ (isset($payment->suppliers->banks->code) ? $payment->suppliers->banks->code : null) }}</td>
|
<td>${{ number_format($row->total_amount, 2) }}</td>
|
||||||
<td >{{ $payment->amount }}</td>
|
<td>${{ number_format($row->total_revenue, 2) }}</td>
|
||||||
<td >{{ $payment->revenue }}</td>
|
<td>${{ number_format($row->total_iva, 2) }}</td>
|
||||||
<td >{{ $payment->IVA }}</td>
|
<td>${{ number_format($row->total_isr, 2) }}</td>
|
||||||
<td >{{ $payment->ISR }}</td>
|
<td>${{ number_format($row->total_fee, 2) }}</td>
|
||||||
<td >{{ $payment->ichamba_fee }}</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
@endforeach
|
@endforeach
|
||||||
|
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<ul class="pagination">
|
|
||||||
{{ $payments->links() }}
|
{{ $payments->links() }}
|
||||||
</ul>
|
|
||||||
</div>
|
</div>
|
||||||
@endsection
|
|
||||||
|
|||||||
@@ -12,5 +12,5 @@
|
|||||||
@endsection
|
@endsection
|
||||||
|
|
||||||
@section('js')
|
@section('js')
|
||||||
<script src="{{ asset('js/ajaxcrud.js') }}"></script>
|
<script src="{{ asset('js/ajaxcrud.js') }}?v={{ filemtime(public_path('js/ajaxcrud.js')) }}"></script>
|
||||||
@endsection
|
@endsection
|
||||||
|
|||||||
@@ -1,10 +1,7 @@
|
|||||||
@extends('layouts.app')
|
|
||||||
|
|
||||||
@section('content')
|
|
||||||
@if (Auth::user()->role_id >= 5)
|
@if (Auth::user()->role_id >= 5)
|
||||||
<div class="container-fluid" style="height:100%">
|
<div class="container-fluid" style="height:100%">
|
||||||
@include('sidebar')
|
<div>
|
||||||
<div style="width:90%; float: left; margin:1em 0 0 1em">
|
|
||||||
@else
|
@else
|
||||||
<div class="container" style="margin:0 1em">
|
<div class="container" style="margin:0 1em">
|
||||||
@endif
|
@endif
|
||||||
@@ -100,8 +97,5 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<ul class="pagination">
|
|
||||||
{{ $postulations->links() }}
|
{{ $postulations->links() }}
|
||||||
</ul>
|
|
||||||
</div>
|
</div>
|
||||||
@endsection
|
|
||||||
|
|||||||
@@ -7,8 +7,7 @@
|
|||||||
@section('content')
|
@section('content')
|
||||||
@if (Auth::user()->role_id >= 5)
|
@if (Auth::user()->role_id >= 5)
|
||||||
<div class="container-fluid" style="height:100%">
|
<div class="container-fluid" style="height:100%">
|
||||||
@include('sidebar')
|
<div>
|
||||||
<div style="width:90%; float: left; margin:1em 0 0 1em">
|
|
||||||
@else
|
@else
|
||||||
<div class="container" style="margin:0 1em">
|
<div class="container" style="margin:0 1em">
|
||||||
@endif
|
@endif
|
||||||
@@ -58,8 +57,6 @@
|
|||||||
'markers' => $mapMarkers
|
'markers' => $mapMarkers
|
||||||
])
|
])
|
||||||
|
|
||||||
<ul class="pagination">
|
|
||||||
{{ $postulations->links() }}
|
{{ $postulations->links() }}
|
||||||
</ul>
|
|
||||||
</div>
|
</div>
|
||||||
@endsection
|
@endsection
|
||||||
|
|||||||
@@ -12,5 +12,5 @@
|
|||||||
@endsection
|
@endsection
|
||||||
|
|
||||||
@section('js')
|
@section('js')
|
||||||
<script src="{{ asset('js/ajaxcrud.js') }}"></script>
|
<script src="{{ asset('js/ajaxcrud.js') }}?v={{ filemtime(public_path('js/ajaxcrud.js')) }}"></script>
|
||||||
@endsection
|
@endsection
|
||||||
|
|||||||
@@ -4,8 +4,7 @@
|
|||||||
<script src="{{ asset('js/ajaxcrud.js') }}"></script>
|
<script src="{{ asset('js/ajaxcrud.js') }}"></script>
|
||||||
@if (Auth::user()->role_id >= 5)
|
@if (Auth::user()->role_id >= 5)
|
||||||
<div class="container-fluid" style="height:100%">
|
<div class="container-fluid" style="height:100%">
|
||||||
@include('sidebar')
|
<div>
|
||||||
<div style="width:90%; float: left; margin:1em 0 0 1em">
|
|
||||||
@else
|
@else
|
||||||
<div class="container" style="margin:0 1em">
|
<div class="container" style="margin:0 1em">
|
||||||
@endif
|
@endif
|
||||||
@@ -112,8 +111,6 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<ul class="pagination">
|
|
||||||
{{ $comments->links() }}
|
{{ $comments->links() }}
|
||||||
</ul>
|
|
||||||
</div>
|
</div>
|
||||||
@endsection
|
@endsection
|
||||||
|
|||||||
@@ -1,10 +1,7 @@
|
|||||||
@extends('layouts.app')
|
|
||||||
|
|
||||||
@section('content')
|
|
||||||
@if (Auth::user()->role_id >= 5)
|
@if (Auth::user()->role_id >= 5)
|
||||||
<div class="container-fluid" style="height:100%">
|
<div class="container-fluid" style="height:100%">
|
||||||
@include('sidebar')
|
<div>
|
||||||
<div style="width:90%; float: left; margin:1em 0 0 1em">
|
|
||||||
@else
|
@else
|
||||||
<div class="container" style="margin:0 1em">
|
<div class="container" style="margin:0 1em">
|
||||||
@endif
|
@endif
|
||||||
@@ -79,8 +76,5 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<ul class="pagination">
|
|
||||||
{{ $reports->links() }}
|
{{ $reports->links() }}
|
||||||
</ul>
|
|
||||||
</div>
|
</div>
|
||||||
@endsection
|
|
||||||
|
|||||||
@@ -1,19 +1,46 @@
|
|||||||
<div style="width:10%; height: calc(100% + 25px); margin-left:-15px; float: left; background-color:#c6e0f5">
|
<div class="sidebar-wrapper">
|
||||||
<!-- Sidebar-->
|
<nav class="sidebar-nav">
|
||||||
<div class="list-group list-group-flush">
|
<a href="/home" class="sidebar-link {{ Request::is('home') ? 'active' : '' }}">
|
||||||
<a class="list-group-item list-group-item-action list-group-item-secondary p-3" href="/home">Inicio</a>
|
<i class="fa fa-home"></i> Inicio
|
||||||
<a class="list-group-item list-group-item-action list-group-item-primary p-3" href="/users">Usuarios</a>
|
</a>
|
||||||
<a class="list-group-item list-group-item-action list-group-item-primary p-3" href="/supplier">Proveedores</a>
|
<a href="/users" class="sidebar-link {{ Request::is('users*') ? 'active' : '' }}">
|
||||||
<a class="list-group-item list-group-item-action list-group-item-primary p-3" href="/categories">Categorias</a>
|
<i class="fa fa-users"></i> Usuarios
|
||||||
<a class="list-group-item list-group-item-action list-group-item-primary p-3" href="/banks">Bancos</a>
|
</a>
|
||||||
<a class="list-group-item list-group-item-action list-group-item-primary p-3" href="/cards">Tarjetas</a>
|
<a href="/supplier" class="sidebar-link {{ Request::is('supplier*') ? 'active' : '' }}">
|
||||||
<a class="list-group-item list-group-item-action list-group-item-primary p-3" href="/payments">Pagos</a>
|
<i class="fa fa-wrench"></i> Proveedores
|
||||||
<a class="list-group-item list-group-item-action list-group-item-primary p-3" href="/postulations">Postulaciones</a>
|
</a>
|
||||||
<a class="list-group-item list-group-item-action list-group-item-primary p-3" href="/currentcontracts">Contratos Actuales</a>
|
<a href="/categories" class="sidebar-link {{ Request::is('categories*') ? 'active' : '' }}">
|
||||||
<a class="list-group-item list-group-item-action list-group-item-primary p-3" href="/finishedcontracts">Contratos Finalizados</a>
|
<i class="fa fa-list-alt"></i> Categorías
|
||||||
<a class="list-group-item list-group-item-action list-group-item-primary p-3" href="/reports">Reportes</a>
|
</a>
|
||||||
<a class="list-group-item list-group-item-action list-group-item-primary p-3" href="/coupons">Cupones</a>
|
<a href="/banks" class="sidebar-link {{ Request::is('banks*') ? 'active' : '' }}">
|
||||||
<a class="list-group-item list-group-item-action list-group-item-primary p-3" href="/parameters">Parámetros</a>
|
<i class="fa fa-university"></i> Bancos
|
||||||
<a class="list-group-item list-group-item-action list-group-item-primary p-3" href="/status">Status de contratos</a>
|
</a>
|
||||||
</div>
|
<a href="/cards" class="sidebar-link {{ Request::is('cards*') ? 'active' : '' }}">
|
||||||
|
<i class="fa fa-credit-card"></i> Tarjetas
|
||||||
|
</a>
|
||||||
|
<a href="/payments" class="sidebar-link {{ Request::is('payments*') ? 'active' : '' }}">
|
||||||
|
<i class="fa fa-money"></i> Pagos
|
||||||
|
</a>
|
||||||
|
<a href="/postulations" class="sidebar-link {{ Request::is('postulations*') ? 'active' : '' }}">
|
||||||
|
<i class="fa fa-file-text"></i> Postulaciones
|
||||||
|
</a>
|
||||||
|
<a href="/currentcontracts" class="sidebar-link {{ Request::is('currentcontracts*') ? 'active' : '' }}">
|
||||||
|
<i class="fa fa-handshake-o"></i> Contratos Actuales
|
||||||
|
</a>
|
||||||
|
<a href="/finishedcontracts" class="sidebar-link {{ Request::is('finishedcontracts*') ? 'active' : '' }}">
|
||||||
|
<i class="fa fa-check-circle"></i> Contratos Finalizados
|
||||||
|
</a>
|
||||||
|
<a href="/reports" class="sidebar-link {{ Request::is('reports*') ? 'active' : '' }}">
|
||||||
|
<i class="fa fa-flag"></i> Reportes
|
||||||
|
</a>
|
||||||
|
<a href="/coupons" class="sidebar-link {{ Request::is('coupons*') ? 'active' : '' }}">
|
||||||
|
<i class="fa fa-ticket"></i> Cupones
|
||||||
|
</a>
|
||||||
|
<a href="/parameters" class="sidebar-link {{ Request::is('parameters*') ? 'active' : '' }}">
|
||||||
|
<i class="fa fa-cog"></i> Parámetros
|
||||||
|
</a>
|
||||||
|
<a href="/status" class="sidebar-link {{ Request::is('status*') ? 'active' : '' }}">
|
||||||
|
<i class="fa fa-toggle-on"></i> Status de contratos
|
||||||
|
</a>
|
||||||
|
</nav>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -12,5 +12,5 @@
|
|||||||
@endsection
|
@endsection
|
||||||
|
|
||||||
@section('js')
|
@section('js')
|
||||||
<script src="{{ asset('js/ajaxcrud.js') }}"></script>
|
<script src="{{ asset('js/ajaxcrud.js') }}?v={{ filemtime(public_path('js/ajaxcrud.js')) }}"></script>
|
||||||
@endsection
|
@endsection
|
||||||
|
|||||||
@@ -1,10 +1,7 @@
|
|||||||
@extends('layouts.app')
|
|
||||||
|
|
||||||
@section('content')
|
|
||||||
@if (Auth::user()->role_id >= 5)
|
@if (Auth::user()->role_id >= 5)
|
||||||
<div class="container-fluid" style="height:100%">
|
<div class="container-fluid" style="height:100%">
|
||||||
@include('sidebar')
|
<div>
|
||||||
<div style="width:90%; float: left; margin:1em 0 0 1em">
|
|
||||||
@else
|
@else
|
||||||
<div class="container" style="margin:0 1em">
|
<div class="container" style="margin:0 1em">
|
||||||
@endif
|
@endif
|
||||||
@@ -15,21 +12,19 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-sm-5">
|
<div class="col-sm-5">
|
||||||
<div class="pull-right">
|
<div class="pull-right">
|
||||||
|
{!! Form::open(['method'=>'GET','url'=>'status','class'=>'navbar-form navbar-left','role'=>'search']) !!}
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<input class="form-control" id="search"
|
<input class="form-control" id="search"
|
||||||
value="{{ request()->session()->get('search') }}"
|
value="{{ request()->session()->get('search') }}"
|
||||||
onkeydown="if (event.keyCode == 13) ajaxLoad('{{url('status')}}?search='+this.value)"
|
|
||||||
placeholder="Buscar" name="search"
|
placeholder="Buscar" name="search"
|
||||||
type="text" id="search"/>
|
type="text"/>
|
||||||
<div class="input-group-btn">
|
<div class="input-group-btn">
|
||||||
<a href="{{url('status')}}">
|
<button type="submit" class="btn btn-primary">
|
||||||
<button type="submit" class="btn btn-primary"
|
|
||||||
onclick="ajaxLoad('{{url('/status')}}?search='+$('#search').val())">
|
|
||||||
<i class="fa fa-search" aria-hidden="true"></i>
|
<i class="fa fa-search" aria-hidden="true"></i>
|
||||||
</button>
|
</button>
|
||||||
</a>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
{!! Form::close() !!}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -74,8 +69,5 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<ul class="pagination">
|
|
||||||
{{ $status->links() }}
|
{{ $status->links() }}
|
||||||
</ul>
|
|
||||||
</div>
|
</div>
|
||||||
@endsection
|
|
||||||
|
|||||||
@@ -12,5 +12,5 @@
|
|||||||
@endsection
|
@endsection
|
||||||
|
|
||||||
@section('js')
|
@section('js')
|
||||||
<script src="{{ asset('js/ajaxcrud.js') }}"></script>
|
<script src="{{ asset('js/ajaxcrud.js') }}?v={{ filemtime(public_path('js/ajaxcrud.js')) }}"></script>
|
||||||
@endsection
|
@endsection
|
||||||
|
|||||||
@@ -10,45 +10,7 @@
|
|||||||
@else
|
@else
|
||||||
{!! Form::open(['id'=>'frm', 'files' => 'true']) !!}
|
{!! Form::open(['id'=>'frm', 'files' => 'true']) !!}
|
||||||
@endif
|
@endif
|
||||||
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyBmkTsg0-1VKllM_vHD6V1EhPnF0YUP-88&libraries=places"></script>
|
|
||||||
<link rel="stylesheet" href="https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
|
<link rel="stylesheet" href="https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
|
||||||
<script type="text/javascript">
|
|
||||||
google.maps.event.addDomListener(window, 'load', function () {
|
|
||||||
var searchBox = new google.maps.places.Autocomplete(document.getElementById('address'));
|
|
||||||
google.maps.event.addListener(searchBox, 'place_changed', function () {
|
|
||||||
|
|
||||||
var place = searchBox.getPlace();
|
|
||||||
|
|
||||||
var lat = place.geometry.location.lat();
|
|
||||||
console.log(lat);
|
|
||||||
var lng = place.geometry.location.lng();
|
|
||||||
console.log(lng);
|
|
||||||
|
|
||||||
$('#lat').val(lat);
|
|
||||||
$('#lng').val(lng);
|
|
||||||
|
|
||||||
});
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
<script type="text/javascript">
|
|
||||||
$( function() {
|
|
||||||
var categories = new Bloodhound({
|
|
||||||
datumTokenizer: Bloodhound.tokenizers.whitespace,
|
|
||||||
queryTokenizer: Bloodhound.tokenizers.whitespace,
|
|
||||||
prefetch: {
|
|
||||||
url: "/api/categories-name",
|
|
||||||
}
|
|
||||||
});
|
|
||||||
categories.initialize();
|
|
||||||
|
|
||||||
$('#categories').tagsinput({
|
|
||||||
typeaheadjs: {
|
|
||||||
name: 'categories',
|
|
||||||
source: categories.ttAdapter()
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
<div class="form-group row required">
|
<div class="form-group row required">
|
||||||
{!! Form::label("company_name","Tu nombre o nombre de la empresa*",["class"=>"col-form-label col-md-3 col-lg-2"]) !!}
|
{!! Form::label("company_name","Tu nombre o nombre de la empresa*",["class"=>"col-form-label col-md-3 col-lg-2"]) !!}
|
||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
@@ -180,3 +142,29 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@endsection
|
@endsection
|
||||||
|
|
||||||
|
@section('js')
|
||||||
|
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyBmkTsg0-1VKllM_vHD6V1EhPnF0YUP-88&libraries=places"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
var mapSearchBox = new google.maps.places.Autocomplete(document.getElementById('address'));
|
||||||
|
google.maps.event.addListener(mapSearchBox, 'place_changed', function () {
|
||||||
|
var place = mapSearchBox.getPlace();
|
||||||
|
$('#lat').val(place.geometry.location.lat());
|
||||||
|
$('#lng').val(place.geometry.location.lng());
|
||||||
|
});
|
||||||
|
|
||||||
|
var categories = new Bloodhound({
|
||||||
|
datumTokenizer: Bloodhound.tokenizers.whitespace,
|
||||||
|
queryTokenizer: Bloodhound.tokenizers.whitespace,
|
||||||
|
prefetch: { url: "/api/categories-name" }
|
||||||
|
});
|
||||||
|
categories.initialize();
|
||||||
|
|
||||||
|
$('#categories').tagsinput({
|
||||||
|
typeaheadjs: {
|
||||||
|
name: 'categories',
|
||||||
|
source: categories.ttAdapter()
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
@endsection
|
||||||
|
|||||||
@@ -1,10 +1,7 @@
|
|||||||
@extends('layouts.app')
|
|
||||||
|
|
||||||
@section('content')
|
|
||||||
@if (Auth::user()->role_id >= 5)
|
@if (Auth::user()->role_id >= 5)
|
||||||
<div class="container-fluid" style="height:100%">
|
<div class="container-fluid" style="height:100%">
|
||||||
@include('sidebar')
|
<div>
|
||||||
<div style="width:90%; float: left; margin:1em 0 0 1em">
|
|
||||||
@else
|
@else
|
||||||
<div class="container" style="margin:0 1em">
|
<div class="container" style="margin:0 1em">
|
||||||
@endif
|
@endif
|
||||||
@@ -147,8 +144,5 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<ul class="pagination">
|
|
||||||
{{ $suppliers->links() }}
|
{{ $suppliers->links() }}
|
||||||
</ul>
|
|
||||||
</div>
|
</div>
|
||||||
@endsection
|
|
||||||
|
|||||||
@@ -12,5 +12,5 @@
|
|||||||
@endsection
|
@endsection
|
||||||
|
|
||||||
@section('js')
|
@section('js')
|
||||||
<script src="{{ asset('js/ajaxcrud.js') }}"></script>
|
<script src="{{ asset('js/ajaxcrud.js') }}?v={{ filemtime(public_path('js/ajaxcrud.js')) }}"></script>
|
||||||
@endsection
|
@endsection
|
||||||
|
|||||||
@@ -1,10 +1,7 @@
|
|||||||
@extends('layouts.app')
|
|
||||||
|
|
||||||
@section('content')
|
|
||||||
@if (Auth::user()->role_id >= 5)
|
@if (Auth::user()->role_id >= 5)
|
||||||
<div class="container-fluid" style="height:100%">
|
<div class="container-fluid" style="height:100%">
|
||||||
@include('sidebar')
|
<div>
|
||||||
<div style="width:90%; float: left; margin:1em 0 0 1em">
|
|
||||||
@else
|
@else
|
||||||
<div class="container" style="margin:0 1em">
|
<div class="container" style="margin:0 1em">
|
||||||
@endif
|
@endif
|
||||||
@@ -108,8 +105,5 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<ul class="pagination">
|
|
||||||
{{ $users->links() }}
|
{{ $users->links() }}
|
||||||
</ul>
|
|
||||||
</div>
|
</div>
|
||||||
@endsection
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td class="header" style="background-color:#0080ff">
|
<td class="header" style="background-color:#0080ff">
|
||||||
<a href="{{ $url }}">
|
<a href="{{ $url }}">
|
||||||
<img alt="logo" style="max-width:15em" src="https://jobheroglobal.com/img/jobhero.svg">
|
<img alt="logo" style="max-width:15em" src="{{ asset('/img/jobhero.svg') }}">
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use App\Models\Categories;
|
use App\Models\Categories;
|
||||||
|
use App\Models\Banks;
|
||||||
use Carbon\Carbon;
|
use Carbon\Carbon;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -18,11 +19,9 @@ use Carbon\Carbon;
|
|||||||
Route::group([
|
Route::group([
|
||||||
'prefix' => 'auth'
|
'prefix' => 'auth'
|
||||||
], function () {
|
], function () {
|
||||||
Route::post('login', 'Auth\AuthController@login')->name('login');
|
Route::post('login', 'Auth\AuthController@login');
|
||||||
Route::post('register', 'Auth\AuthController@register');
|
Route::post('register', 'Auth\AuthController@register');
|
||||||
Route::post('fb', 'Auth\AuthController@fb')->name('fb');
|
Route::post('firebase', 'Auth\AuthController@firebase');
|
||||||
Route::post('google', 'Auth\AuthController@google')->name('google');
|
|
||||||
//Route::post('apple', 'Auth\AuthController@apple')->name('apple');
|
|
||||||
Route::post('forgot/password', 'Auth\ForgotPasswordController@sendResetLinkEmail');
|
Route::post('forgot/password', 'Auth\ForgotPasswordController@sendResetLinkEmail');
|
||||||
|
|
||||||
Route::group([
|
Route::group([
|
||||||
@@ -81,6 +80,10 @@ Route::group([
|
|||||||
|
|
||||||
Route::get('/parameters', 'IChambaParameterController@parameters');
|
Route::get('/parameters', 'IChambaParameterController@parameters');
|
||||||
|
|
||||||
|
Route::get('/banks', function () {
|
||||||
|
return response()->json(Banks::orderBy('name')->get(['id', 'code', 'name']));
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
Route::get('/en-categories-name', function () {
|
Route::get('/en-categories-name', function () {
|
||||||
$categories=Categories::all()->pluck('en_name')->toArray();
|
$categories=Categories::all()->pluck('en_name')->toArray();
|
||||||
|
|||||||
Reference in New Issue
Block a user