Contract Periods Add New
{{-- Contract Cards Grid --}}
@foreach ($mou_contract_periods as $item) @php $courseCount = \App\Models\TieupPrograms::where('contract_period_id', $item->id)->count(); $isLatest = $loop->last; @endphp
Period #{{ $loop->iteration }}
@if($courseCount > 0) {{ $courseCount }} Courses @else 0 Courses @endif @if($isLatest) ● Latest @endif

Start Date: {{ $item->start_date ? \Carbon\Carbon::parse($item->start_date)->format('d-m-Y') : '-' }}

End Date: {{ $item->end_date ? \Carbon\Carbon::parse($item->end_date)->format('d-m-Y') : '-' }}

{{-- Card Actions: Only on the Last / Latest Record --}} @if($isLatest)
@if(!$loop->first) @endif
@endif
@endforeach
{{-- Step 1: Confirmation Popup Modal --}}

Are you sure you want to renew this contract?

New 3-Year Contract Period

Start Date {{ $new_start_date ? \Carbon\Carbon::parse($new_start_date)->format('d-m-Y') : '-' }}
End Date {{ $new_end_date ? \Carbon\Carbon::parse($new_end_date)->format('d-m-Y') : '-' }}
{{-- Step 2: Select Unique MOU Programs Modal --}}
Select MOU Programs to include in the renewal contract:
@if(count($available_categories_to_add) > 0)
Add Other Category:
@endif
@forelse($unique_mou_programs as $mp) @php $isSelected = in_array((string)$mp->category_id, $selected_mou_category_ids); $isAdded = in_array($mp->category_id, $added_categories); @endphp
{{ $mp->category->name ?? 'Category' }} @if($isAdded) ✓ Courses Added @endif Duration: {{ $mp->duration->title ?? 'N/A' }}
Inspection Fee: ₹{{ number_format($mp->inspection_fee, 2) }} GST: ₹{{ number_format($mp->gst_fee_for_inspection, 2) }}
@empty
No MOU programs found.
@endforelse
{{-- Step 3: Select Tieup Courses for Active Category Modal --}}
Select {{ $active_category_name }} courses to add into renewal contract:
@forelse($category_courses as $tp) @php $isCourseSelected = in_array((string)$tp->id, $selected_course_ids); @endphp @empty
No courses found under this category from the previous contract period.
@endforelse