Skip to content

Commit

Permalink
Merge pull request #111 from ikhsan3adi/dynamic-tahun-ajaran
Browse files Browse the repository at this point in the history
Tahun ajaran dinamis
  • Loading branch information
ikhsan3adi authored Jul 21, 2024
2 parents abb8806 + a0be08b commit 1ccf9db
Show file tree
Hide file tree
Showing 13 changed files with 33 additions and 14 deletions.
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,16 @@ Aplikasi Web Sistem Absensi Sekolah Berbasis QR Code adalah sebuah proyek yang b
>
> - Konfigurasi file `.env` untuk mengatur base url(terutama jika melakukan hosting), koneksi database dan pengaturan lainnya sesuai dengan lingkungan pengembangan Anda.
>
> - Untuk mengubah identitas nama sekolah, buka file konfigurasi `app/Config/AbsensiSekolah.php` dan ubah pada:
> - Untuk mengubah konfigurasi nama sekolah, tahun ajaran dll, buka file konfigurasi `app/Config/AbsensiSekolah.php` dan ubah pada:
>
> ```php
> // NAMA SEKOLAH
> const SCHOOL_NAME = 'SMK 1 Indonesia';
>
> // TAHUN AJARAN
> const SCHOOL_YEAR = '2024/2025';
>
> // ...
> ```
>
> - Ganti/replace logo sekolah di `public/assets/img/logo_sekolah.jpg`.
Expand Down
9 changes: 9 additions & 0 deletions app/Config/AbsensiSekolah.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,13 @@ class AbsensiSekolah extends BaseConfig
* Pengaturan untuk nama sekolah
*/
const SCHOOL_NAME = 'SMK 1 Indonesia';

/**
* --------------------------------------------------------------------------
* Tahun Ajaran
* --------------------------------------------------------------------------
*
* Pengaturan untuk tahun ajaran
*/
const SCHOOL_YEAR = '2024/2025';
}
8 changes: 6 additions & 2 deletions app/Controllers/Admin/GenerateLaporan.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ class GenerateLaporan extends BaseController
protected PresensiGuruModel $presensiGuruModel;

protected string $namaSekolah;
protected string $tahunAjaran;

public function __construct()
{
Expand All @@ -38,6 +39,7 @@ public function __construct()
$this->presensiGuruModel = new PresensiGuruModel();

$this->namaSekolah = ConfigAbsensiSekolah::SCHOOL_NAME;
$this->tahunAjaran = ConfigAbsensiSekolah::SCHOOL_YEAR;
}

public function index()
Expand Down Expand Up @@ -128,7 +130,8 @@ public function generateLaporanSiswa()
],
'kelas' => $kelas,
'grup' => "kelas " . $kelas['kelas'] . " " . $kelas['jurusan'],
'namaSekolah' => $this->namaSekolah
'namaSekolah' => $this->namaSekolah,
'tahunAjaran' => $this->tahunAjaran
];

if ($type == 'doc') {
Expand Down Expand Up @@ -204,7 +207,8 @@ public function generateLaporanGuru()
'perempuan' => count($guru) - $laki
],
'grup' => 'guru',
'namaSekolah' => $this->namaSekolah
'namaSekolah' => $this->namaSekolah,
'tahunAjaran' => $this->tahunAjaran
];

