Skip to content

Commit

Permalink
Merge pull request #15293 from eele94/3.x
Browse files Browse the repository at this point in the history
Sushi Compatible Summarizers
  • Loading branch information
danharrin authored Jan 9, 2025
2 parents 93768c4 + cde427e commit 5ab442b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
'role' => 'tab',
])
->class([
'fi-tabs-item group flex items-center justify-center gap-x-2 rounded-lg px-3 py-2 text-sm font-medium outline-none whitespace-nowrap transition duration-75',
'fi-tabs-item group flex items-center justify-center gap-x-2 whitespace-nowrap rounded-lg px-3 py-2 text-sm font-medium outline-none transition duration-75',
$inactiveItemClasses => (! $hasAlpineActiveClasses) && (! $active),
$activeItemClasses => (! $hasAlpineActiveClasses) && $active,
])
Expand Down
3 changes: 1 addition & 2 deletions packages/tables/src/Columns/Summarizers/Summarizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
use Filament\Support\Concerns\HasExtraAttributes;
use Illuminate\Database\Eloquent\Builder as EloquentBuilder;
use Illuminate\Database\Query\Builder;
use Illuminate\Support\Facades\DB;

class Summarizer extends ViewComponent
{
Expand Down Expand Up @@ -127,7 +126,7 @@ function (EloquentBuilder $relatedQuery) use ($baseQuery, $query): EloquentBuild

$asName = (string) str($query->getModel()->getTable())->afterLast('.');

$query = DB::connection($query->getModel()->getConnectionName())
$query = $query->getModel()->resolveConnection()
->table($query->toBase(), $asName);

if ($this->hasQueryModification()) {
Expand Down
3 changes: 1 addition & 2 deletions packages/tables/src/Concerns/CanSummarizeRecords.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
use Illuminate\Database\Connection;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Query\Expression;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Str;
use stdClass;

Expand Down Expand Up @@ -71,7 +70,7 @@ public function getTableSummarySelectedState(Builder $query, ?Closure $modifyQue
$queryToJoin = $query->clone();
$joins = [];

$query = DB::connection($query->getModel()->getConnectionName())
$query = $query->getModel()->resolveConnection()
->table($query->toBase(), $query->getModel()->getTable());

if ($modifyQueryUsing) {
Expand Down

0 comments on commit 5ab442b

Please sign in to comment.