feat: generate draft assignments from a staffing matrix

This commit is contained in:
fromme committed 2026-10-15 18:11:51 +02:00
1 parent 3116d23199
commit 2fc9806c69
41 files changed
+2618

No files matched your search

+13
View File
@@ -0,0 +1,13 @@
<?php
namespace App\Enum;
/**
* A fee the staffing matrix puts on a generated assignment. Each case maps to one Fee row
* through the auto_assignment_fees parameter; the values are its keys.
*/
enum StaffingFee: string
{
case GUIDING = 'guiding';
case COURSE = 'course';
}
+30
View File
@@ -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;
}
}