- Created LetterRequestRequest and LetterRequestStatusRequest for handling form requests. - Removed the old LetterRequestRequest class and updated the authorization logic. - Changed the student relationship to user in the LetterRequest model. - Updated LetterRequestService to reflect changes in the model and request handling. - Modified permission catalog to include new permissions for letter request status updates. - Updated database migrations and seeders to use user_id instead of student_id. - Removed student-specific letter request pages and components, consolidating functionality under admin routes. - Adjusted frontend components to accommodate new data structure and permissions. - Enhanced the letter request columns to support status updates directly from the table.
38 lines
1.2 KiB
PHP
38 lines
1.2 KiB
PHP
<?php
|
|
|
|
namespace Database\Seeders;
|
|
|
|
use App\Models\LetterRequest;
|
|
use Illuminate\Database\Seeder;
|
|
|
|
class LetterRequestSeeder extends Seeder
|
|
{
|
|
public function run(): void
|
|
{
|
|
LetterRequest::insert([
|
|
[
|
|
'user_id' => 1,
|
|
'letter_type' => 'Surat Aktif Kuliah',
|
|
'purpose' => 'Persyaratan pengajuan beasiswa',
|
|
'status' => 'completed',
|
|
'processed_by' => 5,
|
|
'submitted_at' => '2026-07-01 09:00:00',
|
|
'completed_at' => '2026-07-02 14:00:00',
|
|
'created_at' => '2026-07-01 09:00:00',
|
|
'updated_at' => '2026-07-02 14:00:00',
|
|
],
|
|
[
|
|
'user_id' => 2,
|
|
'letter_type' => 'Surat Keterangan Lulus Sementara',
|
|
'purpose' => 'Persyaratan melamar magang',
|
|
'status' => 'in_process',
|
|
'processed_by' => 5,
|
|
'submitted_at' => '2026-08-01 09:00:00',
|
|
'completed_at' => null,
|
|
'created_at' => '2026-08-01 09:00:00',
|
|
'updated_at' => '2026-08-01 09:00:00',
|
|
],
|
|
]);
|
|
}
|
|
}
|