Lewati ke isi

Domain: SDM / HR (Sumber Daya Manusia)

Production Ready

SSOT untuk modul kepegawaian Scola — data pegawai, penggajian, cuti, dan kontrak paket HR/payroll.

Last verified: 2026-04-05 UAT Document: UAT-HR.md


1. Visi & Best Practice

1.1 Regulasi Acuan

Regulasi Relevansi
UU No. 13/2003 tentang Ketenagakerjaan Hak cuti, upah, jam kerja
PP No. 36/2021 tentang Pengupahan Komponen gaji, THR, lembur
UU Cipta Kerja (cluster ketenagakerjaan) Aturan PKWT, PHK, pesangon
Permendikbud tentang Beban Kerja Guru Minimal 24 jam/minggu tatap muka
BPJS Ketenagakerjaan & Kesehatan Potongan iuran wajib

1.2 Kondisi Ideal

Data Kepegawaian: - Database pegawai lengkap: biodata, pendidikan, sertifikasi, pangkat/golongan - Riwayat jabatan dan penugasan - Dokumen kepegawaian digital (SK, sertifikat, NUPTK) - Integrasi dengan Dapodik/SIMPATIKA (export data)

Penggajian (Payroll): - Komponen gaji configurable: gaji pokok, tunjangan (jabatan, transport, makan), potongan (BPJS, pajak PPh 21) - Payslip auto-generate per periode - Slip gaji digital (view per pegawai) - THR & bonus calculation - Rekapitulasi payroll untuk yayasan

Cuti & Izin: - Jenis cuti: tahunan, sakit, melahirkan, besar, dll. - Saldo cuti per pegawai - Workflow pengajuan: pegawai → atasan → approval - Kalender cuti team

Kehadiran Staf (lintas domain): - Self-attendance check-in/check-out - History kehadiran per pegawai - Integrasi RFID (jika ada) - Rekap per periode - Runtime/package gate mengikuti domain Absensi (SC-ATTEND+), bukan SC-PEOPLE


2. Arsitektur & Data Model

2.1 Backend Modules

Module Deskripsi
scola_core Employee extension pada hr.employee
scola_hr Leave types, kalender kerja, dan konfigurasi HR sekolah
scola_payroll Payroll extensions pada om_hr_payroll

Modular boundary note: - scola_people adalah istilah paket/feature-flag untuk keluarga HR dan payroll. - scola_hr adalah namespace modul backend, bukan nama feature flag frontend. - Self-attendance staf, GPS radius, dan face verification diimplementasikan oleh scola_hr_attendance dan dijual/gated sebagai SC-ATTEND+ melalui scola_face_recognition.

2.2 Frontend Structure

src/views/
├── AdminViews/TeacherDatabase/
│   ├── TeacherList.vue              # Daftar pegawai
│   └── DetailGuru.vue               # Detail pegawai
├── AdminViews/HR/
│   ├── HRDashboard.vue              # HR dashboard
│   ├── HRPayroll.vue                # Payroll management
│   ├── HRLeaveApproval.vue          # Leave approval
│   ├── HRLeavePolicy.vue            # Leave policy config
│   ├── HRAttendanceReport.vue       # Staff attendance report
│   └── ...
├── FacultyViews/Payroll/
│   ├── PayslipList.vue              # View slip gaji (personal)
│   └── PayslipDetail.vue            # Detail slip gaji
├── FacultyViews/TimeOff/
│   └── TimeOffList.vue              # Pengajuan cuti
├── AttendanceManagement/Staff/
│   └── SelfAttendance.vue           # Self check-in/out
└── Principal/
    └── PrincipalHR.vue              # Principal HR overview

2.3 Key Capabilities

Capability Roles
hr.overview.view principal
hr.employees.view principal, head_admin, admin_staff
hr.employees.manage head_admin
hr.payroll.view admin (payroll mgmt)
hr.payslip.view teacher, counselor, librarian, admin_staff (personal)
hr.payroll_cost.view foundation_chairman
hr.leave.view/manage head_admin
hr.leave_personal.view teacher, counselor
hr.attendance.view teacher, counselor, admin_staff (personal; runtime gate scola_face_recognition)

3. Fitur & Status Implementasi

