Rating field added in review datagrid
This commit is contained in:
parent
787436359d
commit
897c0cdc29
|
|
@ -15,7 +15,7 @@ class CustomerReviewDataGrid extends DataGrid
|
|||
{
|
||||
$queryBuilder = DB::table('product_reviews as pr')
|
||||
->leftjoin('product_flat as pf', 'pr.product_id', '=', 'pf.product_id')
|
||||
->select('pr.id as product_review_id', 'pr.title', 'pr.comment', 'pf.name as product_name', 'pr.status as product_review_status')
|
||||
->select('pr.id as product_review_id', 'pr.title', 'pr.comment', 'pf.name as product_name', 'pr.status as product_review_status', 'pr.rating')
|
||||
->where('channel', core()->getCurrentChannelCode())
|
||||
->where('locale', app()->getLocale());
|
||||
|
||||
|
|
@ -55,6 +55,15 @@ class CustomerReviewDataGrid extends DataGrid
|
|||
'filterable' => true,
|
||||
]);
|
||||
|
||||
$this->addColumn([
|
||||
'index' => 'rating',
|
||||
'label' => trans('admin::app.customers.reviews.rating'),
|
||||
'type' => 'number',
|
||||
'searchable' => true,
|
||||
'sortable' => true,
|
||||
'filterable' => true,
|
||||
]);
|
||||
|
||||
$this->addColumn([
|
||||
'index' => 'product_name',
|
||||
'label' => trans('admin::app.datagrid.product-name'),
|
||||
|
|
|
|||
Loading…
Reference in New Issue