From 31b2e896ada7bc8533f67f29e051681f50c1c34a Mon Sep 17 00:00:00 2001 From: Jose Sanchez <54992061+93jose93@users.noreply.github.com> Date: Tue, 15 Aug 2023 10:37:30 -0400 Subject: [PATCH] registrar usuario de tipo comprador, comente algunas cosas del codigo --- .../Controllers/Auth/RegisterController.php | 230 +++--- .../Auth/VerificationController.php | 104 +-- app/Http/Controllers/HomeController.php | 92 +-- app/Http/Controllers/ShopViewsController.php | 20 +- .../Controllers/TypeBusinessController.php | 84 ++ app/Http/Controllers/TypeBuyerController.php | 131 +++ .../Controllers/TypeWorkshopController.php | 84 ++ app/Http/Controllers/UserController.php | 128 +-- app/Mail/VerificationEmail.php | 39 + app/Models/User.php | 7 +- .../EmailVerificationNotification.php | 44 +- composer.json | 1 + config/app.php | 9 +- .../registro-form/assets/images/casa.png | Bin 0 -> 1517 bytes resources/lang/es.json | 751 ++++++++++++++++++ resources/lang/es/auth.php | 18 + resources/lang/es/pagination.php | 17 + resources/lang/es/passwords.php | 20 + resources/lang/es/validation-inline.php | 139 ++++ resources/lang/es/validation-nova-inline.php | 17 + resources/lang/es/validation-nova.php | 17 + resources/lang/es/validation.php | 240 ++++++ resources/views/auth/register.blade.php | 579 ++++++++++++-- .../views/emails/app_verification.blade.php | 4 +- .../views/emails/verification_user.blade.php | 156 ++++ resources/views/frontend/inc/footer.blade.php | 4 +- resources/views/frontend/inc/nav.blade.php | 4 +- .../frontend/partials/login_modal.blade.php | 2 +- .../product_details/product_queries.blade.php | 2 +- .../views/account-type.blade.php | 39 +- .../views/assets/css/theme-1.css | 7 +- .../views/business/index.blade.php | 337 ++++++++ .../views/buyers/index.blade.php | 373 +++++++++ .../views/email-verification.blade.php | 212 +---- .../views/register-email.blade.php | 4 +- .../views/signup-complete.blade.php | 24 +- .../views/workshops/index.blade.php | 337 ++++++++ routes/web.php | 91 ++- 38 files changed, 3718 insertions(+), 649 deletions(-) create mode 100644 app/Http/Controllers/TypeBusinessController.php create mode 100644 app/Http/Controllers/TypeBuyerController.php create mode 100644 app/Http/Controllers/TypeWorkshopController.php create mode 100644 app/Mail/VerificationEmail.php create mode 100644 public/assets/registrocomercio/registro-form/assets/images/casa.png create mode 100644 resources/lang/es.json create mode 100644 resources/lang/es/auth.php create mode 100644 resources/lang/es/pagination.php create mode 100644 resources/lang/es/passwords.php create mode 100644 resources/lang/es/validation-inline.php create mode 100644 resources/lang/es/validation-nova-inline.php create mode 100644 resources/lang/es/validation-nova.php create mode 100644 resources/lang/es/validation.php create mode 100644 resources/views/emails/verification_user.blade.php create mode 100644 resources/views/frontend/registro-comercio/views/business/index.blade.php create mode 100644 resources/views/frontend/registro-comercio/views/buyers/index.blade.php create mode 100644 resources/views/frontend/registro-comercio/views/workshops/index.blade.php diff --git a/app/Http/Controllers/Auth/RegisterController.php b/app/Http/Controllers/Auth/RegisterController.php index bda1863e..c37690af 100644 --- a/app/Http/Controllers/Auth/RegisterController.php +++ b/app/Http/Controllers/Auth/RegisterController.php @@ -44,134 +44,134 @@ class RegisterController extends Controller * * @var string */ - protected $redirectTo = '/'; + // protected $redirectTo = '/'; - /** - * Create a new controller instance. - * - * @return void - */ - public function __construct() - { - $this->middleware('guest'); - } + // /** + // * Create a new controller instance. + // * + // * @return void + // */ + // public function __construct() + // { + // $this->middleware('guest'); + // } - /** - * Get a validator for an incoming registration request. - * - * @param array $data - * @return \Illuminate\Contracts\Validation\Validator - */ - protected function validator(array $data) - { - return Validator::make($data, [ - 'name' => 'required|string|max:255', - 'password' => 'required|string|min:6|confirmed', - 'g-recaptcha-response' => [ - Rule::when(get_setting('google_recaptcha') == 1, ['required', new Recaptcha()], ['sometimes']) - ] - ]); - } + // /** + // * Get a validator for an incoming registration request. + // * + // * @param array $data + // * @return \Illuminate\Contracts\Validation\Validator + // */ + // protected function validator(array $data) + // { + // return Validator::make($data, [ + // 'name' => 'required|string|max:255', + // 'password' => 'required|string|min:6|confirmed', + // 'g-recaptcha-response' => [ + // Rule::when(get_setting('google_recaptcha') == 1, ['required', new Recaptcha()], ['sometimes']) + // ] + // ]); + // } - /** - * Create a new user instance after a valid registration. - * - * @param array $data - * @return \App\Models\User - */ - protected function create(array $data) - { - if (filter_var($data['email'], FILTER_VALIDATE_EMAIL)) { - $user = User::create([ - 'name' => $data['name'], - 'email' => $data['email'], - 'password' => Hash::make($data['password']), - ]); - } - else { - if (addon_is_activated('otp_system')){ - $user = User::create([ - 'name' => $data['name'], - 'phone' => '+'.$data['country_code'].$data['phone'], - 'password' => Hash::make($data['password']), - 'verification_code' => rand(100000, 999999) - ]); + // /** + // * Create a new user instance after a valid registration. + // * + // * @param array $data + // * @return \App\Models\User + // */ + // protected function create(array $data) + // { + // if (filter_var($data['email'], FILTER_VALIDATE_EMAIL)) { + // $user = User::create([ + // 'name' => $data['name'], + // 'email' => $data['email'], + // 'password' => Hash::make($data['password']), + // ]); + // } + // else { + // if (addon_is_activated('otp_system')){ + // $user = User::create([ + // 'name' => $data['name'], + // 'phone' => '+'.$data['country_code'].$data['phone'], + // 'password' => Hash::make($data['password']), + // 'verification_code' => rand(100000, 999999) + // ]); - $otpController = new OTPVerificationController; - $otpController->send_code($user); - } - } + // $otpController = new OTPVerificationController; + // $otpController->send_code($user); + // } + // } - if(session('temp_user_id') != null){ - Cart::where('temp_user_id', session('temp_user_id')) - ->update([ - 'user_id' => $user->id, - 'temp_user_id' => null - ]); + // if(session('temp_user_id') != null){ + // Cart::where('temp_user_id', session('temp_user_id')) + // ->update([ + // 'user_id' => $user->id, + // 'temp_user_id' => null + // ]); - Session::forget('temp_user_id'); - } + // Session::forget('temp_user_id'); + // } - if(Cookie::has('referral_code')){ - $referral_code = Cookie::get('referral_code'); - $referred_by_user = User::where('referral_code', $referral_code)->first(); - if($referred_by_user != null){ - $user->referred_by = $referred_by_user->id; - $user->save(); - } - } + // if(Cookie::has('referral_code')){ + // $referral_code = Cookie::get('referral_code'); + // $referred_by_user = User::where('referral_code', $referral_code)->first(); + // if($referred_by_user != null){ + // $user->referred_by = $referred_by_user->id; + // $user->save(); + // } + // } - return $user; - } + // return $user; + // } - public function register(Request $request) - { - if (filter_var($request->email, FILTER_VALIDATE_EMAIL)) { - if(User::where('email', $request->email)->first() != null){ - flash(translate('Email or Phone already exists.')); - return back(); - } - } - elseif (User::where('phone', '+'.$request->country_code.$request->phone)->first() != null) { - flash(translate('Phone already exists.')); - return back(); - } + // public function register(Request $request) + // { + // if (filter_var($request->email, FILTER_VALIDATE_EMAIL)) { + // if(User::where('email', $request->email)->first() != null){ + // flash(translate('Email or Phone already exists.')); + // return back(); + // } + // } + // elseif (User::where('phone', '+'.$request->country_code.$request->phone)->first() != null) { + // flash(translate('Phone already exists.')); + // return back(); + // } - $this->validator($request->all())->validate(); + // $this->validator($request->all())->validate(); - $user = $this->create($request->all()); + // $user = $this->create($request->all()); - $this->guard()->login($user); + // $this->guard()->login($user); - if($user->email != null){ - if(BusinessSetting::where('type', 'email_verification')->first()->value != 1){ - $user->email_verified_at = date('Y-m-d H:m:s'); - $user->save(); - flash(translate('Registration successful.'))->success(); - } - else { - try { - $user->sendEmailVerificationNotification(); - flash(translate('Registration successful. Please verify your email.'))->success(); - } catch (\Throwable $th) { - $user->delete(); - flash(translate('Registration failed. Please try again later.'))->error(); - } - } - } + // if($user->email != null){ + // if(BusinessSetting::where('type', 'email_verification')->first()->value != 1){ + // $user->email_verified_at = date('Y-m-d H:m:s'); + // $user->save(); + // flash(translate('Registration successful.'))->success(); + // } + // else { + // try { + // $user->sendEmailVerificationNotification(); + // flash(translate('Registration successful. Please verify your email.'))->success(); + // } catch (\Throwable $th) { + // $user->delete(); + // flash(translate('Registration failed. Please try again later.'))->error(); + // } + // } + // } - return $this->registered($request, $user) - ?: redirect($this->redirectPath()); - } + // return $this->registered($request, $user) + // ?: redirect($this->redirectPath()); + // } - protected function registered(Request $request, $user) - { - if ($user->email == null) { - return redirect()->route('verification'); - }elseif(session('link') != null){ - return redirect(session('link')); - }else { - return redirect()->route('home'); - } - } + // protected function registered(Request $request, $user) + // { + // if ($user->email == null) { + // return redirect()->route('verification'); + // }elseif(session('link') != null){ + // return redirect(session('link')); + // }else { + // return redirect()->route('home'); + // } + // } } diff --git a/app/Http/Controllers/Auth/VerificationController.php b/app/Http/Controllers/Auth/VerificationController.php index 6b0c6ef5..573952f5 100644 --- a/app/Http/Controllers/Auth/VerificationController.php +++ b/app/Http/Controllers/Auth/VerificationController.php @@ -8,95 +8,31 @@ use App\Models\User; use Carbon\Carbon; use Illuminate\Http\Request; use App\Http\Controllers\OTPVerificationController; - class VerificationController extends Controller { - /* - |-------------------------------------------------------------------------- - | Email Verification Controller - |-------------------------------------------------------------------------- - | - | This controller is responsible for handling email verification for any - | user that recently registered with the application. Emails may also - | be re-sent if the user didn't receive the original email message. - | - */ - use VerifiesEmails; + public function verify(Request $request, $id, $hash) + { + // Aquí debes implementar la lógica para verificar el token y marcar el correo electrónico como verificado + // Puedes usar el $id y $hash para buscar el usuario en la base de datos y realizar la verificación - /** - * Where to redirect users after verification. - * - * @var string - */ - protected $redirectTo = '/'; + // Ejemplo de implementación: + $user = User::find($id); - /** - * Create a new controller instance. - * - * @return void - */ - public function __construct() - { - //$this->middleware('auth'); - $this->middleware('signed')->only('verify'); - $this->middleware('throttle:6,1')->only('verify', 'resend'); + if ($user && hash_equals($hash, $user->confirmation_code)) { + $user->email_verified_at = now(); + $user->save(); + + // Inicia sesión al usuario si lo deseas + auth()->login($user); + + // Redirige al usuario a la página de éxito o a donde desees + return redirect()->route('shop.view.signup.complete'); } - /** - * Show the email verification notice. - * - * @param \Illuminate\Http\Request $request - * @return \Illuminate\Http\Response - */ - public function show(Request $request) - { - if ($request->user()->email != null) { - return $request->user()->hasVerifiedEmail() - ? redirect($this->redirectPath()) - : view('auth.verify'); - } - else { - $otpController = new OTPVerificationController; - $otpController->send_code($request->user()); - return redirect()->route('verification'); - } - } + // Si la verificación falla, puedes redirigir al usuario a una página de error o mostrar un mensaje de error + return redirect()->route('shop.view.email.verification'); + } - - /** - * Resend the email verification notification. - * - * @param \Illuminate\Http\Request $request - * @return \Illuminate\Http\Response - */ - public function resend(Request $request) - { - if ($request->user()->hasVerifiedEmail()) { - return redirect($this->redirectPath()); - } - - $request->user()->sendEmailVerificationNotification(); - - return back()->with('resent', true); - } - - public function verification_confirmation($code){ - $user = User::where('verification_code', $code)->first(); - if($user != null){ - $user->email_verified_at = Carbon::now(); - $user->save(); - auth()->login($user, true); - flash(translate('Your email has been verified successfully'))->success(); - } - else { - flash(translate('Sorry, we could not verifiy you. Please try again'))->error(); - } - - if($user->user_type == 'seller') { - return redirect()->route('seller.dashboard'); - } - - return redirect()->route('dashboard'); - } -} + +} \ No newline at end of file diff --git a/app/Http/Controllers/HomeController.php b/app/Http/Controllers/HomeController.php index f9fc5389..ad9d424a 100644 --- a/app/Http/Controllers/HomeController.php +++ b/app/Http/Controllers/HomeController.php @@ -69,29 +69,29 @@ class HomeController extends Controller return view('frontend.user_login'); } - public function registration(Request $request) - { - if (Auth::check()) { - return redirect()->route('home'); - } - if ($request->has('referral_code') && addon_is_activated('affiliate_system')) { - try { - $affiliate_validation_time = AffiliateConfig::where('type', 'validation_time')->first(); - $cookie_minute = 30 * 24; - if ($affiliate_validation_time) { - $cookie_minute = $affiliate_validation_time->value * 60; - } + // public function registration(Request $request) + // { + // if (Auth::check()) { + // return redirect()->route('home'); + // } + // if ($request->has('referral_code') && addon_is_activated('affiliate_system')) { + // try { + // $affiliate_validation_time = AffiliateConfig::where('type', 'validation_time')->first(); + // $cookie_minute = 30 * 24; + // if ($affiliate_validation_time) { + // $cookie_minute = $affiliate_validation_time->value * 60; + // } - Cookie::queue('referral_code', $request->referral_code, $cookie_minute); - $referred_by_user = User::where('referral_code', $request->referral_code)->first(); + // Cookie::queue('referral_code', $request->referral_code, $cookie_minute); + // $referred_by_user = User::where('referral_code', $request->referral_code)->first(); - $affiliateController = new AffiliateController; - $affiliateController->processAffiliateStats($referred_by_user->id, 1, 0, 0, 0); - } catch (\Exception $e) { - } - } - return view('frontend.user_registration'); - } + // $affiliateController = new AffiliateController; + // $affiliateController->processAffiliateStats($referred_by_user->id, 1, 0, 0, 0); + // } catch (\Exception $e) { + // } + // } + // return view('frontend.user_registration'); + // } public function cart_login(Request $request) { @@ -590,37 +590,37 @@ class HomeController extends Controller return back(); } - public function send_email_change_verification_mail($request, $email) - { - $response['status'] = 0; - $response['message'] = 'Unknown'; + // public function send_email_change_verification_mail($request, $email) + // { + // $response['status'] = 0; + // $response['message'] = 'Unknown'; - $verification_code = Str::random(32); + // $verification_code = Str::random(32); - $array['subject'] = translate('Email Verification'); - $array['from'] = env('MAIL_FROM_ADDRESS'); - $array['content'] = translate('Verify your account'); - $array['link'] = route('email_change.callback') . '?new_email_verificiation_code=' . $verification_code . '&email=' . $email; - $array['sender'] = Auth::user()->name; - $array['details'] = translate("Email Second"); + // $array['subject'] = translate('Email Verification'); + // $array['from'] = env('MAIL_FROM_ADDRESS'); + // $array['content'] = translate('Verify your account'); + // $array['link'] = route('email_change.callback') . '?new_email_verificiation_code=' . $verification_code . '&email=' . $email; + // $array['sender'] = Auth::user()->name; + // $array['details'] = translate("Email Second"); - $user = Auth::user(); - $user->new_email_verificiation_code = $verification_code; - $user->save(); + // $user = Auth::user(); + // $user->new_email_verificiation_code = $verification_code; + // $user->save(); - try { - Mail::to($email)->queue(new SecondEmailVerifyMailManager($array)); + // try { + // Mail::to($email)->queue(new SecondEmailVerifyMailManager($array)); - $response['status'] = 1; - $response['message'] = translate("Your verification mail has been Sent to your email."); - } catch (\Exception $e) { - // return $e->getMessage(); - $response['status'] = 0; - $response['message'] = $e->getMessage(); - } + // $response['status'] = 1; + // $response['message'] = translate("Your verification mail has been Sent to your email."); + // } catch (\Exception $e) { + // // return $e->getMessage(); + // $response['status'] = 0; + // $response['message'] = $e->getMessage(); + // } - return $response; - } + // return $response; + // } public function email_change_callback(Request $request) { diff --git a/app/Http/Controllers/ShopViewsController.php b/app/Http/Controllers/ShopViewsController.php index df0bbb94..61ab3c48 100644 --- a/app/Http/Controllers/ShopViewsController.php +++ b/app/Http/Controllers/ShopViewsController.php @@ -2,14 +2,15 @@ namespace App\Http\Controllers; +use Auth; use Illuminate\Http\Request; class ShopViewsController extends Controller { - public function index() { + // public function index() { - return view('frontend.registro-comercio.index'); - } + // return view('frontend.registro-comercio.index'); + // } /* Paso 1 - Elegir tipo de cuenta */ public function account_type() { @@ -18,15 +19,18 @@ class ShopViewsController extends Controller } /* Paso 2 - Registro de correo */ - public function register_email() { + // public function register_email() { - return view('frontend.registro-comercio.views.register-email'); - } + // return view('frontend.registro-comercio.views.register-email'); + // } /* Paso 3 - Verificacion de correo */ - public function verification_email() { + public function verification_email() { + + $user = Auth::user(); // Obtener el usuario autenticado + + return view('frontend.registro-comercio.views.email-verification')->with('user', $user); - return view('frontend.registro-comercio.views.email-verification'); } /* Paso 4 - Cuenta creada correctamente */ diff --git a/app/Http/Controllers/TypeBusinessController.php b/app/Http/Controllers/TypeBusinessController.php new file mode 100644 index 00000000..09c3fce4 --- /dev/null +++ b/app/Http/Controllers/TypeBusinessController.php @@ -0,0 +1,84 @@ +all(), [ + 'email' => ['required', 'string', 'email', 'max:255', 'unique:'.User::class], + 'password' => ['required', 'confirmed', Password::defaults()], + 'g-recaptcha-response' => ['required', function ($attribute, $value, $fail) { + $recaptcha = new Recaptcha(env('RECAPTCHA_SECRET_KEY')); + $recaptcha->verify($value); + }], + ]); + + if ($validator->fails()) { + // Si la validación falla, puedes redirigir o devolver una respuesta con los errores + return redirect()->back()->withErrors($validator)->withInput(); + } + + $confirmation_code = Str::random(25); + + $user = new User; + $user->email = $request->input('email'); + $user->password = Hash::make($request->input('password')); + $user->user_type = 'customer'; + $user->confirmation_code = $confirmation_code; + $user->save(); + + + Mail::to($user->email)->send(new VerificationEmail($user)); + + // Intentar iniciar sesión automáticamente + if (Auth::attempt($request->only('email', 'password'))) { + if (Auth::user()->email_verified_at) { + // La cuenta está verificada, redirige a la página deseada + return redirect()->route('shop.view.signup.complete'); + } else { + // La cuenta no está verificada, redirige a la página de verificación de correo electrónico + return redirect()->route('shop.view.email.verification'); + } + } + + } + + /** + * Display the specified resource. + * + * @param int $id + * @return \Illuminate\Http\Response + */ + public function show($id) + { + // + } + + /** + * Show the form for editing the specified resource. + * + * @param int $id + * @return \Illuminate\Http\Response + */ + public function edit($id) + { + // + } + + /** + * Update the specified resource in storage. + * + * @param \Illuminate\Http\Request $request + * @param int $id + * @return \Illuminate\Http\Response + */ + public function update(Request $request, $id) + { + // + } + + /** + * Remove the specified resource from storage. + * + * @param int $id + * @return \Illuminate\Http\Response + */ + public function destroy($id) + { + // + } +} diff --git a/app/Http/Controllers/TypeWorkshopController.php b/app/Http/Controllers/TypeWorkshopController.php new file mode 100644 index 00000000..52553d95 --- /dev/null +++ b/app/Http/Controllers/TypeWorkshopController.php @@ -0,0 +1,84 @@ +validate([ - 'email' => 'required|email', - ]); + // public function register_email(Request $request) + // { + // // Validar los datos recibidos en la solicitud + // $request->validate([ + // 'email' => 'required|email', + // ]); - // Buscar el usuario por su dirección de correo electrónico - $user = User::where('email', $request->email)->first(); - if ($user && $user->email_verified_at != NULL) { - // Si el usuario ya existe y su campo "verification_code" es verdadero, no enviar nuevamente - return response()->json(['message' => 'La cuenta ya existe'], 400); - } + // // Buscar el usuario por su dirección de correo electrónico + // $user = User::where('email', $request->email)->first(); + // if ($user && $user->email_verified_at != NULL) { + // // Si el usuario ya existe y su campo "verification_code" es verdadero, no enviar nuevamente + // return response()->json(['message' => 'La cuenta ya existe'], 400); + // } - if (!$user) { - // Si el usuario no existe, generar un código de verificación aleatorio de 6 dígitos numéricos - $verificationCode = rand(10000, 99999); + // if (!$user) { + // // Si el usuario no existe, generar un código de verificación aleatorio de 6 dígitos numéricos + // $verificationCode = rand(10000, 99999); - // Crear un nuevo usuario con el correo electrónico y el código de verificación - $user = User::create([ - 'email' => $request->email, - 'verification_code' => $verificationCode, - ]); + // // Crear un nuevo usuario con el correo electrónico y el código de verificación + // $user = User::create([ + // 'email' => $request->email, + // 'verification_code' => $verificationCode, + // ]); - // Guardar el correo en sesión - session(['registered_email' => $request->email]); - } else { - // Si el usuario ya existe pero no se ha enviado el código, generar un nuevo código - $verificationCode = rand(10000, 99999); + // // Guardar el correo en sesión + // session(['registered_email' => $request->email]); + // } else { + // // Si el usuario ya existe pero no se ha enviado el código, generar un nuevo código + // $verificationCode = rand(10000, 99999); - // Actualizar el código de verificación y el campo "verification_code" - $user->verification_code = $verificationCode; - $user->save(); - } + // // Actualizar el código de verificación y el campo "verification_code" + // $user->verification_code = $verificationCode; + // $user->save(); + // } - // Enviar la notificación al correo del usuario con el código de verificación - $user->notify(new EmailVerificationNotification($verificationCode)); + // // Enviar la notificación al correo del usuario con el código de verificación + // $user->notify(new EmailVerificationNotification($verificationCode)); - // Devolver una respuesta (opcional) - return response()->json(['message' => 'Usuario creado correctamente'], 201); - } + // // Devolver una respuesta (opcional) + // return response()->json(['message' => 'Usuario creado correctamente'], 201); + // } @@ -85,43 +85,43 @@ class UserController extends Controller // Devolver una respuesta (opcional) return response()->json(['message' => 'Usuario creado correctamente'], 201); */ - public function verify_code(Request $request) - { - // Validar el correo electrónico - $request->validate([ - 'email' => 'required|email', - 'codes' => 'required' - ]); + // public function verify_code(Request $request) + // { + // // Validar el correo electrónico + // $request->validate([ + // 'email' => 'required|email', + // 'codes' => 'required' + // ]); - // Verificar si el correo electrónico coincide con el almacenado en la sesión - /* if ($request->email !== session('registered_email')) { - return response()->json(['message' => 'Correo no coincide'], 400); - } */ + // // Verificar si el correo electrónico coincide con el almacenado en la sesión + // /* if ($request->email !== session('registered_email')) { + // return response()->json(['message' => 'Correo no coincide'], 400); + // } */ - // Buscar el usuario por su dirección de correo electrónico - $user = User::where('email', $request->email)->first(); + // // Buscar el usuario por su dirección de correo electrónico + // $user = User::where('email', $request->email)->first(); - // Verificar si el usuario y el código coinciden - if ($user && $user->verification_code === $request->codes) { - // Cambiar la lógica aquí para redireccionar o retornar otro mensaje - $user->email_verified_at = now(); - $temporaryPassword = Str::random(8); - $user->password = Hash::make($temporaryPassword); + // // Verificar si el usuario y el código coinciden + // if ($user && $user->verification_code === $request->codes) { + // // Cambiar la lógica aquí para redireccionar o retornar otro mensaje + // $user->email_verified_at = now(); + // $temporaryPassword = Str::random(8); + // $user->password = Hash::make($temporaryPassword); - if ($request->account_type == "seller") { - $user->user_type = "seller"; - } + // if ($request->account_type == "seller") { + // $user->user_type = "seller"; + // } - $user->save(); + // $user->save(); - // Enviar la notificación con las credenciales - $user->notify(new UserCredentialsNotification($temporaryPassword)); + // // Enviar la notificación con las credenciales + // $user->notify(new UserCredentialsNotification($temporaryPassword)); - return response()->json(['message' => 'Código verificado correctamente']); - } else { - return response()->json(['message' => 'Código no coincide'], 400); - } - } + // return response()->json(['message' => 'Código verificado correctamente']); + // } else { + // return response()->json(['message' => 'Código no coincide'], 400); + // } + // } } /* public function register_email(Request $request) diff --git a/app/Mail/VerificationEmail.php b/app/Mail/VerificationEmail.php new file mode 100644 index 00000000..dd8706ad --- /dev/null +++ b/app/Mail/VerificationEmail.php @@ -0,0 +1,39 @@ +user = $user; + } + + public function build() + { + return $this->view('emails.verification_user') + ->subject('Verificación de cuenta') + ->with([ + 'verificationCode' => $this->user->verification_code, + ]); + } +} diff --git a/app/Models/User.php b/app/Models/User.php index e8af027b..63ada76a 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -14,10 +14,7 @@ class User extends Authenticatable implements MustVerifyEmail { use Notifiable, HasApiTokens, HasRoles; - public function sendEmailVerificationNotification() - { - $this->notify(new EmailVerificationNotification()); - } + /** * The attributes that are mass assignable. @@ -25,7 +22,7 @@ class User extends Authenticatable implements MustVerifyEmail * @var array */ protected $fillable = [ - 'name', 'email', 'password', 'address', 'city', 'postal_code', 'phone', 'country', 'provider_id', 'email_verified_at', 'verification_code' + 'name', 'email', 'password', 'user_type', 'confirmation_code', 'address', 'city', 'postal_code', 'phone', 'country', 'provider_id', 'email_verified_at', 'verification_code' ]; /** diff --git a/app/Notifications/EmailVerificationNotification.php b/app/Notifications/EmailVerificationNotification.php index 3ede67d1..f9444796 100644 --- a/app/Notifications/EmailVerificationNotification.php +++ b/app/Notifications/EmailVerificationNotification.php @@ -15,33 +15,33 @@ class EmailVerificationNotification extends Notification { use Queueable; - public $verificationCode; + // public $verificationCode; - public function __construct($verificationCode) - { - $this->verificationCode = $verificationCode; - } + // public function __construct($verificationCode) + // { + // $this->verificationCode = $verificationCode; + // } - public function via($notifiable) - { - return ['mail']; - } + // public function via($notifiable) + // { + // return ['mail']; + // } - public function toMail($notifiable) - { - $verificationCode = $this->verificationCode; + // public function toMail($notifiable) + // { + // $verificationCode = $this->verificationCode; - return (new MailMessage) - ->subject(translate('Email Verification - ') . env('APP_NAME')) - ->line('Your verification code is: ' . $verificationCode); // Mostrar el código de verificación en el correo - } + // return (new MailMessage) + // ->subject(translate('Email Verification - ') . env('APP_NAME')) + // ->line('Your verification code is: ' . $verificationCode); // Mostrar el código de verificación en el correo + // } - public function toArray($notifiable) - { - return [ - // - ]; - } + // public function toArray($notifiable) + // { + // return [ + // // + // ]; + // } } diff --git a/composer.json b/composer.json index 413549b1..ceeaede6 100644 --- a/composer.json +++ b/composer.json @@ -14,6 +14,7 @@ "fideloper/proxy": "^4.4", "genealabs/laravel-sign-in-with-apple": "*", "genealabs/laravel-socialiter": "*", + "google/recaptcha": "^1.3", "guzzlehttp/guzzle": "^7.5", "instamojo/instamojo-php": "^0.4.0", "intervention/image": "^2.5", diff --git a/config/app.php b/config/app.php index ae996226..7d725bcf 100644 --- a/config/app.php +++ b/config/app.php @@ -100,7 +100,7 @@ return [ | */ - 'locale' => env('DEFAULT_LANGUAGE', 'en'), + 'locale' => env('DEFAULT_LANGUAGE', 'es'), /* |-------------------------------------------------------------------------- @@ -113,7 +113,7 @@ return [ | */ - 'fallback_locale' => 'en', + 'fallback_locale' => 'es', /* |-------------------------------------------------------------------------- @@ -169,6 +169,8 @@ return [ Illuminate\Validation\ValidationServiceProvider::class, Illuminate\View\ViewServiceProvider::class, KingFlamez\Rave\RaveServiceProvider::class, + + /* * Package Service Providers... @@ -184,6 +186,7 @@ return [ App\Providers\RouteServiceProvider::class, Spatie\Permission\PermissionServiceProvider::class, + ], @@ -236,6 +239,8 @@ return [ 'PDF' => niklasravnsborg\LaravelPdf\Facades\Pdf::class, 'Str' => Illuminate\Support\Str::class, 'Rave' => KingFlamez\Rave\Facades\Rave::class, + 'Recaptcha' => \ReCaptcha\ReCaptcha::class, + ], ]; diff --git a/public/assets/registrocomercio/registro-form/assets/images/casa.png b/public/assets/registrocomercio/registro-form/assets/images/casa.png new file mode 100644 index 0000000000000000000000000000000000000000..8d7062fa79481b25132de49c699cdb3f1709a74c GIT binary patch literal 1517 zcmV6^Xo?(5;=we6k;DKYLQEjk(BNW?p_bkG zd6?bpd&AD`PCGbcJKxj1_kO?c`@QeXd;9(^q)3q>eyGr|i$Uf7;<_90ljij~ltaK8 z;AdbfML9bouAHs`27u>*vj`thkY8epl{f|1s`HrQQTzT!p zWf#IHK!;Is2Vo!c`HTU%6Gzzb2$0ujPzLeddJrz7e8^!L3FUfEU&7@OusX!*S0F#* zFUvr40XFMOGQ5oaR%^&0tjA?NV!f##xWEX?w+R1QCCUPXw}2kNY09LOaX5u?3aB)& zxI={>I4Zw|(S!@&_2(af&ZYs`IDyM99CiYmBl`Mr6qkKC>;X1L^qoX_F>KrjS6X?4 zXpJ97=%Xlo9FYqYr61@8u0`Oe;Tq6OQTnS~eF%NPcm$5lY8wI(E`T)r?1OLvhi(dT z!pbemNy>DiTxgj|xj>n2igMD*FUScTx`7)lb2Vv0EB)5Q7r-SWeb9J5&!9AZJI7># zoQ`4-Y&(IQ)#pXPzIur;$}yQ}$TcYAxJg)*i4sC^jXaWes6y$V0ozsKC z#!b17Q;^>Q$m?>{5FjdwGEjfc>pHY`0h*7tZH`ocqytDAsQ^g_kTjzH3wCxEh+3YTMI+dzd4F>!?=xC`WT1=>q~DTrz?V-8w=n$i~!4w+}pTZ^jXeyIXXs$>-CiPJT^lvI|eVt+eXeZU?fO{ zyH|sa8$X4zfx|Lv*}kJo>0k%&V1$4taru%XVy_MQbu|tj5pD4`L7Dv=6MM1suJ$5) z4a_%kuL3<3#pzXm{U>ODnQZ!B#k*QK={v~%XV_wUr#F?2#?|k_b2B5yGxff zK@~EwMJc|c6PF=!YVQ4a0gnJK$~Z#Vu+4@|oNWPwrB+2k7RVZD6H9!)He8+!t~Mh4 zT;i+SF7q$T{pHr)VA=(&l=`l-DJ6uGk+THvbF1NsVcTWB8HaPRMd@%3mp6^N#t`fH z%UpKf#yn-Mk+wk0VIt%FM#-Nc|4AHy}btiwpMS|riKCIxtXsY zv)K|G2IGniY&D**SIe9EPEcmQkkg-l7eXp;XPj~Hu9weMq^HC7>2M7$i-21=4TN!6 zz!aTy@K;0HFyFgvTRR%_Y%{>aIQ2hS*eLT5^O?l;{TVCBw|Y9 'Estas credenciales no coinciden con nuestros registros.', + 'password' => 'La contraseña ingresada no es correcta.', + 'throttle' => 'Demasiados intentos de acceso. Por favor intente nuevamente en :seconds segundos.', +]; \ No newline at end of file diff --git a/resources/lang/es/pagination.php b/resources/lang/es/pagination.php new file mode 100644 index 00000000..d175e38f --- /dev/null +++ b/resources/lang/es/pagination.php @@ -0,0 +1,17 @@ + '« Anterior', + 'next' => 'Siguiente »', +]; \ No newline at end of file diff --git a/resources/lang/es/passwords.php b/resources/lang/es/passwords.php new file mode 100644 index 00000000..43cad7ac --- /dev/null +++ b/resources/lang/es/passwords.php @@ -0,0 +1,20 @@ + '¡Su contraseña ha sido restablecida!', + 'sent' => '¡Le hemos enviado por correo electrónico el enlace para restablecer su contraseña!', + 'throttled' => 'Por favor espere antes de intentar de nuevo.', + 'token' => 'El token de restablecimiento de contraseña es inválido.', + 'user' => 'No encontramos ningún usuario con ese correo electrónico.', +]; \ No newline at end of file diff --git a/resources/lang/es/validation-inline.php b/resources/lang/es/validation-inline.php new file mode 100644 index 00000000..7c688a6a --- /dev/null +++ b/resources/lang/es/validation-inline.php @@ -0,0 +1,139 @@ + 'Este campo debe ser aceptado.', + 'active_url' => 'Esta no es una URL válida.', + 'after' => 'Debe ser una fecha después de :date.', + 'after_or_equal' => 'Debe ser una fecha después o igual a :date.', + 'alpha' => 'Este campo solo puede contener letras.', + 'alpha_dash' => 'Este campo solo puede contener letras, números, guiones y guiones bajos.', + 'alpha_num' => 'Este campo solo puede contener letras y números.', + 'array' => 'Este campo debe ser un array (colección).', + 'before' => 'Debe ser una fecha antes de :date.', + 'before_or_equal' => 'Debe ser una fecha anterior o igual a :date.', + 'between' => [ + 'numeric' => 'Este valor debe ser entre :min y :max.', + 'file' => 'Este archivo debe ser entre :min y :max kilobytes.', + 'string' => 'El texto debe ser entre :min y :max caracteres.', + 'array' => 'El contenido debe tener entre :min y :max elementos.', + ], + 'boolean' => 'El campo debe ser verdadero o falso.', + 'confirmed' => 'La confirmación no coincide.', + 'date' => 'Esta no es una fecha válida.', + 'date_equals' => 'El campo debe ser una fecha igual a :date.', + 'date_format' => 'El campo no corresponde al formato :format.', + 'different' => 'Este valor deben ser diferente de :other.', + 'digits' => 'Debe tener :digits dígitos.', + 'digits_between' => 'Debe tener entre :min y :max dígitos.', + 'dimensions' => 'Las dimensiones de esta imagen son inválidas.', + 'distinct' => 'El campo tiene un valor duplicado.', + 'email' => 'No es un correo válido.', + 'ends_with' => 'Debe finalizar con uno de los siguientes valores: :values.', + 'exists' => 'El valor seleccionado es inválido.', + 'file' => 'El campo debe ser un archivo.', + 'filled' => 'Este campo debe tener un valor.', + 'gt' => [ + 'numeric' => 'El valor del campo debe ser mayor que :value.', + 'file' => 'El archivo debe ser mayor que :value kilobytes.', + 'string' => 'El texto debe ser mayor de :value caracteres.', + 'array' => 'El contenido debe tener mas de :value elementos.', + ], + 'gte' => [ + 'numeric' => 'El valor debe ser mayor o igual que :value.', + 'file' => 'El tamaño del archivo debe ser mayor o igual que :value kilobytes.', + 'string' => 'El texto debe ser mayor o igual de :value caracteres.', + 'array' => 'El contenido debe tener :value elementos o más.', + ], + 'image' => 'Esta debe ser una imagen.', + 'in' => 'El valor seleccionado es inválido.', + 'in_array' => 'Este valor no existe en :other.', + 'integer' => 'Esto debe ser un entero.', + 'ip' => 'Debe ser una dirección IP válida.', + 'ipv4' => 'Debe ser una dirección IPv4 válida.', + 'ipv6' => 'Debe ser una dirección IPv6 válida.', + 'json' => 'Debe ser un texto válido en JSON.', + 'lt' => [ + 'numeric' => 'El valor debe ser menor que :value.', + 'file' => 'El tamaño del archivo debe ser menor a :value kilobytes.', + 'string' => 'El texto debe ser menor de :value caracteres.', + 'array' => 'El contenido debe tener menor de :value elementos.', + ], + 'lte' => [ + 'numeric' => 'El valor debe ser menor o igual que :value.', + 'file' => 'El tamaño del archivo debe ser menor o igual que :value kilobytes.', + 'string' => 'El texto debe ser menor o igual de :value caracteres.', + 'array' => 'El contenido no debe tener más de :value elementos.', + ], + 'max' => [ + 'numeric' => 'El valor no debe ser mayor de :max.', + 'file' => 'El tamaño del archivo no debe ser mayor a :max kilobytes.', + 'string' => 'El texto no debe ser mayor a :max caracteres.', + 'array' => 'El contenido no debe tener más de :max elementos.', + ], + 'mimes' => 'Debe ser un archivo de tipo: :values.', + 'mimetypes' => 'Debe ser un archivo de tipo: :values.', + 'min' => [ + 'numeric' => 'El valor debe ser al menos de :min.', + 'file' => 'El tamaño del archivo debe ser al menos de :min kilobytes.', + 'string' => 'El texto debe ser al menos de :min caracteres.', + 'array' => 'El contenido debe tener al menos :min elementos.', + ], + 'multiple_of' => 'Este valor debe ser múltiplo de :value', + 'not_in' => 'El valor seleccionado es inválido.', + 'not_regex' => 'Este formato es inválido.', + 'numeric' => 'Debe ser un número.', + 'password' => 'La contraseña es incorrecta.', + 'present' => 'Este campo debe estar presente.', + 'regex' => 'Este formato es inválido.', + 'required' => 'Este campo es requerido.', + 'required_if' => 'Este campo es requerido cuando :other es :value.', + 'required_unless' => 'Este campo es requerido a menos que :other esté en :values.', + 'required_with' => 'Este campo es requerido cuando :values está presente.', + 'required_with_all' => 'Este campo es requerido cuando :values están presentes.', + 'required_without' => 'Este campo es requerido cuando :values no está presente.', + 'required_without_all' => 'Este campo es requerido cuando ninguno de :values están presentes.', + 'same' => 'El valor de este campo debe ser igual a :other.', + 'size' => [ + 'numeric' => 'El valor debe ser :size.', + 'file' => 'El tamaño del archivo debe ser de :size kilobytes.', + 'string' => 'El texto debe ser de :size caracteres.', + 'array' => 'El contenido debe tener :size elementos.', + ], + 'starts_with' => 'Debe comenzar con alguno de los siguientes valores: :values.', + 'string' => 'Debe ser un texto.', + 'timezone' => 'Debe ser de una zona horaria válida.', + 'unique' => 'Este campo ya ha sido tomado.', + 'uploaded' => 'Falló al subir.', + 'url' => 'Este formato es inválido.', + 'uuid' => 'Debe ser un UUID válido.', + + /* + |-------------------------------------------------------------------------- + | Custom Validation Language Lines + |-------------------------------------------------------------------------- + | + | Here you may specify custom validation messages for attributes using the + | convention "attribute.rule" to name the lines. This makes it quick to + | specify a specific custom language line for a given attribute rule. + | + */ + + 'custom' => [ + 'attribute-name' => [ + 'rule-name' => 'custom-message', + ], + ], + +]; \ No newline at end of file diff --git a/resources/lang/es/validation-nova-inline.php b/resources/lang/es/validation-nova-inline.php new file mode 100644 index 00000000..ba74598d --- /dev/null +++ b/resources/lang/es/validation-nova-inline.php @@ -0,0 +1,17 @@ + 'Este campo ya se adjuntó.', + 'relatable' => 'Este campo no se puede asociar con este recurso.', +]; diff --git a/resources/lang/es/validation-nova.php b/resources/lang/es/validation-nova.php new file mode 100644 index 00000000..8ebf7f66 --- /dev/null +++ b/resources/lang/es/validation-nova.php @@ -0,0 +1,17 @@ + 'Este :attribute ya se adjuntó.', + 'relatable' => 'Este :attribute no se puede asociar con este recurso', +]; diff --git a/resources/lang/es/validation.php b/resources/lang/es/validation.php new file mode 100644 index 00000000..b4cd5ec2 --- /dev/null +++ b/resources/lang/es/validation.php @@ -0,0 +1,240 @@ + ':attribute debe ser aceptado.', + 'active_url' => ':attribute no es una URL válida.', + 'after' => ':attribute debe ser una fecha posterior a :date.', + 'after_or_equal' => ':attribute debe ser una fecha posterior o igual a :date.', + 'alpha' => ':attribute sólo debe contener letras.', + 'alpha_dash' => ':attribute sólo debe contener letras, números, guiones y guiones bajos.', + 'alpha_num' => ':attribute sólo debe contener letras y números.', + 'array' => ':attribute debe ser un conjunto.', + 'before' => ':attribute debe ser una fecha anterior a :date.', + 'before_or_equal' => ':attribute debe ser una fecha anterior o igual a :date.', + 'between' => [ + 'numeric' => ':attribute tiene que estar entre :min - :max.', + 'file' => ':attribute debe pesar entre :min - :max kilobytes.', + 'string' => ':attribute tiene que tener entre :min - :max caracteres.', + 'array' => ':attribute tiene que tener entre :min - :max elementos.', + ], + 'boolean' => 'El campo :attribute debe tener un valor verdadero o falso.', + 'confirmed' => 'La confirmación de :attribute no coincide.', + 'date' => ':attribute no es una fecha válida.', + 'date_equals' => ':attribute debe ser una fecha igual a :date.', + 'date_format' => ':attribute no corresponde al formato :format.', + 'different' => ':attribute y :other deben ser diferentes.', + 'digits' => ':attribute debe tener :digits dígitos.', + 'digits_between' => ':attribute debe tener entre :min y :max dígitos.', + 'dimensions' => 'Las dimensiones de la imagen :attribute no son válidas.', + 'distinct' => 'El campo :attribute contiene un valor duplicado.', + 'email' => ':attribute no es un correo válido.', + 'ends_with' => 'El campo :attribute debe finalizar con uno de los siguientes valores: :values', + 'exists' => ':attribute es inválido.', + 'file' => 'El campo :attribute debe ser un archivo.', + 'filled' => 'El campo :attribute es obligatorio.', + 'gt' => [ + 'numeric' => 'El campo :attribute debe ser mayor que :value.', + 'file' => 'El campo :attribute debe tener más de :value kilobytes.', + 'string' => 'El campo :attribute debe tener más de :value caracteres.', + 'array' => 'El campo :attribute debe tener más de :value elementos.', + ], + 'gte' => [ + 'numeric' => 'El campo :attribute debe ser como mínimo :value.', + 'file' => 'El campo :attribute debe tener como mínimo :value kilobytes.', + 'string' => 'El campo :attribute debe tener como mínimo :value caracteres.', + 'array' => 'El campo :attribute debe tener como mínimo :value elementos.', + ], + 'image' => ':attribute debe ser una imagen.', + 'in' => ':attribute es inválido.', + 'in_array' => 'El campo :attribute no existe en :other.', + 'integer' => ':attribute debe ser un número entero.', + 'ip' => ':attribute debe ser una dirección IP válida.', + 'ipv4' => ':attribute debe ser una dirección IPv4 válida.', + 'ipv6' => ':attribute debe ser una dirección IPv6 válida.', + 'json' => 'El campo :attribute debe ser una cadena JSON válida.', + 'lt' => [ + 'numeric' => 'El campo :attribute debe ser menor que :value.', + 'file' => 'El campo :attribute debe tener menos de :value kilobytes.', + 'string' => 'El campo :attribute debe tener menos de :value caracteres.', + 'array' => 'El campo :attribute debe tener menos de :value elementos.', + ], + 'lte' => [ + 'numeric' => 'El campo :attribute debe ser como máximo :value.', + 'file' => 'El campo :attribute debe tener como máximo :value kilobytes.', + 'string' => 'El campo :attribute debe tener como máximo :value caracteres.', + 'array' => 'El campo :attribute debe tener como máximo :value elementos.', + ], + 'max' => [ + 'numeric' => ':attribute no debe ser mayor que :max.', + 'file' => ':attribute no debe ser mayor que :max kilobytes.', + 'string' => ':attribute no debe ser mayor que :max caracteres.', + 'array' => ':attribute no debe tener más de :max elementos.', + ], + 'mimes' => ':attribute debe ser un archivo con formato: :values.', + 'mimetypes' => ':attribute debe ser un archivo con formato: :values.', + 'min' => [ + 'numeric' => 'El tamaño de :attribute debe ser de al menos :min.', + 'file' => 'El tamaño de :attribute debe ser de al menos :min kilobytes.', + 'string' => ':attribute debe contener al menos :min caracteres.', + 'array' => ':attribute debe tener al menos :min elementos.', + ], + 'multiple_of' => 'El campo :attribute debe ser múltiplo de :value', + 'not_in' => ':attribute es inválido.', + 'not_regex' => 'El formato del campo :attribute no es válido.', + 'numeric' => ':attribute debe ser numérico.', + 'password' => 'La contraseña es incorrecta.', + 'present' => 'El campo :attribute debe estar presente.', + 'regex' => 'El formato de :attribute es inválido.', + 'required' => 'El campo :attribute es obligatorio.', + 'required_if' => 'El campo :attribute es obligatorio cuando :other es :value.', + 'required_unless' => 'El campo :attribute es obligatorio a menos que :other esté en :values.', + 'required_with' => 'El campo :attribute es obligatorio cuando :values está presente.', + 'required_with_all' => 'El campo :attribute es obligatorio cuando :values están presentes.', + 'required_without' => 'El campo :attribute es obligatorio cuando :values no está presente.', + 'required_without_all' => 'El campo :attribute es obligatorio cuando ninguno de :values está presente.', + 'same' => ':attribute y :other deben coincidir.', + 'size' => [ + 'numeric' => 'El tamaño de :attribute debe ser :size.', + 'file' => 'El tamaño de :attribute debe ser :size kilobytes.', + 'string' => ':attribute debe contener :size caracteres.', + 'array' => ':attribute debe contener :size elementos.', + ], + 'starts_with' => 'El campo :attribute debe comenzar con uno de los siguientes valores: :values', + 'string' => 'El campo :attribute debe ser una cadena de caracteres.', + 'timezone' => 'El :attribute debe ser una zona válida.', + 'unique' => 'El campo :attribute ya ha sido registrado.', + 'uploaded' => 'Subir :attribute ha fallado.', + 'url' => 'El formato :attribute es inválido.', + 'uuid' => 'El campo :attribute debe ser un UUID válido.', + + /* + |-------------------------------------------------------------------------- + | Custom Validation Language Lines + |-------------------------------------------------------------------------- + | + | Here you may specify custom validation messages for attributes using the + | convention "attribute.rule" to name the lines. This makes it quick to + | specify a specific custom language line for a given attribute rule. + | + */ + + 'custom' => [ + 'password' => [ + 'min' => 'La :attribute debe contener más de :min caracteres', + ], + 'email' => [ + 'unique' => 'El :attribute ya ha sido registrado.', + ], + ], + + /* + |-------------------------------------------------------------------------- + | Custom Validation Attributes + |-------------------------------------------------------------------------- + | + | The following language lines are used to swap attribute place-holders + | with something more reader friendly such as E-Mail Address instead + | of "email". This simply helps us make messages a little cleaner. + | + */ + + 'attributes' => [ + 'address' => 'dirección', + 'age' => 'edad', + 'body' => 'contenido', + 'city' => 'ciudad', + 'content' => 'contenido', + 'country' => 'país', + 'current_password' => 'contraseña actual', + 'date' => 'fecha', + 'day' => 'día', + 'description' => 'descripción', + 'email' => 'correo electrónico', + 'excerpt' => 'extracto', + 'first_name' => 'nombre', + 'gender' => 'género', + 'hour' => 'hora', + 'last_name' => 'apellido', + 'message' => 'mensaje', + 'minute' => 'minuto', + 'mobile' => 'móvil', + 'month' => 'mes', + 'name' => 'Nombre', + 'password' => 'contraseña', + 'password_confirmation' => 'confirmación de la contraseña', + 'phone' => 'teléfono', + 'price' => 'precio', + 'role' => 'rol', + 'second' => 'segundo', + 'sex' => 'sexo', + 'subject' => 'asunto', + 'terms' => 'términos', + 'time' => 'hora', + 'title' => 'título', + 'username' => 'usuario', + 'year' => 'año', + 'category' => 'categoría', + 'sell_price' => 'precio de venta', + 'subcategory' => 'subcategoria', + 'short_description' => 'descripción corta', + 'long_description' => 'descripción larga', + 'subcategory_id' => 'subcategoria', + 'provider_id' => 'proveedor', + 'subscription_email' => 'correo electrónico de suscripción', + 'surnames' => 'Apellidos', + 'payu_card' => 'Tarjeta', + 'payu_cvc' => 'Codigo CVC', + 'payu_month' => 'Mes', + 'payu_year' => 'Año', + 'payu_name' => 'Nombre y Apellido', + 'payu_email' => 'Correo electrónico', + 'type' => 'modulo', + 'file' => 'imagen', + 'ask' => 'pregunta', + 'answer' => 'respuesta', + 'policy' => 'política', + 'information' => 'información', + 'module_abrevius' => 'módulo', + 'status' => 'estado', + 'project' => 'nombre proyecto', + 'user_name' => 'nombre de usuario', + 'company_name' => 'Razón social', + 'contact_name' => 'nombre de contacto', + 'office_number' => 'teléfono', + 'phone_number' => 'celular', + 'street' => 'calle y número', + 'village' => 'colonia', + 'company_sector' => 'giro de empresa', + 'legal_agent' => 'representante legal', + 'country_id' => 'pais', + 'confirm_password' => 'confirmar contraseña', + 'full_name' => 'nombre', + 'mother_last_name' => 'apellido materno', + 'position' => 'puesto', + 'specific_occupation_id' => 'ocupación específica', + 'blood_type' => 'tipo de sangre', + 'company_id' => 'empresa', + 'user_type' => 'tipo de usuario', + 'assigned_amount' => 'monto asignado', + 'coadmin_company_id' => 'Administrador', + 'nfc_type' => 'Tipo de NFC', + 'nfc_following' => 'Numeros siguientes del NFC', + 'nfc_expiration' => 'Fecha de vencimiento', + 'nfc_amount' => 'Cantidad de comprobantes', + 'nfc_next' => 'Próximo NFC a emitir', + 'nfc_select' => 'Estado de NFC', + 'g-recaptcha-response' => 'reCAPTCHA' + + ], +]; \ No newline at end of file diff --git a/resources/views/auth/register.blade.php b/resources/views/auth/register.blade.php index 91f89034..4c51631d 100644 --- a/resources/views/auth/register.blade.php +++ b/resources/views/auth/register.blade.php @@ -1,64 +1,549 @@ -@extends('backend.layouts.blank') + + -@section('content') + + + + + + La Pieza.DO | Todo lo que buscas! + + + + + + + + + + + + + + + + + {{-- --}} -
-
-
-
-
-
{{ translate('Create a New Account') }}
-
-
- @csrf + -
- + - @if ($errors->has('name')) - - {{ $errors->first('name') }} - - @endif + +
+ + +
+
+
+ + + + + + + + + +
+ +
image
+ +
+
+ + + + +
+ +

