diff --git a/app/Http/Middleware/StartupCheck.php b/app/Http/Middleware/StartupCheck.php index f5d8c3121098..c37888974bdf 100644 --- a/app/Http/Middleware/StartupCheck.php +++ b/app/Http/Middleware/StartupCheck.php @@ -40,6 +40,7 @@ class StartupCheck if (Input::has('clear_cache')) { Session::flash('message', 'Cache cleared'); } + foreach ($cached_tables as $name => $class) { if (Input::has('clear_cache') || ! Cache::has($name)) { // check that the table exists in case the migration is pending diff --git a/app/Http/ViewComposers/PortalComposer.php b/app/Http/ViewComposers/PortalComposer.php index 12c5b5c32be7..10e04c046fcf 100644 --- a/app/Http/ViewComposers/PortalComposer.php +++ b/app/Http/ViewComposers/PortalComposer.php @@ -11,6 +11,7 @@ namespace App\Http\ViewComposers; +use App\Utils\TranslationHelper; use Illuminate\View\View; /** @@ -28,7 +29,9 @@ class PortalComposer */ public function compose(View $view) :void { - $view->with('portal', $this->portalData()); + + $view->with($this->portalData()); + } /** @@ -36,15 +39,17 @@ class PortalComposer */ private function portalData() :array { + if(!auth()->user()) return []; $data['sidebar'] = $this->sidebarMenu(); $data['header'] = []; $data['footer'] = []; - + $data['countries'] = TranslationHelper::getCountries(); return $data; + } private function sidebarMenu() :array @@ -56,6 +61,7 @@ class PortalComposer $data[] = [ 'title' => ctrans('texts.invoices'), 'url' => 'client.invoices.index', 'icon' => 'fa fa-file-pdf-o fa-fw fa-2x']; return $data; + } } \ No newline at end of file diff --git a/app/Http/ViewComposers/TranslationComposer.php b/app/Http/ViewComposers/TranslationComposer.php index 5d720467b098..348e2041ac87 100644 --- a/app/Http/ViewComposers/TranslationComposer.php +++ b/app/Http/ViewComposers/TranslationComposer.php @@ -31,6 +31,7 @@ class TranslationComposer */ public function compose(View $view) :void { + $view->with('industries', TranslationHelper::getIndustries()); $view->with('countries', TranslationHelper::getCountries()); diff --git a/app/Providers/ComposerServiceProvider.php b/app/Providers/ComposerServiceProvider.php index 94395dcb0592..711c1d555dd3 100644 --- a/app/Providers/ComposerServiceProvider.php +++ b/app/Providers/ComposerServiceProvider.php @@ -22,6 +22,7 @@ class ComposerServiceProvider extends ServiceProvider */ public function boot() { + view()->composer('portal.*', 'App\Http\ViewComposers\PortalComposer'); //view()->composer('*', 'App\Http\ViewComposers\HeaderComposer'); diff --git a/app/Providers/TelescopeServiceProvider.php b/app/Providers/TelescopeServiceProvider.php deleted file mode 100644 index 6d66c38d3f38..000000000000 --- a/app/Providers/TelescopeServiceProvider.php +++ /dev/null @@ -1,70 +0,0 @@ -hideSensitiveRequestDetails(); - - Telescope::filter(function (IncomingEntry $entry) { - if ($this->app->isLocal()) { - return true; - } - - return $entry->isReportableException() || - $entry->isFailedJob() || - $entry->isScheduledTask() || - $entry->hasMonitoredTag(); - }); - } - - /** - * Prevent sensitive request details from being logged by Telescope. - * - * @return void - */ - protected function hideSensitiveRequestDetails() - { - if ($this->app->isLocal()) { - return; - } - - Telescope::hideRequestParameters(['_token']); - - Telescope::hideRequestHeaders([ - 'cookie', - 'x-csrf-token', - 'x-xsrf-token', - ]); - } - - /** - * Register the Telescope gate. - * - * This gate determines who can access Telescope in non-local environments. - * - * @return void - */ - protected function gate() - { - Gate::define('viewTelescope', function ($user) { - return in_array($user->email, [ - // - ]); - }); - } -} diff --git a/composer.json b/composer.json index 1efee9cb8316..d8928a24869c 100644 --- a/composer.json +++ b/composer.json @@ -50,7 +50,6 @@ "filp/whoops": "^2.0", "fzaninotto/faker": "^1.4", "laravel/dusk": "^5.0", - "laravel/telescope": "^2.0", "mockery/mockery": "^1.0", "nunomaduro/collision": "^2.0", "phpunit/phpunit": "^7.0" diff --git a/config/app.php b/config/app.php index b0d8b7f8fbe6..e77cb438b142 100644 --- a/config/app.php +++ b/config/app.php @@ -175,7 +175,6 @@ return [ App\Providers\AuthServiceProvider::class, // App\Providers\BroadcastServiceProvider::class, App\Providers\EventServiceProvider::class, - App\Providers\TelescopeServiceProvider::class, App\Providers\RouteServiceProvider::class, App\Providers\ComposerServiceProvider::class, diff --git a/package.json b/package.json index c5a3a91d564a..5f4dd91a5957 100644 --- a/package.json +++ b/package.json @@ -13,6 +13,7 @@ "dependencies": { "@coreui/coreui": "^2.1.12", "@coreui/icons": "^0.3.0", + "@danielfarrell/bootstrap-combobox": "^1.1.8", "bootstrap": "^4.3.1", "bootstrap-sweetalert": "^1.0.1", "cross-env": "^5.2.0", diff --git a/public/mix-manifest.json b/public/mix-manifest.json index 72edfb9396f0..971ce383e54e 100644 --- a/public/mix-manifest.json +++ b/public/mix-manifest.json @@ -9,6 +9,8 @@ "/vendors/js/perfect-scrollbar.min.js": "/vendors/js/perfect-scrollbar.min.js?id=4a10bcfa0a9c9fa9d503", "/vendors/css/select2.min.css": "/vendors/css/select2.min.css?id=8e44c39add2364bdb469", "/vendors/js/select2.min.js": "/vendors/js/select2.min.js?id=0a96cf2d3a193019a91b", + "/vendors/css/bootstrap-combobox.css": "/vendors/css/bootstrap-combobox.css?id=f6a6add416aca5e75f21", + "/vendors/js/bootstrap-combobox.js": "/vendors/js/bootstrap-combobox.js?id=36f9331a05f0b943b74c", "/vendors/css/dropzone.min.css": "/vendors/css/dropzone.min.css?id=2f735dbf472afcd77604", "/vendors/css/dropzone-basic.min.css": "/vendors/css/dropzone-basic.min.css?id=960bcd6d5cb8351ac0d0", "/vendors/js/dropzone.min.js": "/vendors/js/dropzone.min.js?id=33148c7d5e055ea74714", diff --git a/resources/views/portal/default/profile/index.blade.php b/resources/views/portal/default/profile/index.blade.php index e13f941a3f2b..78afdef433cc 100644 --- a/resources/views/portal/default/profile/index.blade.php +++ b/resources/views/portal/default/profile/index.blade.php @@ -1,13 +1,23 @@ @extends('portal.default.layouts.master') - +@section('header') + @parent + +@stop @section('body')
-
- +
+ + {!! Former::framework('TwitterBootstrap4'); !!} + + {!! Former::horizontal_open() + ->id('update_contact') + ->route('client.profile.update', auth()->user()->hashed_id) + ->method('PUT'); !!} +
@@ -17,7 +27,7 @@
- @include('generic.dropzone') +
@@ -25,23 +35,77 @@
-
+
- {{ ctrans('texts.profile') }} + {{ ctrans('texts.client_information') }}
+ {!! Former::text('name')->placeholder( ctrans('texts.first_name'))->label('') !!} + {!! Former::text('phone')->placeholder( ctrans('texts.phone'))->label('') !!} + {!! Former::text('website')->placeholder( ctrans('texts.website'))->label('') !!} + + {!! Former::text('address1')->placeholder( ctrans('texts.address1'))->label('') !!} + {!! Former::text('address2')->placeholder( ctrans('texts.address2'))->label('') !!} + {!! Former::text('city')->placeholder( ctrans('texts.city'))->label('') !!} + {!! Former::text('state')->placeholder( ctrans('texts.state'))->label('') !!} + {!! Former::text('postal_code')->placeholder( ctrans('texts.postal_code'))->label('') !!} + + {!! Former::select('country_id') + ->addOption('','') + ->autocomplete('off') + ->label('') + ->fromQuery($countries, 'name', 'id') !!} + + {!! Former::text('shipping_address1')->placeholder( ctrans('texts.shipping_address1'))->label('') !!} + {!! Former::text('shipping_address2')->placeholder( ctrans('texts.shipping_address2'))->label('') !!} + {!! Former::text('shipping_city')->placeholder( ctrans('texts.shipping_city'))->label('') !!} + {!! Former::text('shipping_state')->placeholder( ctrans('texts.shipping_state'))->label('') !!} + {!! Former::text('shipping_postal_code')->placeholder( ctrans('texts.shipping_postal_code'))->label('') !!} + + {!! Former::select('shipping_country_id') + ->addOption('','') + ->autocomplete('off') + ->label('') + ->fromQuery($countries, 'name', 'id') !!} +
+
+ +
+ + {{ ctrans('texts.user_details') }} + +
+ +
+ + + {!! Former::text('first_name')->placeholder( ctrans('texts.first_name'))->label('') !!} + + {!! Former::text('last_name')->placeholder( ctrans('texts.last_name'))->label('') !!} + + {!! Former::text('email')->placeholder( ctrans('texts.email'))->label('') !!} + + {!! Former::text('phone')->placeholder( ctrans('texts.phone'))->label('') !!} + +
+ + +
+ + {!! Former::close() !!} +
@@ -50,13 +114,23 @@
@endsection +@push('scripts') + +@endpush @section('footer') + @endsection \ No newline at end of file diff --git a/resources/views/portal/default/sidebar.blade.php b/resources/views/portal/default/sidebar.blade.php index 7191b18f305e..8d2822fcc204 100644 --- a/resources/views/portal/default/sidebar.blade.php +++ b/resources/views/portal/default/sidebar.blade.php @@ -2,7 +2,7 @@