feat: add application type field to career applications and implement status filtering in admin panel
This commit is contained in:
@@ -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')
|
||||
|
||||
@@ -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',
|
||||
]);
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@ class CareerApplication extends Model
|
||||
'name',
|
||||
'email',
|
||||
'phone',
|
||||
'type',
|
||||
'cv_path',
|
||||
'message',
|
||||
'status',
|
||||
|
||||
Reference in New Issue
Block a user