Skip to content

Commit

Permalink
Remove more dead code.
Browse files Browse the repository at this point in the history
  • Loading branch information
edwh committed Jan 5, 2022
1 parent f96d617 commit bd3f788
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 290 deletions.
1 change: 0 additions & 1 deletion app/Helpers/Fixometer.php
Original file line number Diff line number Diff line change
Expand Up @@ -966,7 +966,6 @@ public static function notificationClasses($modal)

$device_array = [
'NotifyAdminNoDevices',
'ReviewNotes',
'AdminAbnormalDevices',
];

Expand Down
35 changes: 0 additions & 35 deletions app/Http/Controllers/DeviceController.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
use App\Group;
use App\Helpers\Fixometer;
use App\Notifications\AdminAbnormalDevices;
use App\Notifications\ReviewNotes;
use App\Party;
use App\User;
use App\UserGroups;
Expand Down Expand Up @@ -95,19 +94,6 @@ public function edit($id)
$wiki = 0;
}

//Send Wiki Notification to Admins
if (env('APP_ENV') != 'development' && env('APP_ENV') != 'local' && ($wiki == 1 && $old_wiki !== 1)) {
$all_admins = User::where('role', 2)->get();
$group_id = Party::find($data['event'])->group;

$arr = [
'group_url' => url('/group/view/'.$group_id),
'preferences' => url('/profile/edit'),
];

Notification::send($all_admins, new ReviewNotes($arr));
}

if (! isset($data['repair_more']) || empty($data['repair_more'])) { //Override
$data['repair_more'] = 0;
}
Expand Down Expand Up @@ -394,27 +380,6 @@ public function ajaxEdit(Request $request, $id)

$old_wiki = Device::find($id)->wiki;

//Send Wiki Notification to Admins
try {
if ($wiki == 1 && $old_wiki !== 1) {
$currentUser = Auth::user();

$all_admins = User::where('role', 2)->get();
$group_id = Party::find($event_id)->group;

$arr = [
'device_url' => url('/device/page-edit/'.$id),
'current_user_name' => $currentUser->name,
'group_url' => url('/group/view/'.$group_id),
'preferences' => url('/profile/edit'),
];

Notification::send($all_admins, new ReviewNotes($arr));
}
} catch (\Exception $ex) {
Log::error('An error occurred while sending ReviewNotes email: '.$ex->getMessage());
}

if ($spare_parts == 3) { // Third party
$spare_parts = 1;
$parts_provider = 2;
Expand Down
76 changes: 0 additions & 76 deletions app/Notifications/ReviewNotes.php

This file was deleted.

140 changes: 0 additions & 140 deletions resources/views/fixometer/device-row-collapse.blade.php

This file was deleted.

36 changes: 0 additions & 36 deletions resources/views/fixometer/device-row-with-edit.blade.php

This file was deleted.

2 changes: 0 additions & 2 deletions routes/web.php
Original file line number Diff line number Diff line change
Expand Up @@ -225,8 +225,6 @@
return redirect('/fixometer');
});
Route::get('/search', 'DeviceController@search');
Route::get('/page-edit/{id}', 'DeviceController@edit');
Route::post('/page-edit/{id}', 'DeviceController@edit');
Route::post('/edit/{id}', 'DeviceController@ajaxEdit');
Route::post('/create', 'DeviceController@ajaxCreate');
Route::get('/delete/{id}', 'DeviceController@delete');
Expand Down

0 comments on commit bd3f788

Please sign in to comment.