-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add more filtering options for admin, invitees and table types
- Loading branch information
Showing
43 changed files
with
1,326 additions
and
252 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php | ||
|
||
namespace App\Events; | ||
|
||
use App\Models\Application; | ||
use App\Models\User; | ||
use Illuminate\Foundation\Events\Dispatchable; | ||
|
||
class ApplicationCancelledEvent | ||
{ | ||
use Dispatchable; | ||
|
||
public Application $application; | ||
|
||
public function __construct(Application $application) | ||
{ | ||
$this->application = $application; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php | ||
|
||
namespace App\Events; | ||
|
||
use App\Models\Application; | ||
use App\Models\User; | ||
use Illuminate\Foundation\Events\Dispatchable; | ||
|
||
class ApplicationCreatedEvent | ||
{ | ||
use Dispatchable; | ||
|
||
public Application $application; | ||
|
||
public function __construct(Application $application) | ||
{ | ||
$this->application = $application; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php | ||
|
||
namespace App\Events; | ||
|
||
use App\Models\Application; | ||
use App\Models\User; | ||
use Illuminate\Foundation\Events\Dispatchable; | ||
|
||
class ApplicationUpdatedEvent | ||
{ | ||
use Dispatchable; | ||
|
||
public Application $application; | ||
|
||
public function __construct(Application $application) | ||
{ | ||
$this->application = $application; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php | ||
|
||
namespace App\Events; | ||
|
||
use App\Models\Application; | ||
use App\Models\User; | ||
use Illuminate\Foundation\Events\Dispatchable; | ||
|
||
class ChildAddedEvent | ||
{ | ||
use Dispatchable; | ||
|
||
public Application $child; | ||
|
||
public function __construct(Application $child) | ||
{ | ||
$this->child = $child; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php | ||
|
||
namespace App\Events; | ||
|
||
use App\Models\Application; | ||
use App\Models\User; | ||
use Illuminate\Foundation\Events\Dispatchable; | ||
|
||
class ChildRemovedEvent | ||
{ | ||
use Dispatchable; | ||
|
||
public Application $child; | ||
|
||
public function __construct(Application $child) | ||
{ | ||
$this->child = $child; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 48 additions & 0 deletions
48
app/Filament/Resources/ApplicationResource/RelationManagers/ChildrenRelationManager.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<?php | ||
|
||
namespace App\Filament\Resources\ApplicationResource\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 ChildrenRelationManager extends RelationManager | ||
{ | ||
protected static string $relationship = 'children'; | ||
|
||
protected static ?string $title = "Shares and Assistants"; | ||
protected static ?string $label = "application"; | ||
protected static ?string $recordTitleAttribute = 'user.name'; | ||
|
||
public static function form(Form $form): Form | ||
{ | ||
return $form | ||
->schema([ | ||
Forms\Components\TextInput::make('user.name') | ||
->required() | ||
->maxLength(255), | ||
]); | ||
} | ||
|
||
public static function table(Table $table): Table | ||
{ | ||
return $table | ||
->columns([ | ||
Tables\Columns\TextColumn::make('user.name'), | ||
]) | ||
->filters([ | ||
// | ||
]) | ||
->headerActions([ | ||
]) | ||
->actions([ | ||
Tables\Actions\Action::make('Show'), | ||
]) | ||
->bulkActions([ | ||
]); | ||
} | ||
} |
Oops, something went wrong.