feat: add application type field to career applications and implement status filtering in admin panel

This commit is contained in:
Ümit Tunç
2026-05-11 08:28:48 +03:00
parent 932bb89454
commit 5f26e76143
7 changed files with 54 additions and 1 deletions
@@ -30,6 +30,16 @@ class CareerApplicationsTable
TextColumn::make('phone')
->label(__('career.phone'))
->searchable(),
TextColumn::make('type')
->label(__('career.type'))
->badge()
->color(fn (string $state): string => match ($state) {
'job' => 'success',
'internship' => 'warning',
default => 'gray',
})
->formatStateUsing(fn (string $state): string => __("career.{$state}")),
TextColumn::make('status')
->label(__('career.status'))
@@ -56,6 +66,12 @@ class CareerApplicationsTable
'rejected' => 'Rejected',
'accepted' => 'Accepted',
]),
SelectFilter::make('type')
->label(__('career.type'))
->options([
'job' => __('career.job'),
'internship' => __('career.internship'),
]),
])
->actions([
Action::make('download_cv')
+2 -1
View File
@@ -47,8 +47,9 @@ class CareerController extends Controller
'name' => $request->name,
'email' => $request->email,
'phone' => $request->phone,
'type' => $request->type ?? 'job',
'cv_path' => $cvPath,
'message' => ($request->type === 'internship' ? "[STAJ BAŞVURUSU] " : "") . $request->message,
'message' => $request->message,
'status' => 'pending',
]);
+1
View File
@@ -13,6 +13,7 @@ class CareerApplication extends Model
'name',
'email',
'phone',
'type',
'cv_path',
'message',
'status',