Fixes for correct redirects

This commit is contained in:
David Bomba 2023-10-02 17:20:26 +11:00
parent d5ad8c8773
commit 5ad2125116
15 changed files with 129 additions and 117 deletions

View File

@ -26,7 +26,7 @@ class UserWasCreated
{ {
use Dispatchable, InteractsWithSockets, SerializesModels; use Dispatchable, InteractsWithSockets, SerializesModels;
public function __construct(public User $user, public User $creating_user, public Company $company, public array $event_vars) public function __construct(public User $user, public User $creating_user, public Company $company, public array $event_vars, public $is_react = true)
{ {
} }

View File

@ -90,6 +90,8 @@ class ForgotPasswordController extends Controller
$account = Account::find($account_id); $account = Account::find($account_id);
} }
return $this->render('auth.passwords.request', ['root' => 'themes', 'account' => $account]); $is_react = request()->has('react') ? true : false;
return $this->render('auth.passwords.request', ['root' => 'themes', 'account' => $account, 'is_react' => $is_react]);
} }
} }

View File

@ -70,6 +70,7 @@ class ResetPasswordController extends Controller
$account = Account::first(); $account = Account::first();
} }
return $this->render('auth.passwords.reset', ['root' => 'themes', 'token' => $token, 'account' => $account, 'email' => $request->email]); return $this->render('auth.passwords.reset', ['root' => 'themes', 'token' => $token, 'account' => $account, 'email' => $request->email]);
} }
@ -110,6 +111,9 @@ class ResetPasswordController extends Controller
{ {
auth()->logout(); auth()->logout();
if(request()->has('react') || request()->hasHeader('X-React'))
return redirect(config('ninja.react_url').'/#/login');
return redirect('/'); return redirect('/');
} }
@ -126,10 +130,10 @@ class ResetPasswordController extends Controller
return new JsonResponse(['message' => trans($response)], 200); return new JsonResponse(['message' => trans($response)], 200);
} }
if($request->hasHeader('X-React')){ if($request->hasHeader('X-REACT') || $request->has('react')){
return redirect(config('ninja.react_url').'/#/login'); return redirect(config('ninja.react_url').'/#/login');
} }
elseif($request->hasHeader('X-React')) else
return redirect('/#/login'); return redirect('/#/login');
return redirect($this->redirectPath()) return redirect($this->redirectPath())

View File

@ -109,9 +109,11 @@ class UserController extends BaseController
$user_agent = request()->input('token_name') ?: request()->server('HTTP_USER_AGENT'); $user_agent = request()->input('token_name') ?: request()->server('HTTP_USER_AGENT');
$is_react = $request->hasHeader('X-React') ?? false;
$ct = (new CreateCompanyToken($company, $user, $user_agent))->handle(); $ct = (new CreateCompanyToken($company, $user, $user_agent))->handle();
event(new UserWasCreated($user, auth()->user(), $company, Ninja::eventVars(auth()->user() ? auth()->user()->id : null))); event(new UserWasCreated($user, auth()->user(), $company, Ninja::eventVars(auth()->user() ? auth()->user()->id : null), $is_react));
$user->setCompany($company); $user->setCompany($company);
$user->company_id = $company->id; $user->company_id = $company->id;
@ -176,7 +178,7 @@ class UserController extends BaseController
$user->oauth_user_token = null; $user->oauth_user_token = null;
$user->save(); $user->save();
UserEmailChanged::dispatch($new_user, json_decode($old_user), $logged_in_user->company()); UserEmailChanged::dispatch($new_user, json_decode($old_user), $logged_in_user->company(), $request->hasHeader('X-React'));
} }
event(new UserWasUpdated($user, $logged_in_user, $logged_in_user->company(), Ninja::eventVars($logged_in_user->id))); event(new UserWasUpdated($user, $logged_in_user, $logged_in_user->company(), Ninja::eventVars($logged_in_user->id)));
@ -292,7 +294,7 @@ class UserController extends BaseController
/** @var \App\Models\User $logged_in_user */ /** @var \App\Models\User $logged_in_user */
$logged_in_user = auth()->user(); $logged_in_user = auth()->user();
$user->service()->invite($logged_in_user->company()); $user->service()->invite($logged_in_user->company(), $request->hasHeader('X-REACT'));
return response()->json(['message' => ctrans('texts.confirmation_resent')], 200); return response()->json(['message' => ctrans('texts.confirmation_resent')], 200);
} }
@ -310,7 +312,7 @@ class UserController extends BaseController
/** @var \App\Models\User $logged_in_user */ /** @var \App\Models\User $logged_in_user */
$logged_in_user = auth()->user(); $logged_in_user = auth()->user();
$user->service()->invite($logged_in_user->company()); $user->service()->invite($logged_in_user->company(), $request->hasHeader('X-REACT'));
return response()->json(['message' => ctrans('texts.confirmation_resent')], 200); return response()->json(['message' => ctrans('texts.confirmation_resent')], 200);
} }

