Skip to content

Commit

Permalink
Fixed todos with log message
Browse files Browse the repository at this point in the history
Signed-off-by: snipe <snipe@snipe.net>
  • Loading branch information
snipe committed Oct 21, 2024
1 parent ef9b6e3 commit 787e651
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ public function show($accessoryId = null, $fileId = null) : View | RedirectRespo
}
}

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

}

Expand Down
5 changes: 3 additions & 2 deletions app/Http/Controllers/Assets/AssetFilesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,11 @@ public function show($assetId = null, $fileId = null) : View | RedirectResponse

}

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'));

}

/**
Expand Down
1 change: 0 additions & 1 deletion app/Http/Controllers/Assets/AssetsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
use App\Models\Setting;
use App\Models\Statuslabel;
use App\Models\User;
use Illuminate\Support\Facades\Auth;
use App\View\Label;
use Carbon\Carbon;
use Illuminate\Support\Facades\DB;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ public function show($componentId = null, $fileId = null)
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'));

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,8 @@ public function show($consumableId = null, $fileId = null)
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'));

}

Expand Down
3 changes: 2 additions & 1 deletion app/Http/Controllers/Licenses/LicenseFilesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,8 @@ public function show($licenseId = null, $fileId = null, $download = true)
}
}

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

}

Expand Down
4 changes: 3 additions & 1 deletion app/Http/Controllers/Users/UserFilesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,9 @@ public function show($userId = null, $fileId = null)
}
}

// 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'));
}
Expand Down
1 change: 1 addition & 0 deletions resources/lang/en-US/general.php
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,7 @@
'alt_uploaded_image_thumbnail' => 'Uploaded thumbnail',
'placeholder_kit' => 'Select a kit',
'file_not_found' => 'File not found',
'log_record_not_found' => 'No record for that log entry was found.',
'preview_not_available' => '(no preview)',
'setup' => 'Setup',
'pre_flight' => 'Pre-Flight',
Expand Down

0 comments on commit 787e651

Please sign in to comment.