Skip to content

Commit

Permalink
Merge pull request #13 from mihaisolomon/master
Browse files Browse the repository at this point in the history
Edit ticket epic details.
  • Loading branch information
heloufir authored Jan 3, 2023
2 parents ae0321d + a7d6a8e commit 0c7238e
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
9 changes: 8 additions & 1 deletion app/Filament/Resources/TicketResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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)
Expand Down
13 changes: 13 additions & 0 deletions resources/views/filament/resources/tickets/view.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,19 @@ class="flex items-center gap-1 text-gray-500 hover:text-gray-700 font-medium tex
</div>
</div>

<div class="w-full flex flex-col gap-1 pt-3">
<span class="text-gray-500 text-sm font-medium">
{{ __('Epic') }}
</span>
<div class="w-full flex items-center gap-1 text-gray-500">
@if($record->epic)
{{ $record->epic->name }}
@else
-
@endif
</div>
</div>

<div class="w-full flex flex-col gap-1 pt-3">
<span class="text-gray-500 text-sm font-medium">
{{ __('Estimation') }}
Expand Down

0 comments on commit 0c7238e

Please sign in to comment.