Lo que hace + de La Pieza.DO
+ una opción única!

+ +

Maneja tu inventario, recibe pagos, factura y vende en linea
de la manera segura y + efectiva.

+
+ + +
+
+
+
+
+ image +
+
+

Datos Seguros

+

Contamos con los estándares internacionales de seguridad y SSL.

+
+
-
- - @if ($errors->has('password')) - - {{ $errors->first('password') }} - - @endif +
+
+
+ image +
+
+

Automatización de Servicios

+

Simple para vender, simple para ganar, Todo automatizado.

+
+
-
- - @if ($errors->has('email')) - - {{ $errors->first('email') }} - - @endif +
+
+
+ image +
+
+

Inteligencia Artificial

+

Para conocer el comportamiento de compra de tus clientes y ofrecerles lo + mejor.

+
+
-
- + +
+
+
+ image +
+
+

Tu inventario en linea

+

Te ayudamos a organizar tu inventario, ponerlo en línea y a vender!.

+
+
-
- - +
+ +
+ +
+ +
+ +
+ + + +
+ +
+ +
+
+ + + +
+
+ + + +
+
+ +
+ +
+ + + +
+ +
image
+ +
+ +
+
+ +
+
+

Diseño moderno
y pensado para ti!

+

+ Nuestra misión es que tengas una herramienta que te permita realizar tus ventas de + forma rápida y segura y súper fácil de usar. +

