Update GitRepositoryResource.php

This commit is contained in:
Bozhidar 2024-09-11 15:53:02 +03:00
parent b11e16b72e
commit c6403abd86

View file

@ -32,6 +32,7 @@ class GitRepositoryResource extends Resource
->label('Directory') ->label('Directory')
->required() ->required()
->columnSpanFull(), ->columnSpanFull(),
]); ]);
} }
@ -66,6 +67,11 @@ class GitRepositoryResource extends Resource
Tables\Columns\TextColumn::make('dir') Tables\Columns\TextColumn::make('dir')
->searchable() ->searchable()
->sortable(), ->sortable(),
Tables\Columns\TextColumn::make('status')
->searchable()
->badge()
->sortable(),
]) ])
->filters([ ->filters([
// //
@ -73,6 +79,7 @@ class GitRepositoryResource extends Resource
->actions([ ->actions([
Tables\Actions\EditAction::make(), Tables\Actions\EditAction::make(),
Tables\Actions\Action::make('pull') Tables\Actions\Action::make('pull')
->hidden(fn (GitRepository $record) => $record->status !== 'cloned')
->icon('heroicon-o-arrow-down-tray') ->icon('heroicon-o-arrow-down-tray')
->action(function (GitRepository $record) { ->action(function (GitRepository $record) {