Compare commits
41 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| c765d2d38d | |||
| 4c84c1ce60 | |||
| 6d06944db9 | |||
| d838823dee | |||
| 7620156d1a | |||
| 9cf3ada07f | |||
| 40ee90b5f1 | |||
| 6f761870f6 | |||
| fded6cec7a | |||
| 998dc0f887 | |||
| cd3d717c33 | |||
| 2b93b6e906 | |||
| f8e534603e | |||
| ea959f53d6 | |||
| 2b3df4f73d | |||
| 9ae5448174 | |||
| 7bbc651d19 | |||
| 4e29a08fa2 | |||
| c0f491a2ca | |||
| 257943c608 | |||
| ada21b8bd1 | |||
| 7aa12d53f8 | |||
| f7be94b52b | |||
| 24389a56d6 | |||
| 1149a07760 | |||
| 26c92fdf38 | |||
| b6ad002b98 | |||
| 249a186e21 | |||
| 5928fa61b6 | |||
| d3a9f66717 | |||
| f6d2e5b5dd | |||
| 1265a49341 | |||
| e2405a40d8 | |||
| c055b64e5c | |||
| 1bf18a27b3 | |||
| 2194fa71e8 | |||
| 4937e6faf0 | |||
| cda51b5bbd | |||
| f17b895329 | |||
| f2cf39bc30 | |||
| c212959ec2 |
File diff suppressed because it is too large
Load Diff
@@ -14,7 +14,6 @@ use App\Services\DawaiService;
|
||||
use App\Services\VerifikatorWebhookService;
|
||||
use Carbon\Carbon;
|
||||
use Exception;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
@@ -340,7 +339,8 @@ class HonorerController extends Controller
|
||||
$file = $row->getRawOriginal('file');
|
||||
$periode = $row->periode;
|
||||
if ($file && $periode) {
|
||||
$url = '/storage/absen/presensi/'.$periode.'/'.$file;
|
||||
// Tugas dinas menyimpan link Google Drive pada kolom file.
|
||||
$url = str_starts_with($file, 'http') ? $file : '/storage/absen/presensi/'.$periode.'/'.$file;
|
||||
|
||||
return '<a href="'.$url.'" target="_blank" class="btn btn-sm btn-primary" data-bs-toggle="tooltip" data-bs-placement="top" title="Lihat PDF">
|
||||
<i class="uil-file-alt"></i>
|
||||
@@ -456,37 +456,6 @@ class HonorerController extends Controller
|
||||
]);
|
||||
}
|
||||
|
||||
public function cancel($id)
|
||||
{
|
||||
BawahanHelper::authorizePengajuan($id);
|
||||
|
||||
$validasiWaktu = $this->validasiWaktuVerifikasi();
|
||||
if (! $validasiWaktu['status']) {
|
||||
return response()->json(['success' => false, 'message' => $validasiWaktu['message']], 403);
|
||||
}
|
||||
|
||||
if (PengajuanPresensi::where('id', $id)->where('status', 'Diterima')->exists()) {
|
||||
return response()->json([
|
||||
'success' => false,
|
||||
'message' => 'Pengajuan yang sudah diterima tidak dapat dibatalkan',
|
||||
], 422);
|
||||
}
|
||||
|
||||
$success = $this->sekretariat([$id], 'Diajukan', null);
|
||||
|
||||
if ($success !== null) {
|
||||
return response()->json([
|
||||
'success' => true,
|
||||
'message' => "Berhasil membatalkan status $success pengajuan",
|
||||
]);
|
||||
}
|
||||
|
||||
return response()->json([
|
||||
'success' => false,
|
||||
'message' => 'Gagal membatalkan status pengajuan',
|
||||
]);
|
||||
}
|
||||
|
||||
public function delete($id)
|
||||
{
|
||||
BawahanHelper::authorizePengajuan($id);
|
||||
@@ -676,45 +645,6 @@ class HonorerController extends Controller
|
||||
]);
|
||||
}
|
||||
|
||||
public function batalkanSelected(Request $request): JsonResponse
|
||||
{
|
||||
BawahanHelper::authorizePengajuan($request->input('ids', []));
|
||||
|
||||
$request->validate([
|
||||
'ids' => 'required|array',
|
||||
'ids.*' => 'integer',
|
||||
]);
|
||||
|
||||
$validCount = PengajuanPresensi::whereIn('id', $request->ids)->count();
|
||||
if ($validCount !== count($request->ids)) {
|
||||
return response()->json([
|
||||
'success' => false,
|
||||
'message' => 'Beberapa pengajuan tidak ditemukan',
|
||||
], 422);
|
||||
}
|
||||
|
||||
if (PengajuanPresensi::whereIn('id', $request->ids)->where('status', 'Diterima')->exists()) {
|
||||
return response()->json([
|
||||
'success' => false,
|
||||
'message' => 'Pengajuan yang sudah diterima tidak dapat dibatalkan',
|
||||
], 422);
|
||||
}
|
||||
|
||||
$success = $this->sekretariat($request->ids, 'Diajukan', null);
|
||||
|
||||
if ($success !== null) {
|
||||
return response()->json([
|
||||
'success' => true,
|
||||
'message' => "Berhasil membatalkan status $success pengajuan",
|
||||
]);
|
||||
}
|
||||
|
||||
return response()->json([
|
||||
'success' => false,
|
||||
'message' => 'Gagal membatalkan status pengajuan',
|
||||
]);
|
||||
}
|
||||
|
||||
public function sekretariat($id, $status, $catatan)
|
||||
{
|
||||
try {
|
||||
@@ -722,8 +652,8 @@ class HonorerController extends Controller
|
||||
$pengajuans = PengajuanPresensi::whereIn('id', $id)->get();
|
||||
foreach ($pengajuans as $pengajuan) {
|
||||
DB::beginTransaction();
|
||||
if ($status === 'Diterima' && $pengajuan->getRawOriginal('kategori') == 3) {
|
||||
$limit = $this->checkLimit($pengajuan->nip, $pengajuan->tanggal_mulai);
|
||||
if ($status === 'Diterima' && in_array((int) $pengajuan->getRawOriginal('kategori'), [3, 21, 24, 25])) {
|
||||
$limit = $this->checkLimit($pengajuan->nip, $pengajuan->tanggal_mulai, (int) $pengajuan->getRawOriginal('kategori'));
|
||||
if ($limit) {
|
||||
continue;
|
||||
}
|
||||
@@ -808,12 +738,12 @@ class HonorerController extends Controller
|
||||
}
|
||||
}
|
||||
|
||||
public function checkLimit($nip, $tanggal)
|
||||
public function checkLimit($nip, $tanggal, int $kategori = 3)
|
||||
{
|
||||
$pengajuans = PengajuanPresensi::where('nip', $nip)
|
||||
->whereIn('status', ['Diterima'])
|
||||
->where('tipe', 'absen')
|
||||
->where('kategori', 3)
|
||||
->where('kategori', $kategori)
|
||||
->whereYear('tanggal_mulai', explode('-', $tanggal)[0])
|
||||
->whereMonth('tanggal_mulai', explode('-', $tanggal)[1])
|
||||
->count();
|
||||
|
||||
@@ -14,7 +14,6 @@ use App\Services\DawaiService;
|
||||
use App\Services\VerifikatorWebhookService;
|
||||
use Carbon\Carbon;
|
||||
use Exception;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
@@ -322,7 +321,8 @@ class TendikController extends Controller
|
||||
$file = $row->getRawOriginal('file');
|
||||
$periode = $row->periode;
|
||||
if ($file && $periode) {
|
||||
$url = '/storage/absen/presensi/'.$periode.'/'.$file;
|
||||
// Tugas dinas menyimpan link Google Drive pada kolom file.
|
||||
$url = str_starts_with($file, 'http') ? $file : '/storage/absen/presensi/'.$periode.'/'.$file;
|
||||
|
||||
return '<a href="'.$url.'" target="_blank" class="btn btn-sm btn-primary" data-bs-toggle="tooltip" data-bs-placement="top" title="Lihat PDF">
|
||||
<i class="uil-file-alt"></i>
|
||||
@@ -428,32 +428,6 @@ class TendikController extends Controller
|
||||
]);
|
||||
}
|
||||
|
||||
public function cancel($id)
|
||||
{
|
||||
BawahanHelper::authorizePengajuan($id);
|
||||
|
||||
if (PengajuanPresensi::where('id', $id)->where('status', 'Diterima')->exists()) {
|
||||
return response()->json([
|
||||
'success' => false,
|
||||
'message' => 'Pengajuan yang sudah diterima tidak dapat dibatalkan',
|
||||
], 422);
|
||||
}
|
||||
|
||||
$success = $this->sekretariat([$id], 'Diajukan', null);
|
||||
|
||||
if ($success !== null) {
|
||||
return response()->json([
|
||||
'success' => true,
|
||||
'message' => "Berhasil membatalkan status $success pengajuan",
|
||||
]);
|
||||
}
|
||||
|
||||
return response()->json([
|
||||
'success' => false,
|
||||
'message' => 'Gagal membatalkan status pengajuan',
|
||||
]);
|
||||
}
|
||||
|
||||
public function delete($id)
|
||||
{
|
||||
BawahanHelper::authorizePengajuan($id);
|
||||
@@ -633,45 +607,6 @@ class TendikController extends Controller
|
||||
]);
|
||||
}
|
||||
|
||||
public function batalkanSelected(Request $request): JsonResponse
|
||||
{
|
||||
BawahanHelper::authorizePengajuan($request->input('ids', []));
|
||||
|
||||
$request->validate([
|
||||
'ids' => 'required|array',
|
||||
'ids.*' => 'integer',
|
||||
]);
|
||||
|
||||
$validCount = PengajuanPresensi::whereIn('id', $request->ids)->count();
|
||||
if ($validCount !== count($request->ids)) {
|
||||
return response()->json([
|
||||
'success' => false,
|
||||
'message' => 'Beberapa pengajuan tidak ditemukan',
|
||||
], 422);
|
||||
}
|
||||
|
||||
if (PengajuanPresensi::whereIn('id', $request->ids)->where('status', 'Diterima')->exists()) {
|
||||
return response()->json([
|
||||
'success' => false,
|
||||
'message' => 'Pengajuan yang sudah diterima tidak dapat dibatalkan',
|
||||
], 422);
|
||||
}
|
||||
|
||||
$success = $this->sekretariat($request->ids, 'Diajukan', null);
|
||||
|
||||
if ($success !== null) {
|
||||
return response()->json([
|
||||
'success' => true,
|
||||
'message' => "Berhasil membatalkan status $success pengajuan",
|
||||
]);
|
||||
}
|
||||
|
||||
return response()->json([
|
||||
'success' => false,
|
||||
'message' => 'Gagal membatalkan status pengajuan',
|
||||
]);
|
||||
}
|
||||
|
||||
public function sekretariat($id, $status, $catatan)
|
||||
{
|
||||
try {
|
||||
@@ -679,8 +614,8 @@ class TendikController extends Controller
|
||||
$pengajuans = PengajuanPresensi::whereIn('id', $id)->get();
|
||||
foreach ($pengajuans as $pengajuan) {
|
||||
DB::beginTransaction();
|
||||
if ($status === 'Diterima' && $pengajuan->getRawOriginal('kategori') == 3) {
|
||||
$limit = $this->checkLimit($pengajuan->nip, $pengajuan->tanggal_mulai);
|
||||
if ($status === 'Diterima' && in_array((int) $pengajuan->getRawOriginal('kategori'), [3, 21, 24, 25])) {
|
||||
$limit = $this->checkLimit($pengajuan->nip, $pengajuan->tanggal_mulai, (int) $pengajuan->getRawOriginal('kategori'));
|
||||
if ($limit) {
|
||||
continue;
|
||||
}
|
||||
@@ -768,12 +703,12 @@ class TendikController extends Controller
|
||||
}
|
||||
}
|
||||
|
||||
public function checkLimit($nip, $tanggal)
|
||||
public function checkLimit($nip, $tanggal, int $kategori = 3)
|
||||
{
|
||||
$pengajuans = PengajuanPresensi::where('nip', $nip)
|
||||
->whereIn('status', ['Diterima'])
|
||||
->where('tipe', 'absen')
|
||||
->where('kategori', 3)
|
||||
->where('kategori', $kategori)
|
||||
->whereYear('tanggal_mulai', explode('-', $tanggal)[0])
|
||||
->whereMonth('tanggal_mulai', explode('-', $tanggal)[1])
|
||||
->count();
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
namespace App\Http\Requests\Api;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
use Illuminate\Support\Fluent;
|
||||
use Illuminate\Validation\Rule;
|
||||
|
||||
class AbsenRequest extends FormRequest
|
||||
{
|
||||
@@ -39,11 +41,19 @@ class AbsenRequest extends FormRequest
|
||||
{
|
||||
return [
|
||||
'nip' => 'required|string',
|
||||
'file_surat' => 'required_without:bukti|file|mimes:pdf|max:1024',
|
||||
'bukti' => 'required_without:file_surat|file|mimes:pdf|max:1024',
|
||||
'kategori' => 'required|integer',
|
||||
'tanggal' => 'required|date|date_format:Y-m-d|before_or_equal:'.date('Y-m-d'),
|
||||
'file_lampiran' => 'nullable|required_if:kategori,2|file|mimes:pdf|max:1024',
|
||||
'file_surat' => 'required_without:bukti|file|mimes:pdf|max:3072',
|
||||
'bukti' => 'required_without:file_surat|file|mimes:pdf|max:3072',
|
||||
'kategori' => 'required|integer|in:2,3,21,24,25',
|
||||
'tanggal' => [
|
||||
'required',
|
||||
'date',
|
||||
'date_format:Y-m-d',
|
||||
// Tugas dinas (kategori 2) boleh diajukan untuk tanggal ke depan.
|
||||
Rule::when(fn (Fluent $input) => (int) $input->kategori !== 2, 'before_or_equal:'.date('Y-m-d')),
|
||||
],
|
||||
'siska_id' => 'required_if:kategori,2|nullable|integer',
|
||||
'tanggal_selesai' => 'nullable|date_format:Y-m-d|after_or_equal:tanggal',
|
||||
'file_lampiran' => 'nullable|file|mimes:pdf|max:3072',
|
||||
];
|
||||
}
|
||||
|
||||
@@ -57,20 +67,24 @@ class AbsenRequest extends FormRequest
|
||||
'file_surat.required_without' => 'File surat (file_surat) wajib diunggah.',
|
||||
'file_surat.file' => 'File surat tidak valid.',
|
||||
'file_surat.mimes' => 'File surat harus berformat PDF.',
|
||||
'file_surat.max' => 'Ukuran file surat maksimal 1 MB.',
|
||||
'file_surat.max' => 'Ukuran file surat maksimal 3 MB.',
|
||||
'bukti.required_without' => 'File surat (file_surat) wajib diunggah.',
|
||||
'bukti.file' => 'File surat tidak valid.',
|
||||
'bukti.mimes' => 'File surat harus berformat PDF.',
|
||||
'bukti.max' => 'Ukuran file surat maksimal 1 MB.',
|
||||
'bukti.max' => 'Ukuran file surat maksimal 3 MB.',
|
||||
'kategori.required' => 'Tipe absen (tipe_absen) wajib diisi.',
|
||||
'kategori.integer' => 'Tipe absen (tipe_absen) harus berupa angka.',
|
||||
'kategori.in' => 'Kategori Absen Tidak Valid.',
|
||||
'tanggal.required' => 'Tanggal wajib diisi.',
|
||||
'tanggal.date_format' => 'Format tanggal harus YYYY-MM-DD.',
|
||||
'tanggal.before_or_equal' => 'Tanggal tidak boleh melebihi hari ini.',
|
||||
'file_lampiran.required_if' => 'File lampiran wajib diunggah untuk kategori Tugas Dinas.',
|
||||
'siska_id.required_if' => 'SISKA ID (siska_id) wajib diisi untuk kategori Tugas Dinas.',
|
||||
'siska_id.integer' => 'SISKA ID (siska_id) harus berupa angka.',
|
||||
'tanggal_selesai.date_format' => 'Format tanggal selesai harus YYYY-MM-DD.',
|
||||
'tanggal_selesai.after_or_equal' => 'Tanggal selesai tidak boleh sebelum tanggal mulai.',
|
||||
'file_lampiran.file' => 'File lampiran tidak valid.',
|
||||
'file_lampiran.mimes' => 'File lampiran harus berformat PDF.',
|
||||
'file_lampiran.max' => 'Ukuran file lampiran maksimal 1 MB.',
|
||||
'file_lampiran.max' => 'Ukuran file lampiran maksimal 3 MB.',
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,15 +14,18 @@ class AbsenResource extends JsonResource
|
||||
*/
|
||||
public function toArray($request)
|
||||
{
|
||||
// siska_id & file_lampiran hanya relevan untuk tugas dinas (kategori 2).
|
||||
$tugasDinas = (int) $this->getRawOriginal('kategori') === 2;
|
||||
|
||||
return [
|
||||
'id' => $this->id,
|
||||
'tanggal' => $this->tanggal_mulai,
|
||||
'tanggal_selesai' => $this->tanggal_selesai,
|
||||
'kategori' => $this->kategori,
|
||||
'keterangan' => $this->keterangan,
|
||||
'status' => $this->status,
|
||||
'alasan' => $this->notes?->last()?->message,
|
||||
'bukti' => $this->file,
|
||||
'file_lampiran' => $this->file_lampiran,
|
||||
'siska_id' => $this->when($tugasDinas, $this->siska_id),
|
||||
'file_lampiran' => $this->when($tugasDinas, $this->file_lampiran),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,18 +26,31 @@ class PengajuanPresensi extends Model
|
||||
'keterangan',
|
||||
'file',
|
||||
'file_lampiran',
|
||||
'siska_id',
|
||||
'dawai_id',
|
||||
'status',
|
||||
'status_id',
|
||||
];
|
||||
|
||||
function setFileAttribute($value): void
|
||||
{
|
||||
// Link eksternal (mis. Google Drive pada tugas dinas) disimpan utuh.
|
||||
if (str_starts_with((string) $value, 'http')) {
|
||||
$this->attributes['file'] = $value;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
$file = explode('/', $value);
|
||||
$this->attributes['file'] = end($file);
|
||||
}
|
||||
|
||||
function getFileAttribute($value): string
|
||||
{
|
||||
if (str_starts_with((string) $value, 'http')) {
|
||||
return $value;
|
||||
}
|
||||
|
||||
if ($this->bdr_id === null) {
|
||||
$file = asset("storage/$this->tipe/presensi/$this->periode/$value");
|
||||
} else {
|
||||
|
||||
@@ -226,7 +226,7 @@ class DawaiService
|
||||
$data['alasan_tolak'] = $catatan;
|
||||
}
|
||||
|
||||
if (! $this->kirimPengajuanPresensi($data)) {
|
||||
if (! $this->kirimPengajuanPresensi($data, $pengajuan)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -235,7 +235,7 @@ class DawaiService
|
||||
return true;
|
||||
}
|
||||
|
||||
public function kirimPengajuanPresensi(array $data): bool
|
||||
public function kirimPengajuanPresensi(array $data, ?PengajuanPresensi $pengajuan = null): bool
|
||||
{
|
||||
try {
|
||||
$multipart = [];
|
||||
@@ -254,6 +254,13 @@ class DawaiService
|
||||
throw new Error($result['message'] ?? 'DAWAI menolak pengajuan presensi');
|
||||
}
|
||||
|
||||
$dawaiId = is_array($result['data'] ?? null) ? ($result['data']['id'] ?? null) : ($result['data'] ?? null);
|
||||
if ($pengajuan && $dawaiId) {
|
||||
$pengajuan->update(['dawai_id' => $dawaiId]);
|
||||
} elseif ($pengajuan) {
|
||||
Log::warning("DAWAI siskaPengajuanPresensi: respons tanpa id, dawai_id tidak disimpan (pengajuan #{$pengajuan->id}): ".json_encode($result));
|
||||
}
|
||||
|
||||
return true;
|
||||
} catch (ClientException $e) {
|
||||
$pesan = json_decode((string) $e->getResponse()->getBody(), true)['meta']['message'] ?? '';
|
||||
@@ -345,6 +352,42 @@ class DawaiService
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array{berhasil: bool, message: string, data: mixed} message dan data berasal dari respons DAWAI
|
||||
*/
|
||||
public function deletePengajuanCutiDinas(int|string $id): array
|
||||
{
|
||||
try {
|
||||
$response = $this->client->post('api/v2/siremun/cuti/delete', [
|
||||
'json' => ['id' => (string) $id],
|
||||
'timeout' => 15,
|
||||
]);
|
||||
|
||||
$result = json_decode($response->getBody()->getContents(), true);
|
||||
$message = $result['meta']['message'] ?? $result['message'] ?? 'Pengajuan presensi berhasil dihapus';
|
||||
|
||||
if (is_array($result) && (
|
||||
(array_key_exists('status', $result) && ! $result['status'])
|
||||
|| (isset($result['meta']['code']) && (int) $result['meta']['code'] !== 200)
|
||||
)) {
|
||||
Log::error("DAWAI deletePengajuanCutiDinas ($id): $message");
|
||||
|
||||
return ['berhasil' => false, 'message' => $message, 'data' => $result['data'] ?? null];
|
||||
}
|
||||
|
||||
return ['berhasil' => true, 'message' => $message, 'data' => $result['data'] ?? null];
|
||||
} catch (ClientException $e) {
|
||||
$message = json_decode((string) $e->getResponse()->getBody(), true)['meta']['message'] ?? $e->getMessage();
|
||||
Log::error("DAWAI deletePengajuanCutiDinas ($id): ".$e->getMessage());
|
||||
|
||||
return ['berhasil' => false, 'message' => $message, 'data' => null];
|
||||
} catch (Throwable $th) {
|
||||
Log::error("DAWAI deletePengajuanCutiDinas ($id): ".$th->getMessage());
|
||||
|
||||
return ['berhasil' => false, 'message' => $th->getMessage(), 'data' => null];
|
||||
}
|
||||
}
|
||||
|
||||
public function listRekening()
|
||||
{
|
||||
try {
|
||||
|
||||
@@ -21,7 +21,7 @@ class GoogleDriveService
|
||||
$this->rootFolderId = (string) config('services.google_drive.folder_id');
|
||||
}
|
||||
|
||||
public function uploadPdf(string $content, string $nip, string $namaPegawai, string $tanggal, string $namaKategori): string|false
|
||||
public function uploadPdf(string $content, string $nip, string $namaPegawai, string $tanggal, string $namaKategori, ?string $namaFile = null): string|false
|
||||
{
|
||||
if (! $this->credentialsPath || ! file_exists($this->credentialsPath) || ! $this->rootFolderId) {
|
||||
Log::error('GoogleDriveService: belum dikonfigurasi, upload dilewati.');
|
||||
@@ -30,7 +30,7 @@ class GoogleDriveService
|
||||
}
|
||||
|
||||
try {
|
||||
$client = new Client();
|
||||
$client = new Client;
|
||||
$client->setAuthConfig($this->credentialsPath);
|
||||
$client->addScope(Drive::DRIVE);
|
||||
|
||||
@@ -40,7 +40,7 @@ class GoogleDriveService
|
||||
$pegawaiFolderId = $this->findOrCreateFolder($service, $this->sanitize("$nip - $namaPegawai"), $pengajuanPresensiFolderId);
|
||||
$bulanFolderId = $this->findOrCreateFolder($service, Carbon::parse($tanggal)->translatedFormat('F Y'), $pegawaiFolderId);
|
||||
|
||||
$fileName = Carbon::parse($tanggal)->format('Y-m-d').'_'.$this->sanitize($namaKategori).'.pdf';
|
||||
$fileName = $namaFile ?? Carbon::now()->format('YmdHis').'_'.$nip.'_'.$this->sanitize($namaKategori).'.pdf';
|
||||
|
||||
$fileMetadata = new DriveFile([
|
||||
'name' => $fileName,
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
<?php
|
||||
|
||||
namespace App\Services;
|
||||
|
||||
use Illuminate\Support\Facades\Http;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Throwable;
|
||||
|
||||
class SenjaService
|
||||
{
|
||||
private const URL = 'http://172.16.40.168:9123';
|
||||
|
||||
private const PIN = 'UntanUltra-2026';
|
||||
|
||||
public const JAM_MASUK_DEFAULT = '07:30';
|
||||
|
||||
public const JAM_PULANG_DEFAULT = '16:30';
|
||||
|
||||
public function simpanIndex(string $nip, string $tanggalMulai, string $tanggalSelesai, string $jenisAbsen, string $jam, ?string $keterangan = null): bool
|
||||
{
|
||||
try {
|
||||
$response = Http::timeout(15)->asMultipart()->post(self::URL.'/api/simpan-index2026', [
|
||||
['name' => 'start_date', 'contents' => $tanggalMulai],
|
||||
['name' => 'end_date', 'contents' => $tanggalSelesai],
|
||||
['name' => 'jenis_absen', 'contents' => $jenisAbsen],
|
||||
['name' => 'jam', 'contents' => $jam],
|
||||
['name' => 'nip[]', 'contents' => $nip],
|
||||
['name' => 'keterangan', 'contents' => (string) $keterangan],
|
||||
['name' => 'pin', 'contents' => self::PIN],
|
||||
]);
|
||||
|
||||
if ($response->failed()) {
|
||||
Log::error("SENJA simpan-index2026 gagal ($nip $tanggalMulai s/d $tanggalSelesai $jenisAbsen $jam): HTTP {$response->status()} ".$response->body());
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
} catch (Throwable $th) {
|
||||
Log::error('SENJA simpan-index2026: '.$th->getMessage());
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public function resetJamKerja(string $nip, string $tanggalMulai, ?string $tanggalSelesai = null, ?string $keterangan = null): bool
|
||||
{
|
||||
$tanggalSelesai = $tanggalSelesai ?: $tanggalMulai;
|
||||
|
||||
$masuk = $this->simpanIndex($nip, $tanggalMulai, $tanggalSelesai, 'masuk', self::JAM_MASUK_DEFAULT, $keterangan);
|
||||
$pulang = $this->simpanIndex($nip, $tanggalMulai, $tanggalSelesai, 'pulang', self::JAM_PULANG_DEFAULT, $keterangan);
|
||||
|
||||
return $masuk && $pulang;
|
||||
}
|
||||
}
|
||||
@@ -25,7 +25,6 @@ class ApiDocsSummaries
|
||||
'post /v1/pengajuan-absen' => 'Buat Pengajuan Absen',
|
||||
'post /v1/pengajuan-absen/exists' => 'Duplikasi Pengajuan Absen',
|
||||
'delete /v1/pengajuan-absen/delete/{id}' => 'Hapus Pengajuan Absen',
|
||||
'patch /v1/pengajuan-absen/batalkan/{id}' => 'Batalkan Pengajuan Absen',
|
||||
|
||||
'get /v1/poin/{nip}' => 'Poin Pegawai',
|
||||
|
||||
|
||||
@@ -128,9 +128,6 @@
|
||||
<button type="button" class="btn ' . $btnTolak . ' btn-sm" id="btn-tolak-selected" disabled ' . $disabledAttr . '>
|
||||
<i class="uil-times"></i> Tolak
|
||||
</button>
|
||||
<button type="button" class="btn btn-secondary btn-sm" id="btn-batalkan-selected" disabled>
|
||||
<i class="uil-redo"></i> Batalkan
|
||||
</button>
|
||||
' . (auth()->user()->hasRole('Superuser') ? '
|
||||
<button type="button" class="btn ' . $btnHapus . ' btn-sm" id="btn-hapus-selected" disabled>
|
||||
<i class="uil-trash"></i> Hapus
|
||||
@@ -230,10 +227,6 @@
|
||||
{{ !$validasiWaktu['status'] ? 'disabled' : '' }}>
|
||||
<i class="fas fa-times"></i> Tolak
|
||||
</button>
|
||||
<button type="button" class="btn btn-warning" id="btn-batal" style="display: none;"
|
||||
{{ !$validasiWaktu['status'] ? 'disabled' : '' }}>
|
||||
<i class="fas fa-undo"></i> Batalkan
|
||||
</button>
|
||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">
|
||||
<i class="fas fa-times"></i> Tutup
|
||||
</button>
|
||||
@@ -309,26 +302,6 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- Modal Konfirmasi Batalkan --}}
|
||||
<div class="modal fade" id="modalBatalkanSelected" tabindex="-1" aria-hidden="true" data-bs-backdrop="static" data-bs-keyboard="false">
|
||||
<div class="modal-dialog modal-dialog-centered">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header bg-dark text-white">
|
||||
<h5 class="modal-title"><i class="fas fa-undo me-2"></i>Batalkan Verifikasi</h5>
|
||||
<button type="button" class="btn-close btn-close-white" data-bs-dismiss="modal"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p id="modal-batalkan-msg" class="mb-0"></p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-dark" id="btn-batalkan-confirm">
|
||||
<i class="fas fa-undo me-1"></i>Ya, Batalkan
|
||||
</button>
|
||||
<button type="button" class="btn btn-light" data-bs-dismiss="modal">Tutup</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('js')
|
||||
@@ -341,8 +314,8 @@
|
||||
if (beritaAcaraUploaded) {
|
||||
document.addEventListener('click', function(e) {
|
||||
var $matched = $(e.target).closest(
|
||||
'#btn-terima-selected, #btn-tolak-selected, #btn-batalkan-selected, #btn-hapus-selected, ' +
|
||||
'#btn-terima, #btn-tolak, #btn-batal, #btn-terima-confirm, ' +
|
||||
'#btn-terima-selected, #btn-tolak-selected, #btn-hapus-selected, ' +
|
||||
'#btn-terima, #btn-tolak, #btn-terima-confirm, ' +
|
||||
'input[type="checkbox"].form-check-input'
|
||||
);
|
||||
if ($matched.length) {
|
||||
@@ -415,12 +388,19 @@
|
||||
data: 'tanggal_mulai',
|
||||
name: 'tanggal_mulai',
|
||||
className: 'text-center',
|
||||
render: function(data) {
|
||||
return new Date(data).toLocaleDateString('id-ID', {
|
||||
render: function(data, type, row) {
|
||||
const format = (tanggal) => new Date(tanggal).toLocaleDateString('id-ID', {
|
||||
year: 'numeric',
|
||||
month: 'long',
|
||||
day: 'numeric'
|
||||
});
|
||||
|
||||
// Tugas dinas bisa berupa rentang tanggal (tanggal_mulai s/d tanggal_selesai).
|
||||
if (row.tanggal_selesai && row.tanggal_selesai !== data) {
|
||||
return format(data) + ' - ' + format(row.tanggal_selesai);
|
||||
}
|
||||
|
||||
return format(data);
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -547,11 +527,11 @@
|
||||
$('#btn-terima-selected, #btn-tolak-selected').prop('disabled', true);
|
||||
}
|
||||
|
||||
// Batalkan tidak terpengaruh time restriction
|
||||
// Hapus tidak terpengaruh time restriction
|
||||
if (hasSelected) {
|
||||
$('#btn-batalkan-selected, #btn-hapus-selected').prop('disabled', false);
|
||||
$('#btn-hapus-selected').prop('disabled', false);
|
||||
} else {
|
||||
$('#btn-batalkan-selected, #btn-hapus-selected').prop('disabled', true);
|
||||
$('#btn-hapus-selected').prop('disabled', true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -674,30 +654,18 @@
|
||||
} else {
|
||||
$('#btn-terima, #btn-tolak').show().prop('disabled', true);
|
||||
}
|
||||
$('#btn-batal').hide();
|
||||
} else if (status === 'Diterima') {
|
||||
$('#modal-catatan').val('').prop('disabled', true).attr('placeholder', 'Pengajuan telah diterima');
|
||||
$('#btn-terima, #btn-tolak').hide();
|
||||
if (canVerify) {
|
||||
$('#btn-batal').show().prop('disabled', false);
|
||||
} else {
|
||||
$('#btn-batal').show().prop('disabled', true);
|
||||
}
|
||||
} else if (status === 'Ditolak') {
|
||||
$('#modal-catatan').val(catatan || '').prop('disabled', true).attr('placeholder',
|
||||
'Catatan penolakan');
|
||||
$('#btn-terima, #btn-tolak').hide();
|
||||
if (canVerify) {
|
||||
$('#btn-batal').show().prop('disabled', false);
|
||||
} else {
|
||||
$('#btn-batal').show().prop('disabled', true);
|
||||
}
|
||||
}
|
||||
|
||||
// Store ID untuk action buttons
|
||||
$('#btn-terima').data('id', id);
|
||||
$('#btn-tolak').data('id', id);
|
||||
$('#btn-batal').data('id', id);
|
||||
|
||||
// Tampilkan modal
|
||||
$('#detailPresensiModal').modal('show');
|
||||
@@ -784,42 +752,6 @@
|
||||
}
|
||||
});
|
||||
|
||||
// Event handler untuk tombol batal
|
||||
$('#btn-batal').on('click', function() {
|
||||
if ($(this).prop('disabled')) {
|
||||
showWarning('Peringatan',
|
||||
'{{ $validasiWaktu['message'] ?? 'Tidak dapat melakukan verifikasi saat ini' }}');
|
||||
return;
|
||||
}
|
||||
|
||||
var id = $(this).data('id');
|
||||
|
||||
if (confirm('Apakah Anda yakin akan membatalkan status pengajuan ini?')) {
|
||||
$.ajax({
|
||||
url: '{{ route('pengajuan-presensi.honorer.cancel', ':id') }}'.replace(':id', id),
|
||||
method: 'POST',
|
||||
data: {
|
||||
_token: '{{ csrf_token() }}'
|
||||
},
|
||||
success: function(response) {
|
||||
if (response.success) {
|
||||
$('#detailPresensiModal').modal('hide');
|
||||
$('#table-detail').DataTable().ajax.reload(function() {
|
||||
updateSelectedCount();
|
||||
toggleBulkButtons();
|
||||
});
|
||||
showSuccess('Berhasil', 'Status pengajuan berhasil dibatalkan');
|
||||
} else {
|
||||
showError('Gagal', 'Gagal membatalkan status: ' + response.message);
|
||||
}
|
||||
},
|
||||
error: function(xhr) {
|
||||
handleAjaxError(xhr);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
// Event handler untuk tombol hapus (hanya untuk Superuser)
|
||||
$(document).on('click', '.delete-btn', function(e) {
|
||||
e.preventDefault();
|
||||
@@ -901,35 +833,5 @@
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// Event handler untuk batalkan selected
|
||||
$('#btn-batalkan-selected').on('click', function() {
|
||||
var ids = getSelectedIds();
|
||||
if (ids.length === 0) { showWarning('Peringatan', 'Pilih minimal satu item'); return; }
|
||||
if (hasSelectedDiterima()) { showWarning('Peringatan', 'Pengajuan yang sudah diterima tidak dapat dibatalkan'); return; }
|
||||
$('#modal-batalkan-msg').text('Anda akan membatalkan verifikasi ' + ids.length + ' pengajuan yang dipilih kembali ke status Diajukan.');
|
||||
$('#modalBatalkanSelected').modal('show');
|
||||
});
|
||||
|
||||
$('#btn-batalkan-confirm').on('click', function() {
|
||||
var ids = getSelectedIds();
|
||||
$('#modalBatalkanSelected').modal('hide');
|
||||
$.ajax({
|
||||
url: '{{ route('pengajuan-presensi.honorer.batalkan-selected') }}',
|
||||
method: 'POST',
|
||||
data: { _token: '{{ csrf_token() }}', ids: ids },
|
||||
success: function(response) {
|
||||
if (response.success) {
|
||||
$('#table-detail').DataTable().ajax.reload(function() {
|
||||
$('.select-item').prop('checked', false);
|
||||
$('#select-all').prop('checked', false);
|
||||
updateSelectedCount(); toggleBulkButtons();
|
||||
});
|
||||
showSuccess('Berhasil', response.message);
|
||||
} else { showError('Gagal', response.message); }
|
||||
},
|
||||
error: function(xhr) { handleAjaxError(xhr); }
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
|
||||
@@ -114,9 +114,6 @@
|
||||
<button type="button" class="btn ' . $btnTolak . ' btn-sm" id="btn-tolak-selected" disabled>
|
||||
<i class="uil-times"></i> Tolak
|
||||
</button>
|
||||
<button type="button" class="btn btn-secondary btn-sm" id="btn-batalkan-selected" disabled>
|
||||
<i class="uil-redo"></i> Batalkan
|
||||
</button>
|
||||
' . ($team->id == 1 ? '
|
||||
<button type="button" class="btn ' . $btnHapus . ' btn-sm" id="btn-hapus-selected" disabled>
|
||||
<i class="uil-trash"></i> Hapus
|
||||
@@ -212,9 +209,6 @@
|
||||
<button type="button" class="btn btn-danger" id="btn-tolak">
|
||||
<i class="fas fa-times"></i> Tolak
|
||||
</button>
|
||||
<button type="button" class="btn btn-warning" id="btn-batal" style="display: none;">
|
||||
<i class="fas fa-undo"></i> Batalkan
|
||||
</button>
|
||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">
|
||||
<i class="fas fa-times"></i> Tutup
|
||||
</button>
|
||||
@@ -290,26 +284,6 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Modal Konfirmasi Batalkan -->
|
||||
<div class="modal fade" id="modalBatalkanSelected" tabindex="-1" aria-hidden="true" data-bs-backdrop="static" data-bs-keyboard="false">
|
||||
<div class="modal-dialog modal-dialog-centered">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header bg-dark text-white">
|
||||
<h5 class="modal-title"><i class="fas fa-undo me-2"></i> Batalkan Verifikasi</h5>
|
||||
<button type="button" class="btn-close btn-close-white" data-bs-dismiss="modal"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p id="modal-batalkan-msg" class="mb-0"></p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-dark" id="btn-batalkan-confirm">
|
||||
<i class="fas fa-undo"></i> Ya, Batalkan
|
||||
</button>
|
||||
<button type="button" class="btn btn-light" data-bs-dismiss="modal">Tutup</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('js')
|
||||
@@ -322,9 +296,9 @@
|
||||
if (beritaAcaraUploaded) {
|
||||
document.addEventListener('click', function(e) {
|
||||
var $matched = $(e.target).closest(
|
||||
'#btn-terima-selected, #btn-tolak-selected, #btn-batalkan-selected, #btn-hapus-selected, ' +
|
||||
'#btn-terima-selected, #btn-tolak-selected, #btn-hapus-selected, ' +
|
||||
'#btn-terima, #btn-tolak, #btn-terima-confirm, #btn-tolak-confirm, ' +
|
||||
'#btn-hapus-confirm, #btn-batalkan-confirm, ' +
|
||||
'#btn-hapus-confirm, ' +
|
||||
'input[type="checkbox"].form-check-input'
|
||||
);
|
||||
if ($matched.length) {
|
||||
@@ -389,12 +363,19 @@
|
||||
data: 'tanggal_mulai',
|
||||
name: 'tanggal_mulai',
|
||||
className: 'text-center',
|
||||
render: function(data) {
|
||||
return new Date(data).toLocaleDateString('id-ID', {
|
||||
render: function(data, type, row) {
|
||||
const format = (tanggal) => new Date(tanggal).toLocaleDateString('id-ID', {
|
||||
year: 'numeric',
|
||||
month: 'long',
|
||||
day: 'numeric'
|
||||
});
|
||||
|
||||
// Tugas dinas bisa berupa rentang tanggal (tanggal_mulai s/d tanggal_selesai).
|
||||
if (row.tanggal_selesai && row.tanggal_selesai !== data) {
|
||||
return format(data) + ' - ' + format(row.tanggal_selesai);
|
||||
}
|
||||
|
||||
return format(data);
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -514,9 +495,9 @@
|
||||
function toggleBulkButtons() {
|
||||
var hasSelected = $('.select-item:checked').length > 0;
|
||||
if (hasSelected) {
|
||||
$('#btn-terima-selected, #btn-tolak-selected, #btn-batalkan-selected, #btn-hapus-selected').prop('disabled', false);
|
||||
$('#btn-terima-selected, #btn-tolak-selected, #btn-hapus-selected').prop('disabled', false);
|
||||
} else {
|
||||
$('#btn-terima-selected, #btn-tolak-selected, #btn-batalkan-selected, #btn-hapus-selected').prop('disabled', true);
|
||||
$('#btn-terima-selected, #btn-tolak-selected, #btn-hapus-selected').prop('disabled', true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -629,36 +610,6 @@
|
||||
});
|
||||
});
|
||||
|
||||
// Event handler untuk batalkan selected
|
||||
$('#btn-batalkan-selected').on('click', function() {
|
||||
var ids = getSelectedIds();
|
||||
if (ids.length === 0) { showWarning('Peringatan', 'Pilih minimal satu item'); return; }
|
||||
if (hasSelectedDiterima()) { showWarning('Peringatan', 'Pengajuan yang sudah diterima tidak dapat dibatalkan'); return; }
|
||||
$('#modal-batalkan-msg').text('Anda akan membatalkan verifikasi ' + ids.length + ' pengajuan yang dipilih kembali ke status Diajukan.');
|
||||
$('#modalBatalkanSelected').modal('show');
|
||||
});
|
||||
|
||||
$('#btn-batalkan-confirm').on('click', function() {
|
||||
var ids = getSelectedIds();
|
||||
$('#modalBatalkanSelected').modal('hide');
|
||||
$.ajax({
|
||||
url: '{{ route('pengajuan-presensi.tendik.batalkan-selected') }}',
|
||||
method: 'POST',
|
||||
data: { _token: '{{ csrf_token() }}', ids: ids },
|
||||
success: function(response) {
|
||||
if (response.success) {
|
||||
$('#table-detail').DataTable().ajax.reload(function() {
|
||||
$('.select-item').prop('checked', false);
|
||||
$('#select-all').prop('checked', false);
|
||||
updateSelectedCount(); toggleBulkButtons();
|
||||
});
|
||||
showSuccess('Berhasil', response.message);
|
||||
} else { showError('Gagal', response.message); }
|
||||
},
|
||||
error: function(xhr) { handleAjaxError(xhr); }
|
||||
});
|
||||
});
|
||||
|
||||
// Event handler untuk tombol detail presensi
|
||||
$(document).on('click', '.detail-presensi-btn', function(e) {
|
||||
e.preventDefault();
|
||||
@@ -692,22 +643,18 @@
|
||||
$('#modal-catatan').val('').prop('disabled', false).attr('placeholder',
|
||||
'Kosongkan catatan bila presensi diterima');
|
||||
$('#btn-terima, #btn-tolak').show();
|
||||
$('#btn-batal').hide();
|
||||
} else if (status === 'Diterima') {
|
||||
$('#modal-catatan').val('').prop('disabled', true).attr('placeholder', 'Pengajuan telah diterima');
|
||||
$('#btn-terima, #btn-tolak').hide();
|
||||
$('#btn-batal').show();
|
||||
} else if (status === 'Ditolak') {
|
||||
$('#modal-catatan').val(catatan || '').prop('disabled', true).attr('placeholder',
|
||||
'Catatan penolakan');
|
||||
$('#btn-terima, #btn-tolak').hide();
|
||||
$('#btn-batal').show();
|
||||
}
|
||||
|
||||
// Store ID untuk action buttons
|
||||
$('#btn-terima').data('id', id);
|
||||
$('#btn-tolak').data('id', id);
|
||||
$('#btn-batal').data('id', id);
|
||||
|
||||
// Tampilkan modal
|
||||
$('#detailPresensiModal').modal('show');
|
||||
@@ -782,36 +729,6 @@
|
||||
}
|
||||
});
|
||||
|
||||
// Event handler untuk tombol batal
|
||||
$('#btn-batal').on('click', function() {
|
||||
var id = $(this).data('id');
|
||||
|
||||
if (confirm('Apakah Anda yakin akan membatalkan status pengajuan ini?')) {
|
||||
$.ajax({
|
||||
url: '{{ route('pengajuan-presensi.tendik.cancel', ':id') }}'.replace(':id', id),
|
||||
method: 'POST',
|
||||
data: {
|
||||
_token: '{{ csrf_token() }}'
|
||||
},
|
||||
success: function(response) {
|
||||
if (response.success) {
|
||||
$('#detailPresensiModal').modal('hide');
|
||||
$('#table-detail').DataTable().ajax.reload(function() {
|
||||
updateSelectedCount();
|
||||
toggleBulkButtons();
|
||||
});
|
||||
showSuccess('Berhasil', 'Status pengajuan berhasil dibatalkan');
|
||||
} else {
|
||||
showError('Gagal', 'Gagal membatalkan status: ' + response.message);
|
||||
}
|
||||
},
|
||||
error: function(xhr) {
|
||||
handleAjaxError(xhr);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
// Event handler untuk tombol hapus individual
|
||||
$(document).on('click', '.delete-btn', function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
+2
-1
@@ -46,11 +46,12 @@ Route::prefix('v1')->group(function () {
|
||||
|
||||
Route::prefix('/pengajuan-absen')->name('pengajuan-absen.')->group(function () {
|
||||
Route::get('/', [PengajuanAbsenController::class, 'index']);
|
||||
Route::get('/list', [PengajuanAbsenController::class, 'list']);
|
||||
Route::get('/{nip}', [PengajuanAbsenController::class, 'show']);
|
||||
Route::post('/', [PengajuanAbsenController::class, 'store']);
|
||||
Route::post('/exists', [PengajuanAbsenController::class, 'pengajuanExists']);
|
||||
Route::delete('/delete/{id}', [PengajuanAbsenController::class, 'destroy']);
|
||||
Route::patch('/batalkan/{id}', [PengajuanAbsenController::class, 'batalkan']);
|
||||
Route::delete('/tugas-dinas/delete/{id}', [PengajuanAbsenController::class, 'destroyTugasDinas']);
|
||||
});
|
||||
|
||||
Route::prefix('/poin')->name('poin.')->group(function () {
|
||||
|
||||
@@ -24,12 +24,10 @@ Route::middleware('bawahan.presensi')->prefix('/pengajuan-presensi')->name('peng
|
||||
Route::get('/data-detail/{id}', [HonorerController::class, 'dataDetail'])->name('data-detail');
|
||||
Route::post('/approve/{id}', [HonorerController::class, 'approve'])->name('approve');
|
||||
Route::post('/reject/{id}', [HonorerController::class, 'reject'])->name('reject');
|
||||
Route::post('/cancel/{id}', [HonorerController::class, 'cancel'])->name('cancel');
|
||||
Route::delete('/delete/{id}', [HonorerController::class, 'delete'])->name('delete');
|
||||
Route::post('/delete-selected', [HonorerController::class, 'deleteSelected'])->name('delete-selected');
|
||||
Route::post('/verifikasi-semua/{nip}', [HonorerController::class, 'verifikasiSemua'])->name('verifikasi-semua');
|
||||
Route::post('/verifikasi-selected', [HonorerController::class, 'verifikasiSelected'])->name('verifikasi-selected');
|
||||
Route::post('/batalkan-selected', [HonorerController::class, 'batalkanSelected'])->name('batalkan-selected');
|
||||
});
|
||||
|
||||
// Path URL memakai "asn"; nama route tetap "tendik.*" (dipakai di banyak view/controller).
|
||||
@@ -42,11 +40,9 @@ Route::middleware('bawahan.presensi')->prefix('/pengajuan-presensi')->name('peng
|
||||
Route::get('/data-detail/{id}', [TendikController::class, 'dataDetail'])->name('data-detail');
|
||||
Route::post('/approve/{id}', [TendikController::class, 'approve'])->name('approve');
|
||||
Route::post('/reject/{id}', [TendikController::class, 'reject'])->name('reject');
|
||||
Route::post('/cancel/{id}', [TendikController::class, 'cancel'])->name('cancel');
|
||||
Route::delete('/delete/{id}', [TendikController::class, 'delete'])->name('delete');
|
||||
Route::post('/delete-selected', [TendikController::class, 'deleteSelected'])->name('delete-selected');
|
||||
Route::post('/verifikasi-semua/{nip}', [TendikController::class, 'verifikasiSemua'])->name('verifikasi-semua');
|
||||
Route::post('/verifikasi-selected', [TendikController::class, 'verifikasiSelected'])->name('verifikasi-selected');
|
||||
Route::post('/batalkan-selected', [TendikController::class, 'batalkanSelected'])->name('batalkan-selected');
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user