Skip to content

Commit

Permalink
Merge pull request #13 from Steinbeck-Lab/add-resource-icons
Browse files Browse the repository at this point in the history
Add resource icons and pint the code
  • Loading branch information
CS76 authored Apr 25, 2024
2 parents edf2dbd + e738924 commit f7d6d54
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 25 deletions.
2 changes: 1 addition & 1 deletion app/Filament/Dashboard/Resources/GeoLocationResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class GeoLocationResource extends Resource

protected static ?string $model = GeoLocation::class;

protected static ?string $navigationIcon = 'heroicon-o-rectangle-stack';
protected static ?string $navigationIcon = 'heroicon-o-map-pin';

public static function form(Form $form): Form
{
Expand Down
2 changes: 1 addition & 1 deletion app/Filament/Dashboard/Resources/OrganismResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class OrganismResource extends Resource

protected static ?string $model = Organism::class;

protected static ?string $navigationIcon = 'heroicon-o-rectangle-stack';
protected static ?string $navigationIcon = 'heroicon-o-bug-ant';

public static function form(Form $form): Form
{
Expand Down
20 changes: 0 additions & 20 deletions app/Filament/Dashboard/Resources/ReportResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
use App\Filament\Dashboard\Resources\ReportResource\Pages;
use App\Filament\Dashboard\Resources\ReportResource\RelationManagers;
use App\Models\Citation;
use App\Models\Molecule;
use App\Models\Report;
use Filament\Forms\Components\Select;
use Filament\Forms\Components\SpatieTagsInput;
Expand All @@ -19,7 +18,6 @@
use Filament\Tables\Columns\TextColumn;
use Filament\Tables\Table;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Http\Request;
use Illuminate\Support\Str;
use Tapp\FilamentAuditing\RelationManagers\AuditsRelationManager;

Expand Down Expand Up @@ -97,21 +95,6 @@ public static function form(Form $form): Form
}
})
->searchable(),
// Select::make('molecules')
// ->relationship('molecules', 'identifier')
// ->options(function () {
// return Molecule::select('id', 'identifier')->whereNotNull('identifier')->get();
// })
// ->multiple()
// ->hidden(function (Get $get) {
// if(!request()->has('compound_id') && $get('choice') != 'molecule') {
// return true;
// }
// else {
// return false;
// }
// }),
// ->searchable(),
TextInput::make('mol_id_csv')
->label('Molecules')
->placeholder('Enter the Identifiers separated by commas')
Expand Down Expand Up @@ -142,7 +125,6 @@ public static function form(Form $form): Form
return ! auth()->user()->hasRole('curator');
})
->afterStateUpdated(function (?Report $record, ?string $state, ?string $old) {
// dd($record, $state, $record->status, $old);
ReportStatusChanged::dispatch($record, $state, $old);
}),
TextArea::make('comment')
Expand All @@ -158,13 +140,11 @@ public static function table(Table $table): Table
->columns([
TextColumn::make('title')
->description(fn (Report $record): string => Str::of($record->evidence)->words(10)),
// TextColumn::make('evidence')->words(10),
TextColumn::make('url')
->url(fn (Report $record): string => $record->url)
->openUrlInNewTab(),
TextColumn::make('status')
->badge()
// Text column for status with badge and color based on status
->color(function (Report $record) {
return match ($record->status) {
'pending' => 'info',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ public function table(Table $table): Table
->recordSelectSearchColumns(['title', 'authors']),
])
->actions([
// Tables\Actions\EditAction::make(),
Tables\Actions\DetachAction::make(),
])
->bulkActions([
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ public function table(Table $table): Table
->recordSelectSearchColumns(['title', 'description']),
])
->actions([
// Tables\Actions\EditAction::make(),
Tables\Actions\DetachAction::make(),
])
->bulkActions([
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ public function table(Table $table): Table
->recordSelectSearchColumns(['canonical_smiles']),
])
->actions([
// Tables\Actions\EditAction::make(),
Tables\Actions\DetachAction::make(),
])
->bulkActions([
Expand Down

0 comments on commit f7d6d54

Please sign in to comment.