Skip to content

Commit

Permalink
Fixed Issue #1782
Browse files Browse the repository at this point in the history
  • Loading branch information
amit-webkul committed Jan 2, 2025
1 parent 1f90616 commit 630d403
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
18 changes: 8 additions & 10 deletions packages/Webkul/Admin/src/DataGrids/Settings/UserDataGrid.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,19 @@ public function prepareQueryBuilder(): Builder
$queryBuilder = DB::table('users')
->distinct()
->addSelect(
'users.id',
'users.name',
'users.email',
'users.image',
'users.status',
'users.created_at'
'id',
'name',
'email',
'image',
'status',
'created_at'
)
->leftJoin('user_groups', 'users.id', '=', 'user_groups.user_id');
->leftJoin('user_groups', 'id', '=', 'user_groups.user_id');

if ($userIds = bouncer()->getAuthorizedUserIds()) {
$queryBuilder->whereIn('users.user_id', $userIds);
$queryBuilder->whereIn('id', $userIds);
}

$this->addFilter('id', 'users.id');

return $queryBuilder;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
::name="'{{ $attribute->code }}'"
:value="$value"
position="left"
rules="required"
rules="required|{{ $attribute->validation }}"
:label="$attribute->name"
:placeholder="$attribute->name"
::errors="errors"
Expand Down

0 comments on commit 630d403

Please sign in to comment.