Skip to content

Add docstrings to Cetak class methods #126

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

Merged
merged 1 commit into from
Feb 24, 2025
Merged
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
113 changes: 113 additions & 0 deletions app/Helpers/Cetak.php
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,12 @@ public static function kak($id)
];
}

/**
* Format the values for the vehicle statement.
*
* @param string $id The ID of the vehicle statement
* @return array
*/
public static function pernyataan_kendaraan($id)
{
$data = DaftarPesertaPerjalanan::find($id);
Expand Down Expand Up @@ -278,6 +284,12 @@ public static function pernyataan_kendaraan($id)
];
}

/**
* Format the values for the SPPD.
*
* @param string $id The ID of the SPPD
* @return array
*/
public static function sppd($id)
{
$data = DaftarPesertaPerjalanan::find($id);
Expand Down Expand Up @@ -320,6 +332,14 @@ public static function sppd($id)
];
}

/**
* Format the values for the maintenance card.
*
* @param string $id The ID of the maintenance card
* @param string $tanggal The date
* @param string $pengelola The manager
* @return array
*/
public static function karken_pemeliharaan($id, $tanggal, $pengelola)
{
$data = MasterBarangPemeliharaan::find($id);
Expand All @@ -344,6 +364,14 @@ public static function karken_pemeliharaan($id, $tanggal, $pengelola)
];
}

/**
* Format the values for the inventory card.
*
* @param string $id The ID of the inventory card
* @param string $tanggal The date
* @param string $pengelola The manager
* @return array
*/
public static function karken_persediaan($id, $tanggal, $pengelola)
{
$data = MasterPersediaan::find($id);
Expand Down Expand Up @@ -374,6 +402,12 @@ public static function karken_persediaan($id, $tanggal, $pengelola)
];
}

/**
* Format the values for the receipt.
*
* @param string $id The ID of the receipt
* @return array
*/
public static function kuitansi($id)
{
$data = DaftarPesertaPerjalanan::find($id);
Expand Down Expand Up @@ -467,6 +501,12 @@ public static function spj($id)
];
}

/**
* Format the values for the assignment letter.
*
* @param string $id The ID of the assignment letter
* @return array
*/
public static function st($id)
{
$data = HonorKegiatan::find($id);
Expand All @@ -491,6 +531,12 @@ public static function st($id)
];
}

/**
* Format the values for the reward certificate.
*
* @param string $id The ID of the reward certificate
* @return array
*/
public static function sertifikat_reward($id)
{
$data = RewardPegawai::find($id);
Expand All @@ -514,6 +560,12 @@ public static function sertifikat_reward($id)
];
}

/**
* Format the values for the reward decree.
*
* @param string $id The ID of the reward decree
* @return array
*/
public static function sk_reward($id)
{
$data = RewardPegawai::find($id);
Expand Down Expand Up @@ -541,6 +593,12 @@ public static function sk_reward($id)
];
}

/**
* Format the values for the reward worksheet.
*
* @param string $id The ID of the reward worksheet
* @return array
*/
public static function kertas_kerja_reward($id)
{
$data = RewardPegawai::find($id);
Expand All @@ -567,6 +625,12 @@ public static function kertas_kerja_reward($id)
];
}

/**
* Format the values for the decree.
*
* @param string $id The ID of the decree
* @return array
*/
public static function sk($id)
{
$data = HonorKegiatan::find($id);
Expand All @@ -591,6 +655,12 @@ public static function sk($id)
];
}

/**
* Format the values for the contract.
*
* @param string $id The ID of the contract
* @return array
*/
public static function kontrak($id)
{
$data = DaftarKontrakMitra::where('id', '=', $id)->first();
Expand Down Expand Up @@ -629,6 +699,12 @@ public static function kontrak($id)
];
}

/**
* Format the values for the BAST.
*
* @param string $id The ID of the BAST
* @return array
*/
public static function bast($id)
{
$data = DaftarKontrakMitra::where('id', $id)->first();
Expand Down Expand Up @@ -667,6 +743,12 @@ public static function bast($id)
];
}

/**
* Format the values for the BASTP.
*
* @param string $id The ID of the BASTP
* @return array
*/
public static function bastp($id)
{
$data = PembelianPersediaan::find($id);
Expand All @@ -691,6 +773,12 @@ public static function bastp($id)
];
}

/**
* Format the values for the request form.
*
* @param string $id The ID of the request form
* @return array
*/
public static function bon($id)
{
$data = PermintaanPersediaan::find($id);
Expand Down Expand Up @@ -720,6 +808,12 @@ public static function bon($id)
];
}

/**
* Format the values for the invitation.
*
* @param string $id The ID of the invitation
* @return array
*/
public static function undangan($id)
{
$data = RapatInternal::find($id);
Expand All @@ -745,6 +839,12 @@ public static function undangan($id)
];
}

/**
* Format the values for the attendance list.
*
* @param string $id The ID of the attendance list
* @return array
*/
public static function daftar_hadir($id)
{
$data = RapatInternal::find($id);
Expand All @@ -771,6 +871,12 @@ public static function daftar_hadir($id)
];
}

/**
* Format the values for the minutes of meeting.
*
* @param string $id The ID of the minutes of meeting
* @return array
*/
public static function notula($id)
{
$data = RapatInternal::find($id);
Expand All @@ -797,6 +903,13 @@ public static function notula($id)
];
}

/**
* Validate the document before printing.
*
* @param string $jenis The type of document (kak|spj|sk|st|dpr|spd|bon)
* @param string $model_id The ID of the model
* @return string|null
*/
public static function validate($jenis, $model_id)
{
if ($jenis === 'kak') {
Expand Down