+
+
    +
  • +

    Fácil Acceso

    +

    Solo tienes que poner tu email, teléfono, facebook o instagram, tu contraseña y + ¡listo!.

    +
  • +
  • +

    Sincronice con su sistema en la computadora

    +

    Cuando estés en línea, todo se sincroniza en tu computadora, para que puedas + acceder a tu negocio desde cualquier lugar.

    +
  • +
  • +

    Tu inventario a la mano

    +

    Tenemos la gestión de inventario para ti desde tu móvil o computadora, todo con + un solo clic.

    +
  • +
+
+
+
+ +
+
+ image +
+ +
+ image + image + image +
+
+
+
+ +
+ +
+ + + +
+ +
image
+ +
+
+
+ +

Cómo funciona La Pieza.DO en 3 sencillos pasos

+ +

Usar La Pieza.DO es súper + fácil, solo sigue estos pasos.

+
+
+ +
    + +
  • +
    +

    Descarga la app

    +
    + + + +
    +

    Descarga la App en Google Play o Play Store

    +
    +
    +

    01

    +
    +
    + image +
    +
  • + + +
  • +
    +

    Registrate y crea una cuenta

    + Totalmente Gratis! +

    Inicia sesión en la aplicación o en tu computadora. Una cuenta para todos los + dispositivos.

    +
    +
    +

    02

    +
    +
    + image +
    +
  • + + +
  • +
    +

    Todo listo disfruta la app!

    + Si tienes alguna pregunta visita FAQs. +

    Obten la experiencia más increíble.
    Explora y comparte la app.

    +
    +
    +

    03

    +
    +
    + image +
    +
  • +
