Skip to content

Commit

Permalink
Merge branch 'main' of github.com:TappNetwork/Filament-Form-Builder
Browse files Browse the repository at this point in the history
  • Loading branch information
John Wesely committed Aug 6, 2024
2 parents 8207d42 + be7847b commit fc5a628
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

All notable changes to `:package_name` will be documented in this file.

## v1.21 - 2024-08-05

Fixes a typo in locking action visibility and adds a locked column to form resource.

## v1.2 - 2024-08-05

### Support locking a form to prevent data integrity issues
Expand All @@ -13,4 +17,5 @@ All notable changes to `:package_name` will be documented in this file.
$table->boolean('locked')->default(false);
});
```
Original file line number Diff line number Diff line change
Expand Up @@ -84,14 +84,14 @@ public function table(Table $table): Table
->headerActions([
Tables\Actions\CreateAction::make()
->visible(function () use ($form) {
return !$form->locked;
return ! $form->locked;
})
->label('Create Field'),
Action::make('lock_fields')
->requiresConfirmation()
->modalHeading('Lock Form Fields. Doing this will lock the forms fields and new fields will no longer be able to be changed or edited')
->visible(function () use ($form) {
return !$form->locked;
return ! $form->locked;
})
->action(function () use ($form) {
$form->update([
Expand All @@ -113,18 +113,18 @@ public function table(Table $table): Table
->actions([
Tables\Actions\EditAction::make()
->visible(function () use ($form) {
return !$form->locked;
return ! $form->locked;
}),
Tables\Actions\DeleteAction::make()
->visible(function () use ($form) {
return !$form->locked;
return ! $form->locked;
}),
])
->bulkActions([
Tables\Actions\BulkActionGroup::make([
Tables\Actions\DeleteBulkAction::make()
->visible(function () use ($form) {
return !$form->locked;
return ! $form->locked;
}),
]),
]);
Expand Down

0 comments on commit fc5a628

Please sign in to comment.