Fitur Status Catatan
Database pegawai (list + detail) ✅ Done TeacherList + DetailGuru
HR dashboard (admin) ✅ Done HRDashboard
Payroll management ✅ Done HRPayroll
Payslip view (personal) ✅ Done Per employee via PayslipList
Payslip detail ✅ Done PayslipDetail
Leave request (personal) ✅ Done TimeOffList
Leave approval (admin) ✅ Done HRLeaveApproval
Leave policy configuration ✅ Done HRLeavePolicy
Self-attendance check-in/out ✅ Done SelfAttendance
Staff attendance report ✅ Done HRAttendanceReport
Principal HR overview ✅ Done PrincipalHR
Foundation payroll cost view ✅ Done Summary agregat via foundation routes; detail individu memang dibatasi
THR calculation ✅ Done Auto-calc + prorate via salary_rules_thr.xml (SE Menaker 6/2016, PP 36/2021)
PPh 21 auto-calculation ✅ Done Progressive 5-bracket tax via salary_rules_pph21.xml (UU HPP 2021)
BPJS auto-deduction ✅ Done Full BPJS KES/JHT/JP/JKK/JKM via salary_rules_bpjs.xml + bpjs_config.py
Dapodik/SIMPATIKA export ✅ Done Excel export wizard: siswa, GTK, rombel (dapodik_export.py)
Digital document management (SK, sertifikat) ✅ Done hr.employee.document model + HRDocumentRepo.vue
Riwayat jabatan/pangkat ✅ Done hr.employment.history model + HREmploymentHistory.vue

4. Gap Analysis & Backlog

P1 — Important (ALL RESOLVED ✅)

Gap Status Solusi
PPh 21 auto-calculation ✅ Resolved 9 salary rules progressive tax (UU HPP 2021, PMK 168/2023)
BPJS auto-deduction ✅ Resolved 7 salary rules + configurable scola.bpjs.config with salary caps
THR auto-calculation ✅ Resolved THR + THR prorate rules (SE Menaker 6/2016, PP 36/2021)

P2 — Nice to Have (ALL RESOLVED ✅)

Gap Status Solusi
Dapodik/SIMPATIKA export ✅ Resolved DapodikExportWizard — siswa, GTK, rombel Excel export
Digital document repo ✅ Resolved hr.employee.document — 18 document types, expiry tracking, attachments
Employment history tracking ✅ Resolved hr.employment.history — 10 change types, audit trail, SK linking

5. Evidence & Validation

Automated Baseline — 2026-03-31

  • tests/unit/services/hrDocument.service.spec.js — document type mapping, canonical employee_id, history enrichment
  • tests/unit/services/leaveApprovalPolicy.spec.js — approval gate first/second approver
  • tests/unit/services/principalHrOverview.service.spec.js — real attendance KPI aggregation + school-timezone date boundary
  • tests/unit/services/contract.service.spec.js — kontrak berakhir mengikuti school timezone, bukan tanggal browser
  • tests/unit/services/payroll.service.spec.js — NET payslip total derivation
  • tests/unit/services/foundation.service.spec.js — foundation HR/governance source path /api/v1/...
  • tests/e2e/hr/payroll-crud.spec.ts — payroll management + payslip self-service smoke
  • tests/e2e/critical/tier1_hr_workflow.spec.ts — dokumen kepegawaian, riwayat jabatan, dan cuti request → approve

Implementation Notes

  • Principal HR overview mengambil metrik kehadiran riil dari attendanceSummaryService, bukan angka hardcoded.
  • Document repository dan employment history memakai employee_id kanonis, bukan input nama bebas.
  • Payslip personal menampilkan net_salary hasil derivasi dari line NET karena model hr.payslip backend tidak mengekspos field total bersih langsung.
  • Foundation payroll/HR view memang summary-only untuk role yayasan; detail individu pegawai tidak ditampilkan sesuai batas akses.
  • Default/filter periode attendance, time off, payroll, kontrak berakhir, dan jadwal kerja sekarang mengikuti school timezone global dari company settings, bukan lagi browser timezone atau fallback WIB tetap.

6. File References

Frontend

  • src/router/adminRoutes.js — HR admin routes (incl. document repo & employment history)
  • src/router/teacherRoutes.js — Payslip, timeoff, self-attendance routes
  • src/views/AdminViews/HR/ — HR management views
  • src/views/AdminViews/HR/HRDocumentRepo.vue — Digital document repository
  • src/views/AdminViews/HR/HREmploymentHistory.vue — Career/position history timeline
  • src/views/FacultyViews/Payroll/ — Personal payslip views
  • src/views/FacultyViews/TimeOff/ — Leave request views
  • src/services/hr/hrDocument.service.js — API service for documents & history

Backend

  • scola_hr/models/hr_employee.py — Indonesian HR employee extensions (PTKP, BPJS, PKG)
  • scola_hr/models/hr_contract.py — Contract with golongan, tunjangan, BPJS lines
  • scola_hr/models/hr_employee_document.py — Digital document repository (18 types)
  • scola_hr/models/hr_employment_history.py — Career tracking (10 change types)
  • scola_payroll/data/salary_rules_pph21.xml — PPh 21 progressive tax rules
  • scola_payroll/data/salary_rules_bpjs.xml — BPJS auto-deduction rules
  • scola_payroll/data/salary_rules_thr.xml — THR auto-calculation rules
  • scola_payroll/models/bpjs_config.py — Configurable BPJS rates & thresholds
  • scola_payroll/controllers/payroll_api.py — Payroll REST API
  • scola_payroll/controllers/hr_document_api.py — Document & history REST API
  • scola_core/models/dapodik_export.py — Dapodik export wizard (siswa, GTK, rombel)