+
+
+
+ +
+ +
+ +
image
+ +
+
+ +

FAQ - Preguntas Frecuentes

+ +

Aqui tenemos todas las respuestas a tus preguntas con respecto al uso de La Pieza.DO. Aquí podrás + encontrar respuestas rápidas para que puedas utilizar la aplicación.

+
+ +
+
+
+
+

+ +

+
+
+
+

Lorem Ipsum is simply dummy text of the printing and typesetting industry lorem + Ipsum has. been the + industrys standard dummy text ever since the when an unknown printer took a + galley of type and + scrambled it to make a type specimen book. It has survived not only five cen + turies but also the + leap into electronic typesetting, remaining essentially unchanged.

+
+
+
+
+
+

+ +

+
+
+
+

Lorem Ipsum is simply dummy text of the printing and typesetting industry lorem + Ipsum has. been the + industrys standard dummy text ever since the when an unknown printer took a + galley of type and + scrambled it to make a type specimen book. It has survived not only five cen + turies but also the + leap into electronic typesetting, remaining essentially unchanged.

+
+
+
+
+
+

+ +

+
+
+
+

Lorem Ipsum is simply dummy text of the printing and typesetting industry lorem + Ipsum has. been the + industrys standard dummy text ever since the when an unknown printer took a + galley of type and + scrambled it to make a type specimen book. It has survived not only five cen + turies but also the + leap into electronic typesetting, remaining essentially unchanged.

