feat: implement Change resource with CRUD functionality and migration
update image tags to v0.0.8 in build scripts and docker-compose files
This commit is contained in:
parent
64a7d1d2f4
commit
5b0e55c4b2
20 changed files with 408 additions and 88 deletions
18
app/Filament/Resources/Changes/Pages/CreateChange.php
Normal file
18
app/Filament/Resources/Changes/Pages/CreateChange.php
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
namespace App\Filament\Resources\Changes\Pages;
|
||||
|
||||
use App\Filament\Resources\Changes\ChangeResource;
|
||||
use Filament\Resources\Pages\CreateRecord;
|
||||
|
||||
class CreateChange extends CreateRecord
|
||||
{
|
||||
protected static string $resource = ChangeResource::class;
|
||||
|
||||
protected function mutateFormDataBeforeCreate(array $data): array
|
||||
{
|
||||
$data['user_id'] = auth()->id();
|
||||
|
||||
return $data;
|
||||
}
|
||||
}
|
||||
16
app/Filament/Resources/Changes/Pages/EditChange.php
Normal file
16
app/Filament/Resources/Changes/Pages/EditChange.php
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
<?php
|
||||
|
||||
namespace App\Filament\Resources\Changes\Pages;
|
||||
|
||||
use App\Filament\Resources\Changes\ChangeResource;
|
||||
use Filament\Resources\Pages\EditRecord;
|
||||
|
||||
class EditChange extends EditRecord
|
||||
{
|
||||
protected static string $resource = ChangeResource::class;
|
||||
|
||||
protected function getHeaderActions(): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
}
|
||||
19
app/Filament/Resources/Changes/Pages/ListChanges.php
Normal file
19
app/Filament/Resources/Changes/Pages/ListChanges.php
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
<?php
|
||||
|
||||
namespace App\Filament\Resources\Changes\Pages;
|
||||
|
||||
use App\Filament\Resources\Changes\ChangeResource;
|
||||
use Filament\Actions\CreateAction;
|
||||
use Filament\Resources\Pages\ListRecords;
|
||||
|
||||
class ListChanges extends ListRecords
|
||||
{
|
||||
protected static string $resource = ChangeResource::class;
|
||||
|
||||
protected function getHeaderActions(): array
|
||||
{
|
||||
return [
|
||||
CreateAction::make(),
|
||||
];
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue