feat: add ID photocopy upload field to career application form with validation and database storage
This commit is contained in:
@@ -41,6 +41,7 @@ class CareerController extends Controller
|
||||
if ($request->type === 'job') {
|
||||
$rules['nda'] = 'required|file|mimes:pdf|max:5120';
|
||||
$rules['contract'] = 'required|file|mimes:pdf|max:5120';
|
||||
$rules['id_photocopy'] = 'required|file|mimes:pdf,jpg,jpeg,png|max:5120'; // Max 5MB
|
||||
$rules['git_knowledge'] = 'accepted';
|
||||
$rules['ai_usage'] = 'accepted';
|
||||
}
|
||||
@@ -50,6 +51,7 @@ class CareerController extends Controller
|
||||
$cvPath = $request->file('cv') ? $request->file('cv')->store('cvs', 'public') : null;
|
||||
$ndaPath = $request->file('nda') ? $request->file('nda')->store('ndas', 'public') : null;
|
||||
$contractPath = $request->file('contract') ? $request->file('contract')->store('contracts', 'public') : null;
|
||||
$idPhotocopyPath = $request->file('id_photocopy') ? $request->file('id_photocopy')->store('id_photocopies', 'public') : null;
|
||||
|
||||
CareerApplication::create([
|
||||
'name' => $request->name,
|
||||
@@ -59,6 +61,7 @@ class CareerController extends Controller
|
||||
'cv_path' => $cvPath,
|
||||
'nda_path' => $ndaPath,
|
||||
'contract_path' => $contractPath,
|
||||
'id_photocopy_path' => $idPhotocopyPath,
|
||||
'git_knowledge' => $request->has('git_knowledge'),
|
||||
'ai_usage' => $request->has('ai_usage'),
|
||||
'message' => $request->message,
|
||||
|
||||
@@ -17,6 +17,7 @@ class CareerApplication extends Model
|
||||
'cv_path',
|
||||
'nda_path',
|
||||
'contract_path',
|
||||
'id_photocopy_path',
|
||||
'git_knowledge',
|
||||
'ai_usage',
|
||||
'message',
|
||||
|
||||
+28
@@ -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('id_photocopy_path')->nullable()->after('contract_path');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('career_applications', function (Blueprint $table) {
|
||||
$table->dropColumn('id_photocopy_path');
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -59,6 +59,23 @@
|
||||
<div class="text-blue-800 space-y-4 leading-relaxed">
|
||||
<p>{!! __('career.intro_text_1') !!}</p>
|
||||
<p>{!! __('career.intro_text_2') !!}</p>
|
||||
<div class="bg-white/80 p-6 rounded-2xl border border-blue-100 my-6 space-y-4 text-sm shadow-sm">
|
||||
<span class="font-extrabold text-blue-950 block text-base"><i class="uil uil-shield-check text-lg mr-1 text-[#e31e24]"></i> Belgelerin Toplanma Amacı (KVKK Bilgilendirmesi)</span>
|
||||
<div class="grid grid-cols-1 md:grid-cols-3 gap-6">
|
||||
<div class="p-4 bg-slate-50/50 rounded-xl border border-slate-100">
|
||||
<span class="font-bold text-slate-800 block mb-2"><i class="uil uil-lock text-[#e31e24] mr-1"></i> 1. Gizlilik Sözleşmesi (NDA)</span>
|
||||
<p class="text-xs text-slate-600 leading-relaxed">Projelerimize ait kaynak kodları, veritabanı şemaları ve ticari sırlarımızın güvenliğini sağlamak amacıyla istenir.</p>
|
||||
</div>
|
||||
<div class="p-4 bg-slate-50/50 rounded-xl border border-slate-100">
|
||||
<span class="font-bold text-slate-800 block mb-2"><i class="uil uil-file-contract-sign text-blue-500 mr-1"></i> 2. Bağımsız Sözleşmeli Sözleşmesi</span>
|
||||
<p class="text-xs text-slate-600 leading-relaxed">Issue/task bazlı esnek çalışma modelinin koşullarını ve haklarınızı yasal olarak güvence altına almak için gereklidir.</p>
|
||||
</div>
|
||||
<div class="p-4 bg-slate-50/50 rounded-xl border border-slate-100">
|
||||
<span class="font-bold text-slate-800 block mb-2"><i class="uil uil-card-atm text-emerald-500 mr-1"></i> 3. Kimlik Fotokopisi</span>
|
||||
<p class="text-xs text-slate-600 leading-relaxed">Yasal kimlik doğrulama, imza yetkilisi tespiti ve sahte başvuruların önlenmesi amacıyla talep edilmektedir.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<p>{{ __('career.intro_text_3') }}</p>
|
||||
<p>{{ __('career.intro_text_4') }}</p>
|
||||
<p>{{ __('career.thanks') }}</p>
|
||||
@@ -291,6 +308,15 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- ID Photocopy Upload -->
|
||||
<div class="grid grid-cols-1 md:grid-cols-12 gap-6 items-center">
|
||||
<label for="id_photocopy" class="md:col-span-3 text-sm font-bold text-slate-700 md:text-right">{{ __('career.id_photocopy', ['default' => 'Kimlik Fotokopisi']) }} <span class="text-[#e31e24]">*</span></label>
|
||||
<div class="md:col-span-9">
|
||||
<input type="file" name="id_photocopy" id="id_photocopy" class="w-full px-5 py-2.5 rounded-xl border border-slate-200 file:mr-4 file:py-2 file:px-4 file:rounded-full file:border-0 file:text-xs file:font-semibold file:bg-red-50 file:text-[#e31e24] hover:file:bg-red-100 transition-all" required>
|
||||
<p class="mt-2 text-xs text-slate-400">{{ __('career.id_photocopy_description', ['default' => 'Önlü arkalı nüfus cüzdanı, yeni kimlik kartı veya ehliyet fotokopisi (PDF, JPG, PNG - Maks. 5MB)']) }}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Checkboxes -->
|
||||
<div class="grid grid-cols-1 md:grid-cols-12 gap-6">
|
||||
<div class="md:col-start-4 md:col-span-9 space-y-4">
|
||||
|
||||
Reference in New Issue
Block a user