View File

@ -81,7 +81,7 @@ class CreateUser
]); ]);
if (! Ninja::isSelfHost()) { if (! Ninja::isSelfHost()) {
event(new UserWasCreated($user, $user, $this->company, Ninja::eventVars(auth()->user() ? auth()->user()->id : null))); event(new UserWasCreated($user, $user, $this->company, Ninja::eventVars(auth()->user() ? auth()->user()->id : null), request()->hasHeader('X-REACT') ?? false));
} }
return $user; return $user;

View File

@ -39,7 +39,7 @@ class UserEmailChanged implements ShouldQueue
* @param \stdClass $old_user * @param \stdClass $old_user
* @param \App\Models\Company $company * @param \App\Models\Company $company
*/ */
public function __construct(protected User $new_user, protected \stdClass $old_user, protected Company $company) public function __construct(protected User $new_user, protected \stdClass $old_user, protected Company $company, protected bool $is_react = false)
{ {
$this->settings = $this->company->settings; $this->settings = $this->company->settings;
} }
@ -72,7 +72,7 @@ class UserEmailChanged implements ShouldQueue
NinjaMailerJob::dispatch($nmo, true); NinjaMailerJob::dispatch($nmo, true);
$this->new_user->service()->invite($this->company); $this->new_user->service()->invite($this->company, $this->is_react);
} }
private function getData() private function getData()

View File

