From 2efb321b1cd42211decd318ab7e5f178e00f10ac Mon Sep 17 00:00:00 2001 From: devansh bawari Date: Thu, 11 Feb 2021 14:47:52 +0530 Subject: [PATCH] Completed: No filteration should be done in channel grid when admin filter new locale https://prnt.sc/z23l9a --- packages/Webkul/Admin/src/DataGrids/ChannelDataGrid.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/Webkul/Admin/src/DataGrids/ChannelDataGrid.php b/packages/Webkul/Admin/src/DataGrids/ChannelDataGrid.php index d757e24ed..f9ec6da21 100755 --- a/packages/Webkul/Admin/src/DataGrids/ChannelDataGrid.php +++ b/packages/Webkul/Admin/src/DataGrids/ChannelDataGrid.php @@ -49,9 +49,11 @@ class ChannelDataGrid extends DataGrid public function prepareQueryBuilder() { $queryBuilder = $this->channelRepository->query() - ->leftJoin('channel_translations', 'channel_translations.channel_id', '=', 'channels.id') - ->addSelect('channels.id', 'channels.code', 'channel_translations.locale', 'channel_translations.name as translated_name', 'channels.hostname') - ->where('channel_translations.locale', '=', $this->locale); + ->leftJoin('channel_translations', function($leftJoin) { + $leftJoin->on('channel_translations.channel_id', '=', 'channels.id') + ->where('channel_translations.locale', $this->locale); + }) + ->addSelect('channels.id', 'channels.code', 'channel_translations.locale', 'channel_translations.name as translated_name', 'channels.hostname'); $this->addFilter('id', 'channels.id'); $this->addFilter('code', 'channels.code');