From a7d6a8ed72a02a6ef530eb956e93cd0aa896ddd7 Mon Sep 17 00:00:00 2001 From: Mihai Solomon Date: Mon, 2 Jan 2023 15:26:09 +0200 Subject: [PATCH] Edit ticket epic details. --- app/Filament/Resources/TicketResource.php | 9 ++++++++- .../views/filament/resources/tickets/view.blade.php | 13 +++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/app/Filament/Resources/TicketResource.php b/app/Filament/Resources/TicketResource.php index 9094bac6..c24e6261 100644 --- a/app/Filament/Resources/TicketResource.php +++ b/app/Filament/Resources/TicketResource.php @@ -4,6 +4,7 @@ use App\Filament\Resources\TicketResource\Pages; use App\Filament\Resources\TicketResource\RelationManagers; +use App\Models\Epic; use App\Models\Project; use App\Models\Ticket; use App\Models\TicketPriority; @@ -82,7 +83,13 @@ public static function form(Form $form): Form ) ->default(fn() => request()->get('project')) ->required(), - + Forms\Components\Select::make('epic_id') + ->label(__('Epic')) + ->searchable() + ->reactive() + ->options(function ($get, $set) { + return Epic::where('project_id', $get('project_id'))->pluck('name', 'id')->toArray(); + }), Forms\Components\Grid::make() ->columns(12) ->columnSpan(2) diff --git a/resources/views/filament/resources/tickets/view.blade.php b/resources/views/filament/resources/tickets/view.blade.php index d5a1c6ea..4743383d 100644 --- a/resources/views/filament/resources/tickets/view.blade.php +++ b/resources/views/filament/resources/tickets/view.blade.php @@ -74,6 +74,19 @@ class="flex items-center gap-1 text-gray-500 hover:text-gray-700 font-medium tex +
+ + {{ __('Epic') }} + +
+ @if($record->epic) + {{ $record->epic->name }} + @else + - + @endif +
+
+
{{ __('Estimation') }}