@extends('layouts.app', ['title' => 'Pembagian Mata Kuliah Tiap Semester']) @section('content')
@include('admin.partials.export-excel-button', ['section' => 'semester-course-assignments', 'label' => 'Export Excel Pembagian MK'])
@php $assignmentRows = $assignmentRows ?? old('semester_course_assignments', []); $periodRows = $periodRows ?? old('semester_course_periods', []); $lecturerOptions = collect($lecturerOptions ?? []) ->filter() ->unique() ->values() ->all(); $courseOptions = collect($courseStructureRows ?? []) ->pluck('course_name') ->filter() ->unique() ->values() ->all(); $courseCodeMap = collect($courseStructureRows ?? []) ->mapWithKeys(function ($row) { $courseName = trim((string) ($row['course_name'] ?? '')); $courseCode = trim((string) ($row['course_code'] ?? '')); return $courseName !== '' ? [$courseName => $courseCode] : []; }) ->all(); @endphp

Pembagian Mata Kuliah Tiap Semester

Kelola periode tahun akademik dan semester terlebih dahulu. Setelah periode dibuat, klik tombol aksi untuk mengatur dosen dan mata kuliah pada periode tersebut.

Multi halaman
Halaman pertama untuk memilih Tahun Akademik, Semester, dan status Aktif/Nonaktif.
Terkunci otomatis
Hanya periode aktif yang dapat ditarik datanya ke form RPS.
@if (! $isDetailPage)
@csrf @method('PUT')
@forelse ($periodRows as $index => $period) @php $academicYear = $period['academic_year'] ?? ''; $term = $period['term'] ?? ''; $isActive = (bool) ($period['is_active'] ?? true); $canOpen = filled($academicYear) && filled($term); @endphp @empty @endforelse
No Tahun Akademik Semester Status Jumlah Data Aksi
{{ $index + 1 }} {{ $period['assignment_count'] ?? 0 }} baris
@if ($canOpen) Buka @else Simpan dulu @endif
1 0 baris
Simpan dulu
Buka Informasi Kurikulum

Setelah menambahkan periode baru, simpan terlebih dahulu. Tombol Buka akan muncul setelah Tahun Akademik dan Semester tersimpan.

@else

Pengaturan Detail: {{ $selectedAcademicYear }} — {{ $selectedTerm }}

Data pada halaman ini hanya akan ditarik ke RPS jika periode berstatus aktif.

{{ $selectedPeriodIsActive ? 'Aktif' : 'Terkunci / Nonaktif' }} Kembali ke Periode
@csrf

Gunakan kolom: Dosen Pengampu, Mata Kuliah, dan Kode Mata Kuliah. Tahun Akademik/Semester mengikuti periode yang sedang dibuka.

@csrf @method('PUT')
@forelse ($assignmentRows as $index => $row) @empty @endforelse
No Dosen Pengampu Mata Kuliah Kode MK Aksi
{{ $index + 1 }}
1
Kembali
@endif @endsection