translations for messages

This commit is contained in:
slong753 2023-03-30 13:57:18 -05:00
parent 382d849ee1
commit 0f72554a9f
2 changed files with 4 additions and 2 deletions

View file

@ -335,13 +335,13 @@ class BulkAssetsController extends Controller
public function restore(Request $request) {
$assetIds = $request->get('ids');
if (empty($assetIds)) {
return redirect()->route('hardware.index')->with('error', 'No Assets Selected');
return redirect()->route('hardware.index')->with('error', trans('admin/hardware/message.restore.nothing_updated'));
} else {
foreach ($assetIds as $key => $assetId) {
$asset = Asset::withTrashed()->find($assetId);
$asset->restore();
}
return redirect()->route('hardware.index')->with('success', 'Assets Restored');
return redirect()->route('hardware.index')->with('success', trans('admin/hardware/message.restore.success'));
}
}
}

View file

@ -23,6 +23,8 @@ return [
'restore' => [
'error' => 'Asset was not restored, please try again',
'success' => 'Asset restored successfully.',
'bulk_success' => 'Asset restored successfully.',
'nothing_updated' => 'No assets were selected, so nothing was restored.',
],
'audit' => [