feat: generate draft assignments from a staffing matrix
This commit is contained in:
1 parent
3116d23199
commit
2fc9806c69
41 files changed
+2618
No files matched your search
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
namespace App\Enum;
|
||||
|
||||
/**
|
||||
* A role the staffing matrix generates an assignment for. Each case maps to one job profile
|
||||
* through the auto_assignment_job_profiles parameter; the values are its keys.
|
||||
*/
|
||||
enum StaffingRole: string
|
||||
{
|
||||
case GUIDE = 'guide';
|
||||
case SKI_BEGINNER = 'ski_beginner';
|
||||
case SKI_ADVANCED = 'ski_advanced';
|
||||
case GUIDE_SKI_BEGINNER = 'guide_ski_beginner';
|
||||
case GUIDE_SKI_ADVANCED = 'guide_ski_advanced';
|
||||
|
||||
/** A Reiseleitung, alone or combined with a course: the roles that can guide and escort the bus. */
|
||||
public function isGuide(): bool
|
||||
{
|
||||
return match ($this) {
|
||||
self::GUIDE, self::GUIDE_SKI_BEGINNER, self::GUIDE_SKI_ADVANCED => true,
|
||||
self::SKI_BEGINNER, self::SKI_ADVANCED => false,
|
||||
};
|
||||
}
|
||||
|
||||
public function isCourse(): bool
|
||||
{
|
||||
return self::GUIDE !== $this;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user