diff --git a/packages/Webkul/Admin/src/DataGrids/Settings/UserDataGrid.php b/packages/Webkul/Admin/src/DataGrids/Settings/UserDataGrid.php index 41d2379e8..41e71a62a 100644 --- a/packages/Webkul/Admin/src/DataGrids/Settings/UserDataGrid.php +++ b/packages/Webkul/Admin/src/DataGrids/Settings/UserDataGrid.php @@ -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; } diff --git a/packages/Webkul/Admin/src/Resources/views/components/attributes/view/text.blade.php b/packages/Webkul/Admin/src/Resources/views/components/attributes/view/text.blade.php index b66f5b87a..1f156b1f3 100755 --- a/packages/Webkul/Admin/src/Resources/views/components/attributes/view/text.blade.php +++ b/packages/Webkul/Admin/src/Resources/views/components/attributes/view/text.blade.php @@ -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"