Skip to content

Commit

Permalink
fix issue no #32
Browse files Browse the repository at this point in the history
  • Loading branch information
gheorghelupu17 committed Jun 25, 2023
1 parent 798e142 commit 56f6c4d
Show file tree
Hide file tree
Showing 61 changed files with 275 additions and 190 deletions.
3 changes: 2 additions & 1 deletion app/Enums/VolunteerStatus.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
<?php

declare(strict_types=1);

namespace App\Enums;

enum VolunteerStatus: string
{
case pending = 'pending';
case active = 'active';
case inactive = 'inactive';

}
7 changes: 3 additions & 4 deletions app/Filament/Resources/ArticleResource.php
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
<?php

declare(strict_types=1);

namespace App\Filament\Resources;

use App\Filament\Resources\ArticleResource\Pages;
use App\Filament\Resources\ArticleResource\RelationManagers;
use App\Models\Article;
use Filament\Forms;
use Filament\Resources\Form;
use Filament\Resources\Resource;
use Filament\Resources\Table;
use Filament\Tables;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\SoftDeletingScope;

class ArticleResource extends Resource
{
protected static ?string $model = Article::class;

protected static ?string $navigationGroup = 'Administrează';

protected static ?int $navigationSort = 7;

protected static ?string $navigationIcon = 'heroicon-o-collection';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<?php

declare(strict_types=1);

namespace App\Filament\Resources\ArticleResource\Pages;

use App\Filament\Resources\ArticleResource;
use Filament\Pages\Actions;
use Filament\Resources\Pages\CreateRecord;

class CreateArticle extends CreateRecord
Expand Down
2 changes: 2 additions & 0 deletions app/Filament/Resources/ArticleResource/Pages/EditArticle.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace App\Filament\Resources\ArticleResource\Pages;

use App\Filament\Resources\ArticleResource;
Expand Down
2 changes: 2 additions & 0 deletions app/Filament/Resources/ArticleResource/Pages/ListArticles.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace App\Filament\Resources\ArticleResource\Pages;

use App\Filament\Resources\ArticleResource;
Expand Down
7 changes: 3 additions & 4 deletions app/Filament/Resources/BadgeResource.php
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
<?php

declare(strict_types=1);

namespace App\Filament\Resources;

use App\Filament\Resources\BadgeResource\Pages;
use App\Filament\Resources\BadgeResource\RelationManagers;
use App\Models\Badge;
use Filament\Forms;
use Filament\Resources\Form;
use Filament\Resources\Resource;
use Filament\Resources\Table;
use Filament\Tables;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\SoftDeletingScope;

class BadgeResource extends Resource
{
protected static ?string $model = Badge::class;

protected static ?string $navigationGroup = 'Administrează';

protected static ?int $navigationSort = 5;

protected static ?string $navigationIcon = 'heroicon-o-collection';
Expand Down
3 changes: 2 additions & 1 deletion app/Filament/Resources/BadgeResource/Pages/CreateBadge.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<?php

declare(strict_types=1);

namespace App\Filament\Resources\BadgeResource\Pages;

use App\Filament\Resources\BadgeResource;
use Filament\Pages\Actions;
use Filament\Resources\Pages\CreateRecord;

class CreateBadge extends CreateRecord
Expand Down
2 changes: 2 additions & 0 deletions app/Filament/Resources/BadgeResource/Pages/EditBadge.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace App\Filament\Resources\BadgeResource\Pages;

use App\Filament\Resources\BadgeResource;
Expand Down
2 changes: 2 additions & 0 deletions app/Filament/Resources/BadgeResource/Pages/ListBadges.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace App\Filament\Resources\BadgeResource\Pages;

use App\Filament\Resources\BadgeResource;
Expand Down
34 changes: 17 additions & 17 deletions app/Filament/Resources/ChampionshipResource.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<?php

declare(strict_types=1);

namespace App\Filament\Resources;

use App\Filament\Resources\ChampionshipResource\Pages;
use App\Filament\Resources\ChampionshipResource\RelationManagers;
use App\Filament\Resources\ChampionshipResource\RelationManagers\ArticlesRelationManager;
use App\Filament\Resources\ChampionshipResource\RelationManagers\ProjectsRelationManager;
use App\Filament\Resources\ChampionshipResource\RelationManagers\StagesRelationManager;
Expand All @@ -14,21 +15,22 @@
use Filament\Resources\Resource;
use Filament\Resources\Table;
use Filament\Tables;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\SoftDeletingScope;

class ChampionshipResource extends Resource
{
protected static ?string $model = Championship::class;

protected static ?string $navigationGroup = 'Campionatul de bine';

protected static ?int $navigationSort = 12;

protected static ?string $navigationIcon = 'heroicon-o-collection';

protected static ?string $label = 'Listă ediți';

protected static ?string $pluralLabel = 'Listă ediții';
protected static ?string $navigationLabel ='Ediții anterioare';

protected static ?string $navigationLabel = 'Ediții anterioare';

public static function form(Form $form): Form
{
Expand All @@ -55,21 +57,21 @@ public static function table(Table $table): Table
return $table
->columns([
Tables\Columns\TextColumn::make('name')->label('Denumire ediție'),
// Tables\Columns\TextColumn::make('description'),
// Tables\Columns\TextColumn::make('description'),

Tables\Columns\TextColumn::make('start_date')->label('Dată început')
->date(),
Tables\Columns\TextColumn::make('end_date')->label('Dată final')
->date(),
//
// Tables\Columns\IconColumn::make('is_current')
// ->boolean(),
// Tables\Columns\IconColumn::make('needs_approval')
// ->boolean(),
// Tables\Columns\TextColumn::make('created_at')
// ->dateTime(),
// Tables\Columns\TextColumn::make('updated_at')
// ->dateTime(),
//
// Tables\Columns\IconColumn::make('is_current')
// ->boolean(),
// Tables\Columns\IconColumn::make('needs_approval')
// ->boolean(),
// Tables\Columns\TextColumn::make('created_at')
// ->dateTime(),
// Tables\Columns\TextColumn::make('updated_at')
// ->dateTime(),
])
->filters([
//
Expand All @@ -91,11 +93,10 @@ public static function getRelations(): array
StagesRelationManager::class,
ProjectsRelationManager::class,
TestimonialsRelationManager::class,
ArticlesRelationManager::class
ArticlesRelationManager::class,
];
}


public static function getPages(): array
{
return [
Expand All @@ -104,5 +105,4 @@ public static function getPages(): array
'edit' => Pages\EditChampionship::route('/{record}/edit'),
];
}

}
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<?php

declare(strict_types=1);

namespace App\Filament\Resources\ChampionshipResource\Pages;

use App\Filament\Resources\ChampionshipResource;
use Filament\Pages\Actions;
use Filament\Resources\Pages\CreateRecord;

class CreateChampionship extends CreateRecord
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace App\Filament\Resources\ChampionshipResource\Pages;

use App\Filament\Resources\ChampionshipResource;
Expand All @@ -16,6 +18,7 @@ protected function getActions(): array
Actions\DeleteAction::make(),
];
}

public function hasCombinedRelationManagerTabsWithForm(): bool
{
return true;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace App\Filament\Resources\ChampionshipResource\Pages;

use App\Filament\Resources\ChampionshipResource;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<?php

declare(strict_types=1);

namespace App\Filament\Resources\ChampionshipResource\RelationManagers;

use Filament\Forms;
use Filament\Resources\Form;
use Filament\Resources\RelationManagers\RelationManager;
use Filament\Resources\Table;
use Filament\Tables;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\SoftDeletingScope;

class ArticlesRelationManager extends RelationManager
{
Expand Down Expand Up @@ -48,5 +48,5 @@ public static function table(Table $table): Table
Tables\Actions\DissociateBulkAction::make(),
Tables\Actions\DeleteBulkAction::make(),
]);
}
}
}
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<?php

