Add postal code to locations listing

This commit is contained in:
snipe 2016-11-16 08:22:54 -08:00
parent 2ef4b58a8c
commit 84e06f4642
2 changed files with 5 additions and 1 deletions

View file

@ -318,7 +318,7 @@ class LocationsController extends Controller
$locations = $locations->OrderParent($order); $locations = $locations->OrderParent($order);
break; break;
default: 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'; $sort = in_array(Input::get('sort'), $allowed_columns) ? Input::get('sort') : 'created_at';
$locations = $locations->orderBy($sort, $order); $locations = $locations->orderBy($sort, $order);
@ -344,6 +344,7 @@ class LocationsController extends Controller
'address' => ($location->address) ? e($location->address): '', 'address' => ($location->address) ? e($location->address): '',
'city' => e($location->city), 'city' => e($location->city),
'state' => e($location->state), 'state' => e($location->state),
'zip' => e($location->zip),
'country' => e($location->country), 'country' => e($location->country),
'currency' => e($location->currency), 'currency' => e($location->currency),
'actions' => $actions 'actions' => $actions

View file

@ -41,6 +41,9 @@
<th data-searchable="true" data-sortable="true" data-field="state"> <th data-searchable="true" data-sortable="true" data-field="state">
{{ trans('admin/locations/table.state') }} {{ trans('admin/locations/table.state') }}
</th> </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"> <th data-searchable="true" data-sortable="true" data-field="country">
{{ trans('admin/locations/table.country') }}</th> {{ trans('admin/locations/table.country') }}</th>
<th data-switchable="false" data-searchable="false" data-sortable="false" data-field="actions">{{ trans('table.actions') }}</th> <th data-switchable="false" data-searchable="false" data-sortable="false" data-field="actions">{{ trans('table.actions') }}</th>