Compare commits
No commits in common. "b59bea841af6761026cd1bdb7abaeb0f9e6d524b" and "cf2c953fab7b559a594a080062c4f961c9507dc7" have entirely different histories.
b59bea841a
...
cf2c953fab
@ -8,11 +8,14 @@ use Filament\Forms\Components\DatePicker;
|
|||||||
use Filament\Forms\Components\Hidden;
|
use Filament\Forms\Components\Hidden;
|
||||||
use Filament\Forms\Components\MorphToSelect;
|
use Filament\Forms\Components\MorphToSelect;
|
||||||
use Filament\Forms\Components\RichEditor;
|
use Filament\Forms\Components\RichEditor;
|
||||||
|
use Filament\Forms\Components\RichEditor\RichEditorTool;
|
||||||
use Filament\Forms\Components\Select;
|
use Filament\Forms\Components\Select;
|
||||||
use Filament\Forms\Components\TextInput;
|
use Filament\Forms\Components\TextInput;
|
||||||
|
use Filament\Forms\Components\Textarea;
|
||||||
use Filament\Forms\Components\Toggle;
|
use Filament\Forms\Components\Toggle;
|
||||||
use Filament\Schemas\Components\Section;
|
use Filament\Schemas\Components\Section;
|
||||||
use Filament\Schemas\Schema;
|
use Filament\Schemas\Schema;
|
||||||
|
use Random\Engine\Secure;
|
||||||
|
|
||||||
class TodoForm
|
class TodoForm
|
||||||
{
|
{
|
||||||
|
|||||||
@ -28,7 +28,7 @@ class TodosTable
|
|||||||
TextColumn::make('user.name')
|
TextColumn::make('user.name')
|
||||||
->searchable(),
|
->searchable(),
|
||||||
TextColumn::make('todoable.name')
|
TextColumn::make('todoable.name')
|
||||||
->label('Zugewiesen')
|
->label('Zugewiesen')
|
||||||
->searchable(),
|
->searchable(),
|
||||||
TextColumn::make('due_date')
|
TextColumn::make('due_date')
|
||||||
->date()
|
->date()
|
||||||
|
|||||||
@ -2,14 +2,13 @@
|
|||||||
|
|
||||||
namespace App\Models;
|
namespace App\Models;
|
||||||
|
|
||||||
use App\Observers\TodoObserver;
|
|
||||||
use Illuminate\Database\Eloquent\Attributes\Fillable;
|
use Illuminate\Database\Eloquent\Attributes\Fillable;
|
||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||||
use Illuminate\Database\Eloquent\Relations\MorphTo;
|
use Illuminate\Database\Eloquent\Relations\MorphTo;
|
||||||
|
use Override;
|
||||||
|
|
||||||
#[Fillable('name', 'content', 'user_id', 'todoable_type', 'todoable_id', 'due_date', 'done_date', 'follow_up', 'review')]
|
#[Fillable('name', 'content', 'user_id', 'todoable_type', 'todoable_id', 'due_date', 'done_date', 'follow_up', 'review')]
|
||||||
#[ObservedBy([TodoObserver::class])]
|
|
||||||
class Todo extends Model
|
class Todo extends Model
|
||||||
{
|
{
|
||||||
public function todoable(): MorphTo
|
public function todoable(): MorphTo
|
||||||
@ -17,8 +16,8 @@ class Todo extends Model
|
|||||||
return $this->morphTo();
|
return $this->morphTo();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function user(): BelongsTo
|
public function user(): BelongsTo {
|
||||||
{
|
|
||||||
return $this->belongsTo(User::class);
|
return $this->belongsTo(User::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,48 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Observers;
|
|
||||||
|
|
||||||
use App\Models\Todo;
|
|
||||||
|
|
||||||
class TodoObserver
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Handle the Todo "created" event.
|
|
||||||
*/
|
|
||||||
public function created(Todo $todo): void
|
|
||||||
{
|
|
||||||
//
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Handle the Todo "updated" event.
|
|
||||||
*/
|
|
||||||
public function updated(Todo $todo): void
|
|
||||||
{
|
|
||||||
//
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Handle the Todo "deleted" event.
|
|
||||||
*/
|
|
||||||
public function deleted(Todo $todo): void
|
|
||||||
{
|
|
||||||
//
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Handle the Todo "restored" event.
|
|
||||||
*/
|
|
||||||
public function restored(Todo $todo): void
|
|
||||||
{
|
|
||||||
//
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Handle the Todo "force deleted" event.
|
|
||||||
*/
|
|
||||||
public function forceDeleted(Todo $todo): void
|
|
||||||
{
|
|
||||||
//
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Loading…
Reference in New Issue
Block a user