+
+
+
+
+
+

+ +

+
+
+
+

Lorem Ipsum is simply dummy text of the printing and typesetting industry lorem + Ipsum has. been the + industrys standard dummy text ever since the when an unknown printer took a + galley of type and + scrambled it to make a type specimen book. It has survived not only five cen + turies but also the + leap into electronic typesetting, remaining essentially unchanged.

+
- - -
- {{translate('Already have an account')}} ? {{translate('Sign In')}}
-
-
-
+ + + -@endsection +
+ +
+
+ +
+ +
+
+
+

Descargala grátis para Android y Apple

+

Descarga nuestra app y sácale provecho a tu negocio en línea. Registrate y + descubre lo nuevo que tenemos para ti.

+
+ +
+
+ + +
+
+ image + image +
+
+
+ +
+
+ +
+ + + + +
+ +
+ image +
+
+ + + + + +
+ +
+ + + + + + + + + + + + + + + + + + diff --git a/resources/views/emails/app_verification.blade.php b/resources/views/emails/app_verification.blade.php index 7d1ee7ef..c8c2cb66 100644 --- a/resources/views/emails/app_verification.blade.php +++ b/resources/views/emails/app_verification.blade.php @@ -1,4 +1,4 @@ - +{{--
@php $logo = get_setting('header_logo'); @endphp @@ -73,4 +73,4 @@ -
+ --}} diff --git a/resources/views/emails/verification_user.blade.php b/resources/views/emails/verification_user.blade.php new file mode 100644 index 00000000..c31186c6 --- /dev/null +++ b/resources/views/emails/verification_user.blade.php @@ -0,0 +1,156 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/views/frontend/inc/footer.blade.php b/resources/views/frontend/inc/footer.blade.php index 333d804d..bc396c85 100644 --- a/resources/views/frontend/inc/footer.blade.php +++ b/resources/views/frontend/inc/footer.blade.php @@ -241,7 +241,7 @@
  • {{ translate('Conviertete en Delivery') }} - {{ translate('Apply Now') }} + {{ translate('Apply Now') }}

  • @guest @@ -276,7 +276,7 @@
  • {{ translate('Become A Seller') }} - {{ translate('Apply Now') }} + {{ translate('Apply Now') }}

  • @guest diff --git a/resources/views/frontend/inc/nav.blade.php b/resources/views/frontend/inc/nav.blade.php index 536ac628..26c3152b 100644 --- a/resources/views/frontend/inc/nav.blade.php +++ b/resources/views/frontend/inc/nav.blade.php @@ -331,7 +331,7 @@ {{ translate('Login')}} - {{ translate('Registration')}} + {{ translate('Registration')}} @endauth
    @@ -546,7 +546,7 @@ {{ translate('Login')}} - {{ translate('Registration')}} + {{ translate('Registration')}} @endauth
    diff --git a/resources/views/frontend/partials/login_modal.blade.php b/resources/views/frontend/partials/login_modal.blade.php index ddb926a1..306522d5 100644 --- a/resources/views/frontend/partials/login_modal.blade.php +++ b/resources/views/frontend/partials/login_modal.blade.php @@ -85,7 +85,7 @@

    {{ translate('Dont have an account?') }}

    - {{ translate('Register Now') }} + {{ translate('Register Now') }}
    diff --git a/resources/views/frontend/product_details/product_queries.blade.php b/resources/views/frontend/product_details/product_queries.blade.php index f62f51e4..378cca74 100644 --- a/resources/views/frontend/product_details/product_queries.blade.php +++ b/resources/views/frontend/product_details/product_queries.blade.php @@ -10,7 +10,7 @@ @guest

    {{ translate('Login') }} or {{ translate('Register ') }}{{ translate(' to submit your questions to seller') }} + href="{{ route('register') }}">{{ translate('Register ') }}{{ translate(' to submit your questions to seller') }}

    @endguest diff --git a/resources/views/frontend/registro-comercio/views/account-type.blade.php b/resources/views/frontend/registro-comercio/views/account-type.blade.php index fcf1fe78..3684b0f9 100644 --- a/resources/views/frontend/registro-comercio/views/account-type.blade.php +++ b/resources/views/frontend/registro-comercio/views/account-type.blade.php @@ -1,4 +1,4 @@ - + @@ -54,25 +54,32 @@
    -
    +

    Vamos! Únete a nuestra plataforma

    Selecciona el tipo de cuenta

    @@ -110,28 +117,8 @@ - + diff --git a/resources/views/frontend/registro-comercio/views/assets/css/theme-1.css b/resources/views/frontend/registro-comercio/views/assets/css/theme-1.css index c8c8edf7..7d5bce8a 100644 --- a/resources/views/frontend/registro-comercio/views/assets/css/theme-1.css +++ b/resources/views/frontend/registro-comercio/views/assets/css/theme-1.css @@ -875,6 +875,7 @@ line-height: 60px; } + @media all and (max-width: 1600px) { .logo { top: 50px; @@ -901,7 +902,7 @@ } .ugf-content.pt270 { - padding-top: 180px; + padding-top: 120px; } .ugf-content.pt340 { padding-top: 250px; @@ -966,6 +967,10 @@ .resend-code { margin-bottom: 100px; } + + .ugf-content.pt270 { + padding-top: 120px; + } } @media all and (max-width: 767px) { .ugf-wrapper .ugf-content-block .logo { diff --git a/resources/views/frontend/registro-comercio/views/business/index.blade.php b/resources/views/frontend/registro-comercio/views/business/index.blade.php new file mode 100644 index 00000000..b5899ac7 --- /dev/null +++ b/resources/views/frontend/registro-comercio/views/business/index.blade.php @@ -0,0 +1,337 @@ + + + + + + + + + + La Pieza.DO | Registro + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    +
    +
    + Volver Atrás +

    Vamos! Únete a nuestra plataforma

    + +

    Puedes registrarte llegando los siguientes pasos o a traves de una red social

    + + + + +
    + +
    + + + + {{-- formulario con correo --}} + + + + {{-- formulario con numero de telefono --}} + + + + +
    +
    +
    +
    +
    +
    +

    Ya tienes una cuenta?  Entra aqui!

    +
    +
    + +
    + + + + + + + {{-- --}} + + + + + + + + + + diff --git a/resources/views/frontend/registro-comercio/views/buyers/index.blade.php b/resources/views/frontend/registro-comercio/views/buyers/index.blade.php new file mode 100644 index 00000000..51bcbe79 --- /dev/null +++ b/resources/views/frontend/registro-comercio/views/buyers/index.blade.php @@ -0,0 +1,373 @@ + + + + + + + + + + La Pieza.DO | Registro + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    +
    +
    + Volver Atrás +

    Vamos! Únete a nuestra plataforma

    + +

    Puedes registrarte llegando los siguientes pasos o a traves de una red social

    + + + + +
    + +
    + + + + {{-- formulario con correo --}} + + + + {{-- formulario con numero de telefono --}} + + + + +
    +
    +
    +
    +
    +
    +

    Ya tienes una cuenta?  Entra aqui!

    +
    +
    + +
    + + + + + + {{-- --}} + + + + + + + + + + + + + + + diff --git a/resources/views/frontend/registro-comercio/views/email-verification.blade.php b/resources/views/frontend/registro-comercio/views/email-verification.blade.php index ea5dd40b..ff2c5a2a 100644 --- a/resources/views/frontend/registro-comercio/views/email-verification.blade.php +++ b/resources/views/frontend/registro-comercio/views/email-verification.blade.php @@ -1,4 +1,4 @@ - + @@ -59,44 +59,44 @@
    - Volver Atrás + {{-- Volver Atrás --}} + + +

    Verificación de correo electrónico

    -

    Por favor verifica tu dirección de correo electrónico [email protected] -
    y coloca el código de verificación aqui! -

    -
    +