Fixed todos with log message

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2024-10-21 16:52:21 +01:00
parent ef9b6e3b07
commit 787e651778
8 changed files with 13 additions and 8 deletions

View file

@ -125,7 +125,7 @@ class AccessoriesFilesController extends Controller
} }
} }
// todo return redirect()->route('accessories.show', ['accessory' => $accessory])->with('error', trans('general.log_record_not_found'));
} }

View file

@ -80,10 +80,11 @@ class AssetFilesController extends Controller
} }
return redirect()->back()->with('error', trans('general.file_not_found_redirect')); return redirect()->route('hardware.show', ['hardware' => $asset])->with('error', trans('general.log_record_not_found'));
} }
return redirect()->route('hardware.index')->with('error', trans('admin/hardware/message.does_not_exist'));
} }
/** /**

View file

@ -17,7 +17,6 @@ use App\Models\Location;
use App\Models\Setting; use App\Models\Setting;
use App\Models\Statuslabel; use App\Models\Statuslabel;
use App\Models\User; use App\Models\User;
use Illuminate\Support\Facades\Auth;
use App\View\Label; use App\View\Label;
use Carbon\Carbon; use Carbon\Carbon;
use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\DB;

View file

@ -129,7 +129,7 @@ class ComponentsFilesController extends Controller
return redirect()->route('components.show', ['component' => $component])->with('error', trans('general.file_not_found')); return redirect()->route('components.show', ['component' => $component])->with('error', trans('general.file_not_found'));
} }
} }
// todo return redirect()->route('components.show', ['component' => $component])->with('error', trans('general.log_record_not_found'));
} }

View file

@ -124,7 +124,8 @@ class ConsumablesFilesController extends Controller
return redirect()->route('consumables.show', ['consumable' => $consumable])->with('error', trans('general.file_not_found')); return redirect()->route('consumables.show', ['consumable' => $consumable])->with('error', trans('general.file_not_found'));
} }
} }
// todo // The log record doesn't exist somehow
return redirect()->route('consumables.show', ['consumable' => $consumable])->with('error', trans('general.log_record_not_found'));
} }

View file

@ -122,7 +122,8 @@ class LicenseFilesController extends Controller
} }
} }
// todo // The log record doesn't exist somehow
return redirect()->route('licenses.show', ['licenses' => $license])->with('error', trans('general.log_record_not_found'));
} }

View file

@ -132,7 +132,9 @@ class UserFilesController extends Controller
} }
} }
// todo // The log record doesn't exist somehow
return redirect()->route('users.show', ['user' => $user])->with('error', trans('general.log_record_not_found'));
return redirect()->back()->with('error', trans('general.file_not_found')); return redirect()->back()->with('error', trans('general.file_not_found'));
} }

View file

@ -434,6 +434,7 @@ return [
'alt_uploaded_image_thumbnail' => 'Uploaded thumbnail', 'alt_uploaded_image_thumbnail' => 'Uploaded thumbnail',
'placeholder_kit' => 'Select a kit', 'placeholder_kit' => 'Select a kit',
'file_not_found' => 'File not found', 'file_not_found' => 'File not found',
'log_record_not_found' => 'No record for that log entry was found.',
'preview_not_available' => '(no preview)', 'preview_not_available' => '(no preview)',
'setup' => 'Setup', 'setup' => 'Setup',
'pre_flight' => 'Pre-Flight', 'pre_flight' => 'Pre-Flight',