diff --git a/packages/admin/src/Filament/Resources/CustomerResource/RelationManagers/OrdersRelationManager.php b/packages/admin/src/Filament/Resources/CustomerResource/RelationManagers/OrdersRelationManager.php index 99b114b773..b01eea5116 100644 --- a/packages/admin/src/Filament/Resources/CustomerResource/RelationManagers/OrdersRelationManager.php +++ b/packages/admin/src/Filament/Resources/CustomerResource/RelationManagers/OrdersRelationManager.php @@ -5,8 +5,8 @@ use Filament\Tables; use Filament\Tables\Table; use Lunar\Admin\Filament\Resources\OrderResource; -use Lunar\Admin\Support\RelationManagers\BaseRelationManager; use Lunar\Admin\Filament\Resources\OrderResource\Pages\ManageOrder; +use Lunar\Admin\Support\RelationManagers\BaseRelationManager; use Lunar\Models\Order; class OrdersRelationManager extends BaseRelationManager diff --git a/packages/admin/src/Filament/Resources/ProductResource/Pages/ManageProductInventory.php b/packages/admin/src/Filament/Resources/ProductResource/Pages/ManageProductInventory.php index 900356b578..da6d6ef1ff 100644 --- a/packages/admin/src/Filament/Resources/ProductResource/Pages/ManageProductInventory.php +++ b/packages/admin/src/Filament/Resources/ProductResource/Pages/ManageProductInventory.php @@ -92,7 +92,7 @@ protected function getFormActions(): array ]; } - public function form(Form $form): Form + public function getDefaultForm(Form $form): Form { return (new ManageVariantInventory)->form($form)->statePath(''); } diff --git a/packages/admin/src/Filament/Resources/ProductVariantResource/Pages/ManageVariantInventory.php b/packages/admin/src/Filament/Resources/ProductVariantResource/Pages/ManageVariantInventory.php index 3dec22cadd..72aac2712d 100644 --- a/packages/admin/src/Filament/Resources/ProductVariantResource/Pages/ManageVariantInventory.php +++ b/packages/admin/src/Filament/Resources/ProductVariantResource/Pages/ManageVariantInventory.php @@ -61,7 +61,7 @@ protected function getDefaultHeaderActions(): array ]; } - public function form(Form $form): Form + public function getDefaultForm(Form $form): Form { return $form->schema([ Section::make()->schema([ diff --git a/packages/admin/src/Support/Pages/BaseCreateRecord.php b/packages/admin/src/Support/Pages/BaseCreateRecord.php index 4a0b803d8e..0c5e414618 100644 --- a/packages/admin/src/Support/Pages/BaseCreateRecord.php +++ b/packages/admin/src/Support/Pages/BaseCreateRecord.php @@ -9,6 +9,7 @@ abstract class BaseCreateRecord extends CreateRecord { use Concerns\ExtendsFooterWidgets; use Concerns\ExtendsFormActions; + use Concerns\ExtendsForms; use Concerns\ExtendsHeaderActions; use Concerns\ExtendsHeaderWidgets; use Concerns\ExtendsHeadings; diff --git a/packages/admin/src/Support/Pages/BaseEditRecord.php b/packages/admin/src/Support/Pages/BaseEditRecord.php index f63f3de97c..4e43fbed8a 100644 --- a/packages/admin/src/Support/Pages/BaseEditRecord.php +++ b/packages/admin/src/Support/Pages/BaseEditRecord.php @@ -9,6 +9,7 @@ abstract class BaseEditRecord extends EditRecord { use Concerns\ExtendsFooterWidgets; use Concerns\ExtendsFormActions; + use Concerns\ExtendsForms; use Concerns\ExtendsHeaderActions; use Concerns\ExtendsHeaderWidgets; use Concerns\ExtendsHeadings; diff --git a/packages/admin/src/Support/Pages/Concerns/ExtendsForms.php b/packages/admin/src/Support/Pages/Concerns/ExtendsForms.php new file mode 100644 index 0000000000..d699471537 --- /dev/null +++ b/packages/admin/src/Support/Pages/Concerns/ExtendsForms.php @@ -0,0 +1,18 @@ +getDefaultForm($form)); + } + + public function getDefaultForm(Form $form): Form + { + return $form; + } +}