diff --git a/app/Http/Controllers/Admin/SettingsController.php b/app/Http/Controllers/Admin/SettingsController.php index c331978..17cc085 100644 --- a/app/Http/Controllers/Admin/SettingsController.php +++ b/app/Http/Controllers/Admin/SettingsController.php @@ -28,6 +28,13 @@ class SettingsController extends Controller 'kepala_sekolah_nip' => ['nullable', 'string', 'max:50'], 'bk_koordinator_name' => ['nullable', 'string', 'max:255'], 'wa_notification_template' => ['nullable', 'string', 'max:3000'], + // Kop surat + 'school_government' => ['nullable', 'string', 'max:255'], + 'school_agency' => ['nullable', 'string', 'max:255'], + 'school_full_name' => ['nullable', 'string', 'max:255'], + 'school_address_detail' => ['nullable', 'string', 'max:500'], + 'school_website_email' => ['nullable', 'string', 'max:500'], + 'school_postal' => ['nullable', 'string', 'max:20'], ]); foreach ($validated as $key => $value) { @@ -39,6 +46,11 @@ class SettingsController extends Controller Setting::setValue('school_logo', $path, 'school', 'Logo sekolah'); } + if ($request->hasFile('kop_logo')) { + $path = $request->file('kop_logo')->store('school', 'public'); + Setting::setValue('kop_logo', $path, 'school', 'Logo kop surat'); + } + if ($request->hasFile('login_background')) { $path = $request->file('login_background')->store('school', 'public'); Setting::setValue('login_background', $path, 'school', 'Background halaman login'); diff --git a/app/Http/Controllers/Admin/ViolationReportController.php b/app/Http/Controllers/Admin/ViolationReportController.php index e71b2c9..2649320 100644 --- a/app/Http/Controllers/Admin/ViolationReportController.php +++ b/app/Http/Controllers/Admin/ViolationReportController.php @@ -72,6 +72,13 @@ class ViolationReportController extends Controller 'address' => Setting::getValue('school_address', ''), 'phone' => Setting::getValue('school_phone', ''), 'logo' => Setting::getValue('school_logo', ''), + 'kop_logo' => Setting::getValue('kop_logo', ''), + 'government' => Setting::getValue('school_government', 'PEMERINTAH PROVINSI JAWA TIMUR'), + 'agency' => Setting::getValue('school_agency', 'DINAS PENDIDIKAN'), + 'full_name' => Setting::getValue('school_full_name', Setting::getValue('school_name', 'SMK')), + 'address_detail' => Setting::getValue('school_address_detail', ''), + 'website_email' => Setting::getValue('school_website_email', ''), + 'postal' => Setting::getValue('school_postal', ''), 'kepala_sekolah' => Setting::getValue('kepala_sekolah_name', ''), 'kepala_sekolah_nip' => Setting::getValue('kepala_sekolah_nip', ''), ]; diff --git a/resources/views/reports/violation-report-pdf.blade.php b/resources/views/reports/violation-report-pdf.blade.php index 78571da..4c16b05 100644 --- a/resources/views/reports/violation-report-pdf.blade.php +++ b/resources/views/reports/violation-report-pdf.blade.php @@ -6,11 +6,15 @@