mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-12 16:44:08 -08:00
Merge pull request #12182 from akemidx/translate_inventory_notification
Fixed #12119 - updated user inventory language to use strings
This commit is contained in:
commit
8bf01715a9
|
@ -492,7 +492,7 @@ class UsersController extends Controller
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Notify a specific user via email with all of his assigned assets.
|
* Notify a specific user via email with all of their assigned assets.
|
||||||
*
|
*
|
||||||
* @author [Lukas Fehling] [<lukas.fehling@adabay.rocks>]
|
* @author [Lukas Fehling] [<lukas.fehling@adabay.rocks>]
|
||||||
* @since [v6.0.13]
|
* @since [v6.0.13]
|
||||||
|
@ -505,22 +505,11 @@ class UsersController extends Controller
|
||||||
$user = User::findOrFail($id);
|
$user = User::findOrFail($id);
|
||||||
|
|
||||||
if (empty($user->email)) {
|
if (empty($user->email)) {
|
||||||
return response()->json(
|
return response()->json(Helper::formatStandardApiResponse(‘error’, null, trans('admin/users/message.inventorynotification.error')));
|
||||||
[
|
|
||||||
'status' => 'error',
|
|
||||||
'message' => 'This user has no email set.',
|
|
||||||
'payload' => null,
|
|
||||||
], 404);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$user->notify((new CurrentInventory($user)));
|
return response()->Helper::formatStandardApiResponse('success', null, trans('admin/users/message.inventorynotification.success'));
|
||||||
|
|
||||||
return response()->json(
|
|
||||||
[
|
|
||||||
'status' => 'success',
|
|
||||||
'message' => 'The user was notified about his current inventory.',
|
|
||||||
'payload' => null,
|
|
||||||
], 200);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -31,7 +31,8 @@ return array(
|
||||||
'error' => 'Accessory was not checked in, please try again',
|
'error' => 'Accessory was not checked in, please try again',
|
||||||
'success' => 'Accessory checked in successfully.',
|
'success' => 'Accessory checked in successfully.',
|
||||||
'user_does_not_exist' => 'That user is invalid. Please try again.'
|
'user_does_not_exist' => 'That user is invalid. Please try again.'
|
||||||
)
|
),
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
|
@ -59,4 +59,8 @@ return array(
|
||||||
'invalidfiles' => 'One or more of your files is too large or is a filetype that is not allowed. Allowed filetypes are png, gif, jpg, doc, docx, pdf, and txt.',
|
'invalidfiles' => 'One or more of your files is too large or is a filetype that is not allowed. Allowed filetypes are png, gif, jpg, doc, docx, pdf, and txt.',
|
||||||
),
|
),
|
||||||
|
|
||||||
|
'inventorynotification' => array(
|
||||||
|
'error' => 'This user has no email set.',
|
||||||
|
'success' => 'The user has been notified about their current inventory.'
|
||||||
|
)
|
||||||
);
|
);
|
Loading…
Reference in a new issue