Skip to content

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

EntityDescription
VacancyA job position published for recruitment
PipelineA collection of stages defining the recruitment flow
StageA single step (Screening, Interview, Offer, etc.)
ApplicantA candidate tracked through pipeline stages
CandidateA 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:

FeatureDescriptionConfig Location
Required DocumentsFiles that must be uploaded before advancing/admin/recruitment-stages → Docs
Required TestsAssessments that must be completed/admin/recruitment-stages → Tests
DepositsFees required at this stage/admin/recruitment-stages → Deposits
ApprovalsRole-based or user-based approval/admin/recruitment-stages → Approval
TriggersAuto-actions on stage entry/admin/recruitment-stages → Triggers

Approval System

When a stage requires approval (e.g., Yayasan Review):

  1. Applicant enters the stage → Approval Request created
  2. Users with the configured role (yayasan, hr, etc.) can approve/reject
  3. 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:

  1. HR fills vacancy details through a multi-section form (basic info, school assignment, employment terms, dates).
  2. On save, the VacancyObserver generates a unique code using GenerateUniqueCode trait.
  3. Published vacancies appear in the public career portal. Candidates can filter by school, type, and location.
  4. The vacancy status lifecycle: draftpublishedclosedfilled / cancelled.

Application Submission Flow

Flowchart ini menunjukkan bagaimana kandidat mengirimkan aplikasi dan bagaimana sistem memprosesnya.

Algorithm:

  1. Candidate selects a published vacancy and fills the application form.
  2. On submission, the system checks that the vacancy is still open and the candidate hasn't already applied (duplicate prevention).
  3. If valid, an Applicant record is created with status: applied and linked to the first pipeline stage (screening).
  4. 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:

  1. Document gate — Query all required documents for the current stage. If any are missing (status ≠ approved), advancement is blocked.
  2. Approval gate — If the next stage has approval_config, create an ApprovalRequest. The system checks approved_count >= min_approvals before allowing advancement.
  3. Trigger gate — Execute configured triggers via StageOrchestrator (e.g., create_contract on offer stage, send_notification for email/WhatsApp).
  4. Transition — Update applicant.stage_id. If final stage (offer), also set applicant.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

ProcessInput DataSourceOutput DataDestination
1.0 Manage VacanciesVacancy form dataHRVacancy recordVacancies DS
2.0 Process ApplicationsApplication form + CVCandidateApplicant + Candidate recordsApplicants + Candidates DS
3.0 Schedule InterviewsInterviewer, datetime, roomHRInterview recordInterviews DS
4.0 Score AssessmentsTest type, scoreHRAssessment recordAssessments DS
5.0 Advance StagesStage ID, approval statusHR + YayasanUpdated stage_idApplicants DS
6.0 Create ContractsApplicant dataSystem (auto)Contract recordContracts DS
7.0 Send NotificationsRecipient, templateSystemEmail/WA sentExternal

Activity Diagram — Full Recruitment Lifecycle

Berikut adalah activity diagram yang menggambarkan seluruh siklus hidup rekrutmen, dari pembuatan vacancy hingga berakhirnya kontrak kerja.

Lifecycle explanation:

  1. Vacancy states: draftpublishedopenfilled / closed. HR controls publishing and closing dates.
  2. 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.
  3. Stage branching: At YayasanReview, the flow can branch to approval (OPL → Offer) or rejection. At Offer, the candidate can accept (→ Contract) or decline (→ OfferDeclined).
  4. Post-hire: After contract creation, the employee enters onboarding → active employment → eventual termination or resignation.
  5. Terminal states: Rejected, OfferDeclined, Rescinded, Terminated, Resigned — no further transitions.

Database

ERD

Key Tables

TableColumnsDescription
vacanciesid, code, title, school_id, employment_type, status, opening_date, closing_datePublished job positions
vacancy_compensationsid, vacancy_id, type, amount, currencySalary and benefits
vacancy_requirementsid, vacancy_id, type, description, is_mandatoryJob requirements
pipelinesid, module, name, is_activePipeline definitions
stagesid, pipeline_id, code, name, sort_order, approval_config (JSON)Individual stages
applicantsid, candidate_id, vacancy_id, stage_id, status, score, meta (JSON)Candidate-vacancy tracking
candidatesid, user_id, first_name, last_name, email, phoneTalent pool
talent_interviewsid, applicant_id, scheduled_at, interviewer_id, status, notesInterview scheduling
talent_assessmentsid, applicant_id, type, score, assessed_byTest/assessment results
applicant_documentsid, applicant_id, stage_id, asset_id, statusDocument uploads
applicant_depositsid, applicant_id, stage_id, amount, statusFee tracking
approval_requestsid, applicant_id, stage_id, approver_id, status, notesApproval tracking

Key Files

Backend

FilePurpose
app/Models/Recruitment/Vacancy/Vacancy.phpVacancy model — attributes, relations, scopes
app/Models/Recruitment/Applicant/Applicant.phpApplicant model — stage tracking, status, scoring
app/Models/Recruitment/Candidate/Candidate.phpCandidate talent pool
app/Models/Platform/Pipeline/Pipeline.phpPipeline definition (polymorphic)
app/Models/Platform/Stage/Stage.phpStage definition — sort order, config, approvals
app/Models/Recruitment/TalentAssessment/TalentAssessment.phpAssessment scoring
app/Models/Recruitment/TalentInterview/TalentInterview.phpInterview scheduling
app/Observers/Recruitment/ApplicantObserver.phpStage change logic, auto-triggers
app/Observers/Recruitment/VacancyObserver.phpVacancy code generation
app/Services/Platform/Pipeline/StageOrchestrator.phpStage entry triggers (contract, notification)
app/Filament/Resources/Applicants/Applicant management UI
app/Filament/Resources/Vacancies/Vacancy management UI

Frontend (Public)

FilePurpose
resources/js/modules/landing/recruitment/Public career portal — vacancy listing, application form
resources/js/modules/landing/recruitment/tracking/Application status tracking for candidates