From 0db420e838073224487b4a5bf72c261292a0c791 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cihan=20=C5=9Eent=C3=BCrk?= <53110792+CihanSenturk@users.noreply.github.com> Date: Fri, 13 Oct 2023 16:23:40 +0300 Subject: [PATCH] fixed export filter issue --- app/Utilities/Export.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/Utilities/Export.php b/app/Utilities/Export.php index 63c44855b..560c6110d 100644 --- a/app/Utilities/Export.php +++ b/app/Utilities/Export.php @@ -22,6 +22,11 @@ class Export try { $file_name = Str::filename($translation) . '-' . time() . '.' . $extension; + //Todo: This improvement solves the filter issue on multiple excel sheets. This solution is a temporary solution. + if (empty($class->ids) && method_exists($class, 'sheets') && is_array($sheets = $class->sheets())) { + $class->ids = (new $sheets[0])->collection()->pluck('id')->toArray(); + } + if (should_queue()) { $disk = 'temp';