Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V3 Upgrade #116

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions app/Filament/Pages/Board.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ class Board extends Page implements HasForms
{
use InteractsWithForms;

protected static ?string $navigationIcon = 'heroicon-o-view-boards';
protected static ?string $navigationIcon = 'heroicon-o-view-columns';

protected static string $view = 'filament.pages.board';

protected static ?string $slug = 'board';

protected static ?int $navigationSort = 4;

protected function getSubheading(): string|Htmlable|null
public function getSubheading(): string|Htmlable|null
{
return __("In this section you can choose one of your projects to show it's Scrum or Kanban board");
}
Expand All @@ -33,12 +33,12 @@ public function mount(): void
$this->form->fill();
}

protected static function getNavigationLabel(): string
public static function getNavigationLabel(): string
{
return __('Board');
}

protected static function getNavigationGroup(): ?string
public static function getNavigationGroup(): ?string
{
return __('Management');
}
Expand Down
4 changes: 2 additions & 2 deletions app/Filament/Pages/Dashboard.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ class Dashboard extends BasePage
{
protected static bool $shouldRegisterNavigation = false;

protected function getColumns(): int | array
public function getColumns(): int | array
{
return 6;
}

protected function getWidgets(): array
public function getWidgets(): array
{
return [
FavoriteProjects::class,
Expand Down
10 changes: 5 additions & 5 deletions app/Filament/Pages/JiraImport.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class JiraImport extends Page implements HasForms
{
use InteractsWithForms, JiraHelper;

protected static ?string $navigationIcon = 'heroicon-o-cloud-download';
protected static ?string $navigationIcon = 'heroicon-o-cloud-arrow-down';

protected static string $view = 'filament.pages.jira-import';

Expand Down Expand Up @@ -52,22 +52,22 @@ public function mount(): void
$this->form->fill();
}

protected static function shouldRegisterNavigation(): bool
public static function shouldRegisterNavigation(): bool
{
return auth()->user()->can('Import from Jira');
}

protected function getSubheading(): string|Htmlable|null
public function getSubheading(): string|Htmlable|null
{
return __('Use this section to login into your jira account and import tickets to this application');
}

protected static function getNavigationLabel(): string
public static function getNavigationLabel(): string
{
return __('Jira import');
}

protected static function getNavigationGroup(): ?string
public static function getNavigationGroup(): ?string
{
return __('Settings');
}
Expand Down
8 changes: 4 additions & 4 deletions app/Filament/Pages/Kanban.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class Kanban extends Page implements HasForms
{
use InteractsWithForms, KanbanScrumHelper;

protected static ?string $navigationIcon = 'heroicon-o-view-boards';
protected static ?string $navigationIcon = 'heroicon-o-view-columns';

protected static ?string $slug = 'kanban/{project}';

Expand Down Expand Up @@ -43,21 +43,21 @@ public function mount(Project $project)
$this->form->fill();
}

protected function getActions(): array
protected function getHeaderActions(): array
{
return [
Action::make('refresh')
->button()
->label(__('Refresh'))
->color('secondary')
->color('gray')
->action(function () {
$this->getRecords();
Filament::notify('success', __('Kanban board updated'));
})
];
}

protected function getHeading(): string|Htmlable
public function getHeading(): string|Htmlable
{
return $this->kanbanHeading();
}
Expand Down
10 changes: 5 additions & 5 deletions app/Filament/Pages/ManageGeneralSettings.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,22 @@ class ManageGeneralSettings extends SettingsPage

protected static string $settings = GeneralSettings::class;

protected static function shouldRegisterNavigation(): bool
public static function shouldRegisterNavigation(): bool
{
return auth()->user()->can('Manage general settings');
}

protected function getHeading(): string|Htmlable
public function getHeading(): string|Htmlable
{
return __('Manage general settings');
}

protected static function getNavigationLabel(): string
public static function getNavigationLabel(): string
{
return __('General');
}

protected static function getNavigationGroup(): ?string
public static function getNavigationGroup(): ?string
{
return __('Settings');
}
Expand Down Expand Up @@ -97,7 +97,7 @@ protected function getFormSchema(): array
];
}

protected function getSaveFormAction(): Action
public function getSaveFormAction(): Action
{
return parent::getSaveFormAction()->label(__('Save'));
}
Expand Down
4 changes: 2 additions & 2 deletions app/Filament/Pages/RoadMap.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ class RoadMap extends Page implements HasForms
'updateEpic'
];

protected static function getNavigationLabel(): string
public static function getNavigationLabel(): string
{
return __('Road Map');
}

protected static function getNavigationGroup(): ?string
public static function getNavigationGroup(): ?string
{
return __('Management');
}
Expand Down
10 changes: 5 additions & 5 deletions app/Filament/Pages/Scrum.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class Scrum extends Page implements HasForms
{
use InteractsWithForms, KanbanScrumHelper;

protected static ?string $navigationIcon = 'heroicon-o-view-boards';
protected static ?string $navigationIcon = 'heroicon-o-view-columns';

protected static ?string $slug = 'scrum/{project}';

Expand Down Expand Up @@ -43,7 +43,7 @@ public function mount(Project $project)
$this->form->fill();
}

