Skip to content

Commit

Permalink
move admin panel to own namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
andreiio committed Oct 21, 2024
1 parent f1bf3b1 commit b3e6de0
Show file tree
Hide file tree
Showing 24 changed files with 49 additions and 49 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace App\Filament\Pages\Auth;
namespace App\Filament\Admin\Pages\Auth;

use Filament\Pages\Auth\Login as BaseLogin;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

declare(strict_types=1);

namespace App\Filament\Resources;
namespace App\Filament\Admin\Resources;

use App\Filament\Resources\CountryResource\Pages;
use App\Filament\Admin\Resources\CountryResource\Pages;
use App\Models\Country;
use Filament\Forms\Components\TagsInput;
use Filament\Forms\Components\TextInput;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

declare(strict_types=1);

namespace App\Filament\Resources\CountryResource\Pages;
namespace App\Filament\Admin\Resources\CountryResource\Pages;

use App\Filament\Resources\CountryResource;
use App\Filament\Admin\Resources\CountryResource;
use Filament\Actions;
use Filament\Resources\Pages\ManageRecords;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

declare(strict_types=1);

namespace App\Filament\Resources;
namespace App\Filament\Admin\Resources;

use App\Filament\Resources\CountyResource\Pages;
use App\Filament\Admin\Resources\CountyResource\Pages;
use App\Models\County;
use Filament\Forms\Components\TextInput;
use Filament\Forms\Form;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

declare(strict_types=1);

namespace App\Filament\Resources\CountyResource\Pages;
namespace App\Filament\Admin\Resources\CountyResource\Pages;

use App\Filament\Resources\CountyResource;
use App\Filament\Admin\Resources\CountyResource;
use Filament\Actions;
use Filament\Resources\Pages\ManageRecords;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

declare(strict_types=1);

namespace App\Filament\Resources;
namespace App\Filament\Admin\Resources;

use App\Filament\Resources\ElectionResource\Pages;
use App\Filament\Admin\Resources\ElectionResource\Pages;
use App\Models\Election;
use Filament\Forms;
use Filament\Forms\Components\Select;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

declare(strict_types=1);

namespace App\Filament\Resources\ElectionResource\Pages;
namespace App\Filament\Admin\Resources\ElectionResource\Pages;

use App\Filament\Resources\ElectionResource;
use App\Filament\Admin\Resources\ElectionResource;
use Filament\Resources\Pages\CreateRecord;

class CreateElection extends CreateRecord
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

declare(strict_types=1);

namespace App\Filament\Resources\ElectionResource\Pages;
namespace App\Filament\Admin\Resources\ElectionResource\Pages;

use App\Filament\Resources\ElectionResource;
use App\Filament\Admin\Resources\ElectionResource;
use Filament\Actions;
use Filament\Resources\Pages\EditRecord;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

declare(strict_types=1);

namespace App\Filament\Resources\ElectionResource\Pages;
namespace App\Filament\Admin\Resources\ElectionResource\Pages;

use App\Filament\Resources\ElectionResource;
use App\Filament\Admin\Resources\ElectionResource;
use Filament\Actions;
use Filament\Resources\Pages\ListRecords;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

declare(strict_types=1);

namespace App\Filament\Resources\ElectionResource\Pages;
namespace App\Filament\Admin\Resources\ElectionResource\Pages;

use App\Filament\Resources\ElectionResource;
use App\Filament\Admin\Resources\ElectionResource;
use Filament\Actions;
use Filament\Resources\Pages\ViewRecord;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

declare(strict_types=1);

namespace App\Filament\Resources;
namespace App\Filament\Admin\Resources;

use App\Filament\Resources\ElectionTypeResource\Pages;
use App\Filament\Admin\Resources\ElectionTypeResource\Pages;
use App\Models\ElectionType;
use Filament\Forms\Components\TextInput;
use Filament\Forms\Form;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

declare(strict_types=1);

namespace App\Filament\Resources\ElectionTypeResource\Pages;
namespace App\Filament\Admin\Resources\ElectionTypeResource\Pages;

use App\Filament\Resources\ElectionTypeResource;
use App\Filament\Admin\Resources\ElectionTypeResource;
use Filament\Actions;
use Filament\Resources\Pages\ManageRecords;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

declare(strict_types=1);

namespace App\Filament\Resources;
namespace App\Filament\Admin\Resources;

use App\Filament\Resources\LocalityResource\Pages;
use App\Filament\Admin\Resources\LocalityResource\Pages;
use App\Models\Locality;
use Filament\Forms\Components\Select;
use Filament\Forms\Components\TextInput;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

declare(strict_types=1);

namespace App\Filament\Resources\LocalityResource\Pages;
namespace App\Filament\Admin\Resources\LocalityResource\Pages;

use App\Filament\Resources\LocalityResource;
use App\Filament\Admin\Resources\LocalityResource;
use Filament\Actions;
use Filament\Resources\Pages\ManageRecords;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

declare(strict_types=1);

namespace App\Filament\Resources;
namespace App\Filament\Admin\Resources;

use App\Filament\Resources\PartyResource\Pages;
use App\Filament\Admin\Resources\PartyResource\Pages;
use App\Models\Party;
use Filament\Forms\Form;
use Filament\Resources\Resource;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

declare(strict_types=1);

namespace App\Filament\Resources\PartyResource\Pages;
namespace App\Filament\Admin\Resources\PartyResource\Pages;

use App\Filament\Resources\PartyResource;
use App\Filament\Admin\Resources\PartyResource;
use Filament\Actions;
use Filament\Resources\Pages\ManageRecords;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

declare(strict_types=1);

namespace App\Filament\Resources;
namespace App\Filament\Admin\Resources;

use App\Filament\Resources\TurnoutResource\Pages;
use App\Filament\Admin\Resources\TurnoutResource\Pages;
use App\Models\Turnout;
use Filament\Resources\Resource;
use Filament\Tables;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

declare(strict_types=1);

namespace App\Filament\Resources\TurnoutResource\Pages;
namespace App\Filament\Admin\Resources\TurnoutResource\Pages;

use App\Filament\Resources\TurnoutResource;
use App\Filament\Admin\Resources\TurnoutResource;
use Filament\Resources\Pages\ManageRecords;

class ManageTurnouts extends ManageRecords
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

declare(strict_types=1);

namespace App\Filament\Resources;
namespace App\Filament\Admin\Resources;

use App\Enums\User\Role;
use App\Filament\Resources\UserResource\Pages;
use App\Filament\Admin\Resources\UserResource\Pages;
use App\Models\User;
use Filament\Forms;
use Filament\Forms\Components\Group;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

declare(strict_types=1);

namespace App\Filament\Resources\UserResource\Pages;
namespace App\Filament\Admin\Resources\UserResource\Pages;

use App\Filament\Resources\UserResource;
use App\Filament\Admin\Resources\UserResource;
use Filament\Actions;
use Filament\Resources\Pages\EditRecord;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

declare(strict_types=1);

namespace App\Filament\Resources\UserResource\Pages;
namespace App\Filament\Admin\Resources\UserResource\Pages;

use App\Filament\Resources\UserResource;
use App\Filament\Admin\Resources\UserResource;
use Filament\Actions;
use Filament\Resources\Pages\ListRecords;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

declare(strict_types=1);

namespace App\Filament\Resources\UserResource\Pages;
namespace App\Filament\Admin\Resources\UserResource\Pages;

use App\Filament\Resources\UserResource;
use App\Filament\Admin\Resources\UserResource;
use Filament\Actions;
use Filament\Resources\Pages\ManageRecords;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

declare(strict_types=1);

namespace App\Filament\Resources\UserResource\Pages;
namespace App\Filament\Admin\Resources\UserResource\Pages;

use App\Filament\Resources\UserResource;
use App\Filament\Admin\Resources\UserResource;
use Filament\Actions;
use Filament\Resources\Pages\ViewRecord;

Expand Down
8 changes: 4 additions & 4 deletions app/Providers/Filament/AdminPanelProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace App\Providers\Filament;

use App\Filament\Pages\Auth\Login;
use App\Filament\Admin\Pages\Auth\Login;
use App\Models\Election;
use Filament\Forms\Components\DateTimePicker;
use Filament\Http\Middleware\Authenticate;
Expand Down Expand Up @@ -53,12 +53,12 @@ public function panel(Panel $panel): Panel
->myProfile(slug: 'profile')
->enableTwoFactorAuthentication(),
])
->discoverResources(in: app_path('Filament/Resources'), for: 'App\\Filament\\Resources')
->discoverPages(in: app_path('Filament/Pages'), for: 'App\\Filament\\Pages')
->discoverResources(in: app_path('Filament/Admin/Resources'), for: 'App\\Filament\\Admin\\Resources')
->discoverPages(in: app_path('Filament/Admin/Pages'), for: 'App\\Filament\\Admin\\Pages')
->pages([
Pages\Dashboard::class,
])
->discoverWidgets(in: app_path('Filament/Widgets'), for: 'App\\Filament\\Widgets')
->discoverWidgets(in: app_path('Filament/Admin/Widgets'), for: 'App\\Filament\\Admin\\Widgets')
->widgets([
Widgets\AccountWidget::class,
// Widgets\FilamentInfoWidget::class,
Expand Down

0 comments on commit b3e6de0

Please sign in to comment.