mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-24 04:03:34 -08:00
Fixes #3865 - employee number mislabeled in list output
This commit is contained in:
parent
a0cbca85bf
commit
06c5bce3c7
|
@ -100,13 +100,12 @@ class AssetPresenter extends Presenter
|
|||
"visible" => true,
|
||||
"formatter" => "usersLinkObjFormatter"
|
||||
], [
|
||||
"field" => "assigned_to",
|
||||
"field" => "employee_number",
|
||||
"searchable" => false,
|
||||
"sortable" => false,
|
||||
"title" => trans('admin/users/table.employee_num'),
|
||||
"visible" => false,
|
||||
"formatter" => "employeeNumFormatter"
|
||||
|
||||
],[
|
||||
"field" => "location",
|
||||
"searchable" => true,
|
||||
|
|
|
@ -322,10 +322,9 @@ $('.snipe-table').bootstrapTable({
|
|||
}
|
||||
|
||||
function employeeNumFormatter(value, row) {
|
||||
if ((value) && (value.employee_number)) {
|
||||
return '<a href="{{ url('/') }}/users/' + row.id + '"> ' + value.employee_number + '</a>';
|
||||
} else {
|
||||
return value;
|
||||
|
||||
if ((row.assigned_to) && ((row.assigned_to.employee_number))) {
|
||||
return '<a href="{{ url('/') }}/users/' + row.assigned_to.id + '"> ' + row.assigned_to.employee_number + '</a>';
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue