@@ -27,17 +27,17 @@ |
||
| 27 | 27 | $user = auth()->user(); |
| 28 | 28 | // The Jaxon request processing path is not localized. So we need to save the current |
| 29 | 29 | // locale in the database, so we can have it when processing the Jaxon ajax requests. |
| 30 | - if($request->routeIs('tontine.home')) |
|
| 30 | + if ($request->routeIs('tontine.home')) |
|
| 31 | 31 | { |
| 32 | 32 | // On the home page, save the current locale in the database. |
| 33 | 33 | $properties = $user->properties; |
| 34 | - if($locale !== ($properties['locale'] ?? '')) |
|
| 34 | + if ($locale !== ($properties['locale'] ?? '')) |
|
| 35 | 35 | { |
| 36 | 36 | $properties['locale'] = $locale; |
| 37 | 37 | $user->saveProperties($properties); |
| 38 | 38 | } |
| 39 | 39 | } |
| 40 | - elseif($request->routeIs('jaxon')) |
|
| 40 | + elseif ($request->routeIs('jaxon')) |
|
| 41 | 41 | { |
| 42 | 42 | // For Jaxon requests, try to get the current locale from the database. |
| 43 | 43 | $locale = $user->properties['locale'] ?? LaravelLocalization::getCurrentLocale(); |
@@ -36,8 +36,7 @@ |
||
| 36 | 36 | $properties['locale'] = $locale; |
| 37 | 37 | $user->saveProperties($properties); |
| 38 | 38 | } |
| 39 | - } |
|
| 40 | - elseif($request->routeIs('jaxon')) |
|
| 39 | + } elseif($request->routeIs('jaxon')) |
|
| 41 | 40 | { |
| 42 | 41 | // For Jaxon requests, try to get the current locale from the database. |
| 43 | 42 | $locale = $user->properties['locale'] ?? LaravelLocalization::getCurrentLocale(); |
@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | { |
| 74 | 74 | /** @var TenantService */ |
| 75 | 75 | $tenantService = app()->make(TenantService::class); |
| 76 | - if(!($access = $tenantService->checkGuestAccess($section, $entry, true))) |
|
| 76 | + if (!($access = $tenantService->checkGuestAccess($section, $entry, true))) |
|
| 77 | 77 | { |
| 78 | 78 | $jaxon->cl(Tontine::class)->home(); |
| 79 | 79 | } |
@@ -87,12 +87,12 @@ discard block |
||
| 87 | 87 | */ |
| 88 | 88 | public function register() |
| 89 | 89 | { |
| 90 | - $this->reportable(function (Throwable $e) { |
|
| 90 | + $this->reportable(function(Throwable $e) { |
|
| 91 | 91 | // |
| 92 | 92 | }); |
| 93 | 93 | |
| 94 | 94 | // Redirect to the login page |
| 95 | - $this->renderable(function (AuthenticationException $e) { |
|
| 95 | + $this->renderable(function(AuthenticationException $e) { |
|
| 96 | 96 | /** @var Jaxon */ |
| 97 | 97 | $jaxon = app()->make(Jaxon::class); |
| 98 | 98 | $ajaxResponse = $jaxon->ajaxResponse(); |
@@ -102,19 +102,18 @@ discard block |
||
| 102 | 102 | }); |
| 103 | 103 | |
| 104 | 104 | // Show the error message in a dialog |
| 105 | - $this->renderable(function (MessageException $e) { |
|
| 105 | + $this->renderable(function(MessageException $e) { |
|
| 106 | 106 | /** @var Jaxon */ |
| 107 | 107 | $jaxon = app()->make(Jaxon::class); |
| 108 | 108 | $ajaxResponse = $jaxon->ajaxResponse(); |
| 109 | 109 | $e->isError ? |
| 110 | - $ajaxResponse->dialog->error($e->getMessage(), trans('common.titles.error')) : |
|
| 111 | - $ajaxResponse->dialog->warning($e->getMessage(), trans('common.titles.warning')); |
|
| 110 | + $ajaxResponse->dialog->error($e->getMessage(), trans('common.titles.error')) : $ajaxResponse->dialog->warning($e->getMessage(), trans('common.titles.warning')); |
|
| 112 | 111 | |
| 113 | 112 | return $jaxon->httpResponse(); |
| 114 | 113 | }); |
| 115 | 114 | |
| 116 | 115 | // Show the error message in a dialog |
| 117 | - $this->renderable(function (ValidationException $e) { |
|
| 116 | + $this->renderable(function(ValidationException $e) { |
|
| 118 | 117 | /** @var Jaxon */ |
| 119 | 118 | $jaxon = app()->make(Jaxon::class); |
| 120 | 119 | $ajaxResponse = $jaxon->ajaxResponse(); |
@@ -124,10 +123,10 @@ discard block |
||
| 124 | 123 | }); |
| 125 | 124 | |
| 126 | 125 | // Show the warning message in a dialog, and show the sessions page. |
| 127 | - $this->renderable(function (PlanningRoundException $e) { |
|
| 126 | + $this->renderable(function(PlanningRoundException $e) { |
|
| 128 | 127 | /** @var Jaxon */ |
| 129 | 128 | $jaxon = app()->make(Jaxon::class); |
| 130 | - if($this->checkGuestAccess($jaxon, 'planning', 'sessions')) |
|
| 129 | + if ($this->checkGuestAccess($jaxon, 'planning', 'sessions')) |
|
| 131 | 130 | { |
| 132 | 131 | $jaxon->cl(Round::class)->home(); |
| 133 | 132 | } |
@@ -138,10 +137,10 @@ discard block |
||
| 138 | 137 | }); |
| 139 | 138 | |
| 140 | 139 | // Show the warning message in a dialog, and show the pools page. |
| 141 | - $this->renderable(function (PlanningPoolException $e) { |
|
| 140 | + $this->renderable(function(PlanningPoolException $e) { |
|
| 142 | 141 | /** @var Jaxon */ |
| 143 | 142 | $jaxon = app()->make(Jaxon::class); |
| 144 | - if($this->checkGuestAccess($jaxon, 'planning', 'pools')) |
|
| 143 | + if ($this->checkGuestAccess($jaxon, 'planning', 'pools')) |
|
| 145 | 144 | { |
| 146 | 145 | $jaxon->cl(Pool::class)->home(); |
| 147 | 146 | } |
@@ -152,10 +151,10 @@ discard block |
||
| 152 | 151 | }); |
| 153 | 152 | |
| 154 | 153 | // Show the warning message in a dialog, and show the members page. |
| 155 | - $this->renderable(function (TontineMemberException $e) { |
|
| 154 | + $this->renderable(function(TontineMemberException $e) { |
|
| 156 | 155 | /** @var Jaxon */ |
| 157 | 156 | $jaxon = app()->make(Jaxon::class); |
| 158 | - if($this->checkGuestAccess($jaxon, 'tontine', 'members')) |
|
| 157 | + if ($this->checkGuestAccess($jaxon, 'tontine', 'members')) |
|
| 159 | 158 | { |
| 160 | 159 | $jaxon->cl(Member::class)->home(); |
| 161 | 160 | } |
@@ -166,10 +165,10 @@ discard block |
||
| 166 | 165 | }); |
| 167 | 166 | |
| 168 | 167 | // Show the warning message in a dialog, and show the sessions page. |
| 169 | - $this->renderable(function (MeetingRoundException $e) { |
|
| 168 | + $this->renderable(function(MeetingRoundException $e) { |
|
| 170 | 169 | /** @var Jaxon */ |
| 171 | 170 | $jaxon = app()->make(Jaxon::class); |
| 172 | - if($this->checkGuestAccess($jaxon, 'meeting', 'sessions')) |
|
| 171 | + if ($this->checkGuestAccess($jaxon, 'meeting', 'sessions')) |
|
| 173 | 172 | { |
| 174 | 173 | $jaxon->cl(Session::class)->home(); |
| 175 | 174 | } |