Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tahun ajaran dinamis #111

Merged
merged 2 commits into from
Jul 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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