feat: add application type field to career applications and implement status filtering in admin panel
This commit is contained in:
@@ -31,6 +31,16 @@ class CareerApplicationsTable
|
|||||||
->label(__('career.phone'))
|
->label(__('career.phone'))
|
||||||
->searchable(),
|
->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')
|
TextColumn::make('status')
|
||||||
->label(__('career.status'))
|
->label(__('career.status'))
|
||||||
->badge()
|
->badge()
|
||||||
@@ -56,6 +66,12 @@ class CareerApplicationsTable
|
|||||||
'rejected' => 'Rejected',
|
'rejected' => 'Rejected',
|
||||||
'accepted' => 'Accepted',
|
'accepted' => 'Accepted',
|
||||||
]),
|
]),
|
||||||
|
SelectFilter::make('type')
|
||||||
|
->label(__('career.type'))
|
||||||
|
->options([
|
||||||
|
'job' => __('career.job'),
|
||||||
|
'internship' => __('career.internship'),
|
||||||
|
]),
|
||||||
])
|
])
|
||||||
->actions([
|
->actions([
|
||||||
Action::make('download_cv')
|
Action::make('download_cv')
|
||||||
|
|||||||
@@ -47,8 +47,9 @@ class CareerController extends Controller
|
|||||||
'name' => $request->name,
|
'name' => $request->name,
|
||||||
'email' => $request->email,
|
'email' => $request->email,
|
||||||
'phone' => $request->phone,
|
'phone' => $request->phone,
|
||||||
|
'type' => $request->type ?? 'job',
|
||||||
'cv_path' => $cvPath,
|
'cv_path' => $cvPath,
|
||||||
'message' => ($request->type === 'internship' ? "[STAJ BAŞVURUSU] " : "") . $request->message,
|
'message' => $request->message,
|
||||||
'status' => 'pending',
|
'status' => 'pending',
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ class CareerApplication extends Model
|
|||||||
'name',
|
'name',
|
||||||
'email',
|
'email',
|
||||||
'phone',
|
'phone',
|
||||||
|
'type',
|
||||||
'cv_path',
|
'cv_path',
|
||||||
'message',
|
'message',
|
||||||
'status',
|
'status',
|
||||||
|
|||||||
@@ -0,0 +1,28 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*/
|
||||||
|
public function up(): void
|
||||||
|
{
|
||||||
|
Schema::table('career_applications', function (Blueprint $table) {
|
||||||
|
$table->string('type')->default('job')->after('phone'); // job, internship
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*/
|
||||||
|
public function down(): void
|
||||||
|
{
|
||||||
|
Schema::table('career_applications', function (Blueprint $table) {
|
||||||
|
$table->dropColumn('type');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -16,6 +16,9 @@ return [
|
|||||||
'cv' => 'Curriculum Vitae (CV)',
|
'cv' => 'Curriculum Vitae (CV)',
|
||||||
'message' => 'Message',
|
'message' => 'Message',
|
||||||
'status' => 'Status',
|
'status' => 'Status',
|
||||||
|
'type' => 'Application Type',
|
||||||
|
'job' => 'Job Application',
|
||||||
|
'internship' => 'Internship Application',
|
||||||
'submit' => 'Submit Application',
|
'submit' => 'Submit Application',
|
||||||
'success_message' => 'Your application has been received successfully. Thank you.',
|
'success_message' => 'Your application has been received successfully. Thank you.',
|
||||||
'download_cv' => 'Download CV',
|
'download_cv' => 'Download CV',
|
||||||
|
|||||||
@@ -16,6 +16,9 @@ return [
|
|||||||
'cv' => 'Özgeçmiş (CV)',
|
'cv' => 'Özgeçmiş (CV)',
|
||||||
'message' => 'Mesaj',
|
'message' => 'Mesaj',
|
||||||
'status' => 'Durum',
|
'status' => 'Durum',
|
||||||
|
'type' => 'Başvuru Türü',
|
||||||
|
'job' => 'İş Başvurusu',
|
||||||
|
'internship' => 'Staj Başvurusu',
|
||||||
'submit' => 'Başvuruyu Gönder',
|
'submit' => 'Başvuruyu Gönder',
|
||||||
'success_message' => 'Başvurunuz başarıyla alındı. Teşekkür ederiz.',
|
'success_message' => 'Başvurunuz başarıyla alındı. Teşekkür ederiz.',
|
||||||
'download_cv' => 'CV İndir',
|
'download_cv' => 'CV İndir',
|
||||||
|
|||||||
@@ -36,6 +36,7 @@
|
|||||||
|
|
||||||
<form action="{{ route('career.store') }}" method="POST" enctype="multipart/form-data" class="career-form" id="career-application-form">
|
<form action="{{ route('career.store') }}" method="POST" enctype="multipart/form-data" class="career-form" id="career-application-form">
|
||||||
@csrf
|
@csrf
|
||||||
|
<input type="hidden" name="type" value="job">
|
||||||
|
|
||||||
<!-- Personal Info Group -->
|
<!-- Personal Info Group -->
|
||||||
<div class="row mb-8 align-items-center">
|
<div class="row mb-8 align-items-center">
|
||||||
|
|||||||
Reference in New Issue
Block a user