Skip to content

Commit

Permalink
run pint
Browse files Browse the repository at this point in the history
  • Loading branch information
atmonshi committed Oct 8, 2023
1 parent fed1997 commit 889ed28
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 28 deletions.
15 changes: 0 additions & 15 deletions src/Concerns/Schemata.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,6 @@

trait Schemata
{
public static function getMainFormSchemaForView(): array
{
return [
Hidden::make('user_id')->default(auth()->user()->id ?? null),

Section::make()
->schema([
TextInput::make('name')
->maxLength(255)
->live(onBlur: true)
->label(__('Form Name')),
]),
];
}

public static function getMainFormSchema(): array
{
return [
Expand Down
22 changes: 11 additions & 11 deletions src/Facades/Bolt.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,20 +132,20 @@ public static function prepareFieldsAndSectionToRender(Form $zeusForm, bool $inl
Grid::make()->columns($section->columns)->schema($fields),
]);
} else {
if($section->compact){
if ($section->compact) {
$sections[] = Fieldset::make($section->name)
->id($sectionId)
->schema($fields)
->columns($section->columns);
->id($sectionId)
->schema($fields)
->columns($section->columns);
} else {
$sections[] = Section::make($section->name)
->id($sectionId)
->icon($section->icon ?? null)
->schema($fields)
->collapsible()
->aside(fn () => $section->aside)
->description($section->description)
->columns($section->columns);
->id($sectionId)
->icon($section->icon ?? null)
->schema($fields)
->collapsible()
->aside(fn () => $section->aside)
->description($section->description)
->columns($section->columns);
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/Models/Section.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
* @property string $name
* @property string $columns
* @property string $description
* @property boolean $aside
* @property boolean $compact
* @property bool $aside
* @property bool $compact
*/
class Section extends Model
{
Expand Down

0 comments on commit 889ed28

Please sign in to comment.