HRMS & Workforce Management

Human Resource Management System governing staff profiles, employment, qualifications, certifications, availability, and assignments.

The HRMS module is the source of truth for the platform's workforce resources. It manages staff member profiles, employment records, qualifications, professional coaching certifications, availabilities, and shift assignments across sports venues and academy sessions.

Workforce Architecture

Designed to support complex athletic coaching rosters, medical certifications, part-time staff, and multi-venue availability calendars.

  • Staff Profiles & Roles

    Comprehensive personal and professional profiles with emergency contacts, job classifications, and system user mapping.

  • Employment History

    Audited records of contracts, probationary periods, promotions, compensation histories, and active employment terms.

  • Coaching Qualifications

    Registry of athletic degrees, coaching licenses, safety accreditations, and verified professional competencies.

  • Automated Compliance Gate

    Automated validation preventing staff from being assigned to sessions if mandatory certifications or first-aid licenses are expired.

  • Availability Engine

    Weekly recurring working hours, blackout leave periods, and dynamic shift availability calendars.

  • Session & Shift Roster

    Real-time assignment of coaches and referees to specific venue reservations and academy sessions.

Domain Aggregate Root: StaffMember

The StaffMember aggregate root enforces employment validity, active certification compliance checks, and emits assignment events.

src/Modules/Hrms/Hrms.Domain/Entities/StaffMember.csC#
public sealed class StaffMember : TenantAggregateRoot
{
    public string EmployeeNumber { get; private set; } = string.Empty;
    public string FullNameEn { get; private set; } = string.Empty;
    public string FullNameAr { get; private set; } = string.Empty;
    public string ContactEmail { get; private set; } = string.Empty;
    public string ContactPhone { get; private set; } = string.Empty;
    public Guid? IdentityActorId { get; private set; }
    public bool IsActive { get; private set; } = true;
    public List<EmploymentRecord> EmploymentHistory { get; private set; } = new();
    public List<Certification> Certifications { get; private set; } = new();
    public List<StaffAvailability> Availabilities { get; private set; } = new();

    public Result AssignToShift(Guid venueId, DateTimeOffset startUtc, DateTimeOffset endUtc)
    {
        // Enforces active employment contract and verified certification checks
        var hasValidCert = Certifications.Any(c => c.IsValidForSession(startUtc));
        if (!hasValidCert)
            return Result.Failure("Staff member does not have verified, active certification for session date.");

        RaiseDomainEvent(new StaffAssignedDomainEvent(Id, TenantId, venueId, startUtc, endUtc));
        return Result.Success();
    }
}

Staff Certification & Assignment Verification Workflow

The end-to-end verification gate ensuring 100% certified compliance for coaches before pitch assignments:

Coach/Staff Member added or schedules updated
Submit Professional License / Coaching Certification credentials
HR Admin verifies accrediting body, license number & expiry
Certification marked Verified with automated 30-day expiry tracker
Scheduler attempts Venue Session / Roster Assignment
Automated Compliance Gate verifies shift availability & non-expired license
Assignment confirmed & dispatched to Coach Mobile App

Primary API Endpoints

Key endpoints exposed by HrmsControllers for staff administration, certification verification, and roster scheduling.

MethodEndpointDescriptionAuth
GET/api/v1/hrms/staffList staff members with role, department, and employment status filters🔒 Required
POST/api/v1/hrms/staffOnboard a new coach or staff member profile🔒 Required
GET/api/v1/hrms/staff/{id}/certificationsRetrieve verified professional licenses and certifications for a staff member🔒 Required
POST/api/v1/hrms/staff/{id}/certificationsSubmit a new certification document for administrative verification🔒 Required
POST/api/v1/hrms/staff/{id}/certifications/{certId}/verifyVerify and approve a coaching license with recorded expiration date🔒 Required
GET/api/v1/hrms/staff/{id}/availabilityQuery working hours and shift availability for scheduling🔒 Required
POST/api/v1/hrms/assignmentsAssign a verified coach to a venue reservation or academy session🔒 Required