Merge pull request #14817 from snipe/fixes/hotfix_for_14815

Fixes #14815 - Fixed translation string
This commit is contained in:
snipe 2024-06-03 16:48:54 +01:00 committed by GitHub
commit 8f4ede7785
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View file

@ -244,7 +244,7 @@ class LocationsController extends Controller
if (! $location->isDeletable()) { if (! $location->isDeletable()) {
return response() return response()
->json(Helper::formatStandardApiResponse('error', null, trans('admin/companies/message.assoc_users'))); ->json(Helper::formatStandardApiResponse('error', null, trans('admin/locations/message.assoc_users')));
} }
$this->authorize('delete', $location); $this->authorize('delete', $location);
$location->delete(); $location->delete();

View file

@ -3,7 +3,7 @@
return array( return array(
'does_not_exist' => 'Location does not exist.', 'does_not_exist' => 'Location does not exist.',
'assoc_users' => 'This location is currently associated with at least one user and cannot be deleted. Please update your users to no longer reference this location and try again. ', 'assoc_users' => 'This location is not currently deletable because it is the location of record for at least one asset or user, has assets assigned to it, or is the parent location of another location. Please update your models to no longer reference this company and try again. ',
'assoc_assets' => 'This location is currently associated with at least one asset and cannot be deleted. Please update your assets to no longer reference this location and try again. ', 'assoc_assets' => 'This location is currently associated with at least one asset and cannot be deleted. Please update your assets to no longer reference this location and try again. ',
'assoc_child_loc' => 'This location is currently the parent of at least one child location and cannot be deleted. Please update your locations to no longer reference this location and try again. ', 'assoc_child_loc' => 'This location is currently the parent of at least one child location and cannot be deleted. Please update your locations to no longer reference this location and try again. ',
'assigned_assets' => 'Assigned Assets', 'assigned_assets' => 'Assigned Assets',