Hiring Module
Overview
The Hiring module manages the full recruitment pipeline — from vacancy creation to candidate offer. It supports multi-stage pipelines with configurable requirements, document uploads, assessments, approvals, and automated triggers.
Key Entities
| Entity | Description |
|---|---|
| Vacancy | A job position published for recruitment |
| Pipeline | A collection of stages defining the recruitment flow |
| Stage | A single step (Screening, Interview, Offer, etc.) |
| Applicant | A candidate tracked through pipeline stages |
| Candidate | A person in the talent pool (may apply to multiple vacancies) |
Concept
Recruitment Flow
Vacancy Published → Candidate Applies → Applicant Created
↓
Pipeline Stages (sequential)
├── Screening
├── Writing Test
├── Interview
├── Psycho Test
├── Medical
├── Yayasan Review (requires approval)
├── OPL
└── Offer (creates contract)Stage Configuration
Each stage can be configured with:
| Feature | Description | Config Location |
|---|---|---|
| Required Documents | Files that must be uploaded before advancing | /admin/recruitment-stages → Docs |
| Required Tests | Assessments that must be completed | /admin/recruitment-stages → Tests |
| Deposits | Fees required at this stage | /admin/recruitment-stages → Deposits |
| Approvals | Role-based or user-based approval | /admin/recruitment-stages → Approval |
| Triggers | Auto-actions on stage entry | /admin/recruitment-stages → Triggers |
Approval System
When a stage requires approval (e.g., Yayasan Review):
- Applicant enters the stage → Approval Request created
- Users with the configured role (
yayasan,hr, etc.) can approve/reject - Once minimum approvals met, admin can advance to next stage
Flowchart
Berikut adalah flowchart yang menggambarkan alur kerja utama dalam modul Hiring, mulai dari pembuatan vacancy hingga pembuatan kontrak.
Vacancy Creation Flow
Algorithm:
- HR fills vacancy details through a multi-section form (basic info, school assignment, employment terms, dates).
- On save, the
VacancyObservergenerates a uniquecodeusingGenerateUniqueCodetrait. - Published vacancies appear in the public career portal. Candidates can filter by school, type, and location.
- The vacancy status lifecycle:
draft→published→closed→filled/cancelled.
Application Submission Flow
Flowchart ini menunjukkan bagaimana kandidat mengirimkan aplikasi dan bagaimana sistem memprosesnya.
Algorithm:
- Candidate selects a published vacancy and fills the application form.
- On submission, the system checks that the vacancy is still open and the candidate hasn't already applied (duplicate prevention).
- If valid, an
Applicantrecord is created withstatus: appliedand linked to the first pipeline stage (screening). - A unique tracking token is generated so the candidate can check application status later.
Stage Advancement Flow
Flowchart ini menunjukkan alur ketika admin memajukan applicant ke stage berikutnya, lengkap dengan gate dokumen, approval, dan trigger.
Algorithm — sequential gate pattern:
- Document gate — Query all required documents for the current stage. If any are missing (status ≠
approved), advancement is blocked. - Approval gate — If the next stage has
approval_config, create anApprovalRequest. The system checksapproved_count >= min_approvalsbefore allowing advancement. - Trigger gate — Execute configured triggers via
StageOrchestrator(e.g.,create_contractonofferstage,send_notificationfor email/WhatsApp). - Transition — Update
applicant.stage_id. If final stage (offer), also setapplicant.status = 'done'and run hiring logic (create User, Employee, Teacher).
Document Verification Flow
Flowchart ini menunjukkan proses verifikasi dokumen yang diupload oleh kandidat.
Contract Creation Flow (Auto-Trigger)
Flowchart ini menunjukkan alur otomatis pembuatan kontrak ketika applicant mencapai stage Offer.
DFD — Data Flow Diagram
Berikut adalah Data Flow Diagram yang menggambarkan aliran data antara entitas eksternal, proses, dan penyimpanan data dalam sistem rekrutmen.
Level 0 — Context Diagram
Level 1 — Process Decomposition
Diagram ini memecah proses utama menjadi sub-proses yang lebih detail beserta aliran datanya.
Level 2 — Document Processing
Diagram ini mendetailkan proses upload dan verifikasi dokumen.
Data Flow Description
| Process | Input Data | Source | Output Data | Destination |
|---|---|---|---|---|
| 1.0 Manage Vacancies | Vacancy form data | HR | Vacancy record | Vacancies DS |
| 2.0 Process Applications | Application form + CV | Candidate | Applicant + Candidate records | Applicants + Candidates DS |
| 3.0 Schedule Interviews | Interviewer, datetime, room | HR | Interview record | Interviews DS |
| 4.0 Score Assessments | Test type, score | HR | Assessment record | Assessments DS |
| 5.0 Advance Stages | Stage ID, approval status | HR + Yayasan | Updated stage_id | Applicants DS |
| 6.0 Create Contracts | Applicant data | System (auto) | Contract record | Contracts DS |
| 7.0 Send Notifications | Recipient, template | System | Email/WA sent | External |
Activity Diagram — Full Recruitment Lifecycle
Berikut adalah activity diagram yang menggambarkan seluruh siklus hidup rekrutmen, dari pembuatan vacancy hingga berakhirnya kontrak kerja.
Lifecycle explanation:
- Vacancy states:
draft→published→open→filled/closed. HR controls publishing and closing dates. - Application processing: Each candidate submission creates an Applicant record and assigns it to the first pipeline stage. The applicant progresses through stages via admin advancement.
- Stage branching: At YayasanReview, the flow can branch to approval (OPL → Offer) or rejection. At Offer, the candidate can accept (→ Contract) or decline (→ OfferDeclined).
- Post-hire: After contract creation, the employee enters onboarding → active employment → eventual termination or resignation.
- Terminal states:
Rejected,OfferDeclined,Rescinded,Terminated,Resigned— no further transitions.
Database
ERD
Key Tables
| Table | Columns | Description |
|---|---|---|
vacancies | id, code, title, school_id, employment_type, status, opening_date, closing_date | Published job positions |
vacancy_compensations | id, vacancy_id, type, amount, currency | Salary and benefits |
vacancy_requirements | id, vacancy_id, type, description, is_mandatory | Job requirements |
pipelines | id, module, name, is_active | Pipeline definitions |
stages | id, pipeline_id, code, name, sort_order, approval_config (JSON) | Individual stages |
applicants | id, candidate_id, vacancy_id, stage_id, status, score, meta (JSON) | Candidate-vacancy tracking |
candidates | id, user_id, first_name, last_name, email, phone | Talent pool |
talent_interviews | id, applicant_id, scheduled_at, interviewer_id, status, notes | Interview scheduling |
talent_assessments | id, applicant_id, type, score, assessed_by | Test/assessment results |
applicant_documents | id, applicant_id, stage_id, asset_id, status | Document uploads |
applicant_deposits | id, applicant_id, stage_id, amount, status | Fee tracking |
approval_requests | id, applicant_id, stage_id, approver_id, status, notes | Approval tracking |
Key Files
Backend
| File | Purpose |
|---|---|
app/Models/Recruitment/Vacancy/Vacancy.php | Vacancy model — attributes, relations, scopes |
app/Models/Recruitment/Applicant/Applicant.php | Applicant model — stage tracking, status, scoring |
app/Models/Recruitment/Candidate/Candidate.php | Candidate talent pool |
app/Models/Platform/Pipeline/Pipeline.php | Pipeline definition (polymorphic) |
app/Models/Platform/Stage/Stage.php | Stage definition — sort order, config, approvals |
app/Models/Recruitment/TalentAssessment/TalentAssessment.php | Assessment scoring |
app/Models/Recruitment/TalentInterview/TalentInterview.php | Interview scheduling |
app/Observers/Recruitment/ApplicantObserver.php | Stage change logic, auto-triggers |
app/Observers/Recruitment/VacancyObserver.php | Vacancy code generation |
app/Services/Platform/Pipeline/StageOrchestrator.php | Stage entry triggers (contract, notification) |
app/Filament/Resources/Applicants/ | Applicant management UI |
app/Filament/Resources/Vacancies/ | Vacancy management UI |
Frontend (Public)
| File | Purpose |
|---|---|
resources/js/modules/landing/recruitment/ | Public career portal — vacancy listing, application form |
resources/js/modules/landing/recruitment/tracking/ | Application status tracking for candidates |