protected function getActions(): array
protected function getHeaderActions(): array
{
return [
Action::make('manage-sprints')
Expand All @@ -57,20 +57,20 @@ protected function getActions(): array
->button()
->visible(fn() => $this->project->currentSprint)
->label(__('Refresh'))
->color('secondary')
->color('gray')
->action(function () {
$this->getRecords();
Filament::notify('success', __('Kanban board updated'));
}),
];
}

protected function getHeading(): string|Htmlable
public function getHeading(): string|Htmlable
{
return $this->scrumHeading();
}

protected function getSubheading(): string|Htmlable|null
public function getSubheading(): string|Htmlable|null
{
return $this->scrumSubHeading();
}
Expand Down
6 changes: 3 additions & 3 deletions app/Filament/Pages/TimesheetDashboard.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,17 @@ protected function getColumns(): int | array
return 6;
}

protected static function getNavigationLabel(): string
public static function getNavigationLabel(): string
{
return __('Dashboard');
}

protected static function getNavigationGroup(): ?string
public static function getNavigationGroup(): ?string
{
return __('Timesheet');
}

protected static function shouldRegisterNavigation(): bool
public static function shouldRegisterNavigation(): bool
{
return auth()->user()->can('View timesheet dashboard');
}
Expand Down
2 changes: 1 addition & 1 deletion app/Filament/Pages/TimesheetExport.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class TimesheetExport extends Page implements HasForms

protected static string $view = 'filament.pages.timesheet-export';

protected static function getNavigationGroup(): ?string
public static function getNavigationGroup(): ?string
{
return __('Timesheet');
}
Expand Down
8 changes: 4 additions & 4 deletions app/Filament/Resources/ActivityResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
use App\Filament\Resources\ActivityResource\RelationManagers;
use App\Models\Activity;
use Filament\Forms;
use Filament\Resources\Form;
use Filament\Forms\Form;
use Filament\Resources\Resource;
use Filament\Resources\Table;
use Filament\Tables\Table;
use Filament\Tables;

class ActivityResource extends Resource
Expand All @@ -19,7 +19,7 @@ class ActivityResource extends Resource

protected static ?int $navigationSort = 1;

protected static function getNavigationLabel(): string
public static function getNavigationLabel(): string
{
return __('Activities');
}
Expand All @@ -29,7 +29,7 @@ public static function getPluralLabel(): ?string
return static::getNavigationLabel();
}

protected static function getNavigationGroup(): ?string
public static function getNavigationGroup(): ?string
{
return __('Referential');
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class EditActivity extends EditRecord
{
protected static string $resource = ActivityResource::class;

protected function getActions(): array
protected function getHeaderActions(): array
{
return [
Actions\ViewAction::make(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class ListActivities extends ListRecords
{
protected static string $resource = ActivityResource::class;

protected function getActions(): array
protected function getHeaderActions(): array
{
return [
Actions\CreateAction::make(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class ViewActivity extends ViewRecord
{
protected static string $resource = ActivityResource::class;

protected function getActions(): array
protected function getHeaderActions(): array
{
return [
Actions\EditAction::make(),
Expand Down
10 changes: 5 additions & 5 deletions app/Filament/Resources/PermissionResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,20 @@
use App\Filament\Resources\PermissionResource\RelationManagers;
use App\Models\Permission;
use Filament\Forms;
use Filament\Resources\Form;
use Filament\Forms\Form;
use Filament\Resources\Resource;
use Filament\Resources\Table;
use Filament\Tables\Table;
use Filament\Tables;

class PermissionResource extends Resource
{
protected static ?string $model = Permission::class;

protected static ?string $navigationIcon = 'heroicon-o-clipboard-check';
protected static ?string $navigationIcon = 'heroicon-o-clipboard-document-check';

protected static ?int $navigationSort = 2;

protected static function getNavigationLabel(): string
public static function getNavigationLabel(): string
{
return __('Permissions');
}
Expand All @@ -29,7 +29,7 @@ public static function getPluralLabel(): ?string
return static::getNavigationLabel();
}

protected static function getNavigationGroup(): ?string
public static function getNavigationGroup(): ?string
{
return static::getPluralLabel();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class EditPermission extends EditRecord
{
protected static string $resource = PermissionResource::class;

protected function getActions(): array
protected function getHeaderActions(): array
{
return [
Actions\ViewAction::make(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class ListPermissions extends ListRecords
{
protected static string $resource = PermissionResource::class;

protected function getActions(): array
protected function getHeaderActions(): array
{
return [
Actions\CreateAction::make(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class ViewPermission extends ViewRecord
{
protected static string $resource = PermissionResource::class;

protected function getActions(): array
protected function getHeaderActions(): array
{
return [
Actions\EditAction::make(),
Expand Down
Loading