Skip to main content

Function: createMinHoursDayRule()

function createMinHoursDayRule(config): CompilationRule;
Ensures a person works at least a minimum number of hours per day.

Parameters

ParameterType
config{ employeeIds?: string[]; hours: number; priority: "LOW" | "MEDIUM" | "HIGH" | "MANDATORY"; roleIds?: string[]; skillIds?: string[]; }
config.employeeIds?string[]
config.hoursnumber
config.priority"LOW" | "MEDIUM" | "HIGH" | "MANDATORY"
config.roleIds?string[]
config.skillIds?string[]

Returns

CompilationRule

Example

const rule = createMinHoursDayRule({
  hours: 6,
  priority: "MANDATORY",
});
builder = new ModelBuilder({ ...config, rules: [rule] });