Merge remote-tracking branch 'origin/develop'
This commit is contained in:
@@ -232,6 +232,7 @@ class AcceptanceController extends Controller
|
||||
'signature' => ($sig_filename) ? storage_path() . '/private_uploads/signatures/' . $sig_filename : null,
|
||||
'logo' => $path_logo,
|
||||
'date_settings' => $branding_settings->date_display_format,
|
||||
'admin' => auth()->user()->present()?->fullName,
|
||||
];
|
||||
|
||||
if ($pdf_view_route!='') {
|
||||
|
||||
@@ -117,15 +117,21 @@ class AssetsController extends Controller
|
||||
'jobtitle',
|
||||
];
|
||||
|
||||
$all_custom_fields = CustomField::all(); //used as a 'cache' of custom fields throughout this page load
|
||||
foreach ($all_custom_fields as $field) {
|
||||
// custom fields are prefixed with "custom_fields.".
|
||||
// We'll add them to the allowed columns so they can be searched.
|
||||
$allowed_columns[] = 'custom_fields.' . $field->db_column_name();
|
||||
}
|
||||
|
||||
$filter = [];
|
||||
|
||||
if ($request->filled('filter')) {
|
||||
$filter = json_decode($request->input('filter'), true);
|
||||
}
|
||||
|
||||
$all_custom_fields = CustomField::all(); //used as a 'cache' of custom fields throughout this page load
|
||||
foreach ($all_custom_fields as $field) {
|
||||
$allowed_columns[] = $field->db_column_name();
|
||||
$filter = array_filter($filter, function ($key) use ($allowed_columns) {
|
||||
return in_array($key, $allowed_columns);
|
||||
}, ARRAY_FILTER_USE_KEY);
|
||||
}
|
||||
|
||||
$assets = Asset::select('assets.*')
|
||||
|
||||
@@ -424,6 +424,9 @@ class AssetsController extends Controller
|
||||
$model = AssetModel::find($request->get('model_id'));
|
||||
if (($model) && ($model->fieldset)) {
|
||||
foreach ($model->fieldset->fields as $field) {
|
||||
if ($field->element == 'checkbox' && !$request->has($field->db_column)) {
|
||||
$asset->{$field->db_column} = null;
|
||||
}
|
||||
if ($request->has($field->db_column)) {
|
||||
if ($field->field_encrypted == '1') {
|
||||
if (Gate::allows('assets.view.encrypted_custom_fields')) {
|
||||
|
||||
@@ -29,6 +29,7 @@ class AcceptanceAssetAcceptedNotification extends Notification
|
||||
$this->assigned_to = $params['assigned_to'];
|
||||
$this->note = $params['note'];
|
||||
$this->company_name = $params['company_name'];
|
||||
$this->admin = $params['admin'] ?? null;
|
||||
$this->settings = Setting::getSettings();
|
||||
|
||||
}
|
||||
@@ -72,6 +73,7 @@ class AcceptanceAssetAcceptedNotification extends Notification
|
||||
'assigned_to' => $this->assigned_to,
|
||||
'company_name' => $this->company_name,
|
||||
'intro_text' => trans('mail.acceptance_asset_accepted'),
|
||||
'admin' => $this->admin,
|
||||
])
|
||||
->subject(trans('mail.acceptance_asset_accepted'));
|
||||
|
||||
|
||||
@@ -14,6 +14,12 @@
|
||||
| **{{ trans('mail.checkout_date') }}** | {{ $checkout_date }} |
|
||||
@endif
|
||||
| **{{ trans('general.accessory') }}** | {{ $item->name }} |
|
||||
@if (isset($item->category))
|
||||
| **{{ trans('general.category') }}** | {{ $item->category->name }} |
|
||||
@endif
|
||||
@if (isset($item->model_number))
|
||||
| **{{ trans('general.model_no') }}** | {{ $item->model_number }} |
|
||||
@endif
|
||||
@if (isset($item->manufacturer))
|
||||
| **{{ trans('general.manufacturer') }}** | {{ $item->manufacturer->name }} |
|
||||
@endif
|
||||
|
||||
@@ -37,6 +37,9 @@
|
||||
@if (isset($item_serial))
|
||||
| **{{ trans('mail.serial') }}** | {{ $item_serial }} |
|
||||
@endif
|
||||
@if (isset($admin))
|
||||
| **{{ trans('general.checked_out').' '.trans('general.by')}}** | {{ $admin }} |
|
||||
@endif
|
||||
@endcomponent
|
||||
|
||||
{{ trans('mail.best_regards') }}
|
||||
|
||||
Reference in New Issue
Block a user