@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | Log::debug('Route '.Route::currentRouteName().' visited by User ID-'.Auth::user()->user_id); |
| 74 | 74 | Log::notice('New Customer ID-'.$request->custID.' created by User ID-'.Auth::user()->user_id); |
| 75 | 75 | |
| 76 | - return response()->json(['success' => true, 'cust_id' => $custData->cust_id ]); |
|
| 76 | + return response()->json(['success' => true, 'cust_id' => $custData->cust_id]); |
|
| 77 | 77 | } |
| 78 | 78 | |
| 79 | 79 | // Show the customer details |
@@ -142,7 +142,7 @@ discard block |
||
| 142 | 142 | |
| 143 | 143 | $parentsParent = Customers::find($request->parent_id); |
| 144 | 144 | |
| 145 | - if ($parentsParent->parent_id) |
|
| 145 | + if($parentsParent->parent_id) |
|
| 146 | 146 | { |
| 147 | 147 | $request->parent_id = $parentsParent->parent_id; |
| 148 | 148 | } |
@@ -70,7 +70,7 @@ |
||
| 70 | 70 | |
| 71 | 71 | // Determine if there is a parent site with shared contacts |
| 72 | 72 | $parent = Customers::find($id)->parent_id; |
| 73 | - if ($parent) |
|
| 73 | + if($parent) |
|
| 74 | 74 | { |
| 75 | 75 | $parentList = CustomerContacts::where('cust_id', $parent) |
| 76 | 76 | ->where('shared', 1) |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | |
| 30 | 30 | // Determine if the note should go to the customer, or its parent |
| 31 | 31 | $details = Customers::find($request->cust_id); |
| 32 | - if ($details->parent_id && $request->shared) { |
|
| 32 | + if($details->parent_id && $request->shared) { |
|
| 33 | 33 | $request->cust_id = $details->parent_id; |
| 34 | 34 | } |
| 35 | 35 | |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | |
| 56 | 56 | // Determine if there is a parent site with shared contacts |
| 57 | 57 | $parent = Customers::find($id)->parent_id; |
| 58 | - if ($parent) { |
|
| 58 | + if($parent) { |
|
| 59 | 59 | $parentList = CustomerNotes::where('cust_id', $parent)->orderBy('urgent', 'desc')->get(); |
| 60 | 60 | |
| 61 | 61 | $notes = $notes->merge($parentList); |
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | // Verify that the upload is valid and being processed |
| 37 | 37 | if($receiver->isUploaded() === false) |
| 38 | 38 | { |
| 39 | - Log::error('Upload File Missing - ' . |
|
| 39 | + Log::error('Upload File Missing - '. |
|
| 40 | 40 | /** @scrutinizer ignore-type */ |
| 41 | 41 | $request->toArray()); |
| 42 | 42 | throw new UploadMissingFileException(); |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | { |
| 51 | 51 | // Determine if the note should go to the customer, or its parent |
| 52 | 52 | $details = Customers::find($request->cust_id); |
| 53 | - if ($details->parent_id && $request->shared) |
|
| 53 | + if($details->parent_id && $request->shared) |
|
| 54 | 54 | { |
| 55 | 55 | $request->cust_id = $details->parent_id; |
| 56 | 56 | } |
@@ -110,7 +110,7 @@ discard block |
||
| 110 | 110 | |
| 111 | 111 | // Determine if there is a parent site with shared files |
| 112 | 112 | $parent = Customers::find($id)->parent_id; |
| 113 | - if ($parent) { |
|
| 113 | + if($parent) { |
|
| 114 | 114 | $parentList = Customerfiles::where('cust_id', $parent) |
| 115 | 115 | ->with('Files') |
| 116 | 116 | ->with('CustomerFileTypes') |
@@ -66,8 +66,8 @@ discard block |
||
| 66 | 66 | private function updatePhoneIcons() |
| 67 | 67 | { |
| 68 | 68 | $newIcons = [ |
| 69 | - ['description' => 'Home', 'icon_class' => 'fas fa-home'], |
|
| 70 | - ['description' => 'Work', 'icon_class' => 'fas fa-briefcase'], |
|
| 69 | + ['description' => 'Home', 'icon_class' => 'fas fa-home'], |
|
| 70 | + ['description' => 'Work', 'icon_class' => 'fas fa-briefcase'], |
|
| 71 | 71 | ['description' => 'Mobile', 'icon_class' => 'fas fa-mobile-alt'], |
| 72 | 72 | ]; |
| 73 | 73 | |
@@ -99,7 +99,7 @@ discard block |
||
| 99 | 99 | { |
| 100 | 100 | if(!Schema::hasColumn('users', 'role_id')) |
| 101 | 101 | { |
| 102 | - Schema::table('users', function (Blueprint $table) { |
|
| 102 | + Schema::table('users', function(Blueprint $table) { |
|
| 103 | 103 | $table->integer('role_id')->after('user_id')->unsigned()->default(4); |
| 104 | 104 | $table->foreign('role_id')->references('role_id')->on('user_role_descriptions')->onUpdate('cascade'); |
| 105 | 105 | }); |
@@ -326,8 +326,8 @@ discard block |
||
| 326 | 326 | // Add soft deletes to tech tips table to prevent accidental deletes |
| 327 | 327 | private function addSoftDeleteToTechTips() |
| 328 | 328 | { |
| 329 | - if (!Schema::hasColumn('tech_tips', 'deleted_at')) { |
|
| 330 | - Schema::table('tech_tips', function (Blueprint $table) { |
|
| 329 | + if(!Schema::hasColumn('tech_tips', 'deleted_at')) { |
|
| 330 | + Schema::table('tech_tips', function(Blueprint $table) { |
|
| 331 | 331 | $table->softDeletes()->after('description'); |
| 332 | 332 | }); |
| 333 | 333 | } |
@@ -345,7 +345,7 @@ discard block |
||
| 345 | 345 | // Migrate over all deactivated users |
| 346 | 346 | DB::update('UPDATE `users` SET `deleted_at` = "'.Carbon::now().'" WHERE `active` = 0'); |
| 347 | 347 | // Remove the Active column |
| 348 | - Schema::table('users', function (Blueprint $table) { |
|
| 348 | + Schema::table('users', function(Blueprint $table) { |
|
| 349 | 349 | $table->dropColumn('active'); |
| 350 | 350 | }); |
| 351 | 351 | } |
@@ -364,27 +364,27 @@ discard block |
||
| 364 | 364 | } |
| 365 | 365 | if(!Schema::hasColumn('customer_systems', 'shared')) |
| 366 | 366 | { |
| 367 | - Schema::table('customer_systems', function (Blueprint $table) |
|
| 367 | + Schema::table('customer_systems', function(Blueprint $table) |
|
| 368 | 368 | { |
| 369 | 369 | $table->boolean('shared')->default(0)->after('sys_id'); |
| 370 | 370 | }); |
| 371 | 371 | } |
| 372 | - if (!Schema::hasColumn('customer_contacts', 'shared')) |
|
| 372 | + if(!Schema::hasColumn('customer_contacts', 'shared')) |
|
| 373 | 373 | { |
| 374 | - Schema::table('customer_contacts', function (Blueprint $table) |
|
| 374 | + Schema::table('customer_contacts', function(Blueprint $table) |
|
| 375 | 375 | { |
| 376 | 376 | $table->boolean('shared')->default(0)->after('cust_id'); |
| 377 | 377 | }); |
| 378 | 378 | } |
| 379 | - if (!Schema::hasColumn('customer_notes', 'shared')) |
|
| 379 | + if(!Schema::hasColumn('customer_notes', 'shared')) |
|
| 380 | 380 | { |
| 381 | - Schema::table('customer_notes', function (Blueprint $table) |
|
| 381 | + Schema::table('customer_notes', function(Blueprint $table) |
|
| 382 | 382 | { |
| 383 | 383 | $table->boolean('shared')->default(0)->after('user_id'); |
| 384 | 384 | }); |
| 385 | 385 | } |
| 386 | - if (!Schema::hasColumn('customer_files', 'shared')) { |
|
| 387 | - Schema::table('customer_files', function (Blueprint $table) { |
|
| 386 | + if(!Schema::hasColumn('customer_files', 'shared')) { |
|
| 387 | + Schema::table('customer_files', function(Blueprint $table) { |
|
| 388 | 388 | $table->boolean('shared')->default(0)->after('user_id'); |
| 389 | 389 | }); |
| 390 | 390 | } |
@@ -8,8 +8,8 @@ discard block |
||
| 8 | 8 | /* |
| 9 | 9 | * Non user Routes |
| 10 | 10 | */ |
| 11 | -Route::get('/', 'Auth\LoginController@showLoginForm')->name('index'); |
|
| 12 | -Route::get('logout', 'Auth\LoginController@logout') ->name('logout'); |
|
| 11 | +Route::get('/', 'Auth\LoginController@showLoginForm')->name('index'); |
|
| 12 | +Route::get('logout', 'Auth\LoginController@logout') ->name('logout'); |
|
| 13 | 13 | Route::get('no-script', 'Controller@noScript') ->name('noscript'); |
| 14 | 14 | |
| 15 | 15 | |
@@ -21,53 +21,53 @@ discard block |
||
| 21 | 21 | /* |
| 22 | 22 | * Download File Routes |
| 23 | 23 | */ |
| 24 | -Route::get('download/{id}/{filename}', 'DownloadController@index') ->name('download'); |
|
| 24 | +Route::get('download/{id}/{filename}', 'DownloadController@index') ->name('download'); |
|
| 25 | 25 | Route::get('download-archive/{filename}', 'DownloadController@downloadArchive')->name('downloadArchive'); |
| 26 | -Route::put('download-archive', 'DownloadController@archiveFiles') ->name('archiveFiles'); |
|
| 26 | +Route::put('download-archive', 'DownloadController@archiveFiles') ->name('archiveFiles'); |
|
| 27 | 27 | |
| 28 | 28 | /* |
| 29 | 29 | * User Settings Routes |
| 30 | 30 | */ |
| 31 | -Route::get('account', 'AccountController@index') ->name('account'); |
|
| 32 | -Route::post('account', 'AccountController@submit') ->name('account'); |
|
| 33 | -Route::put('account', 'AccountController@notifications') ->name('account'); |
|
| 34 | -Route::get('/account/change-password', 'AccountController@changePassword')->name('changePassword'); |
|
| 31 | +Route::get('account', 'AccountController@index') ->name('account'); |
|
| 32 | +Route::post('account', 'AccountController@submit') ->name('account'); |
|
| 33 | +Route::put('account', 'AccountController@notifications') ->name('account'); |
|
| 34 | +Route::get('/account/change-password', 'AccountController@changePassword')->name('changePassword'); |
|
| 35 | 35 | Route::post('/account/change-password', 'AccountController@submitPassword')->name('changePassword'); |
| 36 | 36 | |
| 37 | 37 | /* |
| 38 | 38 | * Basic Logged In Routes |
| 39 | 39 | */ |
| 40 | -Route::get('about', 'DashboardController@about') ->name('about'); |
|
| 41 | -Route::get('dashboard', 'DashboardController@index') ->name('dashboard'); |
|
| 42 | -Route::get('notifications', 'DashboardController@getNotifications')->name('getNotifications'); |
|
| 40 | +Route::get('about', 'DashboardController@about') ->name('about'); |
|
| 41 | +Route::get('dashboard', 'DashboardController@index') ->name('dashboard'); |
|
| 42 | +Route::get('notifications', 'DashboardController@getNotifications')->name('getNotifications'); |
|
| 43 | 43 | Route::get('mark-notification/{id}', 'DashboardController@markNotification')->name('markNotification'); |
| 44 | -Route::delete('notifications/{id}', 'DashboardController@delNotification') ->name('delNotification'); |
|
| 44 | +Route::delete('notifications/{id}', 'DashboardController@delNotification') ->name('delNotification'); |
|
| 45 | 45 | |
| 46 | 46 | /* |
| 47 | 47 | * File Link Routes |
| 48 | 48 | */ |
| 49 | -Route::prefix('links')->name('links.')->group(function () |
|
| 49 | +Route::prefix('links')->name('links.')->group(function() |
|
| 50 | 50 | { |
| 51 | 51 | // Resource controllers for base access |
| 52 | - Route::resource('data', 'FileLinks\FileLinksController'); |
|
| 53 | - Route::get('new', 'FileLinks\FileLinksController@create') ->name('new'); |
|
| 54 | - Route::get('find/{id}', 'FileLinks\FileLinksController@find') ->name('user'); |
|
| 52 | + Route::resource('data', 'FileLinks\FileLinksController'); |
|
| 53 | + Route::get('new', 'FileLinks\FileLinksController@create') ->name('new'); |
|
| 54 | + Route::get('find/{id}', 'FileLinks\FileLinksController@find') ->name('user'); |
|
| 55 | 55 | Route::get('details/{id}/{name}', 'FileLinks\FileLinksController@details') ->name('details'); |
| 56 | - Route::get('disable/{id}', 'FileLinks\FileLinksController@disableLink')->name('disable'); |
|
| 56 | + Route::get('disable/{id}', 'FileLinks\FileLinksController@disableLink')->name('disable'); |
|
| 57 | 57 | // File Link Files |
| 58 | - Route::resource('files', 'FileLinks\LinkFilesController'); |
|
| 58 | + Route::resource('files', 'FileLinks\LinkFilesController'); |
|
| 59 | 59 | // Index landing page |
| 60 | - Route::get('/', 'FileLinks\FileLinksController@index') ->name('index'); |
|
| 60 | + Route::get('/', 'FileLinks\FileLinksController@index') ->name('index'); |
|
| 61 | 61 | }); |
| 62 | 62 | |
| 63 | 63 | /* |
| 64 | 64 | * Guest File Link Routes |
| 65 | 65 | */ |
| 66 | 66 | Route::get('file-links/{id}/get-files', 'FileLinks\GuestLinksController@getFiles')->name('file-links.getFiles'); |
| 67 | -Route::put('file-links/{id}', 'FileLinks\GuestLinksController@notify') ->name('file-links.show'); |
|
| 68 | -Route::post('file-links/{id}', 'FileLinks\GuestLinksController@update') ->name('file-links.show'); |
|
| 69 | -Route::get('file-links/{id}', 'FileLinks\GuestLinksController@show') ->name('file-links.show'); |
|
| 70 | -Route::get('file-links', 'FileLinks\GuestLinksController@index') ->name('file-links.index'); |
|
| 67 | +Route::put('file-links/{id}', 'FileLinks\GuestLinksController@notify') ->name('file-links.show'); |
|
| 68 | +Route::post('file-links/{id}', 'FileLinks\GuestLinksController@update') ->name('file-links.show'); |
|
| 69 | +Route::get('file-links/{id}', 'FileLinks\GuestLinksController@show') ->name('file-links.show'); |
|
| 70 | +Route::get('file-links', 'FileLinks\GuestLinksController@index') ->name('file-links.index'); |
|
| 71 | 71 | |
| 72 | 72 | /* |
| 73 | 73 | * Customer Routes |
@@ -75,46 +75,46 @@ discard block |
||
| 75 | 75 | Route::prefix('customer')->name('customer.')->group(function() |
| 76 | 76 | { |
| 77 | 77 | // Customer Files |
| 78 | - Route::resource('files', 'Customers\CustomerFilesController'); |
|
| 78 | + Route::resource('files', 'Customers\CustomerFilesController'); |
|
| 79 | 79 | // Custome Notes |
| 80 | - Route::get('download-note/{id}', 'DownloadController@downloadCustNote') ->name('download-note'); |
|
| 81 | - Route::resource('notes', 'Customers\CustomerNotesController'); |
|
| 80 | + Route::get('download-note/{id}', 'DownloadController@downloadCustNote') ->name('download-note'); |
|
| 81 | + Route::resource('notes', 'Customers\CustomerNotesController'); |
|
| 82 | 82 | // Customer Contacts |
| 83 | - Route::resource('contacts', 'Customers\CustomerContactsController'); |
|
| 83 | + Route::resource('contacts', 'Customers\CustomerContactsController'); |
|
| 84 | 84 | // Customer Systems |
| 85 | - Route::resource('systems', 'Customers\CustomerSystemsController'); |
|
| 85 | + Route::resource('systems', 'Customers\CustomerSystemsController'); |
|
| 86 | 86 | // Customer Details |
| 87 | - Route::get('link-parent/{id}', 'Customers\CustomerDetailsController@removeParent')->name('removeParent'); |
|
| 88 | - Route::post('link-parent', 'Customers\CustomerDetailsController@linkParent') ->name('linkParent'); |
|
| 89 | - Route::get('id/{id}/{name}', 'Customers\CustomerDetailsController@details') ->name('details'); |
|
| 90 | - Route::resource('id', 'Customers\CustomerDetailsController'); |
|
| 87 | + Route::get('link-parent/{id}', 'Customers\CustomerDetailsController@removeParent')->name('removeParent'); |
|
| 88 | + Route::post('link-parent', 'Customers\CustomerDetailsController@linkParent') ->name('linkParent'); |
|
| 89 | + Route::get('id/{id}/{name}', 'Customers\CustomerDetailsController@details') ->name('details'); |
|
| 90 | + Route::resource('id', 'Customers\CustomerDetailsController'); |
|
| 91 | 91 | // check Id and bookmark customer |
| 92 | 92 | Route::get('toggle-fav/{action}/{custID}', 'Customers\CustomerController@toggleFav') ->name('toggle-fav'); |
| 93 | - Route::get('check-id/{id}', 'Customers\CustomerController@checkID') ->name('check-id'); |
|
| 93 | + Route::get('check-id/{id}', 'Customers\CustomerController@checkID') ->name('check-id'); |
|
| 94 | 94 | // Index landing/search page |
| 95 | - Route::get('search', 'Customers\CustomerController@search') ->name('search'); |
|
| 96 | - Route::get('/', 'Customers\CustomerController@index') ->name('index'); |
|
| 95 | + Route::get('search', 'Customers\CustomerController@search') ->name('search'); |
|
| 96 | + Route::get('/', 'Customers\CustomerController@index') ->name('index'); |
|
| 97 | 97 | }); |
| 98 | 98 | |
| 99 | 99 | /* |
| 100 | 100 | * Tech Tip Routes |
| 101 | 101 | */ |
| 102 | -Route::resource('tips', 'TechTips\TechTipsController'); |
|
| 103 | -Route::post('submit-edit/{id}', 'TechTips\TechTipsController@update') ->name('tips.submit-edit'); |
|
| 102 | +Route::resource('tips', 'TechTips\TechTipsController'); |
|
| 103 | +Route::post('submit-edit/{id}', 'TechTips\TechTipsController@update') ->name('tips.submit-edit'); |
|
| 104 | 104 | Route::prefix('tip')->name('tip.')->group(function() |
| 105 | 105 | { |
| 106 | - Route::resource('comments', 'TechTips\TechTipCommentsController'); |
|
| 107 | - Route::get('search', 'TechTips\TechTipsController@search') ->name('search'); |
|
| 108 | - Route::get('details/{id}/{name}', 'TechTips\TechTipsController@details') ->name('details'); |
|
| 109 | - Route::post('process-image', 'TechTips\TechTipsController@processImage')->name('processImage'); |
|
| 106 | + Route::resource('comments', 'TechTips\TechTipCommentsController'); |
|
| 107 | + Route::get('search', 'TechTips\TechTipsController@search') ->name('search'); |
|
| 108 | + Route::get('details/{id}/{name}', 'TechTips\TechTipsController@details') ->name('details'); |
|
| 109 | + Route::post('process-image', 'TechTips\TechTipsController@processImage')->name('processImage'); |
|
| 110 | 110 | Route::get('toggle-fav/{action}/{tipID}', 'TechTips\TechTipsController@toggleFav') ->name('toggle-fav'); |
| 111 | - Route::get('download-tip/{id}', 'DownloadController@downloadTechTip') ->name('downloadTip'); |
|
| 111 | + Route::get('download-tip/{id}', 'DownloadController@downloadTechTip') ->name('downloadTip'); |
|
| 112 | 112 | }); |
| 113 | 113 | |
| 114 | 114 | /* |
| 115 | 115 | * Administration Routes |
| 116 | 116 | */ |
| 117 | -Route::prefix('admin')->name('admin.')->group(function () |
|
| 117 | +Route::prefix('admin')->name('admin.')->group(function() |
|
| 118 | 118 | { |
| 119 | 119 | |
| 120 | 120 | |
@@ -137,26 +137,26 @@ discard block |
||
| 137 | 137 | |
| 138 | 138 | // Administrative routes for equipment and equipment categories |
| 139 | 139 | Route::resource('categories', 'Installer\CategoriesController'); |
| 140 | - Route::resource('systems', 'Installer\SystemsController'); |
|
| 140 | + Route::resource('systems', 'Installer\SystemsController'); |
|
| 141 | 141 | |
| 142 | 142 | |
| 143 | 143 | |
| 144 | 144 | // Administrative routes for users |
| 145 | - Route::resource('user', 'Admin\UserController'); |
|
| 146 | - Route::get('user/enable/{id}', 'Admin\UserController@reactivateUser') ->name('user.reactivate'); |
|
| 147 | - Route::post('user/change-password', 'Admin\UserController@submitPassword') ->name('user.changePassword'); |
|
| 145 | + Route::resource('user', 'Admin\UserController'); |
|
| 146 | + Route::get('user/enable/{id}', 'Admin\UserController@reactivateUser') ->name('user.reactivate'); |
|
| 147 | + Route::post('user/change-password', 'Admin\UserController@submitPassword') ->name('user.changePassword'); |
|
| 148 | 148 | Route::get('check-user/{name}/{type}', 'Admin\UserController@checkUser') ->name('checkUser'); |
| 149 | - Route::get('links/show/{id}', 'Admin\AdminController@showLinks') ->name('user.showLinks'); |
|
| 150 | - Route::get('links', 'Admin\AdminController@userLinks') ->name('user.links'); |
|
| 151 | - Route::post('password-policy', 'Admin\AdminController@submitPolicy') ->name('passwordPolicy'); |
|
| 152 | - Route::get('password-policy', 'Admin\AdminController@passwordPolicy') ->name('passwordPolicy'); |
|
| 153 | - Route::post('role-policy', 'Admin\AdminController@submitRoleSettings') ->name('roleSettings'); |
|
| 154 | - Route::get('role-policy', 'Admin\AdminController@roleSettings') ->name('roleSettings'); |
|
| 149 | + Route::get('links/show/{id}', 'Admin\AdminController@showLinks') ->name('user.showLinks'); |
|
| 150 | + Route::get('links', 'Admin\AdminController@userLinks') ->name('user.links'); |
|
| 151 | + Route::post('password-policy', 'Admin\AdminController@submitPolicy') ->name('passwordPolicy'); |
|
| 152 | + Route::get('password-policy', 'Admin\AdminController@passwordPolicy') ->name('passwordPolicy'); |
|
| 153 | + Route::post('role-policy', 'Admin\AdminController@submitRoleSettings') ->name('roleSettings'); |
|
| 154 | + Route::get('role-policy', 'Admin\AdminController@roleSettings') ->name('roleSettings'); |
|
| 155 | 155 | // Tech Benc Settings Routes |
| 156 | - Route::post('logo', 'Installer\SettingsController@submitLogo') ->name('submitLogo'); |
|
| 157 | - Route::get('logo', 'Installer\SettingsController@logoSettings') ->name('logoSettings'); |
|
| 158 | - Route::post('configuratin', 'Installer\SettingsController@submitConfiguration')->name('submitConfig'); |
|
| 159 | - Route::get('configuration', 'Installer\SettingsController@configuration') ->name('config'); |
|
| 156 | + Route::post('logo', 'Installer\SettingsController@submitLogo') ->name('submitLogo'); |
|
| 157 | + Route::get('logo', 'Installer\SettingsController@logoSettings') ->name('logoSettings'); |
|
| 158 | + Route::post('configuratin', 'Installer\SettingsController@submitConfiguration')->name('submitConfig'); |
|
| 159 | + Route::get('configuration', 'Installer\SettingsController@configuration') ->name('config'); |
|
| 160 | 160 | |
| 161 | 161 | Route::post('email-settings', 'Installer\SettingsController@submitEmailSettings') ->name('emailSettings'); |
| 162 | 162 | Route::put('email-settings', 'Installer\SettingsController@sendTestEmail') ->name('emailSettings'); |