Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Edit ticket epic details. #13

Merged
merged 1 commit into from
Jan 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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