Skip to main content

Function: createMaxConsecutiveDaysRule()

function createMaxConsecutiveDaysRule(config): CompilationRule;
Limits how many consecutive days a person can be assigned.

Parameters

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

Returns

CompilationRule

Example

const rule = createMaxConsecutiveDaysRule({
  days: 5,
  priority: "MANDATORY",
});
builder = new ModelBuilder({ ...config, rules: [rule] });