Skip to content

Commit 0c7238e

Browse files
authored
Merge pull request #13 from mihaisolomon/master
Edit ticket epic details.
2 parents ae0321d + a7d6a8e commit 0c7238e

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed

app/Filament/Resources/TicketResource.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
use App\Filament\Resources\TicketResource\Pages;
66
use App\Filament\Resources\TicketResource\RelationManagers;
7+
use App\Models\Epic;
78
use App\Models\Project;
89
use App\Models\Ticket;
910
use App\Models\TicketPriority;
@@ -82,7 +83,13 @@ public static function form(Form $form): Form
8283
)
8384
->default(fn() => request()->get('project'))
8485
->required(),
85-
86+
Forms\Components\Select::make('epic_id')
87+
->label(__('Epic'))
88+
->searchable()
89+
->reactive()
90+
->options(function ($get, $set) {
91+
return Epic::where('project_id', $get('project_id'))->pluck('name', 'id')->toArray();
92+
}),
8693
Forms\Components\Grid::make()
8794
->columns(12)
8895
->columnSpan(2)

resources/views/filament/resources/tickets/view.blade.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,19 @@ class="flex items-center gap-1 text-gray-500 hover:text-gray-700 font-medium tex
7474
</div>
7575
</div>
7676

77+
<div class="w-full flex flex-col gap-1 pt-3">
78+
<span class="text-gray-500 text-sm font-medium">
79+
{{ __('Epic') }}
80+
</span>
81+
<div class="w-full flex items-center gap-1 text-gray-500">
82+
@if($record->epic)
83+
{{ $record->epic->name }}
84+
@else
85+
-
86+
@endif
87+
</div>
88+
</div>
89+
7790
<div class="w-full flex flex-col gap-1 pt-3">
7891
<span class="text-gray-500 text-sm font-medium">
7992
{{ __('Estimation') }}

0 commit comments

Comments
 (0)