Skip to content

Commit

Permalink
Merge pull request #64 from bcgov/Enforce-unique-names-ADO-2223
Browse files Browse the repository at this point in the history
Enforce unique names ADO 2223
  • Loading branch information
kiiskila-bcgov authored Jan 9, 2025
2 parents 2798972 + 68e1198 commit 267d0f3
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app/Filament/Forms/Resources/FieldGroupResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ public static function form(Form $form): Form
return $form
->schema([
TextInput::make('name')
->unique()
->required(),
TextInput::make('label')
->required(),
Expand All @@ -47,8 +48,8 @@ public static function table(Table $table): Table
{
return $table
->columns([
Tables\Columns\TextColumn::make('name')->searchable(),
Tables\Columns\TextColumn::make('label')->searchable(),
Tables\Columns\TextColumn::make('name')->sortable()->searchable(),
Tables\Columns\TextColumn::make('label')->sortable()->searchable(),
Tables\Columns\IconColumn::make('repeater')->boolean(),
Tables\Columns\TextColumn::make('created_at')->dateTime()->sortable()->toggleable(isToggledHiddenByDefault: true),
Tables\Columns\TextColumn::make('updated_at')->dateTime()->sortable()->toggleable(isToggledHiddenByDefault: true),
Expand Down
3 changes: 3 additions & 0 deletions app/Filament/Forms/Resources/FormFieldResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ public static function form(Form $form): Form
return $form
->schema([
Forms\Components\TextInput::make('name')
->unique()
->required(),
Forms\Components\TextInput::make('label')
->required(),
Expand Down Expand Up @@ -108,8 +109,10 @@ public static function table(Table $table): Table
return $table
->columns([
Tables\Columns\TextColumn::make('name')
->sortable()
->searchable(),
Tables\Columns\TextColumn::make('label')
->sortable()
->searchable(),
Tables\Columns\TextColumn::make('dataType.name')
->sortable(),
Expand Down
4 changes: 4 additions & 0 deletions app/Filament/Forms/Resources/SelectOptionsResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ public static function form(Form $form): Form
return $form
->schema([
Forms\Components\TextInput::make('name')
->unique()
->required(),
Forms\Components\TextInput::make('label'),
Forms\Components\TextInput::make('value'),
Expand All @@ -47,10 +48,13 @@ public static function table(Table $table): Table
return $table
->columns([
Tables\Columns\TextColumn::make('label')
->sortable()
->searchable(),
Tables\Columns\TextColumn::make('name')
->sortable()
->searchable(),
Tables\Columns\TextColumn::make('value')
->sortable()
->searchable(),
Tables\Columns\TextColumn::make('formFields.label')
->numeric()
Expand Down

0 comments on commit 267d0f3

Please sign in to comment.