if ($type == 'doc') {
Expand Down
2 changes: 1 addition & 1 deletion app/Views/admin/data/create/create-data-guru.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<div class="card">
<div class="card-header card-header-success">
<h4 class="card-title"><b>Form Tambah Guru</b></h4>
<!-- <p class="card-category">Angkatan 2022/2023</p> -->

</div>
<div class="card-body mx-5 my-3">

Expand Down
2 changes: 1 addition & 1 deletion app/Views/admin/data/create/create-data-siswa.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<div class="card">
<div class="card-header card-header-primary">
<h4 class="card-title"><b>Form Tambah Siswa</b></h4>
<!-- <p class="card-category">Angkatan 2022/2023</p> -->

</div>
<div class="card-body mx-5 my-3">

Expand Down
2 changes: 1 addition & 1 deletion app/Views/admin/data/data-guru.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<div class="row">
<div class="col">
<h4 class="card-title"><b>Daftar Guru</b></h4>
<p class="card-category">Angkatan 2022/2023</p>
<p class="card-category">Angkatan <?= \Config\AbsensiSekolah::SCHOOL_YEAR ?></p>
</div>
<div class="col-auto">
<div class="nav-tabs-wrapper">
Expand Down
2 changes: 1 addition & 1 deletion app/Views/admin/data/data-siswa.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<div class="row">
<div class="col-md-2">
<h4 class="card-title"><b>Daftar Siswa</b></h4>
<p class="card-category">Angkatan 2022/2023</p>
<p class="card-category">Angkatan <?= \Config\AbsensiSekolah::SCHOOL_YEAR ?></p>
</div>
<div class="col-md-4">
<div class="nav-tabs-wrapper">
Expand Down
2 changes: 1 addition & 1 deletion app/Views/admin/data/edit/edit-data-guru.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<div class="card">
<div class="card-header card-header-success">
<h4 class="card-title"><b>Form Edit Guru</b></h4>
<!-- <p class="card-category">Angkatan 2022/2023</p> -->

</div>
<div class="card-body mx-5 my-3">

Expand Down
2 changes: 1 addition & 1 deletion app/Views/admin/data/edit/edit-data-siswa.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<div class="card">
<div class="card-header card-header-primary">
<h4 class="card-title"><b>Form Edit Siswa</b></h4>
<!-- <p class="card-category">Angkatan 2022/2023</p> -->

</div>
<div class="card-body mx-5 my-3">

Expand Down
2 changes: 1 addition & 1 deletion app/Views/admin/generate-laporan/laporan-guru.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<td width="100%">
<h2 align="center">DAFTAR HADIR GURU</h2>
<h4 align="center"><?= $namaSekolah; ?></h4>
<h4 align="center">TAHUN PELAJARAN 2022/2023</h4>
<h4 align="center">TAHUN PELAJARAN <?= $tahunAjaran; ?></h4>
</td>
<td>
<div style="width:100px"></div>
Expand Down
2 changes: 1 addition & 1 deletion app/Views/admin/generate-laporan/laporan-siswa.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<td width="100%">
<h2 align="center">DAFTAR HADIR SISWA</h2>
<h4 align="center"><?= $namaSekolah; ?></h4>
<h4 align="center">TAHUN PELAJARAN 2022/2023</h4>
<h4 align="center">TAHUN PELAJARAN <?= $tahunAjaran; ?></h4>
</td>
<td>
<div style="width:100px"></div>
Expand Down
4 changes: 2 additions & 2 deletions app/Views/admin/kelas/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<div class="row">
<div class="col">
<h4 class="card-title"><b>Daftar Kelas</b></h4>
<p class="card-category">Angkatan 2022/2023</p>
<p class="card-category">Angkatan <?= \Config\AbsensiSekolah::SCHOOL_YEAR ?></p>
</div>
<div class="col-auto">
<div class="nav-tabs-wrapper">
Expand Down Expand Up @@ -57,7 +57,7 @@
<div class="row">
<div class="col">
<h4 class="card-title"><b>Daftar Jurusan</b></h4>
<p class="card-category">Angkatan 2022/2023</p>
<p class="card-category">Angkatan <?= \Config\AbsensiSekolah::SCHOOL_YEAR ?></p>
</div>
<div class="col-auto">
<div class="nav-tabs-wrapper">
Expand Down
2 changes: 1 addition & 1 deletion app/Views/admin/petugas/edit-data-petugas.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<div class="card">
<div class="card-header card-header-primary">
<h4 class="card-title"><b>Form Edit Petugas</b></h4>
<!-- <p class="card-category">Angkatan 2022/2023</p> -->

</div>
<div class="card-body mx-5 my-3">

Expand Down

0 comments on commit 1ccf9db

Please sign in to comment.