From 2ac73380c29ac39ccc91519308b733db931b1d96 Mon Sep 17 00:00:00 2001 From: Ida Bagus Redy Santiawan Date: Mon, 21 Oct 2024 23:59:56 +0800 Subject: [PATCH 1/5] Menambahkan fungsi format NIP --- app/Helpers/functions.php | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/app/Helpers/functions.php b/app/Helpers/functions.php index 876dfe3..f464cb0 100644 --- a/app/Helpers/functions.php +++ b/app/Helpers/functions.php @@ -530,4 +530,26 @@ function get_string_between($string, $start, $end){ $ini += strlen($start); $len = strpos($string, $end, $ini) - $ini; return substr($string, $ini, $len); -} \ No newline at end of file +} +function nip_format($nip, $glue = " ") { + $nip = trim($nip," "); + $countChar = strlen($nip); + $subChar = [(empty($nip)?'-':$nip)]; + switch ($countChar) { + case 18: + $subChar[0] = substr($nip, 0, 8); // tanggal lahir + $subChar[1] = substr($nip, 8, 6); // tanggal pengangkatan + $subChar[2] = substr($nip, 14, 1); // jenis kelamin + $subChar[3] = substr($nip, 15, 3); // nomor urut + break; + case 15: + $subChar[0] = substr($nip, 0, 8); // tanggal lahir + $subChar[1] = substr($nip, 8, 6); // tanggal pengangkatan + $subChar[2] = substr($nip, 14, 1); // jenis kelamin + break; + case 9: + $subChar = str_split($nip, 3); + break; + } + return implode($glue, $subChar); +} From da6fb07dd5f5b73ec2fcaad70276a07e9151d857 Mon Sep 17 00:00:00 2001 From: Ida Bagus Redy Santiawan Date: Tue, 22 Oct 2024 00:03:07 +0800 Subject: [PATCH 2/5] Tambah format NIP --- resources/views/cetak/identitas_peserta_didik.blade.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/views/cetak/identitas_peserta_didik.blade.php b/resources/views/cetak/identitas_peserta_didik.blade.php index b15e055..cc6a24c 100644 --- a/resources/views/cetak/identitas_peserta_didik.blade.php +++ b/resources/views/cetak/identitas_peserta_didik.blade.php @@ -176,7 +176,7 @@   - {{($get_siswa->peserta_didik->sekolah->kasek) ? $get_siswa->peserta_didik->sekolah->kasek->nama_lengkap : $get_siswa->peserta_didik->sekolah->kepala_sekolah->nama_lengkap}}
NIP. {{($get_siswa->peserta_didik->sekolah->kasek) ? $get_siswa->peserta_didik->sekolah->kasek->nip : $get_siswa->peserta_didik->sekolah->kepala_sekolah->nip}} + {{($get_siswa->peserta_didik->sekolah->kasek) ? $get_siswa->peserta_didik->sekolah->kasek->nama_lengkap : $get_siswa->peserta_didik->sekolah->kepala_sekolah->nama_lengkap}}
NIP. {{nip_format(($get_siswa->peserta_didik->sekolah->kasek) ? $get_siswa->peserta_didik->sekolah->kasek->nip : $get_siswa->peserta_didik->sekolah->kepala_sekolah->nip)}} -@endsection \ No newline at end of file +@endsection From 038936baa4b236cd922a0775ccc53a182b73c201 Mon Sep 17 00:00:00 2001 From: Ida Bagus Redy Santiawan Date: Tue, 22 Oct 2024 00:07:58 +0800 Subject: [PATCH 3/5] Menambah fungsi format NIP dan menengahkan bagian tanda tangan kepala sekolah --- resources/views/cetak/rapor_catatan.blade.php | 42 +++++++++++-------- 1 file changed, 24 insertions(+), 18 deletions(-) diff --git a/resources/views/cetak/rapor_catatan.blade.php b/resources/views/cetak/rapor_catatan.blade.php index 1eff43f..88c0ab6 100644 --- a/resources/views/cetak/rapor_catatan.blade.php +++ b/resources/views/cetak/rapor_catatan.blade.php @@ -222,7 +222,7 @@

...................................................................

- +

{{str_replace('Kab. ','',$get_siswa->peserta_didik->sekolah->kabupaten)}}, @@ -234,7 +234,7 @@

{{$get_siswa->rombongan_belajar->wali_kelas->nama_lengkap}}
- NIP. {{$get_siswa->rombongan_belajar->wali_kelas->nip}}

+ NIP. {{nip_format($get_siswa->rombongan_belajar->wali_kelas->nip)}}

@@ -247,10 +247,10 @@ $extend = str_replace('Kepala Sekolah', '', $ks); $extend = str_replace(' ', '', $extend); ?> - +
- - - - - -
-


{{ $extend }}

+
+





@@ -258,8 +258,8 @@

 

-

Mengetahui,
{{ $jabatan }}

+
+

Mengetahui,
{{ $extend }} {{ $jabatan }}




@@ -273,18 +273,24 @@ {{$get_siswa->peserta_didik->sekolah->kepala_sekolah->nama_lengkap}} @endif

+

+ NIP. + @if ($get_siswa->peserta_didik->sekolah->kasek) + {{nip_format($get_siswa->peserta_didik->sekolah->kasek->nip)}} + @elseif($get_siswa->peserta_didik->sekolah->kepala_sekolah) + {{nip_format($get_siswa->peserta_didik->sekolah->kepala_sekolah->nip)}} + @endif +

- NIP. - @if ($get_siswa->peserta_didik->sekolah->kasek) - {{$get_siswa->peserta_didik->sekolah->kasek->nip}} - @elseif($get_siswa->peserta_didik->sekolah->kepala_sekolah) - {{$get_siswa->peserta_didik->sekolah->kepala_sekolah->nip}} - @endif + +


+
+
+
+
+
+

 

-@endsection \ No newline at end of file +@endsection From 02ec407cf070074c90d93421ae0fea7929efba62 Mon Sep 17 00:00:00 2001 From: Ida Bagus Redy Santiawan Date: Tue, 22 Oct 2024 00:35:14 +0800 Subject: [PATCH 4/5] Tetap menampilkan logo tut wuri handayani dan memindah logo sekolah ke bagian tengah jika ada. --- resources/views/cetak/rapor_top.blade.php | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/resources/views/cetak/rapor_top.blade.php b/resources/views/cetak/rapor_top.blade.php index 73f5bdc..b485632 100644 --- a/resources/views/cetak/rapor_top.blade.php +++ b/resources/views/cetak/rapor_top.blade.php @@ -3,20 +3,14 @@


-
- -
-
-
-
+

RAPOR PESERTA DIDIK

SEKOLAH MENENGAH KEJURUAN

-

(SMK)


-
-
+

(SMK)


+

{{--dd($get_siswa)--}} @@ -41,4 +35,4 @@

KEMENTERIAN PENDIDIKAN, KEBUDAYAAN, RISET DAN TEKNOLOGI
REPUBLIK INDONESIA

-@endsection \ No newline at end of file +@endsection From 2ebbcf46ff2223d89213a434981c9154a2ed3a64 Mon Sep 17 00:00:00 2001 From: Ida Bagus Redy Santiawan Date: Tue, 22 Oct 2024 00:36:08 +0800 Subject: [PATCH 5/5] Fallback blank image. --- public/images/transparent.png | Bin 0 -> 2028 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 public/images/transparent.png diff --git a/public/images/transparent.png b/public/images/transparent.png new file mode 100644 index 0000000000000000000000000000000000000000..d696f576be47aad589ba4f1c4220ec1c9dbb7585 GIT binary patch literal 2028 zcmcIlF^uCx6m`(vYVX8Kln7CbybUL?Ju`6}+d8w_OO{I{ysY*jv2-^Xj}vQSkI(jQ zybHyNYoMUK3PE)g6r3pNDDEU0dO8p_6{10+WhQaFdt`5kkcc$#_|Kd7-~aRH`_uis zJDWFNyP+t`X1~`x5YHdw*jN|;-yA;qQarAwy$^Cl(YNGilwWP1D9W|JqQPNt=)dby z9_u9FL#CH;D$t5@Yr9MdJz@nIvQdL1@fRY4SZ>iaDp`e}!aquyD@?w;)p=-Cl< z0(JXsaI16$LCgvQ%6O9GZt1BrURTVe*-*g@QXF~ej&ukP{e95k83UFMH432x+K!Ga z(=zS10EQSD5E%$-sO7e>iyct?RN*ZPLieEiPUTCydFr?*Qr9r1)2Tjf>O316$Z;G4 zVgqAMAhi56DM+a$`PPD=%W|4UX%X=RNJcW`$AzZ~rSlNtw5Cn+Dor9`MoCfw=}?BW z0Q&yb&^WHqd9iyUyi|HGCC&$@DKidO&W|(7c28JRY%QDxwBDN@XOmf^0X5i!#R8TK zVW@VMj(NfJF@HfE^>Q6e>UJ_l3Z4x(pDYe)f58GU)-ia)Cp1bV?@g(x+QPb|V4f<@ z&D0RoFdjhY;IqVy;VTtbG- z4DC>BQwwV*LP&GWA<^14p#g3aWZ~vam)PIs^jIcP?w=QKz^UM@+>BzQlglQn2{zU6`ZT-@Cna+9*CR^ujlrDr?a2&Fq(*k{NT=Q(BJJ? z$gzYw9m&EMGDNt&C>N)ET3w~P?0z+yL||5*E}`;Tcq*0kz=WW=Il3gxs|7UQKOHkc zdPSAYVL1YKB@eDYe^L{*q}qLk}-8{f9(;^xdzUYoGnO{^3peJ?`)Bb)Ve6_wnDz Cj!j|! literal 0 HcmV?d00001