Skip to main content

Function: createMinConsecutiveDaysRule()

function createMinConsecutiveDaysRule(config): CompilationRule;
Requires that once a person starts working, they continue for a minimum number of consecutive days.

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 = createMinConsecutiveDaysRule({
  days: 3,
  priority: "MANDATORY",
});
builder = new ModelBuilder({ ...config, rules: [rule] });