Skip to content

Commit 787e651

Browse files
committed
Fixed todos with log message
Signed-off-by: snipe <[email protected]>
1 parent ef9b6e3 commit 787e651

File tree

8 files changed

+13
-8
lines changed

8 files changed

+13
-8
lines changed

app/Http/Controllers/Accessories/AccessoriesFilesController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ public function show($accessoryId = null, $fileId = null) : View | RedirectRespo
125125
}
126126
}
127127

128-
// todo
128+
return redirect()->route('accessories.show', ['accessory' => $accessory])->with('error', trans('general.log_record_not_found'));
129129

130130
}
131131

app/Http/Controllers/Assets/AssetFilesController.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,11 @@ public function show($assetId = null, $fileId = null) : View | RedirectResponse
8080

8181
}
8282

83-
return redirect()->back()->with('error', trans('general.file_not_found_redirect'));
84-
83+
return redirect()->route('hardware.show', ['hardware' => $asset])->with('error', trans('general.log_record_not_found'));
8584
}
8685

86+
return redirect()->route('hardware.index')->with('error', trans('admin/hardware/message.does_not_exist'));
87+
8788
}
8889

8990
/**

app/Http/Controllers/Assets/AssetsController.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
use App\Models\Setting;
1818
use App\Models\Statuslabel;
1919
use App\Models\User;
20-
use Illuminate\Support\Facades\Auth;
2120
use App\View\Label;
2221
use Carbon\Carbon;
2322
use Illuminate\Support\Facades\DB;

app/Http/Controllers/Components/ComponentsFilesController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ public function show($componentId = null, $fileId = null)
129129
return redirect()->route('components.show', ['component' => $component])->with('error', trans('general.file_not_found'));
130130
}
131131
}
132-
// todo
132+
return redirect()->route('components.show', ['component' => $component])->with('error', trans('general.log_record_not_found'));
133133

134134
}
135135

app/Http/Controllers/Consumables/ConsumablesFilesController.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,8 @@ public function show($consumableId = null, $fileId = null)
124124
return redirect()->route('consumables.show', ['consumable' => $consumable])->with('error', trans('general.file_not_found'));
125125
}
126126
}
127-
// todo
127+
// The log record doesn't exist somehow
128+
return redirect()->route('consumables.show', ['consumable' => $consumable])->with('error', trans('general.log_record_not_found'));
128129

129130
}
130131

app/Http/Controllers/Licenses/LicenseFilesController.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,8 @@ public function show($licenseId = null, $fileId = null, $download = true)
122122
}
123123
}
124124

125-
// todo
125+
// The log record doesn't exist somehow
126+
return redirect()->route('licenses.show', ['licenses' => $license])->with('error', trans('general.log_record_not_found'));
126127

127128
}
128129

app/Http/Controllers/Users/UserFilesController.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,9 @@ public function show($userId = null, $fileId = null)
132132
}
133133
}
134134

135-
// todo
135+
// The log record doesn't exist somehow
136+
return redirect()->route('users.show', ['user' => $user])->with('error', trans('general.log_record_not_found'));
137+
136138

137139
return redirect()->back()->with('error', trans('general.file_not_found'));
138140
}

resources/lang/en-US/general.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -434,6 +434,7 @@
434434
'alt_uploaded_image_thumbnail' => 'Uploaded thumbnail',
435435
'placeholder_kit' => 'Select a kit',
436436
'file_not_found' => 'File not found',
437+
'log_record_not_found' => 'No record for that log entry was found.',
437438
'preview_not_available' => '(no preview)',
438439
'setup' => 'Setup',
439440
'pre_flight' => 'Pre-Flight',

0 commit comments

Comments
 (0)