@php $project = App\Models\Lesson::where('id', request()->route()->parameter('id'))->firstOrFail(); $submission = DB::table('project_submissions') ->where('lesson_id', $project->id) ->where('user_id', auth()->id()) ->first(); @endphp

{{ $project->title }}


{{ get_phrase('Project Details') }}
{!! $project->description !!}
{{ get_phrase('Assessment criteria') }}
{!! $project->attachment !!}
{{ get_phrase('Submit Assignment') }}
{{-- KONDISI 1: JIKA BELUM PERNAH SUBMIT --}} @if(!$submission)
{{ get_phrase('Please enter your project link below to be assessed.') }}
@csrf
{{ get_phrase('Make sure the link is accessible to the instructor (Public/Anyone with link).') }}
{{-- KONDISI 2: JIKA SUDAH PERNAH SUBMIT --}} @else {{-- STATUS 0: MENUNGGU DIPERIKSA --}} @if($submission->status == 0)
{{ get_phrase('Project is Being Reviewed') }}

{{ get_phrase('Thank you! We have received your project and it is currently in the instructor\'s review queue.') }}

{{ get_phrase('Link that you submitted :') }}
{{ get_phrase('View Your Project') }}
{{-- STATUS 2: PERLU REVISI --}} @elseif($submission->status == 2)
{{ get_phrase('Project Needs Revision') }}

{{ get_phrase('The instructor has reviewed your project and provided feedback for improvement.') }}


{{-- Menampilkan Komentar Instruktur --}}
{!! $submission->comment !!}
{{-- Form Resubmit --}}
{{ get_phrase('Submit Revision:') }}
@csrf
{{-- PERBAIKAN: name diubah jadi submission_link --}}
{{ get_phrase('Make sure the new link includes the requested fix.') }}
{{-- STATUS 1: DITERIMA / LULUS --}} @elseif($submission->status == 1)
{{ get_phrase('Congratulations! Project Accepted') }}

{{ get_phrase('Good work! Your project has met the assessment criteria.') }}

@if($submission->comment)
{{ get_phrase('Instructor\'s Comment:') }}
{{ $submission->comment }}
@endif
@endif @endif