@php use App\Models\eims\settings\academic\ContentType; @endphp @extends('layouts/eims_layout') @section('title', '| ' . $data['pageTitle']) @section('content') @include('successMsg')

{{ $data['pageTitle'] }}

{!! Form::label('name', 'Exam Subject Config Name: *', [ 'class' => 'control-label text-gray col-sm-4', ], false) !!}
{!! Form::text('name', $examCourseSubjectMarkConfig->name ?? null, [ 'id' => 'name', 'class' => 'form-control', 'readonly' => 'readonly', ]) !!}
{!! Form::label('effective_date', 'Effective Date: *', [ 'class' => 'control-label text-gray col-sm-4', ], false) !!}
{!! Form::text('effective_date', date('d-m-Y', strtotime($examCourseSubjectMarkConfig->effective_date)) ?? null, [ 'id' => 'effective_date', 'class' => 'form-control', 'readonly' => 'readonly', ]) !!}
{{-- @if ($data['companyType'] == 'SCL' || $data['companyType'] == 'CLG' || $data['companyType'] == 'UNV')--}}
@foreach ($examCourseSubjectMarkConfig->eims_exam_subject_marks_config_details as $subject) {{-- Start of a new card --}}

{{ $subject->eims_course_subject->name ?? null }} - {{ $subject->eims_course_subject->course_subject_code }} [{{$subject->eims_course_subject->course_subject_type->name ?? null}}] {{Form::hidden('course_subject_ids[]', $subject->id)}}

Exam Marking Range
{!! Form::label("max_mark_$subject->id", 'Max Marks: *',[ 'class' => 'control-label text-gray col-sm-2', 'style' => 'color: #454545; flex: 0 0 20%; padding: 4px !important; margin-left: 30px !important;', ], false) !!}
{!! Form::number("max_marks[$subject->id]", $subject->max_mark?? null, [ 'class' => 'form-control max-mark-input', 'id' => "max_mark_$subject->id", // Unique input ID 'step' => 1, 'readonly' => 'readonly', ]) !!}
{!! Form::label("min_mark_$subject->id",'Min Marks: *', [ 'class' => 'control-label text-gray col-sm-2', 'style' => 'color: #454545; flex: 0 0 20%; padding: 4px !important; margin-left: 30px !important;', 'id' => "min_mark_$subject->id", // Unique label ID 'step' => 1 ], false) !!}
{!! Form::number("min_marks[$subject->id]", $subject->min_mark ?? null, [ 'class' => 'form-control min-mark-input', 'readonly', 'id' => "min_mark_$subject->id", // Unique input ID ]) !!}


Exam Criteria
@php($required = $subject->course_subject_type_id !== ContentType::COURSE_SUBJECT_TYPE_PRACTICAL) {!! Form::label("theory_$subject->id", 'Theory: ' . ($required ? '*' : null), [ 'class' => 'control-label text-gray col-sm-4', ], false) !!}
{!! Form::number("theory[$subject->id]", $subject->theory ?? null, [ 'class' => 'form-control exam-config-input', 'readonly', 'id' => "theory_$subject->id", 'disabled' => !$required ]) !!}
@php($required = $subject->course_subject_type_id !== ContentType::COURSE_SUBJECT_TYPE_THEORY) {!! Form::label("practical_$subject->id" , 'Practical: ' . ($required ? '*' : null), [ 'class' => 'control-label text-gray col-sm-4' ], false) !!}
{!! Form::number("practical[$subject->id]", $subject->practical ?? null, [ 'class' => 'form-control exam-config-input', 'readonly', 'id' => "practical_$subject->id" , 'disabled' => !$required ]) !!}
@foreach ($examConfig as $examConfigId => $examConfigName)
{!! Form::checkbox("config_checked[$subject->id][$examConfigId]", 1, isset($subject->config_marks[$examConfigId]), [ 'class' => 'form-check-input exam-mark-config-check', 'id' => "config_checkbox_$subject->id". "_$examConfigId", 'disabled' => 'disabled', ]) !!}
{!! Form::label("config_checkbox_$subject->id". "_$examConfigId", $examConfigName . ':', [ 'class' => 'control-label text-gray', 'style' => 'color: #454545;', ]) !!} {!! Form::number("config_marks[$subject->id][$examConfigId]", $subject->config_marks[$examConfigId] ?? null , [ 'class' => 'form-control exam-config-input', 'placeholder' => 'Enter ' . $examConfigName . ' Marks', 'id' => 'config_input_' . $examConfigId, 'autocomplete' => 'off', 'disabled' => 'disabled', ]) !!}
@if ($examConfigName === 'C.T')
@endif
@endforeach

@endforeach
@endsection