mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-09 23:24:06 -08:00
Add postal code to locations listing
This commit is contained in:
parent
2ef4b58a8c
commit
84e06f4642
|
@ -318,7 +318,7 @@ class LocationsController extends Controller
|
|||
$locations = $locations->OrderParent($order);
|
||||
break;
|
||||
default:
|
||||
$allowed_columns = ['id','name','address','city','state','country','currency'];
|
||||
$allowed_columns = ['id','name','address','city','state','country','currency','zip'];
|
||||
|
||||
$sort = in_array(Input::get('sort'), $allowed_columns) ? Input::get('sort') : 'created_at';
|
||||
$locations = $locations->orderBy($sort, $order);
|
||||
|
@ -344,6 +344,7 @@ class LocationsController extends Controller
|
|||
'address' => ($location->address) ? e($location->address): '',
|
||||
'city' => e($location->city),
|
||||
'state' => e($location->state),
|
||||
'zip' => e($location->zip),
|
||||
'country' => e($location->country),
|
||||
'currency' => e($location->currency),
|
||||
'actions' => $actions
|
||||
|
|
|
@ -41,6 +41,9 @@
|
|||
<th data-searchable="true" data-sortable="true" data-field="state">
|
||||
{{ trans('admin/locations/table.state') }}
|
||||
</th>
|
||||
<th data-searchable="true" data-sortable="true" data-field="zip">
|
||||
{{ trans('admin/locations/table.zip') }}
|
||||
</th>
|
||||
<th data-searchable="true" data-sortable="true" data-field="country">
|
||||
{{ trans('admin/locations/table.country') }}</th>
|
||||
<th data-switchable="false" data-searchable="false" data-sortable="false" data-field="actions">{{ trans('table.actions') }}</th>
|
||||
|
|
Loading…
Reference in a new issue