declare(strict_types=1);

namespace App\Filament\Resources\ChampionshipResource\RelationManagers;

use Filament\Forms;
use Filament\Resources\Form;
use Filament\Resources\RelationManagers\RelationManager;
use Filament\Resources\Table;
use Filament\Tables;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\SoftDeletingScope;

class ProjectsRelationManager extends RelationManager
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<?php

declare(strict_types=1);

namespace App\Filament\Resources\ChampionshipResource\RelationManagers;

use Filament\Forms;
use Filament\Resources\Form;
use Filament\Resources\RelationManagers\RelationManager;
use Filament\Resources\Table;
use Filament\Tables;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\SoftDeletingScope;

class StagesRelationManager extends RelationManager
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<?php

declare(strict_types=1);

namespace App\Filament\Resources\ChampionshipResource\RelationManagers;

use Filament\Forms;
use Filament\Resources\Form;
use Filament\Resources\RelationManagers\RelationManager;
use Filament\Resources\Table;
use Filament\Tables;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\SoftDeletingScope;

class TestimonialsRelationManager extends RelationManager
{
Expand Down Expand Up @@ -48,5 +48,5 @@ public static function table(Table $table): Table
Tables\Actions\DissociateBulkAction::make(),
Tables\Actions\DeleteBulkAction::make(),
]);
}
}
}
7 changes: 3 additions & 4 deletions app/Filament/Resources/DonationResource.php
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
<?php

declare(strict_types=1);

namespace App\Filament\Resources;

use App\Filament\Resources\DonationResource\Pages;
use App\Filament\Resources\DonationResource\RelationManagers;
use App\Models\Donation;
use Filament\Forms;
use Filament\Resources\Form;
use Filament\Resources\Resource;
use Filament\Resources\Table;
use Filament\Tables;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\SoftDeletingScope;

class DonationResource extends Resource
{
protected static ?string $model = Donation::class;

protected static ?string $navigationGroup = 'Administrează';

protected static ?int $navigationSort = 4;

protected static ?string $navigationIcon = 'heroicon-o-collection';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<?php

declare(strict_types=1);

namespace App\Filament\Resources\DonationResource\Pages;

use App\Filament\Resources\DonationResource;
use Filament\Pages\Actions;
use Filament\Resources\Pages\CreateRecord;

class CreateDonation extends CreateRecord
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace App\Filament\Resources\DonationResource\Pages;

use App\Filament\Resources\DonationResource;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace App\Filament\Resources\DonationResource\Pages;

use App\Filament\Resources\DonationResource;
Expand Down
Loading

0 comments on commit 56f6c4d

Please sign in to comment.