Skip to main content

Function: createLocationPreferenceRule()

function createLocationPreferenceRule(config): CompilationRule;
Prefers assigning a person to shift patterns matching a specific location.

Parameters

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

Returns

CompilationRule

Example

const rule = createLocationPreferenceRule({
  locationId: "terrace",
  priority: "HIGH",
  employeeIds: ["alice"],
});
builder = new ModelBuilder({ ...config, rules: [rule] });