email in table, shows in export

This commit is contained in:
akemidx 2023-12-18 20:15:06 -05:00
parent 3fe3697a29
commit 85bfbf8bc4
3 changed files with 3 additions and 2 deletions

View file

@ -27,7 +27,7 @@ class LicenseSeatsController extends Controller
if ($license = License::find($licenseId)) {
$this->authorize('view', $license);
$seats = LicenseSeat::with('license', 'user', 'email', 'asset', 'user.department')
$seats = LicenseSeat::with('license', 'user', 'asset', 'user.department')
->where('license_seats.license_id', $licenseId);
$order = $request->input('order') === 'asc' ? 'asc' : 'desc';

View file

@ -29,6 +29,7 @@ class LicenseSeatsTransformer
'assigned_user' => ($seat->user) ? [
'id' => (int) $seat->user->id,
'name'=> e($seat->user->present()->fullName),
'email' => e($seat->user->email),
'department'=> ($seat->user->department) ?
[
'id' => (int) $seat->user->department->id,

View file

@ -229,7 +229,7 @@ class LicensePresenter extends Presenter
'visible' => true,
'formatter' => 'usersLinkObjFormatter',
], [
'field' => 'email',
'field' => 'assigned_user.email',
'searchable' => false,
'sortable' => false,
'switchable' => true,