mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 21:54:14 -08:00
Fixed #6028 - added supplier url to list view
This commit is contained in:
parent
9a3683ce7c
commit
b2c99c88bb
|
@ -22,10 +22,10 @@ class SuppliersController extends Controller
|
||||||
public function index(Request $request)
|
public function index(Request $request)
|
||||||
{
|
{
|
||||||
$this->authorize('view', Supplier::class);
|
$this->authorize('view', Supplier::class);
|
||||||
$allowed_columns = ['id','name','address','phone','contact','fax','email','image','assets_count','licenses_count', 'accessories_count'];
|
$allowed_columns = ['id','name','address','phone','contact','fax','email','image','assets_count','licenses_count', 'accessories_count','url'];
|
||||||
|
|
||||||
$suppliers = Supplier::select(
|
$suppliers = Supplier::select(
|
||||||
array('id','name','address','address2','city','state','country','fax', 'phone','email','contact','created_at','updated_at','deleted_at','image','notes')
|
array('id','name','address','address2','city','state','country','fax', 'phone','email','contact','created_at','updated_at','deleted_at','image','notes', 'url')
|
||||||
)->withCount('assets as assets_count')->withCount('licenses as licenses_count')->withCount('accessories as accessories_count');
|
)->withCount('assets as assets_count')->withCount('licenses as licenses_count')->withCount('accessories as accessories_count');
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -26,6 +26,7 @@ class SuppliersTransformer
|
||||||
'id' => (int) $supplier->id,
|
'id' => (int) $supplier->id,
|
||||||
'name' => e($supplier->name),
|
'name' => e($supplier->name),
|
||||||
'image' => ($supplier->image) ? app('suppliers_upload_url').e($supplier->image) : null,
|
'image' => ($supplier->image) ? app('suppliers_upload_url').e($supplier->image) : null,
|
||||||
|
'url' => e($supplier->url),
|
||||||
'address' => ($supplier->address) ? e($supplier->address) : null,
|
'address' => ($supplier->address) ? e($supplier->address) : null,
|
||||||
'address2' => ($supplier->address2) ? e($supplier->address2) : null,
|
'address2' => ($supplier->address2) ? e($supplier->address2) : null,
|
||||||
'city' => ($supplier->city) ? e($supplier->city) : null,
|
'city' => ($supplier->city) ? e($supplier->city) : null,
|
||||||
|
|
|
@ -49,6 +49,7 @@
|
||||||
<th data-searchable="true" data-sortable="true" data-field="email" data-formatter="emailFormatter">{{ trans('admin/suppliers/table.email') }}</th>
|
<th data-searchable="true" data-sortable="true" data-field="email" data-formatter="emailFormatter">{{ trans('admin/suppliers/table.email') }}</th>
|
||||||
<th data-searchable="true" data-sortable="true" data-field="phone" data-formatter="phoneFormatter">{{ trans('admin/suppliers/table.phone') }}</th>
|
<th data-searchable="true" data-sortable="true" data-field="phone" data-formatter="phoneFormatter">{{ trans('admin/suppliers/table.phone') }}</th>
|
||||||
<th data-searchable="true" data-sortable="true" data-field="fax" data-visible="false">{{ trans('admin/suppliers/table.fax') }}</th>
|
<th data-searchable="true" data-sortable="true" data-field="fax" data-visible="false">{{ trans('admin/suppliers/table.fax') }}</th>
|
||||||
|
<th data-sortable="true" data-field="url" data-visible="false" data-formatter="externalLinkFormatter">{{ trans('admin/suppliers/table.url') }}</th>
|
||||||
<th data-searchable="false" data-sortable="true" data-field="assets_count">{{ trans('admin/suppliers/table.assets') }}</th>
|
<th data-searchable="false" data-sortable="true" data-field="assets_count">{{ trans('admin/suppliers/table.assets') }}</th>
|
||||||
<th data-searchable="false" data-sortable="true" data-field="accessories_count">{{ trans('general.accessories') }}</th>
|
<th data-searchable="false" data-sortable="true" data-field="accessories_count">{{ trans('general.accessories') }}</th>
|
||||||
<th data-searchable="false" data-sortable="true" data-field="licenses_count">{{ trans('admin/suppliers/table.licenses') }}</th>
|
<th data-searchable="false" data-sortable="true" data-field="licenses_count">{{ trans('admin/suppliers/table.licenses') }}</th>
|
||||||
|
|
Loading…
Reference in a new issue