Use existing translation string

This commit is contained in:
Marcus Moore 2025-03-05 16:10:36 -08:00
parent f038254038
commit d1683d1c65
No known key found for this signature in database
3 changed files with 2 additions and 3 deletions

View file

@ -192,7 +192,7 @@ class AccessoriesController extends Controller
if ($accessory->checkouts_count > 0) {
return redirect()->route('accessories.index')->with('error', trans('admin/accessories/message.assoc_checkouts', ['count' => $accessory->checkouts_count]));
return redirect()->route('accessories.index')->with('error', trans('admin/accessories/general.delete_disabled'));
}
if ($accessory->image) {

View file

@ -253,7 +253,7 @@ class AccessoriesController extends Controller
$this->authorize($accessory);
if ($accessory->checkouts_count > 0) {
return response()->json(Helper::formatStandardApiResponse('error', null, trans('admin/accessories/message.assoc_checkouts', ['count' => $accessory->checkouts_count])));
return response()->json(Helper::formatStandardApiResponse('error', null, trans('admin/accessories/general.delete_disabled')));
}
$accessory->delete();

View file

@ -5,7 +5,6 @@ return array(
'does_not_exist' => 'The accessory [:id] does not exist.',
'not_found' => 'That accessory was not found.',
'assoc_users' => 'This accessory currently has :count items checked out to users. Please check in the accessories and and try again. ',
'assoc_checkouts' => 'This accessory currently has :count items checked out. Please check in the accessories and and try again.',
'create' => array(
'error' => 'The accessory was not created, please try again.',