What's missing, what's broken, and what needs to be fixed in the Frontend
| Category | Backend Endpoints | Frontend Coverage | Score |
|---|---|---|---|
| Core Organization (Departments, Positions, Shifts, Settings) | 18 | Complete | |
| Employee Management | 8 | Partial | |
| Schedules | 4 | Missing | |
| Attendance + Corrections | 7 | Partial | |
| Leave (Types + Balances + Requests) | 15 | Partial | |
| Salary (Components + Structures) | 8 | Partial | |
| Payroll | 9 | Complete | |
| Loans | 6 | Complete | |
| Recruitment (Openings + Candidates + Applications + Offers) | 21 | Partial | |
| Performance (KPIs + Templates + Reviews) | 17 | Complete | |
| Training (Programs + Sessions + Enrollments) | 13 | Complete | |
| EOS | 6 | Complete | |
| Reports | 6 | Complete |
These features have full backend API support but zero frontend implementation.
CRITICAL | Backend: 4 endpoints | Frontend: 0%
What's missing: No component, service, model, or route for shift schedule management.
Backend supports:
Business impact: Cannot assign employees to shifts. Shifts are defined but never used. Attendance has no reference shift to compare against. Overtime/late calculations are unreliable without schedule data.
Files needed:
src/app/features/hr/schedules/hr-schedules.component.ts (new)
src/app/core/services/hr-schedule.service.ts (new)
src/app/core/models/hr-schedule.model.ts (new)
+ route in app.routes.ts
+ nav item in sidebar config
CRITICAL | Backend: 2 endpoints | Frontend: 0%
What's missing: No UI to submit or approve attendance corrections. No model, no service methods, no dialog.
Backend supports:
Business impact: Employees cannot correct incorrect attendance records. Managers cannot review correction requests. Late/absent records cannot be disputed. This is a standard HR requirement.
Implementation: Can be added as a sub-feature within the existing Attendance component (tab or dialog).
CRITICAL | Backend: 3 endpoints | Frontend: 0%
What's missing: No component, service, or model for leave balance management.
Backend supports:
Business impact: Cannot initialize annual leave quotas. Cannot view how many days employees have remaining. Cannot adjust balances for exceptions. Leave requests work but don't validate against available balance. EOS leave payout is manually entered instead of calculated.
Implementation: New standalone component or integrate into Leave Types/Requests screen.
CRITICAL | Backend: 3 endpoints | Frontend: 0%
What's missing: No UI to assign salary components to individual employees or apply mandatory components.
Backend supports:
Business impact: Salary components are defined but never assigned to employees. Payroll calculation relies on mandatory flag only; per-employee customization is impossible. Housing allowance, transportation, etc. cannot be configured per employee.
Implementation: Add as a tab in Employee detail view OR within Salary Components screen.
CRITICAL | Backend: 5 endpoints | Frontend: Service only, NO UI
What exists: HrOfferService with all methods (CRUD + send + accept + reject). Model HrOffer is defined.
What's missing: No component, no route, no navigation menu item. The complete offer lifecycle is inaccessible from the UI.
Backend supports:
Business impact: The full recruitment pipeline is broken. Cannot formalize offers to candidates. Cannot auto-create employee records from accepted offers (the most powerful recruitment feature). Must manually create employees.
Implementation: New component OR integrate into Candidates component as an additional dialog/tab.
HIGH | Backend: 2 endpoints | Frontend: 0%
What's missing: No file upload UI for employee documents. Backend supports uploading contracts, certificates, visas, medical records (max 5MB) and deleting them.
Exists: photo field in model but no upload control. Backend has POST /employees/{id}/documents and DELETE /employees/{id}/documents/{doc}.
Needed: File upload section in employee form (ideally a new "Documents" tab) showing uploaded documents with type, title, issue/expiry dates, and delete action.
HIGH | Backend: Multiple contacts | Frontend: Single contact only
Current state: Form has only 2 fields: emergency_contact_name and emergency_contact_phone. Only one contact supported.
Backend supports: Multiple emergency contacts per employee, each with: name, relationship, phone, alternative_phone, address.
Needed: Replace single fields with a repeatable section (add/remove contacts) or nested table.
HIGH | Backend: Full CRUD | Frontend: 0%
What's missing: Completely absent from frontend. No model, no service, no UI fields.
Backend supports: Employee dependents with: name, relationship (spouse/child/parent/sibling/other), date_of_birth, national_id, notes.
Used for: Insurance beneficiaries, family allowances, visa sponsorship, tax deductions.
HIGH | Backend: Dedicated endpoint | Frontend: No UI
Current state: Service has terminate(id, data) method. Form has status dropdown but no dedicated termination dialog.
What's missing:
termination_date and termination_reason form fieldsCurrently: Can only change status dropdown to "terminated" which sends a basic update, not the proper /status endpoint.
HIGH | Backend: Pipeline endpoint exists | Frontend: List view only
Backend has: GET /api/hr/applications/pipeline returns candidate counts by stage (screening, interview, assessment, offer, hired).
Frontend missing: No visual pipeline/Kanban/funnel view. Applications are nested inside candidates as a sub-dialog only.
Needed: Visual pipeline showing candidates flowing through stages, possibly as a Kanban board or funnel chart on the recruitment dashboard.
MEDIUM | Backend: Calendar endpoint | Frontend: Not used
Backend has GET /api/hr/leave-requests/calendar returning approved leaves in date range. Frontend doesn't display a calendar view of who is on leave when.
MEDIUM | Backend: Bulk endpoint | Frontend: Not implemented
Backend supports POST /api/hr/attendance/bulk for batch check-in of multiple employees. Frontend has no bulk import UI.
MEDIUM | Backend: Summary endpoint | Frontend: Not used
Backend has GET /api/hr/attendance/summary returning per-employee totals (present days, late count, overtime hours, etc.) for a date range. Could enhance attendance reporting.
MEDIUM | Backend: Payslip endpoint | Frontend: Unknown
Backend has GET /api/hr/payroll/{id}/payslip?employee_id=X. Need to verify if the frontend payroll component uses this for individual payslip viewing/printing.
MEDIUM | Backend: hire() endpoint | Frontend: Not implemented
Backend's POST /api/hr/offers/{id}/hire automatically creates an Employee record from the candidate + offer data. This powerful feature has no frontend trigger. Depends on GAP-05 (Offers UI).
LOW | Architecture concern
8 NgRx store slices (24 files) exist but are largely bypassed. Components call services directly using signals. This is a deliberate design choice but creates dead code. Either fully adopt NgRx or remove unused slices.
These are actual bugs where frontend values don't match backend expectations.
| # | Location | Issue | Frontend Value | Backend Value | Severity |
|---|---|---|---|---|---|
| BUG-01 | Employee Form → Contract Type | Mismatched enum values | 'full_time', 'part_time', 'contract', 'temporary', 'probation' |
'permanent', 'contract', 'part_time', 'probation' |
HIGH |
|
Impact: Selecting "full_time" sends an invalid value to backend. "permanent" is never selectable. "temporary" doesn't exist in backend. Fix: Replace 'full_time' with 'permanent'. Remove 'temporary'. Backend ContractType enum: permanent, contract, part_time, probation.
|
|||||
| BUG-02 | Employee Form → Status Dropdown | Missing status option | 'active', 'inactive', 'suspended', 'terminated' |
'active', 'on_leave', 'suspended', 'terminated', 'resigned' |
HIGH |
|
Impact: Cannot set employee status to "on_leave" or "resigned". "inactive" doesn't exist in backend EmployeeStatus enum. Fix: Replace 'inactive' with 'on_leave'. Add 'resigned'. Backend enum: active, on_leave, suspended, terminated, resigned.
|
|||||
| BUG-03 | Candidates → Application Stage | Mismatched stage names | 'pending', 'shortlisted', 'interviewed', 'offered', 'hired', 'rejected' |
'applied', 'screening', 'interview', 'assessment', 'offer', 'hired', 'rejected' |
MEDIUM |
|
Impact: Stage values sent to backend don't match ApplicationStage enum. Pipeline view (if added) would be broken. Fix: Align frontend options with backend ApplicationStage enum: applied, screening, interview, assessment, offer, hired, rejected. |
|||||
Fields that exist in the backend model but are absent from the frontend employee form.
| Field | Type | Form Tab | Why It Matters | Priority |
|---|---|---|---|---|
contract_start_date |
DatePicker | Employment | Separate from hire_date; contract may start later. Important for contract/probation tracking. | HIGH |
probation_end_date |
DatePicker | Employment | Critical for probation management. Determines when employee becomes permanent. | HIGH |
currency_id |
Dropdown (FK) | Salary & Bank | Multi-currency salary support. Important for companies with branches in different countries. | MEDIUM |
payment_method |
Dropdown | Salary & Bank | How salary is paid: bank_transfer, cash, or check. Affects payroll processing. | HIGH |
passport_number |
Text | Personal | Required for visa processing and travel. Standard HR data point. | MEDIUM |
country |
Dropdown/Text | Personal | Country of residence. Different from nationality. | LOW |
termination_date |
DatePicker | Employment/Termination | Required when status is terminated/resigned. Currently no way to record this. | HIGH |
termination_reason |
Textarea | Employment/Termination | Legal requirement in many jurisdictions. Important for EOS calculation context. | HIGH |
photo |
File Upload | Personal | Employee photo/avatar. Field exists in model but no upload UI. | LOW |
| # | Feature | Backend | Service | Model | Component | Route | i18n | Priority |
|---|---|---|---|---|---|---|---|---|
| 1 | Shift Schedules | Ready | Missing | Missing | Missing | Missing | Missing | CRITICAL |
| 2 | Attendance Corrections | Ready | Missing | Missing | Missing | N/A (within attendance) | Missing | CRITICAL |
| 3 | Leave Balances | Ready | Missing | Missing | Missing | Missing | Partial | CRITICAL |
| 4 | Salary Structures | Ready | Missing | Missing | Missing | N/A (within employee/component) | Missing | CRITICAL |
| 5 | Job Offers UI | Ready | Exists | Exists | Missing | Missing | Missing | CRITICAL |
| 6 | Employee Documents | Ready | Missing | Missing | Missing | N/A (within employee) | Missing | HIGH |
| 7 | Emergency Contacts (multi) | Ready | Missing | Missing | Partial | N/A | Missing | HIGH |
| 8 | Employee Dependents | Ready | Missing | Missing | Missing | N/A (within employee) | Missing | HIGH |
| 9 | Termination Workflow | Ready | Exists | Partial | Missing | N/A | Missing | HIGH |
| 10 | Recruitment Pipeline | Ready | Exists | Exists | Missing | N/A | Missing | HIGH |
| 11 | Leave Calendar | Ready | Missing | N/A | Missing | N/A | Missing | MEDIUM |
Comparing Moon ERP HRM against standard HRMS features found in systems like SAP SuccessFactors, BambooHR, Odoo HR, and ERPNext HR.
| Feature Category | Industry Standard | Moon ERP Backend | Moon ERP Frontend | Assessment |
|---|---|---|---|---|
| Organization Structure | Departments, positions, hierarchy, org chart | Has all | Has all | On par. Missing: visual org chart component. |
| Employee Lifecycle | Hire, probation, promotion, transfer, terminate | Has most | Partial | Hire and terminate workflows incomplete on frontend. No promotion/transfer tracking. |
| Time & Attendance | Check-in/out, overtime, corrections, biometric integration | Has all | Partial | Missing corrections UI and bulk import. Biometric source supported but no integration UI. |
| Shift Management | Shift definitions + schedule assignment + rotation | Has definitions + schedules | Definitions only | Schedule assignment completely missing from frontend. Rotation not supported. |
| Leave Management | Types, balances, requests, approvals, calendar | Has all | Missing balances + calendar | Core leave workflow works. Balance management and calendar view missing. |
| Payroll | Components, structures, processing, accounting, payslips | Has all | Missing structures | Payroll processing complete. Per-employee salary structure assignment missing. |
| Recruitment | Job postings, candidates, pipeline, offers, onboarding | Has all except onboarding | Missing offers + pipeline | Job postings and candidates work. Offer management and pipeline view missing. |
| Performance | KPIs, templates, reviews, 360-degree feedback | Has most | Has most | Solid implementation. Missing: 360-degree feedback, goal tracking. |
| Training | Programs, sessions, enrollments, certificates | Has most | Has most | Good implementation. Missing: certificate generation, LMS integration. |
| Self-Service Portal | Employee self-service for leave, attendance, payslips | Settings exist | Not implemented | Settings for self-service exist but no employee portal. All admin-only currently. |
| Document Management | Employee files, contracts, certificates, expiry alerts | CRUD exists | Not implemented | Backend ready. No frontend upload/view. No expiry alerts. |
| Compliance | Labor law, GOSI, WPS, tax calculations | EOS only | EOS only | EOS follows Saudi Labor Law. No GOSI, WPS, or tax modules. |
| Area | Score | Notes |
|---|---|---|
| Backend API completeness | 85/100 | Comprehensive. Missing: promotion/transfer tracking, GOSI, onboarding, employee self-service API |
| Frontend implementation | 65/100 | Good foundation but 5 features completely missing, 5 partially implemented, 3 bugs |
| Data model coverage | 90/100 | 33 models covering most HRMS needs. Missing: promotions, transfers, warnings/disciplinary |
| Workflow coverage | 75/100 | Good approval workflows. Missing: onboarding, offboarding, probation reviews |
| Reporting | 70/100 | 6 reports. Missing: headcount forecasting, compensation analysis, compliance reports |
Recommended order of implementation based on business impact and dependencies.
Impact: Immediate data integrity fix. Prevents invalid data from reaching backend.
contract_start_date, probation_end_date to Employment tabpayment_method dropdown to Salary & Bank tabcurrency_id dropdown (linked to currencies)passport_number, country to Personal tabtermination_date, termination_reason (shown conditionally)Impact: Completes the employee data model. All fields already in TypeScript model.
Impact: Enables core HR workflows. Leave balances and salary structures are prerequisites for correct payroll.
Impact: Completes employee lifecycle management.
Impact: Completes the recruitment-to-hire pipeline.
# Shift Schedules (GAP-01)
src/app/features/hr/schedules/hr-schedules.component.ts
src/app/features/hr/schedules/hr-schedules.component.html
src/app/features/hr/schedules/hr-schedules.component.scss
src/app/core/services/hr-schedule.service.ts
src/app/core/models/hr-schedule.model.ts
# Leave Balances (GAP-03)
src/app/features/hr/leave-balances/hr-leave-balances.component.ts
src/app/features/hr/leave-balances/hr-leave-balances.component.html
src/app/features/hr/leave-balances/hr-leave-balances.component.scss
src/app/core/services/hr-leave-balance.service.ts
src/app/core/models/hr-leave-balance.model.ts
# Job Offers (GAP-05) - could be standalone or within candidates
src/app/features/hr/offers/hr-offers.component.ts (if standalone)
# Bug fixes + missing fields
src/app/features/hr/employees/hr-employees.component.ts (BUG-01, BUG-02, fields)
src/app/features/hr/employees/hr-employees.component.html (add fields, docs tab, etc.)
src/app/features/hr/candidates/hr-candidates.component.ts (BUG-03)
src/app/core/models/hr-employee.model.ts (add dependent/document types)
# Attendance corrections
src/app/features/hr/attendance/hr-attendance.component.ts (add corrections tab)
src/app/features/hr/attendance/hr-attendance.component.html
src/app/core/services/hr-attendance.service.ts (add correction methods)
src/app/core/models/hr-attendance.model.ts (add correction interface)
# Salary structure
src/app/features/hr/salary-components/hr-salary-components.component.ts (add assignment UI)
src/app/core/services/hr-salary-structure.service.ts (new service)
# Routes & Navigation
src/app/app.routes.ts (add new routes)
src/app/layout/config/nav-items.config.ts (add nav items)
src/assets/i18n/ar.json (new translation keys)
src/assets/i18n/en.json (new translation keys)