diff --git a/Filament/Blocks/Image.php b/Filament/Blocks/Image.php index d0f31ed1..aab08505 100644 --- a/Filament/Blocks/Image.php +++ b/Filament/Blocks/Image.php @@ -31,18 +31,11 @@ public static function make( TextInput::make('alt') ->columnSpanFull(), -<<<<<<< HEAD TextInput::make('caption') ->columnSpanFull(), ] ) ->columns('form' === $context ? 2 : 1); -======= - TextInput::make('caption') - ->columnSpanFull(), - ]) - ->columns($context === 'form' ? 2 : 1); ->>>>>>> ef98e3f (rebase 4) } public static function getRatios(): array diff --git a/Filament/Blocks/Title.php b/Filament/Blocks/Title.php index 074fff41..66826c99 100644 --- a/Filament/Blocks/Title.php +++ b/Filament/Blocks/Title.php @@ -20,7 +20,6 @@ public static function make( TextInput::make('text') ->required(), -<<<<<<< HEAD Select::make('level') ->options( [ @@ -33,16 +32,5 @@ public static function make( ] ) ->columns('form' === $context ? 2 : 1); -======= - Select::make('level') - ->options([ - 'h2' => 'h2', - 'h3' => 'h3', - 'h4' => 'h4', - ]) - ->afterStateHydrated(static fn ($state, $set) => $state || $set('level', 'h2')), - ]) - ->columns($context === 'form' ? 2 : 1); ->>>>>>> ef98e3f (rebase 4) } } diff --git a/Filament/Resources/TreeResource/Pages/Concerns/HandlesTreeBuilder.php b/Filament/Resources/TreeResource/Pages/Concerns/HandlesTreeBuilder.php index ed6840b5..5cb69c1d 100644 --- a/Filament/Resources/TreeResource/Pages/Concerns/HandlesTreeBuilder.php +++ b/Filament/Resources/TreeResource/Pages/Concerns/HandlesTreeBuilder.php @@ -151,7 +151,6 @@ public function storeChildItem(Model $record, array $data): void { $parent = data_get($this, $this->mountedChildTarget); $data['parent_id'] = $parent['id']; -<<<<<<< HEAD /* dddx([ 'data' => $data, @@ -162,19 +161,6 @@ public function storeChildItem(Model $record, array $data): void $new_id = app(GetNewInventoryNumberAction::class)->execute($record::class, $data['parent_id']); $data['id'] = $new_id; -======= - if (Str::contains($data['parent_id'], '-')) { - $last_son = $record::class::where('parent_id', $data['parent_id']) - ->orderByDesc('id') - ->first(); - if ($last_son == null) { - $data['id'] = $data['parent_id'].'-1'; - } else { - $new_id = intval(Str::afterLast($last_son['id'], '-')) + 1; - $data['id'] = $data['parent_id'].'-'.$new_id; - } - } ->>>>>>> ef98e3f (rebase 4) $row = $record::class::create($data); $data = $row->toArray(); $data['id'] = $new_id; @@ -238,7 +224,7 @@ function (array $data, $record): void { } ) ->requiresConfirmation() - ->visible($this->mountedItem != null), + ->visible(null != $this->mountedItem), Action::make('item') ->mountUsing( function (ComponentContainer $form): void { diff --git a/View/Components/Render/Block.php b/View/Components/Render/Block.php index aa0ac64c..ec3053c5 100644 --- a/View/Components/Render/Block.php +++ b/View/Components/Render/Block.php @@ -28,7 +28,7 @@ public function render(): \Illuminate\Contracts\View\Factory|\Illuminate\View\Vi $this->tpl = $this->block['type']; $views = ['ui::components.blocks.'.$this->tpl]; - if ($this->model !== null) { + if (null !== $this->model) { $module = app(GetModuleNameFromModelAction::class)->execute($this->model); $views[] = strtolower($module).'::components.blocks.'.$this->tpl; } @@ -37,21 +37,8 @@ public function render(): \Illuminate\Contracts\View\Factory|\Illuminate\View\Vi * @phpstan-var view-string|null */ $view = Arr::first($views, static fn (string $view) => view()->exists($view)); -<<<<<<< HEAD if (null === $view) { -<<<<<<< HEAD throw new \Exception('none of these views exists ['.implode(', '.chr(13), $views).']'); -======= -<<<<<<< HEAD - throw new Exception('none of these views exists ['.implode(', '.chr(13),$views).']'); - //dddx([$views, $this->model]); -======= -======= - if ($view === null) { ->>>>>>> 1fc11df (Dusting) - dddx([$views, $this->model]); ->>>>>>> 760233f (Lint) ->>>>>>> ef98e3f (rebase 4) } $view_params = $this->block['data'] ?? [];