Skip to content

A free open source IT asset/license management system

adds id to history info

Godfrey M5076b45a0d30
diff --git a/app/Http/Transformers/ActionlogsTransformer.php b/app/Http/Transformers/ActionlogsTransformer.php
index b319e793d3..4cf66dbdd6 100644
--- a/app/Http/Transformers/ActionlogsTransformer.php
+++ b/app/Http/Transformers/ActionlogsTransformer.php
@@ -147,32 +147,32 @@ class ActionlogsTransformer
{
if(array_key_exists('rtd_location_id',$clean_meta)) {
- $clean_meta['rtd_location_id']['old'] = $clean_meta['rtd_location_id']['old'] ? Location::find($clean_meta['rtd_location_id']['old'])->name : trans('general.unassigned');
- $clean_meta['rtd_location_id']['new'] = $clean_meta['rtd_location_id']['new'] ? Location::find($clean_meta['rtd_location_id']['new'])->name : trans('general.unassigned');
+ $clean_meta['rtd_location_id']['old'] = $clean_meta['rtd_location_id']['old'] ? "[id: ".$clean_meta['rtd_location_id']['old']."]". Location::find($clean_meta['rtd_location_id']['old'])->name : trans('general.unassigned');
+ $clean_meta['rtd_location_id']['new'] = $clean_meta['rtd_location_id']['new'] ? "[id: ".$clean_meta['rtd_location_id']['new']."]". Location::find($clean_meta['rtd_location_id']['new'])->name : trans('general.unassigned');
$clean_meta['Default Location'] = $clean_meta['rtd_location_id'];
unset($clean_meta['rtd_location_id']);
}
if(array_key_exists('location_id', $clean_meta)) {
- $clean_meta['location_id']['old'] = $clean_meta['location_id']['old'] ? Location::find($clean_meta['location_id']['old'])->name : trans('general.unassigned');
- $clean_meta['location_id']['new'] = $clean_meta['location_id']['new'] ? Location::find($clean_meta['location_id']['new'])->name : trans('general.unassigned');
+ $clean_meta['location_id']['old'] = $clean_meta['location_id']['old'] ? "[id: ".$clean_meta['location_id']['old']."]".Location::find($clean_meta['location_id']['old'])->name : trans('general.unassigned');
+ $clean_meta['location_id']['new'] = $clean_meta['location_id']['new'] ? "[id: ".$clean_meta['location_id']['new']."]".Location::find($clean_meta['location_id']['new'])->name : trans('general.unassigned');
$clean_meta['Current Location'] = $clean_meta['location_id'];
unset($clean_meta['location_id']);
}
if(array_key_exists('model_id', $clean_meta)) {
- $clean_meta['model_id']['old'] = AssetModel::find($clean_meta['model_id']['old'])->name;
- $clean_meta['model_id']['new'] = AssetModel::find($clean_meta['model_id']['new'])->name; /* model is required at asset creation */
+ $clean_meta['model_id']['old'] = "[id: ".$clean_meta['model_id']['old']."]".AssetModel::find($clean_meta['model_id']['old'])->name;
+ $clean_meta['model_id']['new'] = "[id: ".$clean_meta['model_id']['new']."]".AssetModel::find($clean_meta['model_id']['new'])->name; /* model is required at asset creation */
$clean_meta['Model'] = $clean_meta['model_id'];
unset($clean_meta['model_id']);
}
if(array_key_exists('company_id', $clean_meta)) {
- $clean_meta['company_id']['old'] = $clean_meta['company_id']['old'] ? Company::find($clean_meta['company_id']['old'])->name : trans('general.unassigned');
- $clean_meta['company_id']['new'] = $clean_meta['company_id']['new'] ? Company::find($clean_meta['company_id']['new'])->name : trans('general.unassigned');
+ $clean_meta['company_id']['old'] = $clean_meta['company_id']['old'] ? "[id: ".$clean_meta['company_id']['old']."]".Company::find($clean_meta['company_id']['old'])->name : trans('general.unassigned');
+ $clean_meta['company_id']['new'] = $clean_meta['company_id']['new'] ? "[id: ".$clean_meta['company_id']['new']."]".Company::find($clean_meta['company_id']['new'])->name : trans('general.unassigned');
$clean_meta['Company'] = $clean_meta['company_id'];
unset($clean_meta['company_id']);
}
if(array_key_exists('supplier_id', $clean_meta)) {
- $clean_meta['supplier_id']['old'] = $clean_meta['supplier_id']['old'] ? Supplier::find($clean_meta['supplier_id']['old'])->name : trans('general.unassigned');
- $clean_meta['supplier_id']['new'] = $clean_meta['supplier_id']['new'] ? Supplier::find($clean_meta['supplier_id']['new'])->name : trans('general.unassigned');
+ $clean_meta['supplier_id']['old'] = $clean_meta['supplier_id']['old'] ? "[id: ".$clean_meta['supplier_id']['old']."]".Supplier::find($clean_meta['supplier_id']['old'])->name : trans('general.unassigned');
+ $clean_meta['supplier_id']['new'] = $clean_meta['supplier_id']['new'] ? "[id: ".$clean_meta['supplier_id']['new']."]".Supplier::find($clean_meta['supplier_id']['new'])->name : trans('general.unassigned');
$clean_meta['Supplier'] = $clean_meta['supplier_id'];
unset($clean_meta['supplier_id']);
}
diff --git a/resources/lang/en/general.php b/resources/lang/en/general.php
index 4831845721..632a0a590f 100644
--- a/resources/lang/en/general.php
+++ b/resources/lang/en/general.php
@@ -283,6 +283,7 @@ return [
'user' => 'User',
'accepted' => 'accepted',
'declined' => 'declined',
+ 'unassigned' => 'Unassigned',
'unaccepted_asset_report' => 'Unaccepted Assets',
'users' => 'Users',
'viewall' => 'View All',