Hotfix: Correcting Wrong Position on Checkout, Correcting Cart Display Pages

This commit is contained in:
2026-08-29 00:27:20 +03:00
parent c6c44db742
commit ca36c31cab
3 changed files with 25 additions and 8 deletions
@@ -35,8 +35,6 @@ class ListCarts extends ListRecords
public function getTabs(): array
{
return [
'ongoing' => Tab::make('Ongoing')
->modifyQueryUsing(fn (Builder $query) => $query->active()->where('updated_at', '>', CartResource::abandonedCutoff())),
'abandoned_cart' => Tab::make('Abandoned Cart')
->modifyQueryUsing(fn(Builder $query) => $query
->whereDoesntHave('orders')
@@ -45,6 +43,9 @@ class ListCarts extends ListRecords
->modifyQueryUsing(fn(Builder $query) => $query
->whereHas('orders', fn(Builder $query) => $query->whereNull('placed_at'))
->where('updated_at', '<=', CartResource::abandonedCutoff())),
'ongoing' => Tab::make('Ongoing')
->modifyQueryUsing(fn(Builder $query) => $query->active()->where('updated_at', '>', CartResource::abandonedCutoff())),
'completed' => Tab::make('Completed')
->modifyQueryUsing(fn(Builder $query) => $query->whereHas(
'orders',
-1
View File
@@ -50,7 +50,6 @@ class CorePlugin implements Plugin
CartResource::class,
])
->plugin(ShippingPlugin::make())
->plugin(ShippingPlugin::make())
->pages([ManagePickupManifests::class]);
LunarPanel::extensions([
@@ -25,6 +25,23 @@ class ManagePickupManifests extends Page implements HasTable
protected static ?string $navigationLabel = 'Pickup Manifests';
/**
* Without an explicit group, this page had no navigation group at all —
* Filament's Panel::getUrl() falls back to "first item in the first
* navigation group" when no homeUrl is set (neither Lunar nor CorePlugin
* sets one), and an ungrouped page sorted ahead of every one of Lunar's
* own grouped resources (Sales, Catalog, etc.), making this page the
* panel's de facto home instead of the real Dashboard. Grouping it under
* Sales — alongside CartResource, OrderResource — fixes that by letting
* a legitimate item sort first again. Sorted last within the group
* deliberately (a high explicit navigationSort — Lunar's own
* OrderResource uses 1) so this page never competes to be first even as
* more Sales-group items are added later.
*/
protected static ?string $navigationGroup = 'Sales';
protected static ?int $navigationSort = 100;
protected static string $view = 'core::shipping.filament.pages.manage-pickup-manifests';
public function table(Table $table): Table