mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 05:34:06 -08:00
Fixes #4230 - adds model name and manufacturer to emails
This commit is contained in:
parent
e9c3d6bfb7
commit
b46cbac911
|
@ -518,6 +518,9 @@ class AssetsController extends Controller
|
|||
$data['item_tag'] = $asset->asset_tag;
|
||||
$data['item_serial'] = $asset->serial;
|
||||
$data['note'] = $logaction->note;
|
||||
$data['manufacturer_name'] = $asset->model->manufacturer->name;
|
||||
$data['model_name'] = $asset->model->name;
|
||||
$data['model_number'] = $asset->model->model_number;
|
||||
|
||||
if ((($asset->checkin_email()=='1')) && (isset($user)) && (!config('app.lock_passwords'))) {
|
||||
Mail::send('emails.checkin-asset', $data, function ($m) use ($user) {
|
||||
|
|
|
@ -558,6 +558,9 @@ class AssetsController extends Controller
|
|||
$data['item_tag'] = $asset->asset_tag;
|
||||
$data['item_serial'] = $asset->serial;
|
||||
$data['note'] = $logaction->note;
|
||||
$data['manufacturer_name'] = $asset->model->manufacturer->name;
|
||||
$data['model_name'] = $asset->model->name;
|
||||
$data['model_number'] = $asset->model->model_number;
|
||||
|
||||
if ((($asset->checkin_email()=='1')) && (isset($user)) && (!empty($user->email)) && (!config('app.lock_passwords'))) {
|
||||
Mail::send('emails.checkin-asset', $data, function ($m) use ($user) {
|
||||
|
|
|
@ -99,6 +99,9 @@ class CheckoutNotification extends Notification
|
|||
'item_serial' => $item->serial,
|
||||
'require_acceptance' => method_exists($item, 'requireAcceptance') ? $item->requireAcceptance() : '',
|
||||
'log_id' => $this->params['log_id'],
|
||||
'manufacturer_name' => $item->model->manufacturer->name,
|
||||
'model_name' => $item->model->name,
|
||||
'model_number' => $item->model->model_number,
|
||||
];
|
||||
|
||||
if ((method_exists($item, 'requireAcceptance') && ($item->requireAcceptance() == '1'))
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
'all' => 'All',
|
||||
'archived' => 'Archived',
|
||||
'asset_models' => 'Asset Models',
|
||||
'asset_model' => 'Model',
|
||||
'asset' => 'Asset',
|
||||
'asset_report' => 'Asset Report',
|
||||
'asset_tag' => 'Asset Tag',
|
||||
|
|
|
@ -57,5 +57,5 @@
|
|||
<p><strong><a href="{{ url('/') }}/account/accept-asset/{{ $log_id }}">{{ trans('mail.i_have_read') }}</a></strong></p>
|
||||
@endif
|
||||
|
||||
<p>{{ $snipeSettings->site_name }}</p>
|
||||
<p><a href="{{ url('/') }}">{{ $snipeSettings->site_name }}</a></p>
|
||||
@stop
|
||||
|
|
|
@ -25,6 +25,36 @@
|
|||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
@if (isset($manufacturer_name))
|
||||
<tr>
|
||||
<td>
|
||||
{{ trans('general.manufacturer') }}
|
||||
</td>
|
||||
<td>
|
||||
<strong>{{ $manufacturer_name }}</strong>
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
@if (isset($model_name))
|
||||
<tr>
|
||||
<td>
|
||||
{{ trans('general.model_no') }}:
|
||||
</td>
|
||||
<td>
|
||||
<strong>{{ $model_name }}</strong>
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
@if (isset($model_number))
|
||||
<tr>
|
||||
<td>
|
||||
{{ trans('general.asset_model') }}:
|
||||
</td>
|
||||
<td>
|
||||
<strong>{{ $model_number }}</strong>
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
@if (isset($item_serial))
|
||||
<tr>
|
||||
<td>
|
||||
|
@ -87,5 +117,5 @@
|
|||
<p><strong><a href="{{ url('/') }}/account/accept-asset/{{ $log_id }}">{{ trans('mail.i_have_read') }}</a></strong></p>
|
||||
@endif
|
||||
|
||||
<p>{{ $snipeSettings->site_name }}</p>
|
||||
<p><a href="{{ url('/') }}">{{ $snipeSettings->site_name }}</a></p>
|
||||
@stop
|
||||
|
|
|
@ -9,4 +9,5 @@
|
|||
{{ trans('mail.canceled') }} {{ $requested_date }}
|
||||
</p>
|
||||
|
||||
<p><a href="{{ url('/') }}">{{ $snipeSettings->site_name }}</a></p>
|
||||
@stop
|
||||
|
|
|
@ -11,4 +11,5 @@
|
|||
{{ trans('mail.quantity') }} {{ $item_quantity}}
|
||||
@endif
|
||||
|
||||
<p><a href="{{ url('/') }}">{{ $snipeSettings->site_name }}</a></p>
|
||||
@stop
|
||||
|
|
|
@ -25,6 +25,36 @@
|
|||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
@if (isset($manufacturer_name))
|
||||
<tr>
|
||||
<td style="background-color:#ccc">
|
||||
{{ trans('general.manufacturer') }}
|
||||
</td>
|
||||
<td>
|
||||
<strong>{{ $manufacturer_name }}</strong>
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
@if (isset($model_name))
|
||||
<tr>
|
||||
<td style="background-color:#ccc">
|
||||
{{ trans('general.model_no') }}:
|
||||
</td>
|
||||
<td>
|
||||
<strong>{{ $model_name }}</strong>
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
@if (isset($model_number))
|
||||
<tr>
|
||||
<td style="background-color:#ccc">
|
||||
{{ trans('general.asset_model') }}:
|
||||
</td>
|
||||
<td>
|
||||
<strong>{{ $model_number }}</strong>
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
<tr>
|
||||
<td style="background-color:#ccc">
|
||||
{{ trans('mail.checkin_date') }}
|
||||
|
@ -45,5 +75,5 @@
|
|||
@endif
|
||||
</table>
|
||||
|
||||
<p>{{ $snipeSettings->site_name }}</p>
|
||||
<p><a href="{{ url('/') }}">{{ $snipeSettings->site_name }}</a></p>
|
||||
@stop
|
||||
|
|
|
@ -17,5 +17,5 @@
|
|||
{!! $email_content !!}
|
||||
</table>
|
||||
|
||||
|
||||
<p><a href="{{ url('/') }}">{{ $snipeSettings->site_name }}</a></p>
|
||||
@stop
|
||||
|
|
|
@ -14,5 +14,5 @@
|
|||
{!! $email_content !!}
|
||||
</table>
|
||||
|
||||
|
||||
<p><a href="{{ url('/') }}">{{ $snipeSettings->site_name }}</a></p>
|
||||
@stop
|
||||
|
|
|
@ -9,5 +9,5 @@
|
|||
|
||||
<p>{{ trans('mail.best_regards') }}</p>
|
||||
|
||||
<p>{{ $snipeSettings->site_name }}</p>
|
||||
<p><a href="{{ url('/') }}">{{ $snipeSettings->site_name }}</a></p>
|
||||
@stop
|
||||
|
|
|
@ -27,5 +27,6 @@
|
|||
|
||||
</table>
|
||||
|
||||
<p><a href="{{ url('/') }}">{{ $snipeSettings->site_name }}</a></p>
|
||||
|
||||
@stop
|
||||
|
|
|
@ -9,5 +9,5 @@
|
|||
|
||||
<p>{{ trans('mail.best_regards') }}</p>
|
||||
|
||||
<p>{{ $snipeSettings->site_name }}</p>
|
||||
<p><a href="{{ url('/') }}">{{ $snipeSettings->site_name }}</a></p>
|
||||
@stop
|
||||
|
|
|
@ -12,5 +12,5 @@
|
|||
|
||||
<p>{{ trans('mail.best_regards') }}</p>
|
||||
|
||||
<p>{{ $snipeSettings->site_name }}</p>
|
||||
<p><a href="{{ url('/') }}">{{ $snipeSettings->site_name }}</a></p>
|
||||
@stop
|
||||
|
|
Loading…
Reference in a new issue