@ -47,7 +47,7 @@ class SendVerificationNotification implements ShouldQueue
{ {
MultiDB::setDB($event->company->db); MultiDB::setDB($event->company->db);
$event->user->service()->invite($event->company); $event->user->service()->invite($event->company, $event->is_react);
if (Carbon::parse($event->company->created_at)->lt(now()->subDay())) { if (Carbon::parse($event->company->created_at)->lt(now()->subDay())) {
App::forgetInstance('translator'); App::forgetInstance('translator');

View File

@ -11,22 +11,16 @@
namespace App\Mail\Admin; namespace App\Mail\Admin;
use App\Models\Company;
use App\Models\User;
use App\Utils\Ninja; use App\Utils\Ninja;
use Illuminate\Support\Facades\App; use Illuminate\Support\Facades\App;
class ResetPasswordObject class ResetPasswordObject
{ {
public $user;
public $token; public function __construct(private string $token, protected User $user, protected Company $company, protected bool $is_react)
public $company;
public function __construct($token, $user, $company)
{ {
$this->token = $token;
$this->user = $user;
$this->company = $company;
} }
public function build() public function build()
@ -42,7 +36,7 @@ class ResetPasswordObject
$data = [ $data = [
'title' => ctrans('texts.your_password_reset_link'), 'title' => ctrans('texts.your_password_reset_link'),
'message' => ctrans('texts.reset_password'), 'message' => ctrans('texts.reset_password'),
'url' => route('password.reset', ['token' => $this->token, 'email' => $this->user->email]), 'url' => route('password.reset', ['token' => $this->token, 'email' => $this->user->email, 'react' => $this->is_react ? 'true' : 'false']),
'button' => ctrans('texts.reset'), 'button' => ctrans('texts.reset'),
'signature' => $this->company->settings->email_signature, 'signature' => $this->company->settings->email_signature,
'settings' => $this->company->settings, 'settings' => $this->company->settings,

View File

@ -42,6 +42,7 @@ class VerifyUserObject
if($this->is_react) { if($this->is_react) {
$react_redirect = '?react=true'; $react_redirect = '?react=true';
nlog("is react");
} }
$data = [ $data = [

View File

@ -636,15 +636,16 @@ class User extends Authenticatable implements MustVerifyEmail
*/ */
public function sendPasswordResetNotification($token) public function sendPasswordResetNotification($token)
{ {
$is_react = request()->has('react') || request()->hasHeader('X-React') ? true : false;
$nmo = new NinjaMailerObject; $nmo = new NinjaMailerObject;
$nmo->mailable = new NinjaMailer((new ResetPasswordObject($token, $this, $this->account->default_company))->build()); $nmo->mailable = new NinjaMailer((new ResetPasswordObject($token, $this, $this->account->default_company, $is_react))->build());
$nmo->to_user = $this; $nmo->to_user = $this;
$nmo->settings = $this->account->default_company->settings; $nmo->settings = $this->account->default_company->settings;
$nmo->company = $this->account->default_company; $nmo->company = $this->account->default_company;
NinjaMailerJob::dispatch($nmo, true); NinjaMailerJob::dispatch($nmo, true);
//$this->notify(new ResetPasswordNotification($token));
} }
public function service() public function service()

View File

@ -15,6 +15,7 @@ use App\Jobs\Mail\NinjaMailer;
use App\Jobs\Mail\NinjaMailerJob; use App\Jobs\Mail\NinjaMailerJob;
use App\Jobs\Mail\NinjaMailerObject; use App\Jobs\Mail\NinjaMailerObject;
use App\Mail\Admin\VerifyUserObject; use App\Mail\Admin\VerifyUserObject;
use App\Models\Company;
use App\Models\User; use App\Models\User;
use App\Utils\Ninja; use App\Utils\Ninja;
@ -24,11 +25,9 @@ class UserService
{ {
} }
public function invite($company) public function invite(Company $company, bool $is_react=true)
{ {
$is_react = request()->hasHeader('X-REACT') ?? false;
try { try {
$nmo = new NinjaMailerObject; $nmo = new NinjaMailerObject;
$nmo->mailable = new NinjaMailer((new VerifyUserObject($this->user, $company, $is_react))->build()); $nmo->mailable = new NinjaMailer((new VerifyUserObject($this->user, $company, $is_react))->build());

180
composer.lock generated
View File

@ -2487,16 +2487,16 @@
}, },
{ {
"name": "google/apiclient-services", "name": "google/apiclient-services",
"version": "v0.317.0", "version": "v0.318.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/googleapis/google-api-php-client-services.git", "url": "https://github.com/googleapis/google-api-php-client-services.git",
"reference": "a11658da6e5ba713e3d636544895bb0af3c27689" "reference": "908a866797b9731352e650997112c8c3a0347ac5"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/googleapis/google-api-php-client-services/zipball/a11658da6e5ba713e3d636544895bb0af3c27689", "url": "https://api.github.com/repos/googleapis/google-api-php-client-services/zipball/908a866797b9731352e650997112c8c3a0347ac5",
"reference": "a11658da6e5ba713e3d636544895bb0af3c27689", "reference": "908a866797b9731352e650997112c8c3a0347ac5",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -2525,9 +2525,9 @@
], ],
"support": { "support": {
"issues": "https://github.com/googleapis/google-api-php-client-services/issues", "issues": "https://github.com/googleapis/google-api-php-client-services/issues",
"source": "https://github.com/googleapis/google-api-php-client-services/tree/v0.317.0" "source": "https://github.com/googleapis/google-api-php-client-services/tree/v0.318.0"
}, },
"time": "2023-09-24T01:06:13+00:00" "time": "2023-10-02T01:10:14+00:00"
}, },
{ {
"name": "google/auth", "name": "google/auth",
@ -3397,16 +3397,16 @@
}, },
{ {
"name": "horstoeko/zugferd", "name": "horstoeko/zugferd",
"version": "v1.0.29", "version": "v1.0.30",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/horstoeko/zugferd.git", "url": "https://github.com/horstoeko/zugferd.git",
"reference": "9fb81e2e9a16d10bec8bf655484aae11bdca1997" "reference": "b5e85651fe2e53eef82aa086c9245b7f5229433f"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/horstoeko/zugferd/zipball/9fb81e2e9a16d10bec8bf655484aae11bdca1997", "url": "https://api.github.com/repos/horstoeko/zugferd/zipball/b5e85651fe2e53eef82aa086c9245b7f5229433f",
"reference": "9fb81e2e9a16d10bec8bf655484aae11bdca1997", "reference": "b5e85651fe2e53eef82aa086c9245b7f5229433f",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -3464,9 +3464,9 @@
], ],
"support": { "support": {
"issues": "https://github.com/horstoeko/zugferd/issues", "issues": "https://github.com/horstoeko/zugferd/issues",
"source": "https://github.com/horstoeko/zugferd/tree/v1.0.29" "source": "https://github.com/horstoeko/zugferd/tree/v1.0.30"
}, },
"time": "2023-09-23T06:15:04+00:00" "time": "2023-09-30T13:42:02+00:00"
}, },
{ {
"name": "http-interop/http-factory-guzzle", "name": "http-interop/http-factory-guzzle",
@ -10621,16 +10621,16 @@
}, },
{ {
"name": "symfony/error-handler", "name": "symfony/error-handler",
"version": "v6.3.2", "version": "v6.3.5",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/error-handler.git", "url": "https://github.com/symfony/error-handler.git",
"reference": "85fd65ed295c4078367c784e8a5a6cee30348b7a" "reference": "1f69476b64fb47105c06beef757766c376b548c4"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/error-handler/zipball/85fd65ed295c4078367c784e8a5a6cee30348b7a", "url": "https://api.github.com/repos/symfony/error-handler/zipball/1f69476b64fb47105c06beef757766c376b548c4",
"reference": "85fd65ed295c4078367c784e8a5a6cee30348b7a", "reference": "1f69476b64fb47105c06beef757766c376b548c4",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -10675,7 +10675,7 @@
"description": "Provides tools to manage errors and ease debugging PHP code", "description": "Provides tools to manage errors and ease debugging PHP code",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"support": { "support": {
"source": "https://github.com/symfony/error-handler/tree/v6.3.2" "source": "https://github.com/symfony/error-handler/tree/v6.3.5"
}, },
"funding": [ "funding": [
{ {
@ -10691,7 +10691,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2023-07-16T17:05:46+00:00" "time": "2023-09-12T06:57:20+00:00"
}, },
{ {
"name": "symfony/event-dispatcher", "name": "symfony/event-dispatcher",
@ -10914,16 +10914,16 @@
}, },
{ {
"name": "symfony/finder", "name": "symfony/finder",
"version": "v6.3.3", "version": "v6.3.5",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/finder.git", "url": "https://github.com/symfony/finder.git",
"reference": "9915db259f67d21eefee768c1abcf1cc61b1fc9e" "reference": "a1b31d88c0e998168ca7792f222cbecee47428c4"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/finder/zipball/9915db259f67d21eefee768c1abcf1cc61b1fc9e", "url": "https://api.github.com/repos/symfony/finder/zipball/a1b31d88c0e998168ca7792f222cbecee47428c4",
"reference": "9915db259f67d21eefee768c1abcf1cc61b1fc9e", "reference": "a1b31d88c0e998168ca7792f222cbecee47428c4",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -10958,7 +10958,7 @@
"description": "Finds files and directories via an intuitive fluent interface", "description": "Finds files and directories via an intuitive fluent interface",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"support": { "support": {
"source": "https://github.com/symfony/finder/tree/v6.3.3" "source": "https://github.com/symfony/finder/tree/v6.3.5"
}, },
"funding": [ "funding": [
{ {
@ -10974,20 +10974,20 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2023-07-31T08:31:44+00:00" "time": "2023-09-26T12:56:25+00:00"
}, },
{ {
"name": "symfony/http-client", "name": "symfony/http-client",
"version": "v6.3.2", "version": "v6.3.5",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/http-client.git", "url": "https://github.com/symfony/http-client.git",
"reference": "15f9f4bad62bfcbe48b5dedd866f04a08fc7ff00" "reference": "213e564da4cbf61acc9728d97e666bcdb868c10d"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/http-client/zipball/15f9f4bad62bfcbe48b5dedd866f04a08fc7ff00", "url": "https://api.github.com/repos/symfony/http-client/zipball/213e564da4cbf61acc9728d97e666bcdb868c10d",
"reference": "15f9f4bad62bfcbe48b5dedd866f04a08fc7ff00", "reference": "213e564da4cbf61acc9728d97e666bcdb868c10d",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -11050,7 +11050,7 @@
"http" "http"
], ],
"support": { "support": {
"source": "https://github.com/symfony/http-client/tree/v6.3.2" "source": "https://github.com/symfony/http-client/tree/v6.3.5"
}, },
"funding": [ "funding": [
{ {
@ -11066,7 +11066,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2023-07-05T08:41:27+00:00" "time": "2023-09-29T15:57:12+00:00"
}, },
{ {
"name": "symfony/http-client-contracts", "name": "symfony/http-client-contracts",
@ -11148,16 +11148,16 @@
}, },
{ {
"name": "symfony/http-foundation", "name": "symfony/http-foundation",
"version": "v6.3.4", "version": "v6.3.5",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/http-foundation.git", "url": "https://github.com/symfony/http-foundation.git",
"reference": "cac1556fdfdf6719668181974104e6fcfa60e844" "reference": "b50f5e281d722cb0f4c296f908bacc3e2b721957"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/http-foundation/zipball/cac1556fdfdf6719668181974104e6fcfa60e844", "url": "https://api.github.com/repos/symfony/http-foundation/zipball/b50f5e281d722cb0f4c296f908bacc3e2b721957",
"reference": "cac1556fdfdf6719668181974104e6fcfa60e844", "reference": "b50f5e281d722cb0f4c296f908bacc3e2b721957",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -11205,7 +11205,7 @@
"description": "Defines an object-oriented layer for the HTTP specification", "description": "Defines an object-oriented layer for the HTTP specification",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"support": { "support": {
"source": "https://github.com/symfony/http-foundation/tree/v6.3.4" "source": "https://github.com/symfony/http-foundation/tree/v6.3.5"
}, },
"funding": [ "funding": [
{ {
@ -11221,20 +11221,20 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2023-08-22T08:20:46+00:00" "time": "2023-09-04T21:33:54+00:00"
}, },
{ {
"name": "symfony/http-kernel", "name": "symfony/http-kernel",
"version": "v6.3.4", "version": "v6.3.5",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/http-kernel.git", "url": "https://github.com/symfony/http-kernel.git",
"reference": "36abb425b4af863ae1fe54d8a8b8b4c76a2bccdb" "reference": "9f991a964368bee8d883e8d57ced4fe9fff04dfc"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/http-kernel/zipball/36abb425b4af863ae1fe54d8a8b8b4c76a2bccdb", "url": "https://api.github.com/repos/symfony/http-kernel/zipball/9f991a964368bee8d883e8d57ced4fe9fff04dfc",
"reference": "36abb425b4af863ae1fe54d8a8b8b4c76a2bccdb", "reference": "9f991a964368bee8d883e8d57ced4fe9fff04dfc",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -11318,7 +11318,7 @@
"description": "Provides a structured process for converting a Request into a Response", "description": "Provides a structured process for converting a Request into a Response",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"support": { "support": {
"source": "https://github.com/symfony/http-kernel/tree/v6.3.4" "source": "https://github.com/symfony/http-kernel/tree/v6.3.5"
}, },
"funding": [ "funding": [
{ {
@ -11334,7 +11334,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2023-08-26T13:54:49+00:00" "time": "2023-09-30T06:37:04+00:00"
}, },
{ {
"name": "symfony/intl", "name": "symfony/intl",
@ -11420,16 +11420,16 @@
}, },
{ {
"name": "symfony/mailer", "name": "symfony/mailer",
"version": "v6.3.0", "version": "v6.3.5",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/mailer.git", "url": "https://github.com/symfony/mailer.git",
"reference": "7b03d9be1dea29bfec0a6c7b603f5072a4c97435" "reference": "d89611a7830d51b5e118bca38e390dea92f9ea06"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/mailer/zipball/7b03d9be1dea29bfec0a6c7b603f5072a4c97435", "url": "https://api.github.com/repos/symfony/mailer/zipball/d89611a7830d51b5e118bca38e390dea92f9ea06",
"reference": "7b03d9be1dea29bfec0a6c7b603f5072a4c97435", "reference": "d89611a7830d51b5e118bca38e390dea92f9ea06",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -11480,7 +11480,7 @@
"description": "Helps sending emails", "description": "Helps sending emails",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"support": { "support": {
"source": "https://github.com/symfony/mailer/tree/v6.3.0" "source": "https://github.com/symfony/mailer/tree/v6.3.5"
}, },
"funding": [ "funding": [
{ {
@ -11496,20 +11496,20 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2023-05-29T12:49:39+00:00" "time": "2023-09-06T09:47:15+00:00"
}, },
{ {
"name": "symfony/mailgun-mailer", "name": "symfony/mailgun-mailer",
"version": "v6.3.2", "version": "v6.3.5",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/mailgun-mailer.git", "url": "https://github.com/symfony/mailgun-mailer.git",
"reference": "df371e42a4c2a78a28c8de910f96949040e308fd" "reference": "b467aba49c8240a71f7027c213d9d140ba1abce7"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/mailgun-mailer/zipball/df371e42a4c2a78a28c8de910f96949040e308fd", "url": "https://api.github.com/repos/symfony/mailgun-mailer/zipball/b467aba49c8240a71f7027c213d9d140ba1abce7",
"reference": "df371e42a4c2a78a28c8de910f96949040e308fd", "reference": "b467aba49c8240a71f7027c213d9d140ba1abce7",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -11549,7 +11549,7 @@
"description": "Symfony Mailgun Mailer Bridge", "description": "Symfony Mailgun Mailer Bridge",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"support": { "support": {
"source": "https://github.com/symfony/mailgun-mailer/tree/v6.3.2" "source": "https://github.com/symfony/mailgun-mailer/tree/v6.3.5"
}, },
"funding": [ "funding": [
{ {
@ -11565,20 +11565,20 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2023-07-20T10:26:17+00:00" "time": "2023-09-29T17:30:10+00:00"
}, },
{ {
"name": "symfony/mime", "name": "symfony/mime",
"version": "v6.3.3", "version": "v6.3.5",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/mime.git", "url": "https://github.com/symfony/mime.git",
"reference": "9a0cbd52baa5ba5a5b1f0cacc59466f194730f98" "reference": "d5179eedf1cb2946dbd760475ebf05c251ef6a6e"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/mime/zipball/9a0cbd52baa5ba5a5b1f0cacc59466f194730f98", "url": "https://api.github.com/repos/symfony/mime/zipball/d5179eedf1cb2946dbd760475ebf05c251ef6a6e",
"reference": "9a0cbd52baa5ba5a5b1f0cacc59466f194730f98", "reference": "d5179eedf1cb2946dbd760475ebf05c251ef6a6e",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -11633,7 +11633,7 @@
"mime-type" "mime-type"
], ],
"support": { "support": {
"source": "https://github.com/symfony/mime/tree/v6.3.3" "source": "https://github.com/symfony/mime/tree/v6.3.5"
}, },
"funding": [ "funding": [
{ {
@ -11649,7 +11649,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2023-07-31T07:08:24+00:00" "time": "2023-09-29T06:59:36+00:00"
}, },
{ {
"name": "symfony/options-resolver", "name": "symfony/options-resolver",
@ -13010,16 +13010,16 @@
}, },
{ {
"name": "symfony/routing", "name": "symfony/routing",
"version": "v6.3.3", "version": "v6.3.5",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/routing.git", "url": "https://github.com/symfony/routing.git",
"reference": "e7243039ab663822ff134fbc46099b5fdfa16f6a" "reference": "82616e59acd3e3d9c916bba798326cb7796d7d31"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/routing/zipball/e7243039ab663822ff134fbc46099b5fdfa16f6a", "url": "https://api.github.com/repos/symfony/routing/zipball/82616e59acd3e3d9c916bba798326cb7796d7d31",
"reference": "e7243039ab663822ff134fbc46099b5fdfa16f6a", "reference": "82616e59acd3e3d9c916bba798326cb7796d7d31",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -13073,7 +13073,7 @@
"url" "url"
], ],
"support": { "support": {
"source": "https://github.com/symfony/routing/tree/v6.3.3" "source": "https://github.com/symfony/routing/tree/v6.3.5"
}, },
"funding": [ "funding": [
{ {
@ -13089,7 +13089,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2023-07-31T07:08:24+00:00" "time": "2023-09-20T16:05:51+00:00"
}, },
{ {
"name": "symfony/service-contracts", "name": "symfony/service-contracts",
@ -13175,16 +13175,16 @@
}, },
{ {
"name": "symfony/string", "name": "symfony/string",
"version": "v6.3.2", "version": "v6.3.5",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/string.git", "url": "https://github.com/symfony/string.git",
"reference": "53d1a83225002635bca3482fcbf963001313fb68" "reference": "13d76d0fb049051ed12a04bef4f9de8715bea339"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/string/zipball/53d1a83225002635bca3482fcbf963001313fb68", "url": "https://api.github.com/repos/symfony/string/zipball/13d76d0fb049051ed12a04bef4f9de8715bea339",
"reference": "53d1a83225002635bca3482fcbf963001313fb68", "reference": "13d76d0fb049051ed12a04bef4f9de8715bea339",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -13241,7 +13241,7 @@
"utf8" "utf8"
], ],
"support": { "support": {
"source": "https://github.com/symfony/string/tree/v6.3.2" "source": "https://github.com/symfony/string/tree/v6.3.5"
}, },
"funding": [ "funding": [
{ {
@ -13257,7 +13257,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2023-07-05T08:41:27+00:00" "time": "2023-09-18T10:38:32+00:00"
}, },
{ {
"name": "symfony/translation", "name": "symfony/translation",
@ -13508,16 +13508,16 @@
}, },
{ {
"name": "symfony/validator", "name": "symfony/validator",
"version": "v6.3.4", "version": "v6.3.5",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/validator.git", "url": "https://github.com/symfony/validator.git",
"reference": "0c8435154920b9bbe93bece675234c244cadf73b" "reference": "48e815ba3b5eb72e632588dbf7ea2dc4e608ee47"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/validator/zipball/0c8435154920b9bbe93bece675234c244cadf73b", "url": "https://api.github.com/repos/symfony/validator/zipball/48e815ba3b5eb72e632588dbf7ea2dc4e608ee47",
"reference": "0c8435154920b9bbe93bece675234c244cadf73b", "reference": "48e815ba3b5eb72e632588dbf7ea2dc4e608ee47",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -13584,7 +13584,7 @@
"description": "Provides tools to validate values", "description": "Provides tools to validate values",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"support": { "support": {
"source": "https://github.com/symfony/validator/tree/v6.3.4" "source": "https://github.com/symfony/validator/tree/v6.3.5"
}, },
"funding": [ "funding": [
{ {
@ -13600,20 +13600,20 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2023-08-17T15:49:05+00:00" "time": "2023-09-29T07:41:15+00:00"
}, },
{ {
"name": "symfony/var-dumper", "name": "symfony/var-dumper",
"version": "v6.3.4", "version": "v6.3.5",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/var-dumper.git", "url": "https://github.com/symfony/var-dumper.git",
"reference": "2027be14f8ae8eae999ceadebcda5b4909b81d45" "reference": "3d9999376be5fea8de47752837a3e1d1c5f69ef5"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/var-dumper/zipball/2027be14f8ae8eae999ceadebcda5b4909b81d45", "url": "https://api.github.com/repos/symfony/var-dumper/zipball/3d9999376be5fea8de47752837a3e1d1c5f69ef5",
"reference": "2027be14f8ae8eae999ceadebcda5b4909b81d45", "reference": "3d9999376be5fea8de47752837a3e1d1c5f69ef5",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -13668,7 +13668,7 @@
"dump" "dump"
], ],
"support": { "support": {
"source": "https://github.com/symfony/var-dumper/tree/v6.3.4" "source": "https://github.com/symfony/var-dumper/tree/v6.3.5"
}, },
"funding": [ "funding": [
{ {
@ -13684,7 +13684,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2023-08-24T14:51:05+00:00" "time": "2023-09-12T10:11:35+00:00"
}, },
{ {
"name": "symfony/yaml", "name": "symfony/yaml",
@ -13813,16 +13813,16 @@
}, },
{ {
"name": "turbo124/beacon", "name": "turbo124/beacon",
"version": "v1.5.1", "version": "v1.5.2",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/turbo124/beacon.git", "url": "https://github.com/turbo124/beacon.git",
"reference": "a737499198a3aff2d194d4f2a4c834257187d9b8" "reference": "4f08b91d3f9326e42f664e667d84100dc8afe752"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/turbo124/beacon/zipball/a737499198a3aff2d194d4f2a4c834257187d9b8", "url": "https://api.github.com/repos/turbo124/beacon/zipball/4f08b91d3f9326e42f664e667d84100dc8afe752",
"reference": "a737499198a3aff2d194d4f2a4c834257187d9b8", "reference": "4f08b91d3f9326e42f664e667d84100dc8afe752",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -13869,9 +13869,9 @@
"turbo124" "turbo124"
], ],
"support": { "support": {
"source": "https://github.com/turbo124/beacon/tree/v1.5.1" "source": "https://github.com/turbo124/beacon/tree/v1.5.2"
}, },
"time": "2023-09-24T07:20:04+00:00" "time": "2023-10-01T07:13:02+00:00"
}, },
{ {
"name": "twilio/sdk", "name": "twilio/sdk",

View File

@ -36,6 +36,9 @@
@if($company && !is_null($company)) @if($company && !is_null($company))
<input type="hidden" name="company_key" value="{{$company->company_key}}"> <input type="hidden" name="company_key" value="{{$company->company_key}}">
@endif @endif
@if($is_react)
<input type="hidden" name="react" value="true">
@endif
<input type="email" name="email" id="email" <input type="email" name="email" id="email"
class="input" class="input"
value="{{ request()->query('email') ?? old('email') }}" value="{{ request()->query('email') ?? old('email') }}"

View File

@ -12,6 +12,9 @@
<form action="{{ url()->current() }}" method="post" class="mt-6"> <form action="{{ url()->current() }}" method="post" class="mt-6">
@csrf @csrf
<input type="hidden" name="user_id" value="{{ $user_id }}"> <input type="hidden" name="user_id" value="{{ $user_id }}">
@if(request()->has('react'))
<input type="hidden" name="react" value="true">
@endif
<div class="flex flex-col mt-4"> <div class="flex flex-col mt-4">
<label for="password" class="input-label">{{ ctrans('texts.password') }}</label> <label for="password" class="input-label">{{ ctrans('texts.password') }}</label>
<input type="password" name="password" id="password" <input type="password" name="password" id="password"

View File

@ -21,6 +21,9 @@
<form action="{{ route('password.update') }}" method="post" class="mt-6"> <form action="{{ route('password.update') }}" method="post" class="mt-6">
@csrf @csrf
<input type="hidden" name="token" value="{{ $token }}"> <input type="hidden" name="token" value="{{ $token }}">
@if(request()->has('react') && request()->react == 'true')
<input type="hidden" name="react" value="true">
@endif
<div class="flex flex-col"> <div class="flex flex-col">
<label for="email" class="input-label">{{ ctrans('texts.email_address') }}</label> <label for="email" class="input-label">{{ ctrans('texts.email_address') }}</label>
<input type="email" name="email" id="email" <input type="email" name="email" id="email"