feat: restrict verification page view to accepted applications only
This commit is contained in:
@@ -3,6 +3,7 @@
|
|||||||
@section('content')
|
@section('content')
|
||||||
<link href="https://fonts.googleapis.com/css2?family=Cinzel:wght@500;700;800;900&family=Inter:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,500;0,700;1,400&display=swap" rel="stylesheet">
|
<link href="https://fonts.googleapis.com/css2?family=Cinzel:wght@500;700;800;900&family=Inter:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,500;0,700;1,400&display=swap" rel="stylesheet">
|
||||||
|
|
||||||
|
@if($application->status === 'accepted')
|
||||||
<div class="bg-slate-100 py-12 no-print">
|
<div class="bg-slate-100 py-12 no-print">
|
||||||
<div class="container max-w-6xl mx-auto px-4">
|
<div class="container max-w-6xl mx-auto px-4">
|
||||||
<!-- Verification Banner (e-Devlet Style) -->
|
<!-- Verification Banner (e-Devlet Style) -->
|
||||||
@@ -25,82 +26,6 @@
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- ================= PAGE 3: STAJ DEFTERİ (PORTRAIT A4) ================= -->
|
|
||||||
@if($application->notebook_approved || $application->notebook_supervisor_signed || $application->notebook_unit_signed)
|
|
||||||
<div class="notebook-container-wrapper overflow-hidden w-full flex justify-center items-start mt-8">
|
|
||||||
<div id="notebook-node" class="transcript-page bg-white rounded-[2rem] shadow-2xl p-6 md:p-8 relative overflow-hidden mx-auto">
|
|
||||||
|
|
||||||
<!-- Thin border decor for notebook -->
|
|
||||||
<div class="absolute inset-4 border border-slate-100 rounded-[1.5rem] pointer-events-none"></div>
|
|
||||||
|
|
||||||
<div class="relative z-10 flex flex-col justify-between h-full text-slate-700">
|
|
||||||
<div>
|
|
||||||
<!-- Header -->
|
|
||||||
<div class="flex justify-between items-center pb-2 border-b border-slate-100 mb-3">
|
|
||||||
<div>
|
|
||||||
<h2 class="font-serif font-bold text-slate-900 transcript-header-title">ONAYLI STAJ DEFTERİ RAPORU</h2>
|
|
||||||
<p class="text-slate-400 tracking-wider mt-0.5 transcript-header-subtitle">DİJİTAL İMZALI VE ONAYLI STAJ RAPORLARI</p>
|
|
||||||
</div>
|
|
||||||
<img src="{{ asset('logos/truncgil-yatay.svg') }}" alt="Trunçgil Logo" class="h-6 object-contain">
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- Signatures Information -->
|
|
||||||
<div class="bg-emerald-50 border border-emerald-200 rounded-xl p-3 mb-4 flex justify-between items-center">
|
|
||||||
<div>
|
|
||||||
<span class="text-xs font-extrabold text-emerald-800 uppercase block tracking-wider">Dijital İmza Durumu</span>
|
|
||||||
<span class="text-[10px] text-emerald-600 font-semibold block mt-0.5">Bu staj defteri yetkililer tarafından elektronik olarak imzalanmıştır.</span>
|
|
||||||
</div>
|
|
||||||
<div class="flex gap-2">
|
|
||||||
@if($application->notebook_supervisor_signed)
|
|
||||||
<span class="inline-flex px-2 py-1 rounded bg-emerald-100 text-emerald-800 text-[8px] font-extrabold uppercase border border-emerald-200">
|
|
||||||
Sorumlu: {{ $application->notebook_supervisor_name ?: 'Alperen Trunç' }}
|
|
||||||
</span>
|
|
||||||
@endif
|
|
||||||
@if($application->notebook_unit_signed)
|
|
||||||
<span class="inline-flex px-2 py-1 rounded bg-emerald-100 text-emerald-800 text-[8px] font-extrabold uppercase border border-emerald-200">
|
|
||||||
Yetkili: {{ $application->notebook_unit_name ?: 'Birim Yetkilisi' }}
|
|
||||||
</span>
|
|
||||||
@endif
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- Notebook Days content overview -->
|
|
||||||
<div class="overflow-y-auto max-h-[700px] pr-2 no-scrollbar space-y-4">
|
|
||||||
@foreach($days as $day)
|
|
||||||
@php
|
|
||||||
$entry = $savedEntries->get($day['day_number']);
|
|
||||||
@endphp
|
|
||||||
@if($entry && trim($entry->content))
|
|
||||||
<div class="p-3 bg-slate-50 border border-slate-100 rounded-xl">
|
|
||||||
<div class="flex justify-between items-center pb-1.5 border-b border-slate-200/50 mb-1.5">
|
|
||||||
<span class="text-xs font-extrabold text-slate-800">{{ $day['day_number'] }}. Gün Raporu</span>
|
|
||||||
<span class="text-[10px] text-slate-400 font-bold">{{ $day['formatted_date'] }}</span>
|
|
||||||
</div>
|
|
||||||
<p class="text-xs text-slate-600 whitespace-pre-wrap leading-relaxed" style="font-size: 11px;">{{ $entry->content }}</p>
|
|
||||||
</div>
|
|
||||||
@endif
|
|
||||||
@endforeach
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- Footer -->
|
|
||||||
<div class="w-full flex justify-between items-center pt-2 border-t border-slate-100 gap-4 mt-auto">
|
|
||||||
<div class="flex items-center gap-3">
|
|
||||||
<img src="https://api.qrserver.com/v1/create-qr-code/?size=120x120&data={{ urlencode(route('internship.verify', $application->certificate_code)) }}" alt="QR Code" class="w-14 h-14 border border-slate-200 p-0.5 rounded-lg bg-white">
|
|
||||||
<div>
|
|
||||||
<span class="font-bold text-slate-400 tracking-wider block verify-code-label">GÜVENLİ DOĞRULAMA KODU</span>
|
|
||||||
<span class="font-mono font-bold text-slate-800 block verify-code">{{ $application->certificate_code }}</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="text-right text-slate-400 footer-address">
|
|
||||||
Trunçgil Teknoloji San. ve Tic. Ltd. Şti.<br>
|
|
||||||
Gaziantep Üniversitesi Teknopark No: 4A
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@@ -242,8 +167,97 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- ================= PAGE 3: STAJ DEFTERİ (PORTRAIT A4) ================= -->
|
||||||
|
@if($application->notebook_approved || $application->notebook_supervisor_signed || $application->notebook_unit_signed)
|
||||||
|
<div class="notebook-container-wrapper overflow-hidden w-full flex justify-center items-start mt-8">
|
||||||
|
<div id="notebook-node" class="transcript-page bg-white rounded-[2rem] shadow-2xl p-6 md:p-8 relative overflow-hidden mx-auto">
|
||||||
|
|
||||||
|
<!-- Thin border decor for notebook -->
|
||||||
|
<div class="absolute inset-4 border border-slate-100 rounded-[1.5rem] pointer-events-none"></div>
|
||||||
|
|
||||||
|
<div class="relative z-10 flex flex-col justify-between h-full text-slate-700">
|
||||||
|
<div>
|
||||||
|
<!-- Header -->
|
||||||
|
<div class="flex justify-between items-center pb-2 border-b border-slate-100 mb-3">
|
||||||
|
<div>
|
||||||
|
<h2 class="font-serif font-bold text-slate-900 transcript-header-title">ONAYLI STAJ DEFTERİ RAPORU</h2>
|
||||||
|
<p class="text-slate-400 tracking-wider mt-0.5 transcript-header-subtitle">DİJİTAL İMZALI VE ONAYLI STAJ RAPORLARI</p>
|
||||||
|
</div>
|
||||||
|
<img src="{{ asset('logos/truncgil-yatay.svg') }}" alt="Trunçgil Logo" class="h-6 object-contain">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Signatures Information -->
|
||||||
|
<div class="bg-emerald-50 border border-emerald-200 rounded-xl p-3 mb-4 flex justify-between items-center">
|
||||||
|
<div>
|
||||||
|
<span class="text-xs font-extrabold text-emerald-800 uppercase block tracking-wider">Dijital İmza Durumu</span>
|
||||||
|
<span class="text-[10px] text-emerald-600 font-semibold block mt-0.5">Bu staj defteri yetkililer tarafından elektronik olarak imzalanmıştır.</span>
|
||||||
|
</div>
|
||||||
|
<div class="flex gap-2">
|
||||||
|
@if($application->notebook_supervisor_signed)
|
||||||
|
<span class="inline-flex px-2 py-1 rounded bg-emerald-100 text-emerald-800 text-[8px] font-extrabold uppercase border border-emerald-200">
|
||||||
|
Sorumlu: {{ $application->notebook_supervisor_name ?: 'Alperen Trunç' }}
|
||||||
|
</span>
|
||||||
|
@endif
|
||||||
|
@if($application->notebook_unit_signed)
|
||||||
|
<span class="inline-flex px-2 py-1 rounded bg-emerald-100 text-emerald-800 text-[8px] font-extrabold uppercase border border-emerald-200">
|
||||||
|
Yetkili: {{ $application->notebook_unit_name ?: 'Birim Yetkilisi' }}
|
||||||
|
</span>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Notebook Days content overview -->
|
||||||
|
<div class="overflow-y-auto max-h-[700px] pr-2 no-scrollbar space-y-4">
|
||||||
|
@foreach($days as $day)
|
||||||
|
@php
|
||||||
|
$entry = $savedEntries->get($day['day_number']);
|
||||||
|
@endphp
|
||||||
|
@if($entry && trim($entry->content))
|
||||||
|
<div class="p-3 bg-slate-50 border border-slate-100 rounded-xl">
|
||||||
|
<div class="flex justify-between items-center pb-1.5 border-b border-slate-200/50 mb-1.5">
|
||||||
|
<span class="text-xs font-extrabold text-slate-800">{{ $day['day_number'] }}. Gün Raporu</span>
|
||||||
|
<span class="text-[10px] text-slate-400 font-bold">{{ $day['formatted_date'] }}</span>
|
||||||
|
</div>
|
||||||
|
<p class="text-xs text-slate-600 whitespace-pre-wrap leading-relaxed" style="font-size: 11px;">{{ $entry->content }}</p>
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
@endforeach
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Footer -->
|
||||||
|
<div class="w-full flex justify-between items-center pt-2 border-t border-slate-100 gap-4 mt-auto">
|
||||||
|
<div class="flex items-center gap-3">
|
||||||
|
<img src="https://api.qrserver.com/v1/create-qr-code/?size=120x120&data={{ urlencode(route('internship.verify', $application->certificate_code)) }}" alt="QR Code" class="w-14 h-14 border border-slate-200 p-0.5 rounded-lg bg-white">
|
||||||
|
<div>
|
||||||
|
<span class="font-bold text-slate-400 tracking-wider block verify-code-label">GÜVENLİ DOĞRULAMA KODU</span>
|
||||||
|
<span class="font-mono font-bold text-slate-800 block verify-code">{{ $application->certificate_code }}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="text-right text-slate-400 footer-address">
|
||||||
|
Trunçgil Teknoloji San. ve Tic. Ltd. Şti.<br>
|
||||||
|
Gaziantep Üniversitesi Teknopark No: 4A
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@else
|
||||||
|
<div class="min-h-screen bg-slate-100 flex items-center justify-center p-6 no-print">
|
||||||
|
<div class="bg-white rounded-3xl p-8 max-w-md w-full shadow-2xl border border-slate-100 text-center">
|
||||||
|
<div class="w-16 h-16 rounded-full bg-red-50 text-[#e31e24] flex items-center justify-center text-3xl mx-auto mb-4">
|
||||||
|
<i class="uil uil-exclamation-triangle"></i>
|
||||||
|
</div>
|
||||||
|
<h1 class="text-xl font-bold text-slate-800">Doğrulanamayan Belge</h1>
|
||||||
|
<p class="text-xs text-slate-500 mt-2 leading-relaxed">Görüntülemeye çalıştığınız staj kaydı henüz onaylanmamıştır veya aktif değildir. Detaylı bilgi için kurum yetkilileri ile iletişime geçebilirsiniz.</p>
|
||||||
|
<a href="/" class="mt-6 inline-flex px-5 py-2.5 bg-slate-800 hover:bg-slate-900 text-white font-bold rounded-xl text-xs transition-all shadow-md">Anasayfaya Dön</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
|
||||||
@push('styles')
|
@push('styles')
|
||||||
<script src="https://cdn.tailwindcss.com"></script>
|
<script src="https://cdn.tailwindcss.com"></script>
|
||||||
|
|||||||
Reference